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 |
---|---|---|---|---|---|---|
Returns the project variable. | public VariableDeclaration getProject() {
return project;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static final String getProject() { return project; }",
"public static final String getProject() { return project; }",
"public String getProjectName() {\n\t\treturn project;\n\t}",
"public String getProjectno() {\r\n return projectno;\r\n }",
"public Project getProject(){\n\t\treturn this.project;\n\t}",
"public String getProjectName(){\n return projectModel.getProjectName();\n }",
"public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }",
"public String projectNumber() {\n return this.projectNumber;\n }",
"public Project getProject() {\r\n return project;\r\n }",
"public String getProjectName() {\r\n return this.projectName;\r\n }",
"public Project getProject()\n {\n \treturn project;\n }",
"public String getProjectName() {\n return projectName;\n }",
"public java.lang.Object getProjectID() {\n return projectID;\n }",
"public String getProjectName() {\n return getProperty(Property.PROJECT_NAME);\n }",
"public Project getProject() {\n\t\treturn project;\n\t}",
"public Project getProject()\n {\n return project;\n }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public jkt.hrms.masters.business.MstrProject getProject () {\n\t\treturn project;\n\t}",
"public Project getProject() {\n return project;\n }",
"public Project getProject() {\n return project;\n }",
"public String getProjectName() {\r\n return projectName;\r\n }",
"public Project getProject()\n\t{\n\t\treturn this.project;\n\t}",
"public int getProjectID() {\n return projectID;\n }",
"public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }",
"public String getProjectName() {\n return projectName;\n }",
"public String getProjectName() {\n return projectName;\n }",
"java.lang.String getProjectName();",
"java.lang.String getProjectId();",
"public String getProjectTitle()\r\n {\r\n return (m_projectTitle);\r\n }",
"public ProjectFile getProject()\r\n {\r\n return m_project;\r\n }",
"public String getProjcontactor() {\n return projcontactor;\n }",
"public Integer getProjectID() { return projectID; }",
"public IProject getProject() {\n\treturn this.project;\n }",
"public String getProjectName() {\n\t\treturn projectName;\n\t}",
"public String getProjectName() {\n return this.mProjectName;\n }",
"String getProjectName();",
"public String projectName() {\n return this.projectName;\n }",
"public String projectId() {\n return this.projectId;\n }",
"public ProjectInfo getProjectInfo()\n {\n\treturn c_projectInfo;\n }",
"public IProject getProject();",
"public FlexoProject getProject() {\n \t\treturn findCurrentProject();\n \t}",
"public String getProjectName() {\r\n\t\t\treturn projectName;\r\n\t\t}",
"public java.lang.String getRndProjectName() {\n return rndProjectName;\n }",
"Project getProject();",
"public String getProjId() {\n return projId;\n }",
"public IProject getProject() {\n return mProject;\n }",
"public File getProjectFile() {\r\n\t\treturn projectFile;\r\n\t}",
"public String getXcprojectcode() {\n return xcprojectcode;\n }",
"public String getProjectId() {\r\n return projectId;\r\n }",
"public String getProjectTitle() {\n return getProperty(Property.PROJECT_TITLE);\n }",
"public Project getProject() {\n\t\treturn bnd.getProject();\n\t}",
"public String getTargetProject() {\n return targetProject;\n }",
"public String getProjectDir() {\n return (String) data[GENERAL_PROJECT_DIR][PROP_VAL_VALUE];\n }",
"public String getProjectId() {\n return projectId;\n }",
"@Override\r\n\tString getProjectName();",
"public String getProjectId() {\n\t\treturn projectId;\n\t}",
"protected Integer getIdProject() {\n\n return (Integer) getExtraData().get(ProcessListener.EXTRA_DATA_IDPROJECT);\n }",
"@java.lang.Override\n public java.lang.String getProjectId() {\n java.lang.Object ref = projectId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n projectId_ = s;\n return s;\n }\n }",
"public String getDirectProjectName() {\r\n return directProjectName;\r\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"@Nonnull\n public String getProjectId() {\n return projectId;\n }",
"public long getProjectId() {\r\n return projectId;\r\n }",
"public org.eclipse.core.resources.IProject getProject() {\n \t\treturn project;\n \t}",
"@Transient\n @JsonProperty(\"project\")\n public Long getProjectId() {\n if (project == null) {\n return 0L;\n } else {\n return project.getId();\n }\n }",
"@Override\n\tpublic IProject getProject() {\n\t\treturn fProject;\n\t}",
"public Integer getProjectId() {\n return projectId;\n }",
"public Integer getProjectId() {\n return projectId;\n }",
"public int getProjectId()\r\n\t{\r\n\t\treturn projectId;\r\n\t}",
"@Editable(order=200, name=\"Project\", description=\"Specify project to retrieve artifacts from\")\n\t@ChoiceProvider(\"getProjectChoices\")\n\t@NotEmpty\n\tpublic String getProjectPath() {\n\t\treturn projectPath;\n\t}",
"String getVariable();",
"public String getProjectVersion() {\n\t\treturn projectVersion;\n\t}",
"private String getSimplicityProjectName() {\n return properties.getProperty(\"simplicity.starter.projectName\");\n }",
"protected IScriptProject getScriptProject() {\n \t\treturn fMainTab.getProject();\n \t}",
"public Integer getProjectId() {\n\t\treturn projectId;\n\t}",
"public int getC_Project_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_Project_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public java.lang.String getProjectId() {\n java.lang.Object ref = projectId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n projectId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getProjectPath() {\n return projectPath;\n }",
"public Project getProject(Long projectId);",
"public String getProjectDescribe() {\n return projectDescribe;\n }",
"com.appscode.api.auth.v1beta1.Project getProject();",
"public String getSelectedProjectName(){\n\t\treturn DataManager.getProjectFolderName();\n\t}",
"public String getProjectDate()\n\t{\n\t\treturn m_projectDate;\n\t}",
"@Override\n\tpublic Map<String, Object> getProjectName() {\n\t\treturn Collections.singletonMap(\"wrongAttribute\", \"the project name\");\n\t}",
"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 ChameleonProjectNature getProjectNature(){\r\n \t\treturn _projectNature;\r\n \t}",
"public String getProjectTitle() {\n\n\t\tif (projectTitle != null)\n\t\t\treturn ProteomeXchangeFilev2_1.MTD + TAB + \"project_title\" + TAB + projectTitle;\n\t\treturn null;\n\t}",
"public static String getSymbolLookupProjectName() {\n\t\tIPreferenceStore prefs = Activator.getDefault().getPreferenceStore();\n\t\tString name = prefs.getString(GHIDRA_SYMBOL_LOOKUP_PROJECT_NAME);\n\t\tif (name.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn name;\n\t}",
"public MavenProject getProject() {\r\n\t\treturn project;\r\n\t}",
"public String getVariable();",
"private static String getProjectVersion() {\n\t\tString version;\n\n\t\ttry {\n\t\t\tfinal Properties pomProperties = new Properties();\n\t\t\tpomProperties.load(Main.class.getResourceAsStream(\n \"/META-INF/MediaPlayer/pom.properties\"));\n\t\t\tversion = pomProperties.getProperty(\"version\");\n\t\t} catch(Exception e) {\n\t\t\tversion = \"RUNNING.IN.IDE.FULL\";\n\t\t}\n\n\t\treturn version;\n\t}",
"public String getProjectPackageName() {\n\t\treturn projectPackageName;\n\t}",
"public Project getProjectByName(String name);",
"public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }",
"public Long getProjectId() {\n return projectId;\n }",
"public abstract ProjectBean getSystemProject();",
"public ProjectModel getCurrentProject() {\n if (projects.size() > 0) {\n return projects.get(0);\n }\n else return null;\n }",
"protected Project getProject() {\n return getConfiguration().getProject();\n }",
"private ModelInfo<Project> getProjectInfo(String projectName) {\n return name2Info.get(projectName);\n }",
"private Project getProject(ModelInfo<Project> info) {\n return data.get(info);\n }"
] | [
"0.7841279",
"0.7841279",
"0.7437907",
"0.7402754",
"0.7168444",
"0.7158657",
"0.7154943",
"0.71521616",
"0.71482575",
"0.7134434",
"0.7122274",
"0.71150815",
"0.7090505",
"0.70506215",
"0.7049244",
"0.7043786",
"0.7027792",
"0.7027792",
"0.70081276",
"0.70076734",
"0.70076734",
"0.70022684",
"0.6999938",
"0.69894457",
"0.6939461",
"0.691662",
"0.691662",
"0.6883124",
"0.6875705",
"0.6872562",
"0.6862296",
"0.6847438",
"0.6845507",
"0.6840486",
"0.6832807",
"0.68099225",
"0.6778717",
"0.6759331",
"0.6733958",
"0.6728458",
"0.67181474",
"0.67165965",
"0.6689039",
"0.6682946",
"0.66461736",
"0.6637089",
"0.6630257",
"0.6611106",
"0.6595817",
"0.6591087",
"0.6585142",
"0.65628105",
"0.6555753",
"0.65532994",
"0.65520626",
"0.64918053",
"0.6452928",
"0.6434789",
"0.64149004",
"0.6414669",
"0.6414531",
"0.6409229",
"0.64029735",
"0.640288",
"0.6389346",
"0.6383605",
"0.6381384",
"0.6381384",
"0.6367092",
"0.6362349",
"0.6348003",
"0.6345695",
"0.63438356",
"0.6342093",
"0.6318207",
"0.6316604",
"0.631118",
"0.63020384",
"0.62941307",
"0.62749314",
"0.6267354",
"0.6259315",
"0.6258722",
"0.62556535",
"0.62434775",
"0.6236973",
"0.62256056",
"0.61850184",
"0.6181484",
"0.6164052",
"0.61617553",
"0.6151369",
"0.61510193",
"0.61315966",
"0.6127157",
"0.611202",
"0.6111049",
"0.6106812",
"0.6102715",
"0.6101688"
] | 0.7851586 | 0 |
Returns the version restriction. | public IVersionRestriction getVersionRestriction() {
return restriction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVersionConstraint() {\n return version;\n }",
"int getGvlSpecificationVersion();",
"public VersionRange getVersionRange()\n {\n return versionRange;\n }",
"public JkVersionRange versionRange() {\n return versionRange;\n }",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"public int getMaxVersion ()\n {\n return max_version;\n }",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"public Version getVersion();",
"int getCurrentVersion();",
"Integer getVersion();",
"Long getVersion();",
"public String getRequestVersion () {\n\treturn requestVersion;\n }",
"BigDecimal getLqnSchemaVersion();",
"public float getVersion();",
"String getSchemaVersion();",
"public Number getVersion() {\n return (Number) getAttributeInternal(VERSION);\n }",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"String offerVersion();",
"public FullVersion MprisVersion();",
"BigDecimal getLqncoreSchemaVersion();",
"public String getProductVersion();",
"public BigDecimal getVersion() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"Version\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}",
"int getTcfPolicyVersion();",
"long getVersionNumber();",
"@CheckForNull\n String getVersion();",
"public String getVersionNum();",
"public VersionRange getBundleVersionRange();",
"com.microsoft.schemas.office.x2006.digsig.STVersion xgetApplicationVersion();",
"@ApiModelProperty(value = \"(Is this valid?)\")\n public Long getVersion() {\n return version;\n }",
"public String getFoundVersion() {\r\n\t\treturn this.fnd;\r\n\t}",
"public String getVersion() {\r\n return (\"2004.09\");\r\n }",
"public org.hl7.fhir.String getVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().find_element_user(VERSION$4, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public long getVersion(){\n return localVersion;\n }",
"java.lang.String getApplicationVersion();",
"public String getVersionNumber ();",
"java.lang.String getOfficeVersion();",
"public abstract int getVersion();",
"public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}",
"public int getVersion()\n {\n return info.getVersion().intValueExact();\n }",
"@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }",
"public int getLibVersionNumber();",
"public static Version<?> getVersion() {\n return BL_VERSION;\n }",
"public TerminalRule getVERSIONRule() {\n\t\treturn tVERSION;\n\t}",
"public abstract double getVersionNumber();",
"public String getVersionsSupported();",
"public String getVersion () {\r\n return version;\r\n }",
"public Integer getVersion() {\r\n return version;\r\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public static final String getVersion() { return version; }",
"public static final String getVersion() { return version; }",
"public String getVersion() {\n\t\treturn (VERSION);\n\t}",
"public static String getVersion() {\n\t\treturn \"0.9.4-SNAPSHOT\";\n\t}",
"public long getVersion() {\n return version;\n }",
"public long getVersion() {\n return version;\n }",
"@ApiModelProperty(value = \"Software Statement version as provided by the organisation's PTC\")\n\n @Valid\n\n public BigDecimal getVersion() {\n return version;\n }",
"public java.lang.String getVersion() {\r\n return version;\r\n }",
"public String getMissiveVersion() {\n\n // Get the missive document version\n return this.missive.getVersion();\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public static String getVersion() {\n\t\treturn version;\r\n\t}",
"public BigDecimal getVersion() {\r\n return version;\r\n }",
"public String getVersion()\n {\n return ver;\n }",
"public static String getVersion() {\n\t\treturn version;\n\t}",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }"
] | [
"0.7384835",
"0.7116888",
"0.6629912",
"0.65701795",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6541794",
"0.6471489",
"0.6464322",
"0.6464322",
"0.6464322",
"0.6464322",
"0.6416677",
"0.6401403",
"0.63853705",
"0.63604003",
"0.63434035",
"0.6334265",
"0.63151664",
"0.62598443",
"0.6244977",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62421215",
"0.62268555",
"0.62268555",
"0.62268555",
"0.62268555",
"0.62255365",
"0.62255365",
"0.62255365",
"0.62255365",
"0.6218899",
"0.6204017",
"0.6168085",
"0.6134337",
"0.6122227",
"0.61178756",
"0.61070144",
"0.60994464",
"0.6076078",
"0.60630614",
"0.6032087",
"0.6028792",
"0.6027993",
"0.6018676",
"0.6018028",
"0.60119367",
"0.6011239",
"0.6004944",
"0.5995402",
"0.5985756",
"0.5980694",
"0.5963171",
"0.59587526",
"0.5958413",
"0.5956374",
"0.59508836",
"0.59412086",
"0.5935447",
"0.5933412",
"0.59203637",
"0.59201133",
"0.59201133",
"0.59201133",
"0.59201133",
"0.5901804",
"0.5901804",
"0.58991355",
"0.5898648",
"0.58934826",
"0.58934826",
"0.5892081",
"0.589092",
"0.58904064",
"0.58882314",
"0.58882314",
"0.58882314",
"0.58882314",
"0.58882314",
"0.58882314",
"0.58865",
"0.58802015",
"0.5877531",
"0.5877279",
"0.5867561",
"0.5867561"
] | 0.8290775 | 0 |
real resolution happens at runtime! | @Override
public TypeDescriptor<?> inferType() throws VilException {
return TypeRegistry.voidType();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tprotected void doResolve() {\n\r\n\t}",
"public abstract void resolve();",
"void resolve();",
"public int resolution()\r\n\t{\r\n\t\treturn resolution;\r\n\t}",
"public abstract String resolve();",
"public java.lang.Object getResolution() {\n return resolution;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkResolution() {\n\t\tboolean flag = oTest.checkResolution();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}",
"private Object readResolve() {\n return getApplication(name);\n }",
"@Override\n public abstract boolean needsResolving();",
"private static void load(){\n }",
"ResolutionResult getResolutionCandidates();",
"void lowResolutionInference(Spectrum spectrum){\n\t}",
"public void setResolution(java.lang.Object resolution) {\n this.resolution = resolution;\n }",
"synchronized String resolve(BundleImpl bundle, Iterator pkgs) {\n String res;\n if (Debug.packages) {\n Debug.println(\"resolve: \" + bundle);\n }\n // If we entry with tempResolved set, it means that we already have\n // resolved bundles. Check that it is true!\n if (tempResolved != null) {\n if (!tempResolved.contains(bundle)) {\n framework.listeners.frameworkError(bundle,\n new Exception(\"resolve: InternalError1!\"));\n }\n return null;\n }\n\n tempResolved = new HashSet();\n BundleImpl sb = checkBundleSingleton(bundle);\n if (sb != null) {\n tempResolved = null;\n return \"Singleton bundle failed to resolve because \" + sb + \" is already resolved\";\n }\n\n tempProvider = new HashMap();\n tempRequired = new HashMap();\n tempBlackList = new HashSet();\n tempResolved.add(bundle);\n String br = checkRequireBundle(bundle);\n if (br == null) {\n List failed = resolvePackages(pkgs);\n if (failed.size() == 0) {\n registerNewProviders(bundle);\n res = null;\n } else {\n StringBuffer r = new StringBuffer(\"missing package(s) or can not resolve all of the them: \");\n Iterator mi = failed.iterator();\n r.append(((ImportPkg)mi.next()).pkgString());\n while (mi.hasNext()) {\n r.append(\", \");\n r.append(((ImportPkg)mi.next()).pkgString());\n }\n res = r.toString();\n }\n } else {\n res = \"Failed to resolve required bundle or host: \" + br;\n } \n tempResolved = null;\n tempProvider = null;\n tempRequired = null;\n tempBlackList = null;\n if (Debug.packages) {\n Debug.println(\"resolve: Done for \" + bundle);\n }\n return res;\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Test public void singletonResolutionInFunctions() {\n fail( \"Not yet implemented\" );\n }",
"protected Object readResolve() {\r\n\t\treturn getInstance();\r\n\t}",
"protected Object readResolve() {\r\n\t\treturn getInstance();\r\n\t}",
"private Object readResolve() {\n\t\t\treturn CASE_INSENSITIVE_ORDER;\n\t\t}",
"public void resolve(Resolver resolver)\n {\n // get the .class structure\n byte[] ab = getBytes();\n\n // wipe any disassembled information -- we are going to go directly\n // after the constant pool portion of the binary .class structure\n if (isLoaded())\n {\n init();\n }\n\n try\n {\n ByteArrayReadBuffer in = new ByteArrayReadBuffer(ab);\n ByteArrayOutputStream out = new ByteArrayOutputStream((int) (ab.length * 1.25));\n ReadBuffer.BufferInput streamIn = in.getBufferInput();\n DataOutput streamOut = new DataOutputStream(out);\n\n // the portion of the .class structure before the pool\n int ofStart = 8;\n streamIn.setOffset(ofStart);\n out.write(ab, 0, ofStart);\n\n // the constant pool is in the middle (offset 8 bytes) of the .class\n int cConst = streamIn.readUnsignedShort();\n streamOut.writeShort(cConst);\n\n for (int i = 1; i < cConst; ++i)\n {\n Constant constant = null;\n int nTag = streamIn.readUnsignedByte();\n switch (nTag)\n {\n case CONSTANT_UTF8:\n constant = new UtfConstant();\n break;\n case CONSTANT_INTEGER:\n constant = new IntConstant();\n break;\n case CONSTANT_FLOAT:\n constant = new FloatConstant();\n break;\n case CONSTANT_LONG:\n constant = new LongConstant();\n ++i; // uses two constant slots\n break;\n case CONSTANT_DOUBLE:\n constant = new DoubleConstant();\n ++i; // uses two constant slots\n break;\n\n case CONSTANT_CLASS:\n case CONSTANT_STRING:\n case CONSTANT_METHODTYPE:\n case CONSTANT_MODULE:\n case CONSTANT_PACKAGE:\n streamOut.writeByte(nTag);\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n case CONSTANT_FIELDREF:\n case CONSTANT_METHODREF:\n case CONSTANT_INTERFACEMETHODREF:\n case CONSTANT_NAMEANDTYPE:\n case CONSTANT_INVOKEDYNAMIC:\n streamOut.writeByte(nTag);\n streamOut.writeShort(streamIn.readUnsignedShort());\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n case CONSTANT_METHODHANDLE:\n streamOut.writeByte(nTag);\n streamOut.writeByte(streamIn.readUnsignedByte());\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n default:\n throw new IOException(\"Invalid constant tag \" + nTag);\n }\n\n if (constant != null)\n {\n constant.disassemble(streamIn, null);\n constant = resolver.resolve(constant);\n constant.assemble(streamOut, null);\n }\n }\n\n // the portion of the .class structure after the pool\n int ofStop = streamIn.getOffset();\n out.write(ab, ofStop, ab.length - ofStop);\n ab = out.toByteArray();\n }\n catch (IOException e)\n {\n throw new RuntimeException(\"Illegal .class structure!\\n\" + e.toString());\n }\n\n // store the new .class structure\n setBytes(ab);\n }",
"void resolveRefs(SymbolTable symbolTable)\n {\n \tEnumeration e = defs.elements();\n\twhile (e.hasMoreElements())\n\t{\n\t Definition d=(Definition) e.nextElement();\n d.resolveRefs(symbolTable); \n\t}\n }",
"void mo12389a(Context context, Glide eVar, Registry registry);",
"public int getResolution() {\n return resolution;\n }",
"protected void __register()\n {\n }",
"protected void __register()\n {\n }",
"private static void Demo8() {\n\t\tClass<?> class1 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.SuperMan\");\r\n\t\t\tString nameString = class1.getClassLoader().getClass().getName();\r\n\t\t\tSystem.out.println(\"Demo8: 类加载器类名: \" + nameString);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"private Object readResolve() \r\n { \r\n return instance; \r\n }",
"public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}",
"protected void onFirstUse() {}",
"BigInteger getResolution();",
"@Test\n @Ignore\n public void testRegistration() {\n ROIAwareWarpDescriptor.register();\n ScaleDescriptor.register();\n AffineDescriptor.register();\n }",
"default Object resolve(String name) {\n return resolve(name, Object.class);\n }",
"protected Object readResolve() {\n return Holder.INSTANCE;\n }",
"public abstract String use();",
"public Resolution getResolution() {\n return resolution;\n }",
"public void resolution() {\n\t\tLigneProposition essai = new LigneProposition(p.getNbTrou());\n\t\t\n\t\tfor(int i = 0; i < p.getNbTrou(); i++) {\n\t\t\tessai.setAt(i, 1 + (int)(Math.random() * ((p.getNbCouleur() -1))));\n\t\t}\n\t\t\n\t\tp.ajouterEssai(essai);\n\t}",
"protected Object readResolve() {\n return getInstance();\n }",
"public static void SelfCallForLoading() {\n\t}",
"private Object readResolve() {\n\t\tSystem.out.println(\"------\");\n\t\treturn this;\n\t}",
"protected interface Resolver {\n\n /**\n * Adjusts a module graph if necessary.\n *\n * @param classLoader The class loader to adjust.\n * @param target The targeted class for which a proxy is created.\n */\n void accept(@MaybeNull ClassLoader classLoader, Class<?> target);\n\n /**\n * An action to create a resolver.\n */\n enum CreationAction implements PrivilegedAction<Resolver> {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should not be rethrown but trigger a fallback.\")\n public Resolver run() {\n try {\n Class<?> module = Class.forName(\"java.lang.Module\", false, null);\n return new ForModuleSystem(Class.class.getMethod(\"getModule\"),\n module.getMethod(\"isExported\", String.class),\n module.getMethod(\"addExports\", String.class, module),\n ClassLoader.class.getMethod(\"getUnnamedModule\"));\n } catch (Exception ignored) {\n return NoOp.INSTANCE;\n }\n }\n }\n\n /**\n * A non-operational resolver for VMs that do not support the module system.\n */\n enum NoOp implements Resolver {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n /* do nothing */\n }\n }\n\n /**\n * A resolver for VMs that do support the module system.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForModuleSystem implements Resolver {\n\n /**\n * The {@code java.lang.Class#getModule} method.\n */\n private final Method getModule;\n\n /**\n * The {@code java.lang.Module#isExported} method.\n */\n private final Method isExported;\n\n /**\n * The {@code java.lang.Module#addExports} method.\n */\n private final Method addExports;\n\n /**\n * The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n private final Method getUnnamedModule;\n\n /**\n * Creates a new resolver for a VM that supports the module system.\n *\n * @param getModule The {@code java.lang.Class#getModule} method.\n * @param isExported The {@code java.lang.Module#isExported} method.\n * @param addExports The {@code java.lang.Module#addExports} method.\n * @param getUnnamedModule The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n protected ForModuleSystem(Method getModule,\n Method isExported,\n Method addExports,\n Method getUnnamedModule) {\n this.getModule = getModule;\n this.isExported = isExported;\n this.addExports = addExports;\n this.getUnnamedModule = getUnnamedModule;\n }\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should always be wrapped for clarity.\")\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n Package location = target.getPackage();\n if (location != null) {\n try {\n Object module = getModule.invoke(target);\n if (!(Boolean) isExported.invoke(module, location.getName())) {\n addExports.invoke(module, location.getName(), getUnnamedModule.invoke(classLoader));\n }\n } catch (Exception exception) {\n throw new IllegalStateException(\"Failed to adjust module graph for dispatcher\", exception);\n }\n }\n }\n }\n }",
"public void mo6081a() {\n }",
"private Object readResolve() {\n\t\treturn INSTANCE;\n\t}",
"public int getR_Resolution_ID();",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"Symbol resolve(String name);",
"private void init() {\n\n\t}",
"private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }",
"void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public YadisResolver()\n {\n \n }",
"protected void setupLocal() {}",
"public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }",
"private Object readResolve() {\n\t\treturn singletonObj;\n\t}",
"public void setResolution(Resolution resolution) {\n this.resolution = resolution;\n }",
"protected Object localLookup( final Name name )\n throws NamingException\n {\n final Object value = doLocalLookup( name );\n\n // Call getObjectInstance for using any object factories\n try\n {\n final Name atom = name.getPrefix( 1 );\n return m_namespace.getObjectInstance( value, atom, this, getRawEnvironment() );\n }\n catch ( final Exception e )\n {\n final NamingException ne = new NamingException( \"getObjectInstance failed\" );\n ne.setRootCause( e );\n throw ne;\n }\n }",
"public void use()\n\t{\n\t}",
"private Object readResolve() {\n return INSTANCE;\n }",
"private Object readResolve() {\n return INSTANCE;\n }",
"T resolve();",
"public String getResolution() {\n return resolution;\n }",
"public String getResolution() {\n return resolution;\n }",
"public Double resolver(Double x) {\n\n\t\tthrow new RuntimeException(\"No implementado\");\n\n\t}",
"private LookupUtil(){}",
"void use();",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"static void init() {}",
"public void setResolution(String resolution) {\n this.resolution = resolution;\n }",
"private String m21852a(Context context, String str) {\n try {\n Class loadClass = context.getClassLoader().loadClass(\"android.os.SystemProperties\");\n return (String) loadClass.getMethod(\"get\", new Class[]{String.class}).invoke(loadClass, new Object[]{str});\n } catch (Exception unused) {\n return null;\n }\n }",
"public abstract void mo70713b();",
"protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;",
"private Object readResolve() {\r\n return this;\r\n }",
"private void registToWX() {\n }",
"protected void _init(){}",
"private void getDynamicProfie() {\n getDeviceName();\n }",
"public Object readResolve(){\n return instace;\n }",
"abstract int pregnancy();",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void solve() {\n\t\t\r\n\t}",
"private void initialize() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"public static void init() {\n\t\t\n\t}",
"public static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t}",
"public double getResolution() {\n return resolution;\n }",
"@Override\n public void resolve(MapChoice mapChoice, Query query, Result result, Resolution resolution) {\n assertEquals(\"myMethod\",mapChoice.getMethod());\n super.resolve(mapChoice,query,result,resolution);\n }",
"public int getResolution() {\n return this.resolution;\n }",
"public abstract Object mo1771a();",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"private static Resources m2627a(Context context, String str) {\n if (\"android\".equals(str)) {\n return Resources.getSystem();\n }\n PackageManager packageManager = context.getPackageManager();\n try {\n ApplicationInfo applicationInfo = packageManager.getApplicationInfo(str, 8192);\n if (applicationInfo != null) {\n return packageManager.getResourcesForApplication(applicationInfo);\n }\n return null;\n } catch (NameNotFoundException e) {\n Log.e(\"IconCompat\", String.format(\"Unable to find pkg=%s for icon\", new Object[]{str}), e);\n return null;\n }\n }",
"public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {\n MyClassLoader mcl = new MyClassLoader(\"myClassLoader1\");\n// // 根据全限定名加载,注意,这里调用loadClass方法\n// Class<?> clazz = mcl.loadClass(\"Student\");\n// Student student = (Student)clazz.newInstance();\n Object o = mcl.loadClass(\"Student\").newInstance();\n o.getClass().getMethod(\"shuchu\").invoke(o);\n// student.shuchu();\n// List<Integer> list = new ArrayList<>();\n// Object o = new Object();\n System.out.println(o.getClass().getClassLoader());\n// System.out.println(list.getClass().getClassLoader());\n// System.out.println(o.getClass().getClassLoader());\n byte[] allocation1, allocation2;\n allocation1 = new byte[30900 * 1024*2];\n allocation2 = new byte[900 * 1024*2];\n\n\n }",
"@External\r\n\t@SharedFunc\r\n\tpublic MetaVarTable getregistry(){throw new RuntimeException(\"Should never be executed directly, there is probably an error in the Aspect-coding.\");}",
"protected Object readResolve(){\n return singletonInstance;\n }",
"public static void load() {\n }"
] | [
"0.64510477",
"0.6316267",
"0.6263442",
"0.61395866",
"0.59247655",
"0.5785859",
"0.5726155",
"0.5665617",
"0.56514484",
"0.55513686",
"0.55111897",
"0.5441065",
"0.53940654",
"0.5337164",
"0.53272784",
"0.53219175",
"0.5312047",
"0.5308",
"0.5308",
"0.5283128",
"0.5257138",
"0.5244538",
"0.5228367",
"0.5225993",
"0.52196234",
"0.52196234",
"0.52191925",
"0.5203222",
"0.5180231",
"0.5176654",
"0.5172088",
"0.51675546",
"0.51653296",
"0.515712",
"0.51570034",
"0.5150409",
"0.5140289",
"0.51157284",
"0.5095157",
"0.5094626",
"0.50936043",
"0.5088803",
"0.50882167",
"0.5087859",
"0.5080977",
"0.5080977",
"0.5080977",
"0.5080977",
"0.5080977",
"0.5075461",
"0.50722545",
"0.50697005",
"0.50678575",
"0.50673527",
"0.50644255",
"0.50592184",
"0.5056026",
"0.50461525",
"0.5042756",
"0.5039781",
"0.50289005",
"0.50289005",
"0.50241333",
"0.5017455",
"0.5017455",
"0.50085884",
"0.49987787",
"0.4997088",
"0.49963257",
"0.49963257",
"0.49859196",
"0.49823472",
"0.4963259",
"0.49621072",
"0.49506974",
"0.49478158",
"0.49467173",
"0.49431482",
"0.4941946",
"0.49362674",
"0.4935406",
"0.4930129",
"0.49282596",
"0.49234962",
"0.4922818",
"0.49202633",
"0.49176046",
"0.49176046",
"0.49176046",
"0.49155247",
"0.49122995",
"0.4911285",
"0.4910091",
"0.49042413",
"0.4898411",
"0.48956823",
"0.4894779",
"0.48880047",
"0.48862237",
"0.48723653",
"0.48714578"
] | 0.0 | -1 |
A Source is the point at which a consumer may take items from a queue. This interface is compatable with java.util.Queue, in that any Queue implementation can also implement this interface with no further work. Source has been created as a seperate interface, to inroduce the possibility of a data structure that only exposes its Source, and hides the remainder of its operations. CRC Card Responsibilities Take elements from a queue. | public interface Source<E> {
/**
* Retrieves and removes the head of this queue, or <tt>null</tt> if this queue is empty.
*
* @return The head of this queue, or <tt>null</tt> if this queue is empty.
*/
E poll();
/**
* Retrieves, but does not remove, the head of this queue, returning <tt>null</tt> if this queue is empty.
*
* @return The head of this queue, or <tt>null</tt> if this queue is empty.
*/
E peek();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Source {\r\n\t\t\t\t\t\r\n\t/** A source needs to have funds or credit available so it can have money pulled from it for\r\n\t * whatever purpose the funds are needed. This is the predict loss implementation for use\r\n\t * with the prediction algorithm. It processes the loss for this source by updating its\r\n\t * prediction rows appropriately (i.e. removing or adding to the sources funds or credit). This\r\n\t * method should also be capable of handling an add back to the source.\r\n\t * \r\n\t * @param destinationDescription - a string description of what the funds are being used for. Used for the transaction history\r\n\t * @param lossAmount - the amount of funds needed\r\n\t * @param addBack - true if the destination is a budget item and that budget item has funds to add back to the source\r\n\t * @param addBackAmount - the amount to add back to the source (if applicable)\r\n\t * @param dayIndex - the date as an index or offset from prediction start date\r\n\t * \r\n\t */\r\n\tpublic void predictLossForDayIndex(String destinationDescription, double lossAmount, boolean addBack, double addBackAmount, int dayIndex);\r\n\t\r\n\t/**\r\n\t * A source should be able to tells us a unique description of itself (its name).\r\n\t * @return this source's unique name\r\n\t */\r\n\tpublic String name();\r\n}",
"public interface IQueue {\n public void clear();\n public boolean isEmpty();\n public int length();\n public Object peek();\n public void offer(Object x) throws Exception;\n public Object poll();\n}",
"public abstract Source getSource();",
"public Object copy_from(Object src) {\n\n QueueState typedSrc = (QueueState) src;\n QueueState typedDst = this;\n super.copy_from(typedSrc);\n typedDst.pending = (rapid.SingleQueue) typedDst.pending.copy_from(typedSrc.pending);\n typedDst.active = (rapid.SingleQueue) typedDst.active.copy_from(typedSrc.active);\n typedDst.completed = (rapid.SingleQueue) typedDst.completed.copy_from(typedSrc.completed);\n typedDst.sent = (rapid.SingleQueue) typedDst.sent.copy_from(typedSrc.sent);\n\n return this;\n }",
"public interface Sourceable {\n void method();\n}",
"public interface Sourceable {\n void method();\n}",
"@Override\n public synchronized void receive(ByteBuffer src) {\n super.receive(src);\n if (!src.hasRemaining())\n return; // nothing to receive\n receiveOutbound(src);\n }",
"public interface Source {\n\n /**\n * Set the system identifier for this Source.\n * <p>\n * The system identifier is optional if the source does not get its data\n * from a URL, but it may still be useful to provide one. The application\n * can use a system identifier, for example, to resolve relative URIs and to\n * include in error messages and warnings.\n * </p>\n *\n * @param systemId\n * The system identifier as a URL string.\n */\n public void setSystemId(String systemId);\n\n /**\n * Get the system identifier that was set with setSystemId.\n *\n * @return The system identifier that was set with setSystemId, or null if\n * setSystemId was not called.\n */\n public String getSystemId();\n}",
"public interface Source {\n\n /**\n * Returns a new input stream on the source.\n */\n public InputStream getInputStream() throws IOException;\n\n /**\n * Closes the given input stream.\n *\n * @param in\n * Stream returned by {@link #getInputStream()}. May be null.\n */\n public void close(InputStream in);\n}",
"public interface Queue {\r\n\r\n\t/**\r\n\t * This method will return the first activity from the queue.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Activity poll();\r\n\r\n\t/**\r\n\t * This method will push the activity to the queue.\r\n\t * \r\n\t * @param activity\r\n\t */\r\n\tpublic void push(Object activity);\r\n\r\n\t/**\r\n\t * This method will tell that the queue is closed or not.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isQueueClosed();\r\n\r\n\t/**\r\n\t * This method will on the queue to available.\r\n\t */\r\n\tpublic void onQueue();\r\n\r\n\t/**\r\n\t * this method will off the queue so not available.\r\n\t */\r\n\tpublic void closeQueue();\r\n\r\n\t/**\r\n\t * Returns true if the queue is empty.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isEmpty();\r\n\r\n}",
"public interface ISourceable {\n\n public void method();\n}",
"public interface Queue<T>\r\n{\r\n /**\r\n * Insert item at the back of the queue.\r\n * @param item insert item at the back of the queue\r\n */\r\n public void push(T item);\r\n\r\n /**\r\n * Remove the element at the front of the queue and return its value.\r\n * @return value of the element removed from the front of the queue.\r\n * @throws <tt>NoSuchElementException</tt> if the queue is empty.\r\n */\r\n public T pop();\r\n\r\n /**\r\n * Return the value of the element at the front of the queue.\r\n * @return value of element at the front of the queue.\r\n * @throws <tt>NoSuchElementException</tt> if the queue is empty.\r\n */\r\n public T peek();\r\n\r\n /**\r\n * Return a boolean value that indicates whether the queue is empty. Return\r\n * true if empty and false if not empty.\r\n * @return true if the queue is empty and false otherwise.\r\n */\r\n public boolean isEmpty();\r\n\r\n /**\r\n * Return the number of elements currently in the queue.\r\n * @return number of elements in the queue.\r\n */\r\n public int size();\r\n}",
"public interface QueueService {\n\n /**\n * 添加元素\n *\n * @param messageQueue\n */\n void add(MessageQueue messageQueue);\n\n\n /**\n * 弹出元素\n */\n MessageQueue poll();\n\n Iterator<MessageQueue> iterator();\n\n\n}",
"public abstract Object getSource();",
"public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}",
"public abstract T getSource();",
"public interface Queue<T> {\n\n /**\n * Current queue size\n * @return size as int\n */\n int size();\n\n /**\n * Checks if the the queue is empty\n * @return true if the list is empty\n */\n boolean isEmpty();\n\n /**\n * Adding an element to the queue\n * @param t element to add\n */\n void enqueue(T t);\n\n /**\n * Return and removes the first element in the queue\n * @return the removed element\n * @throws IndexOutOfBoundsException if queue is empty\n */\n T dequeue();\n\n /**\n * Return (without removing) first element in queue\n * @return the first element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n *\n */\n T first();\n\n /**\n * Return (without removing) last element in queue\n * @return last element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n */\n T last();\n\n /**\n * Return a string representation of the queue content.\n * @return String of queue\n */\n String toString();\n\n /**\n * Element iterator.\n * @return Iterates over elements in queue\n */\n Iterator iterator();\n\n}",
"public interface StreamSource {\n\n /**\n * Gets new streams. This should be called only if one of the streams \n * is dead. \n * @throws TransportException\n */\n void connect() throws TransportException;\n \n /**\n * Closes streams and underlying connections. \n * @throws TransportException\n */\n void disconnect() throws TransportException;\n \n /**\n * @return the stream to which we write outbound messages. \n * @throws TransportException\n */\n OutputStream getOutboundStream() throws TransportException;\n\n /**\n * @return the stream to which we expect the remote server to send messages. \n * @throws TransportException\n */\n InputStream getInboundStream() throws TransportException;\n \n}",
"public Object getSource() {return source;}",
"public interface Queue<E> {\n\n /**\n * \n * @return the number of elements in the queue.\n */\n int size();\n\n /**\n * \n * @return true if the queue is empty, false if not.\n */\n boolean isEmpty();\n\n /**\n * \n * Inserts an element at the rear of the queue.\n * \n * @param e\n */\n void enqueue(E e);\n\n /**\n * \n * @return the first element of the queue, but does not remove it (null if empty).\n */\n E first();\n\n /**\n * \n * @return first element of the queue and removes it (null if empty).\n */\n E dequeue();\n}",
"public void setSource(Byte source) {\r\n this.source = source;\r\n }",
"public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}",
"public interface Queue<E> {\n\n\t/** \n\t * Returns the number of elements in the queue.\n\t * @return number of elements in the queue.\n\t */\n\t public int size(); \n\t /** \n\t * Returns whether the queue is empty.\n\t * @return true if the queue is empty, false otherwise.\n\t */\n\t public boolean isEmpty(); \n\t /**\n\t * Inspects the element at the front of the queue.\n\t * @return element at the front of the queue.\n\t */\n\t public E front(); \n\t /** \n\t * Inserts an element at the rear of the queue.\n\t * @param element new element to be inserted.\n\t */\n\t public void enqueue (E element); \n\t /** \n\t * Removes the element at the front of the queue.\n\t * @return element removed.\n\t */\n\t public E dequeue(); \n}",
"public interface Queue {\n\n void enqueue(int value);\n\n int dequeue();\n}",
"public void drain() {\r\n if (getAndIncrement() == 0) {\r\n SimpleQueue<T> simpleQueue = this.queue;\r\n int i = this.consumed;\r\n int i2 = this.bufferSize;\r\n int i3 = i2 - (i2 >> 2);\r\n boolean z = this.sourceMode != 1;\r\n int i4 = 1;\r\n int i5 = i;\r\n SimpleQueue<T> simpleQueue2 = simpleQueue;\r\n int i6 = i5;\r\n while (true) {\r\n if (simpleQueue2 != null) {\r\n long j = LongCompanionObject.MAX_VALUE;\r\n InnerSubscription[] innerSubscriptionArr = (InnerSubscription[]) this.subscribers.get();\r\n boolean z2 = false;\r\n for (InnerSubscription innerSubscription : innerSubscriptionArr) {\r\n long j2 = innerSubscription.get();\r\n if (j2 != Long.MIN_VALUE) {\r\n j = Math.min(j2 - innerSubscription.emitted, j);\r\n z2 = true;\r\n }\r\n }\r\n long j3 = 0;\r\n if (!z2) {\r\n j = 0;\r\n }\r\n while (true) {\r\n if (j == j3) {\r\n break;\r\n }\r\n boolean z3 = this.done;\r\n try {\r\n Object poll = simpleQueue2.poll();\r\n boolean z4 = poll == null;\r\n if (!checkTerminated(z3, z4)) {\r\n if (z4) {\r\n break;\r\n }\r\n int length = innerSubscriptionArr.length;\r\n for (int i7 = 0; i7 < length; i7++) {\r\n InnerSubscription innerSubscription2 = innerSubscriptionArr[i7];\r\n if (!innerSubscription2.isCancelled()) {\r\n innerSubscription2.downstream.onNext(poll);\r\n innerSubscription2.emitted++;\r\n }\r\n }\r\n if (z) {\r\n i6++;\r\n if (i6 == i3) {\r\n ((Subscription) this.upstream.get()).request((long) i3);\r\n i6 = 0;\r\n }\r\n }\r\n j--;\r\n if (innerSubscriptionArr != this.subscribers.get()) {\r\n break;\r\n }\r\n j3 = 0;\r\n } else {\r\n return;\r\n }\r\n } catch (Throwable th) {\r\n Throwable th2 = th;\r\n Exceptions.throwIfFatal(th2);\r\n ((Subscription) this.upstream.get()).cancel();\r\n simpleQueue2.clear();\r\n this.done = true;\r\n signalError(th2);\r\n return;\r\n }\r\n }\r\n if (checkTerminated(this.done, simpleQueue2.isEmpty())) {\r\n return;\r\n }\r\n }\r\n this.consumed = i6;\r\n i4 = addAndGet(-i4);\r\n if (i4 != 0) {\r\n if (simpleQueue2 == null) {\r\n simpleQueue2 = this.queue;\r\n }\r\n } else {\r\n return;\r\n }\r\n }\r\n }\r\n }",
"public interface SourceAble {\n public void method1();\n\n public void method2();\n}",
"@SuppressWarnings(\"unused\")\n public CachedSource(Source<V> source) {\n mCache = new Cache<>();\n mSource = source;\n }",
"ElementCircuit getSource();",
"public final ObservableList<? extends F> getSource() {\n return source;\n }",
"public MessageSelectingQueueChannel(BlockingQueue<Message<?>> queue) {\n super(queue);\n \n this.queue = queue;\n }",
"public void setSource(String Source) {\r\n this.Source = Source;\r\n }",
"@Override\n public byte[] provide() {\n long start = System.nanoTime();\n\n try {\n if (packetQueue.peek() == null) {\n underflowed ++;\n return new byte[0];\n }\n\n OpusPacket packet = packetQueue.remove();\n\n if (packet == null) {\n underflowed ++;\n return new byte[0];\n }\n\n availableInput += packet.getSamples();\n opusBytePosition += packet.getBytes().length;\n opusPacketsSent ++;\n\n return packet.getBytes();\n } catch (NoSuchElementException ex) {\n underflowed ++;\n return new byte[0];\n } finally {\n long networkTime = System.nanoTime() - start;\n\n if (networkTime >= (opusParameters.getOpusFrameTime() * 1000000L)) {\n underflowed++;\n\n Logger.getGlobal().warning(\"[TeamspeakFastMixerSink] provide() took longer than the expected \" +\n opusParameters.getOpusFrameTime() + \"ms: \" + ((double)networkTime / 1_000_000D) + \"ms\");\n }\n\n this.networkTime += networkTime;\n\n if (packetQueue.peek() == null) {\n synchronized (drainLock) {\n drainLock.notifyAll();\n }\n }\n }\n }",
"EventChannelSource source();",
"public interface Queue<T extends Object> {\n\n\t/**\n\t * Method to return the queue iterator\n\t * \n\t * @return Queue Iterator\n\t */\n\tpublic Iterator<T> getIterator();\n\n\t/**\n\t * Method to peek the queue face\n\t * \n\t * @return front data\n\t */\n\tpublic T peek();\n\n\t/**\n\t * Method to pop from front of the queue\n\t * \n\t * @return front data\n\t */\n\tpublic T pop();\n\n\t/**\n\t * Push method for inserting Integer data at end of the queue\n\t * \n\t * @param data\n\t */\n\tpublic void push(T data);\n\n\t/**\n\t * Push method for inserting Long data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Long data);\n\n\t/**\n\t * Push method for inserting Double data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(Double data);\n\n\t/**\n\t * Push method for inserting String data at end of the queue\n\t * \n\t * @param data\n\t */\n\t// public void push(String data);\n}",
"public IEventCollector getSource();",
"public PhysicalCard getSourceCard() {\n return _source;\n }",
"public abstract void receive(CommNode source, Object packet, simulation.timebased.Simulator simulator);",
"public void setSource(Source s)\n\t{\n\t\tsource = s;\n\t}",
"public interface Queue {\n /***** Setting class functions *******/\n\n /* Add element to end of queue function\n * PRE: elem != null && queue != null\n * POST: queue[size] = elem && size` = size + 1 && other imutabled\n */\n void enqueue(Object elem);\n\n /* Delete and return first element in queue function\n * PRE: size > 0\n * POST: R = queue[0] && queue[i] = queue[i + 1] && size` = size - 1 && other imutabled\n */\n Object dequeue();\n\n /* Add element to begin of queue\n * PRE: elem != null\n * POST: queue[i] = queue[i - 1](size >= i > 0) && queue[0] = elem && size` = size + 1 && other imutabled\n */\n void push(Object elem);\n\n /* Delete and return last element in queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && size` = size - 1 && other imutabled\n */\n Object remove();\n\n /***** Getting class functions *******/\n\n /* Get first element of queue function\n * PRE: size > 0\n * POST: R = queue[0] && all elements imutabled\n */\n Object element();\n\n /* Get last element of queue function\n * PRE: size > 0\n * POST: R = queue[size - 1] && all elements imutabled\n */\n Object peek();\n\n /* Get size function\n * PRE: True\n * POST: R = size && all imutabled\n */\n int size();\n\n /* Check for empty queue function\n * PRE: True\n * POST: R = (size == 0) && all imutabled\n */\n boolean isEmpty();\n\n /* Delete all elements from queue function\n * PRE: True\n * POST: size = 0\n */\n void clear();\n\n /******* Modification *******/\n /* Create queue with elements like predicate\n * PRE: correct predicate && queue != null\n * POST: all imutabled && R = {R[0]...R[new_size] : new_size <= size && predicate(R[i]) = 1 && R - the same type of queue}\n * : && exist sequence i[0] ... i[k] (i[0] < ... < i[k]) : R[it] = queue[i[it]](0 <= it < k) && k - max\n */\n Queue filter(Predicate predicate);\n\n /* Create queue with elements like predicate\n * PRE: correct function && queue != null\n * POST: all imutabled && R = {y[i] | y[i] = function(queue[i])} size(R) = size(queue) && R is the same type of queue\n */\n Queue map(Function function);\n}",
"public interface MyQueue {\n\n // add to tail\n void enqueue(Object obj);\n\n // remove from head\n Object dequeue();\n\n}",
"@Override\n public <T> PCollection<T> read(Source<T> source) {\n return null;\n }",
"private Queue(){\r\n\t\tgenerateQueue();\r\n\t}",
"interface Source {\n /** Finds a reader for a given file name.\n */\n public java.io.Reader getReader (URL url) throws java.io.IOException;\n }",
"@Override\n\tpublic ImageProducer getSource() {\n\t\treturn null;\n\t}",
"public interface QueueInterface {\r\n Object dequeue() throws QueueUnderflowException;\r\n // Throws QueueUnderflowException if this queue is empty,\r\n // otherwise removes top element from this queue.\r\n \r\n \r\n boolean isEmpty();\r\n // Returns true if this queuea is empty, otherwise returns false.\r\n\r\n}",
"public interface DragSource\n{\n\t/*********************************************************************************************************************\n <b>Description</b>: Gets the components to register drag events on.\n\n <br><b>Notes</b>:<br>\n\t - The vector must only contain java.awt.Component objects\n\t - This method is called only once when the drag source is added via DragAndDropSupport\n\n <br>\n @return Vector of java.awt.Component objects to register as sources\n\t*********************************************************************************************************************/\n public Vector getSourceComponents();\n\n\t/*********************************************************************************************************************\n <b>Description</b>: Determines if the sub-components of the source components (java.awt.Container objects only)\n returned from the getSourceComponents() method should be registered for drag events. This is\n a convenience method to allow returning a single java.awt.Container object that contains all of\n the java.awt.Component objects that should receive drag events.\n\n <br><b>Notes</b>:<br>\n\t - This method is called only once when the drag source is added via DragAndDropSupport\n\n <br>\n @return True if the sub-components of the source components should be registered for drag events, false if not\n\t*********************************************************************************************************************/\n public boolean dragFromSubComponents();\n\n\t/*********************************************************************************************************************\n <b>Description</b>: Retrieves the data object to be dragged. This method should return the actual instance of the\n data object to be drop on a drop target, or a custom java.awt.datatransfer.Transferable object.\n\n <br><b>Notes</b>:<br>\n\t - This method is called once at the begining of each drag operation\n\t - The data flavor is determined directly from the returned data object (if not a Transferable)\n\t - The data object returned DOES NOT have to be, but usually is, the same class type between drags\n\t - If a Transferable object is returned, this object is used (along with its defined data flavors)\n\t instead of constructing a ObjectTransferable object\n\n <br>\n @param componentAt Component the drag operation is on\n @param location Current location of the mouse pointer\n @return Data object instance to be dragged, or a java.awt.datatransfer.Transferable object\n\t*********************************************************************************************************************/\n public Object getData(Component componentAt, Point location);\n \n\t/*********************************************************************************************************************\n <b>Description</b>: Called when the drag and drop operation has ended.\n\n <br>\n @param success True if the drag and drop operation completed successfully, false if not\n\t*********************************************************************************************************************/\n public void dragDropEnd(boolean success);\n\n// \tpublic void dragDropEnd(DragSourceDropEvent e)\n// \tpublic void dragEnter(DragSourceDragEvent e) ???\n// \tpublic void dragOver(DragSourceDragEvent e)\n// \tpublic void dragExit(DragSourceEvent e)\n// \tpublic void dropActionChanged (DragSourceDragEvent e) ???\n\n// public void showAsActive(boolean active);\n\n// public Cursor getDragCursor() ???\n\n /* Eliminates right mouse clicks as valid actions - useful especially\n * if you implement a JPopupMenu for the JTree\n */\n// dgr.setSourceActions(dgr.getSourceActions() & ~InputEvent.BUTTON3_MASK); ???\n}",
"void drainFused() {\n int n;\n int n2 = 1;\n Subscriber<T> subscriber = this.actual;\n SimpleQueueWithConsumerIndex<Object> simpleQueueWithConsumerIndex = this.queue;\n do {\n if (this.cancelled) {\n simpleQueueWithConsumerIndex.clear();\n return;\n }\n Throwable throwable = (Throwable)this.error.get();\n if (throwable != null) {\n simpleQueueWithConsumerIndex.clear();\n subscriber.onError(throwable);\n return;\n }\n n = simpleQueueWithConsumerIndex.producerIndex() == this.sourceCount ? 1 : 0;\n if (!simpleQueueWithConsumerIndex.isEmpty()) {\n subscriber.onNext(null);\n }\n if (n != 0) {\n subscriber.onComplete();\n return;\n }\n n2 = n = this.addAndGet(-n2);\n } while (n != 0);\n }",
"@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}",
"public interface IGenQ<T> {\n\n // Put an item into the queue\n void put(T ch) throws QueueFullException;\n\n // Get an item from the queue\n T get() throws QueueEmpytException;\n\n\n\n}",
"public void setSource(String source) {\n this.source = source;\n }",
"public void setSource(String source) {\n this.source = source;\n }",
"public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}",
"public void setSource(String source) {\r\n this.source = source;\r\n }",
"public CachedSource(Cache<V> cache, Source<V> source) {\n mCache = cache;\n mSource = source;\n }",
"public interface SimpleQueue<E> {\n\n\t/**\n\t * Adds the Object in the Queue\n\t * @param item Generic item to add to the queue\n\t */\n\tpublic void add(E item);\n\t\n\t/**\n\t * Removes the first Object from the Queue\n\t * @return the Object that was removed\n\t * @throws NoSuchElementException if object is not in the queue\n\t */\n\tpublic E remove();\n\t\n\t/**\n\t * Retrieves, but does not remove the\n\t * first object in the Queue\n\t * @return Object that was retrieved\n\t * @throws NoSuchElementException if the queue is empty\n\t */\n\tpublic E peek();\n\t\n\t/**\n\t * Checks to see if the Queue is Empty or not\n\t * @return true if the Queue is Empty, false if its not.\n\t */\n\tpublic boolean isEmpty();\n}",
"public interface FramePool {\n public void put(Frame m);\n public Frame get();\n public Frame getAndBlock() throws InterruptedException;\n public int getAvailable();\n public void setSource(ISource source);\n}",
"public void setSource(String source) {\n _source = source;\n }",
"public AbstractTbomSource(List<TbomSchema> source) {\n\t\tsuper();\n\t\tthis.source = source;\n\t}",
"public MessageReader(TCPConnection connection, BlockingQueue<BufferQueueElement<Message>> queue) throws IOException {\n\t\tthis.messageIO = new MessageInput(connection.getClientSocket());\n\t\tthis.queue = queue;\n\t}",
"public interface FifoQueue {\n\n /**\n * Push the item to the tail of the queue.\n * @param queueName Target queue.\n * @param item Item to be added\n */\n public void push(final String queueName, final String item);\n\n /**\n * Remove the item from the queue.\n * @param queueName Queue name.\n * @param item Target item.\n * @return <code>true</code> item removed, otherwise <code>false</code>\n */\n public boolean remove(final String queueName, final String item);\n\n /**\n * Get top items.\n * @param queueName Delay queue name.\n * @param end End index.\n * @return Delayed items.\n */\n public Collection<String> pop(final String queueName, final int end);\n}",
"public T getSource() {\n return source;\n }",
"public interface UnboundedQueue<T> {\n \n\t/**\n\t * This method inserts a generic type element to the back of the Queue, increasing the\n\t * size by one. \n\t * \n\t * @param o Generic type to be added to the back of the Queue.\n\t */\n public void insert(T o);\n \n /**\n * This method removes a generic type element from the front of the Queue thereby decreasing the\n * size by one. Throws an EmptyQueueException if the Queue is empty and there is no\n * element to remove.\n * \n * @return Object removed from the front of the Queue\n * @throws EmptyQueueException if Queue is empty and there is no object to remove\n */\n public T remove() throws EmptyQueueException;\n \n /**\n * This method makes a copy of the element at the front of the Queue. Size stays the same.\n * \n * @return copy of the element at the front of the Queue.\n * @throws EmptyQueueException thrown if the Queue is empty and there is no elment at the front\n */\n public T front() throws EmptyQueueException;\n \n /**\n * This method returns true if the Queue has a front element and therefore is \n * not empty.\n * \n * @return true if the Queue has a front element\n */\n public boolean hasFront();\n \n /**\n * This method returns the number of elements currently stored in the structure (Queue).\n * \n * \n * @return int number of elements stored in the Queue\n */\n public int size();\n\n /**\n * This method creates a String representation of the Queue.\n * \n * @return String which represents the Queue\n */\n public String toString();\n \n}",
"public Object getSource() {\n return source;\n }",
"public void setSource(String source);",
"public Source getPayload();",
"private static Flux<ByteBuffer> dequeuingFlux(Queue<ByteBuffer> queue) {\n return Flux.generate(sink -> {\n ByteBuffer buffer = queue.poll();\n if (buffer != null) {\n sink.next(buffer);\n } else {\n sink.complete();\n }\n });\n }",
"public BlockingQueue<T> getInputQueue() {\n\t\treturn inputQueue;\n\t}",
"public interface EventSource {\n\n void addEventListener(EventListener<? extends Event> listener);\n\n void removeEventListener(EventListener<? extends Event> listener);\n\n void notifyListeners(Event event);\n\n}",
"public void setSource (String source);",
"public interface MinimalStringQueue {\n\t \n\t/** Adds a new String to the end of the queue */ \n\tpublic void add(String str); \n\t \n\t/** Removes and returns the first String (or null if queue is empty) */ \n\tpublic String poll(); \n\t \n\t/** Returns the number of entries in the queue. */ \n\tpublic int size(); \n\t \n\n}",
"TickSource getSource();",
"public BlitQueue(SDLSurface src, int count) {\n\tthis.src = src;\n\tSystem.out.println(\"count=\" + count);\n\n\tByteBuffer buf = null;\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcX = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcY = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcWidth = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.srcHeight = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstX = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstY = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstWidth = buf.asIntBuffer();\n\n\tbuf = ByteBuffer.allocateDirect(count*4);\n\tbuf.order(ByteOrder.nativeOrder());\n\tthis.dstHeight = buf.asIntBuffer();\n }",
"final void removeSourceEvents(Object source) {\n\tToolkit toolkit = Toolkit.getDefaultToolkit();\n if (toolkit instanceof SunToolkit) {\n\t ((SunToolkit)toolkit).flushPendingEvents();\n\t}\n\n synchronized (this) {\n\t for (int i = 0; i < NUM_PRIORITIES; i++) {\n\t EventQueueItem entry = queues[i].head;\n\t\tEventQueueItem prev = null;\n\t\twhile (entry != null) {\n\t\t if (entry.event.getSource() == source) {\n\t\t if (prev == null) {\n\t\t\t queues[i].head = entry.next;\n\t\t\t} else {\n\t\t\t prev.next = entry.next;\n\t\t\t}\n\t\t } else {\n\t\t prev = entry;\n\t\t }\n\t\t entry = entry.next;\n\t\t}\n\t\tqueues[i].tail = prev;\n\t }\n\t}\n }",
"myQueue(){\n }",
"public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}",
"public EventObject(Object source) {\n\tif (source == null)\n\t throw new IllegalArgumentException(\"null source\");\n\n this.source = source;\n }",
"@Override\n\tpublic Square getSource() {\n\t\treturn (Square) super.getSource();\n\t}",
"public interface QueueServiceProvider {\n /**\n * Returns the name of the Queue implementation.\n * @return Name of the queue implementation.\n */\n String name();\n\n /**\n * Places an object on the end of the queue.\n * @param object Object to place on the queue.\n */\n void enqueue(String object);\n\n /**\n * Retrieves an object from the front of the queue.\n * @return Object from the queue.\n */\n String dequeue();\n}",
"public ChangeSupport(Object source) {\n this.source = source;\n }",
"@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }",
"State getSource();",
"public interface SourceListener {\n public void added(Source source,\n JavaProject javaProject, String name);\n\n public void removed(Source source,\n JavaProject javaProject, String name);\n\n public void changed(Source source,\n JavaProject javaProject, String name);\n }",
"public interface ContainerList<E> {\n /**\n * Adds newElement to the queue if still has capacity.\n *\n * @param e element to be added to the queu.\n * @throws Exception If Queue is full\n */\n public void push(E e) throws Exception;\n\n /**\n * Returns the First element in the queue and removes it from the list.\n *\n * @return The First element added to the queu.\n */\n public E pop();\n\n /**\n * Checks what's the next element to be returned from the list.\n * @return\n */\n public E peek();\n public int size();\n}",
"public void receive(CommNode source, Object packet, simulation.networks.simulator.Simulator simulator)\n {\n\treceive(source, packet, (simulation.timebased.Simulator) simulator);\n }",
"public SQueue(){\n\n\t}",
"<V extends Object> Queue<V> getQueue(String queueName);",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public Object getSource() {\n\t\treturn source;\n\t}",
"public interface BlockingFIFO {\r\n\tvoid put(Task item) throws Exception;\r\n Task take() throws Exception;\r\n\r\n}",
"protected Source getSource() {\r\n return source;\r\n }",
"public interface PrcseSource extends Connectable {\n\n\tpublic abstract ArrayList<Object> getFrontPage() throws Exception;\n\t\n\tpublic abstract CustomerInfo login(CustomerInfo request) throws Exception;\n\n\tpublic abstract CustomerInfo syncCustomer(CustomerInfo request) throws Exception;\n\t\n\tpublic abstract CustomerForm getCustomerFormData(CustomerForm request) throws Exception;\n\t\n\tpublic abstract CustomerBooking createBooking(CustomerBooking request) throws Exception;\n\t\n\tpublic abstract CustomerBooking cancelBooking(CustomerBooking request) throws Exception;\n\n\tpublic abstract ArrayList<HashMap<Long, SeatingArea>> getEventSeatingMap(long eventId) throws Exception;\n\n\tpublic abstract AvailableSeats getEventAvailability(AvailableSeats request) throws Exception;\n}",
"public interface MqConsumer {\n}",
"public interface VertexQueue {\n\n\t/**\n\t * Adds the given vertex to this queue.\n\t * \n\t * @param vertex\n\t * vertex\n\t */\n\tvoid add(int vertex);\n\n\t/**\n\t * Removes and returns the next vertex from this queue.\n\t * \n\t * @return the next vertex to be processed\n\t */\n\tint poll();\n\n\t/**\n\t * Returns the vertex that will be processed next.\n\t * \n\t * @return the next vertexto be processed\n\t */\n\tOptionalInt peek();\n\n\t/**\n\t * Tells if the queue is empty.\n\t * \n\t * @return {@code true} if the queue is empty\n\t */\n\tboolean isEmpty();\n\n\t/**\n\t * Tells if the given vertex is part of the queue.\n\t * \n\t * @param vertex\n\t * vertex\n\t * @return <code>true</code> if the vertex is contained in the queue\n\t */\n\tboolean contains(int vertex);\n\n\t/**\n\t * Removes all vertices from the queue.\n\t */\n\tvoid clear();\n}",
"public DVDQueue() { \n\t\tqueue = new LinkedList<DVDPackage>(); \n\t}",
"public Queue() {}",
"public TargetBufferRelay(String tag, UID uid, MessageAddress source, Object c ) {\n this( uid, source, c ) ;\n this.tag = tag ;\n }",
"public E peek()\r\n/* 145: */ {\r\n/* 146:367 */ E[] buffer = this.consumerBuffer;\r\n/* 147:368 */ long index = this.consumerIndex;\r\n/* 148:369 */ long mask = this.consumerMask;\r\n/* 149: */ \r\n/* 150:371 */ long offset = LinkedArrayQueueUtil.modifiedCalcElementOffset(index, mask);\r\n/* 151:372 */ Object e = UnsafeRefArrayAccess.lvElement(buffer, offset);\r\n/* 152:373 */ if ((e == null) && (index != lvProducerIndex())) {\r\n/* 153: */ do\r\n/* 154: */ {\r\n/* 155:379 */ e = UnsafeRefArrayAccess.lvElement(buffer, offset);\r\n/* 156:381 */ } while (e == null);\r\n/* 157: */ }\r\n/* 158:383 */ if (e == JUMP) {\r\n/* 159:385 */ return newBufferPeek(getNextBuffer(buffer, mask), index);\r\n/* 160: */ }\r\n/* 161:387 */ return e;\r\n/* 162: */ }",
"public Byte getSource() {\r\n return source;\r\n }",
"public Queue(){ }",
"public Node source() {\n return source;\n }"
] | [
"0.5859741",
"0.584186",
"0.57918704",
"0.5723629",
"0.56689394",
"0.56689394",
"0.559569",
"0.5583339",
"0.5554082",
"0.55471087",
"0.55458647",
"0.5511629",
"0.55002654",
"0.5492428",
"0.5485996",
"0.5470539",
"0.5466456",
"0.5457353",
"0.5435347",
"0.54301417",
"0.5404505",
"0.5395032",
"0.5393038",
"0.539207",
"0.53860563",
"0.5375768",
"0.537276",
"0.53592503",
"0.53273576",
"0.5324274",
"0.5322748",
"0.5310861",
"0.5293166",
"0.527181",
"0.5269633",
"0.5268313",
"0.52604115",
"0.5259186",
"0.5244808",
"0.52423334",
"0.52397525",
"0.5215586",
"0.52148074",
"0.52093583",
"0.5199718",
"0.51983356",
"0.5190936",
"0.51755106",
"0.5175503",
"0.51696986",
"0.51696986",
"0.516707",
"0.51622725",
"0.5159762",
"0.5144702",
"0.51358265",
"0.5134941",
"0.51101226",
"0.51028484",
"0.5093993",
"0.5086286",
"0.50748134",
"0.5073214",
"0.50689745",
"0.50677526",
"0.5066915",
"0.5060552",
"0.5058366",
"0.50423473",
"0.50404453",
"0.50387365",
"0.50309443",
"0.5014729",
"0.5005764",
"0.50049573",
"0.50011104",
"0.4990546",
"0.49902096",
"0.49733827",
"0.4971463",
"0.49707574",
"0.49693897",
"0.49660006",
"0.49553877",
"0.495489",
"0.49506015",
"0.4949013",
"0.4949013",
"0.49481905",
"0.49420398",
"0.49336272",
"0.49313927",
"0.4927223",
"0.49182102",
"0.49168998",
"0.48992538",
"0.48870128",
"0.48830023",
"0.48751292",
"0.48739916"
] | 0.76857144 | 0 |
Retrieves and removes the head of this queue, or null if this queue is empty. | E poll(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }",
"public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }",
"public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }",
"@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }",
"public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }",
"public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}",
"private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }",
"private T get() {\n Queue<T> h = head;\n Queue<T> first = h.next;\n h.next = h; // help GC\n\n head = first;\n T x = first.item;\n first.item = null;\n return x;\n }",
"public T dequeue() {\n if (first != null) {\n size--;\n T data = first.data;\n first = first.next;\n\n if (first == null) {\n last = null; // avoid memory leak by removing reference\n }\n\n return data;\n }\n return null;\n }",
"@Override\n\tpublic E dequeue() {\n\t\tif (! isEmpty()) {\n\t\t\tNode temp = first;\n\t\t\tE e = temp.element;\n\t\t\tfirst = temp.next;\n\t\t\t\n\t\t\tif (temp == last)\n\t\t\t\tlast = null;\n\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}",
"public T removeHead()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\tSystem.out.println(\"list is empty\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//advance head reference\n\t\tT value = head.value;\n\t\thead = head.next;\n\t\t\n\t\tsize--;\n\t\treturn value;\n\t\t\n\t}",
"public Object removeFirst() {\n if(head == null) return null;\n if(head.getNext() == null) {\n Object temp = head.getElement();\n head = tail = null;\n return temp;\n }\n\n Object temp = head.getElement();\n Node n = head.getNext();\n n.setPrevious(null);\n head = n;\n\n return temp;\n }",
"public Object dequeue()\n {\n return queue.removeFirst();\n }",
"public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }",
"public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }",
"public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}",
"public E removeFirst() { // removes and returns the first element\n // TODO\n if (isEmpty( )) return null;\n Node<E> head = tail.getNext();\n if (head == tail) tail = null;\n else tail.setNext(head.getNext( ));\n size--;\n return head.getElement( );\n }",
"@Override\r\n\tpublic T getHead()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\t\treturn head.element;\r\n\t}",
"@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}",
"public Object removeFirst(){\n //Check if there is data to be removed, if not return null\n if(size == 0){\t//size 0 indicates no data in the linkedlist\n return null;\n }\n MovieNode removed = head.next;\n head.next = head.next.next;\n size--;\n return removed.data;\n }",
"public Object dequeue() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Cannot dequeue.\");\n\t\t}\n\t\t\n\t\t// Check: one element (tail = head)\n\t\t// If so, set tail to null\n\t\tif (tail == head) tail = null;\n\t\t\n\t\t// Save head's data to return\n\t\tObject first = head.data;\n\t\t\n\t\t// Remove head from queue and re-assign head to head.next\n\t\thead = head.next;\n\t\t\n\t\treturn first;\n\t}",
"public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}",
"protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}",
"protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Paciente dequeue() {\r\n\t\tif (this.head == null) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\tPaciente paciente = this.head.getPaciente();\r\n\t\t\tthis.head = this.head.getProximo();\r\n\t\t\treturn paciente;\r\n\t\t}\r\n\t}",
"public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }",
"public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}",
"public T removeFirst() {\n if (size == 0) {\n return null;\n }\n nextFirst = plusOne(nextFirst);\n size -= 1;\n T toRemove = items[nextFirst];\n items[nextFirst] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }",
"@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}",
"public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }",
"public E dequeue() {\n\t\treturn list.removeFirst();\n\t}",
"public E removeFirst() {\n if(isEmpty()){\n return null;\n }else{\n return remove(header.getNext());\n }\n }",
"public T pop()\n\t{\n\t\tif (head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.data;\n\t\thead = head.link;\n\t\tsize--;\n\t\treturn ret;\n\t}",
"public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }",
"public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }",
"public AnyType dequeue() {\n\t\tif (empty()) {\n\t\t\treturn null;\n\t\t}\n\t\tAnyType prevHeader = header.next.data; // assign back to header\n\t\theader.next = header.next.next;\n\t\tif (empty()) {\n\t\t\tback = header.next;\n\t\t}\n\t\treturn prevHeader; // if not return old header, check to see if removed\n\t\t// Running time is θ(1) because it's a constant operation.\n\t}",
"@Override\r\n\tpublic T dequeue()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\r\n\t\tLinkedNode<T> target = head;\r\n\t\tT item = target.element;\r\n\r\n\t\thead = target.next;\r\n\r\n\t\ttarget.element = null;\r\n\t\ttarget.next = null;\r\n\r\n\t\tif (head == null)\r\n\t\t{\r\n\t\t\ttail = null;\r\n\t\t}\r\n\r\n\t\tcount--;\r\n\t\treturn item;\r\n\t}",
"private GameAction pull() {\n if (this.queue.size() > 0) {\n return this.queue.remove(0);\n } else {\n return null;\n }\n }",
"public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException(\"Removing from an empty deque\");\n Node<Item> tmpFirst = first;\n Item firstItem = tmpFirst.item;\n first = tmpFirst.next;\n size--;\n if (isEmpty()) last = null;\n else first.prev = null;\n return firstItem;\n }",
"public E poll() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}",
"Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }",
"@Override\n\tpublic Node removeNode() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\t// BreadthFirstSearch using a queue, first in first out principle\n\t\treturn frontier.removeFirst();\n\t}",
"public E dequeue() {\n\t\tif(isEmpty()){\n\t\t\tSystem.out.println(\"Queue is already empty\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tif(head.next==tail){\n\t\t\t\ttail=head;\n\t\t\t}\n\t\t\tE e=head.next.e;\n\t\t\thead.next=head.next.next;\n\t\t\treturn e;\n\t\t}\n\t\t\n\t}",
"public T poll() {\n if(size==0)\n return null;\n else {\n T temp= (T) pq[0];\n pq[0]=pq[size-1];\n size--;\n percolateDown(0);\n return temp;\n\n\n }\n }",
"public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }",
"public T poll() {\n if (size == 0)\n return null;\n int s = --size;\n T result = (T) heap[0];\n T backup = (T) heap[s];\n heap[s] = null; // delete\n if (s != 0)\n siftDown(0, backup);\n return result;\n }",
"@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }",
"public E poll() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(0);\r\n\t\tdata.remove(0);\r\n\t\treturn ret;\r\n\t}",
"public String pop() {\n if (queue.size() == 0) {\n return null;\n }\n\n String result = top();\n queue.remove(0);\n return result;\n }",
"public Bottle inputQueueTakeBottle() {\n\t\tsynchronized (inputQueue) {\n\t\t\tif (this.inputQueueSize() != 0) {\n\t\t\t\treturn inputQueue.remove();\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}",
"public Item removeFirst() {\n if (size == 0) {\n return null;\n } else if (size == 1) {\n StuffNode i = sentinel.next;\n sentinel.next = sentinel;\n sentinel.prev = sentinel;\n size -= 1;\n return i.item;\n } else {\n StuffNode i = sentinel.next;\n sentinel.next = i.next;\n i.next.prev = sentinel;\n size -= 1;\n return i.item;\n }\n }",
"public T remove() throws EmptyQueueException;",
"public T deleteFromHead() {\n if (isEmpty()) \n return null;\n T el = head.info;\n if (head == tail) // if only one node on the list;\n head = tail = null;\n else head = head.next;\n return el;\n }",
"public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }",
"public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}",
"@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }",
"public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n Item item = head.item;\n if (size == 1) {\n tail = null;\n head = null;\n } else {\n Node<Item> nextHead = head.next;\n nextHead.prev = null;\n head = nextHead;\n }\n\n size--;\n return item;\n }",
"public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}",
"public synchronized T poll() {\n if (isEmpty()) {\n return null;\n }\n Object firstKey = this.IC.firstKey();\n LinkedList linkedList = (LinkedList) this.IC.get(firstKey);\n T poll = linkedList.poll();\n if (linkedList.size() <= 0) {\n this.IC.remove(firstKey);\n }\n }",
"public T popHead() {\n \n if(head == null) {\n return null;\n }\n \n Node<T> temp = head;\n head = head.getNext();\n return temp.getValue();\n }",
"private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }",
"public synchronized Object dequeue() throws EmptyListException {\r\n return removeFromFront();\r\n }",
"public E poll() {\n E item;\n try {\n item = remove();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }",
"public E pop() {\n if (isEmpty()) {\n return null;\n } else {\n E e = head.item;\n head = head.next;\n size--;\n return e;\n }\n\n }",
"public String dequeue() {\n\t\tif ( isEmpty() )\n\t\t\treturn null;\n\t\tString ret = data[head];\n\t\tnumElements--;\n\t\t//was this the last item?\n\t\tif ( isEmpty() )\n\t\t\tinit();\n\t\t//otherwise, move the head to the new position\n\t\telse\n\t\t\thead = (head+1)%data.length;\n\t\treturn ret;\n\t}",
"public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}",
"public T pop() {\n if (head == null) {\n return null;\n } else {\n Node<T> returnedNode = head;\n head = head.getNext();\n return returnedNode.getItem();\n }\n }",
"public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }",
"public static Object dequeue() {\t \n if(queue.isEmpty()) {\n System.out.println(\"The queue is already empty. No element can be removed from the queue.\"); \n return -1;\n }\n return queue.removeFirst();\n }",
"public T removeFirst()\r\n {\r\n T removedData; // holds data from removed node\r\n\r\n if (numElements == 0)\r\n throw new NoSuchElementException(\r\n \"Remove attempted on empty list\\n\");\r\n removedData = front.data;\r\n front = front.next;\r\n if (numElements == 1)\r\n rear = null;\r\n \r\n numElements--;\r\n return removedData;\r\n }",
"@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}",
"public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }",
"public Item removeFirst() {\n if (isEmpty()) throw new NoSuchElementException();\n\n // Set the item to be returned to the item field of the first node\n Item item = headOfDeque.item;\n\n // If this is the last node - reset deque.\n if (lastNode()) {\n resetDeque();\n }\n else { // reassign head\n headOfDeque = headOfDeque.next;\n headOfDeque.previous = null;\n }\n\n dequeSize--;\n\n return item;\n }",
"@Override\n public Object dequeue() {\n Object objeto;\n if (!isEmpty()){ // Pré-condição\n objeto = memo[head];\n if (++head >= MAX){\n head = 0; // MAX-1 é a ultima posição do vetor\n }\n \n total--;\n if (total == 0){\n head = -1;\n tail = -1;\n }\n \n return objeto; // Retor o objeto que estava na head\n }\n else{\n return null; // Não se retira elemento de FILA vazia\n }\n }",
"T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }",
"@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}",
"public String dequeue() {\n return null;\n }",
"public NodeBase<V> dequeue() {\r\n \tif(!isEmpty()){\r\n \tNodeBase<V> min=queue[0];\r\n \tint j=0;\r\n for(int i=0;i<currentSize;i++){\r\n \t if(min.getPriority()>queue[i].getPriority()){\r\n \t\t min=queue[i];\r\n \t\t j=i;\r\n \t }\r\n }\r\n for(int x=j;x<currentSize-1;x++){\r\n \t queue[x]=queue[x+1];\r\n }\r\n \r\n currentSize--;\r\n \r\n return min;\r\n \t}\r\n \telse{\r\n \t\treturn null;\r\n \t}\r\n }",
"public T removeLast() {\n if (size() == 0) {\n return null;\n }\n nextLast = minusOne(nextLast);\n size -= 1;\n T toRemove = items[nextLast];\n items[nextLast] = null;\n if (isSparse()) {\n resize(capacity / 2);\n }\n return toRemove;\n }",
"public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }",
"T getFront() throws EmptyQueueException;",
"public T removeFirst() {\n return remove(sentinel.next);\n }",
"public T peek() {\n if (this.size <= 0)\n return null;\n return (T) pq[0];\n }",
"@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }",
"public Object dequeue() {\n\t\tObject itemToDeq = null;\n\t\tif(this.l.start==null){\n\t\t\tnew QueueUnderflowException(\"No elements in the queue\");\n\t\t}\n\t\telse{\n\t\t\tListNode p = this.l.start;\n\t\t\tif(p.next==null){\n\t\t\t\titemToDeq = p.item;\n\t\t\t\tthis.l.start = null;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twhile(p.next.next!=null){\n\t\t\t\t\tp = p.next;\n\t\t\t\t}\n\t\t\t\titemToDeq = p.next.item;\n\t\t\t\tp.next=null;\n\t\t\t}\n\t\t\treturn itemToDeq;\n\t\t}\n\t\treturn null;\n\t}",
"public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Can not call removeFirst() on an empty deque\");\n }\n\n Item item = first.item;\n first = first.next;\n n--;\n if (isEmpty()) {\n last = null;\n }\n else {\n first.prev = null;\n }\n return item;\n\n }",
"T poll(){\n if(isEmpty()){\n return null;\n }\n T temp = (T) queueArray[0];\n for(int i=0; i<tail-1;i++){\n queueArray[i] = queueArray[i+1];\n }\n tail--;\n return temp;\n }",
"@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }",
"public T dequeue() {\n if (isEmpty()) {\n throw new RuntimeException(\"Ring buffer underflow\");\n }\n T itemToReturn = rb[first];\n rb[first] = null;\n fillCount -= 1;\n if (isEmpty()) {\n first = 0;\n last = 0;\n return itemToReturn;\n }\n first = (first + 1) % capacity;\n return itemToReturn;\n\n // Dequeue the first item. Don't forget to decrease fillCount and update\n }",
"public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}",
"public PairStringString popHeadElement() {\n if (head == null) {\n return null;\n }\n final PairStringString elem = head.pairStringString;\n head.remove();\n head = head.next;\n size--;\n return elem;\n }",
"public String dequeue()\n\t{\n\t\tif (!isEmpty())\n\t\t{\n\t\t\tcounter--;\n\t\t\tString temp = list[front];\n\t\t\tfront = next(front);\n\t\t\treturn temp;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public Object firstElement() {\n return _queue.firstElement();\n }",
"public Object pop (){\n if(!head.equals(null)){\r\n Object data = head.data;\r\n head = head.next;\r\n return data;\r\n }\r\n else\r\n return null; \r\n }",
"public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }",
"public Item removeFirst() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tNode<Item> tmp = head;\n\t\thead = head.next;\n\t\tif (head == null) {\n\t\t\ttail = null;\n\t\t} else {\n\t\t\thead.prev = null;\n\t\t}\n\t\tN--;\n\t\ttmp.next = null;\n\t\treturn tmp.item;\n\t}",
"public T deleteHead(){\n if (head.next != tail || tail.prev != head) {\n T data = head.next.data;\n head = head.next;\n return data;\n }\n return null;\n }",
"public Item removeFirst() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException(\"Cannot remove first item from empty deque\");\n }\n if (size == 1) { //remove last item in deque of size 1\n Item item = head.getItem(); //item = item to be removed\n head = null;\n tail = null;\n return item;\n }\n Node n = head; //n = temporary Node\n head = head.getNext(); //assign 2nd node as new head, \"removing\" previous head from deque\n size--;\n return n.getItem();\n }",
"public void pop() {\n queue.remove(0);\n }",
"public Node<E> removeHead() {\n Node<E> answer = head;\n head = head.getNext();\n size--;\n return answer;\n }"
] | [
"0.73895794",
"0.73721313",
"0.72464776",
"0.72459537",
"0.72198725",
"0.72156656",
"0.7215039",
"0.720913",
"0.7177467",
"0.7168614",
"0.7074924",
"0.7068405",
"0.7067891",
"0.70604455",
"0.7059144",
"0.7037103",
"0.7027293",
"0.7021381",
"0.7020296",
"0.7016035",
"0.69813925",
"0.69745415",
"0.6965074",
"0.69623905",
"0.6946678",
"0.6937618",
"0.69369197",
"0.69291395",
"0.69239223",
"0.6916498",
"0.69161683",
"0.6913173",
"0.6895324",
"0.6892605",
"0.6873328",
"0.6867091",
"0.6865405",
"0.6852541",
"0.6828896",
"0.6827962",
"0.68262994",
"0.68245184",
"0.68227124",
"0.68193936",
"0.6793915",
"0.67875093",
"0.67861485",
"0.6780323",
"0.6775731",
"0.6765942",
"0.6762753",
"0.6745559",
"0.67446834",
"0.67411965",
"0.6740319",
"0.6736956",
"0.67268836",
"0.6724397",
"0.6724121",
"0.6723102",
"0.67112035",
"0.67059934",
"0.6705406",
"0.6696972",
"0.6696639",
"0.66956013",
"0.66834474",
"0.66811955",
"0.666579",
"0.66512704",
"0.66493624",
"0.6645266",
"0.664293",
"0.6637932",
"0.6629766",
"0.6629697",
"0.6624972",
"0.66242844",
"0.6622081",
"0.6597215",
"0.658875",
"0.65818477",
"0.6580755",
"0.65732723",
"0.6561146",
"0.6550958",
"0.65505147",
"0.65452236",
"0.6542401",
"0.6541071",
"0.6540159",
"0.6534028",
"0.65330577",
"0.65309227",
"0.6525292",
"0.65219134",
"0.6521813",
"0.65164816",
"0.6515395",
"0.65139294",
"0.65084696"
] | 0.0 | -1 |
Retrieves, but does not remove, the head of this queue, returning null if this queue is empty. | E peek(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic T getHead()\r\n\t{\r\n\t\tif (isEmpty()) { throw new EmptyQueueException(); }\r\n\t\treturn head.element;\r\n\t}",
"@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }",
"public Object firstElement() {\n return _queue.firstElement();\n }",
"public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }",
"public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }",
"public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }",
"public T peek() {\n if (this.size <= 0)\n return null;\n return (T) pq[0];\n }",
"T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }",
"private T get() {\n Queue<T> h = head;\n Queue<T> first = h.next;\n h.next = h; // help GC\n\n head = first;\n T x = first.item;\n first.item = null;\n return x;\n }",
"T getFront() throws EmptyQueueException;",
"@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}",
"public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }",
"public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }",
"public T peek() {\n\t if (size==0)\n\t return null;\n\t else return (T) pq[0];\n }",
"public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }",
"public String head() {\n if (isEmpty() == false) {\n return head.getData();\n } else {\n return null;\n }\n }",
"public process get_first() {\n\t\treturn queue.getFirst();\n\t}",
"public T getFront(){\n if (isEmpty()){\n throw new EmptyQueueException();\n }\n else {\n return firstNode.getData();\n }\n }",
"public T front() throws EmptyQueueException;",
"public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }",
"public Object peek() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Nothing to peek at.\");\n\t\t}\n\t\t\n\t\treturn head.data;\n\t}",
"public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }",
"public Object peek() throws QueueEmptyException {\n\n\t\tif (isEmpty()) {\n\t\t\tthrow new QueueEmptyException(\"Usage: using peek() on empty queue\");\n\t\t} else {\n\t\t\tNode N = head;\n\t\t\treturn N.item;\n\n\t\t}\n\n\t}",
"public E pollFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}",
"@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }",
"public Paciente dequeue() {\r\n\t\tif (this.head == null) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\tPaciente paciente = this.head.getPaciente();\r\n\t\t\tthis.head = this.head.getProximo();\r\n\t\t\treturn paciente;\r\n\t\t}\r\n\t}",
"public T getFirst() {\n\t\t//if the head is not empty\n\t\tif (head!= null) {\n\t\t\t//return the data in the head node of the list\n\t\t\treturn head.getData();\n\t\t}\n\t\t//otherwise return null\n\t\telse { return null; }\n\t}",
"public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }",
"public Object peek()\n {\n return queue.peekLast();\n }",
"public synchronized Object get() {\n try {\n Object obj = queue.take().getElement();\n\n // set next offset\n delayOffset = System.currentTimeMillis();\n\n return obj;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public Object getFront() throws Exception {\n if (!isEmpty()) {\n return queue[front];\n } else {\n // 对为空返回null\n return null;\n }\n }",
"@Override\n\tpublic E dequeue() {\n\t\tif (! isEmpty()) {\n\t\t\tNode temp = first;\n\t\t\tE e = temp.element;\n\t\t\tfirst = temp.next;\n\t\t\t\n\t\t\tif (temp == last)\n\t\t\t\tlast = null;\n\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}",
"public WalkIn peek() {\n if(isEmpty()) System.err.println(\"The queue is empty! Nobody is next!\");\n \n return first.getData();\n }",
"public Person peek() throws EmptyQueueException{\n if (holdingQueue.isEmpty()){\n throw new EmptyQueueException(\"This queue is empty.\");\n }else{\n return holdingQueue.get(0);\n }\n }",
"public T peek() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to peek.\");\n } else {\n return backingArray[front];\n }\n\n }",
"public T getHead() {\n return get(0);\n }",
"public E peekFirst() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}",
"public NodeT getNext() {\n String nextItemKey = queue.poll();\n if (nextItemKey == null) {\n return null;\n }\n return nodeTable.get(nextItemKey);\n }",
"public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }",
"public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }",
"public E peek() {\n\t\tif (isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn apq.get(1);\n\t}",
"public E dequeue() {\n\t\tif(isEmpty()){\n\t\t\tSystem.out.println(\"Queue is already empty\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tif(head.next==tail){\n\t\t\t\ttail=head;\n\t\t\t}\n\t\t\tE e=head.next.e;\n\t\t\thead.next=head.next.next;\n\t\t\treturn e;\n\t\t}\n\t\t\n\t}",
"public Object dequeue() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Cannot dequeue.\");\n\t\t}\n\t\t\n\t\t// Check: one element (tail = head)\n\t\t// If so, set tail to null\n\t\tif (tail == head) tail = null;\n\t\t\n\t\t// Save head's data to return\n\t\tObject first = head.data;\n\t\t\n\t\t// Remove head from queue and re-assign head to head.next\n\t\thead = head.next;\n\t\t\n\t\treturn first;\n\t}",
"public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }",
"public int peek()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty\");\n\t\t}\n\t\treturn head.value;\n\t}",
"public T dequeue() {\n if (first != null) {\n size--;\n T data = first.data;\n first = first.next;\n\n if (first == null) {\n last = null; // avoid memory leak by removing reference\n }\n\n return data;\n }\n return null;\n }",
"@Override\n public E peek() {\n return (E)queue[0];\n }",
"public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }",
"public T poll() {\n if(size==0)\n return null;\n else {\n T temp= (T) pq[0];\n pq[0]=pq[size-1];\n size--;\n percolateDown(0);\n return temp;\n\n\n }\n }",
"public int peek()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\treturn head.value;\n\t}",
"public synchronized T get(){\n if (list.isEmpty()) return null;\n return list.remove(0);\n }",
"public Item getFirst() {\n Node removed = head.next;\n head.next = removed.next;\n removed.next = null;\n size--;\n return removed.item;\n }",
"public T getMin() {\n\t\tif (heapSize > 0) {\n\t\t\treturn lstEle.get(0);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public T popHead() {\n \n if(head == null) {\n return null;\n }\n \n Node<T> temp = head;\n head = head.getNext();\n return temp.getValue();\n }",
"public Object dequeue()\n {\n return queue.removeFirst();\n }",
"public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }",
"private E removeFirst ()\n {\n Node<E> temp = head;\n if (head != null) {\n head = head.next;\n size--;\n return temp.data;\n }\n else\n return null;\n }",
"public T peek() {\n\t\tif (this.l.getHead() != null)\n\t\t\treturn this.l.getHead().getData();\n\t\telse {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }",
"public E poll() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(0);\r\n\t\tdata.remove(0);\r\n\t\treturn ret;\r\n\t}",
"public E top() {\n return !isEmpty() ? head.item : null;\n }",
"public int getFront() {\n if(isEmpty()){\n return -1;\n }\n return queue[head];\n }",
"public T peek() {\n if (isEmpty()) {\n throw new RuntimeException(\"Ring buffer underflow\");\n }\n return rb[first];\n // Return the first item. None of your instance variables should change.\n }",
"public synchronized T poll() {\n if (isEmpty()) {\n return null;\n }\n Object firstKey = this.IC.firstKey();\n LinkedList linkedList = (LinkedList) this.IC.get(firstKey);\n T poll = linkedList.poll();\n if (linkedList.size() <= 0) {\n this.IC.remove(firstKey);\n }\n }",
"public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }",
"public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }",
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"public T lookupHead(){\n if (head.next == tail && tail.prev == head){\n return null;\n }\n else {\n return head.next.data;\n }\n }",
"@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}",
"public DVDPackage front() {\n\t\treturn queue.peek();\n\t}",
"@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}",
"public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }",
"public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}",
"@Override\r\n\tpublic E peek() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\treturn stack[t];\r\n\t}",
"public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }",
"public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }",
"public int Front() {\n if(queue[head] == null){\n return -1;\n }else{\n return queue[head];\n }\n }",
"public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }",
"public Atom getHead ()\r\n\t{\r\n\t\treturn _head.get(0);\r\n\t}",
"public Node getHead() {\n return (Node) get();\n }",
"public E dequeue() {\n\t\treturn list.removeFirst();\n\t}",
"public int peek() {\n return queue.firstElement();\n }",
"private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }",
"public NodeBase<V> dequeue() {\r\n \tif(!isEmpty()){\r\n \tNodeBase<V> min=queue[0];\r\n \tint j=0;\r\n for(int i=0;i<currentSize;i++){\r\n \t if(min.getPriority()>queue[i].getPriority()){\r\n \t\t min=queue[i];\r\n \t\t j=i;\r\n \t }\r\n }\r\n for(int x=j;x<currentSize-1;x++){\r\n \t queue[x]=queue[x+1];\r\n }\r\n \r\n currentSize--;\r\n \r\n return min;\r\n \t}\r\n \telse{\r\n \t\treturn null;\r\n \t}\r\n }",
"public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }",
"public synchronized Card peek()\n {\n if (cards.isEmpty())\n return null;\n \n return cards.lastElement();\n }",
"@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}",
"public Object element() {\n return queue.element();\n }",
"public String peek() {\n\t\treturn isEmpty() ? null : data[head];\n\t}",
"@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }",
"public DoublyLinkedListNode<T> getHead() {\n // DO NOT MODIFY!\n return head;\n }",
"public E poll() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\tE retVal = mHead.next.data;\n\t\tremove(mHead.next);\n\n\t\tmodCount++;\n\t\tmSize--;\n\n\t\treturn retVal;\n\t}",
"public int top() {\n return queue.element();\n }",
"public T peek()\n {\n\n if (ll.getSize()==0){\n return null;\n }else\n return ll.getData(ll.getSize()-1);\n }",
"T poll(){\n if(isEmpty()){\n return null;\n }\n T temp = (T) queueArray[0];\n for(int i=0; i<tail-1;i++){\n queueArray[i] = queueArray[i+1];\n }\n tail--;\n return temp;\n }",
"public E first() {\n if (isEmpty()) return null;\n return first.item;\n }",
"public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn this.head;\n\t}",
"public E peek() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\treturn mHead.next.data;\n\t}",
"public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}",
"public T peek() {\n\t\tif (head.data == null) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\treturn (T) head.data;\n\t}",
"public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }"
] | [
"0.77666205",
"0.7382134",
"0.73615354",
"0.73016363",
"0.72750646",
"0.7241076",
"0.7235833",
"0.72053677",
"0.71764535",
"0.7131121",
"0.711519",
"0.7103699",
"0.70913786",
"0.7021199",
"0.70099014",
"0.7001965",
"0.6989889",
"0.69879913",
"0.69529045",
"0.6949221",
"0.6948573",
"0.69339967",
"0.6930443",
"0.69210553",
"0.6911097",
"0.6906536",
"0.68950224",
"0.6876351",
"0.68669176",
"0.6856694",
"0.68518066",
"0.6850899",
"0.684395",
"0.6839625",
"0.6828235",
"0.6821341",
"0.6811984",
"0.6802909",
"0.6791939",
"0.67726153",
"0.6752637",
"0.67500675",
"0.6746785",
"0.67441154",
"0.6731683",
"0.6717432",
"0.6701351",
"0.6691032",
"0.6689768",
"0.66890746",
"0.66862047",
"0.6677221",
"0.6676335",
"0.6669212",
"0.6668321",
"0.6663203",
"0.6661649",
"0.6659484",
"0.66361827",
"0.66320753",
"0.6621996",
"0.6612484",
"0.6605814",
"0.65951335",
"0.6590871",
"0.6586518",
"0.6585844",
"0.6576463",
"0.6575851",
"0.6571691",
"0.6563407",
"0.6554644",
"0.655076",
"0.65268713",
"0.6521772",
"0.6520834",
"0.6514416",
"0.65096706",
"0.6508756",
"0.64966685",
"0.64928097",
"0.6491676",
"0.64873654",
"0.6485063",
"0.6481511",
"0.6478926",
"0.6467993",
"0.64676154",
"0.6465744",
"0.6465132",
"0.6458331",
"0.6450113",
"0.644972",
"0.6449358",
"0.644921",
"0.64460576",
"0.6445841",
"0.64433527",
"0.6443099",
"0.6442729",
"0.64410746"
] | 0.0 | -1 |
Query values of a column. | public <T> List<T> queryColumn(String columnName, String sql, Object... params) throws SQLException {
logger.debug("SQL= \n" + sql);
// Print the parameters to the logger.
printParams(params);
ResultSetHandler<List<T>> h = new ColumnListHandler<T>(columnName);
return qr.query(conn, sql, h, params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getValue(String column, int row);",
"public T col(final String column) {\r\n\t\treturn op(ConditionValueType.COLUMN, column);\r\n\t}",
"private Collection getColumn(QueryResultIF queryResult, int column) {\n Collection retVal = new ArrayList();\n\n while (queryResult.next()) {\n retVal.add(queryResult.getValue(column));\n }\n\n return retVal;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"Object getDataValue(String column, int row);",
"@Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);",
"public Object getValueAt(int row, int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn expressions.get(row);\n\t\tcase 1:\n\t\t\treturn values.get(row);\n\t\t}\n\t\treturn \"\";\n\t}",
"List<Column> getQueryColumns();",
"protected String getByColumn(boolean all, String table_name, String column_name, String name)\n\t{\n\t\tStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString result = \"\";\n\t\tif(!table_name.equals(\"\"))\n\t\t{\n\t\t\t// initializing the query statement\n\t\t\ttry {statement = connection.createStatement();} \n\t\t\tcatch (SQLException e) {}\n\t\t\t\n\t\t\t\t\t\n\t\t\t// executing query to database\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif(all) // Check if we need to get all the data on this column\n\t\t\t\t{\n\t\t\t\t\trs = statement.executeQuery(\"SELECT \" + column_name + \" FROM \" + table_name + \"\");\n\t\t\t\t\twhile(rs.next()) result = rs.getString(column_name);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trs = statement.executeQuery(\"SELECT \" + column_name + \" FROM \" + table_name + \" WHERE name = \\\"\" + name + \"\\\"\");\n\t\t\t\t\twhile(rs.next()) result = rs.getString(column_name); // Putting the data in result variable to be return\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {e.printStackTrace();}\n\t\t}\n\n\t\treturn result;\n\t}",
"Object getColumnValue(int colIndex);",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public Object getValueAt(int row, int column) {\n\t\tString[] rowValues = this.records.get(row);\n return rowValues[column];\n\t}",
"@NonNull\n Collection<TObj> getColumnItems(int column) {\n Collection<TObj> result = new LinkedList<>();\n for (int count = mData.size(), i = 0; i < count; i++) {\n int key = mData.keyAt(i);\n TObj columnObj = mData.get(key).get(column);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }",
"public void visitColumn(double val);",
"public int getValue(int row, int column);",
"protected Object getCellValue(int row, String column) {\r\n\r\n\t\t// translate\r\n\t\tif(NAME.equals(column))\r\n\t\t{\r\n\t\t\tIUnitIf unit = getId(row);\r\n\t\t\tString name = MsoUtils.getUnitName(getId(row), true);\t\t\t\r\n\t\t\treturn unit.isChanged()?name.concat(\"*\"):name;\r\n\t\t}\r\n\t\telse if(VIEW.equals(column))\r\n\t\t\treturn getId(row);\r\n\r\n\t\t// not supported\r\n\t\treturn null;\r\n\r\n\t}",
"public boolean getValor(int fila, int col) {\n\t\treturn matriz.getValor(fila, col);\n\t}",
"@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}",
"java.lang.String getColumn();",
"public Object getValueAt(int row, int column){\n return dataEntries[row][column];\n }",
"public Object getValueAt(int row, int column)\n {\n return getModel().getDataAt(row, convertColumnIndexToModel(column));\n }",
"public ContactListFilterPredicate column(String column) {\n this.column = column;\n return this;\n }",
"public List<CharSequence> allValues(String column) {\n\t\tList<CharSequence> list = new LinkedList<CharSequence>();\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.query(TABLE_PUBKEYS, new String[] { \"_id\", column },\n\t\t\t\tnull, null, null, null, \"_id ASC\");\n\n\t\tif (c != null) {\n\t\t\tint COL = c.getColumnIndexOrThrow(column);\n\n\t\t\twhile (c.moveToNext())\n\t\t\t\tlist.add(c.getString(COL));\n\n\t\t\tc.close();\n\t\t}\n\n\t\tdb.close();\n\n\t\treturn list;\n\t}",
"private String stringValue(String columnName) {\r\n String value = null;\r\n try {\r\n if ((rowSet != null) && selectContactInRowSet()) {\r\n value = rowSet.getString(columnName);\r\n }\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n return value;\r\n }",
"private ResultSet queryDatabaseForDataRow(Connection m_dbconn, String col) \n\t{\n\t\tResultSet rs = null;\n\t\tString selectStmt = \"SELECT * FROM RELATE_W_CH WHERE Ch_Name=\\\"\" + col + \"\\\"\";\n\n\t\ttry\n\t\t{\n\t\t\tStatement stmt = m_dbconn.createStatement();\n\n\t\t\trs = stmt.executeQuery(selectStmt);\n\t\t\trs.next();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn rs;\n\t}",
"public ArrayList<Object> retrieveData(String column) {\n ArrayList<Object> dataLst = new ArrayList<Object>(this.rowCount);\r\n\r\n int colType = getColumnType(column);\r\n\r\n //Number can be measure alone?\r\n if (isNumberColumn(colType)) {\r\n for (Object data : retrieveNumericData(column)) {\r\n dataLst.add(data);\r\n }\r\n } else if (isTextColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueString(i, column));\r\n }\r\n } else if (isDateColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueDate(i, column));\r\n }\r\n }\r\n\r\n// // long endTime = System.currentTimeMillis();\r\n// \r\n return dataLst;\r\n }",
"public Object getValueAt(int row, int col) {\n\t\tList rowList = data.get(row);\n\t\tObject result = null;\n\t\tif (col<rowList.size()) {\n\t\t\tresult = rowList.get(col);\n\t\t}\n\t\t\n\t\t// _apparently_ it's ok to return null for a \"blank\" cell\n\t\treturn(result);\n\t}",
"public Object getValue(String member) {\n\t\treturn jdbc.getValue(member); \n\t}",
"Integer calculate(String columnValue);",
"public List<DomainObject> getListByKeyandValue(String colname, Object value) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.eq(colname, value));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"@Override\r\n\tpublic boolean evaluate(Object value, String columnName)\r\n\t\t\tthrows SQLException {\n\t\treturn false;\r\n\t}",
"public Object getValueAt( int row, int column ) \r\n throws IllegalStateException\r\n {\r\n if ( !connectedToDatabase ) \r\n throw new IllegalStateException( \"Not Connected to Database\" );\r\n try \r\n {\r\n resultSet.absolute( row + 1 );\r\n return resultSet.getObject( column + 1 );\r\n }\r\n catch ( SQLException sqlException ) \r\n {\r\n sqlException.printStackTrace();\r\n }\r\n \r\n return \"\";\r\n }",
"public <T> List<T> queryColumn(String columnName, String sql) throws SQLException {\n return queryColumn(columnName, sql, (Object[])null);\n }",
"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 }",
"public Object getValueAt(int row, int column) {\r\n if (_debugTable == null) {\r\n return \"\" ;\r\n }\r\n try {\r\n Object o = _debugTable.getTableCell(row, column) ;\r\n return (o != null) ? o : \"\" ;\r\n } catch (Exception e) {\r\n return \"\" ;\r\n }\r\n }",
"public String getStringColumn(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n String name = canonicalize(column);\n \n if (isColumnNull(name))\n return null;\n \n Object value = data.get(name);\n \n if (value == null)\n throw new IllegalArgumentException(\"Column \" + column + \" not present\");\n if (!(value instanceof String))\n throw new IllegalArgumentException(\"Value is not an string\");\n \n return (String) value;\n }",
"public Column getColumn(String columnName);",
"@Override\n public Object getValueAt(int row, int column) {\n return this.data[row][column];\n }",
"long findValues(List<Object> values, List<Column> columns);",
"public Object getValueAt(int row, int column) {\n Preso cli = lista.get(row);\n /*if (column == Id) {\n return cli.getId();\n } else*/ if (column == Nome) {\n return cli.getNome();\n } if (column == Tempo) {\n return cli.getTempo();\n } else\n\n return \"\"; //Nunca deve ocorrer \n }",
"public Object getValueAt(int row, int column) {\n switch(column) {\n case SECURITY_NAME_COLUMN: return allSecurities.get(row).security;\n case CURRENT_PRICE_COLUMN: return allSecurities.get(row).currentPrice;\n case NEW_PRICE_COLUMN: return allSecurities.get(row).newPrice;\n default: return \"?\";\n }\n }",
"private static boolean isColumn(String table, String column) throws SQLException {\n\t\tConnection con = Connect_db();\r\n\t\tPreparedStatement pstat = con.prepareStatement(table);\r\n\t\tResultSet rs = pstat.executeQuery();\r\n\t\ttry {\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tif (rs.getString(\"Field\").equals(column)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t// TODO: handle finally clause\r\n\t\t\tcon.close();\r\n\t\t}\r\n\t}",
"public static List<String> getQuery(Connection con, String query, String ColName) throws SQLException {\n\t\t\tString columnName=null;\n\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\n\t\ttry(Statement st = con.createStatement();\n\t\t\tResultSet\trs = st.executeQuery(query);) {\n\t\t\t\n\t\t\t\n\t\t\t/*ResultSetMetaData metaData = rs.getMetaData();\n\t\t\tcolumnName = metaData.getColumnName(1);\n\t\t\tSystem.out.println(columnName); */\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tString actual = rs.getString(ColName);\n\t\t\t\tlist.add(actual);\n\t\t }\n\t\t\t\n\t\t} catch (Exception exception) {\n\t\t\tSystem.out.println(\"Failed to fetch query result\");\n\t\t\tSystem.out.println(exception);\n\t\t\tthrow exception;\n\t\t}\n\n\t\treturn list;\n\t}",
"public Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"public Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"@Override\n\tpublic Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"@Override\n\tpublic Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"public double getValueCurrentRow(final int column) {\r\n return getLogicalValueAt(currentRow, column);\r\n }",
"public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }",
"public List<?> queryBySingleCriteria(String field, String value)\n throws DataAccessLayerException {\n return queryBySingleCriteria(field, value, \"=\");\n }",
"String getColumn();",
"public void addFilterEqual(String column, Object value) {\n controlRelationAndAddToList(criterionList, Restrictions.eq(trimColumn(column), value), column);\n }",
"public Object getValueAt(int row, int col) {\n return data[row][col];\n }",
"Object getDataValue(final int row, final int column);",
"public Object getResult(ResultSet rs, String columnName) throws SQLException;",
"public Object getValueAt(int row, int col)\r\n\t{\r\n\t\treturn cellData[row][col];\r\n\t}",
"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 Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(indexes[aRow], aColumn);\n }",
"private void select(String tableName, String colName, String value,\n boolean usePar) {\n String query;\n \n if (usePar == true){\n // Parenthesis will surrond the value making it a string\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \\'\" + value + \"\\'\";\n }\n else{\n // Parenthesis will not surround the value\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \" + value;\n }\n \n this.executeSelect(query);\n }",
"@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}",
"@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}",
"public Object getValueAt(int row, int col) {\n return data[row][col];\n }",
"public Object getValueAt(int aRow, int aColumn) \n {\n if (rowCount >= aRow && colCount >= aColumn)\n return (rowData[aRow][aColumn]); \n else\n return(null);\n }",
"public boolean getBooleanColumn(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n String name = canonicalize(column);\n \n if (isColumnNull(name))\n return false;\n \n Object value = data.get(name);\n \n if (value == null)\n throw new IllegalArgumentException(\"Column \" + column + \" not present\");\n if (!(value instanceof Boolean))\n throw new IllegalArgumentException(\"Value is not a boolean\");\n \n return ((Boolean) value).booleanValue();\n }",
"public Object getValue(int aRow, int aColumn, String type) throws RowOutOfRangeException, ColumnOutOfRangeException {\n if (aRow < 0 || aRow >= rowCount) {\n throw new RowOutOfRangeException(aRow, rowCount);\n }\n if (aColumn < 0 || aColumn >= columnCount) {\n throw new ColumnOutOfRangeException(aColumn, columnCount);\n }\n \n if (aRow >= m_fetchedRowCount)\n {\n //System.out.println(\"NOT FETCHED: col = \" + aColumn + \", row = \" + aRow);\n return new WaitData(\"waiting for data...\");\n }\n \n return cellData[aRow][aColumn];\n }",
"public Object getValueAt(int row, int col)\n\t{\n\t\t// invalid row\n\t\tif (row < 0 || row >= m_data.rows.size())\n\t\t\treturn null;\n\t//\t\tthrow new java.lang.IllegalArgumentException(\"Row invalid\");\n\t\tif (col < 0 || col >= m_data.cols.size())\n\t\t\treturn null;\n\t//\t\tthrow new java.lang.IllegalArgumentException(\"Column invalid\");\n\t\t//\n\t\tArrayList<Object> myRow = (ArrayList<Object>)m_data.rows.get(row);\n\t\t// invalid column\n\t\tif (myRow == null || col >= myRow.size())\n\t\t\treturn null;\n\t\t// setValue\n\t\treturn myRow.get(col);\n\t}",
"Value evaluateCellAt(int col, int row);",
"public List<OfflineDataCachedIds> getData(String column, String value) {\n List<OfflineDataCachedIds> olDatas = new LinkedList<OfflineDataCachedIds>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(TABLE_NAME_CACHEDIDS, COLUMNS, \" \" + column\n + \" = ?\", new String[] { value }, null, null, null, null);\n if (cursor != null) {\n OfflineDataCachedIds olData = null;\n if (cursor.moveToFirst()) {\n do {\n olData = new OfflineDataCachedIds();\n // getString(0) is the id inside the db\n olData.setStored(Integer.parseInt(cursor.getString(1)));\n olData.setEcardID(cursor.getString(2));\n olData.setWhereMet(cursor.getString(3));\n olData.setEventMet(cursor.getString(4));\n olData.setNotes(cursor.getString(5));\n olData.setVoiceNote(cursor.getString(6));\n olDatas.add(olData);\n } while (cursor.moveToNext());\n }\n }\n Log.d(\"getData(\" + column + \" = \" + value + \") \", olDatas.toString());\n return olDatas;\n }",
"public ArrayList<String> selectCommand(String query, String[] wantedColumn){\n String record = null;\n ArrayList<String> records=new ArrayList<>( );\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(query)){\n // loop through the result set\n while (rs.next()) {\n record=\"\";\n for (int i = 0; i <wantedColumn.length ; i++) {\n record+=rs.getString( wantedColumn[i] ) + \"\\t\";\n }\n records.add(record);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return records;\n }",
"@Test void testInterpretProjectFilterValues() {\n final String sql = \"select y, x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"where x > 1\";\n sql(sql).returnsRows(\"[b, 2]\", \"[c, 3]\");\n }",
"public Object getValueAt(final int rowArg, final int colArg)\n {\n int column = colArg + 1;\n int row = rowArg;\n \n if (resultSet == null) return null;\n\n try\n {\n row++;\n\n if (row == 1)\n {\n if (!resultSet.first())\n {\n log.error(\"Error doing resultSet.first\");\n return null;\n }\n currentRow = 1;\n } else\n {\n if (currentRow+1 == row)\n {\n if (!resultSet.next())\n {\n log.error(\"Error doing resultSet.next\");\n return null;\n }\n currentRow++;\n } else\n {\n if (!resultSet.absolute(row))\n {\n log.error(\"Error doing resultSet.absolute(\"+row+\")\");\n return null;\n }\n currentRow = row;\n }\n }\n return resultSet.getObject(column);\n\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(\"getValueAt\", ex);\n }\n\n return null;\n }",
"@Override\n public final HasCell<T, ?> getColumn(Context context, T rowValue, Element elem) {\n return getColumn(elem);\n }",
"@Override\n public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(aRow, aColumn); \n }",
"public Object getValueAt(int row, int col) throws Exception{\r\n Object obj = null;\r\n if(data!= null){\r\n\tobj = ((Vector) data.elementAt(row)).elementAt(col);\r\n }\r\n return obj;\r\n }",
"@Override\r\n\tpublic Object getColumnValue(int column) {\n\t\tswitch (column) {\r\n\t\tcase ID_COLUMN_ORDER:\r\n\t\t\treturn id;\r\n\t\tcase NOMBRE_COLUMN_ORDER:\r\n\t\t\treturn nombre;\r\n\t\tcase DESCRIPCION_COLUMN_ORDER:\r\n\t\t\treturn descripcion;\r\n\t\tcase POLIGONO_COLUMN_ORDER:\r\n\t\t\treturn poligono;\r\n\t\tcase ESTADO_COLUMN_ORDER:\r\n\t\t\treturn estado;\r\n\t\tcase URBANA_COLUMN_ORDER:\r\n\t\t\treturn urbana;\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"Column getCol();"
] | [
"0.6545124",
"0.6360243",
"0.62612563",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5984809",
"0.5950703",
"0.5929683",
"0.5881344",
"0.5843093",
"0.58345294",
"0.5827662",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5778146",
"0.5772224",
"0.5708342",
"0.56862515",
"0.5656194",
"0.56110024",
"0.55674636",
"0.55659604",
"0.5553293",
"0.55468386",
"0.55429137",
"0.5533286",
"0.5520939",
"0.55094135",
"0.5495464",
"0.5471339",
"0.54275364",
"0.5426831",
"0.54250675",
"0.5422174",
"0.54175717",
"0.54041",
"0.5391679",
"0.53875566",
"0.53850734",
"0.5374585",
"0.53695154",
"0.53560436",
"0.5346162",
"0.5343514",
"0.5339248",
"0.5333853",
"0.53265345",
"0.5316585",
"0.5316585",
"0.5315965",
"0.5315965",
"0.5314621",
"0.53071547",
"0.53021765",
"0.5297938",
"0.5293374",
"0.5275571",
"0.52731484",
"0.5255922",
"0.52344906",
"0.5230721",
"0.523061",
"0.52277505",
"0.5218381",
"0.5215599",
"0.5199102",
"0.5191734",
"0.518533",
"0.51801395",
"0.5169624",
"0.51602477",
"0.51427424",
"0.51399183",
"0.5136724",
"0.5126213",
"0.5123509",
"0.5114029",
"0.509297",
"0.5081329",
"0.507903"
] | 0.57473844 | 36 |
Query values of a column. | public <T> List<T> queryColumn(String columnName, String sql) throws SQLException {
return queryColumn(columnName, sql, (Object[])null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getValue(String column, int row);",
"public T col(final String column) {\r\n\t\treturn op(ConditionValueType.COLUMN, column);\r\n\t}",
"private Collection getColumn(QueryResultIF queryResult, int column) {\n Collection retVal = new ArrayList();\n\n while (queryResult.next()) {\n retVal.add(queryResult.getValue(column));\n }\n\n return retVal;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"public String getValue() {\n return this.column;\n }",
"Object getDataValue(String column, int row);",
"@Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);",
"public Object getValueAt(int row, int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn expressions.get(row);\n\t\tcase 1:\n\t\t\treturn values.get(row);\n\t\t}\n\t\treturn \"\";\n\t}",
"List<Column> getQueryColumns();",
"protected String getByColumn(boolean all, String table_name, String column_name, String name)\n\t{\n\t\tStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString result = \"\";\n\t\tif(!table_name.equals(\"\"))\n\t\t{\n\t\t\t// initializing the query statement\n\t\t\ttry {statement = connection.createStatement();} \n\t\t\tcatch (SQLException e) {}\n\t\t\t\n\t\t\t\t\t\n\t\t\t// executing query to database\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tif(all) // Check if we need to get all the data on this column\n\t\t\t\t{\n\t\t\t\t\trs = statement.executeQuery(\"SELECT \" + column_name + \" FROM \" + table_name + \"\");\n\t\t\t\t\twhile(rs.next()) result = rs.getString(column_name);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trs = statement.executeQuery(\"SELECT \" + column_name + \" FROM \" + table_name + \" WHERE name = \\\"\" + name + \"\\\"\");\n\t\t\t\t\twhile(rs.next()) result = rs.getString(column_name); // Putting the data in result variable to be return\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {e.printStackTrace();}\n\t\t}\n\n\t\treturn result;\n\t}",
"Object getColumnValue(int colIndex);",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public String value() {\n return this.column;\n }",
"public Object getValueAt(int row, int column) {\n\t\tString[] rowValues = this.records.get(row);\n return rowValues[column];\n\t}",
"public <T> List<T> queryColumn(String columnName, String sql, Object... params) throws SQLException {\n logger.debug(\"SQL= \\n\" + sql);\n // Print the parameters to the logger.\n printParams(params);\n ResultSetHandler<List<T>> h = new ColumnListHandler<T>(columnName);\n return qr.query(conn, sql, h, params);\n }",
"@NonNull\n Collection<TObj> getColumnItems(int column) {\n Collection<TObj> result = new LinkedList<>();\n for (int count = mData.size(), i = 0; i < count; i++) {\n int key = mData.keyAt(i);\n TObj columnObj = mData.get(key).get(column);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }",
"public void visitColumn(double val);",
"public int getValue(int row, int column);",
"protected Object getCellValue(int row, String column) {\r\n\r\n\t\t// translate\r\n\t\tif(NAME.equals(column))\r\n\t\t{\r\n\t\t\tIUnitIf unit = getId(row);\r\n\t\t\tString name = MsoUtils.getUnitName(getId(row), true);\t\t\t\r\n\t\t\treturn unit.isChanged()?name.concat(\"*\"):name;\r\n\t\t}\r\n\t\telse if(VIEW.equals(column))\r\n\t\t\treturn getId(row);\r\n\r\n\t\t// not supported\r\n\t\treturn null;\r\n\r\n\t}",
"public boolean getValor(int fila, int col) {\n\t\treturn matriz.getValor(fila, col);\n\t}",
"@Override\r\n\tpublic boolean evaluate(Object value, int column) throws SQLException {\n\t\treturn false;\r\n\t}",
"java.lang.String getColumn();",
"public Object getValueAt(int row, int column){\n return dataEntries[row][column];\n }",
"public Object getValueAt(int row, int column)\n {\n return getModel().getDataAt(row, convertColumnIndexToModel(column));\n }",
"public ContactListFilterPredicate column(String column) {\n this.column = column;\n return this;\n }",
"public List<CharSequence> allValues(String column) {\n\t\tList<CharSequence> list = new LinkedList<CharSequence>();\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.query(TABLE_PUBKEYS, new String[] { \"_id\", column },\n\t\t\t\tnull, null, null, null, \"_id ASC\");\n\n\t\tif (c != null) {\n\t\t\tint COL = c.getColumnIndexOrThrow(column);\n\n\t\t\twhile (c.moveToNext())\n\t\t\t\tlist.add(c.getString(COL));\n\n\t\t\tc.close();\n\t\t}\n\n\t\tdb.close();\n\n\t\treturn list;\n\t}",
"private String stringValue(String columnName) {\r\n String value = null;\r\n try {\r\n if ((rowSet != null) && selectContactInRowSet()) {\r\n value = rowSet.getString(columnName);\r\n }\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n return value;\r\n }",
"private ResultSet queryDatabaseForDataRow(Connection m_dbconn, String col) \n\t{\n\t\tResultSet rs = null;\n\t\tString selectStmt = \"SELECT * FROM RELATE_W_CH WHERE Ch_Name=\\\"\" + col + \"\\\"\";\n\n\t\ttry\n\t\t{\n\t\t\tStatement stmt = m_dbconn.createStatement();\n\n\t\t\trs = stmt.executeQuery(selectStmt);\n\t\t\trs.next();\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn rs;\n\t}",
"public ArrayList<Object> retrieveData(String column) {\n ArrayList<Object> dataLst = new ArrayList<Object>(this.rowCount);\r\n\r\n int colType = getColumnType(column);\r\n\r\n //Number can be measure alone?\r\n if (isNumberColumn(colType)) {\r\n for (Object data : retrieveNumericData(column)) {\r\n dataLst.add(data);\r\n }\r\n } else if (isTextColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueString(i, column));\r\n }\r\n } else if (isDateColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueDate(i, column));\r\n }\r\n }\r\n\r\n// // long endTime = System.currentTimeMillis();\r\n// \r\n return dataLst;\r\n }",
"public Object getValueAt(int row, int col) {\n\t\tList rowList = data.get(row);\n\t\tObject result = null;\n\t\tif (col<rowList.size()) {\n\t\t\tresult = rowList.get(col);\n\t\t}\n\t\t\n\t\t// _apparently_ it's ok to return null for a \"blank\" cell\n\t\treturn(result);\n\t}",
"public Object getValue(String member) {\n\t\treturn jdbc.getValue(member); \n\t}",
"Integer calculate(String columnValue);",
"public List<DomainObject> getListByKeyandValue(String colname, Object value) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.eq(colname, value));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"@Override\r\n\tpublic boolean evaluate(Object value, String columnName)\r\n\t\t\tthrows SQLException {\n\t\treturn false;\r\n\t}",
"public Object getValueAt( int row, int column ) \r\n throws IllegalStateException\r\n {\r\n if ( !connectedToDatabase ) \r\n throw new IllegalStateException( \"Not Connected to Database\" );\r\n try \r\n {\r\n resultSet.absolute( row + 1 );\r\n return resultSet.getObject( column + 1 );\r\n }\r\n catch ( SQLException sqlException ) \r\n {\r\n sqlException.printStackTrace();\r\n }\r\n \r\n return \"\";\r\n }",
"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 }",
"public Object getValueAt(int row, int column) {\r\n if (_debugTable == null) {\r\n return \"\" ;\r\n }\r\n try {\r\n Object o = _debugTable.getTableCell(row, column) ;\r\n return (o != null) ? o : \"\" ;\r\n } catch (Exception e) {\r\n return \"\" ;\r\n }\r\n }",
"public String getStringColumn(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n String name = canonicalize(column);\n \n if (isColumnNull(name))\n return null;\n \n Object value = data.get(name);\n \n if (value == null)\n throw new IllegalArgumentException(\"Column \" + column + \" not present\");\n if (!(value instanceof String))\n throw new IllegalArgumentException(\"Value is not an string\");\n \n return (String) value;\n }",
"public Column getColumn(String columnName);",
"@Override\n public Object getValueAt(int row, int column) {\n return this.data[row][column];\n }",
"long findValues(List<Object> values, List<Column> columns);",
"public Object getValueAt(int row, int column) {\n Preso cli = lista.get(row);\n /*if (column == Id) {\n return cli.getId();\n } else*/ if (column == Nome) {\n return cli.getNome();\n } if (column == Tempo) {\n return cli.getTempo();\n } else\n\n return \"\"; //Nunca deve ocorrer \n }",
"public Object getValueAt(int row, int column) {\n switch(column) {\n case SECURITY_NAME_COLUMN: return allSecurities.get(row).security;\n case CURRENT_PRICE_COLUMN: return allSecurities.get(row).currentPrice;\n case NEW_PRICE_COLUMN: return allSecurities.get(row).newPrice;\n default: return \"?\";\n }\n }",
"private static boolean isColumn(String table, String column) throws SQLException {\n\t\tConnection con = Connect_db();\r\n\t\tPreparedStatement pstat = con.prepareStatement(table);\r\n\t\tResultSet rs = pstat.executeQuery();\r\n\t\ttry {\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tif (rs.getString(\"Field\").equals(column)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t// TODO: handle finally clause\r\n\t\t\tcon.close();\r\n\t\t}\r\n\t}",
"public static List<String> getQuery(Connection con, String query, String ColName) throws SQLException {\n\t\t\tString columnName=null;\n\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\n\t\ttry(Statement st = con.createStatement();\n\t\t\tResultSet\trs = st.executeQuery(query);) {\n\t\t\t\n\t\t\t\n\t\t\t/*ResultSetMetaData metaData = rs.getMetaData();\n\t\t\tcolumnName = metaData.getColumnName(1);\n\t\t\tSystem.out.println(columnName); */\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tString actual = rs.getString(ColName);\n\t\t\t\tlist.add(actual);\n\t\t }\n\t\t\t\n\t\t} catch (Exception exception) {\n\t\t\tSystem.out.println(\"Failed to fetch query result\");\n\t\t\tSystem.out.println(exception);\n\t\t\tthrow exception;\n\t\t}\n\n\t\treturn list;\n\t}",
"public Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"public Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"@Override\n\tpublic Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"@Override\n\tpublic Object getValueAt(int row, int col) {\n\t\treturn data[row][col];\n\t}",
"public double getValueCurrentRow(final int column) {\r\n return getLogicalValueAt(currentRow, column);\r\n }",
"public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }",
"public List<?> queryBySingleCriteria(String field, String value)\n throws DataAccessLayerException {\n return queryBySingleCriteria(field, value, \"=\");\n }",
"String getColumn();",
"public void addFilterEqual(String column, Object value) {\n controlRelationAndAddToList(criterionList, Restrictions.eq(trimColumn(column), value), column);\n }",
"public Object getValueAt(int row, int col) {\n return data[row][col];\n }",
"Object getDataValue(final int row, final int column);",
"public Object getResult(ResultSet rs, String columnName) throws SQLException;",
"public Object getValueAt(int row, int col)\r\n\t{\r\n\t\treturn cellData[row][col];\r\n\t}",
"public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(indexes[aRow], aColumn);\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 }",
"private void select(String tableName, String colName, String value,\n boolean usePar) {\n String query;\n \n if (usePar == true){\n // Parenthesis will surrond the value making it a string\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \\'\" + value + \"\\'\";\n }\n else{\n // Parenthesis will not surround the value\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \" + value;\n }\n \n this.executeSelect(query);\n }",
"@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}",
"@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}",
"public Object getValueAt(int row, int col) {\n return data[row][col];\n }",
"public Object getValueAt(int aRow, int aColumn) \n {\n if (rowCount >= aRow && colCount >= aColumn)\n return (rowData[aRow][aColumn]); \n else\n return(null);\n }",
"public boolean getBooleanColumn(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n String name = canonicalize(column);\n \n if (isColumnNull(name))\n return false;\n \n Object value = data.get(name);\n \n if (value == null)\n throw new IllegalArgumentException(\"Column \" + column + \" not present\");\n if (!(value instanceof Boolean))\n throw new IllegalArgumentException(\"Value is not a boolean\");\n \n return ((Boolean) value).booleanValue();\n }",
"public Object getValue(int aRow, int aColumn, String type) throws RowOutOfRangeException, ColumnOutOfRangeException {\n if (aRow < 0 || aRow >= rowCount) {\n throw new RowOutOfRangeException(aRow, rowCount);\n }\n if (aColumn < 0 || aColumn >= columnCount) {\n throw new ColumnOutOfRangeException(aColumn, columnCount);\n }\n \n if (aRow >= m_fetchedRowCount)\n {\n //System.out.println(\"NOT FETCHED: col = \" + aColumn + \", row = \" + aRow);\n return new WaitData(\"waiting for data...\");\n }\n \n return cellData[aRow][aColumn];\n }",
"public Object getValueAt(int row, int col)\n\t{\n\t\t// invalid row\n\t\tif (row < 0 || row >= m_data.rows.size())\n\t\t\treturn null;\n\t//\t\tthrow new java.lang.IllegalArgumentException(\"Row invalid\");\n\t\tif (col < 0 || col >= m_data.cols.size())\n\t\t\treturn null;\n\t//\t\tthrow new java.lang.IllegalArgumentException(\"Column invalid\");\n\t\t//\n\t\tArrayList<Object> myRow = (ArrayList<Object>)m_data.rows.get(row);\n\t\t// invalid column\n\t\tif (myRow == null || col >= myRow.size())\n\t\t\treturn null;\n\t\t// setValue\n\t\treturn myRow.get(col);\n\t}",
"Value evaluateCellAt(int col, int row);",
"public List<OfflineDataCachedIds> getData(String column, String value) {\n List<OfflineDataCachedIds> olDatas = new LinkedList<OfflineDataCachedIds>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.query(TABLE_NAME_CACHEDIDS, COLUMNS, \" \" + column\n + \" = ?\", new String[] { value }, null, null, null, null);\n if (cursor != null) {\n OfflineDataCachedIds olData = null;\n if (cursor.moveToFirst()) {\n do {\n olData = new OfflineDataCachedIds();\n // getString(0) is the id inside the db\n olData.setStored(Integer.parseInt(cursor.getString(1)));\n olData.setEcardID(cursor.getString(2));\n olData.setWhereMet(cursor.getString(3));\n olData.setEventMet(cursor.getString(4));\n olData.setNotes(cursor.getString(5));\n olData.setVoiceNote(cursor.getString(6));\n olDatas.add(olData);\n } while (cursor.moveToNext());\n }\n }\n Log.d(\"getData(\" + column + \" = \" + value + \") \", olDatas.toString());\n return olDatas;\n }",
"public ArrayList<String> selectCommand(String query, String[] wantedColumn){\n String record = null;\n ArrayList<String> records=new ArrayList<>( );\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(query)){\n // loop through the result set\n while (rs.next()) {\n record=\"\";\n for (int i = 0; i <wantedColumn.length ; i++) {\n record+=rs.getString( wantedColumn[i] ) + \"\\t\";\n }\n records.add(record);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return records;\n }",
"@Test void testInterpretProjectFilterValues() {\n final String sql = \"select y, x\\n\"\n + \"from (values (1, 'a'), (2, 'b'), (3, 'c')) as t(x, y)\\n\"\n + \"where x > 1\";\n sql(sql).returnsRows(\"[b, 2]\", \"[c, 3]\");\n }",
"public Object getValueAt(final int rowArg, final int colArg)\n {\n int column = colArg + 1;\n int row = rowArg;\n \n if (resultSet == null) return null;\n\n try\n {\n row++;\n\n if (row == 1)\n {\n if (!resultSet.first())\n {\n log.error(\"Error doing resultSet.first\");\n return null;\n }\n currentRow = 1;\n } else\n {\n if (currentRow+1 == row)\n {\n if (!resultSet.next())\n {\n log.error(\"Error doing resultSet.next\");\n return null;\n }\n currentRow++;\n } else\n {\n if (!resultSet.absolute(row))\n {\n log.error(\"Error doing resultSet.absolute(\"+row+\")\");\n return null;\n }\n currentRow = row;\n }\n }\n return resultSet.getObject(column);\n\n } catch (SQLException ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrSQLUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(\"getValueAt\", ex);\n }\n\n return null;\n }",
"@Override\n public final HasCell<T, ?> getColumn(Context context, T rowValue, Element elem) {\n return getColumn(elem);\n }",
"@Override\n public Object getValueAt(int aRow, int aColumn) {\n return model.getValueAt(aRow, aColumn); \n }",
"public Object getValueAt(int row, int col) throws Exception{\r\n Object obj = null;\r\n if(data!= null){\r\n\tobj = ((Vector) data.elementAt(row)).elementAt(col);\r\n }\r\n return obj;\r\n }",
"@Override\r\n\tpublic Object getColumnValue(int column) {\n\t\tswitch (column) {\r\n\t\tcase ID_COLUMN_ORDER:\r\n\t\t\treturn id;\r\n\t\tcase NOMBRE_COLUMN_ORDER:\r\n\t\t\treturn nombre;\r\n\t\tcase DESCRIPCION_COLUMN_ORDER:\r\n\t\t\treturn descripcion;\r\n\t\tcase POLIGONO_COLUMN_ORDER:\r\n\t\t\treturn poligono;\r\n\t\tcase ESTADO_COLUMN_ORDER:\r\n\t\t\treturn estado;\r\n\t\tcase URBANA_COLUMN_ORDER:\r\n\t\t\treturn urbana;\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"Column getCol();"
] | [
"0.6544181",
"0.63583827",
"0.6259412",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.598331",
"0.59494424",
"0.5927636",
"0.5879404",
"0.5843624",
"0.5834241",
"0.58253425",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.5776324",
"0.57707155",
"0.5748292",
"0.57069284",
"0.56840086",
"0.5654847",
"0.56087816",
"0.55670464",
"0.5564515",
"0.5552117",
"0.5544845",
"0.5541165",
"0.55321306",
"0.5519641",
"0.5507066",
"0.5496335",
"0.54702485",
"0.5426374",
"0.5425492",
"0.5423151",
"0.542176",
"0.54159313",
"0.5402838",
"0.53862226",
"0.53839666",
"0.53733057",
"0.53689295",
"0.5353851",
"0.5345292",
"0.53418833",
"0.5337252",
"0.5333595",
"0.5327404",
"0.5314796",
"0.5314796",
"0.5313954",
"0.5313954",
"0.5313015",
"0.53054255",
"0.5302778",
"0.52968544",
"0.5292789",
"0.527372",
"0.5271716",
"0.5254878",
"0.523278",
"0.52290326",
"0.522899",
"0.5228363",
"0.52177596",
"0.5213287",
"0.5197276",
"0.5190608",
"0.5184511",
"0.51791656",
"0.5168634",
"0.5159505",
"0.5141986",
"0.5140078",
"0.51366854",
"0.5125981",
"0.5122422",
"0.5112473",
"0.5091573",
"0.5078586",
"0.507845"
] | 0.5392021 | 57 |
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. | public int[] batch(String sql, Object[][] params) throws SQLException {
logger.debug("SQL= \n" + sql);
// Print the parameters to the logger.
for (Object[] params1 : params) {
printParams(params1);
}
return qr.batch(conn, sql, params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }",
"public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement = connection.createStatement();\n\n String into = \"\";\n\n //connection.setAutoCommit(false);\n for (String s : sql) {\n if (s.trim().equals((\"\")) || s.trim().startsWith(\"/*\")) {\n continue;\n }\n into += s;\n\n if (s.endsWith(\";\")) {\n statement.addBatch(into);\n into = \"\";\n }\n }\n\n statement.executeBatch();\n\n statement.close();\n\n //connection.commit();\n }\n }",
"public int[] batch(String[] sqls) throws SQLException {\n Statement st = null;\n try {\n st = conn.createStatement();\n for (String sql : sqls) {\n logger.debug(\"SQL= \\n\" + sql);\n st.addBatch(sql);\n }\n return st.executeBatch();\n } catch (SQLException e) {\n throw e;\n } finally {\n if (st != null) {\n st.close();\n }\n }\n }",
"@Override\n\tpublic boolean batchUpdate(String[] SQLs) throws RemoteException {\n\t\treturn DAManager.batchUpdate(SQLs);\n\t}",
"@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n }\n }",
"void runQueries();",
"@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 static void main(String[] args) {\n\t\t\n\t\tint[] executeBatch = null;\n\t\ttry {\n\t\t\tConnection conn = ConnectionUtility.getConnectionFromDB();\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.addBatch(\"insert into emp_data values(12,'testuser2',50000,'03-MAR-00')\");\n\t\t\t\n\t\t\tstmt.addBatch(\"update emp_data set sal=70000 where emp_id=1\");\n\t\t\tstmt.addBatch(\"delete from emp_data where emp_id=11\");\n\t\t\texecuteBatch = stmt.executeBatch();\n\t\t\t\n\t\t\tfor (int i = 0; i < executeBatch.length; i++) {\n\t\t\t\tSystem.out.println(executeBatch[i]);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tfor (int i = 0; i < executeBatch.length; i++) {\n\t\t\t\tSystem.out.println(executeBatch[i]);\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void commitBatch() {\n try {\n currBatchSize = batchSize;\n batchPreparedStmt.executeBatch();\n connection.commit();\n batchPreparedStmt.clearParameters();\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n }\n }",
"@Override\r\n\tpublic void execute() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].execute();\r\n\t\t}\r\n\t}",
"public void multipleQueriesASync(List<IndexQuery> queries, String strategy, APIClientListener listener) {\n TaskParams.Client params = new TaskParams.Client(listener, APIMethod.MultipleQueries, queries, strategy);\n new ASyncClientTask().execute(params);\n }",
"void addBatch() throws SQLException;",
"public static void executeRequests(List<BulkOperation> requests) {\n\t\tif (requests == null || requests.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (asyncEnabled()) {\n\t\t\t\tgetAsyncRESTClient().bulk(b -> b.operations(requests).\n\t\t\t\t\t\trefresh(flushImmediately() ? Refresh.True : Refresh.False)).thenAccept(b -> {\n\t\t\t\t\tif (b.errors()) {\n\t\t\t\t\t\tb.items().stream().filter(i -> i.status() != 200).forEach(item -> {\n\t\t\t\t\t\t\t//FUTURE: Increment counter metric for failed document indexing\n\t\t\t\t\t\t\tlogger.error(\"Failed to execute async {} operation for index '{}', document id '{}': {}\",\n\t\t\t\t\t\t\t\t\titem.operationType(), item.index(), item.id(), item.error().reason());\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tBulkResponse res = getRESTClient().bulk(b -> b.operations(requests).\n\t\t\t\t\t\trefresh(flushImmediately() ? Refresh.True : Refresh.False));\n\t\t\t\tif (res.errors()) {\n\t\t\t\t\tres.items().stream().filter(i -> i.status() != 200).forEach(item -> {\n\t\t\t\t\t\t//FUTURE: Increment counter metric for failed document indexing\n\t\t\t\t\t\tlogger.error(\"Failed to execute sync {} operation for index '{}', document id '{}': {}\",\n\t\t\t\t\t\t\t\titem.operationType(), item.index(), item.id(), item.error().reason());\n\t\t\t\t\t});\n\t\t\t\t\thandleFailedRequests();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(null, e);\n\t\t}\n\t}",
"@Override\n public RespResult<List<SqlExecRespDto>> batchExecuteUpdate(String username, List<SqlExecReqDto> updates) {\n return null;\n }",
"public void multipleQueriesASync(List<IndexQuery> queries, APIClientListener listener) {\n TaskParams.Client params = new TaskParams.Client(listener, APIMethod.MultipleQueries, queries, \"none\");\n new ASyncClientTask().execute(params);\n }",
"public void testBatchUpdate() {\n template.getJdbcOperations().batchUpdate(new String[]{websource.method2()});\n\n //Test SimpleJdbcOperations execute\n template.getJdbcOperations().execute(websource.method2());\n }",
"public static void batchUpdateRun(Vector<ExperimentResult> v) throws SQLException {\n boolean autoCommit = DatabaseConnector.getInstance().getConn().getAutoCommit();\n try {\n DatabaseConnector.getInstance().getConn().setAutoCommit(false);\n final String query = \"UPDATE \" + table + \" SET run=? WHERE idJob=?\";\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(query);\n curSt = st;\n for (ExperimentResult r : v) {\n st.setInt(1, r.getRun());\n st.setInt(2, r.getId());\n st.addBatch();\n r.setSaved();\n /* this should only be done if the batch update actually\n * gets commited, right now this might not be the case\n * if there's an DB exception or the executeBatch() is\n * cancelled (see cancelStatement()).\n * Without caching this might not be a problem.\n */\n }\n st.executeBatch();\n st.close();\n } catch (SQLException e) {\n DatabaseConnector.getInstance().getConn().rollback();\n throw e;\n } finally {\n curSt = null;\n DatabaseConnector.getInstance().getConn().setAutoCommit(autoCommit);\n }\n }",
"public void execute() throws SQLException {\n\t\tif (this.ds == null) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\"Please pass a DataSource to the ListSqlHelper!\");\n\t\t}\n\t\t\n\t\texecuteCountSql();\n\t\texecuteItemRangeSql();\n\t}",
"public void addBatch(String sql) throws SQLException {\n\r\n }",
"public ResultSet executeSQLQuery(String command, List<Object> values) {\n ResultSet rs = null;\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for (Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n\n rs = stmt.executeQuery();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return rs;\n }",
"void addToBatch(String[] values) {\n if (values.length != 16) {\n logger.info(\"Incorrect format for insert query\");\n return;\n }\n\n try {\n batchPreparedStmt.clearParameters();\n DateFormat format = new SimpleDateFormat(\"yyyyMMdd/HHmm\");\n for (int i = 0, j = 1; i < values.length; ++i, ++j) {\n if (i == 1) {\n batchPreparedStmt.setTimestamp(j, new java.sql.Timestamp(format.parse(values[i]).getTime()));\n } else if (i == 0) {\n batchPreparedStmt.setString(j, values[i]);\n } else {\n batchPreparedStmt.setDouble(j, Double.parseDouble(values[i]));\n }\n }\n batchPreparedStmt.addBatch();\n currBatchSize--;\n if (currBatchSize <= 0) {\n this.commitBatch();\n }\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n } catch (ParseException e) {\n logger.log(Level.WARNING, \"ParseException \", e.getMessage());\n }\n }",
"public void dbActions(String SQL){\n\t\ttry {\n\t\t\tstmt.executeUpdate(SQL);\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}",
"private <T, Q extends Query> void executeInsertBatch(Collection<T> objectsToInsert, Function<? super T, ? extends Q> mapFunction) {\n\t\tList<Q> insertStatements = objectsToInsert.stream().map(mapFunction).collect(Collectors.toList());\n\t\tdslContext.batch(insertStatements).execute();\n\t}",
"public int[] executeBatch() throws SQLException {\n return null;\r\n }",
"public static void main(String[] args) {\n System.out.println(\"-- Batch Example Songs. Data rows from CSV --\");\n System.out.println(\"----> PreparedStatement !!\");\n MysqlConnect my = MysqlConnect.getDbCon();\n\n System.out.println(\"\\nUsing executeUpdate\");\n batchInsertRecordsIntoTable(my, false);\n\n System.out.println(\"\\nUsing addBatch - executeBatch\");\n batchInsertRecordsIntoTable(my, true);\n\n try {\n my.conn.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"public int[] batch(String sql, Object[][] params) throws SQLException {\n\t\tConnection conn = this.prepareConnection();\n\n\t\treturn this.batch(conn, true, sql, params);\n\t}",
"private void batchExecution(List<String[]> rowBatch, int columnCount, int[] mapcols, String chunkId, int noOfChunks,\n int maxRetryCount, int retryTimeout) throws SQLException {\n int k = 0; //retry count\n boolean retry = false;\n int rowBatchSize = rowBatch.size();\n do {\n k++;\n try {\n if (connection == null || connection.isClosed()) {\n getJdbcConnection(maxRetryCount, retryTimeout);\n }\n if (preparedStatement == null || preparedStatement.isClosed()) {\n preparedStatement = connection.prepareStatement(jdbcConfig.getJdbcQuery(),\n ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n }\n for (int i = 0; i < rowBatchSize; i++) {\n psLineEndWithSeparator(mapcols, columnCount, rowBatch.get(i));\n preparedStatement.addBatch();\n }\n // ++batch_no;\n executeBatch(rowBatchSize, maxRetryCount, retryTimeout);\n batch_records = 0;\n k = 0;\n retry = false;\n datarowstransferred = datarowstransferred + update;\n update = 0;\n not_update = 0;\n } catch (AnaplanRetryableException ae) {\n retry = true;\n }\n } while (k < maxRetryCount && retry);\n // not successful\n if (retry) {\n throw new AnaplanAPIException(\"Could not connect to the database after \" + maxRetryCount + \" retries\");\n }\n }",
"public void run(Statement state) throws SQLException {\n\n System.out.println(\"INFO: -= Inserting data via dummy table ...\");\n state.execute(multipleRowInsertDummySQL);\n System.out.println(\"INFO: -= The data are inserted via dummy table:\");\n selectAllFromTable(state, tableName, 10);\n\n System.out.println(\"INFO: -= Inserting data using INSERT INTO statement ...\");\n state.execute(multipleRowInsertIntoSQL);\n System.out.println(\"INFO: -= The data are inserted via INSERT INTO statement:\");\n selectAllFromTable(state, tableName, 20);\n }",
"private static void doDMLQuery(String query, Connection connection, Object[] parameters)\r\n throws SQLException {\r\n PreparedStatement ps = null;\r\n\r\n try {\r\n ps = connection.prepareStatement(query);\r\n\r\n for (int i = 0; i < parameters.length; i++) {\r\n if (parameters[i] instanceof Timestamp) {\r\n ps.setTimestamp(i + 1, (Timestamp) parameters[i]);\r\n } else if (parameters[i] instanceof Long) {\r\n ps.setLong(i + 1, (Long) parameters[i]);\r\n } else if (parameters[i] instanceof Boolean) {\r\n ps.setBoolean(i + 1, (Boolean) parameters[i]);\r\n } else {\r\n ps.setObject(i + 1, parameters[i]);\r\n }\r\n }\r\n\r\n ps.executeUpdate();\r\n } finally {\r\n closeStatement(ps);\r\n }\r\n }",
"public boolean executeSQLUpdate(String command, List<Object> values) {\n boolean success = false;\n\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for(Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n \n stmt.executeUpdate();\n\n success = true;\n } catch (SQLException e) {\n e.printStackTrace();\n success = false;\n }\n\n return success;\n }",
"protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}",
"public void exe(Connection conn,String sql,List<OrderDetails> detailList)throws Exception{\r\n\t\t//insert into ORDER_DETAIL(ORDER_ID,PRODUCT_ID,QUANTITY) values(?,?,?);\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\r\n\t\tfor(int i=0;i<detailList.size();i++){\r\n\t\t\tOrderDetails od=detailList.get(i);\r\n\t\t\tpstmt.setInt(1, od.getOrderId());\r\n\t\t\tpstmt.setInt(2, od.getProductId());\r\n\t\t\tpstmt.setInt(3, od.getQuantity());\r\n\t\t\t\r\n\t\t\tpstmt.addBatch();\r\n\t\t}\r\n\t\tpstmt.executeBatch();\r\n\t}",
"private void executeQuery() {\n }",
"public List<Object[]> executeSql(String sql,Object... objs) {\n\t\tQuery query=getEm().createNativeQuery(sql);\r\n\t\tfor(int i=0;i<objs.length;i++){\r\n\t\t\tquery.setParameter(i+1, objs[i]);\r\n\t\t}\r\n\t\treturn query.getResultList();\r\n\t}",
"public void execute(\n Connection connection,\n SQLTemplate query,\n OperationObserver observer)\n throws SQLException, Exception {\n\n SQLTemplateProcessor templateProcessor = new SQLTemplateProcessor();\n String template = query.getTemplate(adapter.getClass().getName());\n\n boolean loggable = QueryLogger.isLoggable(query.getLoggingLevel());\n int size = query.parametersSize();\n\n // zero size indicates a one-shot query with no parameters\n // so fake a single entry batch...\n int[] counts = new int[size > 0 ? size : 1];\n Iterator it =\n (size > 0)\n ? query.parametersIterator()\n : IteratorUtils.singletonIterator(Collections.EMPTY_MAP);\n for (int i = 0; i < counts.length; i++) {\n Map nextParameters = (Map) it.next();\n\n SQLStatement compiled =\n templateProcessor.processTemplate(template, nextParameters);\n\n if (loggable) {\n QueryLogger.logQuery(\n query.getLoggingLevel(),\n compiled.getSql(),\n Arrays.asList(compiled.getBindings()));\n }\n\n // TODO: we may cache prep statements for this loop, using merged string as a key\n // since it is very likely that it will be the same for multiple parameter sets...\n PreparedStatement statement = connection.prepareStatement(compiled.getSql());\n try {\n bind(statement, compiled.getBindings());\n counts[i] = statement.executeUpdate();\n QueryLogger.logUpdateCount(query.getLoggingLevel(), counts[i]);\n }\n finally {\n statement.close();\n }\n }\n\n observer.nextBatchCount(query, counts);\n }",
"@Override\n public void addBatch( String sql ) throws SQLException {\n throw new SQLException(\"tinySQL does not support addBatch.\");\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else continue;\n\t\t\t}\n\t\t}\n\t}",
"private void uploadBatchTable(InsertAllRequest insertAllRequest) {\n final Stopwatch stopwatch = stopwatchProvider.get();\n final ImmutableMultimap.Builder<TableId, InsertAllResponse> responseMapBuilder =\n ImmutableMultimap.builder();\n final StringBuilder performanceStringBuilder = new StringBuilder();\n issueInsertAllRequest(\n stopwatch, responseMapBuilder, performanceStringBuilder, insertAllRequest);\n log.info(performanceStringBuilder.toString());\n // Check response and abort the process if any error happens. In this case, verify_snapshot\n // won't have the 'successful' record, hence we know that is a \"bad\" dataset.\n checkResponse(responseMapBuilder.build());\n }",
"public void execute() {\n\t\tfor (Command command : commands) {\n\t\t\tcommand.execute();\n\t\t}\n\t}",
"public void exec(String sql) {\r\n try (Statement stmt = connection.createStatement()) {\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n throw new DbException(connectionString + \"\\nError executing \" + sql, e);\r\n }\r\n }",
"void bulkInsertOrReplace (List<Consumption> entities);",
"protected int insert(String[] statements) {\n\t\tint retValue = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\n\t\t\tfor (String statement : statements) {\n\t\t\t\tSQLQuery query = session.createSQLQuery(statement);\n\t\t\t\tretValue += query.executeUpdate();\n\t\t\t}\n\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute insert\");\n\t\t}\n\t\treturn retValue;\n\t}",
"public abstract byte[][] appExecuteBatch(byte[][] commands, MessageContext[] msgCtxs, boolean fromConsensus);",
"@Test\n public void testBatchMerge() throws Exception {\n final int BATCH_SIZE = 7;\n try (Connection con = GridCacheDynamicLoadOnClientTest.connect(GridCacheDynamicLoadOnClientTest.clientNode);Statement stmt = con.createStatement()) {\n for (int idx = 0, i = 0; i < BATCH_SIZE; ++i , idx += i) {\n stmt.addBatch((((((((((((\"merge into \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (_key, name, orgId) values (\") + (100 + idx)) + \",\") + \"'\") + \"batch-\") + idx) + \"'\") + \",\") + idx) + \")\"));\n }\n int[] updCnts = stmt.executeBatch();\n assertEquals(\"Invalid update counts size\", BATCH_SIZE, updCnts.length);\n }\n }",
"@SuppressWarnings(\"resource\")\n @Explain(\"We close the statement later, this is just an intermediate\")\n protected void addBatch() throws SQLException {\n prepareStmt().addBatch();\n batchBacklog++;\n if (batchBacklog > batchBacklogLimit) {\n commit();\n }\n }",
"private void batchImport() {\r\n m_jdbcTemplate.batchUpdate(createInsertQuery(),\r\n new BatchPreparedStatementSetter() {\r\n public void setValues(\r\n PreparedStatement ps, int i)\r\n throws SQLException {\r\n int j = 1;\r\n for (String property : m_propertyNames) {\r\n Map params = (Map) m_batch.get(\r\n i);\r\n ps.setObject(j++, params.get(\r\n property));\r\n }\r\n }\r\n\r\n public int getBatchSize() {\r\n return m_batch.size();\r\n }\r\n });\r\n }",
"private void executeRequest(String sql) {\n\t}",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"public void start() {\n \n for (Object obj: bufferedQueries) {\n \n switch(obj.getClass().getName()) {\n case \"uzh.tomdb.db.operations.Insert\":\n if (inserts == null) {\n inserts = new ArrayList<>();\n }\n inserts.add((Insert) obj);\n break;\n case \"uzh.tomdb.db.operations.CreateTable\":\n if (creates == null) {\n creates = new ArrayList<>();\n }\n creates.add((CreateTable) obj);\n break;\n case \"uzh.tomdb.db.operations.Update\":\n if (updates == null) {\n updates = new ArrayList<>();\n }\n updates.add((Update) obj);\n break;\n case \"uzh.tomdb.db.operations.Delete\":\n if (deletes == null) {\n deletes = new ArrayList<>();\n }\n deletes.add((Delete) obj);\n break;\n }\n }\n \n if (inserts != null) {\n inserts();\n }\n if (creates != null) {\n creates();\n }\n if (updates != null) {\n updates();\n }\n if (deletes != null) {\n deletes();\n }\n }",
"public abstract ResultList executeQuery(DatabaseQuery query);",
"public void executePendingTransactions()\n\t{\n\t\twhile(!transactionQueue.isEmpty())\n\t\t\ttransactionQueue.poll().doTransaction();\n\t}",
"protected void zBatchUpdateForSameSourceAttribute(List<UpdateOperation> updateOperations, BatchUpdateOperation batchUpdateOperation)\r\n {\r\n UpdateOperation firstOperation = updateOperations.get(0);\r\n MithraDataObject firstData = this.getDataForUpdate(firstOperation);\r\n Object source = this.getSourceAttributeValueFromObjectGeneric(firstData);\r\n DatabaseType databaseType = this.getDatabaseTypeGenericSource(source);\r\n\r\n if (databaseType.getUpdateViaInsertAndJoinThreshold() > 0 &&\r\n databaseType.getUpdateViaInsertAndJoinThreshold() < updateOperations.size() &&\r\n this.getFinder().getVersionAttribute() == null &&\r\n !batchUpdateOperation.isIncrement() &&\r\n batchUpdateOperation.isEligibleForUpdateViaJoin())\r\n {\r\n zBatchUpdateViaInsertAndJoin(updateOperations, source, databaseType);\r\n return;\r\n }\r\n if (this.hasOptimisticLocking())\r\n {\r\n if (this.getMithraObjectPortal().getTxParticipationMode().isOptimisticLocking() && !databaseType.canCombineOptimisticWithBatchUpdates())\r\n {\r\n //we'll do single updates\r\n for(int i=0;i<updateOperations.size();i++)\r\n {\r\n UpdateOperation updateOperation = updateOperations.get(i);\r\n zUpdate(updateOperation.getMithraObject(), updateOperation.getUpdates());\r\n }\r\n\r\n return;\r\n }\r\n }\r\n\r\n List firstUpdateWrappers = firstOperation.getUpdates();\r\n StringBuilder builder = new StringBuilder(30 + firstUpdateWrappers.size() * 12);\r\n builder.append(\"update \");\r\n builder.append(this.getFullyQualifiedTableNameGenericSource(source)).append(\" set \");\r\n for (int i = 0; i < firstUpdateWrappers.size(); i++)\r\n {\r\n AttributeUpdateWrapper wrapper = (AttributeUpdateWrapper) firstUpdateWrappers.get(i);\r\n if (i > 0)\r\n {\r\n builder.append(\", \");\r\n }\r\n builder.append(wrapper.getSetAttributeSql());\r\n }\r\n\r\n builder.append(this.getSqlWhereClauseForBatchUpdateForSameSourceAttribute(firstData));\r\n String sql = builder.toString();\r\n Connection con = null;\r\n PreparedStatement stm = null;\r\n\r\n try\r\n {\r\n con = this.getConnectionForWriteGenericSource(source);\r\n TimeZone databaseTimeZone = this.getDatabaseTimeZoneGenericSource(source);\r\n\r\n if (this.getSqlLogger().isDebugEnabled())\r\n {\r\n this.logWithSource(this.getSqlLogger(), source, \"batch update of \" + updateOperations.size() + \" objects with: \" + sql);\r\n }\r\n PrintablePreparedStatement pps = null;\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps = new PrintablePreparedStatement(sql);\r\n }\r\n stm = con.prepareStatement(sql);\r\n int batchSize = databaseType.getMaxPreparedStatementBatchCount(firstOperation.getUpdates().size() +\r\n this.getMithraObjectPortal().getFinder().getPrimaryKeyAttributes().length);\r\n if (batchSize < 0)\r\n {\r\n batchSize = updateOperations.size();\r\n }\r\n\r\n int objectsInBatch = 0;\r\n int batchStart = 0;\r\n for (int u = 0; u < updateOperations.size(); u++)\r\n {\r\n UpdateOperation operation = updateOperations.get(u);\r\n MithraDataObject data = this.getDataForUpdate(operation);\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps.clearParameters();\r\n int pos = operation.setSqlParameters(pps, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(pps, pos, data, databaseTimeZone, databaseType);\r\n this.logWithSource(this.getBatchSqlLogger(), source, \"batch updating with: \" + pps.getPrintableStatement());\r\n }\r\n int pos = operation.setSqlParameters(stm, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(stm, pos, data, databaseTimeZone, databaseType);\r\n operation.setUpdated();\r\n stm.addBatch();\r\n objectsInBatch++;\r\n\r\n if (objectsInBatch == batchSize)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n objectsInBatch = 0;\r\n batchStart = u + 1;\r\n }\r\n }\r\n if (objectsInBatch > 0)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n }\r\n stm.close();\r\n stm = null;\r\n\r\n String dbid = this.getDatabaseIdentifierGenericSource(source);\r\n getNotificationEventManager().addMithraNotificationEventForBatchUpdate(dbid, this.getFullyQualifiedFinderClassName(), MithraNotificationEvent.UPDATE, updateOperations, firstUpdateWrappers, source);\r\n }\r\n catch (SQLException e)\r\n {\r\n this.analyzeAndWrapSqlExceptionGenericSource(\"batch update failed \" + e.getMessage(), e, source, con);\r\n }\r\n finally\r\n {\r\n this.closeStatementAndConnection(con, stm);\r\n }\r\n\r\n }",
"@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}",
"private int executeUpdateInternal(List<Object> values) {\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"The following parameters are used for update \" + getUpdateString() + \" with: \" + values);\r\n\t\t}\r\n\t\tint updateCount = jdbcTemplate.update(updateString, values.toArray(), columnTypes);\r\n\t\treturn updateCount;\r\n\t}",
"public void addBatch() throws SQLException {\n statement.addBatch();\n }",
"public int[] batch(Connection conn, String sql, Object[][] params) throws SQLException {\n\t\treturn this.batch(conn, false, sql, params);\n\t}",
"void insertBatch(List<Customer> customers);",
"@Override\n public RespResult<Integer> batchExecuteUpdateNoBlocking(String username, String system, List<SqlExecReqDto> updates) {\n return RespResult.buildSuccessWithData(0);\n }",
"@Test\n public void testDeleteSeveral() throws Exception {\n int theTaskId = 440;\n String query = String.format(\"select * from %s.%s where taskId like '%s'\",\n tableSchema.schemaName, TASK_TABLE_NAME, \"4%\");\n\n TestConnection connection = methodWatcher.getOrCreateConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement ps;\n int rows;\n int total = 10;\n for (int i=0; i<total; i++) {\n // insert good data\n ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, Integer.toString(theTaskId + i));\n ps.setInt(2, 100+i);\n ps.setInt(3, 0600+i);\n ps.setInt(4, 0700+i);\n rows = ps.executeUpdate();\n Assert.assertEquals(1, rows);\n }\n connection.commit();\n\n ResultSet rs = connection.createStatement().executeQuery(query);\n Assert.assertEquals(10, SpliceUnitTest.resultSetSize(rs));\n connection.commit();\n\n ps = methodWatcher.prepareStatement(\n String.format(\"delete from %s.%s where taskId like ?\", tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"4%\");\n rows = ps.executeUpdate();\n Assert.assertEquals(10, rows);\n connection.commit();\n\n rs = connection.createStatement().executeQuery(query);\n Assert.assertFalse(\"No rows expected.\", rs.next());\n connection.commit();\n }",
"public void run() {\n String query = \"INSERT INTO CustomData (Server, Plugin, ColumnID, DataPoint, Updated) VALUES\";\n int currentSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // Iterate through each column\n for (Map.Entry<Column, Integer> entry : customData.entrySet()) {\n Column column = entry.getKey();\n int value = entry.getValue();\n\n // append the query\n query += \" (\" + server.getId() + \", \" + plugin.getId() + \", \" + column.getId() + \", \" + value + \", \" + currentSeconds + \"),\";\n }\n\n // Remove the last comma\n query = query.substring(0, query.length() - 1);\n\n // add the duplicate key entry\n query += \" ON DUPLICATE KEY UPDATE DataPoint = VALUES(DataPoint) , Updated = VALUES(Updated)\";\n\n // queue the query\n new RawQuery(mcstats, query).save();\n }",
"public List<Integer> updateMultiline(String script, Object... params) {\n String[] statements = script.split(\";\");\n List<Integer> list = new ArrayList<>();\n for (String s : statements) {\n if (s.isEmpty()) continue;\n s = s.trim();\n try {\n PreparedStatement statement = connection.prepareStatement(s);\n Queries.setValues(statement, params);\n list.add(statement.executeUpdate());\n } catch (SQLException ex) {\n Logger.getLogger(SQLDataConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return list;\n }",
"DBCursor execute();",
"private int[] batch(Connection conn, boolean closeConn, String sql, Object[][] params) throws SQLException {\n\t\tif (conn == null) {\n\t\t\tthrow new SQLException(\"Null connection\");\n\t\t}\n\n\t\tif (sql == null) {\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t\tthrow new SQLException(\"Null SQL statement\");\n\t\t}\n\n\t\tif (params == null) {\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t\tthrow new SQLException(\"Null parameters. If parameters aren't need, pass an empty array.\");\n\t\t}\n\n\t\tPreparedStatement stmt = null;\n\t\tint[] rows = null;\n\t\tList<Integer> rowList = Lists.newArrayList();\n\t\ttry {\n\t\t\tstmt = this.prepareStatement(conn, sql);\n\t\t\tint batchSize = DBManager.getBatchSize();\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < params.length; i++) {\n\t\t\t\tthis.fillStatement(stmt, params[i]);\n\t\t\t\tstmt.addBatch();\n\t\t\t\tif (++count % batchSize == 0) {\n\t\t\t\t\trows = stmt.executeBatch();\n\t\t\t\t\tfor (int ri = 0; ri < rows.length; ri++) {\n\t\t\t\t\t\trowList.add(rows[ri]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trows = stmt.executeBatch();\n\t\t\tfor (int ri = 0; ri < rows.length; ri++) {\n\t\t\t\trowList.add(rows[ri]);\n\t\t\t}\n\t\t\tif (rowList.size() > 0) {\n\t\t\t\trows = new int[rowList.size()];\n\t\t\t\tfor (int rli = 0; rli < rowList.size(); rli++) {\n\t\t\t\t\trows[rli] = rowList.get(rowList.get(rli));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthis.rethrow(e, sql, (Object[]) params);\n\t\t} finally {\n\t\t\tclose(stmt);\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t}\n\n\t\treturn rows;\n\t}",
"@Override\n\tpublic void execute() {\n\t\tfor(int i=0;i<coms.length;i++)\n\t\t\tcoms[i].execute();\n\t}",
"public void execute() {\n execute0();\n }",
"public void execSql(String sql) {\n\t\tjdbcTemplate.execute(sql);\n\t}",
"public void logBatch(String sql, int repeatTimes, long nanoTime) ;",
"public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}",
"void insertBatch(List<TABLE41> recordLst);",
"public void addBatch(String sql) throws SQLException {\n currentPreparedStatement.addBatch(sql);\n }",
"public void executeSql(String sql, boolean doCommit, int fetchSize, int fetchDirn) throws SQLException {\n\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute null or empty SQL.\");\n\n LOGGER.info(\"DB : Executing the SQL : {}\", sql);\n\n Statement stmt = connection.createStatement();\n stmt.setFetchDirection(fetchDirn);\n stmt.setFetchSize(fetchSize);\n stmt.executeUpdate(sql);\n stmt.close();\n\n if (doCommit) {\n LOGGER.info(\"DB : Committing the changes.\");\n connection.commit();\n }\n }",
"protected boolean transaction(Connection connection, String[] commandsBatch, int expectedModificationCount)\n\t\t\tthrows DAOException {\n\t\tStatement statement;\n\t\tint affectedRows;\n\t\tint batchResults[];\n\n\t\t// Creating statement and adding batch of commantds to it.\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\n\t\t\tfor (String batch : commandsBatch)\n\t\t\t\tstatement.addBatch(batch);\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\n\t\t// main transaction logic\n\t\ttry {\n\t\t\t// executing operation.\n\t\t\tbatchResults = statement.executeBatch();\n\n\t\t\t// zero out rows value\n\t\t\taffectedRows = 0;\n\n\t\t\t// counting affected rows;\n\t\t\tfor (int operationResult : batchResults) {\n\t\t\t\tif (operationResult > 0)\n\t\t\t\t\taffectedRows += operationResult;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * if affected rows is necessary value, and its value doesn't match\n\t\t\t * to expected - throw exception.\n\t\t\t */\n\t\t\tif (expectedModificationCount != -1 && affectedRows != expectedModificationCount) {\n\t\t\t\tthrow new SQLException();\n\t\t\t}\n\n\t\t\t// in case of successful operation - commit.\n\t\t\tconnection.commit();\n\n\t\t\t// at last - close statement and exit loop.\n\t\t\tstatement.close();\n\t\t\treturn true;\n\t\t} catch (SQLException ignore) {\n\n\t\t\t// if operation failed - try to rollback.\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException cause) {\n\t\t\t\tthrow new DAOException(cause);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public JSObject execSQL(String[] statements) {\n // Open the database for writing\n // Log.d(TAG, \"*** in execSQL: \");\n JSObject retObj = new JSObject();\n SQLiteDatabase db = null;\n try {\n db = getConnection(false, secret);\n retObj = execute(db, statements);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: execSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: execSQL failed: \" + e);\n return retObj;\n } finally {\n if (db != null) db.close();\n }\n }",
"public JSObject execSQL(String[] statements) {\n // Open the database for writing\n // Log.d(TAG, \"*** in execSQL: \");\n JSObject retObj = new JSObject();\n SQLiteDatabase db = null;\n try {\n db = getConnection(false, secret);\n retObj = execute(db, statements);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: execSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: execSQL failed: \" + e);\n return retObj;\n } finally {\n if (db != null) db.close();\n }\n }",
"private void persistEntities(List<Entity> entities) {\n jdbcTemplate.batchUpdate(\n \"insert into entity (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n\n jdbcTemplate.batchUpdate(\n \"insert into entity_history (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n }",
"public int[] batchUpdate(DalHints hints, List<Person> daoPojos) throws SQLException {\n\t\tif(null == daoPojos || daoPojos.size() <= 0)\n\t\t\treturn new int[0];\n\t\thints = DalHints.createIfAbsent(hints);\n\t\treturn client.batchUpdate(hints, daoPojos);\n\t}",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }",
"public void addBatch() throws SQLException {\n currentPreparedStatement.addBatch();\n }",
"public void runScript(String sqlScript) throws DataAccessLayerException {\n Session session = null;\n Transaction trans = null;\n Connection conn = null;\n\n Statement stmt = null;\n try {\n session = getSession(true);\n trans = session.beginTransaction();\n conn = session.connection();\n stmt = conn.createStatement();\n } catch (SQLException e) {\n throw new DataAccessLayerException(\n \"Unable to create JDBC statement\", e);\n }\n boolean success = true;\n String[] scriptContents = sqlScript.split(\";\");\n for (String line : scriptContents) {\n if (!line.isEmpty()) {\n try {\n stmt.addBatch(line + \";\");\n\n } catch (SQLException e1) {\n logger.warn(\"Script execution failed. Rolling back transaction\");\n trans.rollback();\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e2) {\n logger.error(\"Cannot close database connection!!\", e2);\n }\n if (session.isOpen()) {\n session.close();\n }\n throw new DataAccessLayerException(\n \"Cannot execute SQL statement: \" + line, e1);\n }\n }\n }\n try {\n stmt.executeBatch();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Error executing script.\", e1);\n }\n\n try {\n stmt.close();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Unable to close JDBC statement!\", e1);\n }\n\n if (success) {\n trans.commit();\n }\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e) {\n logger.error(\"Cannot close database connection!!\", e);\n }\n if (session.isOpen()) {\n session.close();\n }\n }",
"private void processTaskList(List<Task> taskList) throws SQLException, DaoException {\n for (Task currentTask : taskList) {\n processTask(currentTask);\n }\n }",
"public abstract void execute(List<Object> list);",
"public void execute (String query) throws java.sql.SQLException {\n try {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query + \"\\\")\");\n \n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n dbConnection.setAutoCommit(false);\n statement.executeUpdate(query);\n dbConnection.commit();\n dbConnection.setAutoCommit(true);\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n throw e;\n }\n }",
"public JSObject execute(SQLiteDatabase db, String[] statements) throws Exception {\n JSObject retObj = new JSObject();\n try {\n for (String cmd : statements) {\n if (!cmd.endsWith(\";\")) cmd += \";\";\n db.execSQL(cmd);\n }\n retObj.put(\"changes\", dbChanges(db));\n return retObj;\n } catch (Exception e) {\n throw new Exception(\"Execute failed\");\n } finally {\n if (db != null) db.close();\n }\n }",
"public JSObject runSQL(String statement, JSArray values) {\n JSObject retObj = new JSObject();\n // Open the database for writing\n SQLiteDatabase db = null;\n long lastId = Long.valueOf(-1);\n if (statement.length() > 6) {\n try {\n db = getConnection(false, secret);\n db.beginTransaction();\n lastId = prepareSQL(db, statement, values);\n if (lastId != -1) db.setTransactionSuccessful();\n retObj.put(\"changes\", dbChanges(db));\n retObj.put(\"lastId\", lastId);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: runSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL failed: \" + e);\n return retObj;\n } finally {\n db.endTransaction();\n if (db != null) db.close();\n }\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL statement not given\");\n return retObj;\n }\n }",
"public JSObject execute(SQLiteDatabase db, String[] statements) throws Exception {\n JSObject retObj = new JSObject();\n try {\n for (String cmd : statements) {\n if (!cmd.endsWith(\";\")) cmd += \";\";\n db.execSQL(cmd);\n }\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n return retObj;\n } catch (Exception e) {\n throw new Exception(\"Execute failed\");\n }\n }",
"public JSObject runSQL(String statement, JSArray values) {\n JSObject retObj = new JSObject();\n // Open the database for writing\n SQLiteDatabase db = null;\n long lastId = Long.valueOf(-1);\n if (statement.length() > 6) {\n try {\n db = getConnection(false, secret);\n db.beginTransaction();\n lastId = prepareSQL(db, statement, values);\n if (lastId != -1) db.setTransactionSuccessful();\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n retObj.put(\"lastId\", lastId);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: runSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL failed: \" + e);\n return retObj;\n } finally {\n db.endTransaction();\n if (db != null) db.close();\n }\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL statement not given\");\n return retObj;\n }\n }",
"@Override\r\n\tpublic void batchPersist(final List<?> entityList) {\n\t\tif (CollectionUtils.isEmpty(entityList)) {\r\n\t\t\tlogger.debug(\"Persist list is empty, no entity has been persisted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.getJpaTemplate().execute(new JpaCallback<Object>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object doInJpa(EntityManager em) throws PersistenceException {\r\n\t\t\t\tint max = entityList.size();\r\n\t\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\t\tem.persist(entityList.get(i));\r\n\t\t\t\t\tif ((i != 0 && i % DEFAULT_BATCH_SIZE == 0) || i == max - 1) {\r\n\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tlogger.debug(\"{} entities has been persisted.\", max);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}",
"private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}",
"void execute(Context context) throws SQLException;",
"public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }",
"InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows) throws BigQueryException {\n return bigquery.insertAll(InsertAllRequest.of(info.tableId(), rows));\n }",
"public void runBatch();",
"@Override\r\n\tpublic void batchDelete(String[] ids) {\n\t\tfor(int i=0;i<ids.length;i++)\r\n\t\t\tdelete(ids[i]);\t\r\n\t}",
"public static int insertAll(Connection connection, List<CLRequestHistory> cls) {\n PreparedStatement statement = null;\n\n try {\n // commit at once.\n final boolean ac = connection.getAutoCommit();\n connection.setAutoCommit(false);\n\n // execute statement one by one\n int numUpdate = 0;\n statement = connection.prepareStatement(INSERT);\n for (CLRequestHistory cl : cls) {\n statement.setInt(1, cl.mCL);\n statement.setInt(2, cl.mState);\n numUpdate += statement.executeUpdate();\n }\n\n // commit all changes above\n connection.commit();\n\n // restore previous AutoCommit setting\n connection.setAutoCommit(ac);\n\n // Close Statement to release all resources\n statement.close();\n return numUpdate;\n } catch (SQLException e) {\n Utils.say(\"Not able to insert for CLs : \" + cls.size());\n } finally {\n try {\n if (statement != null)\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return 0;\n }",
"public JSObject executeSet(SQLiteDatabase db, JSArray set) throws Exception {\n long lastId = Long.valueOf(-1);\n int changes = 0;\n JSObject retObj = new JSObject();\n for (int i = 0; i < set.length(); i++) {\n JSONObject row = set.getJSONObject(i);\n String statement = row.getString(\"statement\");\n JSONArray valuesJson = row.getJSONArray(\"values\");\n JSArray values = new JSArray();\n for (int j = 0; j < valuesJson.length(); j++) {\n values.put(valuesJson.get(j));\n }\n lastId = prepareSQL(db, statement, values);\n if (lastId == -1) {\n Log.v(TAG, \"*** breaking lastId -1\");\n break;\n } else {\n changes += 1;\n }\n }\n if (lastId != -1) {\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n retObj.put(\"lastId\", lastId);\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"lastId\", lastId);\n }\n return retObj;\n }",
"@Insert({\"<script>\",\n \"INSERT INTO ${tableName}\",\n \" <trim prefix='(' suffix=')' suffixOverrides=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' separator=','>\",\n \" <if test='value != null'>${colKey}</if>\",\n \" </foreach>\",\n \" </trim>\",\n \"VALUES\",\n \" <foreach collection='records' item='record' separator=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' open='(' separator=',' close=')'>\",\n \" <foreach collection='record' index='dataKey' item='dataValue' separator=','>\",\n \" <if test='value != null and colKey == dataKey'>#{dataValue}</if>\",\n \" </foreach>\",\n \" </foreach>\",\n \" </foreach>\",\n \"ON DUPLICATE KEY UPDATE\",\n \" <trim suffixOverrides=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' separator=','>\",\n \" <if test='value != null'>${colKey} = values(${colKey})</if>\",\n \" </foreach>\",\n \" </trim>\",\n \"</script>\"})\n int batchInsertOrUpdateSelective(@Param(\"tableName\") String tableName, @Param(\"records\") List<Map> records);",
"@Override\n public int[] doInCallableStatement(CallableStatement callableStatement) throws SQLException, DataAccessException {\n callableStatement.addBatch();\n\n while (params.hasNext()) {\n batchFactory.addParameter(callableStatement, params.next());\n callableStatement.addBatch();\n }\n return callableStatement.executeBatch();\n }",
"@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = monthlyTradingPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}"
] | [
"0.6829201",
"0.67995924",
"0.6562746",
"0.653758",
"0.6421389",
"0.61735845",
"0.61422724",
"0.61376405",
"0.6118946",
"0.6102745",
"0.6080274",
"0.60673916",
"0.60618436",
"0.6045459",
"0.5974389",
"0.59507215",
"0.5905923",
"0.58973795",
"0.5874647",
"0.5874014",
"0.58576024",
"0.5851211",
"0.5849487",
"0.58078516",
"0.5792013",
"0.5772908",
"0.57713604",
"0.5747462",
"0.5716921",
"0.5709052",
"0.5637995",
"0.5610102",
"0.560253",
"0.5591524",
"0.55681497",
"0.5562068",
"0.5559545",
"0.55571336",
"0.5554762",
"0.55450577",
"0.55359006",
"0.5499436",
"0.5499292",
"0.5492979",
"0.5491766",
"0.54901075",
"0.54894894",
"0.5479432",
"0.5460809",
"0.5453009",
"0.5442454",
"0.54401374",
"0.54251695",
"0.54235286",
"0.54005516",
"0.5385768",
"0.5383864",
"0.53833675",
"0.53819656",
"0.5355855",
"0.53341895",
"0.533311",
"0.53282523",
"0.53248143",
"0.5324039",
"0.5319043",
"0.53165305",
"0.53131884",
"0.5307054",
"0.52783906",
"0.52665",
"0.52521956",
"0.5251865",
"0.5251865",
"0.52305144",
"0.5229369",
"0.5226641",
"0.520794",
"0.51942587",
"0.51933074",
"0.5190627",
"0.51853913",
"0.51832086",
"0.51812047",
"0.51804286",
"0.5178501",
"0.5171273",
"0.51556075",
"0.5138578",
"0.5134561",
"0.512512",
"0.5124071",
"0.5114231",
"0.5103646",
"0.5097263",
"0.5094308",
"0.5093405",
"0.5089242",
"0.5088713",
"0.508496"
] | 0.5584696 | 34 |
Execute a batch of SQL INSERT, UPDATE, or DELETE queries. | public int[] batch(String[] sqls) throws SQLException {
Statement st = null;
try {
st = conn.createStatement();
for (String sql : sqls) {
logger.debug("SQL= \n" + sql);
st.addBatch(sql);
}
return st.executeBatch();
} catch (SQLException e) {
throw e;
} finally {
if (st != null) {
st.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }",
"public void executeTransaction(List<String> sql) throws SQLException {\n try (Connection connection = getConnection()) {\n\n Statement statement = connection.createStatement();\n\n String into = \"\";\n\n //connection.setAutoCommit(false);\n for (String s : sql) {\n if (s.trim().equals((\"\")) || s.trim().startsWith(\"/*\")) {\n continue;\n }\n into += s;\n\n if (s.endsWith(\";\")) {\n statement.addBatch(into);\n into = \"\";\n }\n }\n\n statement.executeBatch();\n\n statement.close();\n\n //connection.commit();\n }\n }",
"@Override\n\tpublic boolean batchUpdate(String[] SQLs) throws RemoteException {\n\t\treturn DAManager.batchUpdate(SQLs);\n\t}",
"@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n }\n }",
"void runQueries();",
"@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 static void main(String[] args) {\n\t\t\n\t\tint[] executeBatch = null;\n\t\ttry {\n\t\t\tConnection conn = ConnectionUtility.getConnectionFromDB();\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.addBatch(\"insert into emp_data values(12,'testuser2',50000,'03-MAR-00')\");\n\t\t\t\n\t\t\tstmt.addBatch(\"update emp_data set sal=70000 where emp_id=1\");\n\t\t\tstmt.addBatch(\"delete from emp_data where emp_id=11\");\n\t\t\texecuteBatch = stmt.executeBatch();\n\t\t\t\n\t\t\tfor (int i = 0; i < executeBatch.length; i++) {\n\t\t\t\tSystem.out.println(executeBatch[i]);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tfor (int i = 0; i < executeBatch.length; i++) {\n\t\t\t\tSystem.out.println(executeBatch[i]);\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void commitBatch() {\n try {\n currBatchSize = batchSize;\n batchPreparedStmt.executeBatch();\n connection.commit();\n batchPreparedStmt.clearParameters();\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n }\n }",
"@Override\r\n\tpublic void execute() {\n\t\tfor (int i = 0; i < command.length; i++) {\r\n\t\t\tcommand[i].execute();\r\n\t\t}\r\n\t}",
"public void multipleQueriesASync(List<IndexQuery> queries, String strategy, APIClientListener listener) {\n TaskParams.Client params = new TaskParams.Client(listener, APIMethod.MultipleQueries, queries, strategy);\n new ASyncClientTask().execute(params);\n }",
"void addBatch() throws SQLException;",
"public static void executeRequests(List<BulkOperation> requests) {\n\t\tif (requests == null || requests.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (asyncEnabled()) {\n\t\t\t\tgetAsyncRESTClient().bulk(b -> b.operations(requests).\n\t\t\t\t\t\trefresh(flushImmediately() ? Refresh.True : Refresh.False)).thenAccept(b -> {\n\t\t\t\t\tif (b.errors()) {\n\t\t\t\t\t\tb.items().stream().filter(i -> i.status() != 200).forEach(item -> {\n\t\t\t\t\t\t\t//FUTURE: Increment counter metric for failed document indexing\n\t\t\t\t\t\t\tlogger.error(\"Failed to execute async {} operation for index '{}', document id '{}': {}\",\n\t\t\t\t\t\t\t\t\titem.operationType(), item.index(), item.id(), item.error().reason());\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tBulkResponse res = getRESTClient().bulk(b -> b.operations(requests).\n\t\t\t\t\t\trefresh(flushImmediately() ? Refresh.True : Refresh.False));\n\t\t\t\tif (res.errors()) {\n\t\t\t\t\tres.items().stream().filter(i -> i.status() != 200).forEach(item -> {\n\t\t\t\t\t\t//FUTURE: Increment counter metric for failed document indexing\n\t\t\t\t\t\tlogger.error(\"Failed to execute sync {} operation for index '{}', document id '{}': {}\",\n\t\t\t\t\t\t\t\titem.operationType(), item.index(), item.id(), item.error().reason());\n\t\t\t\t\t});\n\t\t\t\t\thandleFailedRequests();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(null, e);\n\t\t}\n\t}",
"@Override\n public RespResult<List<SqlExecRespDto>> batchExecuteUpdate(String username, List<SqlExecReqDto> updates) {\n return null;\n }",
"public void multipleQueriesASync(List<IndexQuery> queries, APIClientListener listener) {\n TaskParams.Client params = new TaskParams.Client(listener, APIMethod.MultipleQueries, queries, \"none\");\n new ASyncClientTask().execute(params);\n }",
"public void testBatchUpdate() {\n template.getJdbcOperations().batchUpdate(new String[]{websource.method2()});\n\n //Test SimpleJdbcOperations execute\n template.getJdbcOperations().execute(websource.method2());\n }",
"public static void batchUpdateRun(Vector<ExperimentResult> v) throws SQLException {\n boolean autoCommit = DatabaseConnector.getInstance().getConn().getAutoCommit();\n try {\n DatabaseConnector.getInstance().getConn().setAutoCommit(false);\n final String query = \"UPDATE \" + table + \" SET run=? WHERE idJob=?\";\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(query);\n curSt = st;\n for (ExperimentResult r : v) {\n st.setInt(1, r.getRun());\n st.setInt(2, r.getId());\n st.addBatch();\n r.setSaved();\n /* this should only be done if the batch update actually\n * gets commited, right now this might not be the case\n * if there's an DB exception or the executeBatch() is\n * cancelled (see cancelStatement()).\n * Without caching this might not be a problem.\n */\n }\n st.executeBatch();\n st.close();\n } catch (SQLException e) {\n DatabaseConnector.getInstance().getConn().rollback();\n throw e;\n } finally {\n curSt = null;\n DatabaseConnector.getInstance().getConn().setAutoCommit(autoCommit);\n }\n }",
"public void execute() throws SQLException {\n\t\tif (this.ds == null) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\"Please pass a DataSource to the ListSqlHelper!\");\n\t\t}\n\t\t\n\t\texecuteCountSql();\n\t\texecuteItemRangeSql();\n\t}",
"public void addBatch(String sql) throws SQLException {\n\r\n }",
"public ResultSet executeSQLQuery(String command, List<Object> values) {\n ResultSet rs = null;\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for (Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n\n rs = stmt.executeQuery();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return rs;\n }",
"void addToBatch(String[] values) {\n if (values.length != 16) {\n logger.info(\"Incorrect format for insert query\");\n return;\n }\n\n try {\n batchPreparedStmt.clearParameters();\n DateFormat format = new SimpleDateFormat(\"yyyyMMdd/HHmm\");\n for (int i = 0, j = 1; i < values.length; ++i, ++j) {\n if (i == 1) {\n batchPreparedStmt.setTimestamp(j, new java.sql.Timestamp(format.parse(values[i]).getTime()));\n } else if (i == 0) {\n batchPreparedStmt.setString(j, values[i]);\n } else {\n batchPreparedStmt.setDouble(j, Double.parseDouble(values[i]));\n }\n }\n batchPreparedStmt.addBatch();\n currBatchSize--;\n if (currBatchSize <= 0) {\n this.commitBatch();\n }\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n } catch (ParseException e) {\n logger.log(Level.WARNING, \"ParseException \", e.getMessage());\n }\n }",
"private <T, Q extends Query> void executeInsertBatch(Collection<T> objectsToInsert, Function<? super T, ? extends Q> mapFunction) {\n\t\tList<Q> insertStatements = objectsToInsert.stream().map(mapFunction).collect(Collectors.toList());\n\t\tdslContext.batch(insertStatements).execute();\n\t}",
"public void dbActions(String SQL){\n\t\ttry {\n\t\t\tstmt.executeUpdate(SQL);\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}",
"public int[] executeBatch() throws SQLException {\n return null;\r\n }",
"public static void main(String[] args) {\n System.out.println(\"-- Batch Example Songs. Data rows from CSV --\");\n System.out.println(\"----> PreparedStatement !!\");\n MysqlConnect my = MysqlConnect.getDbCon();\n\n System.out.println(\"\\nUsing executeUpdate\");\n batchInsertRecordsIntoTable(my, false);\n\n System.out.println(\"\\nUsing addBatch - executeBatch\");\n batchInsertRecordsIntoTable(my, true);\n\n try {\n my.conn.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n }",
"public int[] batch(String sql, Object[][] params) throws SQLException {\n\t\tConnection conn = this.prepareConnection();\n\n\t\treturn this.batch(conn, true, sql, params);\n\t}",
"private void batchExecution(List<String[]> rowBatch, int columnCount, int[] mapcols, String chunkId, int noOfChunks,\n int maxRetryCount, int retryTimeout) throws SQLException {\n int k = 0; //retry count\n boolean retry = false;\n int rowBatchSize = rowBatch.size();\n do {\n k++;\n try {\n if (connection == null || connection.isClosed()) {\n getJdbcConnection(maxRetryCount, retryTimeout);\n }\n if (preparedStatement == null || preparedStatement.isClosed()) {\n preparedStatement = connection.prepareStatement(jdbcConfig.getJdbcQuery(),\n ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);\n }\n for (int i = 0; i < rowBatchSize; i++) {\n psLineEndWithSeparator(mapcols, columnCount, rowBatch.get(i));\n preparedStatement.addBatch();\n }\n // ++batch_no;\n executeBatch(rowBatchSize, maxRetryCount, retryTimeout);\n batch_records = 0;\n k = 0;\n retry = false;\n datarowstransferred = datarowstransferred + update;\n update = 0;\n not_update = 0;\n } catch (AnaplanRetryableException ae) {\n retry = true;\n }\n } while (k < maxRetryCount && retry);\n // not successful\n if (retry) {\n throw new AnaplanAPIException(\"Could not connect to the database after \" + maxRetryCount + \" retries\");\n }\n }",
"public void run(Statement state) throws SQLException {\n\n System.out.println(\"INFO: -= Inserting data via dummy table ...\");\n state.execute(multipleRowInsertDummySQL);\n System.out.println(\"INFO: -= The data are inserted via dummy table:\");\n selectAllFromTable(state, tableName, 10);\n\n System.out.println(\"INFO: -= Inserting data using INSERT INTO statement ...\");\n state.execute(multipleRowInsertIntoSQL);\n System.out.println(\"INFO: -= The data are inserted via INSERT INTO statement:\");\n selectAllFromTable(state, tableName, 20);\n }",
"private static void doDMLQuery(String query, Connection connection, Object[] parameters)\r\n throws SQLException {\r\n PreparedStatement ps = null;\r\n\r\n try {\r\n ps = connection.prepareStatement(query);\r\n\r\n for (int i = 0; i < parameters.length; i++) {\r\n if (parameters[i] instanceof Timestamp) {\r\n ps.setTimestamp(i + 1, (Timestamp) parameters[i]);\r\n } else if (parameters[i] instanceof Long) {\r\n ps.setLong(i + 1, (Long) parameters[i]);\r\n } else if (parameters[i] instanceof Boolean) {\r\n ps.setBoolean(i + 1, (Boolean) parameters[i]);\r\n } else {\r\n ps.setObject(i + 1, parameters[i]);\r\n }\r\n }\r\n\r\n ps.executeUpdate();\r\n } finally {\r\n closeStatement(ps);\r\n }\r\n }",
"public boolean executeSQLUpdate(String command, List<Object> values) {\n boolean success = false;\n\n try {\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + server + \":\" + port + \"/\" + database, user, pass);\n PreparedStatement stmt = conn.prepareStatement(command);\n\n int i = 1;\n for(Object value : values) {\n stmt.setObject(i, value);\n i++;\n }\n \n stmt.executeUpdate();\n\n success = true;\n } catch (SQLException e) {\n e.printStackTrace();\n success = false;\n }\n\n return success;\n }",
"protected void execSQL(String sql) throws Exception {\n\t\tPreparedStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(sql);\n\t\t\tstatement.execute();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tPersistenceUtils.closeStatement(statement);\n\t\t}\n\n\t}",
"public void exe(Connection conn,String sql,List<OrderDetails> detailList)throws Exception{\r\n\t\t//insert into ORDER_DETAIL(ORDER_ID,PRODUCT_ID,QUANTITY) values(?,?,?);\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\r\n\t\tfor(int i=0;i<detailList.size();i++){\r\n\t\t\tOrderDetails od=detailList.get(i);\r\n\t\t\tpstmt.setInt(1, od.getOrderId());\r\n\t\t\tpstmt.setInt(2, od.getProductId());\r\n\t\t\tpstmt.setInt(3, od.getQuantity());\r\n\t\t\t\r\n\t\t\tpstmt.addBatch();\r\n\t\t}\r\n\t\tpstmt.executeBatch();\r\n\t}",
"private void executeQuery() {\n }",
"public List<Object[]> executeSql(String sql,Object... objs) {\n\t\tQuery query=getEm().createNativeQuery(sql);\r\n\t\tfor(int i=0;i<objs.length;i++){\r\n\t\t\tquery.setParameter(i+1, objs[i]);\r\n\t\t}\r\n\t\treturn query.getResultList();\r\n\t}",
"public int[] batch(String sql, Object[][] params) throws SQLException {\n logger.debug(\"SQL= \\n\" + sql);\n // Print the parameters to the logger.\n for (Object[] params1 : params) {\n printParams(params1);\n }\n return qr.batch(conn, sql, params);\n }",
"public void execute(\n Connection connection,\n SQLTemplate query,\n OperationObserver observer)\n throws SQLException, Exception {\n\n SQLTemplateProcessor templateProcessor = new SQLTemplateProcessor();\n String template = query.getTemplate(adapter.getClass().getName());\n\n boolean loggable = QueryLogger.isLoggable(query.getLoggingLevel());\n int size = query.parametersSize();\n\n // zero size indicates a one-shot query with no parameters\n // so fake a single entry batch...\n int[] counts = new int[size > 0 ? size : 1];\n Iterator it =\n (size > 0)\n ? query.parametersIterator()\n : IteratorUtils.singletonIterator(Collections.EMPTY_MAP);\n for (int i = 0; i < counts.length; i++) {\n Map nextParameters = (Map) it.next();\n\n SQLStatement compiled =\n templateProcessor.processTemplate(template, nextParameters);\n\n if (loggable) {\n QueryLogger.logQuery(\n query.getLoggingLevel(),\n compiled.getSql(),\n Arrays.asList(compiled.getBindings()));\n }\n\n // TODO: we may cache prep statements for this loop, using merged string as a key\n // since it is very likely that it will be the same for multiple parameter sets...\n PreparedStatement statement = connection.prepareStatement(compiled.getSql());\n try {\n bind(statement, compiled.getBindings());\n counts[i] = statement.executeUpdate();\n QueryLogger.logUpdateCount(query.getLoggingLevel(), counts[i]);\n }\n finally {\n statement.close();\n }\n }\n\n observer.nextBatchCount(query, counts);\n }",
"@Override\n public void addBatch( String sql ) throws SQLException {\n throw new SQLException(\"tinySQL does not support addBatch.\");\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else continue;\n\t\t\t}\n\t\t}\n\t}",
"private void uploadBatchTable(InsertAllRequest insertAllRequest) {\n final Stopwatch stopwatch = stopwatchProvider.get();\n final ImmutableMultimap.Builder<TableId, InsertAllResponse> responseMapBuilder =\n ImmutableMultimap.builder();\n final StringBuilder performanceStringBuilder = new StringBuilder();\n issueInsertAllRequest(\n stopwatch, responseMapBuilder, performanceStringBuilder, insertAllRequest);\n log.info(performanceStringBuilder.toString());\n // Check response and abort the process if any error happens. In this case, verify_snapshot\n // won't have the 'successful' record, hence we know that is a \"bad\" dataset.\n checkResponse(responseMapBuilder.build());\n }",
"public void execute() {\n\t\tfor (Command command : commands) {\n\t\t\tcommand.execute();\n\t\t}\n\t}",
"public void exec(String sql) {\r\n try (Statement stmt = connection.createStatement()) {\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n throw new DbException(connectionString + \"\\nError executing \" + sql, e);\r\n }\r\n }",
"void bulkInsertOrReplace (List<Consumption> entities);",
"protected int insert(String[] statements) {\n\t\tint retValue = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\n\t\t\tfor (String statement : statements) {\n\t\t\t\tSQLQuery query = session.createSQLQuery(statement);\n\t\t\t\tretValue += query.executeUpdate();\n\t\t\t}\n\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute insert\");\n\t\t}\n\t\treturn retValue;\n\t}",
"public abstract byte[][] appExecuteBatch(byte[][] commands, MessageContext[] msgCtxs, boolean fromConsensus);",
"@SuppressWarnings(\"resource\")\n @Explain(\"We close the statement later, this is just an intermediate\")\n protected void addBatch() throws SQLException {\n prepareStmt().addBatch();\n batchBacklog++;\n if (batchBacklog > batchBacklogLimit) {\n commit();\n }\n }",
"@Test\n public void testBatchMerge() throws Exception {\n final int BATCH_SIZE = 7;\n try (Connection con = GridCacheDynamicLoadOnClientTest.connect(GridCacheDynamicLoadOnClientTest.clientNode);Statement stmt = con.createStatement()) {\n for (int idx = 0, i = 0; i < BATCH_SIZE; ++i , idx += i) {\n stmt.addBatch((((((((((((\"merge into \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (_key, name, orgId) values (\") + (100 + idx)) + \",\") + \"'\") + \"batch-\") + idx) + \"'\") + \",\") + idx) + \")\"));\n }\n int[] updCnts = stmt.executeBatch();\n assertEquals(\"Invalid update counts size\", BATCH_SIZE, updCnts.length);\n }\n }",
"private void batchImport() {\r\n m_jdbcTemplate.batchUpdate(createInsertQuery(),\r\n new BatchPreparedStatementSetter() {\r\n public void setValues(\r\n PreparedStatement ps, int i)\r\n throws SQLException {\r\n int j = 1;\r\n for (String property : m_propertyNames) {\r\n Map params = (Map) m_batch.get(\r\n i);\r\n ps.setObject(j++, params.get(\r\n property));\r\n }\r\n }\r\n\r\n public int getBatchSize() {\r\n return m_batch.size();\r\n }\r\n });\r\n }",
"private void executeRequest(String sql) {\n\t}",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"public void start() {\n \n for (Object obj: bufferedQueries) {\n \n switch(obj.getClass().getName()) {\n case \"uzh.tomdb.db.operations.Insert\":\n if (inserts == null) {\n inserts = new ArrayList<>();\n }\n inserts.add((Insert) obj);\n break;\n case \"uzh.tomdb.db.operations.CreateTable\":\n if (creates == null) {\n creates = new ArrayList<>();\n }\n creates.add((CreateTable) obj);\n break;\n case \"uzh.tomdb.db.operations.Update\":\n if (updates == null) {\n updates = new ArrayList<>();\n }\n updates.add((Update) obj);\n break;\n case \"uzh.tomdb.db.operations.Delete\":\n if (deletes == null) {\n deletes = new ArrayList<>();\n }\n deletes.add((Delete) obj);\n break;\n }\n }\n \n if (inserts != null) {\n inserts();\n }\n if (creates != null) {\n creates();\n }\n if (updates != null) {\n updates();\n }\n if (deletes != null) {\n deletes();\n }\n }",
"public abstract ResultList executeQuery(DatabaseQuery query);",
"public void executePendingTransactions()\n\t{\n\t\twhile(!transactionQueue.isEmpty())\n\t\t\ttransactionQueue.poll().doTransaction();\n\t}",
"protected void zBatchUpdateForSameSourceAttribute(List<UpdateOperation> updateOperations, BatchUpdateOperation batchUpdateOperation)\r\n {\r\n UpdateOperation firstOperation = updateOperations.get(0);\r\n MithraDataObject firstData = this.getDataForUpdate(firstOperation);\r\n Object source = this.getSourceAttributeValueFromObjectGeneric(firstData);\r\n DatabaseType databaseType = this.getDatabaseTypeGenericSource(source);\r\n\r\n if (databaseType.getUpdateViaInsertAndJoinThreshold() > 0 &&\r\n databaseType.getUpdateViaInsertAndJoinThreshold() < updateOperations.size() &&\r\n this.getFinder().getVersionAttribute() == null &&\r\n !batchUpdateOperation.isIncrement() &&\r\n batchUpdateOperation.isEligibleForUpdateViaJoin())\r\n {\r\n zBatchUpdateViaInsertAndJoin(updateOperations, source, databaseType);\r\n return;\r\n }\r\n if (this.hasOptimisticLocking())\r\n {\r\n if (this.getMithraObjectPortal().getTxParticipationMode().isOptimisticLocking() && !databaseType.canCombineOptimisticWithBatchUpdates())\r\n {\r\n //we'll do single updates\r\n for(int i=0;i<updateOperations.size();i++)\r\n {\r\n UpdateOperation updateOperation = updateOperations.get(i);\r\n zUpdate(updateOperation.getMithraObject(), updateOperation.getUpdates());\r\n }\r\n\r\n return;\r\n }\r\n }\r\n\r\n List firstUpdateWrappers = firstOperation.getUpdates();\r\n StringBuilder builder = new StringBuilder(30 + firstUpdateWrappers.size() * 12);\r\n builder.append(\"update \");\r\n builder.append(this.getFullyQualifiedTableNameGenericSource(source)).append(\" set \");\r\n for (int i = 0; i < firstUpdateWrappers.size(); i++)\r\n {\r\n AttributeUpdateWrapper wrapper = (AttributeUpdateWrapper) firstUpdateWrappers.get(i);\r\n if (i > 0)\r\n {\r\n builder.append(\", \");\r\n }\r\n builder.append(wrapper.getSetAttributeSql());\r\n }\r\n\r\n builder.append(this.getSqlWhereClauseForBatchUpdateForSameSourceAttribute(firstData));\r\n String sql = builder.toString();\r\n Connection con = null;\r\n PreparedStatement stm = null;\r\n\r\n try\r\n {\r\n con = this.getConnectionForWriteGenericSource(source);\r\n TimeZone databaseTimeZone = this.getDatabaseTimeZoneGenericSource(source);\r\n\r\n if (this.getSqlLogger().isDebugEnabled())\r\n {\r\n this.logWithSource(this.getSqlLogger(), source, \"batch update of \" + updateOperations.size() + \" objects with: \" + sql);\r\n }\r\n PrintablePreparedStatement pps = null;\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps = new PrintablePreparedStatement(sql);\r\n }\r\n stm = con.prepareStatement(sql);\r\n int batchSize = databaseType.getMaxPreparedStatementBatchCount(firstOperation.getUpdates().size() +\r\n this.getMithraObjectPortal().getFinder().getPrimaryKeyAttributes().length);\r\n if (batchSize < 0)\r\n {\r\n batchSize = updateOperations.size();\r\n }\r\n\r\n int objectsInBatch = 0;\r\n int batchStart = 0;\r\n for (int u = 0; u < updateOperations.size(); u++)\r\n {\r\n UpdateOperation operation = updateOperations.get(u);\r\n MithraDataObject data = this.getDataForUpdate(operation);\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps.clearParameters();\r\n int pos = operation.setSqlParameters(pps, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(pps, pos, data, databaseTimeZone, databaseType);\r\n this.logWithSource(this.getBatchSqlLogger(), source, \"batch updating with: \" + pps.getPrintableStatement());\r\n }\r\n int pos = operation.setSqlParameters(stm, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(stm, pos, data, databaseTimeZone, databaseType);\r\n operation.setUpdated();\r\n stm.addBatch();\r\n objectsInBatch++;\r\n\r\n if (objectsInBatch == batchSize)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n objectsInBatch = 0;\r\n batchStart = u + 1;\r\n }\r\n }\r\n if (objectsInBatch > 0)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n }\r\n stm.close();\r\n stm = null;\r\n\r\n String dbid = this.getDatabaseIdentifierGenericSource(source);\r\n getNotificationEventManager().addMithraNotificationEventForBatchUpdate(dbid, this.getFullyQualifiedFinderClassName(), MithraNotificationEvent.UPDATE, updateOperations, firstUpdateWrappers, source);\r\n }\r\n catch (SQLException e)\r\n {\r\n this.analyzeAndWrapSqlExceptionGenericSource(\"batch update failed \" + e.getMessage(), e, source, con);\r\n }\r\n finally\r\n {\r\n this.closeStatementAndConnection(con, stm);\r\n }\r\n\r\n }",
"@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}",
"private int executeUpdateInternal(List<Object> values) {\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"The following parameters are used for update \" + getUpdateString() + \" with: \" + values);\r\n\t\t}\r\n\t\tint updateCount = jdbcTemplate.update(updateString, values.toArray(), columnTypes);\r\n\t\treturn updateCount;\r\n\t}",
"public void addBatch() throws SQLException {\n statement.addBatch();\n }",
"public int[] batch(Connection conn, String sql, Object[][] params) throws SQLException {\n\t\treturn this.batch(conn, false, sql, params);\n\t}",
"void insertBatch(List<Customer> customers);",
"@Override\n public RespResult<Integer> batchExecuteUpdateNoBlocking(String username, String system, List<SqlExecReqDto> updates) {\n return RespResult.buildSuccessWithData(0);\n }",
"@Test\n public void testDeleteSeveral() throws Exception {\n int theTaskId = 440;\n String query = String.format(\"select * from %s.%s where taskId like '%s'\",\n tableSchema.schemaName, TASK_TABLE_NAME, \"4%\");\n\n TestConnection connection = methodWatcher.getOrCreateConnection();\n connection.setAutoCommit(false);\n\n PreparedStatement ps;\n int rows;\n int total = 10;\n for (int i=0; i<total; i++) {\n // insert good data\n ps = methodWatcher.prepareStatement(\n String.format(\"insert into %s.%s (taskId, empId, startedAt, finishedAt) values (?,?,?,?)\",\n tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, Integer.toString(theTaskId + i));\n ps.setInt(2, 100+i);\n ps.setInt(3, 0600+i);\n ps.setInt(4, 0700+i);\n rows = ps.executeUpdate();\n Assert.assertEquals(1, rows);\n }\n connection.commit();\n\n ResultSet rs = connection.createStatement().executeQuery(query);\n Assert.assertEquals(10, SpliceUnitTest.resultSetSize(rs));\n connection.commit();\n\n ps = methodWatcher.prepareStatement(\n String.format(\"delete from %s.%s where taskId like ?\", tableSchema.schemaName, TASK_TABLE_NAME));\n ps.setString(1, \"4%\");\n rows = ps.executeUpdate();\n Assert.assertEquals(10, rows);\n connection.commit();\n\n rs = connection.createStatement().executeQuery(query);\n Assert.assertFalse(\"No rows expected.\", rs.next());\n connection.commit();\n }",
"public void run() {\n String query = \"INSERT INTO CustomData (Server, Plugin, ColumnID, DataPoint, Updated) VALUES\";\n int currentSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // Iterate through each column\n for (Map.Entry<Column, Integer> entry : customData.entrySet()) {\n Column column = entry.getKey();\n int value = entry.getValue();\n\n // append the query\n query += \" (\" + server.getId() + \", \" + plugin.getId() + \", \" + column.getId() + \", \" + value + \", \" + currentSeconds + \"),\";\n }\n\n // Remove the last comma\n query = query.substring(0, query.length() - 1);\n\n // add the duplicate key entry\n query += \" ON DUPLICATE KEY UPDATE DataPoint = VALUES(DataPoint) , Updated = VALUES(Updated)\";\n\n // queue the query\n new RawQuery(mcstats, query).save();\n }",
"public List<Integer> updateMultiline(String script, Object... params) {\n String[] statements = script.split(\";\");\n List<Integer> list = new ArrayList<>();\n for (String s : statements) {\n if (s.isEmpty()) continue;\n s = s.trim();\n try {\n PreparedStatement statement = connection.prepareStatement(s);\n Queries.setValues(statement, params);\n list.add(statement.executeUpdate());\n } catch (SQLException ex) {\n Logger.getLogger(SQLDataConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return list;\n }",
"DBCursor execute();",
"private int[] batch(Connection conn, boolean closeConn, String sql, Object[][] params) throws SQLException {\n\t\tif (conn == null) {\n\t\t\tthrow new SQLException(\"Null connection\");\n\t\t}\n\n\t\tif (sql == null) {\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t\tthrow new SQLException(\"Null SQL statement\");\n\t\t}\n\n\t\tif (params == null) {\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t\tthrow new SQLException(\"Null parameters. If parameters aren't need, pass an empty array.\");\n\t\t}\n\n\t\tPreparedStatement stmt = null;\n\t\tint[] rows = null;\n\t\tList<Integer> rowList = Lists.newArrayList();\n\t\ttry {\n\t\t\tstmt = this.prepareStatement(conn, sql);\n\t\t\tint batchSize = DBManager.getBatchSize();\n\t\t\tint count = 0;\n\t\t\tfor (int i = 0; i < params.length; i++) {\n\t\t\t\tthis.fillStatement(stmt, params[i]);\n\t\t\t\tstmt.addBatch();\n\t\t\t\tif (++count % batchSize == 0) {\n\t\t\t\t\trows = stmt.executeBatch();\n\t\t\t\t\tfor (int ri = 0; ri < rows.length; ri++) {\n\t\t\t\t\t\trowList.add(rows[ri]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trows = stmt.executeBatch();\n\t\t\tfor (int ri = 0; ri < rows.length; ri++) {\n\t\t\t\trowList.add(rows[ri]);\n\t\t\t}\n\t\t\tif (rowList.size() > 0) {\n\t\t\t\trows = new int[rowList.size()];\n\t\t\t\tfor (int rli = 0; rli < rowList.size(); rli++) {\n\t\t\t\t\trows[rli] = rowList.get(rowList.get(rli));\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthis.rethrow(e, sql, (Object[]) params);\n\t\t} finally {\n\t\t\tclose(stmt);\n\t\t\tif (closeConn) {\n\t\t\t\tclose(conn);\n\t\t\t}\n\t\t}\n\n\t\treturn rows;\n\t}",
"@Override\n\tpublic void execute() {\n\t\tfor(int i=0;i<coms.length;i++)\n\t\t\tcoms[i].execute();\n\t}",
"public void execute() {\n execute0();\n }",
"public void logBatch(String sql, int repeatTimes, long nanoTime) ;",
"public void execSql(String sql) {\n\t\tjdbcTemplate.execute(sql);\n\t}",
"public void testSaveTableByTimeAllTransactional() throws Exception {\n\t\tfailed = false;\n\t\tlogger.info(\"loop test 1\");\n\n\t\tExecutorService executor = Executors.newFixedThreadPool(nThreads * 2);\n\t\tList<Callable<Object>> tasks1 = insertTasks();\n\n\t\tList<Callable<Object>> tasks2 = updateTasksPassing();\n\n\t\tCollection<Callable<Object>> tasks = new ArrayList<>();\n\t\ttasks.addAll(tasks1);\n\t\ttasks.addAll(tasks2);\n\n\t\trunTasks(executor, tasks);\n\n\t\tshutdownExecutor(executor);\n\n\t\tlogger.info(\"I have {} Tables saved\", getCountTablePassing());\n\t}",
"void insertBatch(List<TABLE41> recordLst);",
"public void addBatch(String sql) throws SQLException {\n currentPreparedStatement.addBatch(sql);\n }",
"public void executeSql(String sql, boolean doCommit, int fetchSize, int fetchDirn) throws SQLException {\n\n connectionCheck();\n blankStringCheck(sql, \"DB : Cannot execute null or empty SQL.\");\n\n LOGGER.info(\"DB : Executing the SQL : {}\", sql);\n\n Statement stmt = connection.createStatement();\n stmt.setFetchDirection(fetchDirn);\n stmt.setFetchSize(fetchSize);\n stmt.executeUpdate(sql);\n stmt.close();\n\n if (doCommit) {\n LOGGER.info(\"DB : Committing the changes.\");\n connection.commit();\n }\n }",
"protected boolean transaction(Connection connection, String[] commandsBatch, int expectedModificationCount)\n\t\t\tthrows DAOException {\n\t\tStatement statement;\n\t\tint affectedRows;\n\t\tint batchResults[];\n\n\t\t// Creating statement and adding batch of commantds to it.\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\n\t\t\tfor (String batch : commandsBatch)\n\t\t\t\tstatement.addBatch(batch);\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\n\t\t// main transaction logic\n\t\ttry {\n\t\t\t// executing operation.\n\t\t\tbatchResults = statement.executeBatch();\n\n\t\t\t// zero out rows value\n\t\t\taffectedRows = 0;\n\n\t\t\t// counting affected rows;\n\t\t\tfor (int operationResult : batchResults) {\n\t\t\t\tif (operationResult > 0)\n\t\t\t\t\taffectedRows += operationResult;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * if affected rows is necessary value, and its value doesn't match\n\t\t\t * to expected - throw exception.\n\t\t\t */\n\t\t\tif (expectedModificationCount != -1 && affectedRows != expectedModificationCount) {\n\t\t\t\tthrow new SQLException();\n\t\t\t}\n\n\t\t\t// in case of successful operation - commit.\n\t\t\tconnection.commit();\n\n\t\t\t// at last - close statement and exit loop.\n\t\t\tstatement.close();\n\t\t\treturn true;\n\t\t} catch (SQLException ignore) {\n\n\t\t\t// if operation failed - try to rollback.\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException cause) {\n\t\t\t\tthrow new DAOException(cause);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public JSObject execSQL(String[] statements) {\n // Open the database for writing\n // Log.d(TAG, \"*** in execSQL: \");\n JSObject retObj = new JSObject();\n SQLiteDatabase db = null;\n try {\n db = getConnection(false, secret);\n retObj = execute(db, statements);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: execSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: execSQL failed: \" + e);\n return retObj;\n } finally {\n if (db != null) db.close();\n }\n }",
"public JSObject execSQL(String[] statements) {\n // Open the database for writing\n // Log.d(TAG, \"*** in execSQL: \");\n JSObject retObj = new JSObject();\n SQLiteDatabase db = null;\n try {\n db = getConnection(false, secret);\n retObj = execute(db, statements);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: execSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: execSQL failed: \" + e);\n return retObj;\n } finally {\n if (db != null) db.close();\n }\n }",
"private void persistEntities(List<Entity> entities) {\n jdbcTemplate.batchUpdate(\n \"insert into entity (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n\n jdbcTemplate.batchUpdate(\n \"insert into entity_history (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n }",
"public int[] batchUpdate(DalHints hints, List<Person> daoPojos) throws SQLException {\n\t\tif(null == daoPojos || daoPojos.size() <= 0)\n\t\t\treturn new int[0];\n\t\thints = DalHints.createIfAbsent(hints);\n\t\treturn client.batchUpdate(hints, daoPojos);\n\t}",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"public void ejecutarSql(String query) throws Exception {\n stmt.executeUpdate(query);\n }",
"public void addBatch() throws SQLException {\n currentPreparedStatement.addBatch();\n }",
"public void runScript(String sqlScript) throws DataAccessLayerException {\n Session session = null;\n Transaction trans = null;\n Connection conn = null;\n\n Statement stmt = null;\n try {\n session = getSession(true);\n trans = session.beginTransaction();\n conn = session.connection();\n stmt = conn.createStatement();\n } catch (SQLException e) {\n throw new DataAccessLayerException(\n \"Unable to create JDBC statement\", e);\n }\n boolean success = true;\n String[] scriptContents = sqlScript.split(\";\");\n for (String line : scriptContents) {\n if (!line.isEmpty()) {\n try {\n stmt.addBatch(line + \";\");\n\n } catch (SQLException e1) {\n logger.warn(\"Script execution failed. Rolling back transaction\");\n trans.rollback();\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e2) {\n logger.error(\"Cannot close database connection!!\", e2);\n }\n if (session.isOpen()) {\n session.close();\n }\n throw new DataAccessLayerException(\n \"Cannot execute SQL statement: \" + line, e1);\n }\n }\n }\n try {\n stmt.executeBatch();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Error executing script.\", e1);\n }\n\n try {\n stmt.close();\n } catch (SQLException e1) {\n success = false;\n trans.rollback();\n logger.error(\"Unable to close JDBC statement!\", e1);\n }\n\n if (success) {\n trans.commit();\n }\n try {\n if (!conn.isClosed()) {\n conn.close();\n }\n } catch (SQLException e) {\n logger.error(\"Cannot close database connection!!\", e);\n }\n if (session.isOpen()) {\n session.close();\n }\n }",
"private void processTaskList(List<Task> taskList) throws SQLException, DaoException {\n for (Task currentTask : taskList) {\n processTask(currentTask);\n }\n }",
"public abstract void execute(List<Object> list);",
"public void execute (String query) throws java.sql.SQLException {\n try {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"execute(\\\"\" + query + \"\\\")\");\n \n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n dbConnection.setAutoCommit(false);\n statement.executeUpdate(query);\n dbConnection.commit();\n dbConnection.setAutoCommit(true);\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n throw e;\n }\n }",
"public JSObject execute(SQLiteDatabase db, String[] statements) throws Exception {\n JSObject retObj = new JSObject();\n try {\n for (String cmd : statements) {\n if (!cmd.endsWith(\";\")) cmd += \";\";\n db.execSQL(cmd);\n }\n retObj.put(\"changes\", dbChanges(db));\n return retObj;\n } catch (Exception e) {\n throw new Exception(\"Execute failed\");\n } finally {\n if (db != null) db.close();\n }\n }",
"public JSObject runSQL(String statement, JSArray values) {\n JSObject retObj = new JSObject();\n // Open the database for writing\n SQLiteDatabase db = null;\n long lastId = Long.valueOf(-1);\n if (statement.length() > 6) {\n try {\n db = getConnection(false, secret);\n db.beginTransaction();\n lastId = prepareSQL(db, statement, values);\n if (lastId != -1) db.setTransactionSuccessful();\n retObj.put(\"changes\", dbChanges(db));\n retObj.put(\"lastId\", lastId);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: runSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL failed: \" + e);\n return retObj;\n } finally {\n db.endTransaction();\n if (db != null) db.close();\n }\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL statement not given\");\n return retObj;\n }\n }",
"public JSObject execute(SQLiteDatabase db, String[] statements) throws Exception {\n JSObject retObj = new JSObject();\n try {\n for (String cmd : statements) {\n if (!cmd.endsWith(\";\")) cmd += \";\";\n db.execSQL(cmd);\n }\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n return retObj;\n } catch (Exception e) {\n throw new Exception(\"Execute failed\");\n }\n }",
"public JSObject runSQL(String statement, JSArray values) {\n JSObject retObj = new JSObject();\n // Open the database for writing\n SQLiteDatabase db = null;\n long lastId = Long.valueOf(-1);\n if (statement.length() > 6) {\n try {\n db = getConnection(false, secret);\n db.beginTransaction();\n lastId = prepareSQL(db, statement, values);\n if (lastId != -1) db.setTransactionSuccessful();\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n retObj.put(\"lastId\", lastId);\n return retObj;\n } catch (Exception e) {\n Log.d(TAG, \"Error: runSQL failed: \", e);\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL failed: \" + e);\n return retObj;\n } finally {\n db.endTransaction();\n if (db != null) db.close();\n }\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"message\", \"Error: runSQL statement not given\");\n return retObj;\n }\n }",
"@Override\r\n\tpublic void batchPersist(final List<?> entityList) {\n\t\tif (CollectionUtils.isEmpty(entityList)) {\r\n\t\t\tlogger.debug(\"Persist list is empty, no entity has been persisted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.getJpaTemplate().execute(new JpaCallback<Object>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object doInJpa(EntityManager em) throws PersistenceException {\r\n\t\t\t\tint max = entityList.size();\r\n\t\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\t\tem.persist(entityList.get(i));\r\n\t\t\t\t\tif ((i != 0 && i % DEFAULT_BATCH_SIZE == 0) || i == max - 1) {\r\n\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tlogger.debug(\"{} entities has been persisted.\", max);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}",
"private static void executeSQL(Connection connection, String file)\n\t\t\tthrows Exception {\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = connection.createStatement();\n\n\t\t\tString[] values = readFile(file).split(\";\");\n\n\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\tString sql = values[i].trim();\n\t\t\t\tif ((sql.length() != 0) && (!sql.startsWith(\"#\"))) {\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tif (stmt != null) {\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}",
"void execute(Context context) throws SQLException;",
"InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows) throws BigQueryException {\n return bigquery.insertAll(InsertAllRequest.of(info.tableId(), rows));\n }",
"public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }",
"public void runBatch();",
"@Override\r\n\tpublic void batchDelete(String[] ids) {\n\t\tfor(int i=0;i<ids.length;i++)\r\n\t\t\tdelete(ids[i]);\t\r\n\t}",
"public static int insertAll(Connection connection, List<CLRequestHistory> cls) {\n PreparedStatement statement = null;\n\n try {\n // commit at once.\n final boolean ac = connection.getAutoCommit();\n connection.setAutoCommit(false);\n\n // execute statement one by one\n int numUpdate = 0;\n statement = connection.prepareStatement(INSERT);\n for (CLRequestHistory cl : cls) {\n statement.setInt(1, cl.mCL);\n statement.setInt(2, cl.mState);\n numUpdate += statement.executeUpdate();\n }\n\n // commit all changes above\n connection.commit();\n\n // restore previous AutoCommit setting\n connection.setAutoCommit(ac);\n\n // Close Statement to release all resources\n statement.close();\n return numUpdate;\n } catch (SQLException e) {\n Utils.say(\"Not able to insert for CLs : \" + cls.size());\n } finally {\n try {\n if (statement != null)\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return 0;\n }",
"public JSObject executeSet(SQLiteDatabase db, JSArray set) throws Exception {\n long lastId = Long.valueOf(-1);\n int changes = 0;\n JSObject retObj = new JSObject();\n for (int i = 0; i < set.length(); i++) {\n JSONObject row = set.getJSONObject(i);\n String statement = row.getString(\"statement\");\n JSONArray valuesJson = row.getJSONArray(\"values\");\n JSArray values = new JSArray();\n for (int j = 0; j < valuesJson.length(); j++) {\n values.put(valuesJson.get(j));\n }\n lastId = prepareSQL(db, statement, values);\n if (lastId == -1) {\n Log.v(TAG, \"*** breaking lastId -1\");\n break;\n } else {\n changes += 1;\n }\n }\n if (lastId != -1) {\n retObj.put(\"changes\", uSqlite.dbChanges(db));\n retObj.put(\"lastId\", lastId);\n } else {\n retObj.put(\"changes\", Integer.valueOf(-1));\n retObj.put(\"lastId\", lastId);\n }\n return retObj;\n }",
"@Insert({\"<script>\",\n \"INSERT INTO ${tableName}\",\n \" <trim prefix='(' suffix=')' suffixOverrides=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' separator=','>\",\n \" <if test='value != null'>${colKey}</if>\",\n \" </foreach>\",\n \" </trim>\",\n \"VALUES\",\n \" <foreach collection='records' item='record' separator=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' open='(' separator=',' close=')'>\",\n \" <foreach collection='record' index='dataKey' item='dataValue' separator=','>\",\n \" <if test='value != null and colKey == dataKey'>#{dataValue}</if>\",\n \" </foreach>\",\n \" </foreach>\",\n \" </foreach>\",\n \"ON DUPLICATE KEY UPDATE\",\n \" <trim suffixOverrides=','>\",\n \" <foreach collection='records[0]' index='colKey' item='value' separator=','>\",\n \" <if test='value != null'>${colKey} = values(${colKey})</if>\",\n \" </foreach>\",\n \" </trim>\",\n \"</script>\"})\n int batchInsertOrUpdateSelective(@Param(\"tableName\") String tableName, @Param(\"records\") List<Map> records);",
"@Override\n public int[] doInCallableStatement(CallableStatement callableStatement) throws SQLException, DataAccessException {\n callableStatement.addBatch();\n\n while (params.hasNext()) {\n batchFactory.addParameter(callableStatement, params.next());\n callableStatement.addBatch();\n }\n return callableStatement.executeBatch();\n }",
"@Override\n\tpublic void executeQuery(String query) {\n\t\tStatement statement;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tstatement.executeUpdate(query);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"protected void runSQL(String sql) {\n\t\ttry {\n\t\t\tDataSource dataSource = monthlyTradingPersistence.getDataSource();\n\n\t\t\tDB db = DBManagerUtil.getDB();\n\n\t\t\tsql = db.buildSQL(sql);\n\t\t\tsql = PortalUtil.transformSQL(sql);\n\n\t\t\tSqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,\n\t\t\t\t\tsql);\n\n\t\t\tsqlUpdate.update();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new SystemException(e);\n\t\t}\n\t}"
] | [
"0.6830634",
"0.6801027",
"0.65383136",
"0.6423163",
"0.61733323",
"0.61432344",
"0.61373323",
"0.6120234",
"0.6103101",
"0.6081416",
"0.6068444",
"0.60630196",
"0.6044496",
"0.5975602",
"0.5949901",
"0.59055126",
"0.58964396",
"0.5876068",
"0.5873981",
"0.585926",
"0.58511686",
"0.58509314",
"0.58087325",
"0.5792225",
"0.57744145",
"0.57724196",
"0.5748682",
"0.57168365",
"0.5707826",
"0.56388307",
"0.5611084",
"0.5601528",
"0.55927604",
"0.55866474",
"0.5567791",
"0.5563945",
"0.55598503",
"0.55594015",
"0.5554526",
"0.55447316",
"0.5535658",
"0.55006844",
"0.54995966",
"0.54940134",
"0.54934734",
"0.5490263",
"0.5489378",
"0.54790086",
"0.54613364",
"0.54525125",
"0.5442888",
"0.54400563",
"0.54255444",
"0.5422005",
"0.5402068",
"0.5387499",
"0.5385454",
"0.5382728",
"0.5382315",
"0.5355266",
"0.5333365",
"0.533212",
"0.5330251",
"0.5325144",
"0.5323209",
"0.5318464",
"0.53184134",
"0.5313985",
"0.53087795",
"0.52799845",
"0.5266676",
"0.5253563",
"0.52519405",
"0.52519405",
"0.52311313",
"0.52292365",
"0.5228285",
"0.52072984",
"0.519552",
"0.5193619",
"0.51909703",
"0.5185568",
"0.5183081",
"0.5181151",
"0.51802224",
"0.5178483",
"0.51710474",
"0.51571584",
"0.51387733",
"0.5132935",
"0.5126673",
"0.51256764",
"0.5115429",
"0.51050943",
"0.50985354",
"0.50945586",
"0.5092651",
"0.5089861",
"0.5087537",
"0.50850075"
] | 0.6565003 | 2 |
Commit the transaction. It's necessary to execute it at the end of a transaction. | public void commit() throws SQLException {
if (conn != null) {
conn.commit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void commitTransaction() throws TransactionException {\n\t\t\r\n\t}",
"public void commit() {\n doCommit();\n }",
"@Override\n public void commit() throws SQLException {\n if (isTransActionAlive() && !getTransaction().getStatus().isOneOf(TransactionStatus.MARKED_ROLLBACK,\n TransactionStatus.ROLLING_BACK)) {\n // Flush synchronizes the database with in-memory objects in Session (and frees up that memory)\n getSession().flush();\n // Commit those results to the database & ends the Transaction\n getTransaction().commit();\n }\n }",
"void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }",
"public void commit() {\n tryCommit(true);\n }",
"public void commitTransaction() {\n\r\n\t}",
"@Override\n public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException,\n RollbackException, SecurityException, SystemException {\n assertActiveTransaction();\n try {\n getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n txns.set(null);\n }\n\n }",
"public void commitTransaction() {\n final EntityTransaction entityTransaction = em.getTransaction();\n if (!entityTransaction.isActive()) {\n entityTransaction.begin();\n }\n entityTransaction.commit();\n }",
"void commitTransaction();",
"public void commit() {\n }",
"void commit(Transaction transaction);",
"@Override\n public void commitTransaction() {\n try {\n connection.commit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't commit transaction \", e);\n } finally {\n closeConnection();\n }\n }",
"public void commitTransaction() throws SQLException {\n dbConnection.commit();\n }",
"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 static void commitTransaction() throws HException {\r\n\t\t\r\n\t\tTransaction tx = (Transaction) threadTransaction.get();\r\n\t\ttry {\r\n\t\t\tif (tx != null && !tx.wasCommitted() && !tx.wasRolledBack()) {\r\n\t\t\t\t// log.debug(\"Committing database transaction of this thread.\");\r\n\t\t\t\ttx.commit();\r\n\t\t\t}\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\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}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"void commit() {\n }",
"public void commit() throws ResourceException\n {\n if (inManagedTransaction)\n {\n try\n {\n inManagedTransaction = false;\n con.commit();\n }\n catch (SQLException e)\n {\n checkException(e);\n } // end of try-catch\n } // end of if ()\n else\n {\n throw new JBossResourceException(\"Trying to commit outside of a local tx\");\n } // end of else\n\n }",
"public void commit() throws SQLException {\n\t\tconnection.commit();\n\t}",
"void commit() throws CommitException;",
"void commit() throws SoarException\n {\n // if lazy, commit\n if(db != null && params.lazy_commit.get() == LazyCommitChoices.on)\n {\n // Commit and then start next lazy-commit transaction\n try\n {\n db.commitExecuteUpdate( /* soar_module::op_reinit */);\n db.beginExecuteUpdate( /* soar_module::op_reinit */);\n }\n catch(SQLException e)\n {\n throw new SoarException(\"Error while forcing commit: \" + e.getMessage(), e);\n }\n }\n \n }",
"public void commit();",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"@Override\n public void commit() {\n }",
"@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}",
"public void commitTransactionBlock() throws SQLException {\n masterNodeConnection.commit();\n masterNodeConnection.setAutoCommit(true);\n }",
"@Override\n public void commitTx() {\n \n }",
"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}",
"@Override\n\tpublic void commit() {\n\n\t}",
"void commitTransaction(ConnectionContext context) throws IOException;",
"void commit();",
"void commit();",
"private void commitTransaction(GraphTraversalSource g) {\n if (graphFactory.isSupportingTransactions()) {\n g.tx().commit();\n }\n }",
"public static void commitJta() throws DBException {\r\n\t\tgetJtaTransactionManager().commit();\r\n\t}",
"public static void finishTransaction()\n {\n if (currentSession().getTransaction().isActive())\n {\n try\n {\n System.out.println(\"INFO: Transaction not null in Finish Transaction\");\n Thread.dumpStack();\n rollbackTransaction();\n// throw new UAPersistenceException(\"Incorrect Transaction handling! While finishing transaction, transaction still open. Rolling Back.\");\n } catch (UAPersistenceException e)\n {\n System.out.println(\"Finish Transaction threw an exception. Don't know what to do here. TODO find solution for handling this situation\");\n }\n }\n }",
"private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }",
"protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\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}",
"public TransactionalElement<E> commit();",
"public abstract void commit();",
"void commit() throws IndexTransactionException;",
"public void close() throws RemoteException {\r\n tx.commit();\r\n }",
"public static void commitTransaction() throws UAPersistenceException\n {\n final Session session = currentSession();\n Transaction tx = session.getTransaction();\n if (tx != null)\n {\n try\n {\n tx.commit();\n // session commited and closed. New session will be spawned upon calling currentSession on factory.\n } catch (HibernateException e)\n {\n System.out.println(\"commitTransaction: Throwing Exception e = \" + e);\n throw new UAPersistenceException(\"cannot commit transaction, see stack trace\", e);\n }\n } else\n {\n throw new IllegalStateException(\"Cannot commit transaction, no open transaction available!\");\n }\n\n }",
"public static void establecerTransaccion() throws SQLException {\n con.commit();\n }",
"protected abstract boolean commitTxn(Txn txn) throws PersistException;",
"public void commit(){\n \n }",
"void endTransaction();",
"public void commitTransaction(long id) throws RelationException;",
"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 }",
"void commit(Session session);",
"public void commitChanges() {\n try {\n connection.commit();\n } catch (SQLException sqle) {\n LOGGER.log(Level.SEVERE, \"Unable to commit changes to the DB due to error {0}\", sqle.getMessage());\n }\n }",
"public void commitTransaction(TransID tid) \n throws IOException, IllegalArgumentException{// Not yet complete\n\t try {\n\t\t ADisk_lock.lock();\n\t\t // Call commit\n\t\t atranslist.get(tid).commit();\n\t\t Transaction temp = atranslist.remove(tid);\n\t\t wblist.addCommitted(temp);\t \n\t }\n\t finally{\n\t\t ADisk_lock.unlock();\n\t }\n }",
"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 commitEntity();",
"public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }",
"public void commit() throws ResourceException;",
"public synchronized void writeCommit(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" commit\");\t\n\t\tflush();\n\t}",
"public void commitTransaction(Connection con){\n try {\n con.commit();\n con.setAutoCommit(true);\n con.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);\n } catch (SQLException e) {\n try {\n con.rollback();\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic void commit() throws Throwable {\n\t\tthrow new Warning(\"please use commit(context)\");\n\t}",
"public void commit() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n Connection conn = it.next();\r\n try {\r\n conn.commit();\r\n } catch (SQLException ex) {\r\n log.severe(\"Partial commit failure: \" + ex.getMessage());\r\n }\r\n }\r\n closeConnections();\r\n }",
"public void transactionComplete(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for proj1\\\n \t//should always commit, simply call transactionComplete(tid,true)\n \ttransactionComplete(tid, true);\n \t\n }",
"public synchronized void commit(int trxnId)\n {\n ResourceManager rm;\n for (Enumeration e = transactionTouch.keys(); e.hasMoreElements();) {\n rm = (ResourceManager)e.nextElement();\n try {\n rm.commit(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 }",
"void commitBatch() {\n try {\n currBatchSize = batchSize;\n batchPreparedStmt.executeBatch();\n connection.commit();\n batchPreparedStmt.clearParameters();\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"SQLException \", e.getMessage());\n }\n }",
"public final void commit(com.mendix.systemwideinterfaces.core.IContext context) 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(com.mendix.systemwideinterfaces.core.IContext context) 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(com.mendix.systemwideinterfaces.core.IContext context) 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(com.mendix.systemwideinterfaces.core.IContext context) 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(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"@Override\n\tpublic void close() throws SQLException {\n\t\t//Commit must be explicit before closing the connection\n\t\tconnection.commit();\n\t\tconnection.close();\n\t}",
"public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public void forceCommitTx()\n{\n}",
"private static boolean commitTransaction(int trans_id) {\n Transaction txn = null;\n if (transactions.containsKey(trans_id))\n txn = transactions.get(trans_id);\n else\n return false;\n\n if (txn != null)\n txn.commit();\n\n return true;\n }",
"public boolean commit(Connection conn) throws SQLException {\n boolean status = true;\n try {\n // Start of system transaction\n conn.setAutoCommit(false);\n BookingMapper bm = new BookingMapper();\n status = status && bm.addNewBooking(newBooking, conn);\n status = status && bm.updateBooking(modifiedBooking, conn);\n status = status && bm.deleteBooking(deleteBooking, conn);\n if (!status) {\n\n throw new Exception(\"Business Transaction aborted\");\n }\n // System transaction ends with success\n conn.commit();\n } catch (Exception e) {\n System.out.println(\"fail in UnitOfWork - commit()\");\n System.err.println(e);\n // System transaction fails, rollsback\n conn.rollback();\n status = false;\n }\n return status;\n }",
"public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static DAO Commit() throws IllegalStateException, CommitToDatabaseFailedException\r\n\t{\r\n\t\treturn instance.commit();\r\n\t}",
"public void commitChanges()\n {\n }",
"public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }",
"public void commit () throws IOException {\n log.info(\"Internal committing index ... \");\n this.writer().commit();\n commitCounter = 0;\n this.closeReader();\n }",
"@Override\r\n\tpublic void commit(String tableName) {\n\t}",
"protected abstract void commitIndividualTrx();",
"public void transactionComplete(TransactionId tid, boolean commit)\n throws IOException {\n // some code goes here\n // not necessary for lab1|lab2\n }",
"public void beginTransaction() throws SQLException {\r\n conn.setAutoCommit(false);\r\n beginTransactionStatement.executeUpdate();\r\n }",
"public boolean commit() {\n\t\tif (blocks.size() <= 1) return false;\n\n\t\tHashMap<String, Integer> pairMap = new HashMap<String, Integer>();\n\t\tHashMap<Integer, Integer> countMap = new HashMap<Integer, Integer>();\n\n\t\tListIterator<Transaction> iterator = blocks.listIterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tTransaction block = iterator.next();\n\t\t\tpairMap.putAll((Map<? extends String, ? extends Integer>) block.getNameValue());\n\t\t}\n\n\t\tfor (Entry<String, Integer> entry : pairMap.entrySet()) {\n\t\t\tInteger value = entry.getValue();\n\t\t\tif(countMap.get(value) == null){\n\t\t\t\tcountMap.put(value, new Integer(1));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap.put(value, new Integer(countMap.get(value) + 1));\n\t\t\t}\n\t\t\tpairMap.put(entry.getKey(),entry.getValue());\n\t\t}\t\t\n\n\t\tblocks = new LinkedList<Transaction>();\n\t\tblocks.add(new Transaction(pairMap, countMap));\n\n\t\treturn true;\n\t}",
"public void closeTransaction(){\n\t\ttr.rollback();\n\t\ttr = null;\n\t}",
"public static void commitAndClose(Connection conn) throws SQLException {\r\n if (conn != null) {\r\n try {\r\n conn.commit();\r\n } finally {\r\n close(conn);\r\n }\r\n }\r\n }",
"@Override\n public void close() throws IOException {\n if (connection != null) {\n try {\n if (complete) {\n connection.commit();\n }\n else {\n connection.rollback();\n }\n }\n catch (SQLException e) {\n throw new StoreException(e);\n }\n finally {\n try {\n connection.close();\n }\n catch (SQLException e) {\n throw new StoreException(e);\n }\n }\n }\n }",
"void commit() throws StorageException, ValidationException, KeyValueStoreException;",
"public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }",
"@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}"
] | [
"0.78883636",
"0.7829532",
"0.78038925",
"0.7788969",
"0.77656907",
"0.756768",
"0.7559485",
"0.7483479",
"0.7449146",
"0.73750496",
"0.735533",
"0.73548824",
"0.73224795",
"0.7320827",
"0.7320827",
"0.7320827",
"0.7320827",
"0.7320827",
"0.73007727",
"0.7292561",
"0.7255648",
"0.7255648",
"0.7255648",
"0.7255648",
"0.72369176",
"0.7227929",
"0.72176886",
"0.71792054",
"0.71590745",
"0.7146377",
"0.7099701",
"0.7046783",
"0.70313835",
"0.7015314",
"0.700273",
"0.6974411",
"0.6928052",
"0.69160163",
"0.6894473",
"0.6894473",
"0.6890273",
"0.68782866",
"0.68638444",
"0.6824909",
"0.6767563",
"0.67628133",
"0.6761206",
"0.67459244",
"0.6708732",
"0.6695195",
"0.66455144",
"0.66122556",
"0.6603788",
"0.6557245",
"0.65504104",
"0.6523527",
"0.6513089",
"0.65071356",
"0.64660263",
"0.6446768",
"0.64358705",
"0.64249045",
"0.64229786",
"0.6417674",
"0.6414715",
"0.6393459",
"0.6371935",
"0.6350736",
"0.63316965",
"0.6287392",
"0.626168",
"0.6224326",
"0.6224326",
"0.6224326",
"0.6224326",
"0.6224326",
"0.6192851",
"0.6182405",
"0.6182405",
"0.6182405",
"0.6182405",
"0.61710745",
"0.61619705",
"0.6075764",
"0.6071425",
"0.60344124",
"0.60315204",
"0.60065126",
"0.60062915",
"0.59902364",
"0.5989165",
"0.5988218",
"0.5978895",
"0.59773296",
"0.5976711",
"0.5959422",
"0.5958002",
"0.5923908",
"0.5910412",
"0.5904953"
] | 0.69492376 | 36 |
Close the session. It's necessary to execute it to release the connection after using the session. | public void close() {
if (conn != null) {
try {
conn.close();
} catch (SQLException e) {
logger.error("Failed to close the connection.");
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void closeConnection() {\n this.session.close();\n }",
"public void close() {\n\t\tif (this.session instanceof DatabaseSession) {\n\t\t\t((DatabaseSession) this.session).logout();\n\t\t}\n\t\tthis.session.release();\n\t}",
"void closeSession();",
"void closeSession();",
"public void closeSession() {\n if (session != null) {\n session.close();\n session = null;\n }\n }",
"private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }",
"public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }",
"public final void closeSession() {\n\t\t// Call the base class\n\t\tSystem.out.print(\"Session Closed\");\n\t\tsuper.closeSession();\n\n\t\tif ( m_sock != null) {\n\t\t\ttry {\n\t\t\t\tm_sock.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_sock = null;\n\t\t}\n\n\t\tif ( m_in != null) {\n\t\t\ttry {\n\t\t\t\tm_in.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_in = null;\n\t\t}\n\n\t\tif ( m_out != null) {\n\t\t\ttry {\n\t\t\t\tm_out.close();\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t}\n\t\t\tm_out = null;\n\t\t}\n\n\n\t}",
"public static void closeSession() {\n Session session = (Session) sessionThreadLocal.get();\n sessionThreadLocal.set(null);\n try {\n if (session != null)\n session.close();\n } catch (HibernateException e) {\n logger.error(\"Close current session error: \" + e.getMessage());\n }\n }",
"public static void closeSession() throws HException {\r\n\t\ttry {\r\n\t\t\tcommitTransaction();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\trollbackTransaction();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tSession s = (Session) threadSession.get();\r\n\t\t\tthreadSession.set(null);\r\n\t\t\tthreadTransaction.set(null);\r\n\t\t\tif (s != null && s.isOpen()) {\r\n\t\t\t\ts.close();\r\n\t\t\t\tsetConnections(-1);\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public /*static*/ void close() {\n sessionFactory.close();\n }",
"protected final void closeSession() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.close();\n }\n }",
"public static void closeSession() {\n \tif (singleSessionMode) {\n \t\tif (singleSession != null) {\n \t\t\tsingleSession.close();\n \t\t\tsingleSession = null;\n \t\t}\n \t} else {\n\t Session s = session.get();\n\t if (s != null && s.isOpen()) {\n\t try {\n\t \ts.close();\n\t } finally {\n\t \tsession.set(null); \t\n\t }\n\t }\n\t \n \t}\n }",
"public void close() {\n\n try {\n try {\n try {\n if (exception == null) {\n flushSessions();\n }\n\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n\n try {\n if (exception == null) {\n transactionContext.commit();\n }\n } catch (Throwable exception) {\n exception(exception);\n }\n transactionContext.rollback();\n }\n } catch (Throwable exception) {\n exception(exception);\n } finally {\n closeSessions();\n\n }\n } catch (Throwable exception) {\n exception(exception);\n } \n\n // rethrow the original exception if there was one\n if (exception != null) {\n if (exception instanceof Error) {\n throw (Error) exception;\n } else if (exception instanceof RuntimeException) {\n throw (RuntimeException) exception;\n }\n }\n }",
"@Override\n public void closeSession() throws HibernateException {\n Session session = threadLocal.get();\n threadLocal.set(null);\n\n if (session != null) {\n session.close();\n }\n }",
"private static void closeSession() {\n isSessionOpen = false;\n }",
"public void closePrivateSession(){\n if(sqlSession != null){\n sqlSession.close();\n }\n }",
"synchronized void close() {\n\n closeAllSessions();\n sysSession.close();\n sysLobSession.close();\n }",
"public static void closeSession() throws HibernateException {\n\t\tSession session = (Session) threadLocal.get();\n threadLocal.set(null);\n\n if (session != null && session.isOpen()) {\n session.close();\n }\n }",
"public synchronized void close() {\n if (session != null) {\n if (!suspended) {\n try {\n if (transacted == Transacted.Jms) {\n if (rollbackOnly) {\n session.rollback();\n } else {\n session.commit();\n }\n afterClose();\n } else if (transacted == Transacted.Xa) {\n destroy();\n try {\n if (rollbackOnly) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Rolling back XA transaction\");\n }\n transactionManager.rollback();\n } else {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Committing XA transaction\");\n }\n transactionManager.commit();\n }\n } catch (Exception e) {\n throw new TransactionException(e);\n }\n } else if (transacted == Transacted.ClientAck) {\n if (message != null) {\n if (!rollbackOnly) {\n message.acknowledge();\n } else {\n destroyConsumer();\n }\n }\n afterClose();\n } else {\n afterClose();\n }\n } catch (JMSException e) {\n destroy();\n throw convertJmsAccessException(e);\n }\n }\n }\n }",
"public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }",
"public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n sessionFactory = null;\r\n }",
"protected void close() {\n\t\tthis.connection.close();\n\t\tthis.connection = null;\n\t}",
"public static void close() {\r\n if (sessionFactory != null) {\r\n sessionFactory.close();\r\n }\r\n LOG.debug(MODULE + \"SessionFactory Close\");\r\n sessionFactory = null;\r\n }",
"public void stop() {\n session.close(false);\n }",
"public static void shutdown() {\n\t\tgetSessionFactory().close();\n\t}",
"public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }",
"public static void close() {\r\n\t\tif (sessionFactory != null)\r\n\t\t\tsessionFactory.close();\r\n\t\tsessionFactory = null;\r\n\r\n\t}",
"public void close() {\n connection.close();\n running = false;\n }",
"public void finSession(Session session){\n obtenerConexion().closeSession(session);\n }",
"public void closeSession() throws ConnectionException {\n\t\tif (!(stateMachine.getCurrent().getClass() == SessionValid.class)) {\n\t\t\tthrow new ConnectionException(\"Illegal connection state: \"\n\t\t\t\t\t+ stateMachine.getCurrent().getClass().getSimpleName());\n\t\t}\n\n\t\tstateMachine.doTransition(new CloseSession(managedSystemSessionId,\n\t\t\t\tmessageQueue.getSequenceNumber()));\n\t}",
"public void closeSessionForThread() {\n Session session = THREADED_SESSION.get();\n THREADED_SESSION.set(null);\n THREADED_TRANSACTION.set(null);\n if (session != null) {\n if (session.isOpen()) {\n session.close();\n }\n }\n }",
"public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}",
"public static void close()\n\t{\n\t\t\n\t\ttry \n\t\t{\t\t\t\n\t\t\t\n\t\t\tif (RESULT_SET != null)\n\t\t\t{\n\t\t\t\tRESULT_SET.close();\n\t\t\t}\n\t\t\t\n\t\t\tSTATEMENT.close();\n\t\t\tCONNECTION.close();\t\t\n\t\t\n\t\t} catch (Exception e)\n\t\t{\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}",
"@Override\r\n\tpublic void close()\r\n {\r\n\t\ttry\r\n {\r\n\t connection.close();\r\n }\r\n\t\tcatch (final SQLException e)\r\n {\r\n\t\t\t// Ignore, shutting down anyway\r\n }\r\n }",
"public void close() {\n if (stmt == null) {\n return;\n }\n\n try {\n commit();\n } catch (HandledException ex) {\n Exceptions.ignore(ex);\n }\n\n safeClose();\n context.unregister(this);\n }",
"public void close()\r\n {\r\n try\r\n {\r\n connection.close();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n }",
"@Override\n public void close() {\n try {\n if (tunnelSession != null) {\n tunnelSession.close();\n tunnelSession = null;\n }\n if (sshclient != null) {\n sshclient.stop();\n sshclient = null;\n }\n } catch (final Throwable t) {\n throw new RuntimeException(t);\n }\n }",
"public void close() {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"=== CLOSE === \");\n\t\t}\n\n\t\ttry {\n\n\t\t\tif (connection != null) {\n\n\t\t\t\tlog.debug(\"Antes Connection Close\");\n\t\t\t\tconnection.close();\n\t\t\t\tlog.debug(\"Pos Connection Close\");\n\t\t\t}\n\n\t\t\tif (m_dbConn != null) {\n\t\t\t\tm_dbConn.close();\n\t\t\t}\n\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Connection Close\");\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tlog.debug(\"ERRO Connection Close\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tconnection = null;\n\t\tm_dbConn = null;\n\n\t}",
"public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }",
"@OnClose\n\tpublic void close(Session session) {\n\t\tsessionHandler.removeSession(session);\n\t}",
"void closeSessionFactory();",
"public void close() {\n\t\tcloseConnection();\n\t\tcloseStatement();\n\t\tcloseResultSet();\n\t}",
"protected void closeSession(SessionImpl session) {\n sessions.remove(session);\n sessionCount.dec();\n }",
"public void close()\n {\n getConnectionManager().shutdown();\n }",
"public void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void shutdown() {\n getSessionFactory().close();\n }",
"public void close() {\n try {\n connect.close();\n } catch (SQLException ex) {\n System.err.println(\"Error while closing db connection\" + ex.toString());\n }\n }",
"@PreDestroy\n protected void destroy() {\n sessionFactory.getCurrentSession().close();\n }",
"public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null) {\n\t\t\t\tresultSet.close();\n\t\t\t}\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (connect != null) {\n\t\t\t\tconnect.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}",
"@Override\n protected void tearDown() throws Exception\n {\n if (session != null)\n {\n session.close();\n }\n \n super.tearDown();\n }",
"public void closeAndReopenSession() {\n\n\t\ttry {\n\t\t\tif (getHSession() != null) {\n\t\t\t\tgetHSession().close();\n\t\t\t}\n\t\t\tsetHSession(HibernateUtil.getNewSession());\n\t\t} catch (HibernateException he) {\n\t\t\tgetLog().error(he);\n\t\t}\n\t}",
"public void closeConnection() {\n client.close();\n System.out.println(\"Connection to db closed.\");\n }",
"@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}",
"public void close(Connection connection, Session session) throws JMSException {\n dumpStats(connection);\n\n if (session != null) {\n session.close();\n }\n if (connection != null) {\n connection.close();\n }\n }",
"private void closeInstance(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tconn.getConnection().close();\n\t\t\t\n\t\t\tstmt = null;\n\t\t\trs = null;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n public void close()\n {\n this.disconnect();\n }",
"public void close()\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.conexao.close();\n\t\t\tSystem.out.println(\"\\n\"+nomeDao+\" desconectado!\\n\");\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tSystem.out.println(\"\\nNao ha conexao \"+nomeDao+\" a ser fechada!\\n\");\n\t\t}\n\t}",
"public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}",
"public void close() {\r\n\t\ttry {\r\n\t\t\tif (resultSet != null) {\r\n\t\t\t\tresultSet.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (statement != null) {\r\n\t\t\t\tstatement.close();\r\n\t\t\t}\r\n\r\n\t\t\tif (connect != null) {\r\n\t\t\t\tconnect.close();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void dispose(IoSession session) throws Exception {\n\r\n\t}",
"public void connectionClose() {\n try {\n conn.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void close() {\r\n\t\ttry {\r\n\t\t\trs.close();\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\ttry {\r\n\t\t\tst.close();\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\ttry {\r\n\t\t\tconn.close();\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}",
"private void closeConnection () {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tconnection = null;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void closeConnection() {\r\n if (getConnection() != null && StringUtil.isNotBlank(config.getDataSource())\r\n /*&& this.conn.getConnection() instanceof PooledConnection */) {\r\n LOG.ok(\"Close the pooled connection\");\r\n dispose();\r\n }\r\n }",
"@Override\n\tpublic final void close() throws SailException {\n\t\tconnectionLock.writeLock().lock();\n\n\t\ttry {\n\t\t\tif (isOpen) {\n\t\t\t\ttry {\n\t\t\t\t\tforceCloseActiveOperations();\n\n\t\t\t\t\tif (txnActive) {\n\t\t\t\t\t\tlogger.warn(\"Rolling back transaction due to connection close\",\n\t\t\t\t\t\t\t\tdebugEnabled ? new Throwable() : null);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Use internal method to avoid deadlock: the public\n\t\t\t\t\t\t\t// rollback method will try to obtain a connection lock\n\t\t\t\t\t\t\trollbackInternal();\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttxnActive = false;\n\t\t\t\t\t\t\ttxnPrepared = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcloseInternal();\n\t\t\t\t} finally {\n\t\t\t\t\tisOpen = false;\n\t\t\t\t\tsailBase.connectionClosed(this);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\t// Release the exclusive lock. Any threads waiting to obtain a\n\t\t\t// non-exclusive read lock will get one and then fail with an\n\t\t\t// IllegalStateException, because the connection is no longer open.\n\t\t\tconnectionLock.writeLock().unlock();\n\t\t}\n\t}",
"void close()\n {\n DisconnectInfo disconnectInfo = connection.getDisconnectInfo();\n if (disconnectInfo == null)\n {\n disconnectInfo = connection.setDisconnectInfo(\n new DisconnectInfo(connection, DisconnectType.UNKNOWN, null, null));\n }\n\n // Determine if this connection was closed by a finalizer.\n final boolean closedByFinalizer =\n ((disconnectInfo.getType() == DisconnectType.CLOSED_BY_FINALIZER) &&\n socket.isConnected());\n\n\n // Make sure that the connection reader is no longer running.\n try\n {\n connectionReader.close(false);\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n outputStream.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n try\n {\n socket.close();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n\n if (saslClient != null)\n {\n try\n {\n saslClient.dispose();\n }\n catch (final Exception e)\n {\n debugException(e);\n }\n finally\n {\n saslClient = null;\n }\n }\n\n debugDisconnect(host, port, connection, disconnectInfo.getType(),\n disconnectInfo.getMessage(), disconnectInfo.getCause());\n if (closedByFinalizer && debugEnabled(DebugType.LDAP))\n {\n debug(Level.WARNING, DebugType.LDAP,\n \"Connection closed by LDAP SDK finalizer: \" + toString());\n }\n disconnectInfo.notifyDisconnectHandler();\n }",
"@Override\n public void closeDBConnection() throws SQLException {\n if (sessionFactory.getCurrentSession() != null && sessionFactory.getCurrentSession().isOpen()) {\n sessionFactory.getCurrentSession().close();\n }\n }",
"public void pgClose() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"Connection closed\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println(\"Connection could not be closed ĘC SQLexception\");\n\t\t}\n\t\t\n\t}",
"public static void close() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch(Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}",
"public void closeConnection() {\n if (this.connection != null && this.connected) {\n try {\n this.connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }",
"public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore close client connection\");\n\t\t}\n\t}",
"private void close() {\n\t\t\tDB.close(m_rs, m_pstmt);\n\t\t\tm_rs = null;\n\t\t\tm_pstmt = null;\n\t\t}",
"protected final void closeSessionAndClearTokenInformation() {\n Session currentSession = sessionTracker.getOpenSession();\n if (currentSession != null) {\n currentSession.closeAndClearTokenInformation();\n }\n }",
"@Override public void close() throws SQLException {\r\n connection.close();\r\n connection = null;\r\n }",
"@Override\r\n public void close() throws Exception {\r\n if (connection != null){\r\n connection.close();\r\n }\r\n }",
"private void close() {\n\t\t try {\n\t\t\tresultSet.close();\n\t\t\tstatement.close();\n\t\t\t connect.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \n\t }",
"@Override\n protected void tearDown() throws Exception {\n mSession.release();\n super.tearDown();\n }",
"public void close() {\n if (connection == null) {\n LOGGER.error(\"DB : Uninitialized DB Connection.\");\n return;\n }\n\n try {\n if (connection.isClosed()) {\n LOGGER.warn(\"Connection is already closed.\");\n return;\n }\n connection.close();\n } catch (SQLException e) {\n LOGGER.error(\"Error closing the connection.\", e);\n }\n\n }",
"private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}",
"public void close() {\n\t\ttry {\n\t\t\tif (resultSet != null)\n\t\t\t\tresultSet.close();\n\t\t\tif (connect != null)\n\t\t\t\tconnect.close();\n\t\t} catch (Exception e) {\n\t\t}\n\t}",
"public void disconnect() {\n DatabaseGlobalAccess.getInstance().getEm().close();\n DatabaseGlobalAccess.getInstance().getEmf().close();\n }",
"@Override\n public void close() {\n logger.info(\"Going to disconnect from the SQL server\");\n JDBCUtils.safeClose(connection);\n connection = null;\n super.close(); // Empty method call\n\n // Stop the container\n logger.info(\"Going to stop the SQL server\");\n postgreSQLContainer.stop();\n }",
"private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}",
"public void Disconnect() {\n\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tps.close(); // cerrar el statement tb cierra el resultset.\n\t\t} catch (SQLException e) {\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t/* no hago nada */}\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\t/* no hago nada */}\n\t\t}\n\t}",
"public Future<Void> close() {\n if (this.closed.compareAndSet(false, true)) {\n openedFuture.setHandler(unused -> {\n LOG.info(\"Closing session for MQTT client : {} at {}\", this.mqttEndpoint.clientIdentifier(), this.remoteAddress);\n Future<Void> cleanSessionFuture = Future.future();\n cleanSessionFuture.setHandler(unused1 -> {\n AsyncResult<Void> result = Future.failedFuture((Throwable) null);\n try {\n if (this.lwtEndpoint != null) {\n this.lwtEndpoint.close(this.detachForced);\n }\n if (this.ssEndpoint != null) {\n this.ssEndpoint.close();\n }\n if (this.rcvEndpoint != null) {\n this.rcvEndpoint.close();\n }\n if (this.pubEndpoint != null) {\n this.pubEndpoint.close();\n }\n if (this.connection != null) {\n this.connection.close();\n }\n if (this.grantedQoSLevels != null) {\n this.grantedQoSLevels.clear();\n }\n\n try {\n this.mqttEndpoint.close();\n } catch (IllegalStateException e) {\n }\n result = Future.succeededFuture();\n } catch (Throwable e) {\n result = Future.failedFuture(e);\n } finally {\n this.handleMqttEndpointClose();\n this.closedFuture.handle(result);\n }\n });\n\n if (this.mqttEndpoint.isCleanSession()) {\n AmqpCloseMessage value = new AmqpCloseMessage(this.mqttEndpoint.clientIdentifier());\n this.ssEndpoint.sendClose(value, event -> {\n if (event.failed()) {\n LOG.warn(\"Failed to close session for MQTT client : {}\",\n this.mqttEndpoint.clientIdentifier(),\n event.cause());\n cleanSessionFuture.fail(event.cause());\n } else {\n LOG.trace(\"Closed session for MQTT client : {} at {}\", this.mqttEndpoint.clientIdentifier(), this.remoteAddress);\n cleanSessionFuture.complete();\n }\n });\n } else {\n LOG.trace(\"Closed session for MQTT client : {} at {}\", this.mqttEndpoint.clientIdentifier(), this.remoteAddress);\n cleanSessionFuture.complete();\n }\n });\n }\n return this.closedFuture;\n }",
"public void closeConnection() {\n\t\ttry{\n\t\t\tif(this.connection!=null)\n\t\t\t\tthis.connection.close();\n\t\t}catch(SQLException se){\n\t\t\tse.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void sessionClosed(IoSession session) throws Exception {\n\t\tSystem.out.println(\"Client Closed :\" + session.getRemoteAddress());\n\t\tcli.delCli(session);\n\t\t/*\n\t\t * other operate\n\t\t * */\n\t}",
"public void closeConnection() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR: cannot close connection to local database\");\n\t\t}\n\t}",
"public void closeConnection() {\n try {\n if (connection != null) {\n connection.close();\n connection = null;\n }\n } catch (Exception e) {\n System.out.print(e.getMessage());\n }\n }",
"@Override\n\tpublic void dispose(IoSession session) throws Exception {\n\n\t}",
"public synchronized void close() throws SQLException {\n/* 204 */ if (this.physicalConn != null) {\n/* 205 */ this.physicalConn.close();\n/* */ \n/* 207 */ this.physicalConn = null;\n/* */ } \n/* */ \n/* 210 */ if (this.connectionEventListeners != null) {\n/* 211 */ this.connectionEventListeners.clear();\n/* */ \n/* 213 */ this.connectionEventListeners = null;\n/* */ } \n/* */ }",
"protected void close() {\n if (conn == null)\n return;\n // Close our prepared statements (if any) \n try {\n ps.close();\n } catch (Throwable f) {\n ExceptionUtils.handleThrowable(f);\n }\n this.ps = null;\n // Close this database connection, and log any errors \n try {\n conn.close();\n } catch (SQLException e) {\n container.getLogger().error(sm.getString(\"jdbcAccessLogValeve.close\"), e);\n } finally {\n this.conn = null;\n }\n}",
"public static void closeConnection() throws SQLException, IOException, JSchException {\n PropertiesLoader loader = new PropertiesLoader();\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n if (connection != null) {\n connection.close();\n }\n if (session != null) {\n session.delPortForwardingL(localPort);\n session.disconnect();\n }\n }",
"public void close() {\n try {\n if (masterNodeConnection != null) {\n masterNodeConnection.close();\n masterNodeConnection = null;\n }\n } catch (SQLException sqlException) {\n String logMessage = \"could not close master node database connection\";\n logger.warn(logMessage, sqlException);\n }\n }",
"private void closeConnection () {\n setConnection (null);\n }",
"public void closeHandler() {\n\n super.closeHandler();\n\n // Close the session socket\n if (m_sessSock != null) {\n m_sessSock.closeSocket();\n }\n }",
"public void closeConnection() {\n try {\n String token = conn.toString();\n conn.close();\n log.info(\"Database Connection Closed. ID: {} \", token);\n } catch (Exception e) {\n log.error(\"Error closing the database connection. \\n Trace: {}\", ExceptionUtilities.stacktraceToString(e));\n }\n }",
"public void closeConnection();"
] | [
"0.81285024",
"0.78103065",
"0.7599634",
"0.7599634",
"0.7587901",
"0.7558285",
"0.75017774",
"0.7465489",
"0.74360937",
"0.7414471",
"0.72441643",
"0.72213227",
"0.7188291",
"0.71482414",
"0.71348476",
"0.7133386",
"0.69928163",
"0.6961766",
"0.69617337",
"0.68861955",
"0.68822956",
"0.685701",
"0.6829149",
"0.6779521",
"0.67526764",
"0.6737237",
"0.6735786",
"0.67331225",
"0.6722577",
"0.67016155",
"0.66906667",
"0.66556114",
"0.66529936",
"0.6602066",
"0.6592304",
"0.6588032",
"0.6582964",
"0.65798175",
"0.6572077",
"0.654783",
"0.6535932",
"0.6514742",
"0.6494574",
"0.64277726",
"0.6403958",
"0.6399057",
"0.6396012",
"0.6395878",
"0.6355789",
"0.63535744",
"0.6335357",
"0.6334634",
"0.63193506",
"0.6313575",
"0.6295081",
"0.6278534",
"0.62776285",
"0.6230869",
"0.6216987",
"0.62155354",
"0.62155354",
"0.62105846",
"0.6195416",
"0.61921084",
"0.6191595",
"0.6168611",
"0.61645734",
"0.61537397",
"0.61478394",
"0.61460716",
"0.61440474",
"0.6123307",
"0.61130965",
"0.6112308",
"0.6107892",
"0.6095853",
"0.6094813",
"0.6087218",
"0.6079544",
"0.6071653",
"0.6068607",
"0.606171",
"0.60613286",
"0.6057722",
"0.6054509",
"0.6045467",
"0.60450447",
"0.6040385",
"0.6040032",
"0.6039642",
"0.6031316",
"0.60290533",
"0.6020888",
"0.60178286",
"0.6009381",
"0.60044783",
"0.5998065",
"0.599685",
"0.59865",
"0.598168"
] | 0.6234938 | 57 |
Print the parameters to the logger. The text will be printed like this: PARAMETERS=[v1;v2;null;v3;]. | private void printParams(Object... params) {
if (params != null) {
String paramsStr = "";
for (Object o : params) {
if (o == null) {
paramsStr += "null;";
} else {
paramsStr += (o.toString() + ";");
}
}
logger.debug("PARAMETERS=[" + paramsStr + "]");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logParameters() {\n logWriter.add(\"Particle Swarm Optimization Algorithm\");\n logWriter.add(\"Parameters\");\n logWriter.add((String)(\"MAX_LENGTH/N: \"+MAX_LENGTH));\n logWriter.add((String)(\"STARTING_POPULATION: \"+pso.getParticleCount()));\n logWriter.add((String)(\"MAX_EPOCHS: \"+pso.getMaxEpoch()));\n logWriter.add((String)(\"MAX_VELOCITY: \"+pso.getVmax()));\n logWriter.add((String)(\"MINIMUM_SHUFFLES: \"+pso.getShuffleMin()));\n logWriter.add((String)(\"MAXIMUM_SHUFFLES: \"+pso.getShuffleMax()));\n logWriter.add(\"\");\n\t}",
"private void listParameters(JavaSamplerContext context)\n {\n if (getLogger().isDebugEnabled())\n {\n Iterator argsIt = context.getParameterNamesIterator();\n while (argsIt.hasNext())\n {\n String name = (String) argsIt.next();\n getLogger().debug(name + \"=\" + context.getParameter(name));\n }\n }\n }",
"public String dumpServiceParameters() {\n String[] arr = this.getParameterArr();\n StringBuffer buf = new StringBuffer();\n buf.append(this.className);\n if (arr.length > 0) buf.append(',');\n\n char ch = ',';\n for (int i=0; i< arr.length; i++) {\n buf.append(arr[i]);\n if (ch == ',') ch ='='; else ch = ',';\n if (i !=arr.length-1) buf.append(ch);\n }\n return buf.toString();\n }",
"public static void debugParams(final Variable_set params) throws Exception {\n if (_doDebug && params != null && params.count() > 0) {\n String[] names = params.names().split(\";\");\n for (String name : names) {\n LOGGER.info(\"debugParams : \" + name + \" = \" + params.value(name));\n\n }\n }\n }",
"public String toString(){\r\n\t\t\r\n\t\tString x =\"\";\r\n\t\t\r\n\t\tfor(int i=0; i < param.size() ; i++ ){\r\n\t\t\t\r\n\t\t\tx += param.get(i) + \"\\n\" ; \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn x;\r\n\t}",
"public String paramString() {\n\t\tString tail = super.paramString();\n\t\ttail = tail.substring(tail.indexOf(')') + 1);\n\t\treturn \"points=\" + points + \", lineWidth=\" + getLineWidth() + tail;\n\t}",
"public void printParameterListToOut(Vector<ProcedureParameter> list) {\r\n\t\tfinal char delimiter = ':';\r\n\t\tfor (ProcedureParameter procedureParameter : list) {\r\n\t\t\tSystem.out.println(paramTag + procedureParameter.name + delimiter\r\n\t\t\t\t\t+ procedureParameter.dataType + delimiter\r\n\t\t\t\t\t+ procedureParameter.defaultvalue);\r\n\t\t}\r\n\r\n\r\n\t\t//\t\tEnumeration<ProcedureParameter> en = list.elements();\r\n\t\t//\t\twhile (en.hasMoreElements()) {\r\n\t\t//\t\t\tProcedureParameter procedureParameter = (ProcedureParameter) en\r\n\t\t//\t\t\t\t\t.nextElement();\r\n\t\t//\t\t\tSystem.out.println(paramTag + procedureParameter.name + delimiter\r\n\t\t//\t\t\t\t\t+ procedureParameter.dataType + delimiter\r\n\t\t//\t\t\t\t\t+ procedureParameter.defaultvalue);\r\n\t\t//\t\t}\r\n\t}",
"@JsonIgnore\r\n\tpublic String getParameterValuesAsString() {\r\n\t\tif (parameterValues == null || parameterValues.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\tIterator it = parameterValues.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tString aValue = (String) it.next();\r\n\t\t\tbuffer.append(aValue);\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tbuffer.append(\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getParameterGroupName() != null) sb.append(\"ParameterGroupName: \" + getParameterGroupName() + \",\");\n if (getMaxRecords() != null) sb.append(\"MaxRecords: \" + getMaxRecords() + \",\");\n if (getMarker() != null) sb.append(\"Marker: \" + getMarker() + \",\");\n if (getTagKeys() != null) sb.append(\"TagKeys: \" + getTagKeys() + \",\");\n if (getTagValues() != null) sb.append(\"TagValues: \" + getTagValues() );\n sb.append(\"}\");\n return sb.toString();\n }",
"protected String paramString() {\n return super.paramString() + \",\" + \"caretColor=\" + caretColor + \",\"\n + \"disabledTextColor=\" + disabledTextColor + \",\" + \"editable=\"\n + isEditable + \",\" + \"margin=\" + margin + \",\"\n + \"selectedTextColor=\" + selectedTextColor + \",\"\n + \"selectionColor=\" + selectionColor;\n\n }",
"private void printLogDetalhesParametrosEnviados(Map<String, String> checkoutDetails){\n\t\tlog.info(\"PARAMETROS ENVIADOS PARA CLASSE CheckoutServlet.java - checkoutDetails\");\n\t\tcheckoutDetails.forEach((param, valor) -> log.info(param+\"=\"+valor));\n\t}",
"private static void print(final String format, final Object...params) {\n // we prefix all our messages with \">>> \" so as to distinguish them from the driver, node and client messages\n final String msg = String.format(\">>> \" + format, params);\n log.info(msg);\n System.out.println(msg);\n }",
"public String getParameters() {\n if (parameters == null) {\n return null;\n }\n return new JSONObject(parameters).toString();\n }",
"String getParamsAsString();",
"public String getParameters() {\r\n\t\t\r\n\t\tString strLength = String.valueOf(length);\r\n\t\tString strWidth = String.valueOf(width);\r\n\t\tString strHeight = String.valueOf(height);\r\n\t\t\r\n\t\treturn \"Length: \" + strLength + \"\\nWidth: \" + strWidth + \"\\nHeight: \" + strHeight;\r\n\t}",
"public String toString() {\n return getClass().getName() + \"[\" + paramString() + \"]\";\n }",
"java.lang.String getParameterValue();",
"public abstract String paramsToString();",
"public String parameterListToString(){\n StringBuilder sb = new StringBuilder();\n for (String parameter : parameterList){\n sb.append(parameter);\n if (!parameter.equals(parameterList.get(parameterList.size() - 1))){\n sb.append(\", \");\n }\n }\n return sb.toString();\n }",
"public void logAllPossibleKeysWithValue() {\n log.info(\"Log all possible keys with value:\");\n log.info(mapToString(context));\n }",
"private static String actualParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(\"p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"ParameterList getParameters();",
"protected String paramString() {\n String horizontalAlignmentString;\n if (horizontalAlignment == LEFT) {\n\t horizontalAlignmentString = \"LEFT\";\n\t} else if (horizontalAlignment == CENTER) {\n\t horizontalAlignmentString = \"CENTER\";\n\t} else if (horizontalAlignment == RIGHT) {\n\t horizontalAlignmentString = \"RIGHT\";\n\t} else if (horizontalAlignment == LEADING) {\n\t horizontalAlignmentString = \"LEADING\";\n\t} else if (horizontalAlignment == TRAILING) {\n\t horizontalAlignmentString = \"TRAILING\";\n\t} else horizontalAlignmentString = \"\";\n String commandString = (command != null ?\n\t\t\t\tcommand : \"\");\n\n return super.paramString() +\n \",columns=\" + columns +\n \",columnWidth=\" + columnWidth +\n \",command=\" + commandString +\n \",horizontalAlignment=\" + horizontalAlignmentString;\n }",
"String [] getParameters();",
"public void SvdParameters() {\n\n\t\tSystem.out.print(\"p |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6d\", i);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Max error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", maxerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Mean error |\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tSystem.out.printf(\"%6.1f\", meanerror[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(\"Compression,%|\");\n\t\tfor (int i = 0; i < rank; i++) {\n\t\t\tif (ratio[i] > 0)\n\t\t\t\tSystem.out.printf(\"%6.1f\", ratio[i]);\n\t\t\telse\n\t\t\t\tSystem.out.printf(\" n/a \");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getInvalidLabels() != null)\n sb.append(\"InvalidLabels: \").append(getInvalidLabels()).append(\",\");\n if (getParameterVersion() != null)\n sb.append(\"ParameterVersion: \").append(getParameterVersion());\n sb.append(\"}\");\n return sb.toString();\n }",
"@DISPID(1610940429) //= 0x6005000d. The runtime will prefer the VTID if present\n @VTID(35)\n Parameters parameters();",
"String getExampleParameters();",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getHeaderParameters() != null)\n sb.append(\"HeaderParameters: \").append(getHeaderParameters()).append(\",\");\n if (getQueryStringParameters() != null)\n sb.append(\"QueryStringParameters: \").append(getQueryStringParameters()).append(\",\");\n if (getBodyParameters() != null)\n sb.append(\"BodyParameters: \").append(getBodyParameters());\n sb.append(\"}\");\n return sb.toString();\n }",
"public String getParameters() {\n return this.Parameters;\n }",
"public String toString() {\n\t\treturn this.getName() + m_parameterString;\n\t}",
"public static void display() { System.err.println(\"Train parameters: smooth=\" + smoothing + \" PA=\" + PA + \" GPA=\" + gPA + \" selSplit=\" + selectiveSplit + \" (\" + selectiveSplitCutOff + (deleteSplitters != null ? \"; deleting \" + deleteSplitters : \"\") + \")\" + \" mUnary=\" + markUnary + \" mUnaryTags=\" + markUnaryTags + \" sPPT=\" + splitPrePreT + \" tagPA=\" + tagPA + \" tagSelSplit=\" + tagSelectiveSplit + \" (\" + tagSelectiveSplitCutOff + \")\" + \" rightRec=\" + rightRec + \" leftRec=\" + leftRec + \" xOverX=\" + xOverX + \" collinsPunc=\" + collinsPunc + \" markov=\" + markovFactor + \" mOrd=\" + markovOrder + \" hSelSplit=\" + hSelSplit + \" (\" + HSEL_CUT + \")\" + \" compactGrammar=\" + compactGrammar() + \" leaveItAll=\" + leaveItAll + \" postPA=\" + postPA + \" postGPA=\" + postGPA + \" selPSplit=\" + selectivePostSplit + \" (\" + selectivePostSplitCutOff + \")\" + \" tagSelPSplit=\" + tagSelectivePostSplit + \" (\" + tagSelectivePostSplitCutOff + \")\" + \" postSplitWithBase=\" + postSplitWithBaseCategory + \" fractionBeforeUnseenCounting=\" + fractionBeforeUnseenCounting + \" openClassTypesThreshold=\" + openClassTypesThreshold); }",
"public void printDetails (StringBuilder param)\r\n {\r\n System.out.println(\"The stringBuilder is \"+ param +\" the length is \"+ param.length()+\" and the capacity is \"+ param.capacity());\r\n }",
"@Override\n public String getParameters() {\n return parameters;\n }",
"void setParameters() {\n\t\t\n\t}",
"public String print() {\n\n String returnString = \"\";\n\n if (kv1 != null) {\n returnString += kv1.toString();\n }\n\n if (kv2 != null) {\n returnString += \" \" + kv2.toString();\n }\n\n return returnString;\n }",
"public static void print(Object ... strings)\n {\n if(!info) return;\n for(Object s: strings) \n debugger.log.print((s != null) ? s.toString() : \"null\");\n }",
"@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}",
"public static void printSeLionConfigValues() {\n SeLionLogger.getLogger().entering();\n StringBuilder builder = new StringBuilder(\"SeLion configuration: {\");\n boolean isFirst = true;\n for (ConfigProperty configProperty : ConfigProperty.values()) {\n if (!isFirst) {\n builder.append(\", \");\n }\n builder.append(String.format(\"(%s: %s)\", configProperty,\n Config.getConfig().getString(configProperty.getName())));\n isFirst = false;\n }\n builder.append(\"}\\n\");\n SeLionLogger.getLogger().info(builder.toString());\n SeLionLogger.getLogger().exiting();\n }",
"@Override\n\tprotected String getParameters()\n\t{\n\t\tString fields = \" ?, ?, ?, ?, ?, ? \";\n\t\treturn fields;\n\t}",
"final void getParameters()\r\n {\r\n hostName=getParameter(\"hostname\");\r\n\tIPAddress=getParameter(\"IPAddress\");\r\n\tString num=getParameter(\"maxSearch\");\r\n\tString arg=getParameter(\"debug\");\r\n\tserver=getParameter(\"server\");\r\n\tindexName=getParameter(\"indexName\");\r\n\tString colour=getParameter(\"bgColour\");\r\n\r\n\tif(colour==null)\r\n\t{\r\n\t bgColour=Color.lightGray;\r\n }\r\n else\r\n\t{\r\n\t try\r\n\t {\r\n\t bgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t bgColour=Color.lightGray;\r\n\t }\r\n\t}\r\n\t\r\n\tcolour=getParameter(\"fgColour\");\r\n\tif(colour==null)\r\n\t{\r\n\t fgColour=Color.black;\r\n\t}\r\n\telse\r\n\t{\r\n\t try\r\n\t {\r\n\t fgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t fgColour=Color.black;\r\n\t }\r\n\t}\r\n\r\n\t//Check for missing parameters.\r\n\tif(hostName==null && server==null)\r\n\t{\r\n\t statusArea.setText(\"Error-no host/server\");\r\n\t hostName=\"none\";\r\n\t}\r\n\r\n\tmaxSearch=(num == null) ? MAX_NUMBER_PAGES : Integer.parseInt(num);\r\n }",
"protected void printValConfig(){\n\t\t//System.out.println(\"writing values\");\n\t\tif(valueFxn.compareToIgnoreCase(\"additive\")==0){\n\t\t\tprintAdditive();\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"schedule\")==0){\n\t\t\tprintSchedule();\n\n\n\t\t}else if(valueFxn.compareToIgnoreCase(\"contract\")==0){\n\t\t\tprintContracts();\n\n\t\t}else{\n\t\t\tSystem.out.println(\"Value function not set correctly.\");\n\t\t}\n\t}",
"public void getParameters(Parameters parameters) {\n\n\t}",
"@Override\n public void logParameter(String parameterName, Object paramValue, ExperimentContext context) {\n if (getLogger().isDebugEnabled()) {\n getLogger().debug(\"logParameter {} = {}, context: {}\", parameterName, paramValue, context);\n }\n\n sendSynchronously(restApiClient::logParameter,\n createLogParamRequest(parameterName, paramValue, context));\n }",
"public String getParams() {\r\n\t\treturn this.params;\r\n\t}",
"public void getParameters(Parameters parameters) {\n\n }",
"public void debugPrint() {\n\t\tsuper.debugPrint();\n\t\tSystem.out.println(\"requestID: \" + requestID);\n\t\tSystem.out.println(\"jzn: \" + jzn);\n\t\tif (jzn != null) {\n\t\t\tfor (int i = 0; i < jzn.length; i++) {\n\t\t\t\tSystem.out.println(i + \": \" + (jzn[i] != null ? jzn[i].length() : 0));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"jzt: \" + jzt);\t\t\n\t}",
"private void logParameter(@NonNull final String googleCalendarId,\n @NonNull final YearMonth targetYearMonth, final int targetRange) {\n\n log.info(\"CalendarTransfer is executed with following parameter\");\n log.info(StringUtils.repeat('-', Constants.SEP_LENGTH));\n log.info(\"# From: \");\n this.calendarLoader.getConnectionInfo()\n .entrySet()\n .stream()\n .map(entry -> String.format(\"%s: %s\", entry.getKey(), entry.getValue()))\n .forEach(log::info);\n log.info(StringUtils.EMPTY);\n log.info(\"# To: \");\n log.info(\"Google Calendar ID: \" + googleCalendarId);\n log.info(StringUtils.EMPTY);\n log.info(\"# Target\");\n log.info(\"YearMonth: \" + targetYearMonth);\n log.info(\"TargetRange: \" + targetRange);\n log.info(StringUtils.repeat('-', Constants.SEP_LENGTH));\n }",
"public void logMsg(String msg, String... param) {\n messageContainer.setVisible(true);\n messageContainer.setText(msg);\n for (String string : param) {\n System.out.println(string); \n }\n }",
"private void listParameters(String methodName, JavaSamplerContext context) {\n\t\tIterator<String> iter = context.getParameterNamesIterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tString name = iter.next();\n\t\t\tlog.debug(\"inside {}, name {} = {}\",\n\t\t\t\t\tnew Object[] { methodName, name, context.getParameter(name) });\n\t\t}\n\t}",
"public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}",
"public void setParameters(String parameters);",
"public String getScriptOfParameters() {\r\n\t\tString str = \"\";\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tstr += var.getName() + \",\";\r\n\t\t}\r\n\t\tif (str.endsWith(\",\")) {\r\n\t\t\tstr = str.substring(0, str.length() - 1);\r\n\t\t}\r\n\t\treturn str;\r\n\t}",
"@Override\r\n public String toString() {\r\n return \"Parameter Code: \" + this.code + \"\\nDescription: \" + this.description + \"\\nCategory Description: \" + this.categoryDescription;\r\n }",
"public String parameterDetails()\r\n\t{\r\n\t\treturn m_ls.parameterDetails();\r\n\t}",
"private String getJobContextParams(Set<Entry<String, Object>> params) {\n\n\t\tStringBuilder protocol = new StringBuilder();\n\t\tprotocol.append(\"Contenxt Parameters: \\n\");\n\t\tfor (Entry<String, Object> entry : params) {\n\t\t\tprotocol.append(\" \").append(entry.getKey()).append(\"=\").append(entry.getValue()).append(\"\\n\");\n\t\t}\n\n\t\tprotocol.append(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++ \\n\");\n\n\t\treturn protocol.toString();\n\t}",
"public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }",
"@Override\n public String toString()\n {\n final StringBuilder sb = new StringBuilder(12);\n sb.append('(');\n sb.append(this.parameter.toString());\n sb.append(\")%\");\n return sb.toString();\n }",
"public void printFields(){\n\t\tif(this.returnValueType==null){\n\t\t\tthis.returnValueType=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.className=\"\";\n\t\t}\n\t\tif(this.returnValueType==null){\n\t\t\tthis.methodName=\"\";\n\t\t}\n\t\tSystem.out.print(\"\t\"+this.address+\"\t\"+this.returnValueType+\" \"+this.className+\".\"+this.methodName+\" \");\n\t\tSystem.out.print(\"(\");\n\t\tif(this.hasParameter()){\n\t\t\t\n\t\t\tfor(int j=0;j<this.parameterType.length;j++){\n\t\t\t\tSystem.out.print(this.parameterType[j]);\n\t\t\t\tif(j!=(this.parameterType.length-1)){\n\t\t\t\t\tSystem.out.print(\", \");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\tSystem.out.println(\")\");\n\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }",
"public void setParameters(Parameters params) {\n Log.e(TAG, \"setParameters()\");\n //params.dump();\n native_setParameters(params.flatten());\n }",
"public void setParameters(String parameters){\n this.parameters=parameters;\n }",
"private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}",
"protected String getParameterSeparator() {\n return \", \";\n }",
"public void report( StringBuffer buffer, String lead )\r\n {\r\n super.report( buffer, lead );\r\n buffer.append( \"\\n\" + lead + \"params: \" + m_params.length );\r\n }",
"public String getParameters() {\n\t\treturn this.appTda_.getParameters();\n\t}",
"@Test\r\n public void test_logEntrance1_OneParameter() throws Exception {\r\n paramNames = new String[] {\"p1\"};\r\n paramValues = new Object[] {123};\r\n LoggingWrapperUtility.logEntrance(log, signature, paramNames, paramValues);\r\n\r\n TestsHelper.checkLog(\"logEntrance\",\r\n \"DEBUG\",\r\n \"Entering method [method_signature].\",\r\n \"Input parameters [p1:123]\");\r\n }",
"public List<String> getParametersLabel() {\n\t\treturn PARAMETERS;\n\t}",
"void printExtremeParamValuesWhereAndWhen(String paramName, Station minStation, Sensor minSensor, MeasurementValue minValue, Station maxStation, Sensor maxSensor, MeasurementValue maxValue);",
"static void PrintVarValues(String s){\n System.out.println(s);\n }",
"public Parameters getParameters();",
"private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}",
"Map<String, String> getParameters();",
"private String createBasicParameterRepresentation(\n BaseSignatureTestData baseData) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"<dl>\");\n sb.append(createDescription(\"Input file\", baseData.getPdfFile()));\n sb.append(createDescription(\"Output file\", baseData.getOutputFile()));\n sb.append(createDescription(\"Signature profile\", baseData.getProfilID()));\n sb.append(createDescription(\"Connector Type\", baseData\n .getConnectorData().getConnectorType()));\n if (baseData.getConnectorData().getConnectorParameters().size() > 0) {\n StringBuilder connectorParameters = new StringBuilder();\n connectorParameters.append(\"<dl class=\\\"dl-horizontal\\\">\");\n for (Entry<String, String> e : baseData.getConnectorData()\n .getConnectorParameters().entrySet())\n connectorParameters.append(createDescription(e.getKey(),\n e.getValue()));\n connectorParameters.append(\"</dl>\");\n sb.append(createDescription(\"Connector Parameters\",\n connectorParameters.toString()));\n }\n sb.append(createDescription(\"Test Type\", getTestType()));\n sb.append(\"</dl>\");\n return sb.toString();\n }",
"public void log(Object... vals) throws IOException;",
"private static String formalParametersToString(Class[] pts) {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < pts.length; i++) {\n result.append(getTypeName(pts[i])).append(\" p\").append(i);\n if (i < pts.length - 1)\n result.append(\",\");\n }\n return result.toString();\n }",
"public Properties getParameters() {\n\t\treturn null;\n\t}",
"public String getParamDefs() {\r\n return super.getParamDefs() + \", \" + SampledPolicy.paramNameTypes;\r\n }",
"List<PowreedCommandParameter> getParameters();",
"public void dump() {\n List<String> variableStrings = new ArrayList<>();\n for (int i = 1; i <= VARIABLE_COUNT; i++) {\n if (variables.containsKey(i)) {\n variableStrings.add(variables.get(i).toString());\n }\n }\n System.out.println(String.format(\"site %d - %s\", id, String.join(\", \", variableStrings)));\n }",
"public String[] getParameters() {\r\n return parameters;\r\n }",
"protected String getVerboseParameter() {\n return verbose ? null : \"/quiet\";\n }",
"@Override\n\t\tpublic Object[] getParameters() {\n\t\t\treturn null;\n\t\t}",
"@Override\r\n public void setParameter(String parameters) {\r\n // dummy\r\n }",
"protected void logResult(@Nonnull final EncryptionParameters params) {\n if (log.isDebugEnabled()) {\n log.debug(\"Resolved EncryptionParameters:\");\n \n final Key keyTransportKey =\n CredentialSupport.extractEncryptionKey(params.getKeyTransportEncryptionCredential());\n if (keyTransportKey != null) {\n log.debug(\"\\tKey transport credential with key algorithm: {}\", keyTransportKey.getAlgorithm());\n } else {\n log.debug(\"\\tKey transport credential: null\"); \n }\n \n log.debug(\"\\tKey transport algorithm URI: {}\", params.getKeyTransportEncryptionAlgorithm()); \n \n if (params.getRSAOAEPParameters() != null) {\n log.debug(\"\\t\\tKey transport RSA OAEP digest method URI: {}\", \n params.getRSAOAEPParameters().getDigestMethod()); \n log.debug(\"\\t\\tKey transport RSA OAEP MGF URI: {}\", \n params.getRSAOAEPParameters().getMaskGenerationFunction()); \n log.debug(\"\\t\\tKey transport RSA OAEP OAEPparams: {}\", params.getRSAOAEPParameters().getOAEPParams()); \n }\n \n log.debug(\"\\tKey transport KeyInfoGenerator: {}\", \n params.getKeyTransportKeyInfoGenerator() != null ? \"present\" : \"null\");\n \n final Key dataKey = CredentialSupport.extractEncryptionKey(params.getDataEncryptionCredential());\n if (dataKey != null) {\n log.debug(\"\\tData encryption credential with key algorithm: {}\", dataKey.getAlgorithm());\n } else {\n log.debug(\"\\tData encryption credential: null\"); \n }\n \n log.debug(\"\\tData encryption algorithm URI: {}\", params.getDataEncryptionAlgorithm());\n \n log.debug(\"\\tData encryption KeyInfoGenerator: {}\", \n params.getDataKeyInfoGenerator() != null ? \"present\" : \"null\");\n \n }\n }",
"@Test\r\n public void test_logEntrance2_OneParameter() throws Exception {\r\n paramNames = new String[] {\"p1\"};\r\n paramValues = new Object[] {123};\r\n LoggingWrapperUtility.logEntrance(log, signature, paramNames, paramValues, true, Level.INFO);\r\n\r\n TestsHelper.checkLog(\"logEntrance\",\r\n \"INFO\",\r\n \"] Entering method [method_signature].\",\r\n \"Input parameters [p1:123]\");\r\n }",
"@Override\r\n\tpublic String getPrintArgs() {\n\t\treturn null;\r\n\t}",
"public Map getParameters();",
"public String[] getParameters() {\n return parameters;\n }",
"public static void dumpRequestParameters( ServletRequest request, StringBuilder b ) {\n b.append( \"Request Parameters:\" );\n b.append( LF );\n Map<String, String[]> sortedParams = sortRequestParameters( request );\n for ( Map.Entry<String, String[]> entry : sortedParams.entrySet() ) {\n StringBuilder builder = new StringBuilder();\n for ( String s : entry.getValue() ) {\n builder.append( s );\n builder.append( \", \" );\n }\n b.append( \" \" );\n b.append( entry.getKey() );\n b.append( \": \" );\n b.append( builder.toString() );\n b.append( LF );\n }\n b.append( \"---------------- End of Request Attributes\" );\n b.append( LF );\n }",
"public String param() {\n\tif (param_count >= params.size())\n\t return null;\n\treturn (String) params.elementAt(param_count++);\n }",
"@Override\n\tpublic void debug(String message, Object... params) {\n\n\t}",
"private void addParametersToWriter() {\n Set<Map.Entry<String, String>> set = params.entrySet();\n for (Map.Entry<String, String> me : set) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + me.getKey() + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\"Content-Type: text/plain; charset=\" + super.charset).append(\n LINE_FEED);\n writer.append(LINE_FEED);\n writer.append(me.getValue()).append(LINE_FEED);\n writer.flush();\n }\n }",
"public String[] getParameters() {\n\t\treturn parameters;\n\t}",
"@Override\n\tpublic String[] getParameterValues(String arg0) {\n\t\treturn null;\n\t}",
"private static void print(String valNames, Object... objects) {\n\t\tvalNames = valNames.trim();\n\t\tString[] arr = valNames.split(\":\");\n\t\tString format = valNames + \" \";\n\t\tString prefix = \"\";\n\t\tfor(String str : arr ) {\n\t\t\tformat += prefix + \"%2s\";\n\t\t\tprefix = \":\";\n\t\t}\t\t\n\t\tSystem.out.println(\"\"+String.format(format, objects)); \n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn MoreObjects.toStringHelper(this) //\r\n\t\t\t\t.add(\"id\", getId()) //\r\n\t\t\t\t.add(\"parameter\", getParameter()) //\r\n\t\t\t\t.add(\"value\", getValue()) //\r\n\t\t\t\t.add(\"hieraAddress\", getHieraAddress()) //\r\n\t\t\t\t.toString();\r\n\t}",
"public void printConfig();",
"@Override\n\tvoid prettyPrint() {\n\t\tMain.log.prettyPrint(name );\n\t}",
"protected void logResult(@Nonnull final EncryptionParameters params) {\n if (log.isDebugEnabled()) {\n log.debug(\"Resolved EncryptionParameters:\");\n \n final Credential keyTransportCred = params.getKeyTransportEncryptionCredential();\n final Key keyTransportKey = keyTransportCred != null\n ? CredentialSupport.extractEncryptionKey(keyTransportCred) : null;\n if (keyTransportKey != null) {\n log.debug(\"\\tKey transport credential with key algorithm: {}\", keyTransportKey.getAlgorithm());\n } else {\n log.debug(\"\\tKey transport credential: null\"); \n }\n \n log.debug(\"\\tKey transport algorithm URI: {}\", params.getKeyTransportEncryptionAlgorithm()); \n \n final RSAOAEPParameters oaep = params.getRSAOAEPParameters();\n if (oaep != null) {\n log.debug(\"\\t\\tKey transport RSA OAEP digest method URI: {}\", oaep.getDigestMethod()); \n log.debug(\"\\t\\tKey transport RSA OAEP MGF URI: {}\", oaep.getMaskGenerationFunction()); \n log.debug(\"\\t\\tKey transport RSA OAEP OAEPparams: {}\", oaep.getOAEPParams()); \n }\n \n KeyInfoGenerator generator = params.getKeyTransportKeyInfoGenerator();\n log.debug(\"\\tKey transport KeyInfoGenerator: {}\",\n generator != null ? generator.getClass().getName() : \"null\");\n \n final Credential dataEncryptionCred = params.getDataEncryptionCredential();\n final Key dataKey = dataEncryptionCred != null\n ? CredentialSupport.extractEncryptionKey(dataEncryptionCred) : null;\n if (dataKey != null) {\n log.debug(\"\\tData encryption credential with key algorithm: {}\", dataKey.getAlgorithm());\n } else {\n log.debug(\"\\tData encryption credential: null\"); \n }\n \n log.debug(\"\\tData encryption algorithm URI: {}\", params.getDataEncryptionAlgorithm());\n \n generator = params.getDataKeyInfoGenerator();\n log.debug(\"\\tData encryption KeyInfoGenerator: {}\",\n generator != null ? generator.getClass().getName() : \"null\");\n }\n }"
] | [
"0.7324834",
"0.67501515",
"0.62711763",
"0.6157992",
"0.6109514",
"0.60537094",
"0.601483",
"0.60146683",
"0.5995564",
"0.5908512",
"0.58178246",
"0.5811988",
"0.58067936",
"0.57518953",
"0.57357854",
"0.5718246",
"0.57033503",
"0.5688894",
"0.566537",
"0.56316125",
"0.5620613",
"0.5597632",
"0.55922717",
"0.5591016",
"0.5531576",
"0.55265546",
"0.54942405",
"0.5492825",
"0.5482985",
"0.54737383",
"0.545169",
"0.5447806",
"0.5423479",
"0.54185224",
"0.5395255",
"0.53839916",
"0.5383565",
"0.5378617",
"0.5378031",
"0.53643745",
"0.53597695",
"0.53442043",
"0.53414595",
"0.53229684",
"0.5315123",
"0.5310823",
"0.5307488",
"0.5305262",
"0.52931327",
"0.5291136",
"0.528836",
"0.52751625",
"0.52750516",
"0.5270133",
"0.5266527",
"0.52540576",
"0.5250626",
"0.5250511",
"0.5238621",
"0.52303237",
"0.5220848",
"0.52195746",
"0.52069736",
"0.5205731",
"0.5196278",
"0.5195871",
"0.5195196",
"0.5193907",
"0.5185858",
"0.5173987",
"0.51688296",
"0.5159396",
"0.51545477",
"0.5141874",
"0.51382244",
"0.51306933",
"0.51254576",
"0.5123325",
"0.51221055",
"0.5121388",
"0.5113392",
"0.5097063",
"0.50840855",
"0.50820357",
"0.507996",
"0.50797564",
"0.50664276",
"0.50602365",
"0.50587815",
"0.5044815",
"0.50388515",
"0.5036484",
"0.5029178",
"0.50234693",
"0.5001908",
"0.5000356",
"0.49987644",
"0.49935818",
"0.4987",
"0.49815086"
] | 0.7492761 | 0 |
/ Call this from the main activity to send data to the remote device | public void envia4Pigor(String dadosEnviar) {
byte[] msgBuffer = dadosEnviar.getBytes();
try {
mmOutStream.write(msgBuffer);
} catch (IOException e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }",
"void sendData(String msg) throws IOException\n {\n if ( msg.length() == 0 ) return;\n//\n msg += \"\\n\";\n// Log.d(msg, msg);\n if (outputStream != null)\n outputStream.write(msg.getBytes());\n// myLabel.setText(\"Data Sent\");\n// myTextbox.setText(\" \");\n }",
"public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmConnectedThread.write(\"send\");\n\t\t\t\t\tmConnectedThread.writeFile();\n\t\t\t\t}",
"private void send(final String data) {\n\t\tif (null != PinPadController) {\n\t\t\tnew Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tPinPadController.PINPad_sendToPinPad(data);\n\t\t\t\t};\n\t\t\t}.start();\n\t\t\tToast.makeText(this, \"send\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"void sendData(String request) throws IOException {\n if (mmDevice == null) {\n Log.d(TAG, \"No device set\");\n }\n\n Log.d(TAG, \"Request is \" + request);\n if (mmOutputStream != null){\n mmOutputStream.write(request.getBytes(Charset.forName(\"UTF-8\")));\n }\n\n if (false && request.contains(\"travel\")) {\n closeBT();\n openBT();\n }\n }",
"public void sendDataToESP(String data){\n\n\n URL remoteurl = null;\n String baseurl = \"http://\"+IpAddress+\"/\";\n String urlString = baseurl + data;\n System.out.println(urlString);\n try {\n remoteurl = new URL(urlString);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n new AutoActivity.pingit().execute(remoteurl);\n }",
"@Override\n public void run() {\n try {\n int PORT = 10002; //서버에서 설정한 PORT 번호\n String ip=\"192.168.0.45\"; //서버 단말기의 IP주소..\n //본 예제는 Genymotion 에뮬레이터 2대로 테스한 예제입니다.\n //Genymotion을 실행하면 각 에뮬레이터의 IP를 확인할 수 있습니다.\n\n Socket socket; //클라이언트의 소켓\n DataInputStream is;\n DataOutputStream os;\n\n //서버와 연결하는 소켓 생성..\n socket = new Socket(InetAddress.getByName(ip), PORT);\n\n //여기까지 왔다는 것을 예외가 발생하지 않았다는 것이므로 소켓 연결 성공..\n //서버와 메세지를 주고받을 통로 구축\n is = new DataInputStream(socket.getInputStream());\n os = new DataOutputStream(socket.getOutputStream());\n\n Gson gson = new Gson();\n ArrayList<SendCommunication> communications = new ArrayList<SendCommunication>();\n communications.add(new SendCommunication(insertOrderMenu, insertOrderGoods));\n\n String json = gson.toJson(communications);\n\n os.writeUTF(json); //서버로 메세지 보내기.UTF 방식으로(한글 전송가능...)\n os.flush(); //다음 메세지 전송을 위해 연결통로의 버퍼를 지워주는 메소드..\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n public void run() {\n try {\n int PORT = 10002; //서버에서 설정한 PORT 번호\n String ip=\"192.168.0.46\"; //서버 단말기의 IP주소..\n //본 예제는 Genymotion 에뮬레이터 2대로 테스한 예제입니다.\n //Genymotion을 실행하면 각 에뮬레이터의 IP를 확인할 수 있습니다.\n\n Socket socket; //클라이언트의 소켓\n DataInputStream is;\n DataOutputStream os;\n\n //서버와 연결하는 소켓 생성..\n socket = new Socket(InetAddress.getByName(ip), PORT);\n\n //여기까지 왔다는 것을 예외가 발생하지 않았다는 것이므로 소켓 연결 성공..\n //서버와 메세지를 주고받을 통로 구축\n is = new DataInputStream(socket.getInputStream());\n os = new DataOutputStream(socket.getOutputStream());\n\n Gson gson = new Gson();\n ArrayList<SendCommunication> communications = new ArrayList<SendCommunication>();\n communications.add(new SendCommunication(insertOrderMenu, insertOrderGoods));\n\n String json = gson.toJson(communications);\n\n os.writeUTF(json); //서버로 메세지 보내기.UTF 방식으로(한글 전송가능...)\n os.flush(); //다음 메세지 전송을 위해 연결통로의 버퍼를 지워주는 메소드..\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public void transmit()\n { \n try\n {\n JSch jsch=new JSch(); //object that allows for making ssh connections\n //Log into the pi\n Session session=jsch.getSession(USERNAME, HOSTNAME, 22); //pi defaults to using port 22 \n session.setPassword(PASSWORD);\n session.setConfig(\"StrictHostKeyChecking\", \"no\"); //necessary to access the command line easily\n \n session.connect(1000);//connect to the pi\n \n Channel channel = session.openChannel(\"exec\");//set session to be a command line \n ((ChannelExec)channel).setCommand(this.command); //send command to the pi\n \n channel.setInputStream(System.in); \n channel.setOutputStream(System.out);\n //connect to the pi so the command can go through\n channel.connect(1000);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(frame, \"Error connecting to infrared light\", \"Error Message\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void onSend(View v){\n Socket msocket;\n try {\n msocket = IO.socket(\"http://10.0.2.2:9080/\");\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n //msocket=cApp.getSocket();\n msocket.connect();\n msocket.emit(\"sendTest\",\"fkg\");\n msocket.on(\"sendTest\",onSendTest);\n }",
"private void sendData() {\n final ByteBuf data = Unpooled.buffer();\n data.writeShort(input);\n data.writeShort(output);\n getCasing().sendData(getFace(), data, DATA_TYPE_UPDATE);\n }",
"@Override\n public void run() {\n if (socket != null) {\n byte b0 = get_sendbyte0();\n byte b1 = get_sendbyte1();\n Log.e(\"handler\", String.valueOf(b0) + String.valueOf(b1));\n if (outputStream == null) {\n try {\n outputStream = socket.getOutputStream();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n try {\n outputStream.write(new byte[]{(byte) 1, b0, b1, (byte) 1}); /*1, b0, b1, 1*/\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n\n }",
"@Override\n\t\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\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//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\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\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\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\t\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\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\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\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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\n\t\t\t\t\t\t}",
"@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"private void sendData(String data) {\n\n if (!socket.isConnected() || socket.isClosed()) {\n Toast.makeText(getApplicationContext(), \"Joystick is disconnected...\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n\t\ttry {\n\t\t\tOutputStream outputStream = socket.getOutputStream();\n\n byte [] arr = data.getBytes();\n byte [] cpy = ByteBuffer.allocate(arr.length+1).array();\n\n for (int i = 0; i < arr.length; i++) {\n cpy[i] = arr[i];\n }\n\n //Terminating the string with null character\n cpy[arr.length] = 0;\n\n outputStream.write(cpy);\n\t\t\toutputStream.flush();\n\n Log.d(TAG, \"Sending data \" + data);\n\t\t} catch (IOException e) {\n Log.e(TAG, \"IOException while sending data \"\n + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (NullPointerException e) {\n Log.e(TAG, \"NullPointerException while sending data \"\n + e.getMessage());\n\t\t}\n\t}",
"public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}",
"private void sendData() {\n\n Thread update = new Thread() {\n public void run() {\n while (opModeIsActive() && (tfod != null)) {\n path.updateTFODData(recognize());\n path.updateHeading();\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n }\n if (isStopRequested() && tfod != null)\n tfod.shutdown();\n }\n }\n };\n update.start();\n }",
"public void run(){\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length, ip, port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void onClick(View v) {\n mConnectedThread.write(\"1\"); // Send \"1\" via Bluetooth\n Toast.makeText(getBaseContext(), \"Turn on LED\", Toast.LENGTH_SHORT).show();\n }",
"public void run() {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(data,data.length,ip,port);\n\t\t\t\ttry {\n\t\t\t\t\tsocket.send(packet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }",
"public void sendMsgToClient() {\n\n try {\n\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true);\n\n Log.d(TAG, \"The transmitted data:\" + msg);\n\n writer.println(msg);\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }",
"private void bluetoothSendMsg(String s) {\n byte [] msgOnBuf;\n msgOnBuf = s.getBytes();\n try {\n outStream.write(msgOnBuf);\n } catch (IOException e) {\n Log.d(TAG,\"send message fail!\");\n }\n }",
"public void onClick(View v) {\n setBottonSingleTest();\n viewPager.setCurrentItem(0);\n\n\n try{\n DatagramSocket socket = new DatagramSocket();\n byte[] buf = \"hello world\".getBytes();\n\n DatagramPacket packet = new DatagramPacket(buf,\n buf.length,\n InetAddress.getByName(\"255.255.255.255\"),\n 666);\n //给服务端发送数据\n socket.send(packet);\n socket.close();\n }catch (IOException e){\n System.out.println(e);\n }\n }",
"private void sendTextRequest() {\n\t\t\t\t\tfinal Thread textingThread = new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\ttextsent=0;\n\t\t\t\t\t\t\t\t\tesocket = new Socket(TestConnection.ip, TestConnection.port);\n\n\t\t\t\t\t\t\t\t// Log.e(\"ClientActivity\", \"C: Sending command.\");\n\t\t\t\t\t\t\t\t\tedos=new DataOutputStream(esocket.getOutputStream());\n\t\t\t\t\t\t\t\t\tedis=new DataInputStream(esocket.getInputStream());\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\tedos.writeUTF(\"DOUBT\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// \tif(TestConnection.username!=null)\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.username);\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.roll);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(TestConnection.macid);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etopic.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SUBJECT\n\t\t\t\t\t\t\t\t\tedos.writeUTF(etext.getText().toString()); // SEND\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// MESSAGE\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Sending imageflag\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//Image sending\n\t\t\t\t\t\t\t\t\tif(AudioMainActivity.imageflag!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tedos.writeUTF(\"send_image\");\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"send_image\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAudioMainActivity.imageflag=1;\n\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\tsendFile(filedp);\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\telse\n\t\t\t\t\t\t\t\t\t{edos.writeUTF(\"not_send_image\");\n\t\t\t\t\t\t\t\t\tLog.e(\"Image flag sent\",\"not_send_image\");\n\t\t\t\t\t\t\t\t\tString ifdone =edis.readUTF();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(ifdone.equals(\"not_done\"))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tFile filedp = new File(mypath+\"/dp_th.jpg\");\n\t\t\t\t\t\t\t\t\t\tsendFile(filedp);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"ZABARDASTI\",\"Image Sent\");\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\t\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\tfinal String msgServer = edis.readUTF(); // RECEIVE\n\t\t\t\t\t\t\t\t\tLog.e(\"Confirmation\", \"msgServer=\"+msgServer);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// CONFIRMATION\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// IF MESSAGE\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// RECEIVED BY\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// SERVER\n\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\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tif (msgServer.contains(\"received\")) {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this, \"Doubt Sent\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\temerdialog.dismiss();\n\t\t\t\t\t\t\t\t\t\t\t\ttextsent=1;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.doubt.add(etopic.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.textMessage.add(etext.getText().toString());\n\t\t\t\t\t\t\t\t\t\t\t\tAudioMainActivity.count=5-AudioMainActivity.doubt.size();\n\t\t\t\t\t\t\t\t\t\t\t\t//counter.setText(\"Doubts Remaining : \"+count);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(AudioDoubt.this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server Error! Doubt not sent!\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t//doubtSubject.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t//doubtText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t\tif (esocket != null) {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// close socket connection after using it\n\t\t\t\t\t\t\t\t\t\tesocket.close();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void sendFile(File file) throws IOException {\n\t\t\t\t\t FileInputStream fileIn = new FileInputStream(file);\n\t\t\t\t\t byte[] buf = new byte[Short.MAX_VALUE];\n\t\t\t\t\t int bytesRead; \n\t\t\t\t\t while( (bytesRead = fileIn.read(buf)) != -1 ) {\n\t\t\t\t\t dos.writeShort(bytesRead);\n\t\t\t\t\t dos.write(buf,0,bytesRead);\n\t\t\t\t\t }\n\t\t\t\t\t dos.writeShort(-1);\n\t\t\t\t\t fileIn.close();\n\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextingThread.start();\n\t\t\t\t\t\n\t\t\t\t\tThread textTimer=new Thread (new Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong startingtime = System.currentTimeMillis();\n\t\t\t\t\t\t\tlong endingtime = startingtime + 5*1000; // 60 seconds * 1000 ms/sec\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(textsent==1||System.currentTimeMillis() > endingtime)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(textsent!=1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttextingThread.interrupt();\n\t\t\t\t\t\t\t\t\t\tLog.e(\"Texting thread\",\"Thread Interrupted\");\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tebar.setVisibility(View.GONE);\n\t\t\t\t\t\t\t\t\t\t\t\tesend.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"Connection Error... Could not Send Doubt..\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t\t\t\t\tetopic.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\tetext.setEnabled(true);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\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\n\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\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\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\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\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}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\ttextTimer.start();\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\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"public void sendData(String data) {// send data\n\t\tthis.data = data;\n\t\tthis.start();// spin up a new thread to send data\n\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tDatagramSocket s=new DatagramSocket();\n\t\t\t\t\tInetAddress ipAd=InetAddress.getByName(ip);\n\t\t\t\t\tDatagramPacket dp=new DatagramPacket(pass2.getBytes(), pass2.getBytes().length\t, ipAd, 21111);\n\t\t\t\t\ts.send(dp);\n\t\t\t\t\tToast.makeText(getApplicationContext(), pass2.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t\t\ts.close();\n\t\t\t\t\t\n\t\t\t\t} catch (SocketException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException 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\t}",
"void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }",
"private void sendMessage() {\n Log.d(\"sender\", \"Broadcasting message\");\n Intent intent = new Intent(\"custom-event-name\");\n // You can also include some extra data.\n double[] destinationArray = {getDestination().latitude,getDestination().longitude};\n intent.putExtra(\"destination\", destinationArray);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"public void postData()\n\t{\n\t\tnew NetworkingTask().execute(message);\n\t}",
"static public void startSending(String add,int port,byte[] data,int mode){\n }",
"private void publish(String deviceAddress)\n {\n if(mMqttServiceBound)\n {\n try\n {\n TexTronicsDevice device = mTexTronicsList.get(deviceAddress);\n if(device != null)\n {\n // Get the byte array from the CSV file stored in the device\n byte[] buffer = IOUtil.readFile(device.getCsvFile());\n // Create a new string using device info and new byte array\n String json = MqttConnectionService.generateJson(device.getDate(),\n device.getDeviceAddress(),\n Choice.toString(device.getChoice()),\n device.getExerciseID(),\n device.getRoutineID(),\n new String(buffer));\n Log.d(\"SmartGlove\", \"JSON: \" + json);\n // Call the service to publish this string, now in JSON format\n mMqttService.publishMessage(json);\n String exe_nm = MainActivity.exercise_name;\n\n List<Integer> ids = new ArrayList<>();\n try{\n ids = UserRepository.getInstance(getApplicationContext()).getAllIdentities();\n }\n catch (Exception e){\n Log.e(TAG, \"onCreate: \", e);\n }\n\n int current = ids.size();\n\n Log.d(TAG, \"UpdateData: logging the data\");\n\n if (exe_nm.equals(\"Finger_Tap\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finTap_left(json,current);\n }\n else if (exe_nm.equals(\"Closed_Grip\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_opCl_left(json,current);\n }\n else if (exe_nm.equals(\"Hand_Flip\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_h_flip_left(json,current);\n }\n else if (exe_nm.equals(\"Finger_to_Nose\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finNose_left(json,current);\n }\n else if (exe_nm.equals(\"Hold_Hands_Out\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handout_left(json,current);\n }\n else if (exe_nm.equals(\"Resting_Hands_on_Thighs\") && deviceAddress.equals(\"LEFT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handrest_left(json,current);\n }\n else if (exe_nm.equals(\"Finger_Tap\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finTap_right(json,current);\n }\n else if (exe_nm.equals(\"Closed_Grip\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_opCl_right(json,current);\n }\n else if (exe_nm.equals(\"Hand_Flip\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_h_flip_right(json,current);\n }\n else if (exe_nm.equals(\"Finger_to_Nose\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_finNose_right(json,current);\n }\n else if (exe_nm.equals(\"Hold_Hands_Out\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handout_right(json,current);\n }\n else if (exe_nm.equals(\"Resting_Hands_on_Thighs\") && deviceAddress.equals(\"RIGHT_GLOVE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_handrest_right(json,current);\n }\n else if (exe_nm.equals(\"Heel_Stomp\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_heelStmp_right(json,current);\n }\n else if (exe_nm.equals(\"Toe_Tap\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_toeTap_right(json,current);\n }\n else if (exe_nm.equals(\"Walk_Steps\") && deviceAddress.equals(\"RIGHT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_gait_right(json,current);\n }\n else if (exe_nm.equals(\"Heel_Stomp\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_heelStmp_left(json,current);\n }\n else if (exe_nm.equals(\"Toe_Tap\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_toeTap_left(json,current);\n }\n else if (exe_nm.equals(\"Walk_Steps\") && deviceAddress.equals(\"LEFT_SHOE_ADDR\"))\n {\n UserRepository.getInstance(context).updateData_gait_left(json,current);\n }\n }\n else {\n Log.d(TAG, \"publish: Publish failed. Device is null\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n public void onSendTcp(Object obj) {\n mNetworkManager.sendTCPData(obj);\r\n }",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"public void send_data(int curr_portNo, String data_send) {\n\t\ttry {\n\t\t\tSocket baseSocket = new Socket(Content_Provider.ipAdd, curr_portNo);\n\t\t\tPrintWriter toPeer = new PrintWriter(new BufferedWriter(\n\t\t\t\t\tnew OutputStreamWriter(baseSocket.getOutputStream())), true);\n\t\t\ttoPeer.println(data_send);\n\t\t\tbaseSocket.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void sendData(byte[] data) {\r\n\t\t//send packet\r\n\t\ttry {\r\n\t\t\tout.write(data);\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void send( String data ) {\n SendRunnable sendRunnable = new SendRunnable( data );\n Thread sendThread = new Thread( sendRunnable );\n sendThread.start();\n }",
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"public void send(byte[] data) throws IOException {\n dataOutput.write(data);\n dataOutput.flush();\n }",
"@Override\r\n public void onResult(byte[] data)\r\n {\n StringBuffer sb = new StringBuffer();\r\n sb.append(getString(R.string.external_device_recv_data)).append(\"\\n\");\r\n sb.append(new String(data)).append(\"\\n\");\r\n \r\n McRecvOnBoard = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mRecvTextView.setText(McRecvOnBoard);\r\n }\r\n });\r\n }",
"void send();",
"protected void sendDataToRobot(byte[] data) {\n\t\thandler.sendData(data);\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tLog.v(TAG,\"connect to server...\");\n\t\t\t\tsocket=new Socket(\"140.116.246.200\",4000+id);\n\t\t\t\tout=socket.getOutputStream();\n\t\t\t\tin=socket.getInputStream();\n\t\t\t\tLog.v(TAG,\"connect!!\");\n\t\t\t\n\t\t\t\tsendData(\"ask#\");\n\t\t\t\tUIHr.post(refreshUI); \t\n\t\t\t\tresult=new Integer(readData());\n\t\t\t\tUIHr.post(refreshUI); \t\t\n\t\t\t\tsendData(\"over#\");\n\t\t\t\tsocket.close();\n\t\t\t} catch (UnknownHostException e) {e.printStackTrace();} \n\t\t\tcatch (IOException e) {e.printStackTrace();}\n\t\t}",
"public void communicate() {\n\t\tconnect();\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\t\t\tout = new PrintWriter((socket.getOutputStream()), true);\n\t\t\tobjOut = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjIn = new ObjectInputStream(socket.getInputStream());\n\t\t\twhile (!socket.isClosed()) {}\t// Doesn't need to do anything besides stay awake, GUI handles all in/outputs\n\t\t\tin.close();\n\t\t\tout.close();\n\t\t\tobjIn.close();\n\t\t\tobjOut.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Sending error: \" + e.getMessage());\n\t\t}\t\t\n\t}",
"void sendDataForSubscriber(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"public void sendMessage(View v) {\n // retrieve the text typed in by the user in the EditText\n String message = ((EditText)(findViewById(R.id.editText_message))).getText().toString();\n // create an implicit intent to any app with SENDTO capability\n // set the destination (5556 is the phone number of the second emulator instance)\n Uri destination = Uri.parse(\"smsto:5556\");\n Intent smsIntent = new Intent(Intent.ACTION_SENDTO, destination);\n // pass the composed message to the messaging activity\n smsIntent.putExtra(\"sms_body\", message);\n // launch the intent\n startActivity(smsIntent);\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSendToServer(ph);\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}",
"void sendDataForSubscriberWithSelfPermissions(int subId, String callingPkg, String destAddr,\n String scAddr, int destPort, byte[] data, PendingIntent sentIntent,\n PendingIntent deliveryIntent);",
"public void send(byte[] bytes)\r\n\t{\r\n\t\t// TODO: So, we should put those bytes in a queue for a worker thread to send, because\r\n\t\t// everything downstream blocks on send.\r\n\t\t// So, the worker thread does the touchy business of sending and receiving and updating\r\n\t\t// the screen buffer. The UI thread redraws the screen when the buffer is dirty.\r\n\t\ttry {\r\n\t\t\tremoteOut_.write(bytes);\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tlistener_.onSessionEvent(StatusListener.COULD_NOT_SEND,\r\n\t\t\t\t\t\"There was an error sending data.\", null, 0);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }",
"public void send() {\n\t}",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"public void goToSendCommand(View view){\n Log.i(tag, \"About to launch SendCommand\");\n Intent i = new Intent(this, SendCommand.class);\n startActivity(i);\n }",
"private void ipcSend(JSONObject data) {\n JSONObject json = data;\n try {\n json.put(IPC_MESSAGE_APPID, mAppId);\n\n if (mIpcChannel != null) {\n log.e(\"ipcSend:[\" + json.toString() + \"]\");\n\n mIpcChannel.send(json.toString());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}",
"public synchronized void send() {\n if (AudioUtil.getIs()) {\n LogUtil.d(Tag, \"VR stop\");\n this.mPCMPackageHead.m4053c(CommonParams.bB);\n this.mPCMPackageHead.m4047a(0);\n writeVR(this.mPCMPackageHead.m4048a(), this.mPCMPackageHead.m4049b());\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\n\t\t\t\tURL url = new URL(\"http://ecshopxax.sinaapp.com/js/index.js\");\n\t\t\t\tURLConnection connection = url.openConnection();\n\t\t\t\tInputStream is = connection.getInputStream();\n\t\t\t\tbyte[] bs = new byte[1024];\n\t\t\t\tint len = 0;\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\twhile ((len = is.read(bs)) != -1) {\n\t\t\t\t\tString str = new String(bs, 0, len);\n\t\t\t\t\tsb.append(str);\n\t\t\t\t}\n\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 0x15;\n\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.clear();\n\n\t\t\t\t// bundle.putString(\"recv_server\", new String(buffer));\n\t\t\t\tbundle.putString(\"text1\", sb.toString());\n\n\t\t\t\tmsg.setData(bundle);\n\n\t\t\t\tmyHandler.sendMessage(msg);\n\n\t\t\t\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"private void writeData(String data) {\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n }\n\n String message = data;\n byte[] msgBuffer = message.getBytes();\n\n try {\n outStream.write(msgBuffer);\n } catch (IOException e) {\n }\n }",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"private void sendAnswer(SensorData sensorData, String newValueOfProduct) throws IOException{\n\n /** The IP address and port from client . */\n InetAddress address = sensorData.getAddress();\n int port = sensorData.getPortNummber();\n //increment for check\n String message = newValueOfProduct;\n data = message.getBytes();\n DatagramPacket sendPacket = new DatagramPacket(data, data.length, address, port);\n udpSocket.send(sendPacket);\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_main);\r\n\r\n \r\n\t\tStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\r\n\t\t.detectDiskReads()\r\n\t\t.detectDiskWrites()\r\n\t\t.detectNetwork() //or .detectAll() for all detectable problems\r\n\t\t.penaltyLog()\r\n\t\t.build());\r\n\t\tStrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\r\n\t\t.detectLeakedSqlLiteObjects()\r\n\t\t.detectLeakedClosableObjects()\r\n\t\t.penaltyLog()\r\n\t\t.penaltyDeath()\r\n\t\t.build());\r\n \r\n tv_msg = (TextView) findViewById(R.id.TextView);\r\n ed_msg = (EditText) findViewById(R.id.EditText01);\r\n btn_send = (Button) findViewById(R.id.Button02);\r\n \r\n \r\n try {\r\n\t\t\tDatagramSocket =new DatagramSocket();\r\n\t\t} catch (SocketException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n \r\n btn_send.setOnClickListener(new Button.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(View v) {\r\n // TODO Auto-generated method stub\r\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }\r\n });\r\n }",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"private void sendMessage() {\n if (mRecipientAddress == null) {\n if (mDevices.getSelectedItem() == null) {\n mStatusText.append(\"Please select a device to message.\\n\");\n return;\n }\n if (mMessage.getText() == null || mMessage.getText().toString().equals(\"\")) {\n mStatusText.append(\"Please enter a message to send.\\n\");\n return;\n }\n }\n WifiDirectClientAsyncTask t = new WifiDirectClientAsyncTask(this, mMessage.getText().toString());\n if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n t.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n else\n t.execute();\n }",
"@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}",
"public void sendMessageToMobile(final String str) {\r\n\r\n\t\tnew Thread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(s.getOutputStream(), \"utf-8\"), true);\r\n\r\n\t\t\t\t\tif (!str.isEmpty()){\r\n\t\t\t\t\t\tout.println(str);\r\n\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\tSystem.out.println(\"sent to mobile: \"+ str);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\tcatch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}).start();\r\n\t}",
"public abstract void send(String data, String toAddress);",
"public void sendData() {\r\n\t\t// HoverBot specific implementation of sendData method\r\n\t\tSystem.out.println(\"Sending location information...\");\r\n\t}",
"public void communicate() {\r\n System.out.println(\"This iPhone is making a phone call.\");\r\n }",
"public void send(DataPacket packet){\n if(deviceDestination != null){\n deviceDestination.receive(packet, portDestination);\n }\n }",
"@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }",
"public void sendOtp(String medium) {\n\r\n }",
"private void sendReceiveRes(){\n\t}",
"@JavascriptInterface\n public void sendCommand(String array) {\n Log.d(TAG, \"sendCommand: \" + array);\n if (!connected) {\n Log.e(TAG, \"Attempting to send M2 a command while its not connected: \" + array);\n return;\n }\n try {\n JSONArray json = new JSONArray(array);\n byte[] data = new byte[json.length()];\n for (int i = 0; i < data.length; i++) {\n data[i] = (byte) json.getInt(i);\n }\n EventBus.getDefault().post(new M2Command(data));\n }\n catch (JSONException e) {\n Log.e(TAG, \"Invalid command: \" + array);\n }\n }",
"@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}",
"public void saveWalk() {\n try {\n long id = this.currentRoute.getId();\n DatabaseHandler db = new DatabaseHandler(this.getApplicationContext());\n currentRoute.setWaypoints(db.getAllWaypoints(id));\n\n HTTPPostSender postSender = new HTTPPostSender();\n postSender.buildString(currentRoute, this.getContentResolver());\n postSender.cm = (ConnectivityManager) getSystemService(this.getApplicationContext().CONNECTIVITY_SERVICE);\n\n\n\n\n if(isOnline()) {\n postSender.execute(this.currentRoute);\n Toast.makeText(this.getApplicationContext(),\"Walk successfully sent to server\",Toast.LENGTH_LONG).show();\n\n } else {\n //oh god why..\n Toast.makeText(this.getApplicationContext(),\"Something bad happened\",Toast.LENGTH_LONG).show();\n }\n } catch(Exception e) {\n Toast.makeText(this.getApplicationContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n }",
"private void runTcpClient() {\n\t\t\n\t\tint TCP_SERVER_PORT=5050;\n\n\t try {\n\n\t Socket s = new Socket(\"192.168.0.255\", TCP_SERVER_PORT);\n\n\t BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));\n\n\t BufferedWriter out = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));\n\n\t //send output msg\n\n\t String outMsg = \"TCP connecting to \" + TCP_SERVER_PORT + System.getProperty(\"line.separator\"); \n\n\t out.write(outMsg);\n\n\t out.flush();\n\n\t Log.i(\"TcpClient\", \"sent: \" + outMsg);\n\n\t //accept server response\n\n\t String inMsg = in.readLine() + System.getProperty(\"line.separator\");\n\t \n\t textView.append(inMsg);\n\n\t Log.i(\"TcpClient\", \"received: \" + inMsg);\n\n\t //close connection\n\n\t s.close();\n\n\t } catch (UnknownHostException e) {\n\n\t e.printStackTrace();\n\n\t } catch (IOException e) {\n\n\t e.printStackTrace();\n\n\t } \n\n\t}",
"private void SendCommandOrKeys(int viewID, String data)\n\t{\n\t\tif (mCommandManager == null)\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tif (viewID == VIEW_ID_COMMAND)\n\t\t{\n // In put case, select file\n if (data.contains(\"!put\"))\n {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"*/*\");\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n mPutCommand = data;\n\n try\n {\n startActivityForResult(Intent.createChooser(intent, \n\t\t\t\t\t\t\"Select a File\"), CHOOSE_FILE_TO_UPLOAD);\n } catch (android.content.ActivityNotFoundException ex)\n {\n ex.printStackTrace();\n }\n\n return ;\n }\n\n\t\t\tmCommandManager.SendCommand(data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAddMsgToKeyView(viewID, \"remote> \" + data + \"\\n\");\n\n if (data.equals(\"!autotest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunAutoTest();\n }\n else if (data.equals(\"!pintest\"))\n {\n // Run android autotest\n AddMsgToKeyView(viewID, \"remote> wait until the test ends\\n\");\n RunPinTest();\n }\n else if (data.equals(\"!stoptest\"))\n {\n mStopTest = true;\n }\n else\n {\n mCommandManager.SendKey(data);\n }\n\t\t}\t\t\n\t}",
"public void write(byte[] bytes) {\n try {\n mmOutStream.write(bytes);\n\n // Share the sent message with the UI activity.\n /*Message writtenMsg = handler.obtainMessage(\n MessageConstants.MESSAGE_WRITE, -1, -1, mmBuffer);\n writtenMsg.sendToTarget();*/\n } catch (IOException e) {\n Log.e(TAG, \"Error occurred when sending data\", e);\n\n // Send a failure message back to the activity.\n /*Message writeErrorMsg =\n handler.obtainMessage(MessageConstants.MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(\"toast\",\n \"Couldn't send data to the other device\");\n writeErrorMsg.setData(bundle);\n handler.sendMessage(writeErrorMsg);*/\n }\n }",
"public void send(){ \n\t\tserverAddress=tfTxtIpServer.getText();\n\t\tserverPort=\"3232\";\n\t\ttext=tfTxtMsg.getText();\n try{\n\t\t\t// get the \"registry\"\n registry=LocateRegistry.getRegistry(\n serverAddress,\n (new Integer(serverPort)).intValue()\n );\n\t\t // look up the remote object\n rmiServer=(ReceiveMessageInterface)(registry.lookup(\"rmiServer\"));\n\t\t\t// call the remote method\n rmiServer.receiveMessage(text);\n }\n catch(RemoteException e){\n e.printStackTrace();\n }\n catch(NotBoundException e){\n e.printStackTrace();\n } \n }",
"private void sendData(String data) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Sending data: '\" + data + \"'\");\n\n\t\t\t\t// open the streams and send the \"y\" character\n\t\t\t\toutput = serialPort.getOutputStream();\n\t\t\t\toutput.write(data.getBytes());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}",
"void sendData() throws IOException\n\t{\n\t}",
"private void sendFitDataSync(final Context context){\n final Date date = new Date();\n HandlerThread ht = new HandlerThread(\"HeartThread\", android.os.Process.THREAD_PRIORITY_BACKGROUND);\n ht.start();\n Handler h = new Handler(ht.getLooper());\n h.post(new Runnable() {\n @Override\n public void run() {\n GoogleApiClient mGoogleAPIClient = new GoogleApiClient.Builder(context)\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\n @Override\n public void onConnected(Bundle bundle) {\n Log.d(\"Heart\", \"Connected\");\n }\n\n @Override\n public void onConnectionSuspended(int i) {\n\n }\n })\n .addApi(Wearable.API).build();\n mGoogleAPIClient.blockingConnect(10, TimeUnit.SECONDS);\n /* Sync msg & time to handheld */\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_ACTV_SYNC, date);\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_HIST_SYNC, date);\n WearableSendSync.sendDailyNotifFileWrapper(mGoogleAPIClient);\n\n }\n });\n }",
"public void sendData(String data, int numCapteur);",
"public void sendData(String mssg, int destinationPort){\r\n\r\n\t\t\t //Creates a new socket. This will be used for sending and receiving packets\r\n\t\t\t//\t\t\tsocket.setSoTimeout(5000); //Sets the timeout value to 5 seconds. If 5 seconds elapses and no packet arrives on receive, an exception will be thrown\t\r\n\t\tInetAddress local = null;\r\n\t\t\ttry {\r\n\t\t\t\tlocal = InetAddress.getLocalHost();\r\n\t\t\t} catch (UnknownHostException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t} //Gets the local address of the computer \r\n\t\t\t\r\n\t\t\t\tbyte[] dataArray = mssg.getBytes();\r\n\r\n\t\t\t\tDatagramPacket packetToSend = new DatagramPacket(dataArray, dataArray.length, local, destinationPort); //Creates a packet from the dataArray, to be sent to the intermediate host\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsndSocket.send(packetToSend);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t} \r\n\t}",
"private void sendData(SensorData sensorData) {\n EventMessage message = new EventMessage(EventMessage.EventType.RECEIVED_RAW_DATA);\n message.setSensorData(sensorData);\n EventBus.getDefault().post(message);\n }",
"private void sendData() {\n String Own_Easting = OEast.getText().toString();\n String Own_Northing = ONorth.getText().toString();\n String En_Easting = EEast.getText().toString();\n String En_nothing = ENorth.getText().toString();\n String OTbg = OTBG.getText().toString();\n String rt=Rt.getText().toString();\n String add=Add.getText().toString();\n\n DB bg = new DB(this);\n bg.execute(Own_Easting,Own_Northing,En_Easting,En_nothing\n ,OTbg,rt,add);\n\n }",
"private void sendDataToServer() {\n\t\tcommentView = (EditText) findViewById(R.id.editComment);\n\t\tString commentToBePosted = commentView.getText().toString();\n\n\t\tboolean valid;\n\t\tvalid = checkValidityOfComment(commentToBePosted);\n\n\t\tif (valid) {\n\t\t\t// Intent intent = getIntent();\n\t\t\tPostCommentTask postComment = new PostCommentTask();\n\t\t\tpostComment.execute(commentToBePosted);\n\t\t}\n\t}",
"private void processDeviceStream(SelectionKey key, byte[] data) throws IOException{\n\t\tSocketChannel channel = (SocketChannel)key.channel();\n\t\tString sDeviceID = \"\";\n\t\t// Initial call where the device sends it's IMEI# - Sarat\n\t\tif ((data.length >= 10) && (data.length <= 17)) {\n\t\t\tint ii = 0;\n\t\t\tfor (byte b : data)\n\t\t\t{\n\t\t\t\tif (ii > 1) { // skipping first 2 bytes that defines the IMEI length. - Sarat\n\t\t\t\t\tchar c = (char)b;\n\t\t\t\t\tsDeviceID = sDeviceID + c;\n\t\t\t\t}\n\t\t\t\tii++;\n\t\t\t}\n\t\t\t// printing the IMEI #. - Sarat\n\t\t\tSystem.out.println(\"IMEI#: \"+sDeviceID);\n\n\t\t\tLinkedList<String> lstDevice = new LinkedList<String>();\n\t\t\tlstDevice.add(sDeviceID);\n\t\t\tdataTracking.put(channel, lstDevice);\n\n\t\t\t// send message to module that handshake is successful - Sarat\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, true);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// second call post handshake where the device sends the actual data. - Sarat\n\t\t}else if(data.length > 17){\n\t\t\tmClientStatus.put(channel, System.currentTimeMillis());\n\t\t\tList<?> lst = (List<?>)dataTracking.get(channel);\n\t\t\tif (lst.size() > 0)\n\t\t\t{\n\t\t\t\t//Saving data to database\n\t\t\t\tsDeviceID = lst.get(0).toString();\n\t\t\t\tDeviceState.put(channel, sDeviceID);\n\n\t\t\t\t//String sData = org.bson.internal.Base64.encode(data);\n\n\t\t\t\t// printing the data after it has been received - Sarat\n\t\t\t\tStringBuilder deviceData = byteToStringBuilder(data);\n\t\t\t\tSystem.out.println(\" Data received from device : \"+deviceData);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t//publish device IMEI and packet data to Nats Server\n\t\t\t\t\tnatsPublisher.publishMessage(sDeviceID, deviceData);\n\t\t\t\t} catch(Exception nexp) {\n\t\t\t\t\tnexp.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t//sending response to device after processing the AVL data. - Sarat\n\t\t\t\ttry {\n\t\t\t\t\tsendDataReceptionCompleteMessage(key, data);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//storing late timestamp of device\n\t\t\t\tDeviceLastTimeStamp.put(sDeviceID, System.currentTimeMillis());\n\n\t\t\t}else{\n\t\t\t\t// data not good.\n\t\t\t\ttry {\n\t\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t// data not good.\n\t\t\ttry {\n\t\t\t\tsendDeviceHandshake(key, false);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new IOException(\"Bad data received\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\n\n\t\t\tMap<String, String> param = new HashMap<String, String>();// 组装请求参数\n\t\t\tparam.put(\"idCardName\", \"卢波\");\n\t\t\tparam.put(\"IDNumber\", \"37142519930502763X\");\n\t\t\tparam.put(\"bankNumber\", \"6227002271530099694\");\n\t\t\tparam.put(\"companyName\", \"山东题开店收银台\");\n\t\t\tparam.put(\"mobilePhone\", \"18315913992\");\n\t\t\tparam.put(\"accounttype\", \"1\");\n\t\t\tparam.put(\"bankcardtype\", \"1\");\n\t\t\tparam.put(\"storeAddress\", \"山东省济南市天桥区时代总部基地4期H3楼201\");\n\t\t\tparam.put(\"uid\", \"3617\");\n\n\t\t\tHttp_PushTask HP = new Http_PushTask();\n\t\t\ttry {\n\t\t\t\tString result = HP.execute(CryptTool.transMapToString(param),\n\t\t\t\t\t\t\"http://cnyssj.com/dfweb_test/rbkjsame.do\").get();\n\t\t\t\tif (!TextUtils.isEmpty(result)) {\n\t\t\t\t\tJSONObject js = new JSONObject(result);\n\t\t\t\t\tif (js.getBoolean(\"result\")) {\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString message = js.getString(\"message\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ExecutionException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"@Override\n public void onClick(View v) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n clientThread.sendMessage(\"Que\");\n }\n });\n\n\n// new Thread(new ClientSend()).start();\n\n }",
"public void sendData(String s1){\n mTapTextView = findViewById(R.id.tap_text);\n mTapTextView.setText(s1);\n }",
"void initCommand() {\n try {\n stream = adbTerminalConnection.open(\"shell:\");\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n return;\n }\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG已连接\\r\\n\");\n });\n // Start the receiving thread\n new Thread(() -> {\n while (!stream.isClosed()) {\n // Print each thing we read from the shell stream\n String data = null;\n try {\n data = new String(stream.read());\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n Log.d(\"Nightmare\", \"data -> \" + data);\n if (data == null) {\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", \"OTG断开\\r\\n\");\n });\n continue;\n }\n String finalData = data;\n runOnUiThread(() -> {\n channel.invokeMethod(\"output\", finalData);\n });\n }\n }).start();\n }",
"protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\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} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\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}"
] | [
"0.7219223",
"0.6992737",
"0.6954613",
"0.6896259",
"0.68340385",
"0.68223095",
"0.68116575",
"0.67750186",
"0.6758095",
"0.6715433",
"0.6714807",
"0.6684857",
"0.6610166",
"0.6603503",
"0.65610665",
"0.653047",
"0.64998686",
"0.64850265",
"0.6480271",
"0.6465811",
"0.6437269",
"0.6435119",
"0.63965446",
"0.63688403",
"0.636753",
"0.6349158",
"0.6313232",
"0.6304535",
"0.6300834",
"0.6281769",
"0.6271763",
"0.6263423",
"0.62489486",
"0.6239657",
"0.62290454",
"0.6224806",
"0.6219088",
"0.6215751",
"0.62054354",
"0.6180117",
"0.61545974",
"0.6151358",
"0.61508316",
"0.61506563",
"0.61454254",
"0.61432946",
"0.61424583",
"0.613711",
"0.61321974",
"0.6128163",
"0.61271894",
"0.61243844",
"0.6123217",
"0.6115651",
"0.6113908",
"0.61039203",
"0.6102639",
"0.60855174",
"0.6075863",
"0.60748047",
"0.6071347",
"0.60703707",
"0.6069091",
"0.60518044",
"0.60487926",
"0.604819",
"0.6047653",
"0.60468453",
"0.60410124",
"0.6040732",
"0.6038592",
"0.60358626",
"0.6030098",
"0.60274154",
"0.60248786",
"0.60131615",
"0.6012271",
"0.59989434",
"0.5981657",
"0.59797436",
"0.5978461",
"0.5974734",
"0.5971155",
"0.5968919",
"0.5968402",
"0.59678745",
"0.5966975",
"0.5965917",
"0.5960863",
"0.5957588",
"0.59541804",
"0.594364",
"0.5943411",
"0.5933579",
"0.5926983",
"0.59146637",
"0.59120965",
"0.5909854",
"0.5908065",
"0.5906201",
"0.5901958"
] | 0.0 | -1 |
An interface that must be implemented by all providers of Autopsy ingest modules. An ingest module factory is used to create instances of a type of data source ingest module, a type of file ingest module, or both. Autopsy will generally use the factory to create several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. Autopsy may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. An ingest module factory may provide global and per ingest job settings user interface panels. The global settings should apply to all module instances. The per ingest job settings should apply to all module instances working on a particular ingest job. Autopsy supports contextsensitive and persistent per ingest job settings, so per ingest job settings must be serializable. To be discovered at runtime by the ingest framework, IngestModuleFactory implementations must be marked with the following NetBeans Service provider annotation: | public interface IngestModuleFactory {
/**
* Gets the display name that identifies the family of ingest modules the
* factory creates. Autopsy uses this string to identify the module in user
* interface components and log messages. The module name must be unique. so
* a brief but distinctive name is recommended.
*
* @return The module family display name.
*/
String getModuleDisplayName();
/**
* Gets a brief, user-friendly description of the family of ingest modules
* the factory creates. Autopsy uses this string to describe the module in
* user interface components.
*
* @return The module family description.
*/
String getModuleDescription();
/**
* Gets the version number of the family of ingest modules the factory
* creates.
*
* @return The module family version number.
*/
String getModuleVersionNumber();
/**
* Queries the factory to determine if it provides a user interface panel to
* allow a user to change settings that are used by all instances of the
* family of ingest modules the factory creates. For example, the Autopsy
* core hash lookup ingest module factory provides a global settings panel
* to import and create hash databases. The hash databases are then enabled
* or disabled per ingest job using an ingest job settings panel. If the
* module family does not have global settings, the factory may extend
* IngestModuleFactoryAdapter to get an implementation of this method that
* returns false.
*
* @return True if the factory provides a global settings panel.
*/
boolean hasGlobalSettingsPanel();
/**
* Gets a user interface panel that allows a user to change settings that
* are used by all instances of the family of ingest modules the factory
* creates. For example, the Autopsy core hash lookup ingest module factory
* provides a global settings panel to import and create hash databases. The
* imported hash databases are then enabled or disabled per ingest job using
* ingest an ingest job settings panel. If the module family does not have a
* global settings, the factory may extend IngestModuleFactoryAdapter to get
* an implementation of this method that throws an
* UnsupportedOperationException.
*
* @return A global settings panel.
*/
IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();
/**
* Gets the default per ingest job settings for instances of the family of
* ingest modules the factory creates. For example, the Autopsy core hash
* lookup ingest modules family uses hash databases imported or created
* using its global settings panel. All of the hash databases are enabled by
* default for an ingest job. If the module family does not have per ingest
* job settings, the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that returns an instance of the
* NoIngestModuleJobSettings class.
*
* @return The default ingest job settings.
*/
IngestModuleIngestJobSettings getDefaultIngestJobSettings();
/**
* Queries the factory to determine if it provides user a interface panel to
* allow a user to make per ingest job settings for instances of the family
* of ingest modules the factory creates. For example, the Autopsy core hash
* lookup ingest module factory provides an ingest job settings panels to
* enable or disable hash databases per ingest job. If the module family
* does not have per ingest job settings, the factory may extend
* IngestModuleFactoryAdapter to get an implementation of this method that
* returns false.
*
* @return True if the factory provides ingest job settings panels.
*/
boolean hasIngestJobSettingsPanel();
/**
* Gets a user interface panel that can be used to set per ingest job
* settings for instances of the family of ingest modules the factory
* creates. For example, the core hash lookup ingest module factory provides
* an ingest job settings panel to enable or disable hash databases per
* ingest job. If the module family does not have per ingest job settings,
* the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that throws an
* UnsupportedOperationException.
*
* @param settings Per ingest job settings to initialize the panel.
*
* @return An ingest job settings panel.
*/
IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);
/**
* Queries the factory to determine if it is capable of creating data source
* ingest modules. If the module family does not include data source ingest
* modules, the factory may extend IngestModuleFactoryAdapter to get an
* implementation of this method that returns false.
*
* @return True if the factory can create data source ingest modules.
*/
boolean isDataSourceIngestModuleFactory();
/**
* Creates a data source ingest module instance.
* <p>
* Autopsy will generally use the factory to several instances of each type
* of module for each ingest job it performs. Completing an ingest job
* entails processing a single data source (e.g., a disk image) and all of
* the files from the data source, including files extracted from archives
* and any unallocated space (made to look like a series of files). The data
* source is passed through one or more pipelines of data source ingest
* modules. The files are passed through one or more pipelines of file
* ingest modules.
* <p>
* The ingest framework may use multiple threads to complete an ingest job,
* but it is guaranteed that there will be no more than one module instance
* per thread. However, if the module instances must share resources, the
* modules are responsible for synchronizing access to the shared resources
* and doing reference counting as required to release those resources
* correctly. Also, more than one ingest job may be in progress at any given
* time. This must also be taken into consideration when sharing resources
* between module instances. modules.
* <p>
* If the module family does not include data source ingest modules, the
* factory may extend IngestModuleFactoryAdapter to get an implementation of
* this method that throws an UnsupportedOperationException.
*
* @param settings The settings for the ingest job.
*
* @return A data source ingest module instance.
*/
DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);
/**
* Queries the factory to determine if it is capable of creating file ingest
* modules. If the module family does not include file ingest modules, the
* factory may extend IngestModuleFactoryAdapter to get an implementation of
* this method that returns false.
*
* @return True if the factory can create file ingest modules.
*/
boolean isFileIngestModuleFactory();
/**
* Creates a file ingest module instance.
* <p>
* Autopsy will generally use the factory to several instances of each type
* of module for each ingest job it performs. Completing an ingest job
* entails processing a single data source (e.g., a disk image) and all of
* the files from the data source, including files extracted from archives
* and any unallocated space (made to look like a series of files). The data
* source is passed through one or more pipelines of data source ingest
* modules. The files are passed through one or more pipelines of file
* ingest modules.
* <p>
* The ingest framework may use multiple threads to complete an ingest job,
* but it is guaranteed that there will be no more than one module instance
* per thread. However, if the module instances must share resources, the
* modules are responsible for synchronizing access to the shared resources
* and doing reference counting as required to release those resources
* correctly. Also, more than one ingest job may be in progress at any given
* time. This must also be taken into consideration when sharing resources
* between module instances. modules.
* <p>
* If the module family does not include file ingest modules, the factory
* may extend IngestModuleFactoryAdapter to get an implementation of this
* method that throws an UnsupportedOperationException.
*
* @param settings The settings for the ingest job.
*
* @return A file ingest module instance.
*/
FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isFileIngestModuleFactory();",
"boolean isDataSourceIngestModuleFactory();",
"DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);",
"FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);",
"IFMLModule createIFMLModule();",
"public interface HomeModuleService extends ModuleCall{\n}",
"public interface ProcessorFactory {\n\n ProcessorFactory INSTANCE = new DefaultProcessorFactory();\n\n // TODO rbala Missing JavaDoc\n <TDef extends IElementDef> Processor<TDef> createProcessor(DynamicScopeContext context, TDef elementDef);\n\n}",
"public interface IModuleRepo {\n\n /**\n * @return true if this repository has been initialized.\n */\n boolean isInitialized();\n\n /**\n * Initializes the repository.\n */\n void initialize(int shards, Integer shardIndex, File testsDir, Set<IAbi> abis,\n List<String> deviceTokens, List<String> testArgs, List<String> moduleArgs,\n Set<String> mIncludeFilters, Set<String> mExcludeFilters,\n MultiMap<String, String> metadataIncludeFilters,\n MultiMap<String, String> metadataExcludeFilters,\n IBuildInfo buildInfo);\n\n /**\n * @return a {@link LinkedList} of all modules to run on the device referenced by the given\n * serial.\n */\n LinkedList<IModuleDef> getModules(String serial, int shardIndex);\n\n /**\n * @return the number of shards this repo is initialized for.\n */\n int getNumberOfShards();\n\n /**\n * @return the modules which do not have token and have not been assigned to a device.\n */\n List<IModuleDef> getNonTokenModules();\n\n /**\n * @return the modules which have token and have not been assigned to a device.\n */\n List<IModuleDef> getTokenModules();\n\n /**\n * @return An array of all module ids in the repo.\n */\n String[] getModuleIds();\n\n /**\n * Clean up all internal references.\n */\n void tearDown();\n}",
"public interface ModuleConfigurationProvider {\n ModuleConfiguration getConfiguration(Module module);\n}",
"public interface ModuleService {\n\n /**\n * 获取所有模块信息\n * @return\n */\n List<Module> getAllModule();\n\n Show getModuleAndPart();\n\n List<Module> findModuleByPartId(int typeNum);\n\n /**\n * 添加模块\n * @param partId\n * @param name\n * @param description\n * @param photo\n * @return\n */\n Show addModule(int partId, String name, String description, String photo);\n\n /**\n * 模块图片上传至服务器\n * @param stream\n * @param path\n * @param file\n */\n void savepic(InputStream stream, String path, String file);\n\n /**\n * 修改模块名称\n * @param id\n * @param name\n * @return\n */\n Show changeModuleName(int id, String name);\n\n /**\n * 修改模块描述信息\n * @param id\n * @param description\n * @return\n */\n Show changeModuleDescription(int id, String description);\n\n /**\n * 修改模块图片信息\n * @param id\n * @param photo\n * @return\n */\n Show changeModulePhoto(int id, String photo);\n\n /**\n * 移除模块\n * @param id\n * @return\n */\n Show moveModule(int id);\n\n \n Module findModuleById(int moduleId);\n}",
"public interface IChunkProcessorProvider {\n\n\t/**\n\t * @param chunkType\n\t * @return a IChunkProcessor for the chunkType\n\t */\n\tpublic IChunkProcessor getChunkProcessor(ChunkType chunkType);\n\t\n}",
"public interface Module extends Pluggable {\n\t\n\t/**\n\t * Return the module type. Module type can be a value like Mywork, Support, Cowork, etc.\n\t * @return\n\t */\n\tModuleType type();\n\t\n\t/**\n\t * Return true if the module is in subscription. \n\t * @return true if the module is in subscription\n\t */\n\tboolean isOpened();\n\t\n\t/**\n\t * Return true if the module is enabled by a company administrator.\n\t * @return true if the module is enabled by a company administrator\n\t */\n\tboolean isEnabled();\n\t\n\t/**\n\t * Return the home page uri representing an entry point of module.\n\t * @return the home page uri\n\t */\n\tString home();\n\n\t/**\n\t * Return company and user option information like whether option configuration is provided and option configuration uri if any. \n\t * @return company and user option configuration information\n\t */\n\tModuleOption option();\n\t\n\t/**\n\t * Return volume configuration information\n\t * @return\n\t */\n\tModuleComponent volume();\n\t\n\t/**\n\t * Return statistics information\n\t * @return\n\t */\n\tModuleComponent statistics();\n\t\n\t/**\n\t * Return renderer\n\t */\n\tModuleRenderer render();\n\t\n}",
"public interface ModulesService {\n public static final String BEAN_ID = \"modulesService\";\n\n public Modules findById(Long id);\n\n public List<Modules> findAll();\n\n public Modules save(Modules entity);\n\n public void delete(Modules entity);\n}",
"public interface IFactory {\n Operation CreateOperation();\n\n}",
"public interface Factory {\r\n}",
"public interface ITaskFactoryLoader {\n\n\t/**\n\t * Dynamically load an ITaskFactory instance given its class name. \n\t * @param classname The fully qualified class name of the desired ITaskFactory class.\n\t * @return An ITaskFactory instance.\n\t */\n\tITaskFactory<?> load(String classname);\n\n}",
"Module createModule();",
"public interface DataImportService {\n /**\n * 导入数据\n * @param templateId\n * @param userId\n * @param isSys\n */\n void dataImport(Long templateId, String userId, Integer isSys);\n}",
"public interface MasterProcessChannelProcessorFactory extends Closeable {\n /**\n * Evaluates the {@code channelConfig}.\n *\n * @param channelConfig a connection string used by the fork JVM\n * @return {@code true} if {@code channelConfig} is applicable and thus this SPI is eligible in the fork\n */\n boolean canUse(String channelConfig);\n\n /**\n * Open a new connection.\n *\n * @param channelConfig e.g. \"pipe://3\" or \"tcp://localhost:65035\"\n * @throws IOException if cannot connect\n */\n void connect(String channelConfig) throws IOException;\n\n /**\n * Decoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of decoder\n */\n MasterProcessChannelDecoder createDecoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n\n /**\n * Encoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of encoder\n */\n MasterProcessChannelEncoder createEncoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n}",
"public interface Provider {\n Service newService();\n }",
"public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}",
"private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}",
"public interface ConfigProcessor {\n\n\tvoid inject2Instance(Object obj,String keyName);\n\n\tvoid storeOneFile(ConfigBaseModel configBaseModel);\n\n\tvoid inject2Conf();\n\n}",
"public interface HelloService extends IProvider{\n void sayHello(String name);\n}",
"public interface ReviewServiceFactory extends ServiceFactory {\n}",
"public interface Provider{\n Service newService();\n}",
"public interface SupplierIndexService {\n\n /**\n * 供应商全量脚本\n */\n @Export\n Response<Boolean> fullDump();\n\n /**\n * 供应商增量脚本\n * @param interval 时间间隔,单位分钟,一般为15分钟\n */\n @Export(paramNames = {\"interval\"})\n Response<Boolean> deltaDump(int interval);\n\n /**\n *\n * @param ids 供应商id列表\n * @param status 供应商状态\n */\n Response<Boolean> realTimeIndex(List<Long> ids, User.SearchStatus status);\n}",
"interface ImportService {\n /**\n * Main import method.\n */\n void doImport();\n}",
"public interface BlogLibTestMasterAppModule extends ApplicationModule {\r\n String helloMasterModule(String param);\r\n}",
"public interface ConfigurationProvider extends ContainerProvider, PackageProvider {\n}",
"public interface MetricsFactoryService {\n\n /**\n * Load MetricsFactory implementation\n *\n * @return load a given MetricsFactory implementation\n */\n MetricsFactory load();\n}",
"public interface MauModule {\r\n\t/**\r\n\t * Initializes the module and loads all the configurations and everything else that needs to be\r\n\t * loaded.\r\n\t * \r\n\t * @param plugin The hosting instance of Maussentials.\r\n\t */\r\n\tpublic void load(Maussentials plugin);\r\n\t\r\n\t/**\r\n\t * Unload the MauModule.\r\n\t */\r\n\tpublic void unload();\r\n\t\r\n\t/**\r\n\t * @return True, if the module is loaded. False otherwise.\r\n\t */\r\n\tpublic boolean isLoaded();\r\n\t\r\n\t/**\r\n\t * Get the list of module names that this module depends on.\r\n\t */\r\n\tpublic default String[] getDependencies() {\r\n\t\treturn new String[0];\r\n\t}\r\n}",
"public interface DataImporter {\t\n\t\n\t/**\n\t * Abstract method used by plugins system.\n\t * This method is called when \"load XXXX using PLUGIN_NAME(PARAMS)\"\n\t * is executed in Cli.\n\t * \n\t * @param modname destination of import\n\t * @param data must contain data to be interpreted\n\t * @param params params to be parsed by importer\n\t * @throws FilterException\n\t */\n\tpublic void importData(String modname, String data, String params) throws FilterException;\n\n\t/**\n\t * Imports into a given object. Source of import is given in specific ImportFilter constructor, which is depending\n\t * on concrete implementation. This method may be called only once after filter creation. \n\t * \n\t * @param parent object inside which objects will be imported\n\t * @return returns OID of a newly created object \n\t * @throws DatabaseException\n\t * @throws FilterException\n\t * @throws ShadowObjectException \n\t */\n\tOID [] importInto(OID parent) throws DatabaseException, FilterException, ShadowObjectException;\n}",
"UsageevolutionFactory getUsageevolutionFactory();",
"public interface ModuleCall {\n void initContext(Context context);\n}",
"public interface IngestHandlerService extends Remote {\r\n\r\n String ingest(String xmlData, String resourceType, SecurityContext securityContext) throws EscidocException,\r\n RemoteException;\r\n\r\n String ingest(String xmlData, String resourceType, String authHandle, Boolean restAccess) throws EscidocException,\r\n RemoteException;\r\n\r\n}",
"public interface ServicesFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tServicesFactory eINSTANCE = org.cylio.project.domain.editor.services.impl.ServicesFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Provider</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Provider</em>'.\n\t * @generated\n\t */\n\tProvider createProvider();\n\n\t/**\n\t * Returns a new object of class '<em>Feature</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Feature</em>'.\n\t * @generated\n\t */\n\tFeature createFeature();\n\n\t/**\n\t * Returns a new object of class '<em>Stub</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Stub</em>'.\n\t * @generated\n\t */\n\tStub createStub();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tServicesPackage getServicesPackage();\n\n}",
"private interface LoadStrategy {\n /**\n * Perform loading on the specified module.\n * \n * @param logger logs the process\n * @param moduleName the name of the process\n * @param moduleDef a module\n * @throws UnableToCompleteException\n */\n void load(TreeLogger logger, String moduleName, ModuleDef moduleDef)\n throws UnableToCompleteException;\n }",
"public interface ApiFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tApiFactory eINSTANCE = work.andycarpenter.webgen.pims.api.impl.ApiFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>API</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>API</em>'.\n\t * @generated\n\t */\n\tAPI createAPI();\n\n\t/**\n\t * Returns a new object of class '<em>Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Resource</em>'.\n\t * @generated\n\t */\n\tResource createResource();\n\n\t/**\n\t * Returns a new object of class '<em>Resource Selection</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Resource Selection</em>'.\n\t * @generated\n\t */\n\tResourceSelection createResourceSelection();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tApiPackage getApiPackage();\n\n}",
"public interface AppModule extends ApplicationModule {\n void fetchApplist(String flowCode);\n\n List serviceCustomerCall(List inputList, String method);\n\n void fetchApplistpartner(String flowCode);\n\n List updatePaymentDetailsInCRM(List inputList);\n \n void fetchErrorMessage(String errorCode);\n\n void initLpgDistVo(String ftlFlag, String zipcodeFilter);\n\n void fetchAppListLpgLogIn();\n\n void fetchAppListCustomerNonLogin(String pflowCode);\n\n\n List initiatePaymentDetails(List inputList);\n\n List callChartAsync(List inputList);\n\n void insertIntoRoLocator(List jsonArrayList);\n\n void insertVehicleTypeRecord(String count);\n\n void insertProfileEnrichInfo(String FirstName, String LastName, String EmailId, String MobileNo);\n\n void insertRetailEnrichInfo(String FirstName, String LastName, String EmailId, String MobileNo);\n\n void insertIntoAoLocator(List jsonArrayList);\n\n void insertIntoPartnerDistLocator(List jsonArrayList);\n\n void insertIntoPartnerStockLocator(List jsonArrayList);\n}",
"public interface SimplifiedbpmnFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tSimplifiedbpmnFactory eINSTANCE = simplifiedbpmn.impl.SimplifiedbpmnFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Process</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Process</em>'.\n\t * @generated\n\t */\n\tProcess createProcess();\n\n\t/**\n\t * Returns a new object of class '<em>Sequence Flow</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Sequence Flow</em>'.\n\t * @generated\n\t */\n\tSequenceFlow createSequenceFlow();\n\n\t/**\n\t * Returns a new object of class '<em>AND Gateway</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>AND Gateway</em>'.\n\t * @generated\n\t */\n\tANDGateway createANDGateway();\n\n\t/**\n\t * Returns a new object of class '<em>XOR Gateway</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>XOR Gateway</em>'.\n\t * @generated\n\t */\n\tXORGateway createXORGateway();\n\n\t/**\n\t * Returns a new object of class '<em>OR Gateway</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>OR Gateway</em>'.\n\t * @generated\n\t */\n\tORGateway createORGateway();\n\n\t/**\n\t * Returns a new object of class '<em>Task</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Task</em>'.\n\t * @generated\n\t */\n\tTask createTask();\n\n\t/**\n\t * Returns a new object of class '<em>Start Event</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Start Event</em>'.\n\t * @generated\n\t */\n\tStartEvent createStartEvent();\n\n\t/**\n\t * Returns a new object of class '<em>Intermediate Catch Event</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Intermediate Catch Event</em>'.\n\t * @generated\n\t */\n\tIntermediateCatchEvent createIntermediateCatchEvent();\n\n\t/**\n\t * Returns a new object of class '<em>Boundary Event</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Boundary Event</em>'.\n\t * @generated\n\t */\n\tBoundaryEvent createBoundaryEvent();\n\n\t/**\n\t * Returns a new object of class '<em>End Event</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>End Event</em>'.\n\t * @generated\n\t */\n\tEndEvent createEndEvent();\n\n\t/**\n\t * Returns a new object of class '<em>Intermediate Throw Event</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Intermediate Throw Event</em>'.\n\t * @generated\n\t */\n\tIntermediateThrowEvent createIntermediateThrowEvent();\n\n\t/**\n\t * Returns a new object of class '<em>Resource Role</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Resource Role</em>'.\n\t * @generated\n\t */\n\tResourceRole createResourceRole();\n\n\t/**\n\t * Returns a new object of class '<em>Subprocess</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Subprocess</em>'.\n\t * @generated\n\t */\n\tSubprocess createSubprocess();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tSimplifiedbpmnPackage getSimplifiedbpmnPackage();\n\n}",
"public interface WorkloadManagementService\n{\n /**\n * @return for a given project a WorkloadManager object. Also applicable for older INCEpTION\n * version where the workload feature was not present. Also, if no entity can be found,\n * a new entry will be created and returned.\n * @param aProject\n * a project\n */\n WorkloadManager loadOrCreateWorkloadManagerConfiguration(Project aProject);\n\n WorkloadManagerExtension<?> getWorkloadManagerExtension(Project aProject);\n\n void saveConfiguration(WorkloadManager aManager);\n\n List<AnnotationDocument> listAnnotationDocumentsForSourceDocumentInState(\n SourceDocument aSourceDocument, AnnotationDocumentState aState);\n\n Long getNumberOfUsersWorkingOnADocument(SourceDocument aDocument);\n}",
"RegistrationModule createRegistrationModule();",
"Implementation createImplementation();",
"public interface MyHdbtiFactory extends EFactory\n{\n /**\n * The singleton instance of the factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n MyHdbtiFactory eINSTANCE = com.sap.xsk.models.hdbti.myHdbti.impl.MyHdbtiFactoryImpl.init();\n\n /**\n * Returns a new object of class '<em>Hdbdti Model</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Hdbdti Model</em>'.\n * @generated\n */\n HdbdtiModel createHdbdtiModel();\n\n /**\n * Returns a new object of class '<em>Group Type</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Group Type</em>'.\n * @generated\n */\n GroupType createGroupType();\n\n /**\n * Returns a new object of class '<em>Import Config</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Import Config</em>'.\n * @generated\n */\n ImportConfig createImportConfig();\n\n /**\n * Returns a new object of class '<em>Import</em>'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return a new object of class '<em>Import</em>'.\n * @generated\n */\n Import createImport();\n\n /**\n * Returns the package supported by this factory.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the package supported by this factory.\n * @generated\n */\n MyHdbtiPackage getMyHdbtiPackage();\n\n}",
"public interface IApplicationInjector {\r\n\t\r\n\tpublic Runnable getServerListener(int port, int poolSize) throws ApplicationException;\r\n\t\r\n\tpublic Runnable getWorker(Socket socket) throws ApplicationException;\r\n\t\r\n\tpublic IFileUtil getFileUtil() throws ApplicationException;\r\n\r\n}",
"public interface RegisterIntegrationObjectService\n{\n\t/**\n\t * For the given ICC create the exposed destinations\n\t *\n\t * @param destinationTargets given destination targets\n\t * @param inboundChannelConfig given ICC\n\t * @param credential given credentials to be used for the exposed destination\n\t */\n\tvoid createExposedDestinations(List<DestinationTargetModel> destinationTargets,\n\t InboundChannelConfigurationModel inboundChannelConfig,\n\t AbstractCredentialModel credential);\n\n\t/**\n\t * Create exposed OAuth credential for the exposed destination\n\t *\n\t * @param integrationCCD given integration CCD\n\t */\n\tvoid createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);\n\n\t/**\n\t * Create basic credential based on the an existing employee\n\t *\n\t * @param username given employee ID\n\t * @param password given employee password\n\t * @return returns associated basic credential with the employee\n\t */\n\tAbstractCredentialModel createBasicCredential(String username, String password);\n\n\t/**\n\t * Create OAuth credential based on the an existing employee\n\t *\n\t * @param employee given employee\n\t * @return returns associated OAuth credential with the employee\n\t */\n\tAbstractCredentialModel createOAuthCredential(EmployeeModel employee);\n\n\t/**\n\t * Read destination targets\n\t *\n\t * @return destination targets\n\t */\n\tList<DestinationTargetModel> readDestinationTargets();\n\n\t/**\n\t * Read basic credentials\n\t *\n\t * @return basic credentials\n\t */\n\tList<BasicCredentialModel> readBasicCredentials();\n\n\t/**\n\t * Read exposed OAuth credentials\n\t *\n\t * @return exposed OAuth credentials\n\t */\n\tList<ExposedOAuthCredentialModel> readExposedOAuthCredentials();\n\n\t/**\n\t * Read employees\n\t *\n\t * @return employees\n\t */\n\tList<EmployeeModel> readEmployees();\n}",
"public interface IFactory {\n\n public IUser createUser();\n\n public IDepartment addDepartment();\n}",
"public interface TechnologyModuleGUIFactory {\n\n\t/**\n\t * Create a new Browser element for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific element exists.\n\t * \n\t * @param object\n\t * @param browser\n\t * @param parent\n\t * @return the created Browser Element, or null.\n\t */\n\tpublic <T extends TechnologyModelObject> TechnologyModuleBrowserElement<T> createBrowserElement(T object, ProjectBrowser browser,\n\t\t\tBrowserElement parent);\n\n\t/**\n\t * Create a new model view for the specified TechnologyModelObject. <br>\n\t * Can return null if no specific view exists.\n\t * \n\t * @param object\n\t * @param controller\n\t * @param codeGenerationPerspective\n\t * @return the created view or null.\n\t */\n\tpublic <T extends TechnologyModelObject> ModuleView<T> createModelView(T object, SGController controller,\n\t\t\tCodeGenerationPerspective codeGenerationPerspective);\n\n\t/**\n\t * Called at SG Module actions initialization. Used to record all Technology Module specific actions.\n\t * \n\t * @param actionInitializer\n\t */\n\tpublic void initializeActions(SGControllerActionInitializer actionInitializer);\n}",
"public interface Factory {\n Product create();\n}",
"ModuleDefinition createModuleDefinition();",
"public interface SpecimenService\r\n{\r\n static void setInstance(SpecimenService serviceImpl)\r\n {\r\n ServiceRegistry.get().registerService(SpecimenService.class, serviceImpl);\r\n }\r\n\r\n static SpecimenService get()\r\n {\r\n return ServiceRegistry.get().getService(SpecimenService.class);\r\n }\r\n\r\n /** Does a search for matching GlobalUniqueIds */\r\n ParticipantVisit getSampleInfo(Container studyContainer, User user, String globalUniqueId) throws SQLException;\r\n\r\n Set<ParticipantVisit> getSampleInfo(Container studyContainer, User user, String participantId, Date date) throws SQLException;\r\n\r\n Set<ParticipantVisit> getSampleInfo(Container studyContainer, User user, String participantId, Double visit) throws SQLException;\r\n\r\n String getCompletionURLBase(Container studyContainer, CompletionType type);\r\n\r\n Set<Pair<String, Date>> getSampleInfo(Container studyContainer, User user, boolean truncateTime) throws SQLException;\r\n\r\n Set<Pair<String, Double>> getSampleInfo(Container studyContainer, User user) throws SQLException;\r\n\r\n Lsid getSpecimenMaterialLsid(@NotNull Container studyContainer, @NotNull String id);\r\n\r\n void importSpecimens(User user, Container container, List<Map<String, Object>> rows, boolean merge) throws SQLException, IOException, ValidationException;\r\n\r\n void registerSpecimenImportStrategyFactory(SpecimenImportStrategyFactory factory);\r\n\r\n Collection<SpecimenImportStrategyFactory> getSpecimenImportStrategyFactories();\r\n\r\n void registerSpecimenTransform(SpecimenTransform transform);\r\n\r\n Collection<SpecimenTransform> getSpecimenTransforms(Container container);\r\n\r\n @Nullable\r\n SpecimenTransform getSpecimenTransform(String name);\r\n\r\n PipelineJob createSpecimenReloadJob(Container container, User user, SpecimenTransform transform, @Nullable ActionURL url) throws SQLException, IOException, ValidationException;\r\n\r\n void registerSpecimenChangeListener(SpecimenChangeListener listener);\r\n\r\n @Nullable\r\n TableInfo getTableInfoVial(Container container);\r\n\r\n @Nullable\r\n TableInfo getTableInfoSpecimen(Container container);\r\n\r\n @Nullable\r\n TableInfo getTableInfoSpecimenEvent(Container container);\r\n\r\n SpecimenTablesTemplate getSpecimenTablesTemplate();\r\n\r\n Domain getSpecimenVialDomain(Container container, User user);\r\n\r\n Domain getSpecimenEventDomain(Container container, User user);\r\n\r\n Map<String, String> getSpecimenImporterTsvColumnMap();\r\n\r\n SpecimenRequestCustomizer getRequestCustomizer();\r\n\r\n void registerRequestCustomizer(SpecimenRequestCustomizer customizer);\r\n\r\n /** Hooks to allow other modules to control a few items about how specimens are treated */\r\n interface SpecimenRequestCustomizer\r\n {\r\n /** @return whether or not a specimen request must include at least one vial */\r\n boolean allowEmptyRequests();\r\n\r\n /** @return null if users should always supply a destination site for a given request, or the site's id if they should all be the same */\r\n Integer getDefaultDestinationSiteId();\r\n\r\n /** @return true if reports shouldn't give the option to group based on primary, additive, or derivative types */\r\n boolean omitTypeGroupingsWhenReporting();\r\n\r\n /** @return whether the current user can make changes to the status of the request */\r\n boolean canChangeStatus(User user);\r\n\r\n /** @return true if a variety of warning types including vial status, the inclusion of vials spanning multiple locations, and more should be suppressed in the UI */\r\n boolean hideRequestWarnings();\r\n\r\n /** @return a message to show the user after a request has been submitted */\r\n HtmlString getSubmittedMessage(Container c, int requestId);\r\n }\r\n\r\n interface SampleInfo\r\n {\r\n String getParticipantId();\r\n Double getSequenceNum();\r\n String getSampleId();\r\n }\r\n\r\n enum CompletionType\r\n {\r\n SpecimenGlobalUniqueId,\r\n ParticipantId,\r\n VisitId,\r\n LabId\r\n }\r\n}",
"public interface Provider {\n Service newService();\n}",
"public interface Provider {\n Service newService();\n}",
"ModuleDefine createModuleDefine();",
"public interface IEngineeringProjectService extends IService<EngineeringProject> {\n}",
"public interface ISystem extends INonFlowObject {\n\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 IFactory {\n IProductA getProductA();\n IProductB getProductB();\n}",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public interface IOFactory {\r\n /**\r\n * Creates a {@link ProfileReader} for the given {@link InputStream}.\r\n * @param stream the stream to be read.\r\n * @return the created {@link ProfileReader}.\r\n */\r\n public abstract ProfileReader createProfilerReader(InputStream stream);\r\n \r\n /**\r\n * Creates a {@link ProfileWriter} for the given {@link OutputStream}.\r\n * @param stream the stream to be written to.\r\n * @return the created {@link ProfileWriter}.\r\n */\r\n public abstract ProfileWriter createProfileWriter(OutputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileReader} for the given {@link InputStream}.\r\n * @param stream the stream to be read.\r\n * @return the created {@link MergeFileReader}.\r\n */\r\n public abstract MergeFileReader createMergeReader(InputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileWriter} for the given {@link OutputStream}.\r\n * @param stream the stream to be written.\r\n * @return the created {@link MergeFileWriter}.\r\n */\r\n public abstract MergeFileWriter createMergeWriter(OutputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileReader} simulating an empty merge file.\r\n * @return the created {@link MergeFileReader}.\r\n */\r\n public abstract MergeFileReader createEmptyMergeReader();\r\n}",
"public interface IJobService {\n\n void process();\n\n}",
"public interface IImportService {\n /*插入从excel行得到的实体类*/\n Map<String, Object> insertAskLeave(String fileDir) throws IOException;\n\n Map<String, Object> insertBusinessTrip(String fileDir) throws IOException;\n\n Map<String, Object> insertSubway(String fileDir) throws IOException;\n\n Map<String, Object> insertYoOvertime(String fileDir) throws IOException;\n\n Map<String, Object> insertYoItemChange(String fileDir) throws IOException;\n\n Map<String, Object> insertYoYindaIdentify(String fileDir) throws IOException;\n}",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"public interface Factory {\n /* renamed from: a */\n Call mo35727a(Request request);\n }",
"public interface RecordEventsProcessorFactory<TResult> {\r\n\r\n\t/**\r\n\t * @param res the result to feed by processor\r\n\t */\r\n\tpublic RecordEventsProcessor create(TResult res);\r\n\t\r\n}",
"public interface IXLIFFFactory {\r\n\r\n\t/**\r\n\t * Indicates if this implementation of the object model supports a given module.\r\n\t * @param moduleUri the namespace URI of the module for which the query is made.\r\n\t * @return true if the module is supported, false if it is not.\r\n\t */\r\n\tpublic boolean supports (String moduleUri);\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IDocument}.\r\n\t * @return the new document.\r\n\t */\r\n\tpublic IDocument createDocument ();\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IFile}.\r\n\t * @param id the id of this file (must not be null or empty).\r\n\t * @return the new file.\r\n\t */\r\n\tpublic IFile createFile (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new empty instance of {@link IGroup}.\r\n\t * @param parent the parent group or null to create a top-level group.\r\n\t * @param id the id of the group (must not be null or empty).\r\n\t * @return the new group.\r\n\t */\r\n\tpublic IGroup createGroup (IGroup parent,\r\n\t\tString id);\r\n\t\r\n\t/**\r\n\t * Creates a new instance of {@link IUnit}.\r\n\t * @param id the id of the new unit.\r\n\t * @return the new unit.\r\n\t */\r\n\tpublic IUnit createUnit (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IContent} object.\r\n\t * @param store the store to associate with the new object.\r\n\t * @param isTarget true if the new content is for the target language, false for the source.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent createContent (IStore store,\r\n\t\tboolean isTarget);\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a {@link IContent} object.\r\n\t * @param store the store that should be associated with the new content.\r\n\t * @param isTarget true if the destination is a target content.\r\n\t * @param original the original object to duplicate.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent copyContent (IStore store,\r\n\t\tboolean isTarget,\r\n\t\tIContent original);\r\n\t\r\n\t/**\r\n\t * Creates a copy of a {@link ISegment} object, with all its core metadata but with an empty content.\r\n\t * The method will create a new ID for the new segment.\r\n\t * @param store the store that should be associated with the new segment.\r\n\t * @param original the original object to copy.\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment copyEmptySegment (IStore store,\r\n\t\tISegment original);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} object with an empty source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} with a given plain text source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @param sourcePlainText the plain text source content of the new part.\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store,\r\n\t\tString sourcePlainText);\r\n\r\n\t/**\r\n\t * Creates a new {@link ISegment} object with an empty source.\r\n\t * @param store the store associated with the new segment (cannot be null).\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createSegment (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new unattached {@link ISegment} object with an empty source.\r\n\t * This segment will have its own store and cannot be used with other or within a unit.\r\n\t * Lone segments cannot use any methods related to their parent. \r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createLoneSegment ();\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a given {@link ITag} object.\r\n\t * @param original the original tag to duplicate.\r\n\t * @param destinationTags the list of destination tags. This is used to find and connect\r\n\t * opening tags when creating closing tags.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic ITag copyTag (ITag original,\r\n\t\tITags destinationTags);\r\n\r\n\t/**\r\n\t * Creates a new {@link IExtObject} object.\r\n\t * @param nsUri the namespace URI of this object.\r\n\t * @param name the name of this object.\r\n\t * @return the new extension object.\r\n\t */\r\n\tpublic IExtObject createExtObject (String nsUri,\r\n\t\tString name);\r\n\t\r\n\t/**\r\n\t * Creates a new opening tag for a marker.\r\n\t * @param id the id of the marker.\r\n\t * @param type the type of the marker.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic IMTag createOpeningMTag (String id,\r\n\t\tString type);\r\n\r\n}",
"MakeflowFactory getMakeflowFactory();",
"public interface ItemService {\n\n /**\n * 导入商品数据到索引库\n * @return\n */\n TaotaoResult importAllItems() throws SolrServerException, IOException;\n}",
"public interface ProductFactory {\n Product createProduct();\n}",
"@InputValidation(IValidationStrategy.PROCESS.class)\r\npublic interface IFileFormatService extends IService2 {\r\n\r\n\t/**\r\n\t * Saves new file formats into storage\r\n\t * \r\n\t * @param formData\r\n\t * FileFormatFormData\r\n\t * @return the assigned FileFormatFormData\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic FileFormatFormData create(FileFormatFormData formData)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Deletes all file formats from storage having one of the assigned ids\r\n\t * \r\n\t * @param ids\r\n\t * Long[]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic void delete(Long[] ids) throws ProcessingException;\r\n\r\n\t/**\r\n\t * Modifies the assigned file format in the storage\r\n\t * \r\n\t * @param formData\r\n\t * FileFormatFormData\r\n\t * @return the assigned FileFormatFormData\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic FileFormatFormData update(FileFormatFormData formData)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches all formats which belongs to the assigned file type id from\r\n\t * storage [file format id, format, file type]\r\n\t * \r\n\t * @param filetypeNr\r\n\t * Long\r\n\t * @return Object[][]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Object[][] getFileFormats(Long filetypeNr)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Decides whether there are more than one file type the assigned file\r\n\t * format belongs to\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return boolean [true for multiple file format - file type connections]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic boolean isFormatMultipleAssigned(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches the file type id for the assigned file format from storage\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return Long [file type id]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Long getFiletypeForFileFormat(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Returns true if the assigned file format has already been stored\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return boolean\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic boolean isFileformatRegistered(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches an Array of ids of all file types, the assigned file format\r\n\t * belongs to\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return Long[]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Long[] getFiletypesForFileFormat(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n}",
"public interface MappingScriptFactory<T> {\n\t\n\t/**\n\t * \n\t * Create \n\t * \n\t * \n\t * @param scripts\n\t * @return\n\t */\n\tpublic MappingScript<T> create(InputStream... scripts);\n\n}",
"public interface IEngineGenerator extends IEnergyProviders {\n\n\t/**\n\t * Check if there is no fuel\n\t * @return true if there is no fuel\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsEmpty() throws Exception;\n\n\t/**\n\t * Check if the engine generator is full\n\t * @return true if the engine generator is full\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean fuelIsFull() throws Exception;\n\n\t/**\n\t * Get the quantity of fuel in the engine generator\n\t * @return quantity of fuel in the engine generator\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic double fuelQuantity() throws Exception;\n\n\t/**\n\t * Add fuel into the engine generator\n\t * @param quantity of fuel put into the engine generator (can't exceed the max capacity of the engine generator)\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void addFuel(int quantity) throws Exception;\n\n\t/**\n\t * Turn on the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void on() throws Exception; // use fuel to prod electricity\n\n\t/**\n\t * Turn off the engine generator\n\t * @return\tvoid\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic void off() throws Exception;\n\n\t/**\n\t * Check if the engine generator is on\n\t * @return\ttrue if the engine generator is on\n\t * @throws Exception<i>todo.</i>\n\t */\n\tpublic boolean isOn() throws Exception;\n\n}",
"public interface ProcessDefinitionSer {\n /**\n * 查询流程定义\n */\n public List<TempDefi> queryDefinition();\n\n /**\n * 删除流程定义\n */\n String deletlDefinition(String deployID);\n\n String downDefinitionPng(String deployID);\n}",
"public interface Simpleflowmodel4pcmFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmFactory eINSTANCE = edu.kit.kastel.scbs.simpleflowmodel4pcm.impl.Simpleflowmodel4pcmFactoryImpl\r\n\t\t\t.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flows</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flows</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlows createFlows();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flow</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flow</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlow createFlow();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSource createSignatureSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSource createParameterSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureIdentification createSignatureIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterIdentification createParameterIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Generic Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Generic Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tGenericSink createGenericSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSink createSignatureSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSink createParameterSink();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmPackage getSimpleflowmodel4pcmPackage();\r\n\r\n}",
"public interface ImageSourceFactory {\r\n\r\n\t/**\r\n\t * Publishes the <code>ImageSource</code>s found in the resource using the given publisher\r\n\t * @param publisher\r\n\t */\r\n\tvoid loadImages(final ImageSourcePublisher publisher);\r\n\r\n\t/**\r\n\t * Cancels the ImageSource production. After this method is called the Factory\r\n\t * may no longer publish images. Production can be restarted by a new call\r\n\t * to loadImages.\r\n\t */\r\n\tvoid cancelProduction(); \r\n\t\r\n}",
"public interface WorkflowService {\n void parseWf(File ff) throws Exception;\n}",
"public interface Instrumentable {\n\t\n\t/**\n\t * Process incoming market instrument definition.\n\t */\n\tvoid process(InstrumentDefinition value);\n\n\t/**\n\t * Generate market instrument definition snapshot.\n\t */\n\tInstrumentDefinition definition();\n\n}",
"public interface VerticleFactory extends Supplier<Verticle> {\n}",
"public interface OpenmlperfPerformanceMonitoringFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tOpenmlperfPerformanceMonitoringFactory eINSTANCE = openmlperf.openmlperfPerformanceMonitoring.impl.OpenmlperfPerformanceMonitoringFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>SUT</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>SUT</em>'.\n\t * @generated\n\t */\n\tSUT createSUT();\n\n\t/**\n\t * Returns a new object of class '<em>Load Generator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Load Generator</em>'.\n\t * @generated\n\t */\n\tLoadGenerator createLoadGenerator();\n\n\t/**\n\t * Returns a new object of class '<em>Monitor</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Monitor</em>'.\n\t * @generated\n\t */\n\tMonitor createMonitor();\n\n\t/**\n\t * Returns a new object of class '<em>Metric Model</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Metric Model</em>'.\n\t * @generated\n\t */\n\tMetricModel createMetricModel();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tOpenmlperfPerformanceMonitoringPackage getOpenmlperfPerformanceMonitoringPackage();\n\n}",
"public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}",
"public interface ConfigurableComponentProvider extends ComponentProvider {\n\n}",
"public interface ProductProcessorMP0 extends ProductProcessor {\n\n\n\n\n void processFile(MultipartFile file, ContractImage contractImage, Contract contract) throws IOException, IllegalDataException;\n}",
"public interface AnalysisPluginInterface {\n\n\t/**\n\t * The framework will call this method to get the title of this analysis\n\t * plugin.\n\t * \n\t * @return The title.\n\t */\n\tString getTitle();\n\n\t/**\n\t * The framework will call this method to get the description of this\n\t * analysis plugin.\n\t * \n\t * @return The description.\n\t */\n\tString getDescription();\n\n\t/**\n\t * The framework will use the method to pass by a complete set of user's\n\t * data.\n\t * \n\t * @param data\n\t * A list of all person objects.\n\t */\n\tvoid setData(List<Person> data);\n\n\t/**\n\t * The framework will call this method to get the result. The result\n\t * should be presented in a JPanel.\n\t * \n\t * @return A JPanel the presents the result.\n\t */\n\tJPanel getPanel();\n\n}",
"public interface IPluginLibrary {\n \n /*\n * Initializes the library\n */\n public void initialize(DefaultPluginsCollector collector);\n \n /*\n * Start the module and initialize components\n */\n public void startLibrary();\n \n /*\n * Fetches all extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return The gathered plugins in a LinkedList\n */\n public void loadAllPlugins(final String extPointId);\n \n /*\n * Fetches new extensions for the given extension point qualifiers.\n * \n * @param extPointId The extension point id to gather plugins for\n * \n * @return A human readable string\n */\n public String loadNewPlugin(final String extPointId); \n \n /**\n * Checks a plugin for validity.\n * \n * @param plugin The plugin to check\n * @param The level to test against, this method will return true if the result is greater or\n * equal than the testLevel\n * @return true or false\n */\n public boolean isValidPlugin(MartinPlugin plugin, MartinAPITestResult testLevel);\n\n /**\n * Answer a request by searching plugin-library for function and executing\n * them.\n * \n * @param req The {@link ExtendedQequest} to answer.\n * \n * @return The generated {@link MResponse}.\n */\n public MResponse executeRequest(ExtendedRequest req);\n\n \n public List<PluginInformation> getPluginInformation();\n \n /**\n * Returns a list of example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of example calls\n */\n public List<MExampleCall> getExampleCalls();\n \n /**\n * Returns a list of 5 randomly choosen example calls read from the plugin database. Is usually\n * only called from the AI controller when the user first loads the MArtIn\n * frontend.\n * \n * @return a list of 5 randomly choosen example calls\n */\n public List<MExampleCall> getRandomExampleCalls();\n \n public Map<String, Pair<Boolean, MartinPlugin> > getPluginExtentions();\n}",
"ASPMFactory getASPMFactory();",
"public interface ITaskMapPipeModel {\n}",
"private ModuleProvider(String inProviderName,\n AbstractMarketDataModule<?,?> inFeed)\n {\n providerName = inProviderName;\n description = providerName + \" proxy\";\n feed = inFeed;\n moduleManager = ModuleManager.getInstance();\n processor = new Processor();\n // TODO register a feed status listener to detect starts and stops and update status\n start();\n }",
"public interface BSFMeem {\r\n\r\n /**\r\n * Default BeanShell directory path (relative)\r\n */\r\n\r\n public final static String DEFAULT_BEANSHELL_DIRECTORY = \"../../beanshell\";\r\n\r\n /**\r\n * Property for specifying the BeanShell directory path (relative)\r\n */\r\n\r\n public final static String PROPERTY_BEANSHELL_DIRECTORY =\r\n \"org.openmaji.scripting.bsf.beanshell.directory\";\r\n\r\n /**\r\n * Default BeanShell initialization script name\r\n */\r\n\r\n public final static String DEFAULT_BEANSHELL_SCRIPT = \"initialize.bsh\";\r\n\r\n /**\r\n * Property for specifying the BeanShell initialization script\r\n */\r\n\r\n public final static String PROPERTY_BEANSHELL_SCRIPT =\r\n \"org.openmaji.scripting.bsf.beanshell.scriptName\";\r\n\r\n /**\r\n * Default BeanShell TCP/IP listen port\r\n */\r\n\r\n public final static int DEFAULT_BEANSHELL_PORT = 6969;\r\n\r\n /**\r\n * Export an internal Maji object instance.\r\n *\r\n * @param name Object exported using this name\r\n * @param value Object instance to export\r\n * @param specification Object type\r\n * @exception BSFException BeanShell couldn't evaluate the variable value\r\n */\r\n\r\n public void export(\r\n String name,\r\n Object value,\r\n Class specification)\r\n throws BSFException;\r\n \r\n /**\r\n * \r\n * @param scriptFilename\r\n * @exception BSFException\r\n */\r\n public void source(String scriptFilename) \r\n throws BSFException;\r\n\r\n/* ---------- Nested class for SPI ----------------------------------------- */\r\n\r\n public class spi {\r\n public static BSFMeem create() {\r\n return((BSFMeem) MajiSPI.provider().create(BSFMeem.class));\r\n }\r\n\r\n public static String getIdentifier() {\r\n return(\"bsfMeem\");\r\n };\r\n }\r\n\r\n/* ---------- Factory specification ---------------------------------------- */\r\n\r\n /**\r\n * Left for org.openmaji.implementation.test.util.Tester's get find the BSFMeem\r\n * via the EssentialMeemHelper. Remove A.S.A.P.\r\n */\r\n\r\n public final static String IDENTIFIER = \"bsfMeem\";\r\n}",
"IotdslFactory getIotdslFactory();",
"ImplementationManager createManager();",
"public interface SpoutFactory {\n public IRichSpout create(Namespace namespace, Config conf);\n}",
"public interface EnemyShipPartsFactory {\n ESWeapon addESGun();\n ESEngine addESEngine();\n}",
"public interface RepoModule {\n void saveModule(Module module) throws Exception;\n void saveLocalObj(Collection<Module> modules) throws Exception;\n void updateFinalStatus(String vehicleNo) throws Exception;\n void updateFlag(String vehicleNo, String checkPointName) throws Exception;\n void deleteTableData()throws Exception;\n void deleteTableData(String vehicleNo) throws Exception;\n Set<Module> uploadModuleData(String userId) throws Exception;\n Integer checkDataInspections() throws Exception;\n List<String> getLocalVehicleList()throws Exception;\n List<Module> uploadData(String userId)throws Exception;\n Set<Module> selectAll()throws Exception;\n}",
"public interface FeaturedDataAgent {\n\n /**\n * load feature from API.\n */\n void loadFeatured();\n}",
"interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithParentResource,\n DefinitionStages.WithIdProvider,\n DefinitionStages.WithCreate {\n }",
"public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }",
"public JythonObjectFactory(PySystemState state, Class interfaceType, String moduleName, String className) {\n this.interfaceType = interfaceType;\n PyObject importer = state.getBuiltins().__getitem__(Py.newString(\"__import__\"));\n PyObject module = importer.__call__(Py.newString(moduleName));\n klass = module.__getattr__(className);\n System.err.println(\"module=\" + module + \",class=\" + klass);\n }",
"public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}",
"public interface PostCreationProcessor {\n\n /**\n * 执行后处理工作\n */\n void invoke();\n\n}"
] | [
"0.67414194",
"0.64813006",
"0.62432534",
"0.61516374",
"0.6131426",
"0.6033083",
"0.6014732",
"0.5997443",
"0.5837666",
"0.58284926",
"0.581421",
"0.5794963",
"0.5745069",
"0.5733257",
"0.5680674",
"0.5635299",
"0.5616043",
"0.5609423",
"0.56040126",
"0.559458",
"0.55400515",
"0.55131495",
"0.55055934",
"0.55042547",
"0.5501443",
"0.5474118",
"0.5462503",
"0.54611355",
"0.54568547",
"0.544018",
"0.5437518",
"0.5434249",
"0.5428986",
"0.54256594",
"0.5425142",
"0.54218876",
"0.5418185",
"0.5412055",
"0.5410791",
"0.5401903",
"0.5398819",
"0.53988177",
"0.539737",
"0.5394698",
"0.5394068",
"0.5385151",
"0.5384157",
"0.5381048",
"0.5373799",
"0.53728205",
"0.5370278",
"0.53691375",
"0.5366319",
"0.5366319",
"0.53569",
"0.535377",
"0.5352053",
"0.5351668",
"0.5348837",
"0.5343633",
"0.53433007",
"0.534268",
"0.53338814",
"0.5332206",
"0.53166234",
"0.5315188",
"0.5312892",
"0.5311099",
"0.52937996",
"0.52814895",
"0.5273089",
"0.52719074",
"0.52691317",
"0.5265443",
"0.52609533",
"0.5260142",
"0.5254735",
"0.52532625",
"0.5249944",
"0.5246003",
"0.52400464",
"0.5239145",
"0.5229932",
"0.5225802",
"0.52109003",
"0.5209338",
"0.5208495",
"0.52048075",
"0.520456",
"0.51945025",
"0.51934123",
"0.5189285",
"0.5188346",
"0.51799667",
"0.5177015",
"0.51719713",
"0.5163139",
"0.5161925",
"0.5161356",
"0.51534784"
] | 0.86103445 | 0 |
Gets the display name that identifies the family of ingest modules the factory creates. Autopsy uses this string to identify the module in user interface components and log messages. The module name must be unique. so a brief but distinctive name is recommended. | String getModuleDisplayName(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName()\n {\n return MODULE_NAME;\n }",
"private String getModuleName() {\n \t\t// If there is an autoconnect page then it has the module name\n \t\tif (autoconnectPage != null) {\n \t\t\treturn autoconnectPage.getSharing().getRepository();\n \t\t}\n \t\tString moduleName = modulePage.getModuleName();\n \t\tif (moduleName == null) moduleName = project.getName();\n \t\treturn moduleName;\n \t}",
"public String getModuleName() {\n\t\treturn \"university-module-controller>TStaff\";\r\n\t}",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"java.lang.String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"String getDisplayName();",
"default String getDisplayName() {\r\n\t\treturn getClass().getSimpleName();\r\n\t}",
"String getDisplay_name();",
"String displayName();",
"String displayName();",
"public String getDisplayName();",
"public String getDisplayName();",
"public String getDisplayName();",
"public String getDisplayName();",
"public String getDisplayName()\n {\n return getString(\"DisplayName\");\n }",
"public String getDisplayName() {\n return DISPLAY_NAME;\n }",
"public String getDisplayName () {\n return impl.getDisplayName ();\n }",
"@Override\n\tpublic String getDisplayName() {\n\t\treturn getGivenName() + \" \" + getFamilyName();\n\t}",
"public String getDisplayName() {\n\t\treturn displayName.get();\n\t}",
"@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }",
"@Nonnull\r\n String getDisplayName();",
"public String getName()\r\n \t{\n \t\treturn (explicit ? (module.length() > 0 ? module + \"`\" : \"\") : \"\")\r\n \t\t\t\t+ name + (old ? \"~\" : \"\"); // NB. No qualifier\r\n \t}",
"public String getDisplayName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDisplayName\");\n\t\t\treturn \"Determine Semantic Version for project\";\n\t\t}",
"public String getDisplayName() {\n return this.displayname;\n }",
"public String getName() {\n return m_module.getConfiguration().getName();\n }",
"public final String getModuleName() {\n return MODULE_NAME;\n }",
"public String getName() { return displayName; }",
"public String getDisplayName() {\n return displayName;\n }",
"@Override\n\tpublic String getDisplayName() {\n\t\treturn displayName;\n\t}",
"@Override\n\tpublic String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n return displayName;\n }",
"public String getDisplayName() {\n return displayName;\n }",
"public String getDisplayName() {\n return displayName;\n }",
"public String getDisplayName () {\n return displayName;\n }",
"public String getDisplayName () {\n return displayName;\n }",
"public String getDisplayName() {\r\n\t\treturn displayName;\r\n\t}",
"@NonNull\n String getDisplayName();",
"public String getDisplayName() {\n return displayName;\n }",
"public String getDisplayName() {\n return displayName;\n }",
"@Override\n public String getDisplayName() {\n\n return Messages.displayName();\n }",
"public String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n\t\treturn displayName;\n\t}",
"public String getDisplayName() {\n return _displayName;\n }",
"public String getDisplayName()\n {\n return displayName;\n }",
"public String getDisplayName()\n {\n return displayName;\n }",
"public String getDisplayName() {\n return mDisplayName;\n }",
"public String getDisplayName()\n {\n return m_strDisplayName;\n }",
"public String getDisplayName() {\n return mDisplayName;\n }",
"public String getDisplayName() {\n return typeElement.getQualifiedName().toString();\n }",
"String getFriendlyName(YAPIContext ctx) throws YAPI_Exception\n {\n if (_classname.equals(\"Module\")) {\n if (_logicalName.equals(\"\"))\n return _serial + \".module\";\n else\n return _logicalName + \".module\";\n } else {\n YPEntry moduleYP = ctx._yHash.resolveFunction(\"Module\", _serial);\n String module = moduleYP.getFriendlyName(ctx);\n int pos = module.indexOf(\".\");\n module = module.substring(0, pos);\n if (_logicalName.equals(\"\"))\n return module + \".\" + _funcId;\n else\n return module + \".\" + _logicalName;\n }\n }",
"String getModuleDescription();",
"public String displayName()\n {\n return displayName;\n }",
"public String getDisplayName() {\n return this.displayName;\n }",
"public String getDisplayName() {\n return this.displayName;\n }",
"@NotNull\n public String getDisplayName() {\n // The ID is deliberately kept in a pretty user-readable format but we could\n // consider prepending layout/ on ids that don't have it (to make the display\n // more uniform) or ripping out all layout[-constraint] prefixes out and\n // instead prepending @ etc.\n return myId;\n }",
"public String getDisplayName() {\n // The ID is deliberately kept in a pretty user-readable format but we could\n // consider prepending layout/ on ids that don't have it (to make the display\n // more uniform) or ripping out all layout[-constraint] prefixes out and\n // instead prepending @ etc.\n return mId;\n }",
"public java.lang.String getDisplayName() {\n return this._displayName;\n }",
"public String getDisplayName() {\n return this.displayName;\n }",
"public String getName() {\n return Utility.getInstance().getPackageName();\n }",
"@Override\n\tpublic java.lang.String getName() {\n\t\treturn _scienceApp.getName();\n\t}",
"public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private String name(String module)\n {\n return module.split(\"%%\")[1];\n }",
"public String getName() {\n return (\"Regular Factory\");\n }",
"public String getModuleName() {\n\t\treturn \"IGA: Prepare data for Model (Decision Tree)\";\n\t}",
"public String getModuleInfo () {\n\t\treturn \"<html> <head> </head> <body> Evalute this F1 population. </body></html>\";\n\t}",
"public String getStrdisplayname() {\n return strdisplayname;\n }",
"public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }",
"public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String displayName() {\n return this.displayName;\n }",
"public String displayName() {\n return this.displayName;\n }",
"@java.lang.Override\n public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n }\n }",
"public final java.lang.String getDisplayName() { throw new RuntimeException(\"Stub!\"); }",
"public String getModuleName() {\n return moduleNameString;\n }",
"@Override\n public String getDisplayName() {\n return this.name;\n }",
"@NotNull\n String getDisplayName();",
"@java.lang.Override\n public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getDisplayName() {\n java.lang.Object ref = displayName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n displayName_ = s;\n return s;\n }\n }",
"public String getDisplayName() {\n return configName;\n }",
"public abstract String getModuleName( );",
"public static String getDisplayName(String fieldName)\n\t{\n\t\tString displayName = null;\n\n\t\tif(StringUtil.isInvalidString(fieldName))\n\t\t{\n\t\t\treturn fieldName;\n\t\t}\n\n\t\tint indexOfSeparator = fieldName.indexOf(MODULE_FIELD_SEPARATOR);\n\n\t\tif(indexOfSeparator==-1)\n\t\t{\n\t\t\treturn fieldName;\n\t\t}\n\n\t\tdisplayName = fieldName.substring(indexOfSeparator+1);\n\n\t\treturn displayName;\n\t}",
"public String getName() {\r\n\t\treturn GDAssemblerUI.getText(UI_TEXT);\r\n\t}",
"@Override\n\tpublic String getDisplayName() {\n\t\treturn null;\n\t}",
"@Override\n public String moduleName() {\n return MODULE_NAME;\n }",
"public String getName() {\r\n return getDef().getName();\r\n }",
"public String getName() {\r\n try {\r\n return PirolPlugInMessages.getString(this.getShortClassName());\r\n } catch (RuntimeException e) {\r\n return super.getName();\r\n }\r\n\r\n }",
"public String getDisplayName() {\n return DatadogBuildListener.DISPLAY_NAME;\n }",
"public String getFriendlyName() {\n return Token2Constants.AUTHENTICATOR_FRIENDLY_NAME;\n }"
] | [
"0.68989193",
"0.6840316",
"0.67794496",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6751594",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6714473",
"0.6690251",
"0.66738135",
"0.6641019",
"0.6641019",
"0.66250163",
"0.66250163",
"0.66250163",
"0.66250163",
"0.662429",
"0.6576092",
"0.64801836",
"0.64604133",
"0.6443327",
"0.64268184",
"0.63887465",
"0.63857996",
"0.63600296",
"0.63373363",
"0.63316435",
"0.6309409",
"0.6309078",
"0.6294653",
"0.62802327",
"0.62802327",
"0.6269576",
"0.6269576",
"0.6269576",
"0.6267681",
"0.6267681",
"0.6257373",
"0.6253276",
"0.62523985",
"0.62411416",
"0.622842",
"0.62101877",
"0.62101877",
"0.62101877",
"0.62101877",
"0.62101877",
"0.6200247",
"0.61989063",
"0.61989063",
"0.6193563",
"0.6191577",
"0.61890125",
"0.6188985",
"0.6187078",
"0.61848176",
"0.6173971",
"0.6150454",
"0.6150454",
"0.6150162",
"0.61347324",
"0.6134015",
"0.6126391",
"0.6120999",
"0.6114177",
"0.6108508",
"0.6102187",
"0.60938644",
"0.6091763",
"0.6083223",
"0.6081797",
"0.60742885",
"0.60633224",
"0.60633224",
"0.60553783",
"0.60553783",
"0.60352916",
"0.60232496",
"0.6001115",
"0.59985495",
"0.5996072",
"0.597326",
"0.597326",
"0.59452945",
"0.59401757",
"0.59337646",
"0.59299123",
"0.59234685",
"0.5908336",
"0.5904502",
"0.59026146",
"0.5896913",
"0.5887219"
] | 0.77081025 | 0 |
Gets a brief, userfriendly description of the family of ingest modules the factory creates. Autopsy uses this string to describe the module in user interface components. | String getModuleDescription(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getModuleDisplayName();",
"public String getModuleInfo () {\n\t\treturn \"<html> <head> </head> <body> Evalute this F1 population. </body></html>\";\n\t}",
"public String getModuleInfo() {\n\t\tString s =\n\t\t\t\"<p>Overview: Automatically discretize scalar data for the \"\n\t\t\t\t+ \"Naive Bayesian classification model.\"\n\t\t\t\t+ \"<p>Detailed Description: Given a table of Examples, define the bins for each \"\n\t\t\t\t+ \"scalar input column. </P><P>When binning Uniformly, \"\n\t\t\t\t+ \"the number of bins is determined by '<i>Number of Bins</i>' property, \"\n\t\t\t\t+ \"and the boundaries of the bins are set so that they divide evenly over the range \"\n\t\t\t\t+ \"of the binned column.</p><P>\"\n\t\t\t\t+ \" When binning by weight, '<i>Number of Items per Bin</I>' sets the size of each bin. \"\n\t\t\t\t+ \"The values are then binned so that in each bin there is the same number of items. \"\n\t\t\t\t+ \"For more details see description of property '<i>Number of Items per Bin</I>'.\"\n\t\t\t\t+ \"</P><P>Data Handling: This module does not modify the input data.\"\n\t\t\t\t+ \"<p>Scalability: The module requires enough memory to make copies of \"\n\t\t\t\t+ \"each of the scalar input columns.\";\n\n\t\treturn s;\n\t}",
"public String getDescription() {\n return m_module.getConfiguration().getDescription();\n }",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"@Override\n public String toString() {\n return String.format(\"Module '%s'\", getName());\n }",
"public String getModuleName() {\n\t\treturn \"IGA: Prepare data for Model (Decision Tree)\";\n\t}",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"String description();",
"public String descriere(){\r\n\t\treturn \"Flori\";\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();",
"@Override\n public String getDescription() {\n return getClass().getName();\n }",
"public String getDisplayName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDisplayName\");\n\t\t\treturn \"Determine Semantic Version for project\";\n\t\t}",
"public String description();",
"@Override\n public String getDescription() {\n return name;\n }",
"public String getDescription ();",
"public String getModuleName() {\n\t\treturn \"university-module-controller>TStaff\";\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn String.format(\"%s: %s\", getName(), getDescription());\r\n\t}",
"public String getModuleInfo () {\n\t\treturn \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><D2K> <Info common=\\\"Prepare Data Module\\\"> <Text>This forms the training data from ranked individuals and the testing data from unranked indivs for Model (Decision Trees). </Text> </Info></D2K>\";\n\t}",
"public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"String getDescription();",
"@Override\n public String getDescription() {\n return souvenir.getDescription();\n }",
"public String getName() {\n return (\"Regular Factory\");\n }",
"public abstract String getDescription();",
"public abstract String getDescription();",
"public abstract String getDescription();",
"public abstract String getDescription();",
"public abstract String getDescription();",
"public abstract String getDescription();",
"public abstract String getDescription();"
] | [
"0.6605281",
"0.6478861",
"0.63647175",
"0.63324356",
"0.61512065",
"0.6090395",
"0.58874255",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.5880812",
"0.587425",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5869822",
"0.5821379",
"0.58208317",
"0.5807098",
"0.57997",
"0.5782008",
"0.5780955",
"0.57801634",
"0.5776598",
"0.5751964",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.57472545",
"0.5711976",
"0.5701915",
"0.56993634",
"0.56993634",
"0.56993634",
"0.56993634",
"0.56993634",
"0.56993634",
"0.56993634"
] | 0.6912049 | 0 |
Gets the version number of the family of ingest modules the factory creates. | String getModuleVersionNumber(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getVersionNum();",
"public int getVersionNumber() {\n return versionNumber;\n }",
"public int getVersion()\n {\n return info.getVersion().intValueExact();\n }",
"public int getLibVersionNumber();",
"long getVersionNumber();",
"Integer getVersion();",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public final int getVersion() {\n return version;\n }",
"public Token getModuleVersion()\n {\n // ie: use Module 'x'\n if (!getToken(OperatorToken.class, 3).isNull())\n {\n return Token.NULL;\n }\n\n return getToken(NumberToken.class, 2);\n }",
"public String getFoundVersion() {\r\n\t\treturn this.fnd;\r\n\t}",
"public String getVersionNumber ();",
"int getCurrentVersion();",
"public int getVersion() {\n return this.version;\n }",
"public int getNumVersions(){\n return versions.size();\n }",
"public Integer getVersion() {\r\n return version;\r\n }",
"public Float getVersionNumber() {\n return versionNumber;\n }",
"@Nullable\n public ModuleVersionIdentifier getModuleVersion() {\n return moduleVersion;\n }",
"public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersion() {\n return version;\n }",
"public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}",
"public int getFileVersion() {\n\n return fileVersion;\n\n }",
"public Integer version() {\n return this.version;\n }",
"public int getFileVersion() {\r\n\t\treturn this.fileVersion;\r\n\t}",
"public abstract int getVersion();",
"@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }",
"public int getNextVersion() {\n return emlVersion + 1;\n }",
"public long getVersionNo() {\r\n return versionNo;\r\n }",
"public String getVersionNumber() {\n return versionNumber;\n }",
"public String getServiceVersion();",
"public String getProductVersion();",
"public java.lang.String getVersionNumber() {\n return versionNumber;\n }",
"public Number getVersion() {\n return (Number) getAttributeInternal(VERSION);\n }",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public int getMaxVersion ()\n {\n return max_version;\n }",
"public long getVersion() {\n return version;\n }",
"public long getVersion() {\n return version;\n }",
"@java.lang.Override\n public long getVersion() {\n return version_;\n }",
"public static String getVersion() {\n\t\treturn version;\r\n\t}",
"public abstract double getVersionNumber();",
"public Integer getVersion() {\n\t\t\n\t\treturn this.version;\n\t}",
"public static int getAppVersionCode(){\n PackageManager pm = getContext().getPackageManager();\n if(pm != null) {\n PackageInfo pi;\n try {\n pi = pm.getPackageInfo(getContext().getPackageName(), 0);\n if(pi != null) {\n return pi.versionCode;\n }\n }catch(NameNotFoundException e) {\n e.printStackTrace();\n }\n }\n return -1;\n }",
"public static String getVersion() {\n\t\treturn version;\n\t}",
"public short getVersions()\n {\n return this.versions;\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public Long getVersion() {\n return version;\n }",
"public int getVersion() {\n return mVersion;\n }",
"public int getVersion() { return 1; }",
"public String getVersion () {\r\n return version;\r\n }",
"public short getMajorSubsystemVersion()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt16(relpos(Offsets.MAJOR_SUBSYSTEM_VERSION.position));\n }",
"public long getVersion() {\r\n return this.version;\r\n }",
"int getVersion() {\n return mVersion;\n }",
"public static String getVersion() {\n return version;\n }",
"public static String getVersion() {\n return version;\n }",
"public static final String getVersion() { return version; }",
"public static final String getVersion() { return version; }",
"public String getVersion() {\r\n return version;\r\n }",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}",
"public synchronized int getMajorVersionFrom()\n {\n return majorVersionFrom;\n }",
"int getInstalledModuleVersionsCount();",
"public Token getVersion()\n {\n return getToken(NumberToken.class, 1);\n }",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion()\n {\n return version;\n }",
"public short getVersion() {\n return version;\n }",
"@Override\n public String getEISProductVersion() throws ResourceException {\n return repository.getDescriptor(Repository.REP_VERSION_DESC);\n }",
"public String getVersion()\n {\n return version;\n }",
"public String getVersion()\n {\n return version;\n }",
"public Version getVersion();",
"public String getVersion() {\n return version;\n }",
"Long getVersion();",
"public String getVersion() {\n return GemFireVersion.asString();\n }",
"java.lang.String getApplicationVersion();",
"public String getVersion() {\r\n\t\treturn version;\r\n\t}",
"public org.apache.xmlbeans.XmlInteger xgetVersion()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(VERSION$6, 0);\r\n return target;\r\n }\r\n }",
"public String getVersion() {\n\t\treturn version;\n\t}",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }"
] | [
"0.64304805",
"0.6389632",
"0.6353739",
"0.63511336",
"0.63164973",
"0.623685",
"0.62341654",
"0.62341654",
"0.62341654",
"0.62341654",
"0.62341654",
"0.6211659",
"0.6206364",
"0.61954236",
"0.6162571",
"0.6129348",
"0.6122109",
"0.6108706",
"0.60890394",
"0.6074906",
"0.60719603",
"0.606071",
"0.6040715",
"0.6040715",
"0.6040715",
"0.6040715",
"0.6040715",
"0.6040715",
"0.6040642",
"0.60365164",
"0.60359526",
"0.60344577",
"0.60249966",
"0.59880793",
"0.59511465",
"0.59418",
"0.59369177",
"0.5920007",
"0.59183145",
"0.59165573",
"0.5902174",
"0.5899546",
"0.5899546",
"0.589781",
"0.5895042",
"0.5895042",
"0.58702517",
"0.5864007",
"0.5859245",
"0.5850002",
"0.58495754",
"0.58461857",
"0.5842112",
"0.58179235",
"0.58179235",
"0.58179235",
"0.58179235",
"0.58163685",
"0.5814597",
"0.5808303",
"0.5796582",
"0.57962745",
"0.5782228",
"0.57816726",
"0.57816726",
"0.576985",
"0.576985",
"0.5767276",
"0.57642394",
"0.57642394",
"0.57642394",
"0.57642394",
"0.5751994",
"0.5748518",
"0.5745956",
"0.5743949",
"0.5739629",
"0.5739629",
"0.5739629",
"0.5739629",
"0.5736921",
"0.5736921",
"0.5736921",
"0.5736921",
"0.5735416",
"0.5733161",
"0.57306653",
"0.57300395",
"0.57300395",
"0.5728132",
"0.57249385",
"0.5722873",
"0.57196313",
"0.571854",
"0.571819",
"0.57140154",
"0.5711589",
"0.57078975",
"0.57078975",
"0.57078975"
] | 0.7191872 | 0 |
Queries the factory to determine if it provides a user interface panel to allow a user to change settings that are used by all instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides a global settings panel to import and create hash databases. The hash databases are then enabled or disabled per ingest job using an ingest job settings panel. If the module family does not have global settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean hasGlobalSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasIngestJobSettingsPanel();",
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"boolean isDataSourceIngestModuleFactory();",
"@Test\n public void showPanelWhenUserEnablesPanel() throws Throwable {\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, false);\n edit.apply();\n pressBack();\n\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, true);\n edit.apply();\n pressBack();\n\n waitForPanelState(BottomSheetBehavior.STATE_COLLAPSED);\n }",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"boolean hasSettings();",
"boolean hasSettings();",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}",
"@DataProvider(name = \"userMode\")\n private static Object[][] userModeProvider() {\n return new Object[][]{{TestUserMode.SUPER_TENANT_ADMIN, DASHBOARD_TITLE}};\n }",
"public boolean hasPanelVersion() {\n return fieldSetFlags()[1];\n }",
"boolean isSetPluginstate();",
"IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);",
"public JPanel getSettingsPanel() {\n\t\t//edgeAttributeHandler.updateAttributeList();\n\t\t// Everytime we ask for the panel, we want to update our attributes\n\t\tTunable attributeTunable = clusterProperties.get(\"attributeList\");\n\t\tattributeArray = getAllAttributes();\n\t\tattributeTunable.setLowerBound((Object)attributeArray);\n\n\t\treturn clusterProperties.getTunablePanel();\n\t}",
"public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}",
"@Test\n public void disableShowingPanelInPreferences() throws Throwable {\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n\n SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, false);\n edit.apply();\n pressBack();\n\n waitForPanelState(BottomSheetBehavior.STATE_HIDDEN);\n }",
"public interface SettingsProvider {\n /**\n * Enable the background data option to fetch daily deviations periodically.\n */\n void enableBackgroundData();\n\n /**\n * Disable the background data option to fetch daily deviations periodically.\n */\n void disableBackgroundDate();\n\n /**\n * Determine whether background data is enabled.\n * @return true if background data is enabled.\n */\n boolean isBackgroundDataEnabled();\n\n /**\n * Enable the local notification system used to notify users when there is new data.\n */\n void enableNotifications();\n\n /**\n * Disable the local notification system used to notify users when there is new data.\n */\n void disableNotifications();\n\n /**\n * Determine whether local notifications are enabled.\n * @return true if local notifications are enabled - note this will be overridden by\n * the Android system settings regarding notifications for the app.\n */\n boolean isNotificationsEnabled();\n\n /**\n * Enable the automatic header image selection when the app starts up - where an\n * image is chosen at random from the content provider and displayed in the nav menu.\n */\n void enableAutomaticHeaderImage();\n\n /**\n * Disable the automatic header image selection on app start.\n */\n void disableAutomaticHeaderImage();\n\n /**\n * Determine whether the automatic header image is enabled.\n * @return true if automatic header images is enabled.\n */\n boolean isAutomaticHeaderImageEnabled();\n}",
"public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}",
"private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }",
"@SuppressWarnings(\"unchecked\")\n private void initializeGeneralSettingsPanel() {\n generalSettingsPanel = new JPanel(new GridBagLayout());\n\n GridBagConstraints c = new GridBagConstraints();\n c.anchor = GridBagConstraints.NORTHWEST;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.insets = new Insets(5, 5, 5, 5);\n\n int row = 0;\n\n // input column >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(new JLabel(\"Column to PIA XML file (on port 0)\"), c);\n\n inputColumnBox = new ColumnSelectionComboxBox((Border)null, DataValue.class);\n try {\n inputColumnBox.setColumnFilter(new ColumnFilter() {\n @Override\n public boolean includeColumn(DataColumnSpec colSpec) {\n return colSpec.getType().isCompatible(StringValue.class)\n || colSpec.getType().isCompatible(BinaryObjectDataValue.class);\n }\n\n @Override\n public String allFilteredMsg() {\n return \"No column with needed data found, needs String or BinaryObjectData\";\n }\n });\n } catch (NotConfigurableException e) {\n LOGGER.warn(\"Could not find a compatible column in the input datatable.\");\n }\n\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 1;\n c.weightx = 1.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(inputColumnBox, c);\n // input column <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // fail on no decoys >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkErrorOnNoDecoys = new JCheckBox(\"Fail on no decoys (select, if a decoy database was used for identification)\");\n checkErrorOnNoDecoys.setSelected(PIASettings.ERROR_ON_NO_DECOYS.getDefaultBoolean());\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n generalSettingsPanel.add(checkErrorOnNoDecoys, c);\n // fail on no decoys <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // create PSM sets >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkCreatePSMSets = new JCheckBox(\"Create PSM sets (select, if multiple search engines were used for identification)\");\n checkCreatePSMSets.setSelected(PIASettings.CREATE_PSMSETS.getDefaultBoolean());\n checkCreatePSMSets.addChangeListener(this);\n\n c.gridy = row++;\n generalSettingsPanel.add(checkCreatePSMSets, c);\n // create PSM sets <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // consider modifications >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkConsiderModifications = new JCheckBox(\"consider modifications to distinguish peptides\");\n checkConsiderModifications.setSelected(PIASettings.CONSIDER_MODIFICATIONS.getDefaultBoolean());\n\n c.gridy = row++;\n generalSettingsPanel.add(checkConsiderModifications, c);\n // consider modifications <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // Export settings >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n JPanel exportSettingsPanel = new JPanel(new GridBagLayout());\n exportSettingsPanel.setBorder(BorderFactory.createTitledBorder(\"Export settings\"));\n\n c.gridx = 0;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export level\"), c);\n\n comboExportLevel = new JComboBox<>();\n\n for (ExportLevels lvl : ExportLevels.values()) {\n comboExportLevel.addItem(lvl);\n }\n comboExportLevel.addActionListener(this);\n c.gridx = 1;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportLevel, c);\n\n\n c.gridx = 0;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export format\"), c);\n\n comboExportFormat = new JComboBox<>();\n updateExportAvailables();\n comboExportFormat.addActionListener(this);\n comboExportLevel.setSelectedItem(PIASettings.EXPORT_LEVEL.getDefaultString());\n c.gridx = 1;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportFormat, c);\n\n checkExportFilter = new JCheckBox(\"Filter Export (works only on some formats and levels)\");\n checkExportFilter.setSelected(PIASettings.EXPORT_FILTER.getDefaultBoolean());\n checkExportFilter.addChangeListener(this);\n c.gridx = 0;\n c.gridy = 3;\n c.gridwidth = 2;\n c.weightx = 1.0;\n exportSettingsPanel.add(checkExportFilter, c);\n\n\n c.gridx = 0;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Filename for export:\"), c);\n\n fieldExportFileBasename = new JTextField(PIASettings.EXPORT_FILEBASENAME.getDefaultString(), 10);\n c.gridx = 1;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(fieldExportFileBasename, c);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n c.weightx = 1.0;\n generalSettingsPanel.add(exportSettingsPanel, c);\n // Export settings <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n }",
"boolean hasHasNodeSettings();",
"boolean isFileIngestModuleFactory();",
"public void testConfigurePanel2() {\n instance.configurePanel(new PackageImpl());\n\n assertEquals(\"Failed to configure the panel.\", 4, ((JPanel) instance.getComponent(0)).getComponentCount());\n assertEquals(\"Failed to configure the panel.\", 1, ((JPanel) instance.getComponent(1)).getComponentCount());\n }",
"@Override\n public boolean showPanel(Issue issue, ApplicationUser remoteUser) {\n\n if (issue.isSubTask()){\n return false;\n }else{\n return true;\n }\n\n }",
"boolean hasRegistry();",
"public interface ISettingsPresenter {\n void onViewReady();\n\n void changeNotificationsState(boolean state);\n\n void changeActivityLogState(boolean state);\n\n void cleanActivityLogs();\n\n void changeContinuousLogin(boolean isEnabled);\n\n void changeWifiAutoLogin(boolean isEnabled);\n\n void changeIPAddress(String ipAddress);\n\n void changePort(String port);\n}",
"public void enablePanel(boolean b);",
"TvShowScraperNfoSettingsPanel() {\n checkBoxListener = e -> checkChanges();\n comboBoxListener = e -> checkChanges();\n\n // UI init\n initComponents();\n initDataBindings();\n\n // data init\n\n // implement checkBoxListener for preset events\n settings.addPropertyChangeListener(evt -> {\n if (\"preset\".equals(evt.getPropertyName())) {\n buildComboBoxes();\n }\n });\n\n buildCheckBoxes();\n buildComboBoxes();\n }",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"private void setModuleInterface() {\n listModuleInterface = new ArrayList<List<UserInterface>>();\n for (int i = 0; i < modules.size(); i++) {\n List<UserInterface> list = new ArrayList<UserInterface>();\n if (modules.get(i).getUserInterfacesId() != null) {\n for (int j = 0; j < modules.get(i).getUserInterfacesId().size(); j++) {\n UserInterface uim = userInterfaceDAO.getById(modules.get(i).getUserInterfacesId().get(j));\n if (uim != null) {\n list.add(uim);\n }\n }\n }\n listModuleInterface.add(list);\n }\n }",
"UserInterface modify(UserInterface userInterface, UserPreferences prefs);",
"public void setPanelConfiguration(){\n\t\tthis.panelConfiguration.setStructurePanel();\n\t\tthis.panelConfiguration.setPanelConfiguration();\n\t}",
"public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }",
"boolean hasConfiguration();",
"boolean getValidSettings();",
"public boolean areComponentsEnabled() {\n return itiefe.isEnabled();\n }",
"public Component getConfigFormPanel()\n {\n if (configFormPanel == null)\n {\n Object form = configForm.getForm();\n if ((form instanceof Component) == false)\n {\n throw new ClassCastException(\"ConfigurationFrame :\"\n + form.getClass()\n + \" is not a class supported by this ui implementation\");\n }\n configFormPanel = (Component) form;\n }\n return configFormPanel;\n }",
"public interface ITabPanel \n{\n /** Update is required because the board or data has changed. */\n public final static int REQUIRED_UPDATE = 1;\n \n /** Update is suggested by the refresh. */\n public final static int REFRESH_UPDATE = 2;\n \n /**\n * Used to initialize the ITabPanel and give it a refrence to the main panel. \n * @param mainPanel The MainPanel.\n */\n public void init(MainPanel mainPanel);\n \n /**\n * Method that can be called by the main panel to update this panel.\n * @param updateType The type of update.\n */\n public void update(int updateType);\n \n /**\n * Method that can be called to disable or enable the board.\n * @param b Boolean value used to determine to enable (true) or\n * disable (false).\n */\n public void enablePanel(boolean b);\n}",
"public void testRefreshPanel() {\n Package packageObject = new PackageImpl();\n instance.configurePanel(packageObject);\n\n assertEquals(\"Failed to configure the left panel.\", 4, ((JPanel) instance.getComponent(0)).getComponentCount());\n assertEquals(\"Failed to configure the right panel.\", 1,\n ((JPanel) instance.getComponent(1)).getComponentCount());\n }",
"private void loadModules() {\n\n ModuleTiers moduleTiers = new ModuleTiers();\n moduleTiers.setSource(.5);\n moduleTiers.setNumTiers(5);\n String tiersKey = \"module tiers\";\n addDemoPanelWithModule(moduleTiers, tiersKey, null);\n demoPanels.get(tiersKey).removeGUI();\n\n ModuleCellular moduleCellular = new ModuleCellular();\n moduleCellular.setCoefficients(9, .5, 3, 7);\n String cellularKey = \"module cellular\";\n addDemoPanelWithModule(moduleCellular, cellularKey, null);\n demoPanels.get(cellularKey).removeGUI();\n\n /*\n * ground_gradient\n */\n // ground_gradient\n ModuleGradient groundGradient = new ModuleGradient();\n groundGradient.setGradient(0, 0, 0, 1, 0, 0);\n String gradientKey = \"Ground Gradient\";\n addDemoPanelWithModule(groundGradient, gradientKey, null);\n demoPanels.get(gradientKey).removeGUI();\n\n String mountainsKey = \"mountains before gradient\";\n TerrainNoiseSettings mountainSettings = getDemoPanelSettings(mountainsKey);\n if (mountainSettings == null) {\n mountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n Module mountainTerrainNoGradient = mountainSettings.makeTerrainModule(null);\n addDemoPanelWithModule(mountainTerrainNoGradient, mountainsKey, mountainSettings);\n\n String mountainsWithGradientKey = \"translate gradient domain with mountains\";\n TerrainNoiseSettings gradMountainSettings = getDemoPanelSettings(mountainsWithGradientKey);\n if (gradMountainSettings == null) {\n gradMountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n ModuleTranslateDomain mountainTerrain = new ModuleTranslateDomain();\n mountainTerrain.setAxisYSource(mountainTerrainNoGradient);\n mountainTerrain.setSource(groundGradient);\n\n addDemoPanelWithModule(mountainTerrain, mountainsWithGradientKey, gradMountainSettings);\n demoPanels.get(mountainsWithGradientKey).removeGUI();\n\n /*\n String highlandKey = \"highlands\";\n TerrainNoiseSettings highlandSettings = getDemoPanelSettings(highlandKey);\n if (highlandSettings == null) {\n highlandSettings = TerrainNoiseSettings.HighLandTerrainNoiseSettings(seed);\n }\n Module highlandTerrain = TerrainDataProvider.MakeTerrainNoise(groundGradient, highlandSettings );\n addDemoPanelWithModule(highlandTerrain, highlandKey, highlandSettings);\n */\n /*\n * select air or solid with mountains\n */\n String terrainSelectKey = \"terrain Select\";\n TerrainNoiseSettings terrSelectSettings = getDemoPanelSettings(terrainSelectKey);\n if (terrSelectSettings == null) {\n terrSelectSettings = TerrainNoiseSettings.TerrainSettingsWithZeroOneModuleSelect(seed, mountainTerrain);\n } else {\n terrSelectSettings.moduleSelectSettings.controlSource = mountainTerrain;\n }\n Module terrSelectModule = terrSelectSettings.moduleSelectSettings.makeSelectModule();\n addDemoPanelWithModule(terrSelectModule, terrainSelectKey, terrSelectSettings);\n\n /*\n * noise to determine which kind of solid block\n */\n String typeSelectSettingKey = \"terrain type select\";\n TerrainNoiseSettings typeSelectSettings = getDemoPanelSettings(typeSelectSettingKey);\n if (typeSelectSettings == null) {\n typeSelectSettings = TerrainNoiseSettings.TerrainTypeSelectModuleNoiseSettings(seed, false);\n }\n Module selectTypeTerr = typeSelectSettings.makeTerrainModule(null);\n //addDemoPanelWithModule(selectTypeTerr, typeSelectSettingKey, typeSelectSettings);\n\n String dirtOrStoneSelectSettingsKey = \"dirt or stone\";\n TerrainNoiseSettings dirtOrStoneSelectSettings = getDemoPanelSettings(dirtOrStoneSelectSettingsKey);\n if (dirtOrStoneSelectSettings == null) {\n dirtOrStoneSelectSettings = TerrainNoiseSettings.BlockTypeSelectModuleSettings(seed, selectTypeTerr, BlockType.DIRT, BlockType.STONE);\n } else {\n dirtOrStoneSelectSettings.moduleSelectSettings.controlSource = selectTypeTerr;\n }\n Module dirtOrStoneModule = dirtOrStoneSelectSettings.moduleSelectSettings.makeSelectModule();\n //addDemoPanelWithModule(dirtOrStoneModule, dirtOrStoneSelectSettingsKey, dirtOrStoneSelectSettings);\n\n /*\n * combine terrain select and block type select\n */\n String combineTerrainAndBlockTypeKey = \"Terrain And BlockType\";\n ModuleCombiner terrAndBlockTypeMod = new ModuleCombiner(ModuleCombiner.CombinerType.MULT);\n terrAndBlockTypeMod.setSource(0, terrSelectModule);\n terrAndBlockTypeMod.setSource(1, dirtOrStoneModule);\n TerrainNoiseSettings combineSettings = new TerrainNoiseSettings(seed); //defaults\n combineSettings.renderWithBlockColors = true;\n //addDemoPanelWithModule(terrAndBlockTypeMod, combineTerrainAndBlockTypeKey, combineSettings);\n //demoPanels.get(combineTerrainAndBlockTypeKey).removeGUI();\n\n\n\n }",
"protected void setupPerspectiveSettings() {\n if (m_settings.getSettings(m_ownerApp.getApplicationID()) != null\n && m_settings.getSettings(m_ownerApp.getApplicationID()).size() > 1) {\n Map<Settings.SettingKey, Object> appSettings =\n m_settings.getSettings(m_ownerApp.getApplicationID());\n SingleSettingsEditor appEditor = new SingleSettingsEditor(appSettings);\n m_settingsTabs.addTab(\"General\", appEditor);\n m_perspectiveEditors.add(appEditor);\n }\n\n // main perspective\n Perspective mainPers = m_ownerApp.getMainPerspective();\n String mainTitle = mainPers.getPerspectiveTitle();\n String mainID = mainPers.getPerspectiveID();\n SingleSettingsEditor mainEditor =\n new SingleSettingsEditor(m_settings.getSettings(mainID));\n m_settingsTabs.addTab(mainTitle, mainEditor);\n m_perspectiveEditors.add(mainEditor);\n\n List<Perspective> availablePerspectives =\n m_ownerApp.getPerspectiveManager().getLoadedPerspectives();\n List<String> availablePerspectivesIDs = new ArrayList<String>();\n List<String> availablePerspectiveTitles = new ArrayList<String>();\n for (int i = 0; i < availablePerspectives.size(); i++) {\n Perspective p = availablePerspectives.get(i);\n availablePerspectivesIDs.add(p.getPerspectiveID());\n availablePerspectiveTitles.add(p.getPerspectiveTitle());\n }\n\n Set<String> settingsIDs = m_settings.getSettingsIDs();\n for (String settingID : settingsIDs) {\n if (availablePerspectivesIDs.contains(settingID)) {\n int indexOfP = availablePerspectivesIDs.indexOf(settingID);\n\n // make a tab for this one\n Map<Settings.SettingKey, Object> settingsForID =\n m_settings.getSettings(settingID);\n if (settingsForID != null && settingsForID.size() > 0) {\n SingleSettingsEditor perpEditor =\n new SingleSettingsEditor(settingsForID);\n m_settingsTabs.addTab(availablePerspectiveTitles.get(indexOfP),\n perpEditor);\n m_perspectiveEditors.add(perpEditor);\n }\n }\n }\n }",
"void updateFiducialessDisplay() {\n if (dialog == null) {\n return;\n }\n EtomoBoolean2 sampleFiducialess = state.getSampleFiducialess(axisID);\n boolean enable = false;\n if (sampleFiducialess == null || sampleFiducialess.is() == dialog.isFiducialess()) {\n enable = true;\n }\n dialog.setTomopitchEnabled(enable);\n dialog.setAngleOffsetEnabled(enable);\n dialog.setTiltAxisZShiftEnabled(enable);\n dialog.setAlignButtonEnabled(enable);\n dialog.setTiltAngleOffsetEnabled(enable);\n dialog.setZShiftEnabled(enable);\n dialog.setXAxisTiltEnabled(enable);\n dialog.setThicknessEnabled(enable);\n }",
"public boolean isAdmin();",
"public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}",
"public boolean hasRegistry() {\n return registryBuilder_ != null || registry_ != null;\n }",
"public boolean openSettings(){\n return true;\n }",
"boolean hasArtilleryFactorySelected();",
"public Form getUserSettingsForm() throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.DataFolder userInfos = processModel\r\n .getUserInfos();\r\n if (userInfos == null)\r\n return null;\r\n \r\n return new XmlForm(userInfos.toRecordTemplate(currentRole, getLanguage(),\r\n false));\r\n } catch (FormException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", we);\r\n } catch (WorkflowException fe) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", fe);\r\n }\r\n }",
"@Override\n public boolean isConfigured()\n {\n return (config != null) && config.isValid() &&!config.isDisabled();\n }",
"@java.lang.Override\n public boolean hasDeviceSettings() {\n return deviceSettings_ != null;\n }",
"@Override\n\tpublic void onModuleLoad() {\n\t\tfinal ModuleList modList = new ModuleList();\n\t\tfinal TabLayoutPanel configTabs = new TabLayoutPanel(2, Unit.EM);\n\n\t\t// Creates the module map.\n\t\t//final ModuleMap modMap = new ModuleMap(modList);\n\n\t\t// Creates the weather feed.\n\t\tfinal Weather weather = new Weather();\n\n\t\t// Creates configuration map.\n\t\tfinal ModuleConfiguration fullConfig = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration fullConfig2 = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration min1Config = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration min2Config = new ModuleConfiguration();\n\t\tmin1Config.setMinimumConfigOne(modList);\n\t\tmin2Config.setMinimumConfigTwo(modList);\n\n\t\t// GPS Data object.\n\t\t//final GPSDataTransfer dataTransfer = new GPSDataTransfer(modList);\n\n\t\t// Creates the root panel and sizes it.\n\t\tRootPanel.get().setSize(this.width, this.height);\n\n\t\t// Command to show login.\n\t\tCommand loginCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal Login login = new Login();\n\t\t\t\tlogin.show();\n\t\t\t}\n\t\t};\n\n\n\t\t// Command to show the add module popup.\n\t\tCommand addModulePopupCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal AddModulePopup popup = new AddModulePopup(modList, BUS);\n\t\t\t\tpopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tpopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\t//Command to show the GPS Data Transfer popup.\n\t\tCommand gpsDataPopupCmd = new Command() {\n\t\t\tpublic void execute(){\n\t\t\t\tfinal GPSDataPopup gpsPopup = new GPSDataPopup(modList, BUS);\n\t\t\t\t\tgpsPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tgpsPopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command to calculate full configurations and add to new tabs.\n\t\tCommand configurationCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tCoordinates center = fullConfig.findBestCenterOfGravity(modList, ModuleConfiguration.FOUR);\n\t\t\t\tCoordinates center2 = fullConfig2.findBestCenterOfGravity(modList, ModuleConfiguration.THREE);\n\t\t\t\t\n\t\t\t\tif (fullConfig.calculateConfiguration(modList, center.getX(), center.getY(), ModuleConfiguration.FOUR)) {\n\t\t\t\t\tfullConfig2.calculateConfiguration(modList, center2.getX(), center2.getY(), ModuleConfiguration.THREE);\n\t\t\t\t\tMarsHabitatConfigurationSystem.successSound.play();\t\n\t\t\t\t\t\n\t\t\t\t\tconfigTabs.clear();\n\t\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig2), FULL_CONFIG2);\n\t\t\t\t\tconfigTabs.selectTab(FULL_INDEX);\n\t\t\t\t\t\n\t\t\t\t\tWindow.alert(\"Full Configuration Available!\");\n\t\t\t\t} else {\n\t\t\t\t\tMarsHabitatConfigurationSystem.errorSound.play();\n\t\t\t\t\tWindow.alert(\"Full Configuration not Available!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command for clearing the module list and configurations\n\t\tCommand clearCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tmodList.clearList();\n\t\t\t\tfullConfig.clearConfig();\n\t\t\t\t\n\t\t\t\tconfigTabs.clear();\n\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\tconfigTabs.selectTab(0);\n\t\t\t\tMINIMUM_CONFIG_REACHED = false;\n\t\t\t}\n\t\t};\n\n\t\t// Command for saving the full configuration.\n\t\tCommand saveConfigCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (configTabs.getSelectedIndex() == FULL_INDEX) {\n\t\t\t\t\tif (fullConfig.saveConfiguration(FULL_CONFIG)) {\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Full Configuration Saved!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorSound.play();\n\t\t\t\t\t\tWindow.alert(\"No Full Configuration Exists!\");\n\t\t\t\t\t}\n\t\t\t\t} else if (configTabs.getSelectedIndex() == FULL_INDEX + 1) {\n\t\t\t\t\tif (fullConfig2.saveConfiguration(FULL_CONFIG)) {\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Full Configuration Saved!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorSound.play();\n\t\t\t\t\t\tWindow.alert(\"No Full Configuration Exists!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Command for loading the full configuration.\n\t\tCommand loadConfigCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (fullConfig.loadConfiguration(FULL_CONFIG)) {\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\tWindow.alert(\"Full Configuration loaded!\");\n\t\t\t\t} else {\n\t\t\t\t\terrorSound.play();\n\t\t\t\t\tWindow.alert(\"No full configuration found in storage!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Command for GPS data transfer.\n//\t\tCommand gpsDataCmd = new Command() {\n//\t\t\tpublic void execute() {\n//\t\t\t\tdataTransfer.getData();\n//\t\t\t\tBUS.fireEvent(new AddEvent());\n//\t\t\t}\n//\t\t};\n\t\t\n\t\t// Command for changing the center of gravity.\n\t\tCommand gravityCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tgravityPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tgravityPopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command for getting the size of moving task.\n\t\tCommand movingTaskCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal MovingTaskPopup popup = new MovingTaskPopup(\n\t\t\t\t\t\tmodList.getSizeOfMovingTask(fullConfig.getCenterColumn(), fullConfig.getCenterRow()));\n\t\t\t\tpopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tpopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\t// Creates the menu for the menu bar.\n\t\tMenuBar theMenu = new MenuBar(true);\n\t\ttheMenu.setAnimationEnabled(true);\n\t\ttheMenu.addItem(\"Add Module\", addModulePopupCmd);\n\t\ttheMenu.addItem(\"GPS Data Transfer\", gpsDataPopupCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Calculate Full Configuration\", configurationCmd);\n\t\ttheMenu.addItem(\"Change Center of Gravity\", gravityCmd);\n\t\ttheMenu.addItem(\"Save Full Configuration\", saveConfigCmd);\n\t\ttheMenu.addItem(\"Load Full Configuration\", loadConfigCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Size of Moving Task\", movingTaskCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Clear Modules and Configuration\", clearCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Log off\", loginCmd);\n\n\t\t// Creates the menu bar and adds the menu to itself.\n\t\tMenuBar menu = new MenuBar();\n\t\tmenu.setAnimationEnabled(true);\n\t\tmenu.addItem(\"Menu\", theMenu);\n\t\tmenu.setWidth(this.width);\n\n\t\t// Creates the tabs for the various configurations and module map.\n\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\tconfigTabs.setHeight(this.height);\n\t\tconfigTabs.setWidth(this.width);\n\n\t\t// Adds everything to the root panel.\n\t\tRootPanel.get().add(menu);\n\t\tRootPanel.get().add(weather);\n\t\tRootPanel.get().add(configTabs);\n\n\t\t// Show login after module has loaded.\n\t\tfinal Login initialLogin = new Login();\n\t\tinitialLogin.show();\n\n\t\t// Start timer to show initial 10 day alert.\n\t\tTimer t = new Timer() {\n\t\t\tpublic void run() {\n\t\t\t\tfinal TenDayAlert initialTenDayAlert = new TenDayAlert();\n\t\t\t\tinitialTenDayAlert.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tinitialTenDayAlert.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\tt.schedule(ALERT_TIME);\n\n\t\t// Set handler for EventBus when new modules are added.\n\t\tBUS.addHandler(AddEvent.TYPE, new AddEventHandler() {\n\t\t\tpublic void onEvent(final AddEvent event) {\n\n\t\t\t\t// \"Refreshes\" the module map by removing and re-adding the tab\n\t\t\t\tconfigTabs.clear();\n\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\tMINIMUM_CONFIG_REACHED = false;\n\t\t\t\t\n\t\t\t\t// Checks to see if requirements are met for the minimum configuration.\n\t\t\t\t// If they are met, the minimum configuration tabs are created and an alert is issued.\n\t\t\t\tif (!MINIMUM_CONFIG_REACHED) {\n\t\t\t\t\tif (modList.getNumOfAirlock() > 0 && modList.getNumOfCanteen() > 0 && modList.getNumOfControl() > 0 &&\n\t\t\t\t\t\t\tmodList.getNumOfDormitory() > 0 && modList.getNumOfPlain() > 2 && modList.getNumOfPower() > 0 &&\n\t\t\t\t\t\t\tmodList.getNumOfSanitation() > 0 && modList.getNumOfWater() > 0) {\n\t\t\t\t\t\tMINIMUM_CONFIG_REACHED = true;\n\n\t\t\t\t\t\tmin1Config.setMinimumConfigOne(modList);\n\t\t\t\t\t\tmin2Config.setMinimumConfigTwo(modList);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds minimum configuration one to the tab.\n\t\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\t\tconfigTabs.selectTab(MIN1_INDEX);\n\n\t\t\t\t\t\t// Adds minimum configuration two to the tab.\n\t\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Minimum Configurations Available!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Set handler for when the center of gravity is changed.\n\t\tBUS.addHandler(GravityEvent.TYPE, new GravityEventHandler() {\n\t\t\tpublic void onEvent(final GravityEvent event) {\n\t\t\t\tModuleConfiguration newFullConfig = new ModuleConfiguration();\n\t\t\t\tint wings;\n\t\t\t\t\n\t\t\t\tif (configTabs.getSelectedIndex() == FULL_INDEX) {\n\t\t\t\t\twings = ModuleConfiguration.FOUR;\n\t\t\t\t} else {\n\t\t\t\t\twings = ModuleConfiguration.THREE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If the center of gravity can be changed to specified coordinates.\n\t\t\t\tif (newFullConfig.calculateConfiguration(modList, event.xcoord, event.ycoord, wings)) {\n\t\t\t\t\tMarsHabitatConfigurationSystem.successSound.play();\t\n\t\t\t\t\tgravityPopup.hide();\n\t\t\t\t\t\n\t\t\t\t\tif (wings == ModuleConfiguration.FOUR) {\n\t\t\t\t\t\tfullConfig.calculateConfiguration(modList, event.xcoord, event.ycoord, wings);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfullConfig2.calculateConfiguration(modList, event.xcoord, event.ycoord, wings);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconfigTabs.clear();\n\t\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig2), FULL_CONFIG2);\n\t\t\t\t\tconfigTabs.selectTab(FULL_INDEX);\n\t\t\t\t\t\n\t\t\t\t\tWindow.alert(\"Center of Gravity Changed!\");\n\t\t\t\t} else {\n\t\t\t\t\tMarsHabitatConfigurationSystem.errorSound.play();\n\t\t\t\t\tWindow.alert(\"Configuration can not move to that location!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Checks for minimum configs on load.\n\t\tif (modList.getNumOfAirlock() > 0 && modList.getNumOfCanteen() > 0 && modList.getNumOfControl() > 0 &&\n\t\t\t\tmodList.getNumOfDormitory() > 0 && modList.getNumOfPlain() > 2 && modList.getNumOfPower() > 0 &&\n\t\t\t\tmodList.getNumOfSanitation() > 0 && modList.getNumOfWater() > 0) {\n\t\t\tMINIMUM_CONFIG_REACHED = true;\n\n\t\t\t// Adds minimum configuration one to the tab.\n\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\n\t\t\t// Adds minimum configuration two to the tab.\n\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t}\n\n\t\tRootPanel.get().addStyleName(\"rootPanel\");\n\t}",
"public abstract boolean isEnabled();",
"public abstract boolean isEnabled();",
"private void setConfigElements() {\r\n getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), USE_API, JDL.L(\"plugins.hoster.CatShareNet.useAPI\", getPhrase(\"USE_API\"))).setDefaultValue(defaultUSE_API).setEnabled(false));\r\n }",
"boolean hasInputConfig();",
"boolean hasInputConfig();",
"boolean hasInputConfig();",
"boolean hasGridLayout();",
"public void displayConfigurationPanel(){\n\t\tthis.panelConfiguration = new PanelConfiguration(this.mainFrame);\n\t\tthis.add(this.panelConfiguration,BorderLayout.CENTER);\n\t}",
"boolean condition(UserInterface userInterface, UserPreferences prefs);",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"boolean hasUpdateUfsMode();",
"private static boolean isInspectionColorsPage(ColorAndFontDescriptorsProvider provider) {\n if (!(provider instanceof InspectionColorSettingsPage)) return false;\n for(ColorSettingsPage settingsPage: ColorSettingsPage.EP_NAME.getExtensionList()) {\n if (settingsPage == provider) break;\n if (settingsPage instanceof InspectionColorSettingsPage) return false;\n }\n return true;\n }",
"public static boolean isEnabled()\n\t{\n\t\treturn AngularPageConfigurator.enabled;\n\t}",
"boolean isAdmin();",
"public Boolean isModoAdmin() {\r\n\t\treturn this.modoAdmin;\r\n\t}",
"public interface Settings {\n boolean dynamicMetricsEnabled();\n}",
"public boolean isEnabledByEmulator() {\n return mEnabledByEmulator;\n }",
"private GuiAdvancedPanel getAdvancedPanel() {\n if (advancedPanel == null) {\n advancedPanel = new GuiAdvancedPanel(this,\n config.ontsToDownload.getValue(),\n config.omitOntsToDownload.getValue(),\n config.buildDir.getValue());\n }\n return advancedPanel;\n }",
"@Override\n public boolean isConfigured() {\n return delegate.isConfigured();\n }",
"public abstract boolean isNetbeansKenaiRegistered();",
"public boolean isBrowseShown()\r\n\t{\r\n\t\treturn ((this.pageBackingBean.getCurrentUser() != null) || (this.settingEjb\r\n\t\t .getBooleanSettingByName(Constants.SETTING_SEARCH_ALLOW_NON_USERS)))\r\n\t\t && !(this.settingEjb.getBooleanSettingByName(Constants.SETTING_SEARCH_INDEXING_COMMENCED));\r\n\t}",
"boolean hasAdGroupExtensionSetting();",
"public interface ISettingsView {\r\n void initViews();\r\n}",
"public Map<String, Object> getSettings() {\n HashMap<String, Object> settings = new HashMap<>();\n\n // the selected input column\n settings.put(PIASettings.CONFIG_INPUT_COLUMN.getKey(), inputColumnBox.getSelectedColumn());\n // error when no decoys are found\n settings.put(PIASettings.ERROR_ON_NO_DECOYS.getKey(), checkErrorOnNoDecoys.isSelected());\n // create PSM sets\n settings.put(PIASettings.CREATE_PSMSETS.getKey(), checkCreatePSMSets.isSelected());\n // consider modifications\n settings.put(PIASettings.CONSIDER_MODIFICATIONS.getKey(), checkConsiderModifications.isSelected());\n // export level and format\n settings.put(PIASettings.EXPORT_FILTER.getKey(), checkExportFilter.isSelected() && checkExportFilter.isEnabled());\n settings.put(PIASettings.EXPORT_LEVEL.getKey(), comboExportLevel.getSelectedItem().toString());\n settings.put(PIASettings.EXPORT_FORMAT.getKey(), comboExportFormat.getSelectedItem() != null ?\n comboExportFormat.getSelectedItem().toString() : null);\n settings.put(PIASettings.EXPORT_FILEBASENAME.getKey(), fieldExportFileBasename.getText().trim());\n\n // PSM file ID\n settings.put(PIASettings.PSM_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPSMAnalysisFileID.getText()));\n\n // calculate FDR scores for all files\n settings.put(PIASettings.CALCULATE_ALL_FDR.getKey(), checkCalculateAllFDR.isSelected());\n // calculate combined FDR score\n settings.put(PIASettings.CALCULATE_COMBINED_FDR_SCORE.getKey(), checkCalculateCombinedFDRScore.isSelected());\n\n // decoy strategy for all files\n settings.put(PIASettings.ALL_DECOY_STRATEGY.getKey(), allDecoyStrategy.getSelection().getActionCommand());\n // decoy pattern for all files\n settings.put(PIASettings.ALL_DECOY_PATTERN.getKey(), fieldAllDecoyPattern.getText());\n\n // used identifications (for FDR) for all files\n settings.put(PIASettings.ALL_USED_IDENTIFICATIONS.getKey(), Integer.parseInt(allUsedTopIdentifications.getSelection().getActionCommand()));\n\n // the preferred scores for FDR calculation\n DefaultListModel<String> scoreListModel = (DefaultListModel<String>)selectedPreferredFDRScoresList.getModel();\n String[] preferredScoreShorts = new String[scoreListModel.getSize()];\n for (int i=0; i < scoreListModel.getSize(); i++) {\n preferredScoreShorts[i] = scoreListModel.get(i);\n }\n settings.put(PIASettings.FDR_PREFERRED_SCORES.getKey(), preferredScoreShorts);\n\n // the PSM level filters\n List<AbstractFilter> filtersList = filtersPSMLevel.getAppliedFilters();\n String[] filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PSM_FILTERS.getKey(), filtersArr);\n\n\n // infere peptides\n settings.put(PIASettings.PEPTIDE_INFER_PEPTIDES.getKey(), checkInferPeptides.isSelected());\n\n // peptide file ID\n settings.put(PIASettings.PEPTIDE_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPeptideAnalysisFileID.getText()));\n\n // the peptide level filters\n filtersList = filtersPeptideLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PEPTIDE_FILTERS.getKey(), filtersArr);\n\n\n // infere proteins\n settings.put(PIASettings.PROTEIN_INFER_PROTEINS.getKey(), checkInferProteins.isSelected());\n\n // protein inference method\n settings.put(PIASettings.PROTEIN_INFERENCE_METHOD.getKey(), radioGrpInferenceMethod.getSelection().getActionCommand());\n\n // the protein inference filters\n filtersList = filtersProteinInference.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_INFERENCE_FILTERS.getKey(), filtersArr);\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_METHOD.getKey(), radioGrpProteinScoring.getSelection().getActionCommand());\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_SCORE.getKey(), comboAvailableBaseScores.getSelectedItem());\n\n // the PSMs used for protein scoring\n settings.put(PIASettings.PROTEIN_SCORING_USED_PSMS.getKey(), radioGrpPSMsForScoring.getSelection().getActionCommand());\n\n // the protein level filters\n filtersList = filtersProteinLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_FILTERS.getKey(), filtersArr);\n\n return settings;\n }",
"boolean hasTheme();",
"public void setPanelAdminConfig(PanelAdminConfig panel) {\n \tadminConfig = panel;\n }",
"boolean hasNewConfig();",
"private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }",
"@Override\n\t\t\tpublic void stateChanged() {\n\t\t\t\tupdateUi();\n\t\t\t\tmakeUserContentPanel(panel);\n\t\t\t}",
"@java.lang.Override\n public boolean hasCohortReportSettings() {\n return cohortReportSettings_ != null;\n }",
"private boolean isDisplay(JPiereIADTabpanel tabPanel)\n {\n String logic = tabPanel.getDisplayLogic();\n if (logic != null && logic.length() > 0)\n {\n boolean display = Evaluator.evaluateLogic(tabPanel, logic);\n if (!display)\n {\n log.info(\"Not displayed - \" + logic);\n return false;\n }\n }\n return true;\n }",
"boolean isSetSystem();",
"public boolean hasRegistry() {\n return registry_ != null;\n }",
"@Test\n public void testIsHideable_2()\n throws Exception {\n ColumnPreferences fixture = new ColumnPreferences(\"\", \"\", 1, ColumnPreferences.Visibility.HIDDEN, ColumnPreferences.Hidability.HIDABLE);\n fixture.setVisible(true);\n\n boolean result = fixture.isHideable();\n\n assertEquals(true, result);\n }",
"public boolean configurationDialog() {\n String configurable = getDbProperties().getProperty(Constants.CONFIGURATION_DIALOG);\n return ACMConfiguration.getInstance().isShowConfiguration() ||\n (configurable != null && configurable.equalsIgnoreCase(\"true\"));\n }",
"@ImplementedBy(ModuleInfoPickerTableView.class)\n public interface ModuleInfoPickerView\n extends IsWidget\n {\n void setSelectionModel(SelectionModel<? super MavenProjectDTO> selectionModel);\n\n void setData(ModuleDataProvider mdp);\n }",
"@Override\n public void loadPanel () {\n\n // do we need these??\n out_top.load_selected_tab_panel();\n out_bottom.load_selected_tab_panel();\n\n // Q: should do setState on the checkboxes?\n // A: only if flags were changed programatically without doing that,,,,\n\n // old ways....\n //\n // switch (stall_model_type) {\n // case STALL_MODEL_IDEAL_FLOW: \n // bt3.setBackground(Color.yellow);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // break;\n // case STALL_MODEL_DFLT: \n // bt3.setBackground(Color.white);\n // bt4_2.setBackground(Color.white);\n // bt4_1.setBackground(Color.yellow);\n // break;\n // case STALL_MODEL_REFINED: \n // bt3.setBackground(Color.white);\n // bt4_1.setBackground(Color.white);\n // bt4_2.setBackground(Color.yellow);\n // break;\n // }\n // if (ar_lift_corr) {\n // bt6.setBackground(Color.white);\n // bt5.setBackground(Color.yellow);\n // } else {\n // bt5.setBackground(Color.white);\n // bt6.setBackground(Color.yellow);\n // }\n // if (induced_drag_on) {\n // bt8.setBackground(Color.white);\n // bt7.setBackground(Color.yellow);\n // } else {\n // bt7.setBackground(Color.white);\n // bt8.setBackground(Color.yellow);\n // }\n // if (re_corr) {\n // bt10.setBackground(Color.white);\n // bt9.setBackground(Color.yellow);\n // } else {\n // bt9.setBackground(Color.white);\n // bt10.setBackground(Color.yellow);\n // }\n // switch (bdragflag) {\n // case 1: \n // cbt1.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 2:\n // cbt2.setBackground(Color.yellow);\n // cbt1.setBackground(Color.white);\n // cbt3.setBackground(Color.white);\n // break;\n // case 3:\n // cbt3.setBackground(Color.yellow);\n // cbt2.setBackground(Color.white);\n // cbt1.setBackground(Color.white);\n // break;\n // }\n // if (stab_aoa_correction) \n // stab_bt_aoa.setBackground(Color.yellow);\n // else\n // stab_bt_aoa.setBackground(Color.white);\n\n // do nto do this, ause stack overflow\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n }",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();"
] | [
"0.63689744",
"0.63166916",
"0.6135008",
"0.5756165",
"0.572142",
"0.5569447",
"0.5528568",
"0.5528568",
"0.548999",
"0.53551954",
"0.52402353",
"0.52253157",
"0.5213055",
"0.52127606",
"0.5194015",
"0.51439106",
"0.5136157",
"0.51306576",
"0.5051432",
"0.5050623",
"0.50284636",
"0.5025467",
"0.5022803",
"0.50109345",
"0.5006149",
"0.49534202",
"0.49203",
"0.49198458",
"0.49100056",
"0.49032435",
"0.4880343",
"0.48784274",
"0.48769537",
"0.4868662",
"0.48594972",
"0.48207018",
"0.47918582",
"0.47892883",
"0.4780778",
"0.47774506",
"0.4771077",
"0.47636747",
"0.4730591",
"0.4705438",
"0.46992895",
"0.46985942",
"0.46916452",
"0.46901953",
"0.46755967",
"0.46693602",
"0.46667323",
"0.46646848",
"0.46630853",
"0.46630853",
"0.46565014",
"0.4653383",
"0.4653383",
"0.4653383",
"0.46528408",
"0.46415824",
"0.46404454",
"0.4638507",
"0.4638507",
"0.4638507",
"0.4638507",
"0.4638507",
"0.4638507",
"0.4638507",
"0.46165982",
"0.460867",
"0.46074438",
"0.4604465",
"0.46034235",
"0.46029738",
"0.4598448",
"0.45935854",
"0.45864096",
"0.45840263",
"0.45796046",
"0.45790288",
"0.45784643",
"0.457691",
"0.45617643",
"0.45603466",
"0.4560227",
"0.45574382",
"0.45563287",
"0.45535898",
"0.45522952",
"0.45465153",
"0.4542236",
"0.45409068",
"0.4539277",
"0.45390767",
"0.45389578",
"0.4535172",
"0.4535172",
"0.4535172",
"0.4535172",
"0.4535172"
] | 0.7000252 | 0 |
Gets a user interface panel that allows a user to change settings that are used by all instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides a global settings panel to import and create hash databases. The imported hash databases are then enabled or disabled per ingest job using ingest an ingest job settings panel. If the module family does not have a global settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | IngestModuleGlobalSettingsPanel getGlobalSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"public JPanel getSettingsPanel() {\n\t\t//edgeAttributeHandler.updateAttributeList();\n\t\t// Everytime we ask for the panel, we want to update our attributes\n\t\tTunable attributeTunable = clusterProperties.get(\"attributeList\");\n\t\tattributeArray = getAllAttributes();\n\t\tattributeTunable.setLowerBound((Object)attributeArray);\n\n\t\treturn clusterProperties.getTunablePanel();\n\t}",
"boolean hasGlobalSettingsPanel();",
"public static SettingsPanel getSettingsPanel() {\n\t\treturn ((dataProvider == null) ? null : new AmpSettingsPanel());\n\t}",
"public AppPanel getPanel()\n\t\t{\n\t\t\treturn panel;\n\t\t}",
"public Component getConfigFormPanel()\n {\n if (configFormPanel == null)\n {\n Object form = configForm.getForm();\n if ((form instanceof Component) == false)\n {\n throw new ClassCastException(\"ConfigurationFrame :\"\n + form.getClass()\n + \" is not a class supported by this ui implementation\");\n }\n configFormPanel = (Component) form;\n }\n return configFormPanel;\n }",
"public JPanel getPanel() {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n return jPanel1;\n }",
"private GuiAdvancedPanel getAdvancedPanel() {\n if (advancedPanel == null) {\n advancedPanel = new GuiAdvancedPanel(this,\n config.ontsToDownload.getValue(),\n config.omitOntsToDownload.getValue(),\n config.buildDir.getValue());\n }\n return advancedPanel;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }",
"private Component getPanelAgentes() {\n\t\tFile fich = new File(FICH_CONFAGENTES);\n\t\tPanelConfigAgentes panel = new PanelConfigAgentes(fich, this);\n\t\treturn panel;\n\t}",
"private JPanel getUserManagerButtonPanel() {\n if (userManagerButtonPanel == null) {\n userManagerButtonPanel = new JPanel();\n userManagerButtonPanel.add(getAddButton(), null);\n userManagerButtonPanel.add(getRemoveButton(), null);\n }\n return userManagerButtonPanel;\n }",
"@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel28() {\n return build_f_Panel28();\n }",
"public PanelConfiguration getPanelConfiguration() {\n\t\treturn panelConfiguration;\n\t}",
"public PanelDisplayProject getDisplayProject(){\n return displayProject;\n }",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }",
"private JPanel getJPanelConfig() {\r\n\t\tif (jPanelConfig == null) {\r\n\t\t\tjLabel8 = new JLabel();\r\n\t\t\tjLabel8.setBounds(new Rectangle(195, 50, 55, 23));\r\n\t\t\tjLabel8.setText(\"字符集:\");\r\n\t\t\tjLabel5 = new JLabel();\r\n\t\t\tjLabel5.setText(\"数据库类型:\");\r\n\t\t\tjLabel5.setBounds(new Rectangle(458, 36, 80, 23));\r\n\t\t\tjLabel4 = new JLabel();\r\n\t\t\tjLabel4.setBounds(new Rectangle(10, 82, 52, 23));\r\n\t\t\tjLabel4.setText(\"密码:\");\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setBounds(new Rectangle(10, 50, 59, 23));\r\n\t\t\tjLabel3.setText(\"用户名:\");\r\n\t\t\tjLabel2 = new JLabel();\r\n\t\t\tjLabel2.setBounds(new Rectangle(10, 18, 80, 23));\r\n\t\t\tjLabel2.setText(\"数据库链接:\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new Rectangle(10, 115, 59, 23));\r\n\t\t\tjLabel.setText(\"导入表:\");\r\n\t\t\tjPanelConfig = new JPanel();\r\n\t\t\tjPanelConfig.setLayout(null);\r\n\t\t\tjPanelConfig.setBorder(BorderFactory.createTitledBorder(null, \" 入库配置 \"));\r\n\t\t\tjPanelConfig.setBounds(new Rectangle(7, 253, 652, 260));\r\n\t\t\tjPanelConfig.add(getJScrollPaneDbTable(), null);\r\n\t\t\tjPanelConfig.add(jLabel, null);\r\n\t\t\tjPanelConfig.add(jLabel2, null);\r\n\t\t\tjPanelConfig.add(jLabel3, null);\r\n\t\t\tjPanelConfig.add(jLabel4, null);\r\n\t\t\tjPanelConfig.add(getJTextFieldUser(), null);\r\n\t\t\tjPanelConfig.add(getJTextFieldPasswd(), null);\r\n\t\t\tjPanelConfig.add(getJComboBoxConStr(), null);\r\n\t\t\tjPanelConfig.add(getJButtonConnect(), null);\r\n\t\t\tjPanelConfig.add(getJScrollPaneTables(), null);\r\n\t\t\tjPanelConfig.add(getJButtonDiscnnt(), null);\r\n\t\t\tjPanelConfig.add(jLabel8, null);\r\n\t\t\tjPanelConfig.add(getJTextFieldDbCharset(), null);\r\n\t\t}\r\n\t\treturn jPanelConfig;\r\n\t}",
"public PanelAdminConfig getAdminConfig(){\n return adminConfig;\n }",
"private JPanel getGeneralPanel() {\n\t\tif (generalPanel == null) {\n\t\t\tgeneralPanel = new JPanel();\n\t\t\tgeneralPanel.setBorder(BorderFactory.createEmptyBorder());\n\t\t\tgeneralPanel.setLayout(new BorderLayout());\n\t\t\tgeneralPanel.add(getDynamicTreePanel(), BorderLayout.NORTH);\n\t\t\tgeneralPanel.add(getButtonSplitPane(), BorderLayout.SOUTH);\n\t\t}\n\t\treturn generalPanel;\n\t}",
"private WizardDescriptor.Panel[] getPanels() {\n Project project = Templates.getProject(wizard);\n File f1 = new File(\"src\");\n \n // Templates.setTargetFolder(wizard);\n\n Sources sources = project.getLookup().lookup(Sources.class);\n SourceGroup[] sg = sources.getSourceGroups(Sources.TYPE_GENERIC);\n \n if (panels == null) {\n targetChooserPanel = \n Templates.createSimpleTargetChooser(project, sg);\n panels = new WizardDescriptor.Panel[]{\n targetChooserPanel\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", Integer.valueOf(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"public GamePanel getGamePanel() {\r\n return gamePanel;\r\n }",
"public SelectModulesPane getSelectModulesPane() {\n\t\treturn sm;\n\t}",
"public GamePanel getGamePanel() {\n\t\treturn gamePanel;\n\t}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel48() {\n return build_f_Panel48();\n }",
"protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}",
"public Form getUserSettingsForm() throws ProcessManagerException {\r\n try {\r\n com.silverpeas.workflow.api.model.DataFolder userInfos = processModel\r\n .getUserInfos();\r\n if (userInfos == null)\r\n return null;\r\n \r\n return new XmlForm(userInfos.toRecordTemplate(currentRole, getLanguage(),\r\n false));\r\n } catch (FormException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", we);\r\n } catch (WorkflowException fe) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_USERSETTINGS_FORM\", fe);\r\n }\r\n }",
"boolean hasIngestJobSettingsPanel();",
"public PanelInicioAdmin getInicioAdmin(){\n return inicioAdmin;\n }",
"private void initSettingsPanel() {\n JLabel lblName = new JLabel(\"Name:\");\n lblName.setForeground(StyleCompat.textColor());\n\n JTextField fieldName = new JTextField(20);\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblName, fieldName));\n\n JLabel lblVirtOutput = new JLabel(\"VirtualOutput:\");\n lblVirtOutput.setForeground(StyleCompat.textColor());\n\n JComboBox<String> comboVirtOutputs = new JComboBox<>();\n for(Device device : instance.getInterface().getDeviceManager().getDevices()) {\n if(device instanceof VirtualOutput) {\n if(handler != null && instance.getHandlerByVirtualOutput(device.getId()) == handler) {\n comboVirtOutputs.addItem(device.getId());\n comboVirtOutputs.setSelectedIndex(comboVirtOutputs.getItemCount() - 1);\n } else if(!instance.isVirtualOutputUsed(device.getId())) {\n comboVirtOutputs.addItem(device.getId());\n }\n }\n }\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblVirtOutput, comboVirtOutputs));\n\n JLabel lblDeviceId = new JLabel(\"OpenRGB Device ID (index):\");\n lblDeviceId.setForeground(StyleCompat.textColor());\n\n JFormattedTextField fieldDeviceId = new JFormattedTextField(UserInterfaceUtil.getIntFieldFormatter());\n fieldDeviceId.setColumns(5);\n JButton btnAddDeviceId = new JButton(\"Add device\");\n UiUtilsCompat.configureButton(btnAddDeviceId);\n btnAddDeviceId.addActionListener(e -> {\n if(fieldDeviceId.getValue() == null) return;\n int value = (int) fieldDeviceId.getValue();\n if(value < 0 || listDevices.contains(value)) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Invalid ID or list contains already ID.\"));\n return;\n }\n listDevices.add(value);\n fieldDeviceId.setText(\"\");\n updateDeviceListPanel();\n });\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblDeviceId, fieldDeviceId, btnAddDeviceId));\n\n if(instance.getOpenRGB().isConnected()) {\n // show info label, remove all and add all button\n int deviceCount = instance.getOpenRGB().getControllerCount();\n\n JLabel lblCountInfo = new JLabel(\"There are \" + deviceCount + \" devices available.\");\n lblCountInfo.setForeground(StyleCompat.textColor());\n\n JButton btnAddAll = new JButton(\"Add all\");\n UiUtilsCompat.configureButton(btnAddAll);\n btnAddAll.addActionListener(e -> {\n for(int i = 0; i < deviceCount; i++) {\n if(!listDevices.contains(i))\n listDevices.add(i);\n }\n updateDeviceListPanel();\n });\n\n JButton btnRemoveAll = new JButton(\"Remove all\");\n UiUtilsCompat.configureButton(btnRemoveAll);\n btnRemoveAll.addActionListener(e -> {\n listDevices.clear();\n updateDeviceListPanel();\n });\n\n // add components to panel\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblCountInfo, btnAddAll, btnRemoveAll));\n } else {\n // show hint message\n JLabel lblHint = new JLabel(\"(i) Go back and connect the client to receive live data from the SDK server.\");\n lblHint.setForeground(StyleCompat.textColorDarker());\n panelSettings.add(UserInterfaceUtil.createSettingBgr(lblHint));\n }\n\n panelDeviceList = new JPanel();\n panelDeviceList.setBackground(StyleCompat.panelDarkBackground());\n panelDeviceList.setLayout(new BoxLayout(panelDeviceList, BoxLayout.Y_AXIS));\n panelDeviceList.setAlignmentX(Component.LEFT_ALIGNMENT);\n panelSettings.add(Box.createVerticalStrut(10));\n panelSettings.add(panelDeviceList);\n updateDeviceListPanel();\n\n if(handler != null) {\n // set stored values\n fieldName.setText(handler.getName());\n }\n\n JButton btnAdd = new JButton(handler == null ? \"Add OpenRGB Device\" : \"Save OpenRGB Device\");\n UiUtilsCompat.configureButton(btnAdd);\n btnAdd.setAlignmentX(Component.LEFT_ALIGNMENT);\n btnAdd.setMaximumSize(new Dimension(Integer.MAX_VALUE, 50));\n btnAdd.setMinimumSize(new Dimension(100, 50));\n\n btnAdd.addActionListener(e -> {\n // create value holder\n ValueHolder holder = new ValueHolder(\n fieldName.getText(),\n (String) comboVirtOutputs.getSelectedItem(),\n listDevices);\n\n if(validateInput(holder.getName(), holder.getOutputId())) {\n // get output\n VirtualOutput output = OpenRgbPlugin.getVirtualOutput(instance.getInterface().getDeviceManager(), holder.getOutputId());\n if (output == null) {\n instance.getInterface().getNotificationManager().addNotification(\n new Notification(NotificationType.ERROR, \"OpenRGB Plugin\", \"Could not find virtual output for id \" + holder.getOutputId()));\n return;\n }\n\n if(handler != null) { // set values to output handler\n handler.setName(holder.getName());\n handler.setDevices(listDevices);\n handler.setVirtualOutput(output);\n } else { // create new output handler\n // create new handler\n OutputHandler handler = instance.createHandler(holder, output);\n // add handler to set\n instance.addHandler(handler);\n }\n\n // go back\n context.navigateDown();\n }\n });\n\n panelSettings.add(Box.createVerticalGlue());\n panelSettings.add(btnAdd);\n }",
"public EditPanel getEditPanel() { return ep; }",
"public JPanel getPanel() {\n RepositoryPanel repositoryPanel = (RepositoryPanel) repositoryStep.getComponent();\n return repositoryPanel;\n }",
"public static UISettings getShadowInstance() {\n Application application = ApplicationManager.getApplication();\n return application != null ? getInstance() : new UISettings();\n }",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tmaxLabel = new JLabel();\r\n\t\t\tinfLabel = new JLabel();\r\n\t\t\tminLabel = new JLabel();\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tString min = \"0.0 <=\";\r\n\t\t\tString max = \"<= 1.0\";\r\n\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxSupport();\r\n\t\t\t} else if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinConfidence() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxConfidence();\r\n\t\t\t} else if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = intentsBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + intentsBasis.getMaxSupport();\r\n\t\t\t}\r\n\t\t\tminLabel.setText(min);\r\n\t\t\tinfLabel.setText(\"<=\");\r\n\t\t\tmaxLabel.setText(max);\r\n\t\t\tjPanel.add(minLabel, null);\r\n\t\t\tjPanel.add(getMinTextField(), null);\r\n\t\t\tjPanel.add(infLabel, null);\r\n\t\t\tjPanel.add(getMaxTextField(), null);\r\n\t\t\tjPanel.add(maxLabel, null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"JPanel getPanel();",
"private JPanel getBalloonSettingsButtonPane() {\n if (balloonSettingsButtonPane == null) {\n FlowLayout flowLayout = new FlowLayout();\n flowLayout.setHgap(25);\n balloonSettingsButtonPane = new JPanel();\n balloonSettingsButtonPane.setLayout(flowLayout);\n balloonSettingsButtonPane.setPreferredSize(new java.awt.Dimension(35, 35));\n balloonSettingsButtonPane.add(getAddButton(), null);\n balloonSettingsButtonPane.add(getCopyButton(), null);\n balloonSettingsButtonPane.add(getEditButton(), null);\n }\n return balloonSettingsButtonPane;\n }",
"public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}",
"public interface SettingsProvider {\n /**\n * Enable the background data option to fetch daily deviations periodically.\n */\n void enableBackgroundData();\n\n /**\n * Disable the background data option to fetch daily deviations periodically.\n */\n void disableBackgroundDate();\n\n /**\n * Determine whether background data is enabled.\n * @return true if background data is enabled.\n */\n boolean isBackgroundDataEnabled();\n\n /**\n * Enable the local notification system used to notify users when there is new data.\n */\n void enableNotifications();\n\n /**\n * Disable the local notification system used to notify users when there is new data.\n */\n void disableNotifications();\n\n /**\n * Determine whether local notifications are enabled.\n * @return true if local notifications are enabled - note this will be overridden by\n * the Android system settings regarding notifications for the app.\n */\n boolean isNotificationsEnabled();\n\n /**\n * Enable the automatic header image selection when the app starts up - where an\n * image is chosen at random from the content provider and displayed in the nav menu.\n */\n void enableAutomaticHeaderImage();\n\n /**\n * Disable the automatic header image selection on app start.\n */\n void disableAutomaticHeaderImage();\n\n /**\n * Determine whether the automatic header image is enabled.\n * @return true if automatic header images is enabled.\n */\n boolean isAutomaticHeaderImageEnabled();\n}",
"org.parosproxy.paros.view.WorkbenchPanel getWorkbench() {\r\n\t\tif (paneStandard == null) {\r\n\t\t\tpaneStandard = new org.parosproxy.paros.view.WorkbenchPanel();\r\n\t\t\tpaneStandard.setLayout(new java.awt.CardLayout());\r\n\t\t\tpaneStandard.setName(\"paneStandard\");\r\n\t\t}\r\n\t\treturn paneStandard;\r\n\t}",
"@ImplementedBy(ModuleInfoPickerTableView.class)\n public interface ModuleInfoPickerView\n extends IsWidget\n {\n void setSelectionModel(SelectionModel<? super MavenProjectDTO> selectionModel);\n\n void setData(ModuleDataProvider mdp);\n }",
"private JPanel getPanelSession() {\n if (panelContext == null) {\n panelContext = new JPanel();\n panelContext.setLayout(new GridBagLayout());\n\n if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption()\n == 0) {\n panelContext.setSize(180, 101);\n }\n\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.name\")),\n LayoutHelper.getGBC(0, 0, 1, 1.0D));\n panelContext.add(getTxtName(), LayoutHelper.getGBC(0, 1, 1, 1.0D));\n panelContext.add(getChkInScope(), LayoutHelper.getGBC(0, 2, 2, 1.0D));\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.desc\")),\n LayoutHelper.getGBC(0, 3, 1, 1.0D));\n panelContext.add(getTxtDescription(), LayoutHelper.getGBC(0, 4, 1, 1.0D, 1.0D));\n }\n return panelContext;\n }",
"public static PreferencesView createPreferencesView() {\n // Retrieve application preferences and attach them to their view\n // (This instance must be instanciated after dependencies)\n final LinkedHashMap<String, JPanel> panels = new LinkedHashMap<String, JPanel>(2);\n panels.put(\"General settings\", new PreferencePanel());\n\n final PreferencesView preferencesView = new PreferencesView(getFrame(), Preferences.getInstance(), panels);\n preferencesView.init();\n\n return preferencesView;\n }",
"protected WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new ProjectImportWizardPanel1()\n };\n String[] steps = new String[panels.length];\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n // Default step name to component name of panel. Mainly useful\n // for getting the name of the target chooser to appear in the\n // list of steps.\n steps[i] = c.getName();\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.FALSE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"public static JPanel getFormsPanelInstance(){\n return formsPanel;\n }",
"@Test\n public void showPanelWhenUserEnablesPanel() throws Throwable {\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, false);\n edit.apply();\n pressBack();\n\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, true);\n edit.apply();\n pressBack();\n\n waitForPanelState(BottomSheetBehavior.STATE_COLLAPSED);\n }",
"public ConfigurationSection getSettings() {\n\t\treturn plugin.getFileManager().getGroupSettings(name);\n\t}",
"public SensorPanelPresenter getPanel(){\n return this.panel;\n }",
"public LauncherPanel getLauncherPanel(){\n return this.launcherPanel;\n }",
"public JPanel getPanelGeneral(){\n\n\t\tJPanel panel = new JPanel();\n\n\t\tpanel.add(getPanelConsulta(), BorderLayout.NORTH);\n\t\tpanel.setPreferredSize(new Dimension(200, 670));\n\n\t\treturn panel;\n\n\t}",
"private void getEditLinkPanel() {\n\t\ttry{\n\t\t\tEditLinkPanel editLinkPanel = new EditLinkPanel(newsItem, feedNewsPresenter);\n\t\t\toptionPanel.add(editLinkPanel);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public JPanel getJPanel();",
"public JPanel getJPanel();",
"public ListPanel getListPanel() {\n\t\treturn listPanel;\n\t}",
"private JPanel getSeeInspectionReportPanel() {\n if (seeInspectionReportPanel == null) {\n seeInspectionReportPanel = new SeeInspectionReportPanel();\n //seeInspectionReportPanel.setLayout(null);\n }\n return seeInspectionReportPanel;\n }",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"public MenuPanel getMenuPanel() {return menuPanel;}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel75() {\n return build_f_Panel75();\n }",
"public JPanel getJPanel() {\r\n\t\treturn jPanel;\r\n\t}",
"public PanelAdminButton getPanelAdminButton() {\n\t\tif(panelAdminButton==null){\n\t\t\tpanelAdminButton = new PanelAdminButton();\n\t\t}\n\t\treturn panelAdminButton;\n\t}",
"public JPanel GetPanel() {\n\t\treturn JPprincipal;\n\t}",
"public ArrayList<Panel> getPanels() {\n return panels;\n }",
"private JPanel getPanel() {\n\t\tint width = resources.getSize().width / 5;\n\t\tint height = resources.getSize().height / 14;\n\n\t\tJLabel limit = createJLabelImg(\"textfield.png\", width - width / 15,\n\t\t\t\theight, 1f);\n\t\tint limitWidth = limit.getIcon().getIconWidth();\n\t\tint limitHeight = limit.getIcon().getIconHeight();\n\n\t\ton = createJLabelImg(\"toggle_on.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\t\toff = createJLabelImg(\"toggle_off.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\n\t\ttoggle = new JCheckBox();\n\t\ttoggle.setSelectedIcon(on);\n\t\ttoggle.setIcon(off);\n\t\ttoggle.setEnabled(true);\n\t\ttoggle.setSelected(value);\n\t\ttoggle.setCursor(new Cursor(Cursor.HAND_CURSOR));\n\t\ttoggle.setFocusable(false);\n\t\ttoggle.setBorder(null);\n\t\ttoggle.setOpaque(false);\n\n\t\tint indent = limitWidth / 25;\n\t\tint textWidthLimit = limitWidth - indent * 2 - on.getIconWidth();\n\t\tString fieldStr = Util.clipText(fieldName + \" \",\n\t\t\t\tresources.getFont(\"italic\", 15f), textWidthLimit);\n\t\tJLabel label = new JLabel(fieldStr);\n\t\tlabel.setFont(resources.getFont(\"italic\", 15f));\n\t\tlabel.setForeground(resources.getTextColor());\n\n\t\tJPanel toggleWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT,\n\t\t\t\tindent, 0));\n\t\ttoggleWrapper.setOpaque(false);\n\t\ttoggleWrapper.setPreferredSize(new Dimension(limitWidth, limitHeight));\n\t\ttoggleWrapper.setMaximumSize(toggleWrapper.getPreferredSize());\n\t\ttoggleWrapper.add(toggle);\n\t\ttoggleWrapper.add(label);\n\n\t\tJPanel container = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,\n\t\t\t\theight / 7));\n\t\tcontainer.setOpaque(false);\n\t\tcontainer.add(toggleWrapper);\n\t\tcontainer.setPreferredSize(new Dimension(width, container\n\t\t\t\t.getPreferredSize().height));\n\t\tcontainer.setMaximumSize(container.getPreferredSize());\n\n\t\treturn container;\n\t}",
"@Override\n\tpublic JPanel getPanel()\n\t{\n\t\treturn panel;\n\t}",
"private JPanel getEkitCoreEditorHTMLPanel() {\r\n\r\n\t\tString toolbar = EkitCore.TOOLBAR_DEFAULT_SINGLE;\r\n\t\tif (ekitCoreEditorHTMLPanel == null) {\r\n\t\t\tekitCoreEditorHTMLPanel =\r\n\t\t\t\tnew EkitCore(null, null, updateComment, null, null, true,\r\n\t\t\t\t\tfalse, true, true, null, null, false, false, true, false,\r\n\t\t\t\t\ttoolbar);\r\n\t\t\tekitCoreEditorHTMLPanel.setBounds(new Rectangle(2, 34, 619, 189));\r\n\t\t\tekitCoreEditorHTMLPanel.setVisible(true);\r\n\t\t}\r\n\t\treturn ekitCoreEditorHTMLPanel;\r\n\t}",
"@DataProvider(name = \"userMode\")\n private static Object[][] userModeProvider() {\n return new Object[][]{{TestUserMode.SUPER_TENANT_ADMIN, DASHBOARD_TITLE}};\n }",
"private JPanel getExtendedOptionsPanel() {\n\t\tif (extendedOptionsPanel == null) {\n\t\t\textendedOptionsPanel = new JPanel();\n\t\t\textendedOptionsPanel.setLayout(null);\n\t\t\textendedOptionsPanel.setBounds(new java.awt.Rectangle(2, 226, 465,\n\t\t\t\t\t62));\n\t\t\textendedOptionsPanel\n\t\t\t\t\t.setBorder(javax.swing.BorderFactory\n\t\t\t\t\t\t\t.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\t\t\textendedOptionsPanel.add(getTypePolygonBufferPanel(), null);\n\t\t\textendedOptionsPanel.add(getNumBuffersPanel(), null);\n\t\t}\n\t\treturn extendedOptionsPanel;\n\t}",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new TCRWizardPanel1(),\n// new TCRWizardPanel2(),\n new UtilWizardPanel1(),\n new UtilWizardPanel2()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the imageWithChars on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"public static IPreferenceStore getUIStore() {\n return getUIPlugin().getPreferenceStore();\n }",
"@Bean\n public IPortalUrlFactory getPortalUrlFactory() {\n return Locator.findMBean(IPortalUrlFactory.class, IPortalUrlFactory.MBEAN_NAME);\n }",
"@Bean\n public IPortalUrlFactory getPortalUrlFactory() {\n return Locator.findMBean(IPortalUrlFactory.class, IPortalUrlFactory.MBEAN_NAME);\n }",
"public JPanel getMainPanelFromGameGUI() {\n\t\treturn gameView.getMainPanel();\n\t}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel38() {\n return build_f_Panel38();\n }",
"public void displayConfigurationPanel(){\n\t\tthis.panelConfiguration = new PanelConfiguration(this.mainFrame);\n\t\tthis.add(this.panelConfiguration,BorderLayout.CENTER);\n\t}",
"public JFXPanel getPanel()\n {\n return panel;\n }",
"public SettingsScreen getSettingsScreen() {\n return settingsScreen;\n }",
"public JPanel getPanel() {\n return panel;\n }",
"public int getPanelGen(){\n return this.mFarm.getPanelGen();\n }",
"public JPanel getPanel()\n {\n return panel;\n }",
"public FetchModusSettings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[] {\n new WebLogicDDWizardPanel()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); // NOI18N\n // Sets steps names for a panel\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N\n // Turn on subtitle creation on each step\n jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N\n // Show steps on the left side with the image on the background\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N\n // Turn on numbering of all steps\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N\n }\n }\n }\n return panels;\n }",
"public interface ModuleConfigurationProvider {\n ModuleConfiguration getConfiguration(Module module);\n}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel4() {\n return build_f_Panel4();\n }",
"public java.lang.String getPanelVersion() {\n return panelVersion;\n }",
"public MainPanel getMainPanel() {\n return panel;\n }",
"public java.lang.String getPanelVersion() {\n return panelVersion;\n }",
"private JPanel adminLoginPanels() {\n JPanel admin = new JPanel();\n JPanel usernamePanel = new JPanel();\n usernamePanel.add(new JLabel(\"Username:\"));\n usernamePanel.add(Box.createHorizontalStrut(15));\n usernamePanel.add(username);\n usernamePanel.add(Box.createHorizontalStrut(15));\n JPanel pwPanel = new JPanel();\n pwPanel.add(new JLabel(\"Password:\"));\n pwPanel.add(Box.createHorizontalStrut(15));\n pwPanel.add(password);\n admin.add(usernamePanel);\n admin.add(pwPanel);\n return admin;\n }",
"protected abstract IPreferenceStore getPreferenceStore();",
"public GUIPopulator getGuiPopulator() {\n return guiPopulator;\n }",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"protected void setupPerspectiveSettings() {\n if (m_settings.getSettings(m_ownerApp.getApplicationID()) != null\n && m_settings.getSettings(m_ownerApp.getApplicationID()).size() > 1) {\n Map<Settings.SettingKey, Object> appSettings =\n m_settings.getSettings(m_ownerApp.getApplicationID());\n SingleSettingsEditor appEditor = new SingleSettingsEditor(appSettings);\n m_settingsTabs.addTab(\"General\", appEditor);\n m_perspectiveEditors.add(appEditor);\n }\n\n // main perspective\n Perspective mainPers = m_ownerApp.getMainPerspective();\n String mainTitle = mainPers.getPerspectiveTitle();\n String mainID = mainPers.getPerspectiveID();\n SingleSettingsEditor mainEditor =\n new SingleSettingsEditor(m_settings.getSettings(mainID));\n m_settingsTabs.addTab(mainTitle, mainEditor);\n m_perspectiveEditors.add(mainEditor);\n\n List<Perspective> availablePerspectives =\n m_ownerApp.getPerspectiveManager().getLoadedPerspectives();\n List<String> availablePerspectivesIDs = new ArrayList<String>();\n List<String> availablePerspectiveTitles = new ArrayList<String>();\n for (int i = 0; i < availablePerspectives.size(); i++) {\n Perspective p = availablePerspectives.get(i);\n availablePerspectivesIDs.add(p.getPerspectiveID());\n availablePerspectiveTitles.add(p.getPerspectiveTitle());\n }\n\n Set<String> settingsIDs = m_settings.getSettingsIDs();\n for (String settingID : settingsIDs) {\n if (availablePerspectivesIDs.contains(settingID)) {\n int indexOfP = availablePerspectivesIDs.indexOf(settingID);\n\n // make a tab for this one\n Map<Settings.SettingKey, Object> settingsForID =\n m_settings.getSettings(settingID);\n if (settingsForID != null && settingsForID.size() > 0) {\n SingleSettingsEditor perpEditor =\n new SingleSettingsEditor(settingsForID);\n m_settingsTabs.addTab(availablePerspectiveTitles.get(indexOfP),\n perpEditor);\n m_perspectiveEditors.add(perpEditor);\n }\n }\n }\n }"
] | [
"0.64327437",
"0.63908106",
"0.6152368",
"0.5810992",
"0.5707696",
"0.55727744",
"0.5538909",
"0.5512753",
"0.5489284",
"0.5408205",
"0.53163856",
"0.53133017",
"0.5299434",
"0.5296489",
"0.525288",
"0.5248772",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5236396",
"0.5197447",
"0.51830816",
"0.51777744",
"0.5175681",
"0.5160409",
"0.51479214",
"0.51327103",
"0.5131523",
"0.51293683",
"0.5122225",
"0.51217645",
"0.5109378",
"0.5107396",
"0.5095013",
"0.50906605",
"0.50716805",
"0.50426173",
"0.5035742",
"0.5035742",
"0.5033928",
"0.503377",
"0.5026907",
"0.50240314",
"0.50051755",
"0.49948826",
"0.49891025",
"0.49618",
"0.4961126",
"0.49610755",
"0.4959842",
"0.49429855",
"0.49338782",
"0.49334046",
"0.4932086",
"0.49218208",
"0.49162155",
"0.49142826",
"0.49142826",
"0.49071935",
"0.49037522",
"0.49015763",
"0.48956177",
"0.48901904",
"0.4881546",
"0.48789772",
"0.48620573",
"0.48578405",
"0.48572698",
"0.48566037",
"0.48559833",
"0.48549604",
"0.48526242",
"0.48417786",
"0.4829706",
"0.48280486",
"0.48280486",
"0.48227698",
"0.48164624",
"0.4814955",
"0.48143816",
"0.48062727",
"0.47951862",
"0.47864246",
"0.47837147",
"0.4779447",
"0.47780764",
"0.4767073",
"0.47670126",
"0.47620642",
"0.47618368",
"0.4756296",
"0.475225",
"0.47438383",
"0.47349796",
"0.47284576",
"0.472789",
"0.47261634"
] | 0.77404547 | 0 |
Gets the default per ingest job settings for instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest modules family uses hash databases imported or created using its global settings panel. All of the hash databases are enabled by default for an ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns an instance of the NoIngestModuleJobSettings class. | IngestModuleIngestJobSettings getDefaultIngestJobSettings(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract ModularConfigurationModule<T> getDefaultModule();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"public static FlatGeneratorSettings getDefaultSettings() {\n final List<FlatLayer> layers = Lists.newArrayListWithCapacity(3);\n layers.add(new FlatLayer(BlockTypes.BEDROCK, 1));\n layers.add(new FlatLayer(BlockTypes.DIRT, 2));\n layers.add(new FlatLayer(BlockTypes.GRASS, 1));\n return new FlatGeneratorSettings(BiomeTypes.PLAINS, layers);\n }",
"public static IPojoExporterPlugin getDefault() {\n\t\treturn sPlugin;\n\t}",
"public Settings loadDefault() {\n return new Settings();\n }",
"IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);",
"public static MeduseCorePlugin getDefault() {\n\t\treturn plugin;\n\t}",
"public Map<String, Object> getSettings() {\n HashMap<String, Object> settings = new HashMap<>();\n\n // the selected input column\n settings.put(PIASettings.CONFIG_INPUT_COLUMN.getKey(), inputColumnBox.getSelectedColumn());\n // error when no decoys are found\n settings.put(PIASettings.ERROR_ON_NO_DECOYS.getKey(), checkErrorOnNoDecoys.isSelected());\n // create PSM sets\n settings.put(PIASettings.CREATE_PSMSETS.getKey(), checkCreatePSMSets.isSelected());\n // consider modifications\n settings.put(PIASettings.CONSIDER_MODIFICATIONS.getKey(), checkConsiderModifications.isSelected());\n // export level and format\n settings.put(PIASettings.EXPORT_FILTER.getKey(), checkExportFilter.isSelected() && checkExportFilter.isEnabled());\n settings.put(PIASettings.EXPORT_LEVEL.getKey(), comboExportLevel.getSelectedItem().toString());\n settings.put(PIASettings.EXPORT_FORMAT.getKey(), comboExportFormat.getSelectedItem() != null ?\n comboExportFormat.getSelectedItem().toString() : null);\n settings.put(PIASettings.EXPORT_FILEBASENAME.getKey(), fieldExportFileBasename.getText().trim());\n\n // PSM file ID\n settings.put(PIASettings.PSM_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPSMAnalysisFileID.getText()));\n\n // calculate FDR scores for all files\n settings.put(PIASettings.CALCULATE_ALL_FDR.getKey(), checkCalculateAllFDR.isSelected());\n // calculate combined FDR score\n settings.put(PIASettings.CALCULATE_COMBINED_FDR_SCORE.getKey(), checkCalculateCombinedFDRScore.isSelected());\n\n // decoy strategy for all files\n settings.put(PIASettings.ALL_DECOY_STRATEGY.getKey(), allDecoyStrategy.getSelection().getActionCommand());\n // decoy pattern for all files\n settings.put(PIASettings.ALL_DECOY_PATTERN.getKey(), fieldAllDecoyPattern.getText());\n\n // used identifications (for FDR) for all files\n settings.put(PIASettings.ALL_USED_IDENTIFICATIONS.getKey(), Integer.parseInt(allUsedTopIdentifications.getSelection().getActionCommand()));\n\n // the preferred scores for FDR calculation\n DefaultListModel<String> scoreListModel = (DefaultListModel<String>)selectedPreferredFDRScoresList.getModel();\n String[] preferredScoreShorts = new String[scoreListModel.getSize()];\n for (int i=0; i < scoreListModel.getSize(); i++) {\n preferredScoreShorts[i] = scoreListModel.get(i);\n }\n settings.put(PIASettings.FDR_PREFERRED_SCORES.getKey(), preferredScoreShorts);\n\n // the PSM level filters\n List<AbstractFilter> filtersList = filtersPSMLevel.getAppliedFilters();\n String[] filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PSM_FILTERS.getKey(), filtersArr);\n\n\n // infere peptides\n settings.put(PIASettings.PEPTIDE_INFER_PEPTIDES.getKey(), checkInferPeptides.isSelected());\n\n // peptide file ID\n settings.put(PIASettings.PEPTIDE_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPeptideAnalysisFileID.getText()));\n\n // the peptide level filters\n filtersList = filtersPeptideLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PEPTIDE_FILTERS.getKey(), filtersArr);\n\n\n // infere proteins\n settings.put(PIASettings.PROTEIN_INFER_PROTEINS.getKey(), checkInferProteins.isSelected());\n\n // protein inference method\n settings.put(PIASettings.PROTEIN_INFERENCE_METHOD.getKey(), radioGrpInferenceMethod.getSelection().getActionCommand());\n\n // the protein inference filters\n filtersList = filtersProteinInference.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_INFERENCE_FILTERS.getKey(), filtersArr);\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_METHOD.getKey(), radioGrpProteinScoring.getSelection().getActionCommand());\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_SCORE.getKey(), comboAvailableBaseScores.getSelectedItem());\n\n // the PSMs used for protein scoring\n settings.put(PIASettings.PROTEIN_SCORING_USED_PSMS.getKey(), radioGrpPSMsForScoring.getSelection().getActionCommand());\n\n // the protein level filters\n filtersList = filtersProteinLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_FILTERS.getKey(), filtersArr);\n\n return settings;\n }",
"private Map<String, Object> getDefaultConfiguration() {\n JavaFormattingOptions options = JavaFormattingOptions.createDefault();\n options.ClassBraceStyle = BraceStyle.EndOfLine;\n options.InterfaceBraceStyle = BraceStyle.EndOfLine;\n options.EnumBraceStyle = BraceStyle.EndOfLine;\n\n return ProcyonBuilderConfiguration\n .getBuilderConfiguration()\n .uploadClassReference(true)\n .excludeNestedTypes(false)\n .flattenSwitchBlocks(true)\n .forceExplicitImports(true)\n .forceExplicitTypeArguments(true)\n .setLanguage(new JavaLanguage())\n .setByteCodeOutputOptions(new BytecodeOutputOptions())\n .setJavaFormatterOptions(options)\n .showSyntheticMembers(false)\n .alwaysGenerateExceptionVariableForCatchBlocks(true)\n .includeErrorDiagnostics(false)\n .includeLineNumbersInByteCode(false)\n .retainRedundantCasts(false)\n .retainPointlessSwitches(true)\n .unicodeOutputEnabled(true)\n .showDebugLineNumbers(false)\n .mergeVariables(false)\n .simplifyMemberReferences(true)\n .disableForEachTransforms(false)\n .setForceFullyQualifiedReferences(false)\n .getConfiguration();\n }",
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"@Override\n public Settings indexSettings() {\n return Settings.builder()\n .put(super.indexSettings())\n .put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, SHARD_COUNT)\n .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, REPLICA_COUNT)\n .put(IndexModule.INDEX_QUERY_CACHE_ENABLED_SETTING.getKey(), false)\n .put(IndexMetadata.SETTING_REPLICATION_TYPE, ReplicationType.SEGMENT)\n .put(\"index.refresh_interval\", -1)\n .build();\n }",
"public MassOptions getDefaultMassOptions() {\n\t\treturn theMassOptions;\n\t}",
"public static BuildAnalyzerPlugin getDefault() {\n\t\treturn plugin;\n\t}",
"public Map<String, Object> getConfigSetting(String interpreterGroupId) {\n InterpreterSetting interpreterSetting = get(interpreterGroupId);\n if (null != interpreterSetting) {\n List<InterpreterInfo> interpreterInfos = interpreterSetting.getInterpreterInfos();\n int infoSize = interpreterInfos.size();\n for (InterpreterInfo intpInfo : interpreterInfos) {\n if ((intpInfo.isDefaultInterpreter() || (infoSize == 1))\n && (intpInfo.getConfig() != null)) {\n return intpInfo.getConfig();\n }\n }\n }\n\n return new HashMap<>();\n }",
"@RolesAllowed(RolesConstants.ADMIN_MANAGE_SETTINGS)\n @Override\n public Configuration getDbConfiguration() {\n return getRepository().getDbConnectionManager().getSqlSessionFactory().getConfiguration();\n }",
"public static TFSVersionExporterPlugin getDefault() {\r\n\t\treturn plugin;\r\n\t}",
"public static NatpPlugin getDefault() {\r\n\t\treturn plugin;\r\n\t}",
"public DelegatingMetaStore getDefaultMetaStore() {\n\t\treturn metaStore;\n\t}",
"public static DocumentationSettings getDefault(){\n return INSTANCE;\n }",
"public static ConfigManager getConfigManager() {\n\t\treturn getInstance().defaultGroup;\n\t}",
"public static PulsarTikaConfig getDefaultConfig() {\n try {\n return new PulsarTikaConfig();\n } catch (IOException e) {\n throw new RuntimeException(\"Unable to read default configuration\", e);\n } catch (TikaException e) {\n throw new RuntimeException(\"Unable to access default configuration\", e);\n }\n }",
"public static CorePlugin getDefault() {\n return plugin;\n }",
"public static InfoPlugin getDefault() {\n return plugin;\n }",
"public JTestDefinition allDefaults(){\n return JTestDefinition.builder(Id.of(\"all defaults\"), getEndpoints()).build();\n }",
"public static SARLEclipsePlugin getDefault() {\n\t\treturn instance;\n\t}",
"public static PluginConsistencyActivator getDefault()\n {\n return plugin;\n }",
"private void setDefaultConfiguration(){\n\t\tthis.setProperty(\"DefaultNodeCapacity\", \"5\");\n\t\tthis.setProperty(\"ReplicaNumber\", \"3\");\n\t\tthis.setProperty(\"JobReattemptTimes\", \"2\");\n\t\tthis.setProperty(\"ReducerCount\", \"3\");\n\t}",
"public ConfigurationSection getSettings() {\n\t\treturn plugin.getFileManager().getGroupSettings(name);\n\t}",
"@GetMapping(\"/api/gamesessions/settings\")\n public GameSessionSettings getDefaultSessionSettings() {\n GameSessionSettings settings = gameSessionSettingsDao.findDefaultSettings();\n return settings;\n }",
"public JobManager getJobManager() {\n if (instance == null) {\n throw new ElasticsearchException(\"Tried to get job manager although Machine Learning is disabled\");\n }\n return instance;\n }",
"public static Activator getDefault() {\r\n return plugin;\r\n }",
"public static XMLPlugin getDefault()\n {\n return plugin;\n }",
"@Override\n\tpublic List<PruneSetting> getAllPruneSetting() throws Exception {\n\t\treturn null;\n\t}",
"public GameConfig createDefaultConfig() {\n\n return null;\n }",
"public ExperimentationConfiguration getExperimentationConfiguration() {\n return new ExperimentationConfiguration(this.applicationContext);\n }",
"public static Activator getDefault() {\n return plugin;\n }",
"public DataRecord getEmptyUserSettingsRecord() throws ProcessManagerException {\r\n try {\r\n return processModel.getNewUserInfosRecord(currentRole, getLanguage());\r\n } catch (WorkflowException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_EMPTY_USERSETTINGS_RECORD\");\r\n }\r\n }",
"@Override\n public Configuration getDefaultClusterConfiguration() throws\n FileNotFoundException {\n return ConfigHelper.loadMandatoryResource(\n \"org/apache/hoya/providers/hbase/hbase.xml\");\n }",
"public static RAPCorePlugin getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}",
"public static Activator getDefault() {\r\n\t\treturn plugin;\r\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\t\treturn plugin;\n\t}",
"protected Map<String, String> getSettings() {\n\n return (Map<String, String>) getExtraData().get(ProcessListener.EXTRA_DATA_SETTINGS);\n }",
"public static UpdateCheckActivator getDefault() {\n\t\treturn plugin;\n\t}",
"public static Activator getDefault() {\n\treturn plugin;\n }",
"Map<String, Object> exportDefaultConfiguration();",
"public Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"public void storeDefaultMassOptions() {\n\t\ttheMassOptions.store(theConfiguration);\n\t}",
"public static Activator getDefault() {\n \t\treturn plugin;\n \t}",
"abstract public ResourceManager getDefaultConfig();",
"public static Activator getDefault()\r\n\t{\r\n\t\treturn plugin;\r\n\t}",
"public static @NotNull Settings getSettings ()\n {\n Application application = ApplicationManager.getApplication ();\n SettingsPlugin settingsPlugin = application.getComponent (SettingsPlugin.class);\n return settingsPlugin.getSettings ();\n }",
"public static Properties getDefaultProperties() {\r\n return getProperties(true);\r\n }",
"DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);",
"public static MylynUserStudyExamplePlugin getDefault() {\n\t\treturn plugin;\n\t}",
"boolean isDataSourceIngestModuleFactory();",
"public RelyingPartyConfiguration getDefaultRelyingPartyConfiguration();",
"@Override\r\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\r\n\t}",
"public static CPCTrackPlugin getDefault()\n\t{\n\t\treturn plugin;\n\t}",
"public IIndexFactoryConfig getConfig() {\n\t\treturn getConfiguration();\n\t}",
"@Override\n public Map<String, Object> getComponentConfiguration() {\n return null;\n }",
"@Override\n public Map<String, Object> getComponentConfiguration() {\n return null;\n }",
"@Override\n public Map<String, Object> getComponentConfiguration() {\n return null;\n }",
"@Override\n public Map<String, Object> getComponentConfiguration() {\n return null;\n }",
"boolean getImportConfigurationNull();",
"boolean hasIngestJobSettingsPanel();",
"public static ServerActivator getDefault() {\n\t\treturn plugin;\n\t}",
"private DefaultSetting getSampleDefaultSetting() {\n DefaultSetting setting = new DefaultSetting(\"\",\n \"\",\n 5,\n Token.DIGIT,\n \"d\",\n 1,\n true,\n true,\n true);\n\n return setting;\n }",
"@Override\n\tpublic Map<String, String> getConfigParams(IFloodlightModule module) {\n\t Map<String, String> retMap = configParams.get(module.getClass());\n\t if (retMap == null) {\n\t // Return an empty map if none exists so the module does not\n\t // need to null check the map\n\t retMap = new HashMap<String, String>();\n\t configParams.put(module.getClass(), retMap);\n\t }\n\n\t // also add any configuration parameters for superclasses, but\n\t // only if more specific configuration does not override it\n\t for (Class<? extends IFloodlightModule> c : configParams.keySet()) {\n\t if (c.isInstance(module)) {\n\t for (Map.Entry<String, String> ent : configParams.get(c).entrySet()) {\n\t if (!retMap.containsKey(ent.getKey())) {\n\t retMap.put(ent.getKey(), ent.getValue());\n\t }\n\t }\n\t }\n\t }\n\n\t return retMap;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> getComponentConfiguration() {\n\t\treturn null;\n\t}",
"public static synchronized CatalogSettings getDefault() {\n if (instance == null) {\n instance = Lookup.getDefault().lookup(CatalogSettings.class);\n }\n return instance;\n }",
"public static XSDEditorPlugin getDefault() {\n \t\treturn plugin;\n \t}",
"@Override\n public AbstractConfiguration getEmptyConfiguration(\n DefaultConfigurationBuilder.ConfigurationDeclaration decl) throws Exception\n {\n throw new Exception(\"Unable to create configuration!\");\n }",
"public SendOptions getDefaultSendOptions() {\n return defaultSendOptions;\n }",
"public FetchModusSettings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }",
"@Nonnull\n public com.microsoft.graph.requests.DefaultManagedAppProtectionCollectionRequestBuilder defaultManagedAppProtections() {\n return new com.microsoft.graph.requests.DefaultManagedAppProtectionCollectionRequestBuilder(getRequestUrlWithAdditionalSegment(\"defaultManagedAppProtections\"), getClient(), null);\n }",
"protected OeTemplateProcessorConfig getConfig() {\n final OeTemplateProcessorConfig config = OeTemplateProcessorConfig.create();\n config\n //.setPollingIntervalMillis(1000)\n //.setPollingMaxDurationSecs(5)\n //.setResultsBatchSize(100)\n .getInferenceParameterOverrides()\n .setMaxAnswerCount(MAX_ANSWERS);\n return config;\n }",
"ConfigurationEntity loadFullConfigurations() {\n\n\t\tConfigurationEntity config;\n\t\tconfig = getPartiallyLoadedConfigEntity();\n\t\tconfig.setCanvasLayout(getCanvasLayoutMatrix());\n\t\treturn config\n\t}",
"public static DepclipsePlugin getDefault() {\n\t return plugin;\n\t}",
"public static FavoriteSearchActivator getDefault() {\r\n\t\treturn plugin;\r\n\t}",
"public static InstallerRegistry getDefault() {\n InstallerRegistry regs = defaultInstance.get();\n if (regs != null)\n return regs;\n regs = new InstallerRegistry();\n defaultInstance = new WeakReference<InstallerRegistry>(regs);\n return regs;\n }",
"private static ServerConfigPOJO defaultServerConfig() {\n return ServerConfigParser.readServerConfig();\n }",
"protected AlgorithmConfiguration getSettings() {\n return new AlgorithmConfiguration(m_SplitMethod, m_unbiasedEstimate,\n m_kBEPPConstant, m_useBagCount, m_bagInstanceMultiplier,\n m_AttributesToSplit, m_AttributeSplitChoices);\n }",
"public GraphiteReporterConfig getGraphiteReporterConfig() {\n return new GraphiteReporterConfig(configPrefix + GRAPHITE_REPORTER_CONFIG_PREFIX, configValues);\n }",
"public ProcessEngineConfigurationImpl getProcessEngineConfiguration() {\n return processEngineConfiguration;\n }"
] | [
"0.5742279",
"0.545401",
"0.494534",
"0.48997903",
"0.4874776",
"0.4790172",
"0.47687888",
"0.47385755",
"0.47380713",
"0.47294474",
"0.47000825",
"0.4685945",
"0.46763447",
"0.4664842",
"0.46468094",
"0.4645517",
"0.4643588",
"0.46142808",
"0.46133712",
"0.45948303",
"0.45674422",
"0.45544267",
"0.45161268",
"0.4510443",
"0.44982958",
"0.4470248",
"0.44487774",
"0.4445699",
"0.44451985",
"0.44411895",
"0.44390932",
"0.44381043",
"0.4431107",
"0.4428379",
"0.44204077",
"0.44177872",
"0.44157374",
"0.44062376",
"0.44005895",
"0.43996578",
"0.43996578",
"0.43993962",
"0.43993962",
"0.43993962",
"0.43993962",
"0.43993962",
"0.43993962",
"0.43993962",
"0.43993962",
"0.4355755",
"0.43556488",
"0.4354298",
"0.43500423",
"0.43364036",
"0.43321058",
"0.43294445",
"0.4321261",
"0.431393",
"0.43134508",
"0.42894334",
"0.42879394",
"0.42693588",
"0.42679125",
"0.42676282",
"0.4266737",
"0.4266737",
"0.42654297",
"0.4261349",
"0.42569485",
"0.42569485",
"0.42569485",
"0.42569485",
"0.42524344",
"0.42446744",
"0.42444393",
"0.42418337",
"0.4232028",
"0.42301038",
"0.42301038",
"0.42301038",
"0.42301038",
"0.42301038",
"0.42301038",
"0.42301038",
"0.4227833",
"0.42210305",
"0.4207219",
"0.4195508",
"0.4191674",
"0.41883615",
"0.4187943",
"0.41849613",
"0.41821545",
"0.41751698",
"0.4173635",
"0.4171192",
"0.4162676",
"0.41388077",
"0.413591",
"0.4132884"
] | 0.7058834 | 0 |
Queries the factory to determine if it provides user a interface panel to allow a user to make per ingest job settings for instances of the family of ingest modules the factory creates. For example, the Autopsy core hash lookup ingest module factory provides an ingest job settings panels to enable or disable hash databases per ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean hasIngestJobSettingsPanel(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"boolean isDataSourceIngestModuleFactory();",
"boolean hasGlobalSettingsPanel();",
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"boolean isFileIngestModuleFactory();",
"IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);",
"@Test\n public void showPanelWhenUserEnablesPanel() throws Throwable {\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, false);\n edit.apply();\n pressBack();\n\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, true);\n edit.apply();\n pressBack();\n\n waitForPanelState(BottomSheetBehavior.STATE_COLLAPSED);\n }",
"@Override\n public boolean showPanel(Issue issue, ApplicationUser remoteUser) {\n\n if (issue.isSubTask()){\n return false;\n }else{\n return true;\n }\n\n }",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}",
"public boolean hasPanelVersion() {\n return fieldSetFlags()[1];\n }",
"public void testConfigurePanel2() {\n instance.configurePanel(new PackageImpl());\n\n assertEquals(\"Failed to configure the panel.\", 4, ((JPanel) instance.getComponent(0)).getComponentCount());\n assertEquals(\"Failed to configure the panel.\", 1, ((JPanel) instance.getComponent(1)).getComponentCount());\n }",
"public Component getConfigFormPanel()\n {\n if (configFormPanel == null)\n {\n Object form = configForm.getForm();\n if ((form instanceof Component) == false)\n {\n throw new ClassCastException(\"ConfigurationFrame :\"\n + form.getClass()\n + \" is not a class supported by this ui implementation\");\n }\n configFormPanel = (Component) form;\n }\n return configFormPanel;\n }",
"boolean hasGridLayout();",
"@DataProvider(name = \"userMode\")\n private static Object[][] userModeProvider() {\n return new Object[][]{{TestUserMode.SUPER_TENANT_ADMIN, DASHBOARD_TITLE}};\n }",
"boolean hasArtilleryFactorySelected();",
"public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}",
"public boolean areComponentsEnabled() {\n return itiefe.isEnabled();\n }",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }",
"public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}",
"boolean isSetPluginstate();",
"boolean hasConfiguration();",
"boolean hasSettings();",
"boolean hasSettings();",
"@Test\n public void disableShowingPanelInPreferences() throws Throwable {\n Utils.openDrawer(getActivityTestRule());\n clickAdapterViewItem(10, R.id.navigation_drawer); //Show preference screen\n\n SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(getActivity()).edit();\n edit.putBoolean(Settings.KEY_PREF_SHOW_NOW_PLAYING_PANEL, false);\n edit.apply();\n pressBack();\n\n waitForPanelState(BottomSheetBehavior.STATE_HIDDEN);\n }",
"boolean hasRegistry();",
"private WizardDescriptor.Panel[] getPanels() {\n Project project = Templates.getProject(wizard);\n File f1 = new File(\"src\");\n \n // Templates.setTargetFolder(wizard);\n\n Sources sources = project.getLookup().lookup(Sources.class);\n SourceGroup[] sg = sources.getSourceGroups(Sources.TYPE_GENERIC);\n \n if (panels == null) {\n targetChooserPanel = \n Templates.createSimpleTargetChooser(project, sg);\n panels = new WizardDescriptor.Panel[]{\n targetChooserPanel\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", Integer.valueOf(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"@Override\n public boolean isSupervisionComponent(@NonNull ComponentName who) {\n if (!mHasFeature) {\n return false;\n }\n synchronized (getLockObject()) {\n if (mConstants.USE_TEST_ADMIN_AS_SUPERVISION_COMPONENT) {\n final CallerIdentity caller = getCallerIdentity();\n if (isAdminTestOnlyLocked(who, caller.getUserId())) {\n return true;\n }\n }\n return isSupervisionComponentLocked(who);\n }\n }",
"private boolean isDisplay(JPiereIADTabpanel tabPanel)\n {\n String logic = tabPanel.getDisplayLogic();\n if (logic != null && logic.length() > 0)\n {\n boolean display = Evaluator.evaluateLogic(tabPanel, logic);\n if (!display)\n {\n log.info(\"Not displayed - \" + logic);\n return false;\n }\n }\n return true;\n }",
"boolean hasImportConfiguration();",
"public IStatus canAddModule(IModule module);",
"public JPanel getSettingsPanel() {\n\t\t//edgeAttributeHandler.updateAttributeList();\n\t\t// Everytime we ask for the panel, we want to update our attributes\n\t\tTunable attributeTunable = clusterProperties.get(\"attributeList\");\n\t\tattributeArray = getAllAttributes();\n\t\tattributeTunable.setLowerBound((Object)attributeArray);\n\n\t\treturn clusterProperties.getTunablePanel();\n\t}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel28() {\n return build_f_Panel28();\n }",
"private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }",
"boolean hasHasNodeSettings();",
"public void enablePanel(boolean b);",
"public boolean hasRegistry() {\n return registryBuilder_ != null || registry_ != null;\n }",
"public boolean isShowing() {\n return true; // Not supported for MenuComponents\n }",
"protected WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new ProjectImportWizardPanel1()\n };\n String[] steps = new String[panels.length];\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n // Default step name to component name of panel. Mainly useful\n // for getting the name of the target chooser to appear in the\n // list of steps.\n steps[i] = c.getName();\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.FALSE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"boolean hasInputConfig();",
"boolean hasInputConfig();",
"boolean hasInputConfig();",
"public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}",
"public boolean isManager() {\r\n\t\treturn val >= 3;\r\n\t}",
"boolean hasDimension();",
"@Override\n public boolean isConfigured() {\n return delegate.isConfigured();\n }",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[] {\n new WebLogicDDWizardPanel()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); // NOI18N\n // Sets steps names for a panel\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N\n // Turn on subtitle creation on each step\n jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N\n // Show steps on the left side with the image on the background\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N\n // Turn on numbering of all steps\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N\n }\n }\n }\n return panels;\n }",
"private Component getPanelAgentes() {\n\t\tFile fich = new File(FICH_CONFAGENTES);\n\t\tPanelConfigAgentes panel = new PanelConfigAgentes(fich, this);\n\t\treturn panel;\n\t}",
"boolean hasAdGroupExtensionSetting();",
"private void loadModules() {\n\n ModuleTiers moduleTiers = new ModuleTiers();\n moduleTiers.setSource(.5);\n moduleTiers.setNumTiers(5);\n String tiersKey = \"module tiers\";\n addDemoPanelWithModule(moduleTiers, tiersKey, null);\n demoPanels.get(tiersKey).removeGUI();\n\n ModuleCellular moduleCellular = new ModuleCellular();\n moduleCellular.setCoefficients(9, .5, 3, 7);\n String cellularKey = \"module cellular\";\n addDemoPanelWithModule(moduleCellular, cellularKey, null);\n demoPanels.get(cellularKey).removeGUI();\n\n /*\n * ground_gradient\n */\n // ground_gradient\n ModuleGradient groundGradient = new ModuleGradient();\n groundGradient.setGradient(0, 0, 0, 1, 0, 0);\n String gradientKey = \"Ground Gradient\";\n addDemoPanelWithModule(groundGradient, gradientKey, null);\n demoPanels.get(gradientKey).removeGUI();\n\n String mountainsKey = \"mountains before gradient\";\n TerrainNoiseSettings mountainSettings = getDemoPanelSettings(mountainsKey);\n if (mountainSettings == null) {\n mountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n Module mountainTerrainNoGradient = mountainSettings.makeTerrainModule(null);\n addDemoPanelWithModule(mountainTerrainNoGradient, mountainsKey, mountainSettings);\n\n String mountainsWithGradientKey = \"translate gradient domain with mountains\";\n TerrainNoiseSettings gradMountainSettings = getDemoPanelSettings(mountainsWithGradientKey);\n if (gradMountainSettings == null) {\n gradMountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n ModuleTranslateDomain mountainTerrain = new ModuleTranslateDomain();\n mountainTerrain.setAxisYSource(mountainTerrainNoGradient);\n mountainTerrain.setSource(groundGradient);\n\n addDemoPanelWithModule(mountainTerrain, mountainsWithGradientKey, gradMountainSettings);\n demoPanels.get(mountainsWithGradientKey).removeGUI();\n\n /*\n String highlandKey = \"highlands\";\n TerrainNoiseSettings highlandSettings = getDemoPanelSettings(highlandKey);\n if (highlandSettings == null) {\n highlandSettings = TerrainNoiseSettings.HighLandTerrainNoiseSettings(seed);\n }\n Module highlandTerrain = TerrainDataProvider.MakeTerrainNoise(groundGradient, highlandSettings );\n addDemoPanelWithModule(highlandTerrain, highlandKey, highlandSettings);\n */\n /*\n * select air or solid with mountains\n */\n String terrainSelectKey = \"terrain Select\";\n TerrainNoiseSettings terrSelectSettings = getDemoPanelSettings(terrainSelectKey);\n if (terrSelectSettings == null) {\n terrSelectSettings = TerrainNoiseSettings.TerrainSettingsWithZeroOneModuleSelect(seed, mountainTerrain);\n } else {\n terrSelectSettings.moduleSelectSettings.controlSource = mountainTerrain;\n }\n Module terrSelectModule = terrSelectSettings.moduleSelectSettings.makeSelectModule();\n addDemoPanelWithModule(terrSelectModule, terrainSelectKey, terrSelectSettings);\n\n /*\n * noise to determine which kind of solid block\n */\n String typeSelectSettingKey = \"terrain type select\";\n TerrainNoiseSettings typeSelectSettings = getDemoPanelSettings(typeSelectSettingKey);\n if (typeSelectSettings == null) {\n typeSelectSettings = TerrainNoiseSettings.TerrainTypeSelectModuleNoiseSettings(seed, false);\n }\n Module selectTypeTerr = typeSelectSettings.makeTerrainModule(null);\n //addDemoPanelWithModule(selectTypeTerr, typeSelectSettingKey, typeSelectSettings);\n\n String dirtOrStoneSelectSettingsKey = \"dirt or stone\";\n TerrainNoiseSettings dirtOrStoneSelectSettings = getDemoPanelSettings(dirtOrStoneSelectSettingsKey);\n if (dirtOrStoneSelectSettings == null) {\n dirtOrStoneSelectSettings = TerrainNoiseSettings.BlockTypeSelectModuleSettings(seed, selectTypeTerr, BlockType.DIRT, BlockType.STONE);\n } else {\n dirtOrStoneSelectSettings.moduleSelectSettings.controlSource = selectTypeTerr;\n }\n Module dirtOrStoneModule = dirtOrStoneSelectSettings.moduleSelectSettings.makeSelectModule();\n //addDemoPanelWithModule(dirtOrStoneModule, dirtOrStoneSelectSettingsKey, dirtOrStoneSelectSettings);\n\n /*\n * combine terrain select and block type select\n */\n String combineTerrainAndBlockTypeKey = \"Terrain And BlockType\";\n ModuleCombiner terrAndBlockTypeMod = new ModuleCombiner(ModuleCombiner.CombinerType.MULT);\n terrAndBlockTypeMod.setSource(0, terrSelectModule);\n terrAndBlockTypeMod.setSource(1, dirtOrStoneModule);\n TerrainNoiseSettings combineSettings = new TerrainNoiseSettings(seed); //defaults\n combineSettings.renderWithBlockColors = true;\n //addDemoPanelWithModule(terrAndBlockTypeMod, combineTerrainAndBlockTypeKey, combineSettings);\n //demoPanels.get(combineTerrainAndBlockTypeKey).removeGUI();\n\n\n\n }",
"public interface Module extends Pluggable {\n\t\n\t/**\n\t * Return the module type. Module type can be a value like Mywork, Support, Cowork, etc.\n\t * @return\n\t */\n\tModuleType type();\n\t\n\t/**\n\t * Return true if the module is in subscription. \n\t * @return true if the module is in subscription\n\t */\n\tboolean isOpened();\n\t\n\t/**\n\t * Return true if the module is enabled by a company administrator.\n\t * @return true if the module is enabled by a company administrator\n\t */\n\tboolean isEnabled();\n\t\n\t/**\n\t * Return the home page uri representing an entry point of module.\n\t * @return the home page uri\n\t */\n\tString home();\n\n\t/**\n\t * Return company and user option information like whether option configuration is provided and option configuration uri if any. \n\t * @return company and user option configuration information\n\t */\n\tModuleOption option();\n\t\n\t/**\n\t * Return volume configuration information\n\t * @return\n\t */\n\tModuleComponent volume();\n\t\n\t/**\n\t * Return statistics information\n\t * @return\n\t */\n\tModuleComponent statistics();\n\t\n\t/**\n\t * Return renderer\n\t */\n\tModuleRenderer render();\n\t\n}",
"void jEnableMenu_actionPerformed(ActionEvent e) {\n //need to check if this is already enabled\n \n DefaultMutableTreeNode node = (DefaultMutableTreeNode) jComponentTree.getLastSelectedPathComponent();\n if (node.getParent() != rootNode) { //when it's an instance\n PluginDescriptor value = (PluginDescriptor) ((EGTreeNode) node).getComponent();\n if (value.getID().equalsIgnoreCase(jLabel1.getText())) {\n if (value.isVisualPlugin()) { //add visual plugin to the selected area\n String visualArea = (String) jVisualAreaComboBox.getSelectedItem();\n if ((visualArea != null) && (!visualArea.equalsIgnoreCase(\"\")))\n GeawConfigObject.getGuiWindow().addToContainer(visualArea, ((VisualPlugin) value.getPlugin()).getComponent(), value.getLabel());\n PluginRegistry.addVisualAreaInfo(visualArea, (VisualPlugin) value.getPlugin());\n }\n //get interfaces\n ListModel ls = jBroadcastListenerList.getModel();\n for (int c = 0; c < ls.getSize(); c++) {\n ComponentInterface ci = (ComponentInterface) ls.getElementAt(c);\n if (ci.isActive()) {\n try {\n BroadcastEventRegistry.addEventListener(ci.getInterfaceClass(), ((AppEventListener) value.getPlugin()));\n } catch (AppEventListenerException ex) {\n ex.printStackTrace();\n \n } catch (ListenerEventMismatchException ex) {\n ex.printStackTrace();\n }\n }\n }\n /**\n * @todo add coupled ls, broadcastls etc\n */\n } else {\n JOptionPane.showMessageDialog(null, \"Parameters not set for the component.\");\n }\n }\n }",
"private void setModuleInterface() {\n listModuleInterface = new ArrayList<List<UserInterface>>();\n for (int i = 0; i < modules.size(); i++) {\n List<UserInterface> list = new ArrayList<UserInterface>();\n if (modules.get(i).getUserInterfacesId() != null) {\n for (int j = 0; j < modules.get(i).getUserInterfacesId().size(); j++) {\n UserInterface uim = userInterfaceDAO.getById(modules.get(i).getUserInterfacesId().get(j));\n if (uim != null) {\n list.add(uim);\n }\n }\n }\n listModuleInterface.add(list);\n }\n }",
"public boolean isSetExtendable()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(EXTENDABLE$22) != null;\r\n }\r\n }",
"public void testRefreshPanel() {\n Package packageObject = new PackageImpl();\n instance.configurePanel(packageObject);\n\n assertEquals(\"Failed to configure the left panel.\", 4, ((JPanel) instance.getComponent(0)).getComponentCount());\n assertEquals(\"Failed to configure the right panel.\", 1,\n ((JPanel) instance.getComponent(1)).getComponentCount());\n }",
"public boolean isPanelActive() {\n return getElement(container).getAttribute(\"class\").contains(\"rx-blade-expanded\");\n }",
"@SuppressWarnings(\"unchecked\")\n private void initializeGeneralSettingsPanel() {\n generalSettingsPanel = new JPanel(new GridBagLayout());\n\n GridBagConstraints c = new GridBagConstraints();\n c.anchor = GridBagConstraints.NORTHWEST;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.insets = new Insets(5, 5, 5, 5);\n\n int row = 0;\n\n // input column >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(new JLabel(\"Column to PIA XML file (on port 0)\"), c);\n\n inputColumnBox = new ColumnSelectionComboxBox((Border)null, DataValue.class);\n try {\n inputColumnBox.setColumnFilter(new ColumnFilter() {\n @Override\n public boolean includeColumn(DataColumnSpec colSpec) {\n return colSpec.getType().isCompatible(StringValue.class)\n || colSpec.getType().isCompatible(BinaryObjectDataValue.class);\n }\n\n @Override\n public String allFilteredMsg() {\n return \"No column with needed data found, needs String or BinaryObjectData\";\n }\n });\n } catch (NotConfigurableException e) {\n LOGGER.warn(\"Could not find a compatible column in the input datatable.\");\n }\n\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 1;\n c.weightx = 1.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(inputColumnBox, c);\n // input column <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // fail on no decoys >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkErrorOnNoDecoys = new JCheckBox(\"Fail on no decoys (select, if a decoy database was used for identification)\");\n checkErrorOnNoDecoys.setSelected(PIASettings.ERROR_ON_NO_DECOYS.getDefaultBoolean());\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n generalSettingsPanel.add(checkErrorOnNoDecoys, c);\n // fail on no decoys <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // create PSM sets >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkCreatePSMSets = new JCheckBox(\"Create PSM sets (select, if multiple search engines were used for identification)\");\n checkCreatePSMSets.setSelected(PIASettings.CREATE_PSMSETS.getDefaultBoolean());\n checkCreatePSMSets.addChangeListener(this);\n\n c.gridy = row++;\n generalSettingsPanel.add(checkCreatePSMSets, c);\n // create PSM sets <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // consider modifications >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkConsiderModifications = new JCheckBox(\"consider modifications to distinguish peptides\");\n checkConsiderModifications.setSelected(PIASettings.CONSIDER_MODIFICATIONS.getDefaultBoolean());\n\n c.gridy = row++;\n generalSettingsPanel.add(checkConsiderModifications, c);\n // consider modifications <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // Export settings >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n JPanel exportSettingsPanel = new JPanel(new GridBagLayout());\n exportSettingsPanel.setBorder(BorderFactory.createTitledBorder(\"Export settings\"));\n\n c.gridx = 0;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export level\"), c);\n\n comboExportLevel = new JComboBox<>();\n\n for (ExportLevels lvl : ExportLevels.values()) {\n comboExportLevel.addItem(lvl);\n }\n comboExportLevel.addActionListener(this);\n c.gridx = 1;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportLevel, c);\n\n\n c.gridx = 0;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export format\"), c);\n\n comboExportFormat = new JComboBox<>();\n updateExportAvailables();\n comboExportFormat.addActionListener(this);\n comboExportLevel.setSelectedItem(PIASettings.EXPORT_LEVEL.getDefaultString());\n c.gridx = 1;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportFormat, c);\n\n checkExportFilter = new JCheckBox(\"Filter Export (works only on some formats and levels)\");\n checkExportFilter.setSelected(PIASettings.EXPORT_FILTER.getDefaultBoolean());\n checkExportFilter.addChangeListener(this);\n c.gridx = 0;\n c.gridy = 3;\n c.gridwidth = 2;\n c.weightx = 1.0;\n exportSettingsPanel.add(checkExportFilter, c);\n\n\n c.gridx = 0;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Filename for export:\"), c);\n\n fieldExportFileBasename = new JTextField(PIASettings.EXPORT_FILEBASENAME.getDefaultString(), 10);\n c.gridx = 1;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(fieldExportFileBasename, c);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n c.weightx = 1.0;\n generalSettingsPanel.add(exportSettingsPanel, c);\n // Export settings <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n }",
"static boolean areAllStepsValid(WizardDescriptor descriptor) {\n // first step does not need to be checked, just the 2nd and more\n Boolean isValid = (Boolean) descriptor.getProperty(RunConfigurationPanel.VALID);\n if (isValid != null && !isValid) {\n return false;\n }\n isValid = (Boolean) descriptor.getProperty(PhpFrameworksPanel.VALID);\n if (isValid != null && !isValid) {\n return false;\n }\n @SuppressWarnings(\"unchecked\")\n Map<org.netbeans.modules.php.spi.phpmodule.PhpModuleExtender, Boolean> validity = (Map<org.netbeans.modules.php.spi.phpmodule.PhpModuleExtender, Boolean>) descriptor.getProperty(PhpExtenderPanel.VALID);\n if (validity != null) {\n for (Boolean extenderValid : validity.values()) {\n if (!extenderValid) {\n return false;\n }\n }\n }\n return true;\n }",
"public void testConfigurePanel1() {\n Package packageObject = new PackageImpl();\n List<ModelElement> modelElements = new ArrayList<ModelElement>();\n modelElements.add(packageObject);\n instance.configurePanel(modelElements);\n\n assertEquals(\"Failed to configure the panel.\", 4, ((JPanel) instance.getComponent(0)).getComponentCount());\n assertEquals(\"Failed to configure the panel.\", 1, ((JPanel) instance.getComponent(1)).getComponentCount());\n }",
"public abstract boolean isNetbeansKenaiRegistered();",
"public boolean hasPresentation();",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new TCRWizardPanel1(),\n// new TCRWizardPanel2(),\n new UtilWizardPanel1(),\n new UtilWizardPanel2()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the imageWithChars on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"@ImplementedBy(ModuleInfoPickerTableView.class)\n public interface ModuleInfoPickerView\n extends IsWidget\n {\n void setSelectionModel(SelectionModel<? super MavenProjectDTO> selectionModel);\n\n void setData(ModuleDataProvider mdp);\n }",
"private GuiAdvancedPanel getAdvancedPanel() {\n if (advancedPanel == null) {\n advancedPanel = new GuiAdvancedPanel(this,\n config.ontsToDownload.getValue(),\n config.omitOntsToDownload.getValue(),\n config.buildDir.getValue());\n }\n return advancedPanel;\n }",
"boolean hasProvider();",
"public abstract boolean isEnabled();",
"public abstract boolean isEnabled();",
"@java.lang.Override\n public boolean hasCohortReportSettings() {\n return cohortReportSettings_ != null;\n }",
"public abstract WizardPageConfiguration getConfiguration();",
"@Override\n\tpublic void onModuleLoad() {\n\t\tfinal ModuleList modList = new ModuleList();\n\t\tfinal TabLayoutPanel configTabs = new TabLayoutPanel(2, Unit.EM);\n\n\t\t// Creates the module map.\n\t\t//final ModuleMap modMap = new ModuleMap(modList);\n\n\t\t// Creates the weather feed.\n\t\tfinal Weather weather = new Weather();\n\n\t\t// Creates configuration map.\n\t\tfinal ModuleConfiguration fullConfig = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration fullConfig2 = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration min1Config = new ModuleConfiguration();\n\t\tfinal ModuleConfiguration min2Config = new ModuleConfiguration();\n\t\tmin1Config.setMinimumConfigOne(modList);\n\t\tmin2Config.setMinimumConfigTwo(modList);\n\n\t\t// GPS Data object.\n\t\t//final GPSDataTransfer dataTransfer = new GPSDataTransfer(modList);\n\n\t\t// Creates the root panel and sizes it.\n\t\tRootPanel.get().setSize(this.width, this.height);\n\n\t\t// Command to show login.\n\t\tCommand loginCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal Login login = new Login();\n\t\t\t\tlogin.show();\n\t\t\t}\n\t\t};\n\n\n\t\t// Command to show the add module popup.\n\t\tCommand addModulePopupCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal AddModulePopup popup = new AddModulePopup(modList, BUS);\n\t\t\t\tpopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tpopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\t//Command to show the GPS Data Transfer popup.\n\t\tCommand gpsDataPopupCmd = new Command() {\n\t\t\tpublic void execute(){\n\t\t\t\tfinal GPSDataPopup gpsPopup = new GPSDataPopup(modList, BUS);\n\t\t\t\t\tgpsPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tgpsPopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command to calculate full configurations and add to new tabs.\n\t\tCommand configurationCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tCoordinates center = fullConfig.findBestCenterOfGravity(modList, ModuleConfiguration.FOUR);\n\t\t\t\tCoordinates center2 = fullConfig2.findBestCenterOfGravity(modList, ModuleConfiguration.THREE);\n\t\t\t\t\n\t\t\t\tif (fullConfig.calculateConfiguration(modList, center.getX(), center.getY(), ModuleConfiguration.FOUR)) {\n\t\t\t\t\tfullConfig2.calculateConfiguration(modList, center2.getX(), center2.getY(), ModuleConfiguration.THREE);\n\t\t\t\t\tMarsHabitatConfigurationSystem.successSound.play();\t\n\t\t\t\t\t\n\t\t\t\t\tconfigTabs.clear();\n\t\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig2), FULL_CONFIG2);\n\t\t\t\t\tconfigTabs.selectTab(FULL_INDEX);\n\t\t\t\t\t\n\t\t\t\t\tWindow.alert(\"Full Configuration Available!\");\n\t\t\t\t} else {\n\t\t\t\t\tMarsHabitatConfigurationSystem.errorSound.play();\n\t\t\t\t\tWindow.alert(\"Full Configuration not Available!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command for clearing the module list and configurations\n\t\tCommand clearCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tmodList.clearList();\n\t\t\t\tfullConfig.clearConfig();\n\t\t\t\t\n\t\t\t\tconfigTabs.clear();\n\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\tconfigTabs.selectTab(0);\n\t\t\t\tMINIMUM_CONFIG_REACHED = false;\n\t\t\t}\n\t\t};\n\n\t\t// Command for saving the full configuration.\n\t\tCommand saveConfigCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (configTabs.getSelectedIndex() == FULL_INDEX) {\n\t\t\t\t\tif (fullConfig.saveConfiguration(FULL_CONFIG)) {\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Full Configuration Saved!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorSound.play();\n\t\t\t\t\t\tWindow.alert(\"No Full Configuration Exists!\");\n\t\t\t\t\t}\n\t\t\t\t} else if (configTabs.getSelectedIndex() == FULL_INDEX + 1) {\n\t\t\t\t\tif (fullConfig2.saveConfiguration(FULL_CONFIG)) {\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Full Configuration Saved!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorSound.play();\n\t\t\t\t\t\tWindow.alert(\"No Full Configuration Exists!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Command for loading the full configuration.\n\t\tCommand loadConfigCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tif (fullConfig.loadConfiguration(FULL_CONFIG)) {\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\tWindow.alert(\"Full Configuration loaded!\");\n\t\t\t\t} else {\n\t\t\t\t\terrorSound.play();\n\t\t\t\t\tWindow.alert(\"No full configuration found in storage!\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Command for GPS data transfer.\n//\t\tCommand gpsDataCmd = new Command() {\n//\t\t\tpublic void execute() {\n//\t\t\t\tdataTransfer.getData();\n//\t\t\t\tBUS.fireEvent(new AddEvent());\n//\t\t\t}\n//\t\t};\n\t\t\n\t\t// Command for changing the center of gravity.\n\t\tCommand gravityCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tgravityPopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tgravityPopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Command for getting the size of moving task.\n\t\tCommand movingTaskCmd = new Command() {\n\t\t\tpublic void execute() {\n\t\t\t\tfinal MovingTaskPopup popup = new MovingTaskPopup(\n\t\t\t\t\t\tmodList.getSizeOfMovingTask(fullConfig.getCenterColumn(), fullConfig.getCenterRow()));\n\t\t\t\tpopup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tpopup.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\t// Creates the menu for the menu bar.\n\t\tMenuBar theMenu = new MenuBar(true);\n\t\ttheMenu.setAnimationEnabled(true);\n\t\ttheMenu.addItem(\"Add Module\", addModulePopupCmd);\n\t\ttheMenu.addItem(\"GPS Data Transfer\", gpsDataPopupCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Calculate Full Configuration\", configurationCmd);\n\t\ttheMenu.addItem(\"Change Center of Gravity\", gravityCmd);\n\t\ttheMenu.addItem(\"Save Full Configuration\", saveConfigCmd);\n\t\ttheMenu.addItem(\"Load Full Configuration\", loadConfigCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Size of Moving Task\", movingTaskCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Clear Modules and Configuration\", clearCmd);\n\t\ttheMenu.addSeparator();\n\t\ttheMenu.addItem(\"Log off\", loginCmd);\n\n\t\t// Creates the menu bar and adds the menu to itself.\n\t\tMenuBar menu = new MenuBar();\n\t\tmenu.setAnimationEnabled(true);\n\t\tmenu.addItem(\"Menu\", theMenu);\n\t\tmenu.setWidth(this.width);\n\n\t\t// Creates the tabs for the various configurations and module map.\n\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\tconfigTabs.setHeight(this.height);\n\t\tconfigTabs.setWidth(this.width);\n\n\t\t// Adds everything to the root panel.\n\t\tRootPanel.get().add(menu);\n\t\tRootPanel.get().add(weather);\n\t\tRootPanel.get().add(configTabs);\n\n\t\t// Show login after module has loaded.\n\t\tfinal Login initialLogin = new Login();\n\t\tinitialLogin.show();\n\n\t\t// Start timer to show initial 10 day alert.\n\t\tTimer t = new Timer() {\n\t\t\tpublic void run() {\n\t\t\t\tfinal TenDayAlert initialTenDayAlert = new TenDayAlert();\n\t\t\t\tinitialTenDayAlert.setPopupPositionAndShow(new PopupPanel.PositionCallback() {\n\t\t\t\t\tpublic void setPosition(final int offsetWidth, final int offsetHeight) {\n\t\t\t\t\t\tint left = (Window.getClientWidth() - offsetWidth) / MAGIC_NUMBER;\n\t\t\t\t\t\tint top = (Window.getClientHeight() - offsetHeight) / MAGIC_NUMBER;\n\t\t\t\t\t\tinitialTenDayAlert.setPopupPosition(left, top);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tpopSound.play();\n\t\t\t}\n\t\t};\n\n\t\tt.schedule(ALERT_TIME);\n\n\t\t// Set handler for EventBus when new modules are added.\n\t\tBUS.addHandler(AddEvent.TYPE, new AddEventHandler() {\n\t\t\tpublic void onEvent(final AddEvent event) {\n\n\t\t\t\t// \"Refreshes\" the module map by removing and re-adding the tab\n\t\t\t\tconfigTabs.clear();\n\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\tMINIMUM_CONFIG_REACHED = false;\n\t\t\t\t\n\t\t\t\t// Checks to see if requirements are met for the minimum configuration.\n\t\t\t\t// If they are met, the minimum configuration tabs are created and an alert is issued.\n\t\t\t\tif (!MINIMUM_CONFIG_REACHED) {\n\t\t\t\t\tif (modList.getNumOfAirlock() > 0 && modList.getNumOfCanteen() > 0 && modList.getNumOfControl() > 0 &&\n\t\t\t\t\t\t\tmodList.getNumOfDormitory() > 0 && modList.getNumOfPlain() > 2 && modList.getNumOfPower() > 0 &&\n\t\t\t\t\t\t\tmodList.getNumOfSanitation() > 0 && modList.getNumOfWater() > 0) {\n\t\t\t\t\t\tMINIMUM_CONFIG_REACHED = true;\n\n\t\t\t\t\t\tmin1Config.setMinimumConfigOne(modList);\n\t\t\t\t\t\tmin2Config.setMinimumConfigTwo(modList);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Adds minimum configuration one to the tab.\n\t\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\t\tconfigTabs.selectTab(MIN1_INDEX);\n\n\t\t\t\t\t\t// Adds minimum configuration two to the tab.\n\t\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsuccessSound.play();\n\t\t\t\t\t\tWindow.alert(\"Minimum Configurations Available!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Set handler for when the center of gravity is changed.\n\t\tBUS.addHandler(GravityEvent.TYPE, new GravityEventHandler() {\n\t\t\tpublic void onEvent(final GravityEvent event) {\n\t\t\t\tModuleConfiguration newFullConfig = new ModuleConfiguration();\n\t\t\t\tint wings;\n\t\t\t\t\n\t\t\t\tif (configTabs.getSelectedIndex() == FULL_INDEX) {\n\t\t\t\t\twings = ModuleConfiguration.FOUR;\n\t\t\t\t} else {\n\t\t\t\t\twings = ModuleConfiguration.THREE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// If the center of gravity can be changed to specified coordinates.\n\t\t\t\tif (newFullConfig.calculateConfiguration(modList, event.xcoord, event.ycoord, wings)) {\n\t\t\t\t\tMarsHabitatConfigurationSystem.successSound.play();\t\n\t\t\t\t\tgravityPopup.hide();\n\t\t\t\t\t\n\t\t\t\t\tif (wings == ModuleConfiguration.FOUR) {\n\t\t\t\t\t\tfullConfig.calculateConfiguration(modList, event.xcoord, event.ycoord, wings);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfullConfig2.calculateConfiguration(modList, event.xcoord, event.ycoord, wings);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconfigTabs.clear();\n\t\t\t\t\tconfigTabs.add(new ModuleMap(modList), MODULE_MAP_STRING);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig), FULL_CONFIG);\n\t\t\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(fullConfig2), FULL_CONFIG2);\n\t\t\t\t\tconfigTabs.selectTab(FULL_INDEX);\n\t\t\t\t\t\n\t\t\t\t\tWindow.alert(\"Center of Gravity Changed!\");\n\t\t\t\t} else {\n\t\t\t\t\tMarsHabitatConfigurationSystem.errorSound.play();\n\t\t\t\t\tWindow.alert(\"Configuration can not move to that location!\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Checks for minimum configs on load.\n\t\tif (modList.getNumOfAirlock() > 0 && modList.getNumOfCanteen() > 0 && modList.getNumOfControl() > 0 &&\n\t\t\t\tmodList.getNumOfDormitory() > 0 && modList.getNumOfPlain() > 2 && modList.getNumOfPower() > 0 &&\n\t\t\t\tmodList.getNumOfSanitation() > 0 && modList.getNumOfWater() > 0) {\n\t\t\tMINIMUM_CONFIG_REACHED = true;\n\n\t\t\t// Adds minimum configuration one to the tab.\n\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min1Config), MIN1_CONFIG);\n\n\t\t\t// Adds minimum configuration two to the tab.\n\t\t\tconfigTabs.add(ConfigurationMap.getConfigurationGrid(min2Config), MIN2_CONFIG);\n\t\t}\n\n\t\tRootPanel.get().addStyleName(\"rootPanel\");\n\t}",
"private JPanel getSeeInspectionReportPanel() {\n if (seeInspectionReportPanel == null) {\n seeInspectionReportPanel = new SeeInspectionReportPanel();\n //seeInspectionReportPanel.setLayout(null);\n }\n return seeInspectionReportPanel;\n }",
"public boolean isStoreIBEligibilityInd() {\n return storeIBEligibilityInd;\n }",
"public interface SettingsProvider {\n /**\n * Enable the background data option to fetch daily deviations periodically.\n */\n void enableBackgroundData();\n\n /**\n * Disable the background data option to fetch daily deviations periodically.\n */\n void disableBackgroundDate();\n\n /**\n * Determine whether background data is enabled.\n * @return true if background data is enabled.\n */\n boolean isBackgroundDataEnabled();\n\n /**\n * Enable the local notification system used to notify users when there is new data.\n */\n void enableNotifications();\n\n /**\n * Disable the local notification system used to notify users when there is new data.\n */\n void disableNotifications();\n\n /**\n * Determine whether local notifications are enabled.\n * @return true if local notifications are enabled - note this will be overridden by\n * the Android system settings regarding notifications for the app.\n */\n boolean isNotificationsEnabled();\n\n /**\n * Enable the automatic header image selection when the app starts up - where an\n * image is chosen at random from the content provider and displayed in the nav menu.\n */\n void enableAutomaticHeaderImage();\n\n /**\n * Disable the automatic header image selection on app start.\n */\n void disableAutomaticHeaderImage();\n\n /**\n * Determine whether the automatic header image is enabled.\n * @return true if automatic header images is enabled.\n */\n boolean isAutomaticHeaderImageEnabled();\n}",
"public void setPanelConfiguration(){\n\t\tthis.panelConfiguration.setStructurePanel();\n\t\tthis.panelConfiguration.setPanelConfiguration();\n\t}",
"public boolean isBrowseShown()\r\n\t{\r\n\t\treturn ((this.pageBackingBean.getCurrentUser() != null) || (this.settingEjb\r\n\t\t .getBooleanSettingByName(Constants.SETTING_SEARCH_ALLOW_NON_USERS)))\r\n\t\t && !(this.settingEjb.getBooleanSettingByName(Constants.SETTING_SEARCH_INDEXING_COMMENCED));\r\n\t}",
"public boolean contains() {\n return (Bukkit.getServer().getPluginManager().getPlugin(this.name) != null);\n }",
"@Override\r\n\tpublic boolean supports(Class<?> clazz) {\n\t\treturn AdminUserEditForm.class.isAssignableFrom(clazz);\r\n\t}",
"public void onModuleLoad() {\n\t\t//create our main panel\n\t\tfinal DeckPanel panels = new DeckPanel(); \n\t\tRootPanel.get(\"panel\").add(panels);\n\t\t//create our stage panels\n\t\tfinal LoginPanel login = new LoginPanel(panels,wwwordzService);\n\t\tfinal GamePanel game = new GamePanel(panels,wwwordzService); \n\t\tfinal RankingPanel ranking = new RankingPanel(panels,wwwordzService);\n\t\t//add stage panels to main panel\n\t\tpanels.add(login);\n\t\tpanels.add(game);\n\t\tpanels.add(ranking);\n\t\tpanels.showWidget(0);\n\t\t\n\n\t}",
"private static boolean isInspectionColorsPage(ColorAndFontDescriptorsProvider provider) {\n if (!(provider instanceof InspectionColorSettingsPage)) return false;\n for(ColorSettingsPage settingsPage: ColorSettingsPage.EP_NAME.getExtensionList()) {\n if (settingsPage == provider) break;\n if (settingsPage instanceof InspectionColorSettingsPage) return false;\n }\n return true;\n }",
"boolean hasLoginPack();",
"public PanelConfiguration getPanelConfiguration() {\n\t\treturn panelConfiguration;\n\t}",
"public boolean supports (String moduleUri);",
"public boolean isShowGrid()\n {\n return showGrid;\n }",
"@Override\n public boolean getDeclarativelyConfigured() {\n return declarativelyConfigured_;\n }",
"public JPanel getJPanel2() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tjLabel21111 = new JLabel();\r\n\t\t\tjLabel21111.setBounds(new Rectangle(30, 255, 139, 16));\r\n\t\t\tjLabel21111.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel21111.setText(\"Max. # biclusters\");\r\n\t\t\tjLabel21111.setEnabled(false);\r\n\t\t\tjLabel2111 = new JLabel();\r\n\t\t\tjLabel2111.setBounds(new Rectangle(30, 235, 140, 16));\r\n\t\t\tjLabel2111.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel2111.setText(\"Max. # conditions\");\r\n\t\t\tjLabel2111.setEnabled(false);\r\n\t\t\tjLabel211 = new JLabel();\r\n\t\t\tjLabel211.setBounds(new Rectangle(30, 215, 132, 16));\r\n\t\t\tjLabel211.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel211.setText(\"Max. # genes\");\r\n\t\t\tjLabel211.setEnabled(false);\r\n\t\t\tjLabel21 = new JLabel();\r\n\t\t\tjLabel21.setBounds(new Rectangle(30, 195, 141, 16));\r\n\t\t\tjLabel21.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel21.setText(\"Max. % of overlap\");\r\n\t\t\tjLabel21.setEnabled(false);\r\n\t\t\tjLabel3111 = new JLabel();\r\n\t\t\tjLabel3111.setBounds(new Rectangle(9, 135, 173, 18));\r\n\t\t\tjLabel3111.setText(\"Max. # of biclusters to find\");\r\n\t\t\tjLabel3111.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel311 = new JLabel();\r\n\t\t\tjLabel311.setBounds(new Rectangle(9, 114, 175, 16));\r\n\t\t\tjLabel311.setText(\"Scaling factor for columns\");\r\n\t\t\tjLabel311.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel31 = new JLabel();\r\n\t\t\tjLabel31.setBounds(new Rectangle(10, 93, 169, 16));\r\n\t\t\tjLabel31.setText(\"Sample size in repetitions\");\r\n\t\t\tjLabel31.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setText(\"Number of repetitions\");\r\n\t\t\tjLabel3.setBounds(new Rectangle(9, 70, 164, 16));\r\n\t\t\tjLabel3.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel1 = new JLabel();\r\n\t\t\tjLabel1.setText(\"Number of rows\");\r\n\t\t\tjLabel1.setToolTipText(\"As above, with columns\");\r\n\t\t\tjLabel1.setBounds(new Rectangle(9, 51, 140, 16));\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setText(\"Number of discrete levels\");\r\n\t\t\tjLabel.setToolTipText(\"Scalar in [0,1] (recommended [0.5-0.7]) used as threshold to select rows based on row homogeneity\");\r\n\t\t\tjLabel.setBounds(new Rectangle(10, 13, 173, 16));\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.setSize(new Dimension(241, 413));\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(jLabel1, null);\r\n\t\t\tjPanel.add(jLabel3, null);\r\n\t\t\tjPanel.add(getJTextField22(), null);\r\n\t\t\tjPanel.add(getJTextField221(), null);\r\n\t\t\tjPanel.add(getJCheckBox(), null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getJCheckBox1(), null);\r\n\t\t\tjPanel.add(getJTextField212(), null);\r\n\t\t\tjPanel.add(getJButton1(), null);\r\n\t\t\tjPanel.add(jLabel31, null);\r\n\t\t\tjPanel.add(jLabel311, null);\r\n\t\t\tjPanel.add(jLabel3111, null);\r\n\t\t\tjPanel.add(getJTextField222(), null);\r\n\t\t\tjPanel.add(getJTextField2221(), null);\r\n\t\t\tjPanel.add(getJTextField2222(), null);\r\n\t\t\tjPanel.add(getJTextField2223(), null);\r\n\t\t\tjPanel.add(getJCheckBox2(), null);\r\n\t\t\tjPanel.add(getJCheckBox3(), null);\r\n\t\t\tjPanel.add(jLabel21, null);\r\n\t\t\tjPanel.add(jLabel211, null);\r\n\t\t\tjPanel.add(jLabel2111, null);\r\n\t\t\tjPanel.add(jLabel21111, null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField22111(), null);\r\n\t\t\tjPanel.add(getJTextField221111(), null);\r\n\t\t\tjPanel.add(getJTextField2211111(), null);\r\n\t\t\tjPanel.add(getJTextField22111111(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(jCheckBox3, null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"private void setupPanels() {\n for (String className : PANEL_CLASS_NAMES) {\n try {\n Class<?> c = Class.forName(className);\n Object p = c.newInstance();\n VisualizationPanel panel = (VisualizationPanel) p;\n panel.setGcTraceSet(gcTraceSet);\n gcTraceSet.addListener(panel.getListener());\n panels.add(panel);\n tabbedPane.addTab(panel.getPanelName(), panel.getPanel());\n } catch (ClassNotFoundException e) {\n ErrorReporting.warning(className + \" not found\");\n } catch (InstantiationException e) {\n ErrorReporting.warning(\"could not instantiate \" + className);\n } catch (IllegalAccessException e) {\n ErrorReporting.warning(\"could not access constructor of \" + className);\n } catch (ClassCastException e) {\n ErrorReporting.warning(\"could not cast \" + className + \" to VisualizationPanel\");\n }\n }\n ErrorReporting.fatalError(panels.size() > TRACE_MANAGEMENT_PANEL_INDEX,\n \"There must be at least one panel set up, \" +\n \"the trace management panel.\");\n try {\n traceManagementPanel =\n (TraceManagementPanel) panels.get(TRACE_MANAGEMENT_PANEL_INDEX);\n } catch (ClassCastException e) {\n ErrorReporting.fatalError(\"could not cast panel with index \" +\n TRACE_MANAGEMENT_PANEL_INDEX + \" to TraceManagementPanel\");\n }\n ErrorReporting.fatalError(traceManagementPanel != null,\n \"The trace management panel should not be null\");\n }",
"public interface GridPanelFactory {\r\n /**\r\n * Creates an instance of the grid panel and initializes it.\r\n *\r\n * @param model is a model instance.\r\n * @return a newly created grid panel.\r\n */\r\n GridPanel create(GridDataModel model);\r\n\r\n /**\r\n * This method creates a data model.<p>\r\n * It's used by the hiearachical grid if there is no data model defined for the cell \r\n * in the parent data model.\r\n *\r\n * @param parentRow is a parent model row.\r\n * @param parentModel is a parent model instance.\r\n * \r\n * @return a data model.\r\n */\r\n GridDataModel create(int parentRow, GridDataModel parentModel);\r\n}",
"private JPanel getPanelSession() {\n if (panelContext == null) {\n panelContext = new JPanel();\n panelContext.setLayout(new GridBagLayout());\n\n if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption()\n == 0) {\n panelContext.setSize(180, 101);\n }\n\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.name\")),\n LayoutHelper.getGBC(0, 0, 1, 1.0D));\n panelContext.add(getTxtName(), LayoutHelper.getGBC(0, 1, 1, 1.0D));\n panelContext.add(getChkInScope(), LayoutHelper.getGBC(0, 2, 2, 1.0D));\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.desc\")),\n LayoutHelper.getGBC(0, 3, 1, 1.0D));\n panelContext.add(getTxtDescription(), LayoutHelper.getGBC(0, 4, 1, 1.0D, 1.0D));\n }\n return panelContext;\n }",
"boolean hasBiddingStrategy();",
"@Override\n public boolean getDeclarativelyConfigured() {\n return declarativelyConfigured_;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }",
"public interface ITabPanel \n{\n /** Update is required because the board or data has changed. */\n public final static int REQUIRED_UPDATE = 1;\n \n /** Update is suggested by the refresh. */\n public final static int REFRESH_UPDATE = 2;\n \n /**\n * Used to initialize the ITabPanel and give it a refrence to the main panel. \n * @param mainPanel The MainPanel.\n */\n public void init(MainPanel mainPanel);\n \n /**\n * Method that can be called by the main panel to update this panel.\n * @param updateType The type of update.\n */\n public void update(int updateType);\n \n /**\n * Method that can be called to disable or enable the board.\n * @param b Boolean value used to determine to enable (true) or\n * disable (false).\n */\n public void enablePanel(boolean b);\n}",
"public boolean isMasterDetailFlow();",
"public boolean hasRegistry() {\n return registry_ != null;\n }",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();"
] | [
"0.6661171",
"0.6336064",
"0.60922885",
"0.56839633",
"0.562231",
"0.55348456",
"0.5492083",
"0.51601744",
"0.51492155",
"0.5041124",
"0.5034224",
"0.5015344",
"0.49727216",
"0.4948723",
"0.4927582",
"0.49242643",
"0.49172634",
"0.48823768",
"0.486468",
"0.4854905",
"0.48403984",
"0.48192412",
"0.48004335",
"0.47832814",
"0.47832814",
"0.47546983",
"0.47430277",
"0.47239342",
"0.4707926",
"0.47002226",
"0.46816123",
"0.4676987",
"0.46634692",
"0.4659082",
"0.4644046",
"0.46397656",
"0.46347827",
"0.4630786",
"0.46205074",
"0.45965666",
"0.45847347",
"0.45847347",
"0.45847347",
"0.4569984",
"0.45655146",
"0.45652208",
"0.4563976",
"0.4561824",
"0.45540002",
"0.4552261",
"0.45511305",
"0.45503932",
"0.45478645",
"0.4540987",
"0.45392144",
"0.45316964",
"0.45201892",
"0.45127425",
"0.45076498",
"0.45048773",
"0.45014215",
"0.44992074",
"0.44941336",
"0.44937825",
"0.44928014",
"0.44920656",
"0.44902697",
"0.44902697",
"0.44861835",
"0.44845256",
"0.44823438",
"0.44686362",
"0.4465192",
"0.44635606",
"0.44594473",
"0.44579872",
"0.4453111",
"0.4435755",
"0.44355318",
"0.44327974",
"0.44315484",
"0.44250602",
"0.44248116",
"0.44122866",
"0.44121152",
"0.4402316",
"0.43920857",
"0.43912205",
"0.43834338",
"0.43829077",
"0.43807304",
"0.43783918",
"0.43771893",
"0.4373042",
"0.43717316",
"0.43700367",
"0.43700367",
"0.43700367",
"0.43700367",
"0.43700367"
] | 0.67298925 | 0 |
Gets a user interface panel that can be used to set per ingest job settings for instances of the family of ingest modules the factory creates. For example, the core hash lookup ingest module factory provides an ingest job settings panel to enable or disable hash databases per ingest job. If the module family does not have per ingest job settings, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"public JPanel getSettingsPanel() {\n\t\t//edgeAttributeHandler.updateAttributeList();\n\t\t// Everytime we ask for the panel, we want to update our attributes\n\t\tTunable attributeTunable = clusterProperties.get(\"attributeList\");\n\t\tattributeArray = getAllAttributes();\n\t\tattributeTunable.setLowerBound((Object)attributeArray);\n\n\t\treturn clusterProperties.getTunablePanel();\n\t}",
"public Component getConfigFormPanel()\n {\n if (configFormPanel == null)\n {\n Object form = configForm.getForm();\n if ((form instanceof Component) == false)\n {\n throw new ClassCastException(\"ConfigurationFrame :\"\n + form.getClass()\n + \" is not a class supported by this ui implementation\");\n }\n configFormPanel = (Component) form;\n }\n return configFormPanel;\n }",
"public AppPanel getPanel()\n\t\t{\n\t\t\treturn panel;\n\t\t}",
"public JPanel getPanel() {\n //throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n return jPanel1;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel28() {\n return build_f_Panel28();\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel16() {\n return build_f_Panel16();\n }",
"private Component getPanelAgentes() {\n\t\tFile fich = new File(FICH_CONFAGENTES);\n\t\tPanelConfigAgentes panel = new PanelConfigAgentes(fich, this);\n\t\treturn panel;\n\t}",
"public JPanel getPanel() {\n RepositoryPanel repositoryPanel = (RepositoryPanel) repositoryStep.getComponent();\n return repositoryPanel;\n }",
"private JPanel getUserManagerButtonPanel() {\n if (userManagerButtonPanel == null) {\n userManagerButtonPanel = new JPanel();\n userManagerButtonPanel.add(getAddButton(), null);\n userManagerButtonPanel.add(getRemoveButton(), null);\n }\n return userManagerButtonPanel;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel48() {\n return build_f_Panel48();\n }",
"private GuiAdvancedPanel getAdvancedPanel() {\n if (advancedPanel == null) {\n advancedPanel = new GuiAdvancedPanel(this,\n config.ontsToDownload.getValue(),\n config.omitOntsToDownload.getValue(),\n config.buildDir.getValue());\n }\n return advancedPanel;\n }",
"public static SettingsPanel getSettingsPanel() {\n\t\treturn ((dataProvider == null) ? null : new AmpSettingsPanel());\n\t}",
"public final Panel getPanel()\r\n\t{\r\n\t\treturn panel;\r\n\t}",
"protected JPanel getPanel() {\n\t\treturn (JPanel) window.getContentPane();\n\t}",
"boolean hasIngestJobSettingsPanel();",
"public LauncherPanel getLauncherPanel(){\n return this.launcherPanel;\n }",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tmaxLabel = new JLabel();\r\n\t\t\tinfLabel = new JLabel();\r\n\t\t\tminLabel = new JLabel();\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tString min = \"0.0 <=\";\r\n\t\t\tString max = \"<= 1.0\";\r\n\t\t\tif (mode == RULES_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxSupport();\r\n\t\t\t} else if (mode == RULES_BASIS_CONFIDENCE_MODE) {\r\n\t\t\t\tmin = rulesBasis.getMinConfidence() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + rulesBasis.getMaxConfidence();\r\n\t\t\t} else if (mode == INTENTS_BASIS_SUPPORT_MODE) {\r\n\t\t\t\tmin = intentsBasis.getMinSupport() + \" <=\";\r\n\t\t\t\tmax = \"<= \" + intentsBasis.getMaxSupport();\r\n\t\t\t}\r\n\t\t\tminLabel.setText(min);\r\n\t\t\tinfLabel.setText(\"<=\");\r\n\t\t\tmaxLabel.setText(max);\r\n\t\t\tjPanel.add(minLabel, null);\r\n\t\t\tjPanel.add(getMinTextField(), null);\r\n\t\t\tjPanel.add(infLabel, null);\r\n\t\t\tjPanel.add(getMaxTextField(), null);\r\n\t\t\tjPanel.add(maxLabel, null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel75() {\n return build_f_Panel75();\n }",
"public PanelConfiguration getPanelConfiguration() {\n\t\treturn panelConfiguration;\n\t}",
"public GamePanel getGamePanel() {\r\n return gamePanel;\r\n }",
"public JPanel getJPanel() {\r\n\t\treturn jPanel;\r\n\t}",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Panel getUI() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic JPanel getPanel()\n\t{\n\t\treturn panel;\n\t}",
"public EditPanel getEditPanel() { return ep; }",
"public JPanel getPanel() {\n return panel;\n }",
"public PanelDisplayProject getDisplayProject(){\n return displayProject;\n }",
"JPanel getPanel();",
"public GamePanel getGamePanel() {\n\t\treturn gamePanel;\n\t}",
"public SensorPanelPresenter getPanel(){\n return this.panel;\n }",
"public JPanel getPanel()\n {\n return panel;\n }",
"public static JPanel getFormsPanelInstance(){\n return formsPanel;\n }",
"private JPanel getPanelSession() {\n if (panelContext == null) {\n panelContext = new JPanel();\n panelContext.setLayout(new GridBagLayout());\n\n if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption()\n == 0) {\n panelContext.setSize(180, 101);\n }\n\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.name\")),\n LayoutHelper.getGBC(0, 0, 1, 1.0D));\n panelContext.add(getTxtName(), LayoutHelper.getGBC(0, 1, 1, 1.0D));\n panelContext.add(getChkInScope(), LayoutHelper.getGBC(0, 2, 2, 1.0D));\n panelContext.add(\n new JLabel(Constant.messages.getString(\"context.label.desc\")),\n LayoutHelper.getGBC(0, 3, 1, 1.0D));\n panelContext.add(getTxtDescription(), LayoutHelper.getGBC(0, 4, 1, 1.0D, 1.0D));\n }\n return panelContext;\n }",
"@Override\n public GeneralOrthoMclSettingsVisualPanel getComponent() {\n if (component == null) {\n component = new GeneralOrthoMclSettingsVisualPanel();\n\n }\n return component;\n }",
"public JPanel getJPanel();",
"public JPanel getJPanel();",
"public JFXPanel getPanel()\n {\n return panel;\n }",
"public JPanel GetPanel() {\n\t\treturn JPprincipal;\n\t}",
"private JPanel getJPanelConfig() {\r\n\t\tif (jPanelConfig == null) {\r\n\t\t\tjLabel8 = new JLabel();\r\n\t\t\tjLabel8.setBounds(new Rectangle(195, 50, 55, 23));\r\n\t\t\tjLabel8.setText(\"字符集:\");\r\n\t\t\tjLabel5 = new JLabel();\r\n\t\t\tjLabel5.setText(\"数据库类型:\");\r\n\t\t\tjLabel5.setBounds(new Rectangle(458, 36, 80, 23));\r\n\t\t\tjLabel4 = new JLabel();\r\n\t\t\tjLabel4.setBounds(new Rectangle(10, 82, 52, 23));\r\n\t\t\tjLabel4.setText(\"密码:\");\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setBounds(new Rectangle(10, 50, 59, 23));\r\n\t\t\tjLabel3.setText(\"用户名:\");\r\n\t\t\tjLabel2 = new JLabel();\r\n\t\t\tjLabel2.setBounds(new Rectangle(10, 18, 80, 23));\r\n\t\t\tjLabel2.setText(\"数据库链接:\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new Rectangle(10, 115, 59, 23));\r\n\t\t\tjLabel.setText(\"导入表:\");\r\n\t\t\tjPanelConfig = new JPanel();\r\n\t\t\tjPanelConfig.setLayout(null);\r\n\t\t\tjPanelConfig.setBorder(BorderFactory.createTitledBorder(null, \" 入库配置 \"));\r\n\t\t\tjPanelConfig.setBounds(new Rectangle(7, 253, 652, 260));\r\n\t\t\tjPanelConfig.add(getJScrollPaneDbTable(), null);\r\n\t\t\tjPanelConfig.add(jLabel, null);\r\n\t\t\tjPanelConfig.add(jLabel2, null);\r\n\t\t\tjPanelConfig.add(jLabel3, null);\r\n\t\t\tjPanelConfig.add(jLabel4, null);\r\n\t\t\tjPanelConfig.add(getJTextFieldUser(), null);\r\n\t\t\tjPanelConfig.add(getJTextFieldPasswd(), null);\r\n\t\t\tjPanelConfig.add(getJComboBoxConStr(), null);\r\n\t\t\tjPanelConfig.add(getJButtonConnect(), null);\r\n\t\t\tjPanelConfig.add(getJScrollPaneTables(), null);\r\n\t\t\tjPanelConfig.add(getJButtonDiscnnt(), null);\r\n\t\t\tjPanelConfig.add(jLabel8, null);\r\n\t\t\tjPanelConfig.add(getJTextFieldDbCharset(), null);\r\n\t\t}\r\n\t\treturn jPanelConfig;\r\n\t}",
"protected WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new ProjectImportWizardPanel1()\n };\n String[] steps = new String[panels.length];\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n // Default step name to component name of panel. Mainly useful\n // for getting the name of the target chooser to appear in the\n // list of steps.\n steps[i] = c.getName();\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.FALSE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"private JPanel getSeeInspectionReportPanel() {\n if (seeInspectionReportPanel == null) {\n seeInspectionReportPanel = new SeeInspectionReportPanel();\n //seeInspectionReportPanel.setLayout(null);\n }\n return seeInspectionReportPanel;\n }",
"public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel38() {\n return build_f_Panel38();\n }",
"private WizardDescriptor.Panel[] getPanels() {\n Project project = Templates.getProject(wizard);\n File f1 = new File(\"src\");\n \n // Templates.setTargetFolder(wizard);\n\n Sources sources = project.getLookup().lookup(Sources.class);\n SourceGroup[] sg = sources.getSourceGroups(Sources.TYPE_GENERIC);\n \n if (panels == null) {\n targetChooserPanel = \n Templates.createSimpleTargetChooser(project, sg);\n panels = new WizardDescriptor.Panel[]{\n targetChooserPanel\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", Integer.valueOf(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"public String getPanelName()\n {\n return this.panelName;\n }",
"public SelectModulesPane getSelectModulesPane() {\n\t\treturn sm;\n\t}",
"private FactoryViewPanel buildAdvancedPanel()\r\n {\r\n FactoryViewPanel panel = new FactoryViewPanel();\r\n if (myIsImport)\r\n {\r\n addField(panel, myDataSourceModel.getIncludeInTimeline());\r\n }\r\n JPanel refreshPanel = buildRefreshPanel();\r\n panel.addLabelComponent(ControllerFactory.createLabel(myDataSourceModel.getAutoRefresh(), refreshPanel.getComponent(0)),\r\n refreshPanel);\r\n addField(panel, myDataSourceModel.getPointType());\r\n addField(panel, myDataSourceModel.getFeatureAltitude());\r\n addField(panel, myDataSourceModel.getPolygonFill());\r\n addField(panel, myDataSourceModel.getScalingMethod());\r\n addField(panel, myDataSourceModel.getShowLabels());\r\n return panel;\r\n }",
"public JPanel getPanel(){\n return panel;\n }",
"public ListPanel getListPanel() {\n\t\treturn listPanel;\n\t}",
"private Component getPanelOpcionesSuperior() {\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tArrayList<String> ops = new ArrayList<String>();\n\t\tops.add(\" Numero de empresas\");\n\t\tops.add(\"Tiempo de fluctuacion\");\n\t\tops.add(\"Fichero de empresas\");\n\t\tops.add(\"Fichero de usuarios\");\n\t\tops.add(\"Tick\");\n\t\t//ops.add(\"Sesión continua\");\n\n\t\tArrayList<String> chooser = new ArrayList<String>();\n\t\tchooser.add(\"Fichero de empresas\");\n\t\tchooser.add(\"Fichero de usuarios\");\n\n\t\topciones = new PanelOpciones(ops, null, chooser);\n\t\t//opciones.setCheckBox(\"Sesión continua\");\n\n\t\tpanel.add(opciones, BorderLayout.NORTH);\n\t\tJPanel panelBlanco = new JPanel();\n\t\tpanelBlanco.setPreferredSize(new Dimension(350, 300));\n\t\tpanel.add(panelBlanco);\n\n\t\treturn panel;\n\t}",
"public MenuPanel getMenuPanel() {return menuPanel;}",
"org.parosproxy.paros.view.WorkbenchPanel getWorkbench() {\r\n\t\tif (paneStandard == null) {\r\n\t\t\tpaneStandard = new org.parosproxy.paros.view.WorkbenchPanel();\r\n\t\t\tpaneStandard.setLayout(new java.awt.CardLayout());\r\n\t\t\tpaneStandard.setName(\"paneStandard\");\r\n\t\t}\r\n\t\treturn paneStandard;\r\n\t}",
"public PanelInicioAdmin getInicioAdmin(){\n return inicioAdmin;\n }",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[]{\n new TCRWizardPanel1(),\n// new TCRWizardPanel2(),\n new UtilWizardPanel1(),\n new UtilWizardPanel2()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", new Integer(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the imageWithChars on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }",
"private WizardDescriptor.Panel[] getPanels() {\n if (panels == null) {\n panels = new WizardDescriptor.Panel[] {\n new WebLogicDDWizardPanel()\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, i); // NOI18N\n // Sets steps names for a panel\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N\n // Turn on subtitle creation on each step\n jc.putClientProperty(WizardDescriptor.PROP_AUTO_WIZARD_STYLE, Boolean.TRUE); // NOI18N\n // Show steps on the left side with the image on the background\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DISPLAYED, Boolean.TRUE); // NOI18N\n // Turn on numbering of all steps\n jc.putClientProperty(WizardDescriptor.PROP_CONTENT_NUMBERED, Boolean.TRUE); // NOI18N\n }\n }\n }\n return panels;\n }",
"private JPanel getExtendedOptionsPanel() {\n\t\tif (extendedOptionsPanel == null) {\n\t\t\textendedOptionsPanel = new JPanel();\n\t\t\textendedOptionsPanel.setLayout(null);\n\t\t\textendedOptionsPanel.setBounds(new java.awt.Rectangle(2, 226, 465,\n\t\t\t\t\t62));\n\t\t\textendedOptionsPanel\n\t\t\t\t\t.setBorder(javax.swing.BorderFactory\n\t\t\t\t\t\t\t.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));\n\t\t\textendedOptionsPanel.add(getTypePolygonBufferPanel(), null);\n\t\t\textendedOptionsPanel.add(getNumBuffersPanel(), null);\n\t\t}\n\t\treturn extendedOptionsPanel;\n\t}",
"public static JPanel getJobPanel() {\n return myJobPanel;\n }",
"public PanelFX getPanel() {\n return panel;\n }",
"private org.gwtbootstrap3.client.ui.Panel get_f_Panel4() {\n return build_f_Panel4();\n }",
"private JPanel getEkitCoreEditorHTMLPanel() {\r\n\r\n\t\tString toolbar = EkitCore.TOOLBAR_DEFAULT_SINGLE;\r\n\t\tif (ekitCoreEditorHTMLPanel == null) {\r\n\t\t\tekitCoreEditorHTMLPanel =\r\n\t\t\t\tnew EkitCore(null, null, updateComment, null, null, true,\r\n\t\t\t\t\tfalse, true, true, null, null, false, false, true, false,\r\n\t\t\t\t\ttoolbar);\r\n\t\t\tekitCoreEditorHTMLPanel.setBounds(new Rectangle(2, 34, 619, 189));\r\n\t\t\tekitCoreEditorHTMLPanel.setVisible(true);\r\n\t\t}\r\n\t\treturn ekitCoreEditorHTMLPanel;\r\n\t}",
"@ImplementedBy(ModuleInfoPickerTableView.class)\n public interface ModuleInfoPickerView\n extends IsWidget\n {\n void setSelectionModel(SelectionModel<? super MavenProjectDTO> selectionModel);\n\n void setData(ModuleDataProvider mdp);\n }",
"private JPanel getPanel() {\n\t\tint width = resources.getSize().width / 5;\n\t\tint height = resources.getSize().height / 14;\n\n\t\tJLabel limit = createJLabelImg(\"textfield.png\", width - width / 15,\n\t\t\t\theight, 1f);\n\t\tint limitWidth = limit.getIcon().getIconWidth();\n\t\tint limitHeight = limit.getIcon().getIconHeight();\n\n\t\ton = createJLabelImg(\"toggle_on.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\t\toff = createJLabelImg(\"toggle_off.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\n\t\ttoggle = new JCheckBox();\n\t\ttoggle.setSelectedIcon(on);\n\t\ttoggle.setIcon(off);\n\t\ttoggle.setEnabled(true);\n\t\ttoggle.setSelected(value);\n\t\ttoggle.setCursor(new Cursor(Cursor.HAND_CURSOR));\n\t\ttoggle.setFocusable(false);\n\t\ttoggle.setBorder(null);\n\t\ttoggle.setOpaque(false);\n\n\t\tint indent = limitWidth / 25;\n\t\tint textWidthLimit = limitWidth - indent * 2 - on.getIconWidth();\n\t\tString fieldStr = Util.clipText(fieldName + \" \",\n\t\t\t\tresources.getFont(\"italic\", 15f), textWidthLimit);\n\t\tJLabel label = new JLabel(fieldStr);\n\t\tlabel.setFont(resources.getFont(\"italic\", 15f));\n\t\tlabel.setForeground(resources.getTextColor());\n\n\t\tJPanel toggleWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT,\n\t\t\t\tindent, 0));\n\t\ttoggleWrapper.setOpaque(false);\n\t\ttoggleWrapper.setPreferredSize(new Dimension(limitWidth, limitHeight));\n\t\ttoggleWrapper.setMaximumSize(toggleWrapper.getPreferredSize());\n\t\ttoggleWrapper.add(toggle);\n\t\ttoggleWrapper.add(label);\n\n\t\tJPanel container = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,\n\t\t\t\theight / 7));\n\t\tcontainer.setOpaque(false);\n\t\tcontainer.add(toggleWrapper);\n\t\tcontainer.setPreferredSize(new Dimension(width, container\n\t\t\t\t.getPreferredSize().height));\n\t\tcontainer.setMaximumSize(container.getPreferredSize());\n\n\t\treturn container;\n\t}",
"public ArrayList<Panel> getPanels() {\n return panels;\n }",
"public PanelAdminConfig getAdminConfig(){\n return adminConfig;\n }",
"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}",
"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}",
"public PanelAdminButton getPanelAdminButton() {\n\t\tif(panelAdminButton==null){\n\t\t\tpanelAdminButton = new PanelAdminButton();\n\t\t}\n\t\treturn panelAdminButton;\n\t}",
"public JPanel getMainPanelFromGameGUI() {\n\t\treturn gameView.getMainPanel();\n\t}",
"@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic JPanel obtenerPanel() {\n\t\treturn null;\n\t}",
"public JPanel getJPanel2() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tjLabel21111 = new JLabel();\r\n\t\t\tjLabel21111.setBounds(new Rectangle(30, 255, 139, 16));\r\n\t\t\tjLabel21111.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel21111.setText(\"Max. # biclusters\");\r\n\t\t\tjLabel21111.setEnabled(false);\r\n\t\t\tjLabel2111 = new JLabel();\r\n\t\t\tjLabel2111.setBounds(new Rectangle(30, 235, 140, 16));\r\n\t\t\tjLabel2111.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel2111.setText(\"Max. # conditions\");\r\n\t\t\tjLabel2111.setEnabled(false);\r\n\t\t\tjLabel211 = new JLabel();\r\n\t\t\tjLabel211.setBounds(new Rectangle(30, 215, 132, 16));\r\n\t\t\tjLabel211.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel211.setText(\"Max. # genes\");\r\n\t\t\tjLabel211.setEnabled(false);\r\n\t\t\tjLabel21 = new JLabel();\r\n\t\t\tjLabel21.setBounds(new Rectangle(30, 195, 141, 16));\r\n\t\t\tjLabel21.setToolTipText(\"Biclusters with at least this number of conditions are searched\");\r\n\t\t\tjLabel21.setText(\"Max. % of overlap\");\r\n\t\t\tjLabel21.setEnabled(false);\r\n\t\t\tjLabel3111 = new JLabel();\r\n\t\t\tjLabel3111.setBounds(new Rectangle(9, 135, 173, 18));\r\n\t\t\tjLabel3111.setText(\"Max. # of biclusters to find\");\r\n\t\t\tjLabel3111.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel311 = new JLabel();\r\n\t\t\tjLabel311.setBounds(new Rectangle(9, 114, 175, 16));\r\n\t\t\tjLabel311.setText(\"Scaling factor for columns\");\r\n\t\t\tjLabel311.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel31 = new JLabel();\r\n\t\t\tjLabel31.setBounds(new Rectangle(10, 93, 169, 16));\r\n\t\t\tjLabel31.setText(\"Sample size in repetitions\");\r\n\t\t\tjLabel31.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel3 = new JLabel();\r\n\t\t\tjLabel3.setText(\"Number of repetitions\");\r\n\t\t\tjLabel3.setBounds(new Rectangle(9, 70, 164, 16));\r\n\t\t\tjLabel3.setToolTipText(\"Select among gene clustering, condition clustering or biclustering\");\r\n\t\t\tjLabel1 = new JLabel();\r\n\t\t\tjLabel1.setText(\"Number of rows\");\r\n\t\t\tjLabel1.setToolTipText(\"As above, with columns\");\r\n\t\t\tjLabel1.setBounds(new Rectangle(9, 51, 140, 16));\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setText(\"Number of discrete levels\");\r\n\t\t\tjLabel.setToolTipText(\"Scalar in [0,1] (recommended [0.5-0.7]) used as threshold to select rows based on row homogeneity\");\r\n\t\t\tjLabel.setBounds(new Rectangle(10, 13, 173, 16));\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.setSize(new Dimension(241, 413));\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(jLabel1, null);\r\n\t\t\tjPanel.add(jLabel3, null);\r\n\t\t\tjPanel.add(getJTextField22(), null);\r\n\t\t\tjPanel.add(getJTextField221(), null);\r\n\t\t\tjPanel.add(getJCheckBox(), null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getJCheckBox1(), null);\r\n\t\t\tjPanel.add(getJTextField212(), null);\r\n\t\t\tjPanel.add(getJButton1(), null);\r\n\t\t\tjPanel.add(jLabel31, null);\r\n\t\t\tjPanel.add(jLabel311, null);\r\n\t\t\tjPanel.add(jLabel3111, null);\r\n\t\t\tjPanel.add(getJTextField222(), null);\r\n\t\t\tjPanel.add(getJTextField2221(), null);\r\n\t\t\tjPanel.add(getJTextField2222(), null);\r\n\t\t\tjPanel.add(getJTextField2223(), null);\r\n\t\t\tjPanel.add(getJCheckBox2(), null);\r\n\t\t\tjPanel.add(getJCheckBox3(), null);\r\n\t\t\tjPanel.add(jLabel21, null);\r\n\t\t\tjPanel.add(jLabel211, null);\r\n\t\t\tjPanel.add(jLabel2111, null);\r\n\t\t\tjPanel.add(jLabel21111, null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField22111(), null);\r\n\t\t\tjPanel.add(getJTextField221111(), null);\r\n\t\t\tjPanel.add(getJTextField2211111(), null);\r\n\t\t\tjPanel.add(getJTextField22111111(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(getJTextField2211(), null);\r\n\t\t\tjPanel.add(jCheckBox3, null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"private JPanel getGeneralPanel() {\n\t\tif (generalPanel == null) {\n\t\t\tgeneralPanel = new JPanel();\n\t\t\tgeneralPanel.setBorder(BorderFactory.createEmptyBorder());\n\t\t\tgeneralPanel.setLayout(new BorderLayout());\n\t\t\tgeneralPanel.add(getDynamicTreePanel(), BorderLayout.NORTH);\n\t\t\tgeneralPanel.add(getButtonSplitPane(), BorderLayout.SOUTH);\n\t\t}\n\t\treturn generalPanel;\n\t}",
"private void getEditLinkPanel() {\n\t\ttry{\n\t\t\tEditLinkPanel editLinkPanel = new EditLinkPanel(newsItem, feedNewsPresenter);\n\t\t\toptionPanel.add(editLinkPanel);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"boolean hasGlobalSettingsPanel();",
"public String getPanelName() {\n return \"Title\";\n }",
"public Container getInterfacePanel(){\n datasetTable.setSize(128,128);\n return datasetTable;\n }",
"private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}",
"private JPanel getJpanelFlowProfile() {\n\t\tif (jpanelFlowProfile == null) {\n\t\t\tjpanelFlowProfile = new JPanel();\n\t\t\tjpanelFlowProfile.setLayout(null);\n\t\t\tjpanelFlowProfile.setPreferredSize(new Dimension(615, 477));\n\t\t\tjpanelFlowProfile.setBorder(BorderFactory.createTitledBorder(null, \"Back-Calculated Uracil Dead Time vs. Eluent Composition\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font(\"Dialog\", Font.BOLD, 12), new Color(51, 51, 51)));\n\t\t\tjpanelFlowProfile.setBackground(Color.white);\n\t\t\tjpanelFlowProfile.setSize(new Dimension(469, 261));\n\t\t\tjpanelFlowProfile.setLocation(new Point(6, 308));\n\t\t\tjpanelFlowProfile.add(m_GraphControlFlowRate, null);\n\t\t}\n\t\treturn jpanelFlowProfile;\n\t}",
"public java.lang.String getPanelVersion() {\n return panelVersion;\n }",
"@Override\n\tpublic Panel getPanel() {\n\t\treturn m_currentPanel;\n\t}",
"public java.lang.String getPanelVersion() {\n return panelVersion;\n }",
"public GUIPopulator getGuiPopulator() {\n return guiPopulator;\n }",
"private javax.swing.JPanel getJPanel() {\n\t\tif(jPanel == null) {\n\t\t\tjPanel = new javax.swing.JPanel();\n\t\t\tjava.awt.FlowLayout layFlowLayout3 = new java.awt.FlowLayout();\n\t\t\tlayFlowLayout3.setHgap(0);\n\t\t\tlayFlowLayout3.setVgap(0);\n\t\t\tlayFlowLayout3.setAlignment(java.awt.FlowLayout.LEFT);\n\t\t\tjPanel.setLayout(layFlowLayout3);\n\t\t\tjPanel.add(PanelIconosCR.getPanelLogo(), null);\n\t\t\tjPanel.add(PanelIconosCR.getPanelIconos(), null);\n\t\t\tjPanel.add(getJPanel2(), null);\n\t\t\tjPanel.add(getJPanel4(), null);\n\t\t\tjPanel.add(getJPanel3(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getAreaMensajes(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getPanelEstadoCaja(), null);\n\t\t\tjPanel.add(PanelMensajesCR.getPanelStatus(), null);\n\t\t\tjPanel.setBackground(new java.awt.Color(242,242,238));\n\t\t\tjPanel.setPreferredSize(new java.awt.Dimension(660,560));\n\t\t\tjPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(69,107,127),1));\n\t\t}\n\t\treturn jPanel;\n\t}",
"ViewGroup getOptionsPanelContainer();",
"protected Component getOptionsPanel() {\n return _options;\n }",
"private JPanel getDiffExecutePanel() {\n if (diffExecutePanel == null) {\n GridLayout gridLayout = new GridLayout();\n gridLayout.setRows(2);\n gridLayout.setColumns(1);\n diffExecutePanel = new JPanel();\n diffExecutePanel.setLayout(gridLayout);\n diffExecutePanel.add(getDiffButton(), null);\n diffExecutePanel.add(getIgnorePermissionCheck(), null);\n }\n return diffExecutePanel;\n }",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(getJTextArea(), null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getJEditorPane(), null);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"public ChartPanel getChartPanel();",
"public MainPanel getMainPanel() {\n return panel;\n }",
"public Container getInfoPanel() {\n\t\treturn null;\n\t}",
"protected JPanel getTopPanel() {\n List topComps = new ArrayList();\n getTopComponents(topComps);\n if (topComps.size() == 0) {\n return null;\n }\n JPanel topPanel = GuiUtils.left(GuiUtils.doLayout(topComps, 0, GuiUtils.WT_N, GuiUtils.WT_N));\n topPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n \n return McVGuiUtils.makeLabeledComponent(\"Options:\", topPanel);\n }",
"private JPanel getBalloonSettingsButtonPane() {\n if (balloonSettingsButtonPane == null) {\n FlowLayout flowLayout = new FlowLayout();\n flowLayout.setHgap(25);\n balloonSettingsButtonPane = new JPanel();\n balloonSettingsButtonPane.setLayout(flowLayout);\n balloonSettingsButtonPane.setPreferredSize(new java.awt.Dimension(35, 35));\n balloonSettingsButtonPane.add(getAddButton(), null);\n balloonSettingsButtonPane.add(getCopyButton(), null);\n balloonSettingsButtonPane.add(getEditButton(), null);\n }\n return balloonSettingsButtonPane;\n }",
"private JPanel getControlPanel() {\n if (controlPanel == null) {\n GridBagConstraints gridBagConstraints8 = new GridBagConstraints();\n gridBagConstraints8.gridx = 0;\n gridBagConstraints8.gridy = 1;\n GridBagConstraints gridBagConstraints7 = new GridBagConstraints();\n gridBagConstraints7.insets = new java.awt.Insets(5, 5, 5, 5);\n gridBagConstraints7.gridy = 0;\n gridBagConstraints7.weightx = 1.0D;\n gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints7.gridx = 0;\n controlPanel = new JPanel();\n controlPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Add/Remove User(s)\",\n javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,\n javax.swing.border.TitledBorder.DEFAULT_POSITION, null, PortalLookAndFeel.getPanelLabelColor()));\n controlPanel.setLayout(new GridBagLayout());\n controlPanel.add(getUserAddEditPanel(), gridBagConstraints7);\n controlPanel.add(getUserManagerButtonPanel(), gridBagConstraints8);\n }\n return controlPanel;\n }",
"private JPanel getJPanel()\n\t{\n\t\tif (jPanel == null)\n\t\t{\n\t\t\tjPanel = new JPanel();\n\t\t\tjPanel.setLayout(new BorderLayout());\n\t\t\tBorder bdr = BorderFactory.createTitledBorder(\"\");\n\t \tjPanel.setBorder(bdr);\n\t\t\tjPanel.add(getRPFilesPanel(), BorderLayout.CENTER);\n\t\t\tjPanel.add(getJPathPanel(), BorderLayout.NORTH);\n\t\t}\n\t\treturn jPanel;\n\t}",
"private Component getOpcionesSesion() {\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tpanel.add(new JScrollPane(getPanelOpcionesSuperior()), BorderLayout.CENTER);\n\t\t//panel.add(getPanelOpcionesInferior(), BorderLayout.SOUTH);\n\t\tFakeInternalFrame fr = new FakeInternalFrame(\"Configuracion de la sesion\", panel);\n\t\treturn fr;\n\t}",
"private JPanel getJPanel() {\r\n\t\tif (jPanel == null) {\r\n\t\t\ttitleFieldImage = new JLabel();\r\n\t\t\ttitleFieldImage.setBounds(new Rectangle(480, 75, 280, 60));\r\n\t\t\ttitleFieldImage.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldImage.setText(\"Image\");\r\n\t\t\ttitleFieldImage.setBackground(new Color(255, 204, 204));\r\n\t\t\tpageInfoLbl = new JLabel();\r\n\t\t\tpageInfoLbl.setBounds(new java.awt.Rectangle(224,480,315,30));\r\n\t\t\tpageInfoLbl.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tpageInfoLbl.setText(\"\");\r\n\t\t\ttitleFieldName = new JLabel();\r\n\t\t\ttitleFieldName.setBounds(new Rectangle(190, 75, 170, 60));\r\n\t\t\ttitleFieldName.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldName.setBackground(new Color(255,204,204));\r\n\t\t\ttitleFieldName.setText(\"Field name\");\r\n\t\t\ttitleFieldId = new JLabel();\r\n\t\t\ttitleFieldId.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleFieldId.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFieldId.setBackground(new Color(255,160,204));\r\n\t\t\ttitleFieldId.setText(\"Field ID\");\r\n\t\t\tlblPageName = new JLabel();\r\n\t\t\tlblPageName.setBounds(new Rectangle(10, 40, 120, 20));\r\n\t\t\tlblPageName.setText(\"Page Name\");\r\n\t\t\tjLabel = new JLabel();\r\n\t\t\tjLabel.setBounds(new java.awt.Rectangle(10,10,500,24));\r\n\t\t\tjLabel.setText(\"Select the field you want to add\");\r\n\t\t\tjPanel = new JPanel();\r\n\t\t\tjPanel.setLayout(null);\r\n\t\t\tjPanel.add(jLabel, null);\r\n\t\t\tjPanel.add(getJButton(), null);\r\n\t\t\tjPanel.add(getPageSheet(), null);\r\n\t\t\tjPanel.add(getPreButton(), null);\r\n\t\t\tjPanel.add(getAfterButton(), null);\r\n\t\t\tjPanel.add(lblPageName, null);\r\n\t\t\tjPanel.add(titleFieldId, null);\r\n\t\t\tjPanel.add(titleFieldName, null);\r\n\t\t\tjPanel.add(pageInfoLbl, null);\r\n\t\t\tjPanel.add(titleFieldImage, null);\r\n\t\t\t\r\n\t\t\tJLabel titleFiledType = new JLabel();\r\n\t\t\ttitleFiledType.setText(\"Field Type\");\r\n\t\t\ttitleFiledType.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleFiledType.setBounds(new Rectangle(10, 75, 90, 60));\r\n\t\t\ttitleFiledType.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleFiledType.setBounds(360, 75, 120, 60);\r\n\t\t\tjPanel.add(titleFiledType);\r\n\t\t\t\r\n\t\t\tJButton btnSelect = new JButton();\r\n\t\t\tbtnSelect.addActionListener(new ActionListener() {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\treturnValue.clear();\r\n\t\t\t\t\tgrid.freshData();\r\n\t\t\t\t\tList<Map<String, String>> valueList = grid.getValueList();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSelectBean bean = (SelectBean)pageIdSelect.getSelectedItem();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Map<String, String> map : valueList) {\r\n\t\t\t\t\t\tString strSelect = map.get(\"SELECT\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (Boolean.valueOf(strSelect)) {\r\n\t\t\t\t\t\t\tMap<String, String> temp = new HashMap<String, String>(map);\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_ID\", bean.getCode());\r\n\t\t\t\t\t\t\tString strName = bean.getName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (strName.indexOf(\":\") > 0 && strName.length() > strName.indexOf(\":\") + 2) {\r\n\t\t\t\t\t\t\t\tstrName = strName.substring(strName.indexOf(\":\") + 2);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ttemp.put(\"PAGE_NAME\", strName);\r\n\t\t\t\t\t\t\treturnValue.add(temp);\r\n\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\tif (returnValue.size() > 0) {\r\n\t\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\t\t_parent.addSelectFields(PageSelectDialog.this);\r\n\t\t\t\t\t\tUtils.removeWindow(PageSelectDialog.this);\r\n\t\t\t\t\t\t_parent.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(PageSelectDialog.this, \"Plese select field!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\tbtnSelect.setText(\"Select\");\r\n\t\t\tbtnSelect.setSize(new Dimension(90, 30));\r\n\t\t\tbtnSelect.setLocation(new Point(10, 480));\r\n\t\t\tbtnSelect.setBounds(10, 520, 120, 30);\r\n\t\t\tjPanel.add(btnSelect);\r\n\t\t\t\r\n\t\t\ttitleSelect = new JLabel();\r\n\t\t\ttitleSelect.setText(\"Select\");\r\n\t\t\ttitleSelect.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\ttitleSelect.setBounds(new Rectangle(90, 75, 70, 60));\r\n\t\t\ttitleSelect.setBackground(new Color(255, 160, 204));\r\n\t\t\ttitleSelect.setBounds(10, 75, 80, 60);\r\n\t\t\tjPanel.add(titleSelect);\r\n\t\t\t\r\n\t\t\tpageIdSelect = new JComboBox<DefaultComboBoxModel>();\r\n\t\t\tpageIdSelect.addItemListener(new ItemListener() {\r\n\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\t\tsearchDetailList();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tpageIdSelect.setBounds(140, 40, 300, 20);\r\n\t\t\tjPanel.add(pageIdSelect);\r\n\t\t}\r\n\t\treturn jPanel;\r\n\t}",
"protected DistributionPanel getDistributionPanel()\r\n\t{\r\n\t\treturn this.panel;\r\n\t}",
"public Component getContentPanel() {\n\t\tsetDetailedDescription(helpType);\n\t\tsetExitButton();\n\t\tsetPanelOverview();\n\t\tsetFont();\n\n\t\treturn contentPanel;\n\t}"
] | [
"0.7212739",
"0.6194618",
"0.6000896",
"0.59291816",
"0.58800334",
"0.5853814",
"0.57414323",
"0.57099354",
"0.56562024",
"0.5612246",
"0.55729896",
"0.5534054",
"0.5515975",
"0.54934245",
"0.54871356",
"0.5484615",
"0.5472537",
"0.5461643",
"0.54590124",
"0.54534054",
"0.5447552",
"0.53995585",
"0.53979456",
"0.5385236",
"0.5385236",
"0.53784186",
"0.5375745",
"0.5374931",
"0.53744125",
"0.5371623",
"0.53457814",
"0.53374",
"0.53254795",
"0.5316835",
"0.5316063",
"0.5312153",
"0.530705",
"0.530705",
"0.5297247",
"0.5291531",
"0.528503",
"0.52835155",
"0.5270406",
"0.52610093",
"0.52260584",
"0.51953703",
"0.5194133",
"0.5190978",
"0.518459",
"0.51558775",
"0.5119656",
"0.511876",
"0.5105992",
"0.5100886",
"0.5099538",
"0.5087629",
"0.5085754",
"0.5077618",
"0.50756866",
"0.5075204",
"0.5067393",
"0.5062787",
"0.5061293",
"0.50603354",
"0.50494546",
"0.50366",
"0.5034555",
"0.50322026",
"0.50240844",
"0.501694",
"0.50131667",
"0.50131667",
"0.5010068",
"0.500462",
"0.4992545",
"0.49923813",
"0.49911755",
"0.4990508",
"0.49885023",
"0.49779007",
"0.4967303",
"0.49642357",
"0.49599454",
"0.49481842",
"0.49477008",
"0.49386615",
"0.49361134",
"0.49326295",
"0.4928448",
"0.4921302",
"0.49132717",
"0.48987797",
"0.4898334",
"0.4891673",
"0.48631954",
"0.4860844",
"0.48573905",
"0.48555645",
"0.48525053",
"0.4848285"
] | 0.7019964 | 1 |
Queries the factory to determine if it is capable of creating data source ingest modules. If the module family does not include data source ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean isDataSourceIngestModuleFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isFileIngestModuleFactory();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"@Override\n\tpublic boolean hasDataSource() {\n\t\treturn _dataSource.size() > 0;\n\t}",
"boolean hasImportConfiguration();",
"public boolean canHandle(DynamicMetadataSource source);",
"boolean accepts( DataSourceMetadata dataSourceMetadata );",
"public boolean supports (String moduleUri);",
"public boolean canHandle(MetadataSource source);",
"boolean hasProvider();",
"public IStatus canAddModule(IModule module);",
"public void createDataSourceReturnsCorrectDefinition() {\n SoftDeleteColumnDeletionDetectionPolicy deletionDetectionPolicy =\n new SoftDeleteColumnDeletionDetectionPolicy()\n .setSoftDeleteColumnName(\"isDeleted\")\n .setSoftDeleteMarkerValue(\"1\");\n\n HighWaterMarkChangeDetectionPolicy changeDetectionPolicy =\n new HighWaterMarkChangeDetectionPolicy(\"fakecolumn\");\n\n // AzureSql\n createAndValidateDataSource(createTestSqlDataSourceObject(null, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(null, new SqlIntegratedChangeTrackingPolicy()));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy,\n changeDetectionPolicy));\n\n // Cosmos\n createAndValidateDataSource(createTestCosmosDataSource(null, false));\n createAndValidateDataSource(createTestCosmosDataSource(null, true));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n\n // Azure Blob Storage\n createAndValidateDataSource(createTestBlobDataSource(null));\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n\n // Azure Table Storage\n createAndValidateDataSource(createTestTableStorageDataSource());\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n }",
"public void createDataSourceReturnsCorrectDefinition() {\n SoftDeleteColumnDeletionDetectionPolicy deletionDetectionPolicy =\n new SoftDeleteColumnDeletionDetectionPolicy()\n .setSoftDeleteColumnName(\"isDeleted\")\n .setSoftDeleteMarkerValue(\"1\");\n\n HighWaterMarkChangeDetectionPolicy changeDetectionPolicy =\n new HighWaterMarkChangeDetectionPolicy(\"fakecolumn\");\n\n // AzureSql\n createAndValidateDataSource(createTestSqlDataSourceObject(null, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy, null));\n createAndValidateDataSource(createTestSqlDataSourceObject(null, new SqlIntegratedChangeTrackingPolicy()));\n createAndValidateDataSource(createTestSqlDataSourceObject(deletionDetectionPolicy,\n changeDetectionPolicy));\n\n // Cosmos\n createAndValidateDataSource(createTestCosmosDataSource(null, false));\n createAndValidateDataSource(createTestCosmosDataSource(null, true));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n createAndValidateDataSource(createTestCosmosDataSource(deletionDetectionPolicy, false));\n\n // Azure Blob Storage\n createAndValidateDataSource(createTestBlobDataSource(null));\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n\n // Azure Table Storage\n createAndValidateDataSource(createTestTableStorageDataSource());\n createAndValidateDataSource(createTestBlobDataSource(deletionDetectionPolicy));\n }",
"public boolean supportsServeModulesWithoutPublish();",
"@Override\n public boolean needsFormat()\n {\n return delegates.stream().anyMatch(SplittableInputSource::needsFormat);\n }",
"public boolean hasConfigSource() {\n return configSource_ != null;\n }",
"boolean hasSourceId();",
"@Override\n public boolean supportsSourceType(Class<?> sourceType) {\n // 判断 event 资源类型 ,这里处理的是 UserService 的\n return sourceType == UserService.class;\n }",
"public boolean hasImportConfiguration() {\n return importConfigurationBuilder_ != null || importConfiguration_ != null;\n }",
"private static boolean isMinimalDataSource(Path path) {\n if ( ! Files.isDirectory(path) ) \n return false ;\n Path cfg = path.resolve(DeltaConst.DS_CONFIG);\n if ( ! Files.exists(cfg) )\n return false ;\n if ( ! Files.isRegularFile(cfg) ) \n LOG.warn(\"Data source configuration file name exists but is not a file: \"+cfg);\n if ( ! Files.isReadable(cfg) )\n LOG.warn(\"Data source configuration file exists but is not readable: \"+cfg);\n return true ;\n }",
"boolean hasSource();",
"public boolean isProvidesSupport() {\n\t\treturn providesSupport;\n\t}",
"public boolean hasConfigSource() {\n return configSourceBuilder_ != null || configSource_ != null;\n }",
"boolean hasCreateTaskPack();",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"public static boolean isImplementationAvailable() {\r\n if (implementationAvailable == null) {\r\n try {\r\n getJavaxBeanValidatorFactory();\r\n implementationAvailable = true;\r\n } catch (Exception e) {\r\n implementationAvailable = false;\r\n }\r\n }\r\n return implementationAvailable;\r\n }",
"DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);",
"@java.lang.Override\n public boolean hasDataset() {\n return inputSourceCase_ == 11;\n }",
"@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }",
"public boolean hasImportConfiguration() {\n return importConfiguration_ != null;\n }",
"@Override \r\n public boolean needsDsfService() { return false; }",
"@Override\n\tpublic boolean supportsEngineIdDiscovery() {\n\t\treturn false;\n\t}",
"@java.lang.Override\n public boolean hasDataset() {\n return inputSourceCase_ == 11;\n }",
"public boolean requiresJdbcConfigInSourcesXml();",
"boolean hasTrainingDataType();",
"boolean hasJobIDSource();",
"boolean hasDatabaseSpec();",
"boolean hasCreateStore();",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean hasSeeds() {\n return this.seeds != null && this.seeds.size() > 0;\n }",
"@Override\n public boolean isFactoryForType(Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"public boolean isDialect() {\n return StringUtils.isNotBlank(getDialect());\n }",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n if (object == modelPackage) {\r\n return true;\r\n }\r\n if (object instanceof EObject) {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isFactoryForType(final Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject) object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"boolean isEnabled() throws CDIException;",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"boolean isSource();",
"public boolean isSource();",
"private DataSource.Factory buildDataSourceFactory() {\n return ((DemoApplication) getApplication()).buildDataSourceFactory();\n }",
"public boolean iskContainerBeingBuilt(FamilyDTO familyDTO) {\n String familyCode = familyDTO.getFamilyCode();\n log.debug(\"Checking to see if we are already building for family[\" + familyCode + \"] and engine:[\" + engineName + \"]\");\n EngineDTO EngineDTO = familyDTO.getEngineDTO(engineName);\n if (EngineDTO != null) {\n String groupId = EngineDTO.getGroupId();\n String artifactId = EngineDTO.getArtifactId();\n String version = EngineDTO.getVersion();\n return kContainerFactory.isKieContainerBeingBuilt(groupId, artifactId, version);\n } else {\n Map<String, EngineDTO> EngineDTOs = familyDTO.getEngineDTOs();\n log.debug(\"Family [\" + familyCode + \"] does not have configuration for \" + \"engine[\" + engineName\n + \"]; no maven settings to load. \" + \"Valid engines are [\" + EngineDTOs.keySet() + \"]\");\n return false;\n }\n }",
"public boolean isMigrationTypeRegistered(MigrationType type);",
"@Override\n public boolean addDataSourceInfo(DataSource ds) {\n return false;\n }",
"@java.lang.Override\n public boolean hasDrmSystems() {\n return drmSystems_ != null;\n }",
"protected abstract boolean isMigrationNecessary();",
"boolean hasInputConfig();",
"boolean hasInputConfig();"
] | [
"0.70413095",
"0.6264758",
"0.5736398",
"0.5510255",
"0.54023194",
"0.53843856",
"0.5161722",
"0.50769854",
"0.50246584",
"0.5023566",
"0.50193226",
"0.50193226",
"0.4949179",
"0.49303213",
"0.49068332",
"0.48738876",
"0.486978",
"0.48136598",
"0.48059565",
"0.47770983",
"0.47743076",
"0.47721657",
"0.47714",
"0.47613806",
"0.4760072",
"0.47516415",
"0.47336262",
"0.47328416",
"0.4731484",
"0.471824",
"0.46818653",
"0.46767557",
"0.46753338",
"0.46642047",
"0.4658606",
"0.46414226",
"0.46130988",
"0.45878065",
"0.45826754",
"0.45803863",
"0.45775378",
"0.4572903",
"0.45693424",
"0.45693424",
"0.45693424",
"0.45693424",
"0.45688",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45587525",
"0.45578346",
"0.45578346",
"0.45571607",
"0.4552658",
"0.45484018",
"0.45484018",
"0.45484018",
"0.45484018",
"0.4547421",
"0.4547421",
"0.4547421",
"0.4547421",
"0.4547421",
"0.4547421",
"0.4547421",
"0.4547421",
"0.45396984",
"0.45396984",
"0.45396984",
"0.45396984",
"0.45396984",
"0.45396984",
"0.45344332",
"0.45290813",
"0.45275924",
"0.45252445",
"0.45109913",
"0.4506376",
"0.45005506",
"0.4499386",
"0.44969222",
"0.44969222"
] | 0.8237383 | 0 |
Creates a data source ingest module instance. Autopsy will generally use the factory to several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. The ingest framework may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. modules. If the module family does not include data source ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);",
"boolean isDataSourceIngestModuleFactory();",
"@Emitter\n public InputSource createWorker() {\n return new InputSource(configuration, jsonFactory, jsonb, service, members);\n \n }",
"DataFlow createDataFlow();",
"boolean isFileIngestModuleFactory();",
"Module createModule();",
"ModuleDefinition createModuleDefinition();",
"public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }",
"Flows createFlows();",
"WithCreate withSourceType(SourceType sourceType);",
"ODataSingleProcessor createProcessor(ODataContext context);",
"@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }",
"public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }",
"IFMLModule createIFMLModule();",
"private Module createModule(String moduleId, String ownerId, String copyId) throws NoFactoryForModuleException{\n\t\tIModuleFactory factory = factories.get(moduleId);\n\t\tif (factory==null){\n\t\t\tthrow new NoFactoryForModuleException(moduleId);\n\t\t}\n\t\treturn factory.createModule(ownerId, copyId);\n\t}",
"MakeflowFactory getMakeflowFactory();",
"abstract protected T createModuleNode(NodeDescriptor node);",
"private Module createModule() throws Exception\n {\n Map headerMap = m_archive.getCurrentRevision().getManifestHeader();\n\n // Create the module instance.\n ModuleImpl module = new ModuleImpl(\n getFramework().getLogger(),\n getFramework().getConfig(),\n getFramework().getResolver(),\n this,\n Long.toString(getBundleId())\n + \".\" + m_archive.getCurrentRevisionNumber().toString(),\n headerMap,\n m_archive.getCurrentRevision().getContent(),\n getFramework().getBundleStreamHandler(),\n getFramework().getBootPackages(),\n getFramework().getBootPackageWildcards());\n\n // Verify that the bundle symbolic name + version is unique.\n if (module.getManifestVersion().equals(\"2\"))\n {\n Version bundleVersion = module.getVersion();\n bundleVersion = (bundleVersion == null) ? Version.emptyVersion : bundleVersion;\n String symName = module.getSymbolicName();\n\n Bundle[] bundles = getFramework().getBundles();\n for (int i = 0; (bundles != null) && (i < bundles.length); i++)\n {\n long id = ((BundleImpl) bundles[i]).getBundleId();\n if (id != getBundleId())\n {\n String sym = bundles[i].getSymbolicName();\n Version ver = ((ModuleImpl)\n ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();\n if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))\n {\n throw new BundleException(\n \"Bundle symbolic name and version are not unique: \"\n + sym + ':' + ver, BundleException.DUPLICATE_BUNDLE_ERROR);\n }\n }\n }\n }\n\n return module;\n }",
"ExpRun importRun(PipelineJob job, XarSource source) throws SQLException, PipelineJobException, ValidationException;",
"Flow createFlow();",
"SourceBuilder createService();",
"public DataSourceFactory() {}",
"public interface MasterProcessChannelProcessorFactory extends Closeable {\n /**\n * Evaluates the {@code channelConfig}.\n *\n * @param channelConfig a connection string used by the fork JVM\n * @return {@code true} if {@code channelConfig} is applicable and thus this SPI is eligible in the fork\n */\n boolean canUse(String channelConfig);\n\n /**\n * Open a new connection.\n *\n * @param channelConfig e.g. \"pipe://3\" or \"tcp://localhost:65035\"\n * @throws IOException if cannot connect\n */\n void connect(String channelConfig) throws IOException;\n\n /**\n * Decoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of decoder\n */\n MasterProcessChannelDecoder createDecoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n\n /**\n * Encoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of encoder\n */\n MasterProcessChannelEncoder createEncoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n}",
"Import createImport();",
"Import createImport();",
"private void CreateDataIngestors() throws isisicatclient.IcatException_Exception {\n Grouping dataIngestors = new Grouping();\r\n dataIngestors.name = \"DataIngestors\";\r\n dataIngestors.id = port.create(sessionId, dataIngestors);\r\n dataIngestors = (Grouping) port.search(sessionId, \"Grouping[name='DataIngestors']\").get(0);\r\n\r\n List<String> ingestorTables = port.getEntityNames();\r\n\r\n ingestorTables.remove(\"Facility\");\r\n\r\n List<EntityBaseBean> ingestorRules = new ArrayList<>();\r\n for (String table : ingestorTables) {\r\n Rule rule = new Rule();\r\n rule.grouping = dataIngestors;\r\n rule.crudFlags = \"CRUD\"; //no delete permission for ingestors\r\n rule.what = table;\r\n ingestorRules.add(rule);\r\n }\r\n port.createMany(sessionId, ingestorRules);\r\n }",
"interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }",
"public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}",
"public IChunkProvider createChunkGenerator()\n {\n return new ChunkProviderXirk(this.worldObj, this.worldObj.getSeed(), false);\n }",
"public Flow createFlow(ProcessXmlOptions options) throws IOException, InterruptedException {\n System.setProperty(\"javax.xml.parsers.DocumentBuilderFactory\",\n \"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl\");\n\n JobConf conf = new JobConf();\n conf.set(\"mapred.child.java.opts\", \"-server\");\n \n Properties props = new Properties();\n FlowConnector.setApplicationJarClass(props, ProcessXmlTool.class);\n\n if (!options.isDebugLogging()) {\n props.put(\"log4j.logger\", \"cascading=INFO\");\n }\n \n MultiMapReducePlanner.setJobConf(props, conf);\n\n Tap sourceTap = new Hfs(new TextLine(), options.getInputFile());\n \n Tap sinkTap = new Hfs(new SequenceFile(FIELDS), options.getOutputDir(), SinkMode.REPLACE);\n \n Pipe xmlPipe = new Pipe(\"xml\");\n xmlPipe = new Each(xmlPipe, new ParseXml());\n xmlPipe = new Each(xmlPipe, new Debug());\n \n FlowConnector flowConnector = new FlowConnector(props);\n return flowConnector.connect(sourceTap, sinkTap, xmlPipe);\n }",
"Source createDatasourceOAI(Source ds, Provider prov) throws RepoxException;",
"public static InputFewStepsFactory init() {\n\t\ttry {\n\t\t\tInputFewStepsFactory theInputFewStepsFactory = (InputFewStepsFactory)EPackage.Registry.INSTANCE.getEFactory(InputFewStepsPackage.eNS_URI);\n\t\t\tif (theInputFewStepsFactory != null) {\n\t\t\t\treturn theInputFewStepsFactory;\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 InputFewStepsFactoryImpl();\n\t}",
"public DataSource createImpl()\n {\n if (_impl == null)\n {\n // create a param defining the datasource\n \n \tJdbcDataSourceParam dsParam = new JdbcDataSourceParam(getName(),\n getJdbcDriver(), getJdbcUrl() , //getJdbcCatalog(),\n getJdbcUser(), getJdbcPassword());//+ \":\" + getJdbcCatalog()\n\n // get/create the datasource\n _impl = DataManager.getDataSource(dsParam);\n\n // get the entities, create and add them\n Vector v = getEntities();\n for (int i = 0; i < v.size(); i++)\n {\n EntityDobj ed = (EntityDobj) v.get(i);\n _impl.addEntity(ed.createImpl());\n }\n\n // get the joins, create and add them\n v = getJoins();\n for (int i = 0; i < v.size(); i++)\n {\n JoinDobj jd = (JoinDobj) v.get(i);\n _impl.addJoin(jd.createImpl());\n }\n }\n\n return _impl;\n }",
"public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }",
"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 }",
"@Provides\r\n public DataInput provideInputReader() {\r\n DataInput input = null;\r\n final Reader inRdr = inReader;\r\n if ((inRdr != null) && (inputFormat != null)) {\r\n if (\"csv\".equalsIgnoreCase(inputFormat))\r\n input = new CSVDataInput(inRdr);\r\n else if (\"json\".equalsIgnoreCase(inputFormat))\r\n input = new JSONDataInput(inRdr);\r\n else\r\n throw new IllegalArgumentException(\"Input format \"\r\n + inputFormat + \" not supported.\"\r\n + \" Valid types are csv, json\");\r\n input.verboseOptions(verboseStream, verbose);\r\n }\r\n return input;\r\n }",
"public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}",
"LoadGenerator createLoadGenerator();",
"LoadGenerator createLoadGenerator();",
"ModulePackage createModulePackage();",
"private ModuleProvider(String inProviderName,\n AbstractMarketDataModule<?,?> inFeed)\n {\n providerName = inProviderName;\n description = providerName + \" proxy\";\n feed = inFeed;\n moduleManager = ModuleManager.getInstance();\n processor = new Processor();\n // TODO register a feed status listener to detect starts and stops and update status\n start();\n }",
"public interface IXLIFFFactory {\r\n\r\n\t/**\r\n\t * Indicates if this implementation of the object model supports a given module.\r\n\t * @param moduleUri the namespace URI of the module for which the query is made.\r\n\t * @return true if the module is supported, false if it is not.\r\n\t */\r\n\tpublic boolean supports (String moduleUri);\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IDocument}.\r\n\t * @return the new document.\r\n\t */\r\n\tpublic IDocument createDocument ();\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IFile}.\r\n\t * @param id the id of this file (must not be null or empty).\r\n\t * @return the new file.\r\n\t */\r\n\tpublic IFile createFile (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new empty instance of {@link IGroup}.\r\n\t * @param parent the parent group or null to create a top-level group.\r\n\t * @param id the id of the group (must not be null or empty).\r\n\t * @return the new group.\r\n\t */\r\n\tpublic IGroup createGroup (IGroup parent,\r\n\t\tString id);\r\n\t\r\n\t/**\r\n\t * Creates a new instance of {@link IUnit}.\r\n\t * @param id the id of the new unit.\r\n\t * @return the new unit.\r\n\t */\r\n\tpublic IUnit createUnit (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IContent} object.\r\n\t * @param store the store to associate with the new object.\r\n\t * @param isTarget true if the new content is for the target language, false for the source.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent createContent (IStore store,\r\n\t\tboolean isTarget);\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a {@link IContent} object.\r\n\t * @param store the store that should be associated with the new content.\r\n\t * @param isTarget true if the destination is a target content.\r\n\t * @param original the original object to duplicate.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent copyContent (IStore store,\r\n\t\tboolean isTarget,\r\n\t\tIContent original);\r\n\t\r\n\t/**\r\n\t * Creates a copy of a {@link ISegment} object, with all its core metadata but with an empty content.\r\n\t * The method will create a new ID for the new segment.\r\n\t * @param store the store that should be associated with the new segment.\r\n\t * @param original the original object to copy.\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment copyEmptySegment (IStore store,\r\n\t\tISegment original);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} object with an empty source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} with a given plain text source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @param sourcePlainText the plain text source content of the new part.\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store,\r\n\t\tString sourcePlainText);\r\n\r\n\t/**\r\n\t * Creates a new {@link ISegment} object with an empty source.\r\n\t * @param store the store associated with the new segment (cannot be null).\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createSegment (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new unattached {@link ISegment} object with an empty source.\r\n\t * This segment will have its own store and cannot be used with other or within a unit.\r\n\t * Lone segments cannot use any methods related to their parent. \r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createLoneSegment ();\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a given {@link ITag} object.\r\n\t * @param original the original tag to duplicate.\r\n\t * @param destinationTags the list of destination tags. This is used to find and connect\r\n\t * opening tags when creating closing tags.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic ITag copyTag (ITag original,\r\n\t\tITags destinationTags);\r\n\r\n\t/**\r\n\t * Creates a new {@link IExtObject} object.\r\n\t * @param nsUri the namespace URI of this object.\r\n\t * @param name the name of this object.\r\n\t * @return the new extension object.\r\n\t */\r\n\tpublic IExtObject createExtObject (String nsUri,\r\n\t\tString name);\r\n\t\r\n\t/**\r\n\t * Creates a new opening tag for a marker.\r\n\t * @param id the id of the marker.\r\n\t * @param type the type of the marker.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic IMTag createOpeningMTag (String id,\r\n\t\tString type);\r\n\r\n}",
"public InputFewStepsFactoryImpl() {\n\t\tsuper();\n\t}",
"public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }",
"Source createDatasourceHttp(Source ds, Provider prov) throws RepoxException;",
"interface WithSourceType {\n /**\n * Specifies the sourceType property: The source type. Must be one of VsoGit, VsoTfvc, GitHub, case\n * sensitive..\n *\n * @param sourceType The source type. Must be one of VsoGit, VsoTfvc, GitHub, case sensitive.\n * @return the next definition stage.\n */\n WithCreate withSourceType(SourceType sourceType);\n }",
"public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }",
"@Override\n public void run() {\n if ((generate_modules_based_on_keyword==null)||(generate_modules_based_on_keyword.equals(\"\"))) {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n } else {\n String[] parts = generate_modules_based_on_keyword.split(\":\",2);\n if (parts.length==2) {\n ArrayList<String> channelsToGenerate = new ArrayList<>();\n String[] channelNames = parts[1].split(\";\");\n for (int i=0;i<channelNames.length;i++) {\n channelsToGenerate.add(channelNames[i]);\n }\n pipe_out = pipe_in.generatePipe(parts[0], channelsToGenerate);\n pipe_out.name=pipe_in.toString()+pipe_suffix;\n } else {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n }\n }\n }",
"ModuleDefine createModuleDefine();",
"public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }",
"public interface ProcessorFactory {\n\n ProcessorFactory INSTANCE = new DefaultProcessorFactory();\n\n // TODO rbala Missing JavaDoc\n <TDef extends IElementDef> Processor<TDef> createProcessor(DynamicScopeContext context, TDef elementDef);\n\n}",
"public interface DataImporter {\t\n\t\n\t/**\n\t * Abstract method used by plugins system.\n\t * This method is called when \"load XXXX using PLUGIN_NAME(PARAMS)\"\n\t * is executed in Cli.\n\t * \n\t * @param modname destination of import\n\t * @param data must contain data to be interpreted\n\t * @param params params to be parsed by importer\n\t * @throws FilterException\n\t */\n\tpublic void importData(String modname, String data, String params) throws FilterException;\n\n\t/**\n\t * Imports into a given object. Source of import is given in specific ImportFilter constructor, which is depending\n\t * on concrete implementation. This method may be called only once after filter creation. \n\t * \n\t * @param parent object inside which objects will be imported\n\t * @return returns OID of a newly created object \n\t * @throws DatabaseException\n\t * @throws FilterException\n\t * @throws ShadowObjectException \n\t */\n\tOID [] importInto(OID parent) throws DatabaseException, FilterException, ShadowObjectException;\n}",
"public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}",
"@Override\n\tpublic IChunkProvider createChunkGenerator()\n\t{\n\t\treturn new ChunkProviderHeaven(worldObj, worldObj.getSeed(), true);\n\t}",
"private Pipeline getPipelineObject() throws Exception{\n String populatorClassname = \"\";\n try { \n populatorClassname = getStringProperty(ParameterList.POP_PIPELINE, false).replaceAll(\"\\\\s\", \"\");\n Class<?> populatorClass = Class.forName(populatorClassname);\n Constructor<?> populatorConstructor = populatorClass.getConstructor();\n return (Pipeline)populatorConstructor.newInstance();\n } \n catch (ClassNotFoundException e) {\n throw new ClassNotFoundException(\"Error loading the pipeline. Class \" + populatorClassname + \" not found\", e);\n } \n }",
"public interface RecordEventsProcessorFactory<TResult> {\r\n\r\n\t/**\r\n\t * @param res the result to feed by processor\r\n\t */\r\n\tpublic RecordEventsProcessor create(TResult res);\r\n\t\r\n}",
"public CLONDATAFactoryImpl() {\n\t\tsuper();\n\t}",
"Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;",
"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}",
"UsageevolutionFactory getUsageevolutionFactory();",
"public InputSource getInputSource()\n throws ProcessingException, IOException {\n try {\n InputSource newObject = new InputSource(this.source.getInputStream());\n newObject.setSystemId(this.getSystemId());\n return newObject;\n } catch (SourceException se) {\n throw SourceUtil.handle(se);\n }\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public static IDataFlowController getDataflowController(ARecordType recordType, IHyracksTaskContext ctx,\n int partition, IExternalDataSourceFactory dataSourceFactory, IDataParserFactory dataParserFactory,\n Map<String, String> configuration, boolean indexingOp, boolean isFeed, FileSplit[] feedLogFileSplits)\n throws Exception {\n FeedLogManager feedLogManager = null;\n if (isFeed) {\n feedLogManager = FeedUtils.getFeedLogManager(ctx, partition, feedLogFileSplits);\n }\n switch (dataSourceFactory.getDataSourceType()) {\n case RECORDS:\n IDataFlowController recordDataFlowController = null;\n IRecordReaderFactory<?> recordReaderFactory = (IRecordReaderFactory<?>) dataSourceFactory;\n IRecordReader<?> recordReader = recordReaderFactory.createRecordReader(ctx, partition);\n recordReader.configure(configuration);\n IRecordDataParserFactory<?> recordParserFactory = (IRecordDataParserFactory<?>) dataParserFactory;\n IRecordDataParser<?> dataParser = recordParserFactory.createRecordParser(ctx);\n dataParser.configure(configuration, recordType);\n if (indexingOp) {\n recordDataFlowController = new IndexingDataFlowController(dataParser, recordReader);\n } else if (isFeed) {\n recordDataFlowController = new FeedRecordDataFlowController(feedLogManager, dataParser,\n recordReader);\n } else {\n recordDataFlowController = new RecordDataFlowController(dataParser, recordReader);\n }\n recordDataFlowController.configure(configuration, ctx);\n recordDataFlowController\n .setTupleForwarder(DataflowUtils.getTupleForwarder(configuration, feedLogManager));\n return recordDataFlowController;\n case STREAM:\n IStreamFlowController streamDataFlowController = null;\n if (isFeed) {\n streamDataFlowController = new FeedStreamDataFlowController(feedLogManager);\n } else {\n streamDataFlowController = new StreamDataFlowController();\n }\n streamDataFlowController.configure(configuration, ctx);\n streamDataFlowController\n .setTupleForwarder(DataflowUtils.getTupleForwarder(configuration, feedLogManager));\n IInputStreamProviderFactory streamProviderFactory = (IInputStreamProviderFactory) dataSourceFactory;\n streamProviderFactory.configure(configuration);\n IInputStreamProvider streamProvider = streamProviderFactory.createInputStreamProvider(ctx, partition);\n streamProvider.setFeedLogManager(feedLogManager);\n streamProvider.configure(configuration);\n IStreamDataParserFactory streamParserFactory = (IStreamDataParserFactory) dataParserFactory;\n streamParserFactory.configure(configuration);\n IStreamDataParser streamParser = streamParserFactory.createInputStreamParser(ctx, partition);\n streamParser.configure(configuration, recordType);\n AInputStream inputStream = streamProvider.getInputStream();\n streamParser.setInputStream(inputStream);\n streamDataFlowController.setStreamParser(streamParser);\n return streamDataFlowController;\n default:\n throw new AsterixException(\"Unknown data source type: \" + dataSourceFactory.getDataSourceType());\n }\n }",
"@Override\n public void startEndpoint() throws IOException, InstantiationException {\n setRunning(true);\n \n rampUpProcessorTask();\n registerComponents();\n\n startPipelines();\n startListener();\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-24 13:04:41.591 -0500\", hash_original_method = \"FA063F91D44E7D4042E286E05194EEE9\", hash_generated_method = \"669017D820CEDFE100C3C214E1FCE2C7\")\n \nstatic Instance createInstance(int sequenceType, int orientationType, Gesture gesture, String label) {\n float[] pts;\n Instance instance;\n if (sequenceType == GestureStore.SEQUENCE_SENSITIVE) {\n pts = temporalSampler(orientationType, gesture);\n instance = new Instance(gesture.getID(), pts, label);\n instance.normalize();\n } else {\n pts = spatialSampler(gesture);\n instance = new Instance(gesture.getID(), pts, label);\n }\n return instance;\n }",
"DataStreams createDataStreams();",
"private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}",
"RegistrationModule createRegistrationModule();",
"public IChunkProvider createChunkGenerator() {\n\t\treturn new ChunkProviderEnd(this.worldObj, this.worldObj.getSeed());\n\t}",
"public static InputFactory createFactory( DataSource datsrc,\n long offset, long leng )\n throws IOException {\n boolean isFile = datsrc instanceof FileDataSource;\n if ( isFile && datsrc.getCompression() == Compression.NONE ) {\n File uncompressedFile = ((FileDataSource) datsrc).getFile();\n return createFileFactory( uncompressedFile, offset, leng );\n }\n else {\n if ( isFile ) {\n logger_.warning( \"Can't map compressed file \" + datsrc.getName()\n + \" - uncompressing may improve performance\" );\n }\n else {\n logger_.info( \"Will read stream (not random-access): \"\n + datsrc );\n }\n return createSequentialFactory( datsrc, offset, leng );\n }\n }",
"Source createDatasourceFtp(Source ds, Provider prov) throws RepoxException;",
"public BackendClient loadClient() {\r\n final Injector inject = Guice.createInjector(new AbstractModule() {\r\n\r\n /*\r\n * (non-Javadoc)\r\n * \r\n * @see com.google.inject.AbstractModule#configure()\r\n */\r\n @Override\r\n protected void configure() {\r\n try {\r\n\r\n bind(BackendClient.class);\r\n if (verboseStream != null) {\r\n bind(PrintStream.class).annotatedWith(\r\n Names.named(\"verboseStream\")).toInstance(\r\n verboseStream);\r\n }\r\n bind(Boolean.class).annotatedWith(\r\n Names.named(\"verboseflag\")).toInstance(verbose);\r\n\r\n } catch (final Exception e) {\r\n e.printStackTrace();\r\n throw new IllegalStateException(e.getMessage(), e);\r\n }\r\n }\r\n\r\n // TODO: remove the if-else logic and make this more dynamic\r\n /** Provide input reader. */\r\n @Provides\r\n public DataInput provideInputReader() {\r\n DataInput input = null;\r\n final Reader inRdr = inReader;\r\n if ((inRdr != null) && (inputFormat != null)) {\r\n if (\"csv\".equalsIgnoreCase(inputFormat))\r\n input = new CSVDataInput(inRdr);\r\n else if (\"json\".equalsIgnoreCase(inputFormat))\r\n input = new JSONDataInput(inRdr);\r\n else\r\n throw new IllegalArgumentException(\"Input format \"\r\n + inputFormat + \" not supported.\"\r\n + \" Valid types are csv, json\");\r\n input.verboseOptions(verboseStream, verbose);\r\n }\r\n return input;\r\n }\r\n\r\n // TODO: remove the if-else logic and make this more dynamic\r\n @Provides\r\n public DataOutput provideOutputWriter() {\r\n DataOutput out = null;\r\n final PrintWriter oWriter = outWriter;\r\n if ((oWriter != null) && (outputFormat != null)) {\r\n if (\"csv\".equalsIgnoreCase(outputFormat)) {\r\n out = new CSVDataOutput(oWriter);\r\n } else if (\"json\".equalsIgnoreCase(outputFormat)) {\r\n out = new JSONDataOutput(oWriter);\r\n } else\r\n throw new IllegalArgumentException(\"Output format \"\r\n + outputFormat + \" not supported.\"\r\n + \" Valid types are csv, json\");\r\n out.verboseOptions(verboseStream, verbose);\r\n }\r\n return out;\r\n }\r\n\r\n /** Provides BackendInstanceWrapper instance to be injected where\r\n * \r\n * @see BackendClient\r\n * @return the backend instance wrapper */\r\n @Provides\r\n @Named(\"source\")\r\n public BackendInstanceWrapper provideSourceWrapper() {\r\n return backendInstanceWrapper(sourceDB);\r\n }\r\n\r\n @Provides\r\n @Named(\"target\")\r\n @Nullable\r\n @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE\")\r\n public BackendInstanceWrapper provideTargetWrapper() {\r\n if (targetDB != null) {\r\n return backendInstanceWrapper(targetDB);\r\n } else\r\n return null;\r\n }\r\n\r\n });\r\n return inject.getInstance(BackendClient.class);\r\n }",
"public static ReadModule newInstance(String trainingModID) {\n ReadModule fragment = new ReadModule();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, trainingModID);\n fragment.setArguments(args);\n return fragment;\n }",
"private DataSource.Factory buildDataSourceFactory() {\n return ((DemoApplication) getApplication()).buildDataSourceFactory();\n }",
"@Override\n public java.lang.AutoCloseable createInstance() {\n logger.info(\"Creating the Registry Handler Implementation Instance...\");\n\n DataBroker dataBrokerService = getDataBrokerDependency();\n RpcProviderRegistry rpcProviderRegistry = getRpcRegistryDependency();\n RegistryHandlerProvider provider = new RegistryHandlerProvider(dataBrokerService, rpcProviderRegistry);\n\n logger.info(\"Creating the Registry Handler Implementation created...\");\n\n return provider;\n }",
"ImportConfig createImportConfig();",
"public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }",
"DataFactory getDataFactory();",
"ITaskFactory<?> load(String classname);",
"DataPackage createDataPackage();",
"public interface Simpleflowmodel4pcmFactory extends EFactory {\r\n\t/**\r\n\t * The singleton instance of the factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmFactory eINSTANCE = edu.kit.kastel.scbs.simpleflowmodel4pcm.impl.Simpleflowmodel4pcmFactoryImpl\r\n\t\t\t.init();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flows</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flows</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlows createFlows();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Flow</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Flow</em>'.\r\n\t * @generated\r\n\t */\r\n\tFlow createFlow();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSource createSignatureSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Source</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Source</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSource createParameterSource();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureIdentification createSignatureIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Identification</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Identification</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterIdentification createParameterIdentification();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Generic Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Generic Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tGenericSink createGenericSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Signature Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Signature Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tSignatureSink createSignatureSink();\r\n\r\n\t/**\r\n\t * Returns a new object of class '<em>Parameter Sink</em>'.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return a new object of class '<em>Parameter Sink</em>'.\r\n\t * @generated\r\n\t */\r\n\tParameterSink createParameterSink();\r\n\r\n\t/**\r\n\t * Returns the package supported by this factory.\r\n\t * <!-- begin-user-doc -->\r\n\t * <!-- end-user-doc -->\r\n\t * @return the package supported by this factory.\r\n\t * @generated\r\n\t */\r\n\tSimpleflowmodel4pcmPackage getSimpleflowmodel4pcmPackage();\r\n\r\n}",
"@POST\n @Path(\"/source/\")\n @Consumes(\"application/json;charset=UTF-8\")\n @Produces(\"application/json;charset=UTF-8\")\n @RolesAllowed(Roles.ADMIN)\n @GZIP\n @NoCache\n public SourceVo createSource(SourceVo source) throws Exception {\n log.info(\"Creating source \" + source);\n return sourceService.createSource(new Source(source))\n .toVo(DataFilter.get());\n }",
"Imports createImports();",
"private void createCameraSource() {\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, fireFaceOverlay);\n cameraSource.setFacing(CameraSource.CAMERA_FACING_FRONT);\n }\n\n try {\n processor = new FaceDetectionProcessor();\n processor.setFaceDetectionResultListener(getFaceDetectionListener());\n processor.setCustomization(cameraScreenCustomization);\n cameraSource.setMachineLearningFrameProcessor(processor);\n } catch (Exception e) {\n Logger.e(TAG, \"Can not create image processor: \" + Log.getStackTraceString(e));\n }\n\n }",
"public interface MappingScriptFactory<T> {\n\t\n\t/**\n\t * \n\t * Create \n\t * \n\t * \n\t * @param scripts\n\t * @return\n\t */\n\tpublic MappingScript<T> create(InputStream... scripts);\n\n}",
"public MPublishNewMp3StepItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}",
"interface WithJobPreparation {\n /**\n * Specifies jobPreparation.\n * @param jobPreparation The specified actions will run on all the nodes that are part of the job\n * @return the next definition stage\n */\n WithCreate withJobPreparation(JobPreparation jobPreparation);\n }",
"public interface RunnableFactory {\n\n\t/**\n\t * Yields a new instance of the runnable.\n\t */\n\n Runnable mk();\n}",
"public static CLONDATAFactory init() {\n\t\ttry {\n\t\t\tCLONDATAFactory theCLONDATAFactory = (CLONDATAFactory) EPackage.Registry.INSTANCE.getEFactory(\n\t\t\t\tCLONDATAPackage.eNS_URI);\n\t\t\tif (theCLONDATAFactory != null) {\n\t\t\t\treturn theCLONDATAFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CLONDATAFactoryImpl();\n\t}",
"Implementation createImplementation();",
"@Override\n public void populateDAG(DAG dag, Configuration conf)\n {\n DummyOutputOperator combinedConsole = dag.addOperator(\"console\", new DummyOutputOperator());\n \n FileInputReaderWithShutDown inputOp = dag.addOperator(\"inputWordsReader\", new FileInputReaderWithShutDown());\n inputOp.setDirectory(\"/media/isha/apex-samples/sampleInput1\");\n dag.addStream(\"stream1\", inputOp.output, combinedConsole.input1);\n \n FileInputReaderWithoutShutDownException inputOp1 = dag.addOperator(\"inputTextReader1\", new FileInputReaderWithoutShutDownException());\n inputOp1.setDirectory(\"/media/isha/apex-samples/sampleInput2\");\n dag.addStream(\"stream2\", inputOp1.output, combinedConsole.input2);\n }",
"Source createDatasourceZ3950IdFile(Source ds, Provider prov) throws RepoxException;",
"interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl 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 SourceControl create(Context context);\n }",
"public void start() { \t\n try {\n \tTask task = new FileTask(fileScanner);\n \tTaskDescription taskDescription = new TaskDescription();\n \ttaskDescription.setName(name + \"-FILE-EP\");\n \ttaskDescription.setTaskGroup(\"FILE-EP\");\n \ttaskDescription.setInterval(interval);\n \ttaskDescription.setIntervalInMs(true);\n \ttaskDescription.addResource(TaskDescription.INSTANCE, task);\n \ttaskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName());\n \tstartUpController = new StartUpController();\n \tstartUpController.setTaskDescription(taskDescription);\n \tstartUpController.init(synapseEnvironment);\n\n } catch (Exception e) {\n log.error(\"Could not start File Processor. Error starting up scheduler. Error: \" + e.getLocalizedMessage());\n }\n }",
"TransformFactory getFactory();",
"public static IPSGroupProviderInstance newInstance(Element source)\n throws PSUnknownNodeTypeException\n {\n validateElementName(source, XML_NODE_NAME);\n PSXmlTreeWalker tree = new PSXmlTreeWalker(source);\n String className = getRequiredElement(tree, CLASSNAME_ATTR);\n IPSGroupProviderInstance newInstance = null;\n try\n {\n Class newClass = Class.forName(className);\n if (validateClass(newClass))\n {\n newInstance = (IPSGroupProviderInstance)newClass.newInstance();\n }\n }\n catch (IllegalAccessException e) {}\n catch (ClassNotFoundException e) {}\n catch (InstantiationException e) {}\n\n if (newInstance == null)\n {\n Object[] args = {XML_NODE_NAME, CLASSNAME_ATTR, className};\n throw new PSUnknownNodeTypeException(\n IPSObjectStoreErrors.XML_ELEMENT_INVALID_CHILD, args);\n }\n\n newInstance.fromXml(source, null, null);\n return newInstance;\n }",
"public GasPump2(AbstractFactory abstractFactory)\n {\n this.abstractFactory=abstractFactory;\n this.datastore=abstractFactory.getDatastore();\n this.mda_efsm=new MDA_EFSM(new OutputProcessor(abstractFactory));\n }",
"public Object run(ModelFactory factory);",
"public interface ITaskFactoryLoader {\n\n\t/**\n\t * Dynamically load an ITaskFactory instance given its class name. \n\t * @param classname The fully qualified class name of the desired ITaskFactory class.\n\t * @return An ITaskFactory instance.\n\t */\n\tITaskFactory<?> load(String classname);\n\n}",
"public static DataFactory init() {\n\t\ttry {\n\t\t\tDataFactory theDataFactory = (DataFactory)EPackage.Registry.INSTANCE.getEFactory(DataPackage.eNS_URI);\n\t\t\tif (theDataFactory != null) {\n\t\t\t\treturn theDataFactory;\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 DataFactoryImpl();\n\t}"
] | [
"0.69046336",
"0.6038869",
"0.5625045",
"0.5584488",
"0.54186594",
"0.54104656",
"0.51985157",
"0.5014326",
"0.48907024",
"0.48883158",
"0.4855216",
"0.47690868",
"0.4755281",
"0.47363868",
"0.47303647",
"0.47166926",
"0.47160622",
"0.470631",
"0.47059843",
"0.46780673",
"0.4670765",
"0.46556175",
"0.46204978",
"0.46191877",
"0.4601721",
"0.4601721",
"0.45992142",
"0.45956588",
"0.45610493",
"0.45559216",
"0.45488787",
"0.45401585",
"0.4507802",
"0.450602",
"0.4496505",
"0.44957393",
"0.44721732",
"0.4468518",
"0.44664904",
"0.44664904",
"0.44578037",
"0.44553718",
"0.4450925",
"0.44474855",
"0.44410506",
"0.44407156",
"0.44357166",
"0.4430355",
"0.4419975",
"0.44139633",
"0.44129515",
"0.44107726",
"0.44076037",
"0.43916392",
"0.43907532",
"0.43847987",
"0.43794516",
"0.43629912",
"0.43556622",
"0.43402877",
"0.4335222",
"0.43288225",
"0.43216768",
"0.43164858",
"0.43146566",
"0.43137068",
"0.431359",
"0.4310111",
"0.43081865",
"0.43064782",
"0.42853153",
"0.427098",
"0.42639524",
"0.4260908",
"0.4258965",
"0.42552552",
"0.4252323",
"0.42453817",
"0.42372736",
"0.4234159",
"0.42282465",
"0.42279541",
"0.42232373",
"0.42207512",
"0.4217443",
"0.4217002",
"0.4214935",
"0.42149124",
"0.42116213",
"0.42107385",
"0.42009094",
"0.4194988",
"0.41830745",
"0.41815934",
"0.4179093",
"0.41788885",
"0.41743216",
"0.4173165",
"0.4168328",
"0.41634965"
] | 0.68936783 | 1 |
Queries the factory to determine if it is capable of creating file ingest modules. If the module family does not include file ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that returns false. | boolean isFileIngestModuleFactory(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isDataSourceIngestModuleFactory();",
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"boolean hasImportConfiguration();",
"public boolean supports (String moduleUri);",
"public IStatus canAddModule(IModule module);",
"public boolean isFileformatRegistered(String fileformat)\r\n\t\t\tthrows ProcessingException;",
"private boolean isSupportedFile(Object fileObject) {\n\t\tif (fileObject instanceof IAdaptable)\n\t\t\treturn castToIFile(fileObject).getFileExtension().equals(TestCasePersister.FILE_EXTENSION);\n\t\t\t\n\t\treturn false;\n\t}",
"public boolean hasModule() {\n return fieldSetFlags()[2];\n }",
"boolean hasCreateTaskPack();",
"@java.lang.Deprecated boolean hasFile();",
"public static boolean isModuleFile(VirtualFile file) {\n if (file == null) {\n return false;\n }\n FileType type = file.getFileType();\n return type.equals(MPSFileTypeFactory.LANGUAGE_FILE_TYPE) ||\n type.equals(MPSFileTypeFactory.SOLUTION_FILE_TYPE) ||\n type.equals(MPSFileTypeFactory.DEVKIT_FILE_TYPE);\n }",
"@Override\r\n public boolean isFile() throws FileSystemException {\r\n // Use equals instead of == to avoid any class loader worries.\r\n return FileType.FILE.equals(this.getType());\r\n }",
"public boolean supportsServeModulesWithoutPublish();",
"@Override\n\tpublic boolean isFile() {\n\t\treturn true;\n\t}",
"public boolean importable()\r\n\t{\r\n\t\treturn isImportable(getInputStream());\r\n\t}",
"public boolean isSetFileType()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FILETYPE$8) != 0;\n }\n }",
"FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);",
"boolean isImageType();",
"public boolean hasImportConfiguration() {\n return importConfigurationBuilder_ != null || importConfiguration_ != null;\n }",
"public boolean isSetFileType() {\n return this.fileType != null;\n }",
"public boolean isFile() { return true; }",
"@Override\n public boolean needsFormat()\n {\n return delegates.stream().anyMatch(SplittableInputSource::needsFormat);\n }",
"boolean hasInodeFile();",
"public final static native boolean isSupported() /*-{\r\n return !!$wnd.FileReader;\r\n }-*/;",
"boolean hasPlainImport();",
"@InputValidation(IValidationStrategy.PROCESS.class)\r\npublic interface IFileFormatService extends IService2 {\r\n\r\n\t/**\r\n\t * Saves new file formats into storage\r\n\t * \r\n\t * @param formData\r\n\t * FileFormatFormData\r\n\t * @return the assigned FileFormatFormData\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic FileFormatFormData create(FileFormatFormData formData)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Deletes all file formats from storage having one of the assigned ids\r\n\t * \r\n\t * @param ids\r\n\t * Long[]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic void delete(Long[] ids) throws ProcessingException;\r\n\r\n\t/**\r\n\t * Modifies the assigned file format in the storage\r\n\t * \r\n\t * @param formData\r\n\t * FileFormatFormData\r\n\t * @return the assigned FileFormatFormData\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic FileFormatFormData update(FileFormatFormData formData)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches all formats which belongs to the assigned file type id from\r\n\t * storage [file format id, format, file type]\r\n\t * \r\n\t * @param filetypeNr\r\n\t * Long\r\n\t * @return Object[][]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Object[][] getFileFormats(Long filetypeNr)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Decides whether there are more than one file type the assigned file\r\n\t * format belongs to\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return boolean [true for multiple file format - file type connections]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic boolean isFormatMultipleAssigned(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches the file type id for the assigned file format from storage\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return Long [file type id]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Long getFiletypeForFileFormat(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Returns true if the assigned file format has already been stored\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return boolean\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic boolean isFileformatRegistered(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n\r\n\t/**\r\n\t * Fetches an Array of ids of all file types, the assigned file format\r\n\t * belongs to\r\n\t * \r\n\t * @param fileformat\r\n\t * String\r\n\t * @return Long[]\r\n\t * @throws ProcessingException\r\n\t */\r\n\tpublic Long[] getFiletypesForFileFormat(String fileformat)\r\n\t\t\tthrows ProcessingException;\r\n}",
"public boolean isFile() { return false; }",
"public boolean isKnownFileType(FileType t) {\n\treturn knownTypes.contains(t);\r\n }",
"boolean hasInodeDirectoryIdGenerator();",
"public boolean hasImportConfiguration() {\n return importConfiguration_ != null;\n }",
"boolean hasSourceFile();",
"@Override \r\n public boolean needsEmfService() { return false; }",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"IFMLModule createIFMLModule();",
"@Override\n public boolean isFactoryForType(Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isFactoryForType(Object object) {\n\t\tif (object == modelPackage) {\n\t\t\treturn true;\n\t\t}\n\t\tif (object instanceof EObject) {\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isFileByFile() {\n return fileByFile;\n }",
"@Override\n\tpublic void typeCheck()\n\t{\n\t\t// Check for module name duplication\n\n\t\tboolean nothing = true;\n\t\tboolean hasFlat = false;\n\n\t\tfor (AModuleModules m1 : modules)\n\t\t{\n\t\t\tfor (AModuleModules m2 : modules)\n\t\t\t{\n\t\t\t\tif (m1 != m2 && m1.getName().equals(m2.getName()))\n\t\t\t\t{\n\t\t\t\t\tTypeChecker.report(3429, \"Module \" + m1.getName()\n\t\t\t\t\t\t\t+ \" duplicates \" + m2.getName(), m1.getName().getLocation());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (m1.getIsFlat())\n\t\t\t{\n\t\t\t\thasFlat = true;\n\t\t\t} else\n\t\t\t{\n\t\t\t\tif (hasFlat && Settings.release == Release.CLASSIC)\n\t\t\t\t{\n\t\t\t\t\tTypeChecker.report(3308, \"Cannot mix modules and flat specifications\", m1.getName().getLocation());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!m1.getTypeChecked())\n\t\t\t{\n\t\t\t\tnothing = false;\n\t\t\t}\n\t\t}\n\n\t\tif (nothing)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n \t\t// Mark top level definitions of flat specifications as used\n \t\tnew PDefinitionAssistantTC(new TypeCheckerAssistantFactory());\n \t\t\n \t\tfor (AModuleModules module: modules)\n \t\t{\n \t\t\tif (module instanceof CombinedDefaultModule)\n \t\t\t{\n\t \t\t\tfor (PDefinition definition: module.getDefs())\n\t \t\t\t{\n \t\t\t\t\tassistantFactory.createPDefinitionAssistant().markUsed(definition);\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n\t\t// Generate implicit definitions for pre_, post_, inv_ functions etc.\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tif (!m.getTypeChecked())\n\t\t\t{\n\t\t\t\tEnvironment env = new ModuleEnvironment(assistantFactory, m);\n\t\t\t\tassistantFactory.createPDefinitionListAssistant().implicitDefinitions(m.getDefs(), env);\n\t\t\t}\n\t\t}\n\n\t\t// Exports have to be identified before imports can be processed.\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tif (!m.getTypeChecked())\n\t\t\t{\n\t\t\t\tassistantFactory.createAModuleModulesAssistant().processExports(m); // Populate exportDefs\n\t\t\t}\n\t\t}\n\n\t\t// Process the imports early because renamed imports create definitions\n\t\t// which can affect type resolution.\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tif (!m.getTypeChecked())\n\t\t\t{\n\t\t\t\tassistantFactory.createAModuleModulesAssistant().processImports(m, modules); // Populate importDefs\n\t\t\t}\n\t\t}\n\n\t\t// Create a list of all definitions from all modules, including\n\t\t// imports of renamed definitions.\n\n\t\tList<PDefinition> alldefs = new Vector<PDefinition>();\n\t\tList<PDefinition> checkDefs = new Vector<PDefinition>();\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tfor (PDefinition d : m.getImportdefs())\n\t\t\t{\n\t\t\t\talldefs.add(d);\n\t\t\t\tif (!m.getTypeChecked())\n\t\t\t\t{\n\t\t\t\t\tcheckDefs.add(d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tfor (PDefinition d : m.getDefs())\n\t\t\t{\n\t\t\t\talldefs.add(d);\n\t\t\t\tif (!m.getTypeChecked())\n\t\t\t\t{\n\t\t\t\t\tcheckDefs.add(d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attempt type resolution of unchecked definitions from all modules.\n\t\tEnvironment env = new FlatCheckedEnvironment(assistantFactory, alldefs, NameScope.NAMESANDSTATE);\n\t\tTypeCheckVisitor tc = new TypeCheckVisitor();\n\t\tfor (PDefinition d : checkDefs)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tassistantFactory.createPDefinitionAssistant().typeResolve(d, tc, new TypeCheckInfo(new TypeCheckerAssistantFactory(), env));\n\t\t\t} catch (TypeCheckException te)\n\t\t\t{\n\t\t\t\treport(3430, te.getMessage(), te.location);\n\t\t\t} catch (AnalysisException te)\n\t\t\t{\n\t\t\t\treport(3431, te.getMessage(), null);// FIXME: internal error\n\t\t\t}\n\t\t}\n\n\t\t// Proceed to type check all definitions, considering types, values\n\t\t// and remaining definitions, in that order.\n\n\t\tfor (Pass pass : Pass.values())\n\t\t{\n\t\t\tfor (AModuleModules m : modules)\n\t\t\t{\n\t\t\t\tif (!m.getTypeChecked())\n\t\t\t\t{\n\t\t\t\t\tEnvironment e = new ModuleEnvironment(assistantFactory, m);\n\n\t\t\t\t\tfor (PDefinition d : m.getDefs())\n\t\t\t\t\t{\n\t\t\t\t\t\t// System.out.println(\"Number of Defs: \" + m.getDefs().size());\n\t\t\t\t\t\t// System.out.println(\"Def to typecheck: \" + d.getName());\n\t\t\t\t\t\tif (d.getPass() == pass)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\td.apply(tc, new TypeCheckInfo(assistantFactory, e, NameScope.NAMES));\n\t\t\t\t\t\t\t\t// System.out.println();\n\t\t\t\t\t\t\t} catch (TypeCheckException te)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treport(3431, te.getMessage(), te.location);\n\t\t\t\t\t\t\t} catch (AnalysisException te)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treport(3431, te.getMessage(), null);// FIXME: internal error\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// System.out.println(\"Number of Defs: \" + m.getDefs().size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Report any discrepancies between the final checked types of\n\t\t// definitions and their explicit imported types.\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tif (!m.getTypeChecked())\n\t\t\t{\n\t\t\t\t// TODO\n\t\t\t\tassistantFactory.createAModuleModulesAssistant().processImports(m, modules); // Re-populate importDefs\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// TODO\n\t\t\t\t\tassistantFactory.createAModuleModulesAssistant().typeCheckImports(m);\n\t\t\t\t\t// m.typeCheckImports(); // Imports compared to exports\n\t\t\t\t} catch (TypeCheckException te)\n\t\t\t\t{\n\t\t\t\t\treport(3432, te.getMessage(), te.location);\n\t\t\t\t} catch (AnalysisException te)\n\t\t\t\t{\n\t\t\t\t\treport(3431, te.getMessage(), null);// FIXME: internal error\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Any names that have not been referenced or exported produce \"unused\"\n\t\t// warnings.\n\n\t\tfor (AModuleModules m : modules)\n\t\t{\n\t\t\tif (!m.getTypeChecked())\n\t\t\t{\n\t\t\t\tassistantFactory.createPDefinitionListAssistant().unusedCheck(m.getImportdefs());\n\t\t\t\tassistantFactory.createPDefinitionListAssistant().unusedCheck(m.getDefs());\n\t\t\t}\n\t\t}\n\t}",
"public boolean isExtension(FeatureModel featureModel) throws OperationNotSupportedException, FMReasoningException {\n\t\tthrow new OperationNotSupportedException(\"Reasoning Operation Not Supported\");\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject) object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private static boolean willGenerateExtentionFor(IInterfaceDefinition iDef, Environment base)\n \t{\n \t\treturn base.lookUpType(iDef.getName().getName()) != null && !isUtilityOrTemplateClass(iDef, base);\n \t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isFactoryForType(Object object) {\r\n\t\tif (object == modelPackage) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif (object instanceof EObject) {\r\n\t\t\treturn ((EObject)object).eClass().getEPackage() == modelPackage;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n public boolean isFactoryForType(Object object) {\r\n if (object == modelPackage) {\r\n return true;\r\n }\r\n if (object instanceof EObject) {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\n public boolean isFactoryForType(final Object object) {\n if (object == modelPackage) {\n return true;\n }\n if (object instanceof EObject) {\n return ((EObject) object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"private Module createModule() throws Exception\n {\n Map headerMap = m_archive.getCurrentRevision().getManifestHeader();\n\n // Create the module instance.\n ModuleImpl module = new ModuleImpl(\n getFramework().getLogger(),\n getFramework().getConfig(),\n getFramework().getResolver(),\n this,\n Long.toString(getBundleId())\n + \".\" + m_archive.getCurrentRevisionNumber().toString(),\n headerMap,\n m_archive.getCurrentRevision().getContent(),\n getFramework().getBundleStreamHandler(),\n getFramework().getBootPackages(),\n getFramework().getBootPackageWildcards());\n\n // Verify that the bundle symbolic name + version is unique.\n if (module.getManifestVersion().equals(\"2\"))\n {\n Version bundleVersion = module.getVersion();\n bundleVersion = (bundleVersion == null) ? Version.emptyVersion : bundleVersion;\n String symName = module.getSymbolicName();\n\n Bundle[] bundles = getFramework().getBundles();\n for (int i = 0; (bundles != null) && (i < bundles.length); i++)\n {\n long id = ((BundleImpl) bundles[i]).getBundleId();\n if (id != getBundleId())\n {\n String sym = bundles[i].getSymbolicName();\n Version ver = ((ModuleImpl)\n ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();\n if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))\n {\n throw new BundleException(\n \"Bundle symbolic name and version are not unique: \"\n + sym + ':' + ver, BundleException.DUPLICATE_BUNDLE_ERROR);\n }\n }\n }\n }\n\n return module;\n }",
"public boolean isFileTransferSupported() {\n\t\tLogger.i(TAG, \"isFileTransferSupported value \" + fileTransfer);\n\t\treturn fileTransfer;\n\t}",
"@Override\n\t\tprotected boolean isSplitable(FileSystem fs, Path filename) {\n\t\t\treturn false;\n\t\t}",
"interface ExternalModuleChecker {\n\t/**\n\t * To check is external-module registered well\n\t *\n\t * @param module module to check\n\t * @return true if registered well\n\t */\n\tboolean isValidModule(ExternalModule module);\n}",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"@Override\n public boolean isFactoryForType(Object object)\n {\n if (object == modelPackage)\n {\n return true;\n }\n if (object instanceof EObject)\n {\n return ((EObject)object).eClass().getEPackage() == modelPackage;\n }\n return false;\n }",
"boolean isFile() throws IOException;",
"ModuleDefinition createModuleDefinition();",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"@Override\r\n public boolean isFactoryForType(Object object)\r\n {\r\n if (object == modelPackage)\r\n {\r\n return true;\r\n }\r\n if (object instanceof EObject)\r\n {\r\n return ((EObject)object).eClass().getEPackage() == modelPackage;\r\n }\r\n return false;\r\n }",
"public boolean hasTaskContextModel() {\n\t\tFile folder = new File(folderPath);\n\t\t\n\t\tFile[] jsonFiles = folder.listFiles(jsonfilter);\n\t\t\n\t\tif ((jsonFiles.length >0)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean getUseFiles();",
"protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}",
"public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean getImportConfigurationNull();",
"public boolean accepts(File f);",
"boolean hasProvider();",
"public boolean canHandle(DynamicMetadataSource source);"
] | [
"0.72566247",
"0.6108547",
"0.56065243",
"0.5457641",
"0.52594924",
"0.5169605",
"0.50695616",
"0.5018223",
"0.49601626",
"0.48936483",
"0.4893472",
"0.4880889",
"0.4879384",
"0.48738584",
"0.48540542",
"0.48403725",
"0.48363596",
"0.48014325",
"0.47677103",
"0.47625712",
"0.47521177",
"0.47210866",
"0.47152483",
"0.4703964",
"0.4697844",
"0.46899784",
"0.46871597",
"0.46840656",
"0.4679566",
"0.4674369",
"0.46695006",
"0.4666264",
"0.46269476",
"0.46269476",
"0.46269476",
"0.46269476",
"0.46254146",
"0.46220693",
"0.46208167",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46144563",
"0.46131286",
"0.46089956",
"0.46051875",
"0.45958745",
"0.45958745",
"0.45938063",
"0.45848438",
"0.45848438",
"0.45848438",
"0.45848438",
"0.45827922",
"0.45827892",
"0.45815828",
"0.4581389",
"0.4578593",
"0.45766693",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45733932",
"0.45546952",
"0.45393503",
"0.4527486",
"0.4527486",
"0.4527486",
"0.4527486",
"0.4527486",
"0.4527486",
"0.45214266",
"0.4509817",
"0.4495637",
"0.44938207",
"0.4486922",
"0.44541508",
"0.44406494",
"0.4440028"
] | 0.8308917 | 0 |
Creates a file ingest module instance. Autopsy will generally use the factory to several instances of each type of module for each ingest job it performs. Completing an ingest job entails processing a single data source (e.g., a disk image) and all of the files from the data source, including files extracted from archives and any unallocated space (made to look like a series of files). The data source is passed through one or more pipelines of data source ingest modules. The files are passed through one or more pipelines of file ingest modules. The ingest framework may use multiple threads to complete an ingest job, but it is guaranteed that there will be no more than one module instance per thread. However, if the module instances must share resources, the modules are responsible for synchronizing access to the shared resources and doing reference counting as required to release those resources correctly. Also, more than one ingest job may be in progress at any given time. This must also be taken into consideration when sharing resources between module instances. modules. If the module family does not include file ingest modules, the factory may extend IngestModuleFactoryAdapter to get an implementation of this method that throws an UnsupportedOperationException. | FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IngestModuleFactory {\n\n /**\n * Gets the display name that identifies the family of ingest modules the\n * factory creates. Autopsy uses this string to identify the module in user\n * interface components and log messages. The module name must be unique. so\n * a brief but distinctive name is recommended.\n *\n * @return The module family display name.\n */\n String getModuleDisplayName();\n\n /**\n * Gets a brief, user-friendly description of the family of ingest modules\n * the factory creates. Autopsy uses this string to describe the module in\n * user interface components.\n *\n * @return The module family description.\n */\n String getModuleDescription();\n\n /**\n * Gets the version number of the family of ingest modules the factory\n * creates.\n *\n * @return The module family version number.\n */\n String getModuleVersionNumber();\n\n /**\n * Queries the factory to determine if it provides a user interface panel to\n * allow a user to change settings that are used by all instances of the\n * family of ingest modules the factory creates. For example, the Autopsy\n * core hash lookup ingest module factory provides a global settings panel\n * to import and create hash databases. The hash databases are then enabled\n * or disabled per ingest job using an ingest job settings panel. If the\n * module family does not have global settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides a global settings panel.\n */\n boolean hasGlobalSettingsPanel();\n\n /**\n * Gets a user interface panel that allows a user to change settings that\n * are used by all instances of the family of ingest modules the factory\n * creates. For example, the Autopsy core hash lookup ingest module factory\n * provides a global settings panel to import and create hash databases. The\n * imported hash databases are then enabled or disabled per ingest job using\n * ingest an ingest job settings panel. If the module family does not have a\n * global settings, the factory may extend IngestModuleFactoryAdapter to get\n * an implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @return A global settings panel.\n */\n IngestModuleGlobalSettingsPanel getGlobalSettingsPanel();\n\n /**\n * Gets the default per ingest job settings for instances of the family of\n * ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest modules family uses hash databases imported or created\n * using its global settings panel. All of the hash databases are enabled by\n * default for an ingest job. If the module family does not have per ingest\n * job settings, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns an instance of the\n * NoIngestModuleJobSettings class.\n *\n * @return The default ingest job settings.\n */\n IngestModuleIngestJobSettings getDefaultIngestJobSettings();\n\n /**\n * Queries the factory to determine if it provides user a interface panel to\n * allow a user to make per ingest job settings for instances of the family\n * of ingest modules the factory creates. For example, the Autopsy core hash\n * lookup ingest module factory provides an ingest job settings panels to\n * enable or disable hash databases per ingest job. If the module family\n * does not have per ingest job settings, the factory may extend\n * IngestModuleFactoryAdapter to get an implementation of this method that\n * returns false.\n *\n * @return True if the factory provides ingest job settings panels.\n */\n boolean hasIngestJobSettingsPanel();\n\n /**\n * Gets a user interface panel that can be used to set per ingest job\n * settings for instances of the family of ingest modules the factory\n * creates. For example, the core hash lookup ingest module factory provides\n * an ingest job settings panel to enable or disable hash databases per\n * ingest job. If the module family does not have per ingest job settings,\n * the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that throws an\n * UnsupportedOperationException.\n *\n * @param settings Per ingest job settings to initialize the panel.\n *\n * @return An ingest job settings panel.\n */\n IngestModuleIngestJobSettingsPanel getIngestJobSettingsPanel(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating data source\n * ingest modules. If the module family does not include data source ingest\n * modules, the factory may extend IngestModuleFactoryAdapter to get an\n * implementation of this method that returns false.\n *\n * @return True if the factory can create data source ingest modules.\n */\n boolean isDataSourceIngestModuleFactory();\n\n /**\n * Creates a data source ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include data source ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A data source ingest module instance.\n */\n DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);\n\n /**\n * Queries the factory to determine if it is capable of creating file ingest\n * modules. If the module family does not include file ingest modules, the\n * factory may extend IngestModuleFactoryAdapter to get an implementation of\n * this method that returns false.\n *\n * @return True if the factory can create file ingest modules.\n */\n boolean isFileIngestModuleFactory();\n\n /**\n * Creates a file ingest module instance.\n * <p>\n * Autopsy will generally use the factory to several instances of each type\n * of module for each ingest job it performs. Completing an ingest job\n * entails processing a single data source (e.g., a disk image) and all of\n * the files from the data source, including files extracted from archives\n * and any unallocated space (made to look like a series of files). The data\n * source is passed through one or more pipelines of data source ingest\n * modules. The files are passed through one or more pipelines of file\n * ingest modules.\n * <p>\n * The ingest framework may use multiple threads to complete an ingest job,\n * but it is guaranteed that there will be no more than one module instance\n * per thread. However, if the module instances must share resources, the\n * modules are responsible for synchronizing access to the shared resources\n * and doing reference counting as required to release those resources\n * correctly. Also, more than one ingest job may be in progress at any given\n * time. This must also be taken into consideration when sharing resources\n * between module instances. modules.\n * <p>\n * If the module family does not include file ingest modules, the factory\n * may extend IngestModuleFactoryAdapter to get an implementation of this\n * method that throws an UnsupportedOperationException.\n *\n * @param settings The settings for the ingest job.\n *\n * @return A file ingest module instance.\n */\n FileIngestModule createFileIngestModule(IngestModuleIngestJobSettings settings);\n}",
"DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings settings);",
"boolean isFileIngestModuleFactory();",
"@Override\n public AlgorithmProcess createProcess() {\n return new FileLoaderProcess(file);\n }",
"IFMLModule createIFMLModule();",
"ModuleDefinition createModuleDefinition();",
"Module createModule();",
"@Emitter\n public InputSource createWorker() {\n return new InputSource(configuration, jsonFactory, jsonb, service, members);\n \n }",
"private Module createModule() throws Exception\n {\n Map headerMap = m_archive.getCurrentRevision().getManifestHeader();\n\n // Create the module instance.\n ModuleImpl module = new ModuleImpl(\n getFramework().getLogger(),\n getFramework().getConfig(),\n getFramework().getResolver(),\n this,\n Long.toString(getBundleId())\n + \".\" + m_archive.getCurrentRevisionNumber().toString(),\n headerMap,\n m_archive.getCurrentRevision().getContent(),\n getFramework().getBundleStreamHandler(),\n getFramework().getBootPackages(),\n getFramework().getBootPackageWildcards());\n\n // Verify that the bundle symbolic name + version is unique.\n if (module.getManifestVersion().equals(\"2\"))\n {\n Version bundleVersion = module.getVersion();\n bundleVersion = (bundleVersion == null) ? Version.emptyVersion : bundleVersion;\n String symName = module.getSymbolicName();\n\n Bundle[] bundles = getFramework().getBundles();\n for (int i = 0; (bundles != null) && (i < bundles.length); i++)\n {\n long id = ((BundleImpl) bundles[i]).getBundleId();\n if (id != getBundleId())\n {\n String sym = bundles[i].getSymbolicName();\n Version ver = ((ModuleImpl)\n ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();\n if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))\n {\n throw new BundleException(\n \"Bundle symbolic name and version are not unique: \"\n + sym + ':' + ver, BundleException.DUPLICATE_BUNDLE_ERROR);\n }\n }\n }\n }\n\n return module;\n }",
"public GridFSInputFile createFile(byte[] data) {\n\treturn createFile(new ByteArrayInputStream(data), true);\n }",
"public InputFewStepsFactoryImpl() {\n\t\tsuper();\n\t}",
"Flows createFlows();",
"public CreateInputFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tEXCEL_FILE = new FileInputStream(new File(INPUT_FILE_NAME));\n\t\t\t/* Log File */\n\t\t\tLOG_WRITER = writerCreator(LOG_FILE, BLANK);\n\t\t\tLOG_WRITER.write(START_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\tSystem.out.println(NEW_LINE + START_TIME + new java.util.Date() + LINE_SEPERATOR);\n\n\t\t\t/* Service Part Creation */\n\t\t\tSERVICE_PART_WRITER = writerCreator(SERVICE_PARTS_CREATION_INPUT_FILE,\n\t\t\t\t\tSERVICE_PART_CREATION_CONFIG);\n\n\t\t\t/* Service Form Update */\n\t\t\tSERVICE_FORM_WRITER = writerCreator(SERVICE_FORM_PROPERTIES_INPUT_FILE,\n\t\t\t\t\tSERVICE_FORM_UPDATE_CONFIG);\n\n\t\t\t/* PS_UPLOAD - Service Structures Creation \n\t\t\tPS_STRUCTURE_WRITER = writerCreator(PS_STRUCTURE_CREATION_INPUT_FILE,\n\t\t\t\t\tPS_STRUCTURE_CREATION_CONFIG); */\n\n\t\t\t/* Service Structures Creation */\n\t\t\tSTRUCTURE_WRITER = writerCreator(STRUCTURE_CREATION_INPUT_FILE,\n\t\t\t\t\tSTRUCTURE_CREATION_CONFIG);\n\n\t\t\t/* EngParts' Service Form Creation and Attachment*/\n\t\t\tEP_SERVICE_FORM_WRITER = writerCreator(EP_SERVICE_FORM_CREATION_INPUT_FILE,\n\t\t\t\t\tEP_SERVICE_FORM_CREATION_CONFIG);\n\n\t\t\t/* Service Parts' Global Alternate */\n\t\t\tSP_GLOBAL_ALT_WRITER = writerCreator(SP_GLOBAL_ALT_INPUT_FILE, BLANK);\n\n\t\t\t/* Service Parts' Group ID update */\n\t\t\tSP_GROUP_ID_WRITER = writerCreator(SP_GROUP_ID_INPUT_FILE, SP_GROUP_ID_UPDATE_CONFIG);\n\n\t\t\t/* Relate Service Parts to three types of attachments*/\n\t\t\tSP_ATTACHMENT_WRITER = writerCreator(SP_ATTACHMENT_INPUT_FILE, SP_ATTACHMENT_CONFIG);\n\n\t\t\t/* Made From Relation Creation */\n\t\t\tMADE_FROM_RELATION_WRITER = writerCreator(MADE_FROM_REL_INPUT_FILE,\n\t\t\t\t\tMADE_FROM_REL_CONFIG);\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"FileLoader createJob(Reader reader);",
"public GridFSInputFile createFile(InputStream in) {\n\treturn createFile(in, null);\n }",
"public void start() { \t\n try {\n \tTask task = new FileTask(fileScanner);\n \tTaskDescription taskDescription = new TaskDescription();\n \ttaskDescription.setName(name + \"-FILE-EP\");\n \ttaskDescription.setTaskGroup(\"FILE-EP\");\n \ttaskDescription.setInterval(interval);\n \ttaskDescription.setIntervalInMs(true);\n \ttaskDescription.addResource(TaskDescription.INSTANCE, task);\n \ttaskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName());\n \tstartUpController = new StartUpController();\n \tstartUpController.setTaskDescription(taskDescription);\n \tstartUpController.init(synapseEnvironment);\n\n } catch (Exception e) {\n log.error(\"Could not start File Processor. Error starting up scheduler. Error: \" + e.getLocalizedMessage());\n }\n }",
"public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }",
"public GridFSInputFile createFile(File f) throws IOException {\n\treturn createFile(new FileInputStream(f), f.getName(), true);\n }",
"public static InputFewStepsFactory init() {\n\t\ttry {\n\t\t\tInputFewStepsFactory theInputFewStepsFactory = (InputFewStepsFactory)EPackage.Registry.INSTANCE.getEFactory(InputFewStepsPackage.eNS_URI);\n\t\t\tif (theInputFewStepsFactory != null) {\n\t\t\t\treturn theInputFewStepsFactory;\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 InputFewStepsFactoryImpl();\n\t}",
"abstract protected T createModuleNode(NodeDescriptor node);",
"@Bean\n FileProcessor fileProcessor() {\n return new FileProcessor();\n }",
"boolean isDataSourceIngestModuleFactory();",
"public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}",
"Import createImport();",
"Import createImport();",
"public ModuleMarshaller(File file) {\n moduleFile = file;\n }",
"public GridFSInputFile createFile(InputStream in, String filename) {\n\treturn new GridFSInputFile(this, in, filename);\n }",
"public FileFormatFormData create(FileFormatFormData formData)\r\n\t\t\tthrows ProcessingException;",
"Flow createFlow();",
"public GridFSInputFile createFile(InputStream in, String filename,\n\t boolean closeStreamOnPersist) {\n\treturn new GridFSInputFile(this, in, filename, closeStreamOnPersist);\n }",
"DataFlow createDataFlow();",
"public interface IXLIFFFactory {\r\n\r\n\t/**\r\n\t * Indicates if this implementation of the object model supports a given module.\r\n\t * @param moduleUri the namespace URI of the module for which the query is made.\r\n\t * @return true if the module is supported, false if it is not.\r\n\t */\r\n\tpublic boolean supports (String moduleUri);\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IDocument}.\r\n\t * @return the new document.\r\n\t */\r\n\tpublic IDocument createDocument ();\r\n\r\n\t/**\r\n\t * Creates a new empty instance of {@link IFile}.\r\n\t * @param id the id of this file (must not be null or empty).\r\n\t * @return the new file.\r\n\t */\r\n\tpublic IFile createFile (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new empty instance of {@link IGroup}.\r\n\t * @param parent the parent group or null to create a top-level group.\r\n\t * @param id the id of the group (must not be null or empty).\r\n\t * @return the new group.\r\n\t */\r\n\tpublic IGroup createGroup (IGroup parent,\r\n\t\tString id);\r\n\t\r\n\t/**\r\n\t * Creates a new instance of {@link IUnit}.\r\n\t * @param id the id of the new unit.\r\n\t * @return the new unit.\r\n\t */\r\n\tpublic IUnit createUnit (String id);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IContent} object.\r\n\t * @param store the store to associate with the new object.\r\n\t * @param isTarget true if the new content is for the target language, false for the source.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent createContent (IStore store,\r\n\t\tboolean isTarget);\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a {@link IContent} object.\r\n\t * @param store the store that should be associated with the new content.\r\n\t * @param isTarget true if the destination is a target content.\r\n\t * @param original the original object to duplicate.\r\n\t * @return the new content.\r\n\t */\r\n\tpublic IContent copyContent (IStore store,\r\n\t\tboolean isTarget,\r\n\t\tIContent original);\r\n\t\r\n\t/**\r\n\t * Creates a copy of a {@link ISegment} object, with all its core metadata but with an empty content.\r\n\t * The method will create a new ID for the new segment.\r\n\t * @param store the store that should be associated with the new segment.\r\n\t * @param original the original object to copy.\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment copyEmptySegment (IStore store,\r\n\t\tISegment original);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} object with an empty source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new {@link IPart} with a given plain text source.\r\n\t * @param store the store associated with the new part (cannot be null).\r\n\t * @param sourcePlainText the plain text source content of the new part.\r\n\t * @return the new part.\r\n\t */\r\n\tpublic IPart createPart (IStore store,\r\n\t\tString sourcePlainText);\r\n\r\n\t/**\r\n\t * Creates a new {@link ISegment} object with an empty source.\r\n\t * @param store the store associated with the new segment (cannot be null).\r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createSegment (IStore store);\r\n\t\r\n\t/**\r\n\t * Creates a new unattached {@link ISegment} object with an empty source.\r\n\t * This segment will have its own store and cannot be used with other or within a unit.\r\n\t * Lone segments cannot use any methods related to their parent. \r\n\t * @return the new segment.\r\n\t */\r\n\tpublic ISegment createLoneSegment ();\r\n\t\r\n\t/**\r\n\t * Creates a deep copy of a given {@link ITag} object.\r\n\t * @param original the original tag to duplicate.\r\n\t * @param destinationTags the list of destination tags. This is used to find and connect\r\n\t * opening tags when creating closing tags.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic ITag copyTag (ITag original,\r\n\t\tITags destinationTags);\r\n\r\n\t/**\r\n\t * Creates a new {@link IExtObject} object.\r\n\t * @param nsUri the namespace URI of this object.\r\n\t * @param name the name of this object.\r\n\t * @return the new extension object.\r\n\t */\r\n\tpublic IExtObject createExtObject (String nsUri,\r\n\t\tString name);\r\n\t\r\n\t/**\r\n\t * Creates a new opening tag for a marker.\r\n\t * @param id the id of the marker.\r\n\t * @param type the type of the marker.\r\n\t * @return the new tag.\r\n\t */\r\n\tpublic IMTag createOpeningMTag (String id,\r\n\t\tString type);\r\n\r\n}",
"public Flow createFlow(ProcessXmlOptions options) throws IOException, InterruptedException {\n System.setProperty(\"javax.xml.parsers.DocumentBuilderFactory\",\n \"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl\");\n\n JobConf conf = new JobConf();\n conf.set(\"mapred.child.java.opts\", \"-server\");\n \n Properties props = new Properties();\n FlowConnector.setApplicationJarClass(props, ProcessXmlTool.class);\n\n if (!options.isDebugLogging()) {\n props.put(\"log4j.logger\", \"cascading=INFO\");\n }\n \n MultiMapReducePlanner.setJobConf(props, conf);\n\n Tap sourceTap = new Hfs(new TextLine(), options.getInputFile());\n \n Tap sinkTap = new Hfs(new SequenceFile(FIELDS), options.getOutputDir(), SinkMode.REPLACE);\n \n Pipe xmlPipe = new Pipe(\"xml\");\n xmlPipe = new Each(xmlPipe, new ParseXml());\n xmlPipe = new Each(xmlPipe, new Debug());\n \n FlowConnector flowConnector = new FlowConnector(props);\n return flowConnector.connect(sourceTap, sinkTap, xmlPipe);\n }",
"@Override\n public void startEndpoint() throws IOException, InstantiationException {\n setRunning(true);\n \n rampUpProcessorTask();\n registerComponents();\n\n startPipelines();\n startListener();\n }",
"public interface IOFactory {\r\n /**\r\n * Creates a {@link ProfileReader} for the given {@link InputStream}.\r\n * @param stream the stream to be read.\r\n * @return the created {@link ProfileReader}.\r\n */\r\n public abstract ProfileReader createProfilerReader(InputStream stream);\r\n \r\n /**\r\n * Creates a {@link ProfileWriter} for the given {@link OutputStream}.\r\n * @param stream the stream to be written to.\r\n * @return the created {@link ProfileWriter}.\r\n */\r\n public abstract ProfileWriter createProfileWriter(OutputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileReader} for the given {@link InputStream}.\r\n * @param stream the stream to be read.\r\n * @return the created {@link MergeFileReader}.\r\n */\r\n public abstract MergeFileReader createMergeReader(InputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileWriter} for the given {@link OutputStream}.\r\n * @param stream the stream to be written.\r\n * @return the created {@link MergeFileWriter}.\r\n */\r\n public abstract MergeFileWriter createMergeWriter(OutputStream stream);\r\n \r\n /**\r\n * Creates a {@link MergeFileReader} simulating an empty merge file.\r\n * @return the created {@link MergeFileReader}.\r\n */\r\n public abstract MergeFileReader createEmptyMergeReader();\r\n}",
"LoadGenerator createLoadGenerator();",
"LoadGenerator createLoadGenerator();",
"public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}",
"public interface ProcessorFactory {\n\n ProcessorFactory INSTANCE = new DefaultProcessorFactory();\n\n // TODO rbala Missing JavaDoc\n <TDef extends IElementDef> Processor<TDef> createProcessor(DynamicScopeContext context, TDef elementDef);\n\n}",
"@Override\n\tpublic IOProcessor create(Interpreter interpreter) {\n\t\tTestCustomIOProc ioProc = new TestCustomIOProc();\n\t\tioProc.interpreter = interpreter;\n\t\tioProc.swigReleaseOwnership();\n\t\treturn ioProc;\n\t}",
"public KafkaManagedFileToProcess build() { return new KafkaManagedFileToProcess(this); }",
"public static ExecutableReader create(File file) throws Exception {\n\t\tFileInputStream fis = new FileInputStream(file);\n\t\tExecutableReader reader = create(new ExecutableStream(fis));\n\t\tfis.close();\n\t\treturn reader;\n\t}",
"private Module createModule(String moduleId, String ownerId, String copyId) throws NoFactoryForModuleException{\n\t\tIModuleFactory factory = factories.get(moduleId);\n\t\tif (factory==null){\n\t\t\tthrow new NoFactoryForModuleException(moduleId);\n\t\t}\n\t\treturn factory.createModule(ownerId, copyId);\n\t}",
"Object create(File file) throws IOException, SAXException, ParserConfigurationException;",
"MakeflowFactory getMakeflowFactory();",
"ITaskFactory<?> load(String classname);",
"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 }",
"private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}",
"ModuleDefine createModuleDefine();",
"public IChunkProvider createChunkGenerator()\n {\n return new ChunkProviderXirk(this.worldObj, this.worldObj.getSeed(), false);\n }",
"public Workflow init() throws IOException, ReflectiveOperationException {\n List<UtteranceProcessor> processors = new ArrayList<>();\n for (UtteranceProcessorConfig upc : processorConfigs) {\n processors.add(upc.init());\n }\n \n List<IntentMatcher> matchers = new ArrayList<>();\n if (matcherConfigs.size() < 1) {\n matchers.add(IntentMatcherConfig.getDefault());\n } else {\n for (IntentMatcherConfig imc : matcherConfigs) {\n matchers.add(imc.init());\n }\n }\n \n List<IntentResolver> resolvers = new ArrayList<>();\n if (resolverConfigs.size() < 1) {\n resolvers.add(IntentResolverConfig.getDefault());\n } else {\n for (IntentResolverConfig irc : resolverConfigs) {\n resolvers.add(irc.init());\n }\n }\n \n List<PromptHandler> promptHandlers = new ArrayList<>();\n if (promptHandlerConfigs.size() < 1) {\n promptHandlers.add(PromptHandlerConfig.getDefault());\n } else {\n for (PromptHandlerConfig phc : promptHandlerConfigs) {\n promptHandlers.add(phc.init());\n }\n }\n return DefaultWorkflowFactory.get().createDefaultWorkflow(\n name, processors, matchers, resolvers, promptHandlers);\n }",
"public static Factory factory() {\n return ext_h::new;\n }",
"@Override\n public void run() {\n if ((generate_modules_based_on_keyword==null)||(generate_modules_based_on_keyword.equals(\"\"))) {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n } else {\n String[] parts = generate_modules_based_on_keyword.split(\":\",2);\n if (parts.length==2) {\n ArrayList<String> channelsToGenerate = new ArrayList<>();\n String[] channelNames = parts[1].split(\";\");\n for (int i=0;i<channelNames.length;i++) {\n channelsToGenerate.add(channelNames[i]);\n }\n pipe_out = pipe_in.generatePipe(parts[0], channelsToGenerate);\n pipe_out.name=pipe_in.toString()+pipe_suffix;\n } else {\n System.err.println(\"Error in module generation definition. Check format 'key:name1;name2;'\");\n }\n }\n }",
"@Nonnull\r\n @Override\r\n public FileSystem produce() throws IOException {\r\n return newInstance();\r\n }",
"public Builder withFileProcessor(FileProcessor fileProcessorIn){\n fileProcessor=fileProcessorIn;\n return new Builder();\n }",
"ImportConfig createImportConfig();",
"private void writeFactory(GenModule module) throws Exception {\n\t\tMustacheFactory mf = new DefaultMustacheFactory();\n\t\tMustache template = mf.compile(\"factoryTemplate.hbs\"); \n\t\tElement[] sources = getSourcesOf(module);\n\t\tJavaFileObject fileObject = filer.createSourceFile(module\n\t\t\t\t.getPackageName() + \".\" + module.getClassName()); //we dont report the sources so that we keep the generated file on touching e.g. a @singleton component \n\t\tOutputStream outputStream = fileObject.openOutputStream();\n\t\ttry (Writer writer = new PrintWriter(outputStream)) {\n\t\t\t//template.apply(module, writer);\n\t\t\ttemplate.execute(writer, module);\n\t\t\twriter.flush();\n\t\t}\n\t\t;\n\t}",
"public GridFSInputFile createFile(InputStream in,\n\t boolean closeStreamOnPersist) {\n\treturn createFile(in, null, closeStreamOnPersist);\n }",
"Imports createImports();",
"public ModuleMarshaller(String filename) {\n moduleFile = new File(filename);\n }",
"public Item importFile(File f, Point expediteeDropPoint) throws IOException {\n\t\tassert (f != null);\n\n\t\t// Check for custom importers first. They get preference to standard\n\t\t// importing routines...\n\t\tItem lastCreatedItem;\n\t\tif (null == (lastCreatedItem = performFileImport(_customFileImporters,\n\t\t\t\tf, expediteeDropPoint))) {\n\n\t\t\t// Standard file importing\n\t\t\tlastCreatedItem = performFileImport(_standardFileImporters, f,\n\t\t\t\t\texpediteeDropPoint);\n\n\t\t}\n\t\treturn lastCreatedItem;\n\t}",
"public interface TempFileManagerFactory {\n\n\t\tpublic TempFileManager create();\n\t}",
"interface SegmentIoFactory {\n /**\n * @param segmentId Segment for IO action.\n * @return {@link FileIO}.\n * @throws IOException if creation would be fail.\n */\n FileIO build(long segmentId) throws IOException;\n }",
"public FileObjectFactory() {\n }",
"public interface MasterProcessChannelProcessorFactory extends Closeable {\n /**\n * Evaluates the {@code channelConfig}.\n *\n * @param channelConfig a connection string used by the fork JVM\n * @return {@code true} if {@code channelConfig} is applicable and thus this SPI is eligible in the fork\n */\n boolean canUse(String channelConfig);\n\n /**\n * Open a new connection.\n *\n * @param channelConfig e.g. \"pipe://3\" or \"tcp://localhost:65035\"\n * @throws IOException if cannot connect\n */\n void connect(String channelConfig) throws IOException;\n\n /**\n * Decoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of decoder\n */\n MasterProcessChannelDecoder createDecoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n\n /**\n * Encoder factory method.\n * @param forkingArguments forking arguments\n * @return a new instance of encoder\n */\n MasterProcessChannelEncoder createEncoder(@Nonnull ForkNodeArguments forkingArguments) throws IOException;\n}",
"abstract Function<Multipart.FileInfo, play.libs.streams.Accumulator<ByteString, Http.MultipartFormData.FilePart<A>>> createFilePartHandler();",
"public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }",
"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 abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;",
"WithCreate withSourceType(SourceType sourceType);",
"public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }",
"public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}",
"public interface MappingScriptFactory<T> {\n\t\n\t/**\n\t * \n\t * Create \n\t * \n\t * \n\t * @param scripts\n\t * @return\n\t */\n\tpublic MappingScript<T> create(InputStream... scripts);\n\n}",
"RegistrationModule createRegistrationModule();",
"public static ExecutableReader createSpecific(File file) throws Exception {\n\t\t\n\t\tFileInputStream fis = new FileInputStream(file);\t\t\n\t\tExecutableReader reader = new ExecutableReader(fis);\n\t\tfis.close();\n\t\treturn reader;\n\t}",
"@Override\n\tpublic IChunkProvider createChunkGenerator()\n\t{\n\t\treturn new ChunkProviderHeaven(worldObj, worldObj.getSeed(), true);\n\t}",
"void create(T instance) throws IOException;",
"public interface RunnableFactory {\n\n\t/**\n\t * Yields a new instance of the runnable.\n\t */\n\n Runnable mk();\n}",
"public SpecfileTaskHandler(FileEditorInput file, IDocument document) {\n \t\tthis(file.getFile(), document);\n \t}",
"public Module(TruffleFile file) {\n this.file = file;\n }",
"public static InputFactory createFileFactory( File uncompressedFile,\n final long offset,\n final long leng )\n throws IOException {\n final File file = uncompressedFile;\n final String logName = file.getName();\n if ( leng <= BlockMappedInput.DEFAULT_BLOCKSIZE * 2 ) {\n logger_.info( \"Will map as single block: \" + logName );\n final int ileng = (int) leng;\n RandomAccessFile raf = new RandomAccessFile( file, \"r\" );\n final FileChannel chan = raf.getChannel();\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n return new SimpleMappedInput( chan, offset, ileng,\n logName );\n }\n };\n }\n else if ( Loader.is64Bit() ) {\n logger_.info( \"Will map as multiple blocks: \" + file );\n RandomAccessFile raf = new RandomAccessFile( file, \"r\" );\n final FileChannel chan = raf.getChannel();\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n return BlockMappedInput\n .createInput( chan, offset, leng, logName, ! isSeq );\n }\n };\n }\n else {\n logger_.info( \"Will read as BufferedFile: \" + file\n + \" (avoid too much mapping on 32-bit OS\" );\n return new AbstractInputFactory( true ) {\n public BasicInput createInput( boolean isSeq )\n throws IOException {\n BufferedFile bf = new BufferedFile( file.getName(), \"r\" );\n return new RandomAccessInput( bf, offset );\n }\n };\n }\n }",
"public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }",
"private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}",
"public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }",
"public static MyFileContext create() {\n\t\treturn new MyContextImpl();\n\t}",
"Implementation createImplementation();",
"public IChunkProvider createChunkGenerator() {\n\t\treturn new ChunkProviderEnd(this.worldObj, this.worldObj.getSeed());\n\t}",
"public AbstractSpotterEditorInput createInstance(IFile file) {\n\t\tAbstractSpotterEditorInput input = null;\n\n\t\tConstructor<?>[] allConstructors = editorInputClazz.getDeclaredConstructors();\n\t\tfor (Constructor<?> constructor : allConstructors) {\n\t\t\tClass<?>[] pType = constructor.getParameterTypes();\n\t\t\tif (pType.length == 1 && pType[0].equals(IFile.class)) {\n\t\t\t\ttry {\n\t\t\t\t\tinput = (AbstractSpotterEditorInput) constructor.newInstance(file);\n\t\t\t\t} catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {\n\t\t\t\t\tthrow new RuntimeException(ERR_CALL_CONSTRUCTOR, e);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}",
"ODataSingleProcessor createProcessor(ODataContext context);",
"void openImportOrCreate(Context context);",
"public static FileData createEntity() {\n FileData fileData = Reflections.createObj(FileData.class, Lists.newArrayList(\n\t\t FileData.F_NAME\n\t\t,FileData.F_PATH\n\t\t,FileData.F_SIZE\n\t\t,FileData.F_TYPE\n\t\t,FileData.F_DESCRIPTION\n ),\n\n\t\t DEFAULT_NAME\n\n\t\t,DEFAULT_PATH\n\n\t\t,DEFAULT_SIZE\n\n\t\t,DEFAULT_TYPE\n\n\n\n\n\n\n\t\t,DEFAULT_DESCRIPTION\n\n\t);\n return fileData;\n }",
"public EWorkflowFactoryImpl() {\n\t\tsuper();\n\t}",
"TaskFactory getTaskFactory();",
"public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }",
"FileReference createFile(String fileName, String toolId);",
"public interface RecordEventsProcessorFactory<TResult> {\r\n\r\n\t/**\r\n\t * @param res the result to feed by processor\r\n\t */\r\n\tpublic RecordEventsProcessor create(TResult res);\r\n\t\r\n}",
"ModulePackage createModulePackage();",
"FData createFData();",
"private static void buildFramework() {\n \tLOG.info(\"Begin building of shared framework.\");\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \t\n \t// Setup IterativeFileReader\n \tFile dir = new File(clArgs.buildFrameworkInDir);\n \titerativeFileReader.setFile(dir);\n \titerativeFileReader.setFileFilter(FileUtil.acceptOnlyClusterFilesFilter());\n \titerativeFileReader.setReader(textFileLineReader);\n \t\n \t// Setup processor\n \tLOG.debug(\"Create a SharedFrameworkProcessor.\");\n \tSharedFrameworkProcessor sharedFrameworkProcessor = new SharedFrameworkProcessor();\n \ttextFileLineReader.setProcessor(sharedFrameworkProcessor);\n \t// Get informed about the finishing of each cluster (file) to reset the processor's status\n \ttextFileLineReader.attach(sharedFrameworkProcessor, Interests.HasFinished);\n \t// Get informed about the finishing of all clusters to give each cluster in the generated graph a pretty id\n \titerativeFileReader.attach(sharedFrameworkProcessor, Interests.HasFinished);\n \t\n \titerativeFileReader.read();\n \t\n \tLOG.info(\"Finished building shared framework.\");\n }",
"public FileCreator() {\r\n initComponents();\r\n }"
] | [
"0.65917975",
"0.61916184",
"0.61583006",
"0.5442266",
"0.52534217",
"0.5174526",
"0.51485205",
"0.50702834",
"0.49552587",
"0.48853454",
"0.48602837",
"0.48569635",
"0.4852117",
"0.48272717",
"0.48166317",
"0.47891685",
"0.47854957",
"0.47694215",
"0.47660825",
"0.47657692",
"0.4747947",
"0.4744819",
"0.473704",
"0.47282162",
"0.47282162",
"0.47250453",
"0.4682358",
"0.4680763",
"0.46711892",
"0.465225",
"0.46490794",
"0.46279386",
"0.46260056",
"0.4601591",
"0.4592889",
"0.45889002",
"0.45889002",
"0.4556674",
"0.4542787",
"0.45078418",
"0.44885063",
"0.44883123",
"0.44763047",
"0.447556",
"0.446991",
"0.44695798",
"0.4457329",
"0.44536212",
"0.4451002",
"0.4445516",
"0.44388974",
"0.44357824",
"0.44340286",
"0.44221276",
"0.44217035",
"0.44205442",
"0.44171003",
"0.4405905",
"0.44004765",
"0.4380412",
"0.43801874",
"0.43773198",
"0.43713704",
"0.43636075",
"0.43541077",
"0.4352515",
"0.43513957",
"0.4349645",
"0.4345894",
"0.43408287",
"0.43406308",
"0.43346298",
"0.433095",
"0.43241465",
"0.431458",
"0.4311036",
"0.43078318",
"0.42942607",
"0.4288558",
"0.42779553",
"0.4273705",
"0.4267208",
"0.4266168",
"0.42608953",
"0.42591056",
"0.42574507",
"0.42545342",
"0.42531845",
"0.42510104",
"0.4248888",
"0.42422023",
"0.42327815",
"0.42306906",
"0.4230515",
"0.42278218",
"0.42245737",
"0.42206004",
"0.42198354",
"0.42181954",
"0.41994044"
] | 0.72311765 | 0 |
Suche abbrechen, weil bereits ein Geraet ausgewaehlt wurde | @Override
public void onItemClick(final AdapterView<?> pAdapterView, final View pView, final int pPosition, final long pID) {
bt.stopDiscoverDevices();
// Die MAC-Adresse des Geraets herausfiltern
final String info = ((TextView) pView).getText().toString();
serverAddress = info.substring(info.length() - 17);
connectToServer(false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);",
"public void aapneBomberOgFlagg() {\n brettTapt = true;\n if (trykketPaa) {\n return;\n }\n // Viser alle bomber som ikke er flagget\n if (bombe && !flagget) {\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.GREY, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n // Fargekoder om flaggingen var korrekt eller ikke\n if (flagget) {\n if (!bombe) {\n setBackground(new Background(new BackgroundFill(Color.PINK, CornerRadii.EMPTY, Insets.EMPTY)));\n } else {\n Color lysegroenn = Color.rgb(86, 130, 3, 0.3);\n setBackground(new Background(new BackgroundFill(lysegroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n }\n }",
"@Override\n\tpublic boolean istBerechtigt() {\n\t\treturn true;\n\t}",
"private void sterben()\n {\n lebendig = false;\n if(position != null) {\n feld.raeumen(position);\n position = null;\n feld = null;\n }\n }",
"@Override\n\tpublic void verkaufen() {\n\t\tif( (bestand - abgenommeneMenge) < 0)\n\t\t\tthis.setBestand(0);\n\t\telse\n\t\t\tthis.setBestand(this.getBestand() - abgenommeneMenge);\n//\t\tSystem.out.println(\"Bestand danach:\" + bestand);\n\t}",
"public void trykkPaa() throws TrykketPaaBombe {\n // Ingenting skal skje dersom en av disse er true;\n if (brettTapt || trykketPaa || flagget) {\n return;\n }\n\n // Om ruten er en bombe taper man brettet\n if (bombe) {\n trykketPaa = true;\n setText(\"x\");\n setBackground(new Background(new BackgroundFill(Color.RED, CornerRadii.EMPTY, Insets.EMPTY)));\n throw new TrykketPaaBombe();\n }\n // Om ruten har null naboer skal et stoerre omraade aapnes\n else if (bombeNaboer == 0) {\n Lenkeliste<Rute> besokt = new Lenkeliste<Rute>();\n Lenkeliste<Rute> aapneDisse = new Lenkeliste<Rute>();\n aapneDisse.leggTil(this);\n // Rekursiv metode som fyller aapneDisse med riktige ruter\n finnAapentOmraade(besokt, aapneDisse);\n for (Rute r : aapneDisse) {\n r.aapne();\n }\n } else {\n aapne();\n }\n }",
"public void vergissAlles() {\n\t\tmerker.clear();\n\t}",
"public void erzaehlWas() {\n // Das Gleiche was jedes Tier sagt.\n super.erzaehlWas();\n\n // Zusaetzliche Aussage des Affen\n System.out.println(\"Affen sind einfach die besten Tiere.\");\n }",
"public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }",
"public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}",
"public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}",
"void berechneFlaeche() {\n\t}",
"public boolean erEnBombe() {\n return bombe;\n }",
"public boolean tieneRepresentacionGrafica();",
"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 }",
"@Override\n public void bankrupt() {\n this.mortgaged = false;\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}",
"public void gored() {\n\t\t\n\t}",
"public void renovarBolsa() {\n\t\tSystem.out.println(\"Bolsa renovada com suceso!\");\n\t}",
"private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"public boolean zugVerschrotten() {\n if (depot > 0) {\n geld = geld + getGeldZugZurueck();\n depot--;\n return true;\n } else {\n return false;\n }\n }",
"@Test\n\tpublic void testGeldAbhebenNormalfall() throws KontonummerNichtVorhandenException, IllegalArgumentException, GesperrtException{\n\t\tktnr3 = bank.kontoErstellen(testfabrik, k1);\n\t\tMockito.doNothing().when(test1).einzahlen(ArgumentMatchers.anyDouble());\n\t\tbank.geldEinzahlen(ktnr3, 1500.00);\n\t\tMockito.verify(test1).einzahlen(ArgumentMatchers.anyDouble());\n\t\t\n\t\tbank.geldAbheben(ktnr3, 500.0);\n\n\t\tMockito.verify(test1).abheben(ArgumentMatchers.anyDouble());\n\t\tMockito.verify(test1).isGesperrt();\n\t\tMockito.verify(test1).pruefeVorbedingungen(ArgumentMatchers.anyDouble());\n\n\t}",
"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}",
"private void reserveChambre() {\n\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\tif(chambre.equals(this.chambresVides().get(0))) {\n\t\t\t\tchambre.setReserve(true);\n\t\t\t\tSystem.out.println(\"\\n---------------------------------------\\nVous avez bien réservé cette chambre: |\");\n\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"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 }",
"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 void flagg() {\n if (trykketPaa) {\n return;\n }\n // Setter ruten som flagget, dersom den ikke var flagget fra foer\n if (!getText().equals(\"#\")) {\n setText(\"#\");\n flagget = true;\n bombeTeller.oppdaterAntBomber(-1); // Minsker antall bomber\n }\n // Fjerner flaggingen, dersom ruten var flagget fra foer\n else {\n flagget = false;\n setText(\" \");\n bombeTeller.oppdaterAntBomber(+1); // Oeker ant bomber\n }\n }",
"public void ordenarXNombreBurbuja() {\r\n\t\tfor (int i = datos.size(); i > 0; i-- ) {\r\n\t\t\tfor (int j=0; j<i-1; j++) {\r\n\t\t\t\tif(\tdatos.get(j).compare(datos.get(j), datos.get(j+1)) == (1)) {\r\n\t\t\t\t\tJugador tmp = datos.get(j);\r\n\t\t\t\t\tdatos.set(j, datos.get(j+1));\r\n\t\t\t\t\tdatos.set((j+1), tmp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\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}",
"public void beeindig(int gehaaldeSlagen){\n //doe het reguliere-geval\n if(rondetype.isRegulier()){\n updateScore(gehaaldeSlagen);\n }\n // doe het passpel-geval\n else{\n \n }\n }",
"@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}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void getEaten() {\n\t\tsuper.flag=true;\n\t}",
"public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}",
"@Test\n public void bateauAtPasDansGrille() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux b = j.bateauAt(new Place(\"Z84897\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }",
"void entrerAuGarage();",
"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 void verificar_que_se_halla_creado() {\n\t\t\n\t}",
"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 void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }",
"private void elegiCasillaQueNoEsBomba(Casilla casilla) {\n\t\tif( !this.getJugadorDeTurno().equals( casilla.getJugador() ) && casilla.getJugador() != null )\t\t\t\n\t\t\tthis.getTablero().voltearTodasLasCasillasDelJugador( casilla.getJugador(), casilla );\n\t\t\n\t\t//Fuerzo el jugador a la casilla para evaluar si gane\n\t\tcasilla.setJugador( this.getJugadorDeTurno() );\n\t\t\n\t\tif( this.terminoJuego() )\n\t\t\tthis.mostrarGanador( this.getJugadorDeTurno() );\n\t}",
"protected boolean asEaten() {\n return false;\n }",
"@Override\n\tpublic void verkaufen() {\n\t}",
"void pickGarb() {\n if (model.hasObject(GARB, getAgPos(0))) {\n // sometimes the \"picking\" action doesn't work\n // but never more than MErr times\n if (random.nextBoolean() || nerr == MErr) {\n remove(GARB, getAgPos(0));\n nerr = 0;\n r1HasGarb = true;\n } else {\n nerr++;\n }\n }\n }",
"@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}",
"@Test\n public void bateauAtNoBateau() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A6\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }",
"@Override\n\tpublic boolean cambiarGrafico(Personaje e) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}",
"private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }",
"@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}",
"protected boolean geheAufEndfeld(){\r\n\t\tint neueId;\r\n\t\tfor(int i=0; i<4; i++)\r\n\t\t{\r\n\t\t\tif(spieler.getFigur(i).getPosition().getTyp() == FeldTyp.Normalfeld){\r\n\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\tif (spieler.getFigur(i).getPosition().getId() != spieler.getFigur(i).getFreiPosition()) {\r\n\t\t\t\tneueId = spiel.ueberlauf(neueId, i);\r\n\t\t\t\tif(spiel.kannEndfeldErreichen(neueId) && spiel.userIstDumm(neueId, i) == false){\r\n\t\t\t\t\tif(spiel.zugGueltigEndfeld(neueId)){\r\n\t\t\t\t\t\tif(spiel.endfeld(neueId) == neueId){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tspiel.bewege(i);\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"public boolean SiguienteBodega(){\n if(!lista_inicializada){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n lista_inicializada = true;\n if(Size>0){\n return true;\n }\n }\n \n if(Size > 1 ){\n if(Nodo_bodega_actual.obtenerSiguiente()!= null){\n Nodo_bodega_actual = Nodo_bodega_actual.obtenerSiguiente();\n return true;\n } \n }\n return false;\n }",
"public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\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 void azzera() { setEnergia(0.0); }",
"public void verarbeite() {\n\t\t\r\n\t}",
"protected boolean laufEinfach(){ \r\n\r\n\t\tint groessteId=spieler.getFigur(0).getPosition().getId();\r\n\t\tint figurId=0; // Figur mit der gr��ten ID\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=1; i<4; i++)\r\n\t\t{ \r\n\t\t\tint neueId;\r\n\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\tif(spieler.getFigur(i).getPosition().getTyp() != FeldTyp.Startfeld && groessteId<spieler.getFigur(i).getPosition().getId()){\r\n\t\t\t\tgroessteId=spieler.getFigur(i).getPosition().getId();\r\n\t\t\t\tfigurId=i;\r\n\t\t\t}\r\n\t\t\tneueId = spiel.ueberlauf(neueId, i);\r\n\t\t\tif (spieler.getFigur(i).getPosition().getTyp() == FeldTyp.Endfeld) {\r\n\t\t\t\tif (!spiel.zugGueltigAufEndfeld(neueId, i)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tneueId = spieler.getFigur(i).getPosition().getId() + spiel.getBewegungsWert();\r\n\t\t\t\tif(spieler.getFigur(i).getPosition().getId() == spieler.getFigur(i).getFreiPosition()){\r\n\t\t\t\t\tif(!spiel.userIstDumm(neueId, i)){\r\n\t\t\t\t\t\tfigurId = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\t\t\t\tif(spieler.getFigur(j).getPosition().getId() == neueId){\r\n\t\t\t\t\t\t\t\tif(!spiel.userIstDumm(neueId+spiel.getBewegungsWert(), j)){\r\n\t\t\t\t\t\t\t\t\tfigurId = j;\r\n\t\t\t\t\t\t\t\t\tbreak;\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}\r\n\t\t\r\n\t\tspiel.bewege(figurId);\r\n\t\treturn true;\r\n\t}",
"void zmniejszBieg();",
"public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}",
"public boolean checkForGourds() {return false;}",
"@Override\n\tpublic boolean erTom() {\n\t\treturn (bak == null);\n\t}",
"public boolean gano() {\r\n\t\tboolean gano = false;\r\n\t\tint contador = 0;\r\n\t\tint c = (casillas.length * casillas[0].length) - cantidadMinas;\r\n\t\tfor(int i = 0; i< casillas.length && !gano; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[i].length && !gano; j++) {\r\n\t\t\t\tif(casillas[i][j].esMina() == false) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == true) {// si no es mina\r\n\t\t\t\t\tcontador++;\r\n\t\t\t\t\tif(contador == c) {// no ha sido seleccionada\r\n\t\t\t\t\t\tgano = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn gano;\r\n\t}",
"public void Exterior() {\n\t\t\r\n\t}",
"void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}",
"public void ausgabe() {\n\t\tthis.streamKoordinierung.koordiniereAnhandDerEingabedaten();\n\t\tthis.streamKoordinierung.schreibeEndtextInDatei();\n\t\tSystem.out.println(\"\\n\\nAlles erfolgreich abgelaufen, herzlichen Glueckwunsch!\");\n\t}",
"public void steuern() {\n\t\teinlesenUndInitialisieren();\n\t\tausgabe();\n\t}",
"public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}",
"@Test\n\tpublic void testGeldEinzahlenNormalfall() throws KontonummerNichtVorhandenException {\n\t\tktnr3= bank.kontoErstellen(testfabrik, Kunde.MUSTERMANN);\n\t\tMockito.doNothing().when(test1).notifyObservers();\n\t\tMockito.doNothing().when(test1).einzahlen(ArgumentMatchers.anyDouble());\n\t\tbank.geldEinzahlen(ktnr3, 150.0);\n\t\t\n\t\tMockito.verify(test1).einzahlen(ArgumentMatchers.anyDouble());\t\n\t\t\n\t}",
"private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }",
"public boolean checkBetriebsmittelStatus(LinkedList<Vorgang> vorgaenge) throws SQLException {\n for(int i=0; i<vorgaenge.size(); ++i) {\n bmgCach = con.getBetriebsmittelkapazitaetForId(vorgaenge.get(i).getVorgangId(), this.netz.getId());\n for(int j=0; j<bmgCach.size(); ++j) {\n betriebsmittelgruppe.add(bmgCach.get(j));\n }\n bmgCach.clear();\n }\n for(int k=0; k<vorgaenge.size(); ++k) {\n for(int l=0; l<betriebsmittelgruppe.size(); ++l) {\n if(vorgaenge.get(k).getVorgangId()==betriebsmittelgruppe.get(l).getVorgangId()) {\n betriebsmittelgruppe.get(l).discountBetrMittelKapa(vorgaenge.get(k).getDauer());\n if(betriebsmittelgruppe.get(l).getBetrMittelKapa()<0) {\n this.checkBmg = false;\n this.bmgOutOfKapa.add(betriebsmittelgruppe.get(l));\n } \n }\n }\n }\n return checkBmg;\n }",
"private void balancearAgrega(Vertice<T> v){\n\tif(v == this.raiz){\n\t v.color = Color.NEGRO;\n\t return;\n\t}else if(v.padre.getColor() == Color.NEGRO){\n\t return;\n\t}\n\tVertice<T> abuelo = v.padre.padre;\n\tif(v.padre == abuelo.derecho){\n\t if(abuelo.izquierdo != null &&\n\t abuelo.izquierdo.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.izquierdo.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\t \n\t }else if(v.padre.izquierdo == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraDerecha(v.padre);\n\t\tbalancearAgrega(v2); \n\t }else if(v.padre.derecho == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraIzquierda(abuelo);\n\t }\n\t}else if(v.padre == abuelo.izquierdo){\n\t if(abuelo.derecho != null &&\n\t abuelo.derecho.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.derecho.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\n\t }else if(v.padre.derecho == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraIzquierda(v.padre);\n\t\tbalancearAgrega(v2); \n\t \n\t }else if(v.padre.izquierdo == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraDerecha(abuelo);\n\t }\n\t} \t\n\t\n }",
"public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected boolean colaVacia() {\r\n return ini == -1;\r\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 abstract boolean zzbek();",
"public void ordenarXPuntajeBurbuja() {\r\n\t\tfor (int i = datos.size(); i > 0; i-- ) {\r\n\t\t\tfor (int j=0; j<i-1; j++) {\r\n\t\t\t\tif (\t(datos.get(j).getPuntaje()) > (datos.get(j+1).getPuntaje())\t) {\r\n\t\t\t\t\tJugador tmp = datos.get(j);\r\n\t\t\t\t\tdatos.set(j, datos.get(j+1));\r\n\t\t\t\t\tdatos.set((j+1), tmp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void berechneNeuenWert () {\r\n try {\r\n double ergebnis = 0d;\r\n for (JTextComponent wert : this.wertOperator.keySet()) {\r\n if (this.ignoriereWhitespaceEingabefelder && wert.getText().trim().length() == 0) {\r\n continue;\r\n }\r\n final char operator = this.wertOperator.get(wert);\r\n final double operand = Double.parseDouble(wert.getDocument().getText(0, wert.getDocument().getLength()).trim());\r\n switch (operator) {\r\n case '*':\r\n ergebnis *= operand;\r\n break;\r\n case '/':\r\n ergebnis /= operand;\r\n break;\r\n case '-':\r\n ergebnis -= operand;\r\n break;\r\n case '+':\r\n ergebnis += operand;\r\n break;\r\n case '=':\r\n ergebnis = operand;\r\n break;\r\n }\r\n }\r\n String text = Double.toString(ergebnis);\r\n if (this.anzahlDerNachkommastellen <= 0 && text.indexOf('.') != -1) {\r\n text = text.substring(0,text.indexOf('.'));\r\n }\r\n else {\r\n // Kommastellen hinzufügen\r\n if (text.indexOf('.') == -1) {\r\n text += '.';\r\n }\r\n // ggf. mit Nullen hinten auffüllen\r\n while (text.indexOf('.') + anzahlDerNachkommastellen > text.length() -1) {\r\n text += '0';\r\n }\r\n // Abschneiden zuviel vorhandener Stellen\r\n if (text.length() - 1 > text.indexOf('.') +anzahlDerNachkommastellen) {\r\n text = text.substring(0,text.indexOf('.')+anzahlDerNachkommastellen+1);\r\n }\r\n }\r\n this.setText(text);\r\n }\r\n catch (final Exception berechnungsProblem) {\r\n this.setText(this.zeigeFehlerAn ? \"#WERT!\" : \"\");\r\n }\r\n }",
"private void liberateAroom() {\n\t\tif(this.adminLogin() == 1) {\n\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\t\tif(chambre.equals(this.chambresNonVides().get(this.chambresNonVides().size()-1))) {\n\t\t\t\t\tchambre.setReserve(false);\n\t\t\t\t\tSystem.err.println(\"--------------------------------------------------\\nVous avez bien libérée cette chambre:\\n--------------------------------------------------\\n\");\n\t\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.err.println(\"----------------------------\\nVous n'êtes pas un admin! |\\n----------------------------\");\n\t\t}\n\t\t\n\t}",
"public void disconnetti() {\n\t\tconnesso = false;\n\t}",
"public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}",
"public void test1(){\r\n\t\tZug zug1 = st.zugErstellen(3, 2, \"Zug 1\");\r\n\t\tst.blockFahren();\r\n\t\tst.blockFahren();\r\n\t\tZug zug2 = st.zugErstellen(2, 3, \"Zug 2\");\r\n\t\tg.textAusgeben(\"Position Zug1: \"+zug1.getPosition()+\"\\n\"+\"Position Zug2: \"+zug2.getPosition());\r\n\t\tst.fahren();\r\n\t}",
"public void test2(){\r\n\t\tZug zug1 = st.zugErstellen(2, 2, \"Zug 1\");\r\n\t\tst.fahren();\r\n\t}",
"public boolean guardar()\r\n\t{\r\n\t\treturn false;\r\n\t}",
"public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }",
"public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }",
"@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }",
"public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }",
"protected void doorschuiven(Groepen wedstrijdGroepen, Groepen aanwezigheidsGroepen) {\r\n int aantal = bepaalAantalDoorschuiven(0, aanwezigheidsGroepen.getPeriode(), aanwezigheidsGroepen.getRonde());\r\n \tlogger.log(Level.INFO, \"Aantal door te schuiven spelers \" + aantal);\r\n // Doorloop hoogste groep tot ��n na laagste groep. In de laagste groep\r\n // kunnen geen spelers inschuiven\r\n \t// Let op: iterator gaat op array index en NIET op groepID\r\n ArrayList<Groep> groepen = wedstrijdGroepen.getGroepen();\r\n// for (int i = 0; i < groepen.size() - 1; ++i) {\r\n for (int i = 0; i < wedstrijdGroepen.getAantalGroepen() - 1; ++i) {\r\n aantal = bepaalAantalDoorschuiven(groepen.get(i).getNiveau(), aanwezigheidsGroepen.getPeriode(), aanwezigheidsGroepen.getRonde());\r\n \tlogger.log(Level.INFO, \"Doorschuiven van groep \" + groepen.get(i+1).getNaam() + \" naar \" + groepen.get(i).getNaam() + \" n=\" + aantal);\r\n ArrayList<Speler> naarGroep = groepen.get(i).getSpelers();\r\n if (naarGroep == null) naarGroep = new ArrayList<>();\r\n ArrayList<Speler> vanGroep = groepen.get(i + 1).getSpelers();\r\n // Als laatste speler niet aanwezig, dan ��n minder doorschuiven\r\n Speler laatste = groepen.get(i + 1).getSpelerByID(aantal);\r\n if (aantal > 2 && laatste == null) aantal--;\r\n\r\n for (int j = 1; j <= aantal; ++j) {\r\n Speler s = groepen.get(i + 1).getSpelerByID(j);\r\n \tlogger.log(Level.FINE, \"Speler : \" + (s != null ? s.getNaam() : \"null\"));\r\n if ((s != null) && s.isAanwezig()) {\r\n if ((j == aantal) && (aantal == 1)) {\r\n // Alleen doorschuiven als speler 1 niet meer ingehaald kan worden\r\n Speler s2 = groepen.get(i + 1).getSpelerByID(2);\r\n\t\t\t\t\t\tif (!IJCController.c().laasteRondeDoorschuivenAltijd) {\r\n\t\t\t\t\t\t\tif ((s2 != null) && (s.getPunten() > (s2.getPunten() + 4))) {\r\n\t\t\t\t\t\t\t\tlogger.log(Level.FINE, \"Speler doorgeschoven, niet meer in te halen \");\r\n\t\t\t\t\t\t\t\tnaarGroep.add(new Speler(s));\r\n\t\t\t\t\t\t\t\tvanGroep.remove(s);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n } else if (j == aantal) {\r\n if (naarGroep.size() % 2 != 0) {\r\n \tlogger.log(Level.FINE, \"Speler doorgeschoven, laatste doorschuiver maar door om even aantal \");\r\n naarGroep.add(new Speler(s));\r\n vanGroep.remove(s);\r\n }\r\n } else {\r\n \tlogger.log(Level.FINE, \"Speler doorgeschoven, niet laatste dus altijd\");\r\n naarGroep.add(new Speler(s));\r\n vanGroep.remove(s);\r\n\r\n }\r\n }\r\n\r\n }\r\n }\r\n }",
"public boolean potezGore() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer='w';\n\t\t\n\t\tif (i-1 >= 0) {\n\t\t\tif ((this.tabla[i-1][j] == '#')||(this.tabla[i-1][j] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i-1][j] == '*')\n\t\t\t\tthis.pojedi(i-1, j);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i-1, j);\n\t\t}\n\t\telse if (i-1 < 0 ) {\n\t\t\tif ((this.tabla[this.visinaTable-1][j] == '#')||(this.tabla[this.visinaTable-1][j] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[this.visinaTable-1][j] == '*') \n\t\t\t\tthis.pojedi(this.visinaTable-1, j);\n\t\t\telse \n\t\t\t\tthis.pomjeri(this.visinaTable-1, j);\n\t\t}\n\t\treturn true;\n\t}",
"public void gagne()\r\n\t{\r\n\t\tthis.nbVictoires++;\r\n\t}",
"public boolean ganar(){\r\n\t\t\r\n\t\tboolean estadoVictoria = false;\r\n\t\t\r\n\t\tfor(int x = 0; x < palabras.size(); x++) \r\n\t\t{\r\n\t\t\tfor(int y = 0; y < palabras.get(x).size(); y++) \r\n\t\t\t{\r\n\t\t\t\tif (palabras.get(x).get(y).getEstado() == false) \r\n\t\t\t\t{\r\n\t\t\t\t\t//System.out.print(\"estoy aqui\");\r\n\t\t\t\t\tx = palabras.size()-1;\r\n\t\t\t\t\ty = palabras.get(x).size() - 1;\r\n\t\t\t\t\t\r\n\t\t\t\t}else if (x+1 == palabras.size() && y+1 == palabras.get(x).size() && palabras.get(x).get(y).getEstado() == true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\testadoVictoria = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn estadoVictoria;\r\n\t}",
"public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }",
"public void geraeuschMachen() {\n System.out.println(\"BRUELL\");\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }",
"private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }",
"public void dibujar() {\n if(fondoJuego1 != null) {\n fondoJuego1.dibujar(g);\n fondoJuego2.dibujar(g);\n if(fondoJuego2.getX()<=5) {\n juegoNuevo.dibujar(g);\n if(highLight.getPrioridad() == juegoNuevo.getPrioridad()) {\n tituloJuegoNuevo.dibujar(g);\n }\n continuar.dibujar(g);\n if(highLight.getPrioridad() == continuar.getPrioridad()) {\n tituloContinuar.dibujar(g);\n }\n regresar.dibujar(g);\n if(continuar.getY() <= 20) {\n if(highLight.getPrioridad() == regresar.getPrioridad()) {\n tituloRegresar.dibujar(g);\n }\n }\n highLight.dibujar(g);\n }\n }\n if(seleccion != null) {\n seleccion.g = this.g;\n seleccion.dibujar();\n }\n\tflushGraphics();\n }"
] | [
"0.6904469",
"0.6643108",
"0.6626903",
"0.65987295",
"0.6348882",
"0.6326519",
"0.63176674",
"0.6251324",
"0.6246032",
"0.6225909",
"0.6199401",
"0.61894304",
"0.61730444",
"0.61652935",
"0.6099588",
"0.60915387",
"0.6077525",
"0.6072442",
"0.6069975",
"0.6031116",
"0.6015905",
"0.6008051",
"0.5989707",
"0.59792894",
"0.59736496",
"0.5973115",
"0.5968647",
"0.59601045",
"0.59494877",
"0.5946305",
"0.5946305",
"0.5944997",
"0.59427845",
"0.59236145",
"0.5914735",
"0.5908289",
"0.5904753",
"0.59015584",
"0.5900624",
"0.5890292",
"0.5888092",
"0.58841825",
"0.58786994",
"0.5858412",
"0.5851848",
"0.5844652",
"0.584258",
"0.5825943",
"0.5824765",
"0.5822998",
"0.5820443",
"0.5810428",
"0.580939",
"0.58049124",
"0.5799454",
"0.57951844",
"0.57927924",
"0.57919884",
"0.5763393",
"0.5759466",
"0.57496804",
"0.57431924",
"0.57427996",
"0.574099",
"0.5739918",
"0.5725613",
"0.5718754",
"0.57138157",
"0.57089955",
"0.5707921",
"0.5707533",
"0.57031417",
"0.5698486",
"0.5695389",
"0.5693396",
"0.568646",
"0.5684371",
"0.56843257",
"0.5678542",
"0.5673946",
"0.5664924",
"0.5659254",
"0.5656171",
"0.56533396",
"0.5649325",
"0.564427",
"0.563973",
"0.5638873",
"0.5638499",
"0.5637039",
"0.5635786",
"0.56330943",
"0.5632377",
"0.56294715",
"0.5629242",
"0.56181616",
"0.56160897",
"0.5612353",
"0.5609467",
"0.56094456",
"0.5607325"
] | 0.0 | -1 |
Wird aufgerufen, wenn die Bluetooth Verbindung erfolgreich hergestellt wurde. Startet das Spiel. | public void startGame(){
Intent intent = new Intent(getApplicationContext(), AndroidLauncher.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.putExtra(Bluetooth.PRIMARY_BT_GAME, String.valueOf(false));
intent.putExtra(Bluetooth.SECONDARY_BT_GAME, String.valueOf(true));
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Bluetooth() {}",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }",
"private void checkBTState() {\n if(bluetoothAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not supported\");\n } else {\n if (!bluetoothAdapter.isEnabled()) {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"public void checkBTState() {\n if(mAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (mAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n ((Activity) mContext).startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"@Override\n public void run() {\n super.run();\n Log.i(TAG, \"BlueTooth Start\");\n _BluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (_BluetoothAdapter != null){\n if(!_BluetoothAdapter.isEnabled())\n _BluetoothAdapter.enable();\n else{\n _BluetoothDevice = _BluetoothAdapter.getRemoteDevice(strAddress_BT_UART);\n if (_BluetoothDevice != null){\n Log.i(TAG, \"Starting BtConnect\");\n BtConnect BC = new BtConnect(_BluetoothDevice);\n BC.start();\n }\n }\n }\n }",
"private void setupBluetooth() throws NullPointerException{\n if( Utils.isOS( Utils.OS.ANDROID ) ){\n \t\n // Gets bluetooth hardware from phone and makes sure that it is\n // non-null;\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n \n // If bluetooth hardware does not exist...\n if (adapter == null) {\n Log.d(TAG, \"BluetoothAdapter is is null\");\n throw new NullPointerException(\"BluetoothAdapter is null\");\n } else {\n Log.d(TAG, \"BluetoothAdapter is is non-null\");\n }\n \n bluetoothName = adapter.getName();\n \n //TODO: restart bluetooth?\n \t\n try {\n bluetoothConnectionThreads.add( new ServerThread(adapter, router, uuid) );\n } catch (NullPointerException e) {\n throw e;\n }\n if (Constants.DEBUG)\n Log.d(TAG, \"Sever Thread Created\");\n // Create a new clientThread\n bluetoothConnectionThreads.add( new ClientThread(adapter, router, uuid) );\n if (Constants.DEBUG)\n Log.d(TAG, \"Client Thread Created\");\n }\n else if( Utils.isOS( Utils.OS.WINDOWS ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.LINUX ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.OSX ) ){\n //TODO: implement this\n }\n else{\n //TODO: throw exception?\n }\n \n }",
"private void checkBTState() {\n\t\tif (btAdapter == null) {\n\t\t\terrorExit(\"Fatal Error\", \"Bluetooth not support\");\n\t\t} else {\n\t\t\tif (btAdapter.isEnabled()) {\n\t\t\t\tLog.d(TAG, \"...Bluetooth ON...\");\n\t\t\t} else {\n\t\t\t\t// Prompt user to turn on Bluetooth\n\t\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableBtIntent, 1);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onBluetoothDeviceFound(BluetoothDevice btDevice) {\n }",
"private boolean BluetoothAvailable()\n {\n if (BT == null)\n return false;\n else\n return true;\n }",
"@Override\n public IBinder onBind(Intent intent) {\n\n AppConstants.RebootHF_reader = false;\n if (mBluetoothLeService != null) {\n final boolean result = mBluetoothLeService.connect(mDeviceAddress);\n Log.d(TAG, \"Connect request result=\" + result);\n }\n\n\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"void bluetoothDeactivated();",
"public boolean mBTInit1(){\n //Initialize the bluetooth adapter\n if (oBTadapter !=null) return true ;\n oBTadapter = BluetoothAdapter.getDefaultAdapter();\n return (oBTadapter != null);\n }",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n btState.setImageResource(R.drawable.ic_action_off);\n errorExit(\"Fatal Error\", \"Bluetooth не поддерживается\");\n\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth включен...\");\n btState.setImageResource(R.drawable.ic_action_on);\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(btAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }\n }",
"private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"private void bluetooth_connect_device() throws IOException\n {\n try\n {\n myBluetooth = BluetoothAdapter.getDefaultAdapter();\n address = myBluetooth.getAddress();\n pairedDevices = myBluetooth.getBondedDevices();\n if (pairedDevices.size()>0)\n {\n for(BluetoothDevice bt : pairedDevices)\n {\n address=bt.getAddress().toString();name = bt.getName().toString();\n Toast.makeText(getApplicationContext(),\"Connected\", Toast.LENGTH_SHORT).show();\n\n }\n }\n\n }\n catch(Exception we){}\n myBluetooth = BluetoothAdapter.getDefaultAdapter();//get the mobile bluetooth device\n BluetoothDevice dispositivo = myBluetooth.getRemoteDevice(address);//connects to the device's address and checks if it's available\n btSocket = dispositivo.createInsecureRfcommSocketToServiceRecord(myUUID);//create a RFCOMM (SPP) connection\n btSocket.connect();\n try { t1.setText(\"BT Name: \"+name+\"\\nBT Address: \"+address); }\n catch(Exception e){}\n }",
"@Override\n public void onScanFailed() {\n Log.d(TAG, \"Scan Failed\");\n BluetoothManipulator.startScan();\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry{\n//\t\t\t\tdevAddr = devices.get(position).split(\"\\\\|\")[1];\n//\t\t\t\tbtAdapt.cancelDiscovery();\n//\t\t\t\t\n//\t\t\t\tbtSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n//\t\t\t\tbtSocket.connect();Log.e(tag, \"connected\");\n\t\t\t\tInetAddress severInetAddr=InetAddress.getByName(\"120.105.129.108\");\n\t\t\t\tWifisocket = new Socket(severInetAddr, 8101);\n\t\t\t\t\n\t\t\t\tsynchronized (this) {\n//\t\t\t\t\tbtIn = btSocket.getInputStream();\n//\t\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\t\tbtIn = Wifisocket.getInputStream();\n\t\t\t\t\tbtOut = Wifisocket.getOutputStream();\n\t\t\t\t\tLog.e(tag, \"connected\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tThread.sleep(100);\n\t\t\t\tsetUpAsForeground(\"Wifi已連線\");\n\t\t\t} catch( IOException | InterruptedException e ){\n\t\t\t\te.printStackTrace();\n\t\t\t\ttry{\n//\t\t\t\t\tbtSocket.close();\n//\t\t\t\t\tWifisocket.close();\n\t\t\t\t\tThread.sleep(1500);\n\t\t\t\t\tsetUpAsForeground(\"Wifi未連線\");\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t} catch(InterruptedException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tLog.i(\"exiconne\", \"bluetoohservice bye!;\");\n\t\t\t\t}\n//\t\t\t\tbtSocket = null;\n\t\t\t\tWifisocket = null;\n\t\t\t\tmBTState = BTState.stopped;\n\t\t\t\tBluetoothConnect.mBTstate = BTstate.opened;\n\t\t\t}\n\n\t\t}",
"private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }",
"private void bluetoothConnect() {\n\n btDevice = btAdapter.getRemoteDevice(EDISON_ADDRESS);\n if (btDevice == null) {\n Log.d(TAG,\"get remote device fail!\");\n finish();\n }\n\n try {\n btSocket = btDevice.createRfcommSocketToServiceRecord(SSP_UUID);\n } catch (IOException e) {\n Log.d(TAG,\"bluetooth socket create fail.\");\n }\n //save resource by cancel discovery\n btAdapter.cancelDiscovery();\n\n //connect\n try {\n btSocket.connect();\n Log.d(TAG,\"Connection established.\");\n } catch ( IOException e) {\n try {\n btSocket.close();\n }catch (IOException e2) {\n Log.d(TAG,\"unable to close socket after connect fail.\");\n }\n }\n\n //prepare outStream to send message\n try {\n outStream = btSocket.getOutputStream();\n } catch (IOException e) {\n Log.d(TAG,\"output stream init fail!\");\n }\n\n }",
"public void startBluetooth(){\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (!mBluetoothAdapter.isEnabled()) {\n Intent btIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n //btIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(btIntent);\n }\n mBluetoothAdapter.startDiscovery();\n System.out.println(\"@ start\");\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n getActivity().registerReceiver(mReceiver, filter);\n }",
"public void checkForBluetooth() {\n if (hasBluetoothSupport()) {\n ensureBluetoothEnabled();\n } else {\n showToast(\"Device does not support BlueTooth\");\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_main);\n btnOn = findViewById(R.id.bluetoothStart); // кнопка включения\n btnOff = findViewById(R.id.bluetoothStop); // кнопка выключения\n statusText = findViewById(R.id.statusBluetooth); // для вывода текста, полученного\n btState = findViewById(R.id.bluetoothIm);\n workState = findViewById(R.id.workStatIm);\n\n h = new Handler() {\n public void handleMessage(android.os.Message msg) {\n switch (msg.what) {\n case RECIEVE_MESSAGE:\n statusText.setText(\"msg\");// если приняли сообщение в Handler\n byte[] readBuf = (byte[]) msg.obj;\n String strIncom = new String(readBuf, 0, msg.arg1);\n sb.append(strIncom); // формируем строку\n int endOfLineIndex = sb.indexOf(\"\\r\\n\"); // определяем символы конца строки\n if (endOfLineIndex > 0) { // если встречаем конец строки,\n String sbprint = sb.substring(0, endOfLineIndex); // то извлекаем строку\n sb.delete(0, sb.length()); // и очищаем sb\n statusText.setText(\"Ответ от датчика: \" + sbprint); // обновляем TextView\n String[] step_data = sbprint.split(\" \");\n writeFile(step_data[0]);\n writeFile(\";\");\n writeFile(step_data[1]);\n writeFile(\";\");\n writeFile(step_data[2]);\n writeFile(\";\\n\");\n btnOff.setEnabled(true);\n btnOn.setEnabled(true);\n }\n //Log.d(TAG, \"...Строка:\"+ sb.toString() + \"Байт:\" + msg.arg1 + \"...\");\n break;\n }\n };\n };\n\n btAdapter = BluetoothAdapter.getDefaultAdapter(); // получаем локальный Bluetooth адаптер\n\n if (btAdapter.isEnabled()) {\n SharedPreferences prefs_btdev = getSharedPreferences(\"btdev\", 0);\n String btdevaddr=prefs_btdev.getString(\"btdevaddr\",\"?\");\n\n if (btdevaddr != \"?\") {\n BluetoothDevice device = btAdapter.getRemoteDevice(btdevaddr);\n UUID SERIAL_UUID = UUID.fromString(\"0000f00d-1212-afde-1523-785fef13d123\"); // bluetooth serial port service\n //UUID SERIAL_UUID = device.getUuids()[0].getUuid(); //if you don't know the UUID of the bluetooth device service, you can get it like this from android cache\n try {\n btSocket = device.createRfcommSocketToServiceRecord(SERIAL_UUID);\n } catch (Exception e) {\n Log.e(\"\",\"Error creating socket\");\n }\n\n try {\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (IOException e) {\n Log.e(\"\",e.getMessage());\n try {\n Log.e(\"\",\"trying fallback...\");\n btSocket =(BluetoothSocket) device.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(device,1);\n btSocket.connect();\n Log.e(\"\",\"Connected\");\n } catch (Exception e2) {\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n }\n }\n } else {\n Log.e(\"\",\"BT device not selected\");\n }\n }\n\n checkBTState();\n\n btnOn.setOnClickListener(new OnClickListener() { // определяем обработчик при нажатии на кнопку\n public void onClick(View v) {\n //btnOn.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_on);\n mConnectedThread.run();\n // TODO start writing in file\n }\n });\n\n btnOff.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n //btnOff.setEnabled(false);\n workState.setImageResource(R.drawable.ic_action_work_off);\n mConnectedThread.cancel();\n // TODO stop writing in file\n }\n });\n }",
"private void setupBTService(){\n btService = new BluetoothService(this, mHandler);\n\n // Initialize the buffer for outgoing messages\n outStringBuffer = new StringBuffer(\"\");\n\t}",
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}",
"private void checkBleSupportAndInitialize() {\n Log.d(TAG, \"checkBleSupportAndInitialize: \");\n // Use this check to determine whether BLE is supported on the device.\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(TAG,\"device_ble_not_supported \");\n Toast.makeText(this, R.string.device_ble_not_supported,Toast.LENGTH_SHORT).show();\n return;\n }\n // Initializes a Blue tooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n if (mBluetoothAdapter == null) {\n // Device does not support Blue tooth\n Log.d(TAG, \"device_ble_not_supported \");\n Toast.makeText(this,R.string.device_ble_not_supported, Toast.LENGTH_SHORT).show();\n return;\n }\n\n //打开蓝牙\n if (!mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"open bluetooth \");\n bluetoothUtils.openBluetooth();\n }\n }",
"@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"@Override\n public void onConnectionFailed(Die die, Exception e) {\n Log.d(TAG, \"Connection failed\", e);\n dicePlus = null;\n BluetoothManipulator.startScan();\n }",
"public boolean mBT_PickDevice2(){ //Will change sRemoteDeviceName\n if (oBTadapter==null) return false;\n bDevicePickerActive=true;\n oBTadapter.startDiscovery();\n {\n Intent intent = new Intent(\"android.bluetooth.devicepicker.action.LAUNCH\");\n mContext.startActivity(intent); //startActivityForResult\n }\n mSleep(1000);\n return true;\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"public void sendBtMsg(final String msg2send) {\n UUID uuid = UUID.fromString(\"94f39d29-7d6d-437d-973b-fba39e49d4ee\"); //Standard SerialPortService ID\n try {\n\n if (mmDevice != null) {\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n if (!mmSocket.isConnected()) {\n try {\n mmSocket.connect();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n\n toastMsg(\"Connection Established\");\n\n String msg = msg2send;\n //msg += \"\\n\";\n OutputStream mmOutputStream = null;\n try {\n mmOutputStream = mmSocket.getOutputStream();\n mmOutputStream.write(msg.getBytes());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n } catch (IOException e) {\n Log.e(\"\", e.getMessage());\n mmSocket.close();\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n toastMsg(\"Connection not Established\");\n\n\n }\n });\n\n /*try {\n Log.e(\"\", \"trying fallback\");\n mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod(\"createRfcommSocket\", new Class[] {int.class}).invoke(mmDevice,1);\n mmSocket.connect();\n Log.e(\"\", \"Connected\");\n }\n catch (Exception e2){\n Log.e(\"\", \"Couldn't establish Bluetooth connection!\");\n toastMsg(\"Couldn't establish Bluetooth connection!\");\n }*/\n }\n }\n\n\n/*\n if (mmOutputStream == null)\n try {\n mmOutputStream = mmSocket.getOutputStream();\n } catch (IOException e) {\n errorExit(\"Fatal Error\", \"In onResume(), input and output stream creation failed:\" + e.getMessage() + \".\");\n }*/\n\n } else {\n if (mBluetoothAdapter != null) {\n\n\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().matches(\".*\")) //Note, you will need to change this to match the name of your device\n {\n Log.e(\"Aquarium\", device.getName());\n mmDevice = device;\n sendBtMsg(msg2send);\n break;\n }\n }\n }\n }\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (bluetoothAdapter == null) {\n //Display a toast notifying the user that their device doesn’t support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device doesn’t support Bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n //If BluetoothAdapter doesn’t return null, then the device does support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device does support Bluetooth\", Toast.LENGTH_LONG).show();\n }\n }",
"public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}",
"private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"private void initPairBluetoothDevice(BluetoothDevice btDevice) {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - initPairBluetoothDevice - start\");\n\n try {\n Method method = btDevice.getClass().getMethod(\"createBond\", (Class[]) null);\n method.invoke(btDevice, (Object[]) null);\n } catch (Exception e) {\n }\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - initPairBluetoothDevice - start\");\n }",
"public void run() {\r\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\r\n adapter.cancelDiscovery();\r\n try {\r\n btSocket.connect();\r\n Log.d(\"TAG\", \"Device connected\");\r\n isConnected = true;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n handler.obtainMessage(CONNECTING_STATUS, 1, -1).sendToTarget();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n try {\r\n isConnected = false;\r\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);\r\n SharedPreferences.Editor edit = preferences.edit();\r\n edit.putBoolean(\"Connection\", isConnected);\r\n edit.apply();\r\n btSocket.close();\r\n handler.obtainMessage(CONNECTING_STATUS, -1,-1).sendToTarget();\r\n } catch (IOException f) {\r\n f.printStackTrace();\r\n }\r\n return;\r\n }\r\n //Perform work from connection in a separate thread\r\n connectedThread = new ConnectedThread(btSocket);\r\n connectedThread.run();\r\n }",
"public void initDevice() {\n myBluetoothAdapter = android.bluetooth.BluetoothAdapter.getDefaultAdapter();\n pairedDevices = myBluetoothAdapter.getBondedDevices();\n }",
"private void checkBluetoothEnabled()\r\n {\r\n if (!mBluetoothAdapter.isEnabled())\r\n {\r\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBtIntent, BLUETOOTH_ENABLE_REQUEST_ID);\r\n } else\r\n checkNfcEnabled();\r\n }",
"public void listBT() {\n Log.d(\"Main Activity\", \"Listing BT elements\");\n if (searchBt) {\n //Discover bluetooth devices\n final List<String> list = new ArrayList<>();\n list.add(\"\");\n pairedDevices.addAll(mBluetoothAdapter.getBondedDevices());\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n list.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n if (!h7) {\n Log.d(\"Main Activity\", \"Listing BTLE elements\");\n final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n if (!list.contains(device.getName() + \"\\n\" + device.getAddress())) {\n Log.d(\"Main Activity\", \"Adding \" + device.getName());\n list.add(device.getName() + \"\\n\" + device.getAddress());\n pairedDevices.add(device);\n }\n }\n };\n\n\n Thread scannerBTLE = new Thread() {\n public void run() {\n Log.d(\"Main Activity\", \"Starting scanning for BTLE\");\n mBluetoothAdapter.startLeScan(leScanCallback);\n try {\n Thread.sleep(5000);\n Log.d(\"Main Activity\", \"Stoping scanning for BTLE\");\n mBluetoothAdapter.stopLeScan(leScanCallback);\n } catch (InterruptedException e) {\n Log.e(\"Main Activity\", \"ERROR: on scanning\");\n }\n }\n };\n\n scannerBTLE.start();\n }\n\n //Populate drop down\n spinner1 = (Spinner) findViewById(R.id.spinner1);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner1.setOnItemSelectedListener(this);\n spinner1.setAdapter(dataAdapter);\n\n for (int i = 0; i < dataAdapter.getCount(); i++) {\n if (dataAdapter.getItem(i).contains(\"Polar H7\")) spinner1.setSelection(i);\n }\n\n if (DataHandler.getInstance().getID() != 0 && DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n }\n }",
"public interface BluetoothListener {\n\t/**\n\t * Get a description of the game, to be displayed on the BluetoothFragment layout.\n\t * @return\n\t */\n\tString getHelpString();\n\t\n\t/**\n\t * @see #onConnectedAsServer(String)\n\t */\n\tvoid onConnectedAsClient(String deviceName);\n\t\n\t/**\n\t * The 2 devices have established a bluetooth connection.\n\t * The typical action at this point is to hide the bluetooth\n\t * fragment and show the game fragment. From now on the\n\t * communication between client and server is symmetrical:\n\t * both devices can equally send and receive messages.\n\t * \n\t * Sometimes it is useful to know which device requested the\n\t * connection (the client) and which side accepted that\n\t * connection (the server).\n\t * \n\t * @param deviceName the name of the remote device\n\t */\n\tvoid onConnectedAsServer(String deviceName);\n\t\n\t/**\n\t * Typically the Activity will hide the game fragment and show\n\t * the BluetoothFragment, to allow the user to re-connect.\n\t */\n\tvoid onConnectionLost();\n\t\n\tvoid onError(String message);\n\t\n\t/**\n\t * A data message has been received from the remote device.\n\t * This corresponds to the other device performing a write().\n\t * @see BluetoothService#write(byte[] data)\n\t * \n\t * @param data\n\t */\n\tvoid onMessageRead(byte[] data);\n\t\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * by the activity using Toast.\n\t * @param string\n\t */\n\tvoid onMessageToast(String string);\n\t\n\t/**\n\t * Called when the state of the bluetooth service has changed.\n\t * @see class BluetoothService.BTState for possible values.\n\t * @param state\n\t */\n\tvoid onStateChange(BluetoothService.BTState state);\n\t\n\t/**\n\t * Pass the object that will handle bluetooth communication.\n\t * Null if bluetooth not available on this device.\n\t * The main method to use in communication is write(byte[] data)\n\t * \n\t * @see BluetoothService#write(byte[] data)\n\t * @param bluetoothService\n\t */\n\tvoid setBluetoothService(BluetoothService bluetoothService);\n\n\t/**\n\t * A status message sent by the bluetooth service to be displayed\n\t * somewhere.\n\t * @param message\n\t */\n\tvoid setStatusMessage(String message);\n}",
"public void registerCallback() {\n if (mLocalManager == null) {\n Log.e(TAG, \"registerCallback() Bluetooth is not supported on this device\");\n return;\n }\n mLocalManager.setForegroundActivity(mFragment.getContext());\n mLocalManager.getEventManager().registerCallback(this);\n mLocalManager.getProfileManager().addServiceListener(this);\n forceUpdate();\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // if user chooses not to enable Bluetooth.\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n showToast(\"Bluetooth is required for this application to work\");\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"public void bluetooth_setup_client()\r\n {\n\r\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(BluetoothDevice.ACTION_FOUND);\r\n\t\tfilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\r\n\t\tif(client_receiver != null) {\r\n\t\t\tLoaderActivity.m_Activity.unregisterReceiver(client_receiver);\r\n\t\t}\r\n\t\tclient_receiver = new Bluetooth_Device_Found_Revicer();\r\n\t\tLoaderActivity.m_Activity.registerReceiver(client_receiver, filter);\r\n\t\tbluetooth_adapter.startDiscovery();\r\n\t\tmessages.clear();\r\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkBluetooth() {\n\t\tboolean flag = oTest.checkBluetooth();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"public boolean initialize() {\n // For API level 18 and above, get a reference to BluetoothAdapter through\n // BluetoothManager.\n if (mBluetoothManager == null) {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n if (mBluetoothManager == null) {\n Log.e(TAG, \"Unable to initialize BluetoothManager.\");\n return false;\n }\n }\n\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n if (mBluetoothAdapter == null) {\n Log.e(TAG, \"Unable to obtain a BluetoothAdapter.\");\n return false;\n }\n\n return true;\n }",
"@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tbluetoothChat = new BluetoothChat(context);\r\n\t\t\tif (!BluetoothAdapter.checkBluetoothAddress(addr)) { // 检查蓝牙地址是否有效\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tBluetoothDevice device = bluetoothAdapter.getRemoteDevice(addr);\r\n\t\t\twhile (true) {\r\n\t\t\t\tif (count == LONG_TIME_CONNECTED) {\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t\tif (device.getBondState() != BluetoothDevice.BOND_BONDED) {\r\n\t\t\t\t\t// 如果未匹配,则继续执行\r\n\t\t\t\t\t// handler.postDelayed(runnable, 5000);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tClsUtils.setPin(device.getClass(), device, pin); // 手机和蓝牙采集器配对\r\n\t\t\t\t\t\tClsUtils.createBond(device.getClass(), device);\r\n\t\t\t\t\t\tremoteDevice = device; // 配对完毕就把这个设备对象传给全局的remoteDevice\r\n\t\t\t\t\t\tThread.sleep(5000);\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 赋值至全局\r\n\t\t\t\t\tremoteDevice = device;\r\n\t\t\t\t\t// 移除线程后立即连接\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbluetoothChat.goConnect(device);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tLooper.loop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\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\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bluetooth_14_feb receiveObj = (Bluetooth_14_feb) context.getApplicationContext();\n boolean appActive = receiveObj.isActivityVisible();\n //int appActive = receiveObj.getActivityCount();\n //Log.d(TAG,\"onReceive:receiver\");\n String action = intent.getAction(); // Get intent's action string\n Bundle extras = intent.getExtras();\n\n if (extras == null) return; // All intents of interest have extras.\n\n\n switch (action) {\n case \"android.bluetooth.adapter.action.STATE_CHANGED\": {\n\n int state = extras.getInt(\"android.bluetooth.adapter.extra.STATE\", FAIL);\n switch (state) {\n case BluetoothAdapter.STATE_OFF: \n if (!appActive) {\n\n Toast.makeText(context,\"Bluetooth:OFF\",Toast.LENGTH_SHORT).show();\n\n }\n else{\n\n Intent inten = new Intent(context,ConnectivityDialog.class);\n inten.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(inten);\n //num=1;\n\n }\n\n break;\n \n case BluetoothAdapter.STATE_ON:\n\n\n if(!appActive) {\n Log.d(TAG,\"state-on-appactive\");\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n else{\n\n Intent i = new Intent(\"FINISH\");\n //i.setAction(\"FINISH\");\n context.sendBroadcast(i);\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n break;\n\n }\n\n }\n }\n }",
"private boolean isBtConnected(){\n \treturn false;\n }",
"private void connect() {\n // after 10 seconds its connected\n new Handler().postDelayed(\n new Runnable() {\n public void run() {\n Log.d(TAG, \"Bluetooth Low Energy device is connected!!\");\n // Toast.makeText(getApplicationContext(),\"Connected!\",Toast.LENGTH_SHORT).show();\n stateService = Constants.STATE_SERVICE.CONNECTED;\n startForeground(Constants.NOTIFICATION_ID_FOREGROUND_SERVICE, prepareNotification());\n }\n }, 10000);\n\n }",
"void setBluetoothService(BluetoothService bluetoothService);",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n switch (requestCode)\n {\n case ENABLE_BLUETOOTH:\n\n if (resultCode == RESULT_OK)\n {\n // Si entre aca es porque active el bluetooth y muestro la Activity con la lista de dispositivos emparejados\n Intent activityListaDispositivos = new Intent(MainActivity.this, ListaDispositivos.class);\n startActivityForResult(activityListaDispositivos, SOLICITA_CONEXION);\n }\n break;\n\n case SOLICITA_CONEXION:\n\n if(resultCode == RESULT_OK)\n {\n // Inicio una Async Task para iniciar el Bluetooth con una barra de estado\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pDialog.setMessage(\"Conectando dispositivo\");\n pDialog.setCancelable(true);\n pDialog.setMax(100);\n\n // Tomo la MAC de la lista de dispositivos aparejados para conectarme\n MAC = data.getExtras().getString(ListaDispositivos.ENDERECO_MAC);\n\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n mDevice = mBluetoothAdapter.getRemoteDevice(MAC);\n\n // Inicio la tarea para iniciar la comunicacion Bluetooth\n Bluetooth_init = new AsyncTask_BT_Dialog();\n Bluetooth_init.execute();\n }\n break;\n\n case 3:\n Toast.makeText(MainActivity.this, \"GPS encendido \" , Toast.LENGTH_SHORT).show();\n break;\n }\n }",
"@Override\n protected void onResume()\n {\n super.onResume();\n\n // Vuelvo a llamar a la tarea para que siga escuchando lo que llega por Bluetooth\n if(Bluetooth_Conectado == true && Bluetooth_Encendido == true)\n {\n Bluetooth_RX_aux = new AsyncTask_BT_RX(conexionBluetooth);\n Bluetooth_RX_aux.execute();\n }\n }",
"public boolean checkBluetooth() {\n if (!mActivity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(mActivity, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n }\n\n // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to\n // BluetoothAdapter through BluetoothManager.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) mActivity.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n // Checks if Bluetooth is supported on the device.\n if (mBluetoothAdapter == null) {\n Toast.makeText(mActivity, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"void onStateChange(BluetoothService.BTState state);",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\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 ResultDevice(ArrayList<BluetoothDevice> deviceList) {\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 ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\n }",
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"void onCloseBleComplete();",
"@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n Log.v(TAG, \"** onActivityResult **\");\r\n // determine from which activity\r\n switch (requestCode) {\r\n // if it was the request to enable Bluetooth:\r\n case REQUEST_ENABLE_BT:\r\n if (resultCode == Activity.RESULT_OK) {\r\n // Bluetooth is enabled now\r\n Log.v(TAG, \"** Bluetooth is now enabled**\");\r\n } else {\r\n // user decided not to enable Bluetooth so exit application\r\n Log.v(TAG, \"** Bluetooth is NOT enabled**\");\r\n Toast.makeText(this, \"Bluetooth not enabled\",\r\n Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n }",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"private void bluetoothClientProcessing(){\n\n\t\tif( client != null ){\n\t\t\tbyte keyReceive = client.receiveByte() ;\n\n\t\t\tif( keyReceive == DataTransmiting.SOFTKEY_RIGHT ||\n\t\t\t\tkeyReceive == DataTransmiting.KEY_FIRE\t){\n \n\t\t\t\tshouldStop=true;\n\t // midlet.setCurrLevel(currlevel);+\n\t midlet.playGameAgain( currlevel ,isBluetoothMode );\n\n\t\t\t}\n\t\t\telse if( keyReceive == DataTransmiting.MESSAGE_EXIT_GAME ){\n\t\t\t\tmidlet.setAlert(\"The device disconnected\") ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcurrlevel = keyReceive ;\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t}",
"private void enableBtmon() {\n System.out.println(\"Starting Btmon Service...\");\n try {\n btmonProcess = new ProcessBuilder(\"/usr/bin/btmon\").start();\n InputStreamReader inputStream = new InputStreamReader(btmonProcess.getInputStream());\n int size;\n char buffer[] = new char[1024];\n while ((size = inputStream.read(buffer, 0, 1024)) != -1) {\n // System.out.println(\" --- Read ----\");\n String data = String.valueOf(buffer, 0, size);\n processBeaconMessage(data);\n // Thread.sleep(1000);\n }\n } catch (IOException ex ) {\n ex.printStackTrace();\n } catch (Exception ex ) {\n ex.printStackTrace();\n } finally {\n if (btmonProcess != null)\n btmonProcess.destroy();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n mCheckBt = false;\n if (requestCode == REQUEST_ENABLE_BT && resultCode != RESULT_OK) {\n// mScanButton.setEnabled(false);\n Toast.makeText(this, getString(R.string.bluetooth_not_enabled), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }",
"private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }",
"public void openBluetooth() throws IOException {\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805f9b34fb\"); //Standard SerialPortService ID\n mmSocket = mmDevice.createRfcommSocketToServiceRecord(uuid);\n mmSocket.connect();\n mmOutputStream = mmSocket.getOutputStream();\n mmInputStream = mmSocket.getInputStream();\n\n beginListenForData();\n\n btStatusDisplay.setText(\"Bluetooth Connection Opened\");\n }",
"public boolean mBTOpen1() {\n if (oBTadapter == null){ //Prepare BT\n return mBTInit1();\n }else if (oBTadapter.isEnabled()) { //BT port is ready , Running return\n return true;\n }else { //Try to open BT port\n mMsgLog(\"Turning on the Bluetooth\");\n isOpenedByMe = true;\n oBTadapter.enable(); //Turn on bluetooth if not already active\n mSleep(1000);\n if (oBTadapter.isEnabled()) {\n return true;\n }\n }\n return false;\n }",
"public interface IBluetoothHeadset\n extends IInterface {\n public static abstract class Stub extends Binder\n implements IBluetoothHeadset {\n private static class Proxy\n implements IBluetoothHeadset {\n\n public boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean cancelConnectThread() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getConnectedDevices() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_64;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n java.util.ArrayList arraylist;\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n parcel.writeIntArray(ai);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n arraylist = parcel1.createTypedArrayList(BluetoothDevice.CREATOR);\n parcel1.recycle();\n parcel.recycle();\n return arraylist;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.bluetooth.IBluetoothHeadset\";\n }\n\n public int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_65;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return i;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_88;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int j;\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n Exception exception;\n if(j == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(20, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(21, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = true;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.bluetooth.IBluetoothHeadset\");\n if(bluetoothdevice == null)\n break MISSING_BLOCK_LABEL_76;\n parcel.writeInt(1);\n bluetoothdevice.writeToParcel(parcel, 0);\n_L1:\n int i;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n Exception exception;\n if(i == 0)\n flag = false;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n parcel.writeInt(0);\n goto _L1\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static IBluetoothHeadset asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.bluetooth.IBluetoothHeadset\");\n if(iinterface != null && (iinterface instanceof IBluetoothHeadset))\n obj = (IBluetoothHeadset)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((IBluetoothHeadset) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 22: default 192\n // 1: 215\n // 2: 278\n // 3: 341\n // 4: 366\n // 5: 395\n // 6: 449\n // 7: 516\n // 8: 570\n // 9: 633\n // 10: 696\n // 11: 759\n // 12: 813\n // 13: 876\n // 14: 939\n // 15: 1002\n // 16: 1036\n // 17: 1099\n // 18: 1162\n // 19: 1229\n // 20: 1283\n // 21: 1346\n // 1598968902: 206;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21 _L22 _L23\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L25:\n return flag;\n_L23:\n parcel1.writeString(\"android.bluetooth.IBluetoothHeadset\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice17;\n boolean flag15;\n if(parcel.readInt() != 0)\n bluetoothdevice17 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice17 = null;\n flag15 = connect(bluetoothdevice17);\n parcel1.writeNoException();\n if(flag15)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice16;\n boolean flag14;\n if(parcel.readInt() != 0)\n bluetoothdevice16 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice16 = null;\n flag14 = disconnect(bluetoothdevice16);\n parcel1.writeNoException();\n if(flag14)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list1 = getConnectedDevices();\n parcel1.writeNoException();\n parcel1.writeTypedList(list1);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n List list = getDevicesMatchingConnectionStates(parcel.createIntArray());\n parcel1.writeNoException();\n parcel1.writeTypedList(list);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice15;\n int k1;\n if(parcel.readInt() != 0)\n bluetoothdevice15 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice15 = null;\n k1 = getConnectionState(bluetoothdevice15);\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice14;\n boolean flag13;\n if(parcel.readInt() != 0)\n bluetoothdevice14 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice14 = null;\n flag13 = setPriority(bluetoothdevice14, parcel.readInt());\n parcel1.writeNoException();\n if(flag13)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice13;\n int j1;\n if(parcel.readInt() != 0)\n bluetoothdevice13 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice13 = null;\n j1 = getPriority(bluetoothdevice13);\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice12;\n boolean flag12;\n if(parcel.readInt() != 0)\n bluetoothdevice12 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice12 = null;\n flag12 = startVoiceRecognition(bluetoothdevice12);\n parcel1.writeNoException();\n if(flag12)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice11;\n boolean flag11;\n if(parcel.readInt() != 0)\n bluetoothdevice11 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice11 = null;\n flag11 = stopVoiceRecognition(bluetoothdevice11);\n parcel1.writeNoException();\n if(flag11)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice10;\n boolean flag10;\n if(parcel.readInt() != 0)\n bluetoothdevice10 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice10 = null;\n flag10 = isAudioConnected(bluetoothdevice10);\n parcel1.writeNoException();\n if(flag10)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice9;\n int i1;\n if(parcel.readInt() != 0)\n bluetoothdevice9 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice9 = null;\n i1 = getBatteryUsageHint(bluetoothdevice9);\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice8;\n boolean flag9;\n if(parcel.readInt() != 0)\n bluetoothdevice8 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice8 = null;\n flag9 = createIncomingConnect(bluetoothdevice8);\n parcel1.writeNoException();\n if(flag9)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice7;\n boolean flag8;\n if(parcel.readInt() != 0)\n bluetoothdevice7 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice7 = null;\n flag8 = acceptIncomingConnect(bluetoothdevice7);\n parcel1.writeNoException();\n if(flag8)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice6;\n boolean flag7;\n if(parcel.readInt() != 0)\n bluetoothdevice6 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice6 = null;\n flag7 = rejectIncomingConnect(bluetoothdevice6);\n parcel1.writeNoException();\n if(flag7)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n boolean flag6 = cancelConnectThread();\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice5;\n boolean flag5;\n if(parcel.readInt() != 0)\n bluetoothdevice5 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice5 = null;\n flag5 = connectHeadsetInternal(bluetoothdevice5);\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice4;\n boolean flag4;\n if(parcel.readInt() != 0)\n bluetoothdevice4 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice4 = null;\n flag4 = disconnectHeadsetInternal(bluetoothdevice4);\n parcel1.writeNoException();\n if(flag4)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice3;\n boolean flag3;\n if(parcel.readInt() != 0)\n bluetoothdevice3 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice3 = null;\n flag3 = setAudioState(bluetoothdevice3, parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice2;\n int l;\n if(parcel.readInt() != 0)\n bluetoothdevice2 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice2 = null;\n l = getAudioState(bluetoothdevice2);\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L21:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice1;\n boolean flag2;\n if(parcel.readInt() != 0)\n bluetoothdevice1 = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice1 = null;\n flag2 = startScoUsingVirtualVoiceCall(bluetoothdevice1);\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L22:\n parcel.enforceInterface(\"android.bluetooth.IBluetoothHeadset\");\n BluetoothDevice bluetoothdevice;\n boolean flag1;\n if(parcel.readInt() != 0)\n bluetoothdevice = (BluetoothDevice)BluetoothDevice.CREATOR.createFromParcel(parcel);\n else\n bluetoothdevice = null;\n flag1 = stopScoUsingVirtualVoiceCall(bluetoothdevice);\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L25; else goto _L24\n_L24:\n }\n\n private static final String DESCRIPTOR = \"android.bluetooth.IBluetoothHeadset\";\n static final int TRANSACTION_acceptIncomingConnect = 13;\n static final int TRANSACTION_cancelConnectThread = 15;\n static final int TRANSACTION_connect = 1;\n static final int TRANSACTION_connectHeadsetInternal = 16;\n static final int TRANSACTION_createIncomingConnect = 12;\n static final int TRANSACTION_disconnect = 2;\n static final int TRANSACTION_disconnectHeadsetInternal = 17;\n static final int TRANSACTION_getAudioState = 19;\n static final int TRANSACTION_getBatteryUsageHint = 11;\n static final int TRANSACTION_getConnectedDevices = 3;\n static final int TRANSACTION_getConnectionState = 5;\n static final int TRANSACTION_getDevicesMatchingConnectionStates = 4;\n static final int TRANSACTION_getPriority = 7;\n static final int TRANSACTION_isAudioConnected = 10;\n static final int TRANSACTION_rejectIncomingConnect = 14;\n static final int TRANSACTION_setAudioState = 18;\n static final int TRANSACTION_setPriority = 6;\n static final int TRANSACTION_startScoUsingVirtualVoiceCall = 20;\n static final int TRANSACTION_startVoiceRecognition = 8;\n static final int TRANSACTION_stopScoUsingVirtualVoiceCall = 21;\n static final int TRANSACTION_stopVoiceRecognition = 9;\n\n public Stub() {\n attachInterface(this, \"android.bluetooth.IBluetoothHeadset\");\n }\n }\n\n\n public abstract boolean acceptIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean cancelConnectThread() throws RemoteException;\n\n public abstract boolean connect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean connectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean createIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean disconnectHeadsetInternal(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getAudioState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract int getBatteryUsageHint(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getConnectedDevices() throws RemoteException;\n\n public abstract int getConnectionState(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract List getDevicesMatchingConnectionStates(int ai[]) throws RemoteException;\n\n public abstract int getPriority(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean isAudioConnected(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean rejectIncomingConnect(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean setAudioState(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean setPriority(BluetoothDevice bluetoothdevice, int i) throws RemoteException;\n\n public abstract boolean startScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean startVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopScoUsingVirtualVoiceCall(BluetoothDevice bluetoothdevice) throws RemoteException;\n\n public abstract boolean stopVoiceRecognition(BluetoothDevice bluetoothdevice) throws RemoteException;\n}",
"private void connectToAdapter() {\n if (chosen) {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n // creation and connection of a bluetooth socket\n try {\n BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n setBluetoothSocket(socket);\n connected = true;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n connect.setText(\"Disconnect\");\n connect.setTextColor(Color.RED);\n }\n });\n } catch (IOException e) {\n Log.d(\"Exception\", \"Bluetooth IO Exception c\");\n connected = false;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(currContext, R.string.cannotConnect, Toast.LENGTH_SHORT).show();\n connect.setText(\"Connect\");\n connect.setTextColor(Color.BLACK);\n mode.setEnabled(true);\n }\n });\n }\n }\n if (bluetoothSocket.getRemoteDevice().getAddress() != null)\n Log.d(TAG, \"Bluetooth connected\");\n Log.d(TAG, \"Device address: \" + bluetoothSocket.getRemoteDevice().getAddress());\n initializeCom();\n }",
"public void initialisation() throws Exception{\n\t\t\t\tSystem.out.println(\"Wow much wait...\");\n\t\t\t\tBTConnection connection = Bluetooth.waitForConnection();\n\t\t\t\tif (connection == null)\n\t\t\t\t\tthrow new IOException(\"Epic fail connexion\");\n\t\t\t\tSystem.out.println(\"Wow very connexion !\");\n\t\t\t\t\n\t\t\t\t//si pas d'échec, on active les I/O bluetooth\n\t\t\t\tthis.recepteur.setInput(connection.openDataInputStream());\n\t\t\t\tthis.recepteur.setOutput(connection.openDataOutputStream());\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthis.recepteur.getOutput().writeByte((byte)0);\n\t\t\t\t\tthis.recepteur.getOutput().flush();\n\t\t\t\t} catch (IOException e3) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te3.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t}",
"private void registrarEventosBluetooth() {\n IntentFilter filtro = new IntentFilter();\n filtro.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filtro.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n filtro.addAction(BluetoothDevice.ACTION_FOUND);\n activity.registerReceiver(bluetoothReceiver, filtro);\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twait_time = 0;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (HomeView.ble_status == 0 || HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tscanLeDevice(true);\r\n\r\n\t\t\t\t\t\t} catch (IllegalArgumentException 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\tbluetoothSwitch = true;\r\n\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_time++;\r\n\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t} catch (InterruptedException 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\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"private void resetBluetooth() {\n if (mBtAdapter != null) {\n mBtAdapter.disable();\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n checkEnableBt();\n }\n }, 200);\n\n }\n }",
"public BluetoothService(Activity activity){\n mActivity = activity;\n\n mUserWarningService = new UserWarningService(mActivity.getApplicationContext());\n\n\n/*\n float [][] testdata ={{1},{2},{6},{4},{5},{6},{7},{8},{9},{10}};\n float f1 = Mean(testdata, 0,10);\n float f2 = Var(testdata, 0,10);\n float f3 = Rms(testdata, 0,10);\n float f4 = Skew(testdata, 0,10);\n int x = 1;\n\n */\n }",
"private void bluetoothSelected(JSONArray data, final CallbackContext callbackContext) throws JSONException {\n String arrayList = data.getString(0);\n\n String[] parts = arrayList.split(\"_\");\n\n String name = parts[0];\n String macAddress = parts[1];\n\n PinpadObject pinpad = new PinpadObject(name, macAddress, false);\n\n // Passa o pinpad selecionado para o provider de conexao bluetooth.\n BluetoothConnectionProvider bluetoothConnectionProvider = new BluetoothConnectionProvider(StoneSDK.this.cordova.getActivity(), pinpad);\n bluetoothConnectionProvider.setDialogMessage(\"Criando conexao com o pinpad selecionado\"); // Mensagem exibida do dialog.\n bluetoothConnectionProvider.setWorkInBackground(false); // Informa que havera um feedback para o usuario.\n bluetoothConnectionProvider.setConnectionCallback(new StoneCallbackInterface() {\n\n public void onSuccess() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Pinpad conectado\", Toast.LENGTH_SHORT).show();\n callbackContext.success();\n }\n\n public void onError() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\", Toast.LENGTH_SHORT).show();\n callbackContext.error(\"Erro durante a conexao. Verifique a lista de erros do provider para mais informacoes\");\n }\n\n });\n bluetoothConnectionProvider.execute(); // Executa o provider de conexao bluetooth.\n }",
"private void checkEnableBt() {\n if (mBtAdapter == null || !mBtAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"onActivityResult called\");\n\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n\n // User choose NOT to enable Bluetooth.\n mAlertBlue = null;\n showNegativeDialog(getResources().getString(R.string.blue_error_title),\n getResources().getString(R.string.blue_error_msg)\n );\n\n } else {\n\n // User choose to enable Bluetooth.\n mAlertBlue = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n verifyPermissions(mActivity);\n else {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n scanLeDevice(true);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }",
"@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }",
"@Override\n public void onServiceConnected(ComponentName componentName, IBinder service) {\n mNanoBLEService = ((NanoBLEService.LocalBinder) service).getService();\n\n //initialize bluetooth, if BLE is not available, then finish\n if (!mNanoBLEService.initialize()) {\n finish();\n }\n\n //Start scanning for devices that match DEVICE_NAME\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();\n if(mBluetoothLeScanner == null){\n finish();\n Toast.makeText(NewScanActivity.this, \"Please ensure Bluetooth is enabled and try again\", Toast.LENGTH_SHORT).show();\n }\n mHandler = new Handler();\n if (SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null) != null) {\n preferredDevice = SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null);\n scanPreferredLeDevice(true);\n } else {\n scanLeDevice(true);\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n }\n\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n BluetoothDevice mmDevice = null;\n\n List<String> mArray = new ArrayList<String>();\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n if(device.getName().equals(deviceName))\n mmDevice = device;\n mArray.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n\n //Creating the socket.\n BluetoothSocket mmSocket;\n BluetoothSocket tmp = null;\n\n UUID myUUID = UUID.fromString(mUUID);\n try {\n // MY_UUID is the app's UUID string, also used by the server code\n tmp = mmDevice.createRfcommSocketToServiceRecord(myUUID);\n } catch (IOException e) { }\n mmSocket = tmp;\n\n //socket created, try to connect\n\n try {\n mmSocket.connect();\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n // Run the example\n JArduino arduino = new BlinkAndAnalog(mmSocket);\n arduino.runArduinoProcess();\n\n Log.i(TAG, \"onCreate\");\n setContentView(R.layout.main);\n }",
"private boolean hasBluetoothSupport() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n return (mBluetoothAdapter != null);\n }"
] | [
"0.734516",
"0.7179065",
"0.71123654",
"0.70780146",
"0.70543045",
"0.7039718",
"0.7028194",
"0.70156366",
"0.696991",
"0.6950624",
"0.6907578",
"0.6879099",
"0.68416685",
"0.6841497",
"0.68293387",
"0.68189996",
"0.6787125",
"0.6771664",
"0.6754256",
"0.67391413",
"0.66979134",
"0.6669869",
"0.6651302",
"0.6626825",
"0.6622283",
"0.6611823",
"0.6608341",
"0.6608215",
"0.6593888",
"0.6593034",
"0.65574217",
"0.65447813",
"0.652526",
"0.65221936",
"0.65203255",
"0.65155756",
"0.6507239",
"0.6490932",
"0.64642197",
"0.646323",
"0.646188",
"0.6450342",
"0.6444509",
"0.6432815",
"0.6427473",
"0.6419628",
"0.6414498",
"0.6402864",
"0.6402593",
"0.63629794",
"0.6306259",
"0.6304292",
"0.63036966",
"0.63022774",
"0.6288148",
"0.62834036",
"0.62825495",
"0.62810516",
"0.62793404",
"0.6274976",
"0.6269671",
"0.6268036",
"0.6255503",
"0.62529933",
"0.6252133",
"0.6249354",
"0.62485385",
"0.62481767",
"0.6244322",
"0.6218527",
"0.6218321",
"0.62178975",
"0.62130755",
"0.6196631",
"0.6183474",
"0.6180885",
"0.6180492",
"0.61729574",
"0.6170194",
"0.61658674",
"0.61595666",
"0.6154846",
"0.6150757",
"0.61420614",
"0.61416876",
"0.6136408",
"0.6129134",
"0.6125968",
"0.61255074",
"0.6125069",
"0.6124165",
"0.61230993",
"0.61136854",
"0.611271",
"0.61114174",
"0.61086243",
"0.6106294",
"0.6105166",
"0.61042285",
"0.6101413",
"0.6092028"
] | 0.0 | -1 |
Wird nach dem REQUEST_ENABLE_BT Dialog aufgerufen. Wertet die Eingabe des Benutzers aus. | public void onActivityResult(int RequestCode, int ResultCode, Intent Data) {
super.onActivityResult(RequestCode, ResultCode, Data);
if(RequestCode == Bluetooth.REQUEST_ENABLE_BT){
if(ResultCode == -1){
createAct();
}
else{
finish();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}",
"private void checkEnableBt() {\n if (mBtAdapter == null || !mBtAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\r\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n mCheckBt = false;\n if (requestCode == REQUEST_ENABLE_BT && resultCode != RESULT_OK) {\n// mScanButton.setEnabled(false);\n Toast.makeText(this, getString(R.string.bluetooth_not_enabled), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n // user didn't want to turn on BT\n if (requestCode == ENABLE_BT_REQUEST_ID) {\n if(resultCode == Activity.RESULT_CANCELED) {\n btDisabled();\n return;\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void checkBTState() {\n if(bluetoothAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not supported\");\n } else {\n if (!bluetoothAdapter.isEnabled()) {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"public void checkBTState() {\n if(mAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (mAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n ((Activity) mContext).startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_ENABLE_BT:\n\t\t\tif(resultCode != RESULT_OK){\n\t\t\t\tToast.makeText(this, \"An error occured while enabling BT.\", Toast.LENGTH_LONG).show();\n\t\t\t\thasBTenabled = false;\n\t\t\t\tfinish();\n\t\t\t}else{\n\t\t\t\tsetupBTService();\n\t\t\t\tupdateBluetoothList();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase BT_SETTINGS_RESULT:\n\t\t\tupdateBluetoothList();\n\t\t\tbreak;\n\t\t\t\n case REQUEST_CONNECT_DEVICE_SECURE:\n // When DeviceListActivity returns with a device to connect\n if (resultCode == Activity.RESULT_OK) {\n connectDevice(data, true);\n }\n break;\n\t\t}\n\t}",
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n btState.setImageResource(R.drawable.ic_action_off);\n errorExit(\"Fatal Error\", \"Bluetooth не поддерживается\");\n\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth включен...\");\n btState.setImageResource(R.drawable.ic_action_on);\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(btAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // if user chooses not to enable Bluetooth.\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n showToast(\"Bluetooth is required for this application to work\");\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void checkBTState() {\n\t\tif (btAdapter == null) {\n\t\t\terrorExit(\"Fatal Error\", \"Bluetooth not support\");\n\t\t} else {\n\t\t\tif (btAdapter.isEnabled()) {\n\t\t\t\tLog.d(TAG, \"...Bluetooth ON...\");\n\t\t\t} else {\n\t\t\t\t// Prompt user to turn on Bluetooth\n\t\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableBtIntent, 1);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"onActivityResult called\");\n\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n\n // User choose NOT to enable Bluetooth.\n mAlertBlue = null;\n showNegativeDialog(getResources().getString(R.string.blue_error_title),\n getResources().getString(R.string.blue_error_msg)\n );\n\n } else {\n\n // User choose to enable Bluetooth.\n mAlertBlue = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n verifyPermissions(mActivity);\n else {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n scanLeDevice(true);\n }\n }\n }",
"private void checkBluetoothEnabled()\r\n {\r\n if (!mBluetoothAdapter.isEnabled())\r\n {\r\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBtIntent, BLUETOOTH_ENABLE_REQUEST_ID);\r\n } else\r\n checkNfcEnabled();\r\n }",
"@Override public void onClick(View v) {\n startActivity(new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE));\n }",
"@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n Log.v(TAG, \"** onActivityResult **\");\r\n // determine from which activity\r\n switch (requestCode) {\r\n // if it was the request to enable Bluetooth:\r\n case REQUEST_ENABLE_BT:\r\n if (resultCode == Activity.RESULT_OK) {\r\n // Bluetooth is enabled now\r\n Log.v(TAG, \"** Bluetooth is now enabled**\");\r\n } else {\r\n // user decided not to enable Bluetooth so exit application\r\n Log.v(TAG, \"** Bluetooth is NOT enabled**\");\r\n Toast.makeText(this, \"Bluetooth not enabled\",\r\n Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n }",
"@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }",
"public void checkBluetooth(BluetoothAdapter bluetoothAdapter){\n if(bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"void activateBlue(BluetoothAdapter bluetoothAdapter){\r\n if (!bluetoothAdapter.isEnabled()) {\r\n Intent enableBlueTooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBlueTooth, REQUEST_CODE_ENABLE_BLUETOOTH);\r\n }\r\n }",
"private boolean BTEnabled() {\n if (!BT.isEnabled()) { // Ask user's permission to switch the Bluetooth adapter On.\n Intent enableIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n return false;\n } else {\n DisplayToast(\"Bluetooth is already on\");\n return true;\n }\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }",
"private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data){\r\n \tif(!mBtAdapter.isEnabled()){\r\n\t\t\tToast.makeText(this, \"Please ensure bluetooth is enabled!\", Toast.LENGTH_LONG).show();\r\n\r\n\t\t\tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(RESULT_BT_NOT_ENABLED, finishIntent);\r\n\t\t\tBluetoothActivity.this.finish();\r\n\t\t}\r\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t if(btAdapt.isEnabled()){\n\t\t \tbtAdapt.disable();\n\t\t }else {\n\t\t\t\tIntent intent =new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}",
"@Override\n public void onResume(){\n Log.i(TAG, \"-- ON RESUME --\");\n super.onResume();\n // If BT is not on, request that it be enabled.false\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(resultCode == RESULT_CANCELED) {\n\t\t\tToast.makeText(getApplicationContext(), \"Bluetooth must be enabled to continue\", Toast.LENGTH_SHORT).show();\n\t\t\tfinish();\n\t\t}\n\t}",
"@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}",
"@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }",
"private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"@Override\n public void onStart()\n {\n super.onStart();\n // setBTMenus( mApp.mBTAdapter.isEnabled() );\n }",
"public boolean mBTInit1(){\n //Initialize the bluetooth adapter\n if (oBTadapter !=null) return true ;\n oBTadapter = BluetoothAdapter.getDefaultAdapter();\n return (oBTadapter != null);\n }",
"public void enableProceed(boolean enabled, Button btt) {\n\t\tif (btt==null) {\n\t\t\tbtt = (Button) ((Sync) initiator).findViewById(R.id.btn_sync_proceed);\n\t\t}\n\t\tbtt.setEnabled(enabled);\t\t\t\n\t}",
"private void btnGetVisibleClicked(View v)\n {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n startActivityForResult(enableBTIntent,Constants.REQUEST_DISCOVERABILITY_BT);\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n \n Log.d(TAG, \"onActivityResult \" + resultCode);\n switch (requestCode) {\n //for now, only dealiing with insecure connection\n //i don't think its possible to have secure connections with a serial profile\n case REQUEST_CONNECT_DEVICE_INSECURE:\n if(resultCode == Activity.RESULT_OK){\n setupBluetooth();//since BT is enabled, setup client service\n connectToDevice(data, false);\n }\n else\n setStatus(BluetoothClientService.STATE_NONE);\n break;\n case REQUEST_ENABLE_BT:\n // When the request to enable Bluetooth returns\n if (resultCode == Activity.RESULT_OK) {\n Toast.makeText(this, \"Bluetooth is now enabled\", Toast.LENGTH_SHORT).show();\n }\n else {\n // User did not enable Bluetooth or an error occurred\n Log.d(TAG, \"BT not enabled\");\n Toast.makeText(this, R.string.bt_not_enabled_leaving, Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n }",
"private void enableBotonAceptar()\r\n\t{\r\n\t\t\r\n\t}",
"@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void enableBuyEntrance(){\r\n\t\tbuyEntrance = true;\r\n\t\tbuildHotel = true;\r\n\t}",
"protected void ACTION_B_ENABLE(ActionEvent e) {\n\t\tL_FilterStatusBox.setText(\"Enabled (Selected Port)\");\r\n\t}",
"private void updateBluetoothList(){\n\t\tif(bluetoothAdapter == null){\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tbuilder.setTitle(R.string.no_bt_error_dialog_title);\n\t\t\tbuilder.setMessage(R.string.no_bt_error_dialog_message);\n\t\t\tbuilder.setNeutralButton(R.string.no_bt_error_dialog_btn, new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t//check if it is enabled\n//\t\tif (!bluetoothAdapter.isEnabled()) {\n//\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n//\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n//\t\t}\n\t\t\n\t\tSet<BluetoothDevice> pairedDevices = bluetoothAdapter\n\t\t\t\t.getBondedDevices();\n\t\t\n\t\tpairedlist = new ArrayList<BluetoothDevice>();\n\t\t\n\t\tif (pairedDevices.size() > 0) {\n\t\t\tfor (BluetoothDevice device : pairedDevices) {\n\t\t\t\tif (isDeviceUsefulForSMS(device.getBluetoothClass()\n\t\t\t\t\t\t.getMajorDeviceClass())) {\n\t\t\t\t\tpairedlist.add(device);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(pairedlist.size() <= 0){\n\t\t\tshowBTPairedDialog();\n\t\t}\n\t\t\n\t\tupdateBTListView();\n\t}",
"private void validateBleSupport() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Snackbar.make(txtStatus, \"No LE Support.\", Snackbar.LENGTH_LONG).show();\n } else {\n\n /*\n * We need to enforce that Bluetooth is first enabled, and take the\n * user to settings to enable it if they have not done so.\n */\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n .getDefaultAdapter();\n\n if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"onResume: Bluetooth is disabled\");\n //Bluetooth is disabled, request enabling it\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivity(enableBtIntent);\n }\n }\n\n }",
"private void onEnableBluetoothResponse(int resultCode) {\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tlogger.debug(\"onEnableBluetoothResponse(): Bluetooth enabled. Starting Workout Service.\");\n\t\t\tworkoutServiceIntent = new Intent(this, WorkoutService.class);\n\t\t\tstartService(workoutServiceIntent);\n\t\t\tbindService(workoutServiceIntent, workoutServiceConn, BIND_AUTO_CREATE);\n\t\t}\n\n\t\telse {\n\t\t\tlogger.warn(\"onEnableBluetoothResponse(): User elected not to enable Bluetooth. Activity will now finish.\");\n\t\t\tfinish();\n\t\t}\n\t}",
"@Override\r\n\tpublic void onBoAdd(ButtonObject bo) 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.onBoAdd(bo);\r\n\t\tgetBillCardPanelWrapper().getBillCardPanel().setHeadItem(\"pp_archive\", 0);\r\n\t}",
"private void setEnabledBP(boolean a) {\n\t\tsetEnabled(btnNewButton_1, a);\r\n\t}",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tACTION_B_ENABLE(e);\r\n\t\t\t}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void setPositiveButton() {\n\t\t\t\t\t\t\t\t\tif (SystemConfig.loginResponse.getDutyFlag().equals(\"on\")) {\r\n\t\t\t\t\t\t\t\t\t\tsendForService(\"1\", str);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);\r\n\t\t\t\t\t\t\t\t\t\tMessage message = Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\tmessage.obj = \"下班状态不可以改派任务!\";\r\n\t\t\t\t\t\t\t\t\t\tmessage.what = ConstantValue.ERROE;\r\n\t\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// for update by haoyun\r\n\t\t\t\t\t\t\t\t\t// 20130401 end\r\n\t\t\t\t\t\t\t\t}",
"public boolean isEnabled_click_ActivateCoupon_Button(){\r\n\t\tif(click_ActivateCoupon_Button.isEnabled()) { return true; } else { return false;} \r\n\t}",
"public void setButtonBuyEnabled(boolean b) {\n\t\tbutton_buy.setEnabled(b);\n\t}",
"@Override\n public void onReceiveSetting() {\n showAdButton.setEnabled(true);\n Toast.makeText(this, \"onReceiveSetting\", Toast.LENGTH_SHORT).show();\n }",
"public static void checkPhoneSettings(Activity activity){\n\t\tif (mBluetoothAdapter == null) {\n\t\t //!TODO\n\t\t} else {\n\t\t\tLog.v(\"\", \"Bluetooth is supported\");\n\t\t\t//Check if bluetooth is enabled. If not, request the user to enable it.\n\t\t\tif (!mBluetoothAdapter.isEnabled()) {\n\t\t\t\tLog.v(\"\", \"Bluetooth is not turned on\");\n\t\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t activity.startActivityForResult(enableBtIntent,REQUEST_ENABLE_BT);\n\t\t\t}\n\t\t}\n\t}",
"public abstract void wgb_onEnable();",
"@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }",
"public static void betting()\n\t{\n\t\ttfBet.setEnabled(true);\n\t\tbtnPlay.setEnabled(true);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t}",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkBluetooth() {\n\t\tboolean flag = oTest.checkBluetooth();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"public void onClick(DialogInterface dialog, int id) {\n \t Intent settingsIntent = new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);\n \t startActivityForResult(settingsIntent, BT_SETTINGS_RESULT);\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"private boolean isBtConnected(){\n \treturn false;\n }",
"private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}",
"private void checkBleSupportAndInitialize() {\n Log.d(TAG, \"checkBleSupportAndInitialize: \");\n // Use this check to determine whether BLE is supported on the device.\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(TAG,\"device_ble_not_supported \");\n Toast.makeText(this, R.string.device_ble_not_supported,Toast.LENGTH_SHORT).show();\n return;\n }\n // Initializes a Blue tooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n if (mBluetoothAdapter == null) {\n // Device does not support Blue tooth\n Log.d(TAG, \"device_ble_not_supported \");\n Toast.makeText(this,R.string.device_ble_not_supported, Toast.LENGTH_SHORT).show();\n return;\n }\n\n //打开蓝牙\n if (!mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"open bluetooth \");\n bluetoothUtils.openBluetooth();\n }\n }",
"private void initWirelessCommunication() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n showToast(\"BLE is not supported\");\n finish();\n } else {\n showToast(\"BLE is supported\");\n // Access Location is a \"dangerous\" permission\n int hasAccessLocation = ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION);\n if (hasAccessLocation != PackageManager.PERMISSION_GRANTED) {\n // ask the user for permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_ACCESS_LOCATION);\n // the callback method onRequestPermissionsResult gets the result of this request\n }\n }\n // enable wireless communication alternative\n if (communicationAdapter == null || !communicationAdapter.isReadyToBeUsed()) {\n assert communicationAdapter != null;\n Intent enableWirelessCommunicationIntent = new Intent(communicationAdapter.actionRequestEnable());\n startActivityForResult(enableWirelessCommunicationIntent, REQUEST_ENABLE_BT);\n }\n }",
"public void checkForBluetooth() {\n if (hasBluetoothSupport()) {\n ensureBluetoothEnabled();\n } else {\n showToast(\"Device does not support BlueTooth\");\n }\n }",
"public boolean enableService() {\n \tlog_d( \"enabledService()\" );\n \tshowTitleNotConnected();\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return false;\n // If BT is not on, request that it be enabled.\n // setupChat() will then be called during onActivityResult\n if ( !mBluetoothAdapter.isEnabled() ) {\n\t\t\t// startActivity Adapter Enable\n\t\t\treturn true;\n // Otherwise, setup the chat session\n } else {\n initService();\n }\n return false;\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"private void turnOn(View v) {\n bluetoothAdapter.enable();\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\t\tcase R.id.bConnect:\n\t\t\t\tstartActivity(new Intent(\"android.intent.action.BT1\"));\n\t\t\t\tbreak;\n\t\t\tcase R.id.bDisconnect:\n\t\t\t\tBluetooth.disconnect();\n\t\t\t\tbreak;\n\t\t\tcase R.id.bXminus:\n\t\t\t\tif (Xview > 1) Xview--;\n\t\t\t\tbreak;\n\t\t\tcase R.id.bXplus:\n\t\t\t\tif (Xview < 100) Xview++;\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbLock:\n\t\t\t\tif (tbLock.isChecked()) {\n\t\t\t\t\tLock = true;\n\t\t\t\t} else {\n\t\t\t\t\tLock = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbScroll:\n\t\t\t\tif (tbScroll.isChecked()) {\n\t\t\t\t\tAutoScrollX = true;\n\t\t\t\t} else {\n\t\t\t\t\tAutoScrollX = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbStream:\n\t\t\t\tif (tbStream.isChecked()) {\n\t\t\t\t\tif (Bluetooth.connectedThread != null)\n\t\t\t\t\t\tBluetooth.connectedThread.write(Character.toString((char) 5));\n\t\t\t\t} else {\n\t\t\t\t\tif (Bluetooth.connectedThread != null)\n\t\t\t\t\t\tBluetooth.connectedThread.write(\"0\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t/*\n\t\tcase R.id.tbRecord:\n\t\t\tif (tbRecord.isChecked()){\n\t\t\t\tRecord = true;\n\n\t\t\t}else{\n\t\t\t\tRecord = false;\n\t\t\t}\n\t\t\tbreak;\n\t*/\n\t\t}\n\t}",
"private void acceptButtonListener(){\n \t ait = new InitAccountTask(context, this);\n \t\n \tthis.acceptButton.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(agbCheck.isChecked()){\n\t\t\t\t\t\n\t\t\t\t\tString[] arg = new String[3];\n\t\t\t\t\t\n\t\t\t\t\targ[0] = HelperFunctions.getInstance().cleanNumber(telNumber.getText().toString());\n\t\t\t\t\targ[1] = countryCode.getText().toString();\n\t\t\t\t\targ[2] = password.getText().toString();\n\t\t\t\t\t\n\t\t\t\t\tait.execute(arg);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tagbNotCheckedToast();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n }",
"private boolean BluetoothAvailable()\n {\n if (BT == null)\n return false;\n else\n return true;\n }",
"@Override\r\n\tprotected void onBoCancel() throws Exception {\n\t\tsuper.onBoCancel();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}",
"public boolean isBluetoothEnabled() {\n BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();\n if (bluetooth == null)\n return false;//\"device not BT capable\";\n return bluetooth.isEnabled();\n }",
"@Override\n public void onEnabled(Context context, Intent intent) {\n new EventBusUtils().send(1);\n// Toast.makeText(context, \"激活ok====\", Toast.LENGTH_SHORT).show();\n//\n }",
"@Override\r\n public void onStart() {\n super.onStart();\r\n Carteasy cs = new Carteasy();\r\n Map<String, String> data = cs.ViewData(String.valueOf(1), getApplicationContext());\r\n for (Map.Entry<String, String> entry : data.entrySet()) {\r\n //get the Id\r\n Log.d(\"Key: \",entry.getKey());\r\n Log.d(\"Value: \",entry.getValue());\r\n }\r\n if (!BTAdapter.isEnabled()) {\r\n // IT NEEDS BLUETOOTH PERMISSION\r\n // Intent to enable bluetooth, it will show the enable bluetooth\r\n // dialog\r\n Intent enableIntent = new Intent(\r\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n // this is to get a result if bluetooth was enabled or not\r\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\r\n // It will call onActivityResult method to determine if Bluetooth\r\n // was enabled or not\r\n } else {\r\n // Bluetooth is enabled\r\n }\r\n }",
"public void onClick(DialogInterface dialog, int id) {\n \t performBTKeyExchange(device);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_visit_multiplayer_game);\n\t\tbt = new Bluetooth();\n\t\tstatus = (TextView) findViewById(R.id.visit_game_status);\n\t\t\n\t\tint btState = bt.blutoothOK();\n\t\t\n\t\tif(btState == 1){\n\t\t\t/*\n\t\t\t * Geraet unterstuetzt kein Bluetooth\n\t\t\t * Meldung ausgeben und zum vorheriger Activity wechseln\n\t\t\t */\n\t\t\tToast t = Toast.makeText(getApplicationContext(), getString(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG);\n\t\t\tt.show();\n\t\t\tfinish();\n\t\t}\n\t\telse if(btState == 2){\n\t\t\t//Bluetooth ist nicht enabled\n\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t startActivityForResult(enableBtIntent, Bluetooth.REQUEST_ENABLE_BT);\n\t\t}\n\t\telse{\n\t\t\tcreateAct();\n\t\t}\n\t}",
"public boolean execActivityResultAdapter( int result, Intent data ) {\n log_d( \"execActivityResultAdapter()\" ); \t\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return true;\n\t\t// When the request to enable Bluetooth returns\n\t\tif ( result == Activity.RESULT_OK ) {\n\t\t\tlog_d( \"RESULT OK\" );\n\t\t\t// Bluetooth is now enabled, so set up a chat session\n\t\t\tinitService();\n\t\t// If user did not enable Bluetooth or an error occured\t\t\t\n\t\t} else {\n\t\t\tlog_d( \"RESULT NG\" );\n\t\t\treturn false;\t\t\t \t\n\t\t}\n\t\treturn true;\t\n\t}",
"public boolean mBTOpen1() {\n if (oBTadapter == null){ //Prepare BT\n return mBTInit1();\n }else if (oBTadapter.isEnabled()) { //BT port is ready , Running return\n return true;\n }else { //Try to open BT port\n mMsgLog(\"Turning on the Bluetooth\");\n isOpenedByMe = true;\n oBTadapter.enable(); //Turn on bluetooth if not already active\n mSleep(1000);\n if (oBTadapter.isEnabled()) {\n return true;\n }\n }\n return false;\n }",
"private void toggleButtonsEnabled() {\r\n final Button headsBtn = findViewById(R.id.b_heads);\r\n final Button tailsBtn = findViewById(R.id.b_tails);\r\n final Button startBtn = findViewById(R.id.b_startGame);\r\n\r\n headsBtn.setEnabled(false);\r\n tailsBtn.setEnabled(false);\r\n startBtn.setEnabled(true);\r\n }",
"private void BTKies() {\n Set<BluetoothDevice> pairedDevices;\n ArrayAdapter<String> BTArrayAdapter;\n final Dialog dialog = new Dialog(this);\n dialog.setContentView(R.layout.devicedialog);\n dialog.setTitle(\"Kies een verbinding\");\n BTListView = (ListView) dialog.findViewById(R.id.listView1);\n BTListView.setVisibility(View.VISIBLE);\n\n BTArrayAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_list_item_1);\n BTListView.setAdapter(BTArrayAdapter);\n pairedDevices = BT.getBondedDevices();\n for (BluetoothDevice device : pairedDevices)\n BTArrayAdapter.add(device.getName() + \"\\n\" + device.getAddress());\n\n dialog.show();\n\n // Pick het item uit de list\n BTListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n long arg3) {\n ListView lv = (ListView) arg0;\n TextView tv = (TextView) lv.getChildAt(arg2);\n String s = tv.getText().toString();\n\n Connect(s); // Make connection\n }\n\n private void Connect(String s) {\n int i = s.length();\n address = s.substring(i - 17);\n BluetoothDevice device = BT.getRemoteDevice(address);\n Log.d(TAG, \"Connecting to ... \" + device);\n BT.cancelDiscovery();\n try { // omgaan met exeptions\n btSocket = device\n .createRfcommSocketToServiceRecord(MY_UUID);\n btSocket.connect();\n // hier de comunicatie invullen ***********************************************\n writeData(\"c#\"); // vraag om een bevestiging van de verbinding\n BTListView.setVisibility(View.INVISIBLE);\n dialog.dismiss();\n beginListenForData();\n } catch (IOException e) {\n try {\n btSocket.close();\n } catch (IOException e2) {\n DisplayToast(\"Unable to end the connection\");\n }\n DisplayToast(\"Ontvanger niet beschikbaar. Kies opnieuw\");\n }\n }\t// einde connect\n\n });\t// einde onClick\n }",
"static void toggle(Context context) {\n Log.i(TAG, \"toggle Bluetooth\");\n\n // Just toggle Bluetooth power, as long as we're not already in\n // an intermediate state.\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n int state = adapter.getState();\n if (state == BluetoothAdapter.STATE_OFF)\n adapter.enable();\n else if (state == BluetoothAdapter.STATE_ON)\n adapter.disable();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int arg1) {\n dialog.cancel();\n Intent intent = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS);\n startActivity(intent);\n }",
"public boolean isEnabled_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isEnabled()) { return true; } else { return false;} \r\n\t}",
"private void enableButton(Button b) {\n b.setEnabled(true);\n }",
"void enableAddContactButton();",
"public S<T> bluetooth(Boolean enable){\n\t\t \t \n\t\t\t BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\t\t\t boolean isEnabled = bluetoothAdapter.isEnabled();\n\t\t\t if (enable && !isEnabled) {\n\t\t\t bluetoothAdapter.enable(); \n\t\t\t }\n\t\t\t else if(!enable && isEnabled) {\n\t\t\t bluetoothAdapter.disable();\n\t\t\t }\n\n\t\t return this;\n\t }"
] | [
"0.7826947",
"0.77180916",
"0.77069044",
"0.75119114",
"0.7491346",
"0.74902856",
"0.74780715",
"0.7444379",
"0.7444185",
"0.74146473",
"0.74146473",
"0.74146473",
"0.74146473",
"0.74146473",
"0.739829",
"0.73917747",
"0.73885757",
"0.7298837",
"0.7216289",
"0.7196864",
"0.71369386",
"0.7097272",
"0.7063258",
"0.7019318",
"0.70116055",
"0.6993244",
"0.69573843",
"0.69474375",
"0.68919945",
"0.6837525",
"0.67875355",
"0.67297655",
"0.667343",
"0.6524295",
"0.6512406",
"0.6496311",
"0.64798754",
"0.64482737",
"0.63468343",
"0.63270223",
"0.6300113",
"0.6293111",
"0.62531024",
"0.61958224",
"0.61866486",
"0.6182813",
"0.61807805",
"0.61765665",
"0.61703753",
"0.6148551",
"0.6133059",
"0.60916555",
"0.6076424",
"0.60724187",
"0.60590047",
"0.59998083",
"0.59760904",
"0.5958308",
"0.5936219",
"0.5923409",
"0.59180856",
"0.59162825",
"0.58755624",
"0.58733785",
"0.5862365",
"0.5862234",
"0.5829641",
"0.58261025",
"0.58085763",
"0.5795566",
"0.5789722",
"0.5787065",
"0.57731044",
"0.57637376",
"0.5755553",
"0.575209",
"0.5736493",
"0.5723655",
"0.5710428",
"0.57102525",
"0.5699401",
"0.56893444",
"0.5677086",
"0.566588",
"0.56619185",
"0.5654471",
"0.5645972",
"0.5644831",
"0.56395596",
"0.5629224",
"0.5617971",
"0.56149006",
"0.56063455",
"0.56058794",
"0.56036705",
"0.55987096",
"0.55838954",
"0.55804634",
"0.5579163",
"0.5578522"
] | 0.5926215 | 59 |
Baut die Activity weiter auf, wenn der Benutzer den REQUEST_ENABLE_BT Dialog positiv bestaetigt hat | private void createAct(){
try{
this.mPairedDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
this.mNewDevicesArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1);
final ListView pairedListView = (ListView) this.findViewById(R.id.pairedDevicesLV);
pairedListView.setAdapter(this.mPairedDevicesArrayAdapter);
pairedListView.setOnItemClickListener(this.mDeviceClickListener);
final ListView newDevicesListView = (ListView) this.findViewById(R.id.detectedDevicesLV);
newDevicesListView.setAdapter(this.mNewDevicesArrayAdapter);
newDevicesListView.setOnItemClickListener(this.mDeviceClickListener);
mReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(BluetoothDevice.ACTION_FOUND)) {
//Wenn ein neues Bluetooth Geraet gefunden wurde
final BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if (device.getBondState() != BluetoothDevice.BOND_BONDED) {
VisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
bt.addPairedDevice(device);
}
} else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {
//Wenn die Suche nach neuen Geraeten abgeschlossen wurde
VisitMultiplayerGame.this.setProgressBarIndeterminateVisibility(false);
if (VisitMultiplayerGame.this.mNewDevicesArrayAdapter.getCount() == 0) {
VisitMultiplayerGame.this.mNewDevicesArrayAdapter.add(getString(R.string.NoDevicesFound));
}
status.setText(getString(R.string.PleaseSelectADevice));
progress.dismiss();
}
}
};
//Event Handler registrieren, wenn Geraet gefunden wurde
IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
this.registerReceiver(this.mReceiver, filter);
//Event Handler registrieren, wenn Suche beendet wurde gefunden wurde
filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
this.registerReceiver(this.mReceiver, filter);
// Get a set of currently paired devices
final Set<BluetoothDevice> pairedDevices = bt.getPairedDevices();
if (pairedDevices.size() > 0) {
this.findViewById(R.id.pairedDevicesLV).setVisibility(View.VISIBLE);
for (final BluetoothDevice device : pairedDevices) {
this.mPairedDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
} else {
this.mPairedDevicesArrayAdapter.add(getString(R.string.NoPairedDevices));
}
}
catch(Exception ex){
ex.printStackTrace();
}
bt.getPairedDevices();
bt.discoverDevices();
progress = new ProgressDialog(this);
progress.setMessage(getString(R.string.SearchingForNewDevices));
progress.setIndeterminate(true);
progress.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\r\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n // user didn't want to turn on BT\n if (requestCode == ENABLE_BT_REQUEST_ID) {\n if(resultCode == Activity.RESULT_CANCELED) {\n btDisabled();\n return;\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void checkEnableBt() {\n if (mBtAdapter == null || !mBtAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n mCheckBt = false;\n if (requestCode == REQUEST_ENABLE_BT && resultCode != RESULT_OK) {\n// mScanButton.setEnabled(false);\n Toast.makeText(this, getString(R.string.bluetooth_not_enabled), Toast.LENGTH_LONG).show();\n }\n }",
"@Override public void onClick(View v) {\n startActivity(new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE));\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // if user chooses not to enable Bluetooth.\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n showToast(\"Bluetooth is required for this application to work\");\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"onActivityResult called\");\n\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n\n // User choose NOT to enable Bluetooth.\n mAlertBlue = null;\n showNegativeDialog(getResources().getString(R.string.blue_error_title),\n getResources().getString(R.string.blue_error_msg)\n );\n\n } else {\n\n // User choose to enable Bluetooth.\n mAlertBlue = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n verifyPermissions(mActivity);\n else {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n scanLeDevice(true);\n }\n }\n }",
"@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }",
"@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n Log.v(TAG, \"** onActivityResult **\");\r\n // determine from which activity\r\n switch (requestCode) {\r\n // if it was the request to enable Bluetooth:\r\n case REQUEST_ENABLE_BT:\r\n if (resultCode == Activity.RESULT_OK) {\r\n // Bluetooth is enabled now\r\n Log.v(TAG, \"** Bluetooth is now enabled**\");\r\n } else {\r\n // user decided not to enable Bluetooth so exit application\r\n Log.v(TAG, \"** Bluetooth is NOT enabled**\");\r\n Toast.makeText(this, \"Bluetooth not enabled\",\r\n Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_ENABLE_BT:\n\t\t\tif(resultCode != RESULT_OK){\n\t\t\t\tToast.makeText(this, \"An error occured while enabling BT.\", Toast.LENGTH_LONG).show();\n\t\t\t\thasBTenabled = false;\n\t\t\t\tfinish();\n\t\t\t}else{\n\t\t\t\tsetupBTService();\n\t\t\t\tupdateBluetoothList();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase BT_SETTINGS_RESULT:\n\t\t\tupdateBluetoothList();\n\t\t\tbreak;\n\t\t\t\n case REQUEST_CONNECT_DEVICE_SECURE:\n // When DeviceListActivity returns with a device to connect\n if (resultCode == Activity.RESULT_OK) {\n connectDevice(data, true);\n }\n break;\n\t\t}\n\t}",
"private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }",
"private void checkBTState() {\n if(bluetoothAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not supported\");\n } else {\n if (!bluetoothAdapter.isEnabled()) {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}",
"public void checkBTState() {\n if(mAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (mAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n ((Activity) mContext).startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"void activateBlue(BluetoothAdapter bluetoothAdapter){\r\n if (!bluetoothAdapter.isEnabled()) {\r\n Intent enableBlueTooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBlueTooth, REQUEST_CODE_ENABLE_BLUETOOTH);\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t if(btAdapt.isEnabled()){\n\t\t \tbtAdapt.disable();\n\t\t }else {\n\t\t\t\tIntent intent =new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}",
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(resultCode == RESULT_CANCELED) {\n\t\t\tToast.makeText(getApplicationContext(), \"Bluetooth must be enabled to continue\", Toast.LENGTH_SHORT).show();\n\t\t\tfinish();\n\t\t}\n\t}",
"private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }",
"public void checkBluetooth(BluetoothAdapter bluetoothAdapter){\n if(bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n public void onResume(){\n Log.i(TAG, \"-- ON RESUME --\");\n super.onResume();\n // If BT is not on, request that it be enabled.false\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data){\r\n \tif(!mBtAdapter.isEnabled()){\r\n\t\t\tToast.makeText(this, \"Please ensure bluetooth is enabled!\", Toast.LENGTH_LONG).show();\r\n\r\n\t\t\tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(RESULT_BT_NOT_ENABLED, finishIntent);\r\n\t\t\tBluetoothActivity.this.finish();\r\n\t\t}\r\n }",
"private void checkBluetoothEnabled()\r\n {\r\n if (!mBluetoothAdapter.isEnabled())\r\n {\r\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBtIntent, BLUETOOTH_ENABLE_REQUEST_ID);\r\n } else\r\n checkNfcEnabled();\r\n }",
"private void checkBTState() {\n\t\tif (btAdapter == null) {\n\t\t\terrorExit(\"Fatal Error\", \"Bluetooth not support\");\n\t\t} else {\n\t\t\tif (btAdapter.isEnabled()) {\n\t\t\t\tLog.d(TAG, \"...Bluetooth ON...\");\n\t\t\t} else {\n\t\t\t\t// Prompt user to turn on Bluetooth\n\t\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableBtIntent, 1);\n\t\t\t}\n\t\t}\n\t}",
"private void btnGetVisibleClicked(View v)\n {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n startActivityForResult(enableBTIntent,Constants.REQUEST_DISCOVERABILITY_BT);\n }",
"@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n btState.setImageResource(R.drawable.ic_action_off);\n errorExit(\"Fatal Error\", \"Bluetooth не поддерживается\");\n\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth включен...\");\n btState.setImageResource(R.drawable.ic_action_on);\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(btAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }\n }",
"@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_visit_multiplayer_game);\n\t\tbt = new Bluetooth();\n\t\tstatus = (TextView) findViewById(R.id.visit_game_status);\n\t\t\n\t\tint btState = bt.blutoothOK();\n\t\t\n\t\tif(btState == 1){\n\t\t\t/*\n\t\t\t * Geraet unterstuetzt kein Bluetooth\n\t\t\t * Meldung ausgeben und zum vorheriger Activity wechseln\n\t\t\t */\n\t\t\tToast t = Toast.makeText(getApplicationContext(), getString(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG);\n\t\t\tt.show();\n\t\t\tfinish();\n\t\t}\n\t\telse if(btState == 2){\n\t\t\t//Bluetooth ist nicht enabled\n\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t startActivityForResult(enableBtIntent, Bluetooth.REQUEST_ENABLE_BT);\n\t\t}\n\t\telse{\n\t\t\tcreateAct();\n\t\t}\n\t}",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\t\tcase R.id.bConnect:\n\t\t\t\tstartActivity(new Intent(\"android.intent.action.BT1\"));\n\t\t\t\tbreak;\n\t\t\tcase R.id.bDisconnect:\n\t\t\t\tBluetooth.disconnect();\n\t\t\t\tbreak;\n\t\t\tcase R.id.bXminus:\n\t\t\t\tif (Xview > 1) Xview--;\n\t\t\t\tbreak;\n\t\t\tcase R.id.bXplus:\n\t\t\t\tif (Xview < 100) Xview++;\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbLock:\n\t\t\t\tif (tbLock.isChecked()) {\n\t\t\t\t\tLock = true;\n\t\t\t\t} else {\n\t\t\t\t\tLock = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbScroll:\n\t\t\t\tif (tbScroll.isChecked()) {\n\t\t\t\t\tAutoScrollX = true;\n\t\t\t\t} else {\n\t\t\t\t\tAutoScrollX = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase R.id.tbStream:\n\t\t\t\tif (tbStream.isChecked()) {\n\t\t\t\t\tif (Bluetooth.connectedThread != null)\n\t\t\t\t\t\tBluetooth.connectedThread.write(Character.toString((char) 5));\n\t\t\t\t} else {\n\t\t\t\t\tif (Bluetooth.connectedThread != null)\n\t\t\t\t\t\tBluetooth.connectedThread.write(\"0\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t/*\n\t\tcase R.id.tbRecord:\n\t\t\tif (tbRecord.isChecked()){\n\t\t\t\tRecord = true;\n\n\t\t\t}else{\n\t\t\t\tRecord = false;\n\t\t\t}\n\t\t\tbreak;\n\t*/\n\t\t}\n\t}",
"@Override\n public void onStart()\n {\n super.onStart();\n // setBTMenus( mApp.mBTAdapter.isEnabled() );\n }",
"public static void checkPhoneSettings(Activity activity){\n\t\tif (mBluetoothAdapter == null) {\n\t\t //!TODO\n\t\t} else {\n\t\t\tLog.v(\"\", \"Bluetooth is supported\");\n\t\t\t//Check if bluetooth is enabled. If not, request the user to enable it.\n\t\t\tif (!mBluetoothAdapter.isEnabled()) {\n\t\t\t\tLog.v(\"\", \"Bluetooth is not turned on\");\n\t\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t activity.startActivityForResult(enableBtIntent,REQUEST_ENABLE_BT);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int arg1) {\n dialog.cancel();\n Intent intent = new Intent(Settings.ACTION_BLUETOOTH_SETTINGS);\n startActivity(intent);\n }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\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 ResultDevice(ArrayList<BluetoothDevice> deviceList) {\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 ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"private boolean BTEnabled() {\n if (!BT.isEnabled()) { // Ask user's permission to switch the Bluetooth adapter On.\n Intent enableIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n return false;\n } else {\n DisplayToast(\"Bluetooth is already on\");\n return true;\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n \n Log.d(TAG, \"onActivityResult \" + resultCode);\n switch (requestCode) {\n //for now, only dealiing with insecure connection\n //i don't think its possible to have secure connections with a serial profile\n case REQUEST_CONNECT_DEVICE_INSECURE:\n if(resultCode == Activity.RESULT_OK){\n setupBluetooth();//since BT is enabled, setup client service\n connectToDevice(data, false);\n }\n else\n setStatus(BluetoothClientService.STATE_NONE);\n break;\n case REQUEST_ENABLE_BT:\n // When the request to enable Bluetooth returns\n if (resultCode == Activity.RESULT_OK) {\n Toast.makeText(this, \"Bluetooth is now enabled\", Toast.LENGTH_SHORT).show();\n }\n else {\n // User did not enable Bluetooth or an error occurred\n Log.d(TAG, \"BT not enabled\");\n Toast.makeText(this, R.string.bt_not_enabled_leaving, Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.bConnect:\n\t\t\tstartActivity(new Intent(\"android.intent.action.BT1\"));\n\t\t\tbreak;\n\t\tcase R.id.bDisconnect:\n\t\t\tBluetooth.disconnect();\n\t\t\tbreak;\n\t\tcase R.id.bXminus:\n\t\t\tif (Xview>1) Xview--;\n\t\t\tbreak;\n\t\tcase R.id.bXplus:\n\t\t\tif (Xview<30) Xview++;\n\t\t\tbreak;\n\t\tcase R.id.tbLock:\n\t\t\tif (tbLock.isChecked()){\n\t\t\t\tLock = true;\n\t\t\t}else{\n\t\t\t\tLock = false;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.tbScroll:\n\t\t\tif (tbScroll.isChecked()){\n\t\t\t\tAutoScrollX = true;\n\t\t\t}else{\n\t\t\t\tAutoScrollX = false;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase R.id.tbStream:\n\n\t\t\tif (tbStream.isChecked()){\n\t\t\t\tif (Bluetooth.connectedThread != null) {\n Bluetooth.connectedThread.write(\"E\");\n DBdata= \"INSERT INTO light VALUES\" ;\n }\n\t\t\t}else{\n \tif (Bluetooth.connectedThread != null) {\n Bluetooth.connectedThread.write(\"Q\");\n\n String i=\"\";\n DBdata=DBdata.substring(0,DBdata.length()-1);\n DBdata += \";\";\n i=DBconnect.db(DBdata);\n Count=0;//歸零\n Toast.makeText(getApplicationContext(),DBdata+\"upload...\"+i,Toast.LENGTH_SHORT).show();\n\n }\n\n\t\t\t}\n\n\n\t\t\tbreak;\n\t\t}\n\t}",
"public void sendBluetooth()\n {\n Intent startBluetooth = new Intent(this, Main2Activity.class);\n startActivity(startBluetooth);\n }",
"public void onClick(DialogInterface dialog, int id) {\n \t Intent settingsIntent = new Intent(android.provider.Settings.ACTION_BLUETOOTH_SETTINGS);\n \t startActivityForResult(settingsIntent, BT_SETTINGS_RESULT);\n }",
"public boolean execActivityResultAdapter( int result, Intent data ) {\n log_d( \"execActivityResultAdapter()\" ); \t\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return true;\n\t\t// When the request to enable Bluetooth returns\n\t\tif ( result == Activity.RESULT_OK ) {\n\t\t\tlog_d( \"RESULT OK\" );\n\t\t\t// Bluetooth is now enabled, so set up a chat session\n\t\t\tinitService();\n\t\t// If user did not enable Bluetooth or an error occured\t\t\t\n\t\t} else {\n\t\t\tlog_d( \"RESULT NG\" );\n\t\t\treturn false;\t\t\t \t\n\t\t}\n\t\treturn true;\t\n\t}",
"public void onActivityResult(int RequestCode, int ResultCode, Intent Data) {\n\t\tsuper.onActivityResult(RequestCode, ResultCode, Data); \n\t\tif(RequestCode == Bluetooth.REQUEST_ENABLE_BT){\n\t\t\tif(ResultCode == -1){\n\t\t\t\tcreateAct();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinish();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bluetooth_14_feb receiveObj = (Bluetooth_14_feb) context.getApplicationContext();\n boolean appActive = receiveObj.isActivityVisible();\n //int appActive = receiveObj.getActivityCount();\n //Log.d(TAG,\"onReceive:receiver\");\n String action = intent.getAction(); // Get intent's action string\n Bundle extras = intent.getExtras();\n\n if (extras == null) return; // All intents of interest have extras.\n\n\n switch (action) {\n case \"android.bluetooth.adapter.action.STATE_CHANGED\": {\n\n int state = extras.getInt(\"android.bluetooth.adapter.extra.STATE\", FAIL);\n switch (state) {\n case BluetoothAdapter.STATE_OFF: \n if (!appActive) {\n\n Toast.makeText(context,\"Bluetooth:OFF\",Toast.LENGTH_SHORT).show();\n\n }\n else{\n\n Intent inten = new Intent(context,ConnectivityDialog.class);\n inten.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(inten);\n //num=1;\n\n }\n\n break;\n \n case BluetoothAdapter.STATE_ON:\n\n\n if(!appActive) {\n Log.d(TAG,\"state-on-appactive\");\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n else{\n\n Intent i = new Intent(\"FINISH\");\n //i.setAction(\"FINISH\");\n context.sendBroadcast(i);\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n break;\n\n }\n\n }\n }\n }",
"public void goSendOrderButton(View view) { //is called by onClick function of Button in activity_main.xml\n if(WifiAvaible()) {\n try {\n fab.getProtocol().sendOrder(surface.getSeedbox().toString());\n OrderStatus.setText(\"Waiting for \\n\"+\"confirmation.\");\n } catch (Exception e) {\n //ErrorWindow\n }\n\n SendButton.setEnabled(false);\n }\n\n\n/*\n if(ClickCnt == 0) {\n mp.start();\n ClickCnt = 1;\n } else {\n ClickCnt = 0;\n mp.stop();\n try {\n mp.prepare();\n }\n catch (java.lang.Exception e)\n {\n // Do nothing\n }\n\n mp.seekTo(0);\n }*/\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //回调搜索方式\n if (!bOpenDevice) {\n BluetoothComm.ScanDevice(DEVICE_ADDRESS_FILETER, 5, 1);\n if (!scan_progress.isShown()) {\n scan_progress.setVisibility(View.VISIBLE);\n }\n } else {\n showLogMessage(\"请先断开连接\");\n }\n }",
"private void turnOn(View v) {\n bluetoothAdapter.enable();\n }",
"@Override\n public void onReceiveSetting() {\n showAdButton.setEnabled(true);\n Toast.makeText(this, \"onReceiveSetting\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n public void onStart() {\n super.onStart();\r\n Carteasy cs = new Carteasy();\r\n Map<String, String> data = cs.ViewData(String.valueOf(1), getApplicationContext());\r\n for (Map.Entry<String, String> entry : data.entrySet()) {\r\n //get the Id\r\n Log.d(\"Key: \",entry.getKey());\r\n Log.d(\"Value: \",entry.getValue());\r\n }\r\n if (!BTAdapter.isEnabled()) {\r\n // IT NEEDS BLUETOOTH PERMISSION\r\n // Intent to enable bluetooth, it will show the enable bluetooth\r\n // dialog\r\n Intent enableIntent = new Intent(\r\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n // this is to get a result if bluetooth was enabled or not\r\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\r\n // It will call onActivityResult method to determine if Bluetooth\r\n // was enabled or not\r\n } else {\r\n // Bluetooth is enabled\r\n }\r\n }",
"@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }",
"public void startBluetooth(){\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (!mBluetoothAdapter.isEnabled()) {\n Intent btIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n //btIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(btIntent);\n }\n mBluetoothAdapter.startDiscovery();\n System.out.println(\"@ start\");\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n getActivity().registerReceiver(mReceiver, filter);\n }",
"private void acceptButtonListener(){\n \t ait = new InitAccountTask(context, this);\n \t\n \tthis.acceptButton.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(agbCheck.isChecked()){\n\t\t\t\t\t\n\t\t\t\t\tString[] arg = new String[3];\n\t\t\t\t\t\n\t\t\t\t\targ[0] = HelperFunctions.getInstance().cleanNumber(telNumber.getText().toString());\n\t\t\t\t\targ[1] = countryCode.getText().toString();\n\t\t\t\t\targ[2] = password.getText().toString();\n\t\t\t\t\t\n\t\t\t\t\tait.execute(arg);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tagbNotCheckedToast();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n switch (requestCode)\n {\n case ENABLE_BLUETOOTH:\n\n if (resultCode == RESULT_OK)\n {\n // Si entre aca es porque active el bluetooth y muestro la Activity con la lista de dispositivos emparejados\n Intent activityListaDispositivos = new Intent(MainActivity.this, ListaDispositivos.class);\n startActivityForResult(activityListaDispositivos, SOLICITA_CONEXION);\n }\n break;\n\n case SOLICITA_CONEXION:\n\n if(resultCode == RESULT_OK)\n {\n // Inicio una Async Task para iniciar el Bluetooth con una barra de estado\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pDialog.setMessage(\"Conectando dispositivo\");\n pDialog.setCancelable(true);\n pDialog.setMax(100);\n\n // Tomo la MAC de la lista de dispositivos aparejados para conectarme\n MAC = data.getExtras().getString(ListaDispositivos.ENDERECO_MAC);\n\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n mDevice = mBluetoothAdapter.getRemoteDevice(MAC);\n\n // Inicio la tarea para iniciar la comunicacion Bluetooth\n Bluetooth_init = new AsyncTask_BT_Dialog();\n Bluetooth_init.execute();\n }\n break;\n\n case 3:\n Toast.makeText(MainActivity.this, \"GPS encendido \" , Toast.LENGTH_SHORT).show();\n break;\n }\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"@Override\n public void onEnabled(Context context, Intent intent) {\n new EventBusUtils().send(1);\n// Toast.makeText(context, \"激活ok====\", Toast.LENGTH_SHORT).show();\n//\n }",
"public boolean mBTInit1(){\n //Initialize the bluetooth adapter\n if (oBTadapter !=null) return true ;\n oBTadapter = BluetoothAdapter.getDefaultAdapter();\n return (oBTadapter != null);\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.conn_more_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"bt connection click\");\n\t\t\tbtSearch.findViewById(R.id.conn_more_img).setBackground(baseRes.getDrawable(R.drawable.arrow_r_gray)); \t\t\t\t\t\n//\t\t\tif( mBtStat != BluetoothService.STATE_CONNECTED ){\n//\t\t\t\tif (!bt_s.mBtAdapter.isEnabled()) {\n//\t\t\t\t\tbt_s.mBtAdapter.enable();\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tif (baseAct.setting_s.bt_s != null) {\n//\t\t\t\t\tnew Thread(baseAct.setting_s.bt_s).start();\n//\t\t\t\t\tLog.d(TAG, \"BTConnect auto connect\");\n//\t\t\t\t}\n//\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.drive_record_i:\n\t\t\tif(baseAct.monitor == null)\n\t\t\t\treturn;\n\t\t\tif(!baseAct.monitoring) {\n\t\t\t\tbaseAct.monitor.config(6, 10);\n\t\t\t\tbaseAct.monitor.start();\n\t\t\t\tbaseAct.monitoring = true;\n\t\t\t\tdriveRecord.setImageResource(R.drawable.icon_radio_enable);\n\t\t\t\tToast.makeText(baseAct, \"Start recording ...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbaseAct.monitor.stop();\n\t\t\t\tbaseAct.monitoring = false;\n\t\t\t\tdriveRecord.setImageResource(R.drawable.icon_radio_disable);\n\t\t\t\tToast.makeText(baseAct, \"Stop recording ...\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.clear_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"clear DTC click\");\n\t\t\tif(baseAct.localbinder != null){\n\t\t\t\tbaseAct.localbinder.clearDTCs();\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tbaseAct.clear_dtc();\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.account_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"account click\");\n\t\t\tif(Preference.getInstance(baseAct.getApplicationContext()).getLoginStat()){\t\t\t\t\t\n\t\t\t\thelpDialog = new CustomDialog(baseAct, 320, 320, R.layout.account_info, R.style.Theme_dialog3);\n\t\t\t\tListView list_v = (ListView) helpDialog.findViewById(R.id.account_info);\n\t\t\t\tlist_v.setDivider(baseAct.gray_line_draw);\n\t\t\t\tSimpleAdapter adapter;\n\t\t\t\tArrayList<Map<String, Object>> listItem = new ArrayList<Map<String, Object>>();\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.user_account));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getUser());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_plate));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getLicence());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_maker));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getCarMaker());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.car_type));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getCarType());\n\t\t\t\tlistItem.add(map);\n\t\t\t\tmap = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"type\", baseAct.getResources().getString(R.string.purchase_date));\n\t\t\t\tmap.put(\"cont\", Preference.getInstance(baseAct).getPurchaseDate());\t\t\t\t\t\n\t\t\t\tlistItem.add(map);\n\t\t\t\t\n\t\t\t\tadapter = new SimpleAdapter(baseAct,listItem,// \n\t\t\t R.layout.account_item,\n\t\t\t new String[] {\"type\", \"cont\"}, \n\t\t\t new int[] {R.id.account_type,R.id.account_content} \n\t\t\t ); \n\t\t\t\tlist_v.setAdapter(adapter); \n\t\t\t\t\n\t\t\t\tView editView = helpDialog.findViewById(R.id.account_edit);\n\t\t\t\teditView.setOnClickListener(this);\n\t\t\t\thelpDialog.show();\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbaseAct.loginDlg = new Login(baseAct, Base.mWidth, Base.mHeight, R.layout.login, R.style.Theme_dialog);\n\t\t\t\tbaseAct.loginDlg.show();\n\t\t\t}\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.help_rela:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"help click\");\n\t\t\thelpDialog = new CustomDialog(baseAct, 320, 320, R.layout.help_content, R.style.Theme_dialog3);\n\t\t\thelpDialog.show();\n\t\t\tbreak;\t\t\t\t\t\n\t\tcase R.id.setting_back:\n//\t\t\tSetting.this.hide();\n\t\t\tbreak;\n\t\tcase R.id.logout:\n\t\t\tLogRecord.SaveLogInfo2File(Base.OperateInfo, TAG+\"login out click\");\n \t\tif(Preference.getInstance(baseAct.getApplicationContext()).getLoginStat()){\n \t\t\tCarDataService.saveFenceData();\n \t\t\tlogOut();\n \t\t\tBase.baidu_v.loginStateChange(false);\n \t\t}\n \t\telse{\n \t\t\tbaseAct.loginDlg = new Login(baseAct, baseAct.mWidth, baseAct.mHeight, R.layout.login, R.style.Theme_dialog);\n \t\t\tbaseAct.loginDlg.show();\n \t\t}\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tcase R.id.account_edit:\n\t\t\tbaseAct.editAccountDlg = new EditAccount(baseAct, Base.mWidth, Base.mHeight, R.layout.edit_account_info, R.style.Theme_dialog);\t\t\t\n\t\t\tbaseAct.editAccountDlg.show();\n\t\t\tbreak;\n\t\t}\n\t}",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.button_scan: {\n Intent serverIntent = new Intent(Main_Activity.this, DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n break;\n }\n case R.id.btn_close: {\n mService.stop();\n editText.setEnabled(false);\n imageViewPicture.setEnabled(false);\n width_58mm.setEnabled(false);\n width_80.setEnabled(false);\n hexBox.setEnabled(false);\n sendButton.setEnabled(false);\n\n testButton.setEnabled(false);\n printbmpButton.setEnabled(false);\n btnClose.setEnabled(false);\n btn_BMP.setEnabled(false);\n btn_ChoseCommand.setEnabled(false);\n btn_prtcodeButton.setEnabled(false);\n btn_prtsma.setEnabled(false);\n btn_prttableButton.setEnabled(false);\n btn_camer.setEnabled(false);\n btn_scqrcode.setEnabled(false);\n btnScanButton.setEnabled(true);\n Simplified.setEnabled(false);\n Korean.setEnabled(false);\n big5.setEnabled(false);\n thai.setEnabled(false);\n btnScanButton.setText(getText(R.string.connect));\n break;\n }\n case R.id.btn_test: {\n BluetoothPrintTest();\n ;\n break;\n }\n case R.id.Send_Button: {\n if (menuIdTextView.getText().equals(\"\") || menuIdTextView.getText() == null || menuIdTextView.getText().equals(\"0\")) {\n Toast.makeText(getBaseContext(), \"لاتوجد قائمة\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (btnScanButton.getText().equals(\"تم الاتصال\")) {\n\n } else {\n Toast.makeText(getBaseContext(), \"يرجى الاتصال بالطابعة\", Toast.LENGTH_LONG).show();\n return;\n }\n// printmenu\n sendToDB();\n String msg = msgPrintFormat();\n if (msg.length() > 0) {\n try {\n SharedPreferences sharedPreferences =\n PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n String hello = sharedPreferences.getString(\"hello\", \"\");\n SendDataByte(PrinterCommand.POS_Print_Text(\" \", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n byte[] code = PrinterCommand.getCodeBarCommand(sellMenuId, 73, 3, 140, 1, 2);\n Command.ESC_Align[2] = 0x01;\n SendDataByte(Command.ESC_Align);\n SendDataByte(code);\n\n SendDataByte(PrinterCommand.POS_Print_Text(hello + \"\\n\", ARBIC, 22, 0, 0, 0));\n\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(msg, ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n\n\n String copys = sharedPreferences.getString(\"copys\", \"1\");\n if (copys.equals(\"2\")) {\n SendDataByte(PrinterCommand.POS_Print_Text(\"----------\", ARBIC, 22, 2, 2, 0));\n\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n\n byte[] code3 = PrinterCommand.getCodeBarCommand(sellMenuId, 73, 3, 140, 1, 2);\n Command.ESC_Align[2] = 0x01;\n SendDataByte(Command.ESC_Align);\n SendDataByte(code3);\n SendDataByte(PrinterCommand.POS_Print_Text(hello + \"\\n\", ARBIC, 22, 1, 1, 3));\n\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(msg, ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n SendDataByte(PrinterCommand.POS_Print_Text(\"\\n\\n\\n\\n\\n\", ARBIC, 22, 0, 0, 0));\n SendDataByte(Command.ESC_Align);\n }\n\n } catch (Exception ex) {\n\n }\n\n\n }\n clearItemData();\n break;\n }\n case R.id.save_Button: {\n if (menuIdTextView.getText().equals(\"\") || menuIdTextView.getText() == null || menuIdTextView.getText().equals(\"0\")) {\n Toast.makeText(getBaseContext(), \"لاتوجد قائمة\", Toast.LENGTH_LONG).show();\n return;\n }\n\n\n// printmenu\n try {\n sendToDB();\n\n clearItemData();\n } catch (Exception ex) {\n Toast.makeText(getBaseContext(), \"لم يتم الحفظ\" + ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n break;\n }\n case R.id.width_58mm:\n case R.id.width_80mm: {\n is58mm = v == width_58mm;\n width_58mm.setChecked(is58mm);\n width_80.setChecked(!is58mm);\n break;\n }\n case R.id.btn_printpicture: {\n GraphicalPrint();\n break;\n }\n case R.id.imageViewPictureUSB: {\n Intent loadpicture = new Intent(\n Intent.ACTION_PICK,\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(loadpicture, REQUEST_CHOSE_BMP);\n break;\n }\n case R.id.btn_prtbmp: {\n Print_BMP();\n break;\n }\n case R.id.btn_prtcommand: {\n CommandTest();\n break;\n }\n case R.id.btn_prtsma: {\n SendDataByte(Command.ESC_Init);\n SendDataByte(Command.LF);\n Print_Ex();\n break;\n }\n case R.id.btn_prttable: {\n SendDataByte(Command.ESC_Init);\n SendDataByte(Command.LF);\n PrintTable();\n break;\n }\n case R.id.btn_prtbarcode: {\n printBarCode();\n break;\n }\n case R.id.btn_scqr: {\n createImage();\n break;\n }\n case R.id.btn_dyca: {\n dispatchTakePictureIntent(REQUEST_CAMER);\n break;\n }\n default:\n break;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CHECK_BT_RESULT_CODE) {\n // Make sure the request was successful\n if (resultCode == RESULT_OK) {\n ConnectBTTask connectBT = new ConnectBTTask();\n connectBT.execute(); //Call the class to connect\n }\n }\n }",
"@Override\n public void onClick(View v) {\n Block_Dialog();\n }",
"private void enableBotonAceptar()\r\n\t{\r\n\t\t\r\n\t}",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"@Override\n\t public void onClick(View v) {\n\t \t try{\n\t \t\t PackageManager pm = getPackageManager();\n\t \t\t Intent intent = pm.getLaunchIntentForPackage(\"com.getpebble.android\");\n\t \t\t startActivity(intent);\n\t \t }finally{;}\n\t }",
"@Override\n protected void onResume()\n {\n super.onResume();\n\n // Vuelvo a llamar a la tarea para que siga escuchando lo que llega por Bluetooth\n if(Bluetooth_Conectado == true && Bluetooth_Encendido == true)\n {\n Bluetooth_RX_aux = new AsyncTask_BT_RX(conexionBluetooth);\n Bluetooth_RX_aux.execute();\n }\n }",
"public void onClick(DialogInterface dialog, int id) {\n \t performBTKeyExchange(device);\n }",
"@Override\n\t public void onClick(DialogInterface dialog, int which) {\n\t wifi.setWifiEnabled(true);\n\t Toast.makeText(getApplicationContext(), \"enabling...\", Toast.LENGTH_LONG).show();\t\n\t }",
"@Override\n public void onDownloadClick (int position)\n {\n BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();\n\n if (!bluetooth.isEnabled())\n {\n // Si el Bluetooth no esta activado, pregunto si quiero activarlo\n Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(intent, ENABLE_BLUETOOTH);\n\n } else\n {\n Bluetooth_Encendido = true;\n\n if (Bluetooth_Conectado == false)\n {\n // Muerta la Activity de la lista de dispositivos para vincularlos\n Intent activityListaDispositivos = new Intent(MainActivity.this, ListaDispositivos.class);\n startActivityForResult(activityListaDispositivos, SOLICITA_CONEXION);\n } else\n {\n }\n }\n\n if(Bluetooth_Conectado == true)\n {\n DNI_Seleccionado = ListaUsuariosPrincipal.get(position).getDNI();\n\n Enviar_String_Bluetooth(\"<S\" + DNI_Seleccionado + \">\");\n }\n }",
"private void openActivity() {\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"private void onEnableBluetoothResponse(int resultCode) {\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tlogger.debug(\"onEnableBluetoothResponse(): Bluetooth enabled. Starting Workout Service.\");\n\t\t\tworkoutServiceIntent = new Intent(this, WorkoutService.class);\n\t\t\tstartService(workoutServiceIntent);\n\t\t\tbindService(workoutServiceIntent, workoutServiceConn, BIND_AUTO_CREATE);\n\t\t}\n\n\t\telse {\n\t\t\tlogger.warn(\"onEnableBluetoothResponse(): User elected not to enable Bluetooth. Activity will now finish.\");\n\t\t\tfinish();\n\t\t}\n\t}",
"private void validateBleSupport() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Snackbar.make(txtStatus, \"No LE Support.\", Snackbar.LENGTH_LONG).show();\n } else {\n\n /*\n * We need to enforce that Bluetooth is first enabled, and take the\n * user to settings to enable it if they have not done so.\n */\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n .getDefaultAdapter();\n\n if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"onResume: Bluetooth is disabled\");\n //Bluetooth is disabled, request enabling it\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivity(enableBtIntent);\n }\n }\n\n }",
"@Override\n public void onClick(View v) {\n startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n if (mNfcAdapter == null) {\n // ES NECESARIO QUE EL DISPOSITIVO SOPORTE NFC\n mostrarMensajeUsuario(\"El dispositivo no soporta NFC.\");\n //finish();\n //return;\n }else{\n if (!mNfcAdapter.isEnabled()) {\n mostrarMensajeUsuario(\"Activa NFC en el dispositivo para continuar.\");\n }else{\n mostrarMensajeUsuario(\"Listo para leer NFC.\");\n enableForegroundDispatchSystem();\n }\n }\n }",
"@SuppressLint(\"NewApi\")\n @Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 100) {\n nfcAdapter = NfcAdapter.getDefaultAdapter(this);\n if (!nfcAdapter.isEnabled()) {\n Toast.makeText(this, \"nfc_not_open\", Toast.LENGTH_SHORT).show();\n }\n }\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_CUSTOM_TITLE);\n\t\tsetContentView(R.layout.activity_main);\n\t\tgetWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,\n\t\t\t\tR.layout.actionbar);\n\t\tname = (EditText) (findViewById(R.id.bluetoothName));\n\t\tButton ok = (Button) (findViewById(R.id.button1));\n\t\tButton connect = (Button) findViewById(R.id.button2);\n\n\t\tok.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent openList = new Intent(MainActivity.this,\n\t\t\t\t\t\tListDivices.class);\n\t\t\t\tstartActivityForResult(openList, APPLY_CONNECTION);\n\t\t\t}\n\t\t});\n\t\tconnect.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnameb = name.getText();\n\t\t\t\tblname = nameb.toString();\n\t\t\t\ttry {\n\t\t\t\t\tfindBT();\n\t\t\t\t\tstat = 1;\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tstat = 0;\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton fan = (ToggleButton) findViewById(R.id.toggleButton1);\n\t\tfan.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (fan.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('1');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('2');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light1 = (ToggleButton) findViewById(R.id.toggleButton2);\n\t\tlight1.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light1.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('3');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('4');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light2 = (ToggleButton) findViewById(R.id.toggleButton3);\n\t\tlight2.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light2.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('5');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('6');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton light3 = (ToggleButton) findViewById(R.id.toggleButton4);\n\t\tlight3.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (light3.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('7');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('8');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfinal ToggleButton tv = (ToggleButton) findViewById(R.id.toggleButton5);\n\t\ttv.setOnClickListener(new View.OnClickListener() {\n\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (tv.isChecked()) {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('9');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tif (stat == 1) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tmmOutputStream.write('0');\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tMainActivity.this,\n\t\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else\n\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\"Connection not established with your home\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}",
"private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"@Override\r\n\tprotected void onStart() {\r\n\t\tsuper.onStart();\r\n\t\t\r\n\t\tif (dontAsk==0 && !getIMEStatus()) {\r\n\t\t\tdontAsk=1;\r\n\t\t\tshowDialog(D_ENABLE);\r\n\t\t} else if (dontAsk==1 && getIMEStatus()) {\r\n\t\t\tdontAsk=2;\r\n\t\t\tshowDialog(D_PICKER);\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void setPositiveButton() {\n\t\t\t\t\t\t\t\t\tif (SystemConfig.loginResponse.getDutyFlag().equals(\"on\")) {\r\n\t\t\t\t\t\t\t\t\t\tsendForService(\"1\", str);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);\r\n\t\t\t\t\t\t\t\t\t\tMessage message = Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\tmessage.obj = \"下班状态不可以改派任务!\";\r\n\t\t\t\t\t\t\t\t\t\tmessage.what = ConstantValue.ERROE;\r\n\t\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// for update by haoyun\r\n\t\t\t\t\t\t\t\t\t// 20130401 end\r\n\t\t\t\t\t\t\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.ble_button) {\n enableDisableBT();\n return true;\n }\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n\n if (id == R.id.ble_button_startConnection) {\n //startConnection();\n return true;\n }\n\n if (id == R.id.btnDiscoverable_on_off) {\n Log.d(TAG, \"btnEnableDisable_Discoverable: Making device discoverable for 300 seconds.\");\n\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n startActivity(discoverableIntent);\n\n IntentFilter intentFilter = new IntentFilter(mBluetoothAdapter.ACTION_SCAN_MODE_CHANGED);\n registerReceiver(mBroadcastReceiver2,intentFilter);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public void onClick(View v) {\n startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tstartActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString balance=getBalance();\n\t\t\t\tString detail=ActMore.this.getResources().getString(R.string.need_extra_detail);\n\t\t\t\tString me=ActMore.this.getResources().getString(R.string.current_coin);\n\t\t\t\tString chuui=ActMore.this.getResources().getString(R.string.coin_error);\n\t\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(ActMore.this)\n\t\t\t\t.setTitle(R.string.need_extra)\n\t\t\t\t.setMessage(detail+\"\\n\"+me+balance+\"\\n\"+chuui).\n\t\t\t\tsetNeutralButton(R.string.get_coin, new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\t//new WallThread().start();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.setPositiveButton(R.string.activate, new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\tToast.makeText(ActMore.this,\n\t\t\t\t\t\t\t\tR.string.processing,\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t//new WallThread().start();\n\t\t\t\t\t}\n\t\t\t\t}).setNegativeButton(R.string.confirm,\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\n\t\t\t\t\t}}).create(); //创建对话框\n\t\t\t\t\talertDialog.show(); // 显示对话框\t\n\t\n\t\t\t}",
"@Override\r\n public void onClick() {\r\n if (!permissionsGranted()) {\r\n if (isNull(MainActivity.active) || !MainActivity.active) {\r\n requestPermissions();\r\n }\r\n }\r\n else{\r\n toggleLTE();\r\n }\r\n }",
"@Override\n public void onClick(View v) {\n if(v==btnStartCloud) {\n activityIntent.putExtra(\"isOnline\", true);\n activityIntent.putExtra(\"isVadLoad\", true);\n activityIntent.setClass(this, SelectActivity.class);}\n startActivity(activityIntent);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = null;\n // 判断手机系统的版本 即API大于10 就是3.0或以上版本\n if (android.os.Build.VERSION.SDK_INT > 10) {\n intent = new Intent(\n android.provider.Settings.ACTION_WIFI_SETTINGS);\n } else {\n intent = new Intent();\n ComponentName component = new ComponentName(\n \"com.android.settings\",\n \"com.android.settings.WirelessSettings\");\n intent.setComponent(component);\n intent.setAction(\"android.intent.action.VIEW\");\n }\n\n if (dialog!=null) {\n if (((AlertDialog)dialog).isShowing()) {\n isShow = true;\n } else {\n isShow = false;\n }\n }\n context.startActivity(intent);\n }",
"public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}"
] | [
"0.7864922",
"0.7789979",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7745773",
"0.7741102",
"0.7711032",
"0.7521694",
"0.7502534",
"0.74825144",
"0.7407414",
"0.7338485",
"0.7296828",
"0.7281017",
"0.72016007",
"0.7200899",
"0.71641296",
"0.71564585",
"0.7114936",
"0.7093056",
"0.7088513",
"0.7063383",
"0.7057619",
"0.7036384",
"0.69887054",
"0.69827443",
"0.6963523",
"0.69112134",
"0.68946826",
"0.6837603",
"0.6836482",
"0.67582375",
"0.6746978",
"0.6736603",
"0.67050195",
"0.6704953",
"0.6654545",
"0.6633791",
"0.6633449",
"0.66013044",
"0.6567656",
"0.6503621",
"0.65005505",
"0.6384551",
"0.63599026",
"0.63356453",
"0.6314771",
"0.6311222",
"0.6292651",
"0.62872773",
"0.62731266",
"0.62506247",
"0.62500036",
"0.6213234",
"0.6199131",
"0.6188176",
"0.61733925",
"0.6162981",
"0.61601365",
"0.6156443",
"0.6145501",
"0.6136177",
"0.613463",
"0.6094481",
"0.6083114",
"0.6066984",
"0.6037216",
"0.60364294",
"0.6034783",
"0.60337645",
"0.6010971",
"0.6005578",
"0.60024023",
"0.5995668",
"0.59745586",
"0.5973939",
"0.5960233",
"0.5959018",
"0.5949523",
"0.5944275",
"0.5936123",
"0.5932178",
"0.59233123",
"0.59108585",
"0.5910776",
"0.5908347",
"0.58816814",
"0.5869932",
"0.5860133",
"0.5858906",
"0.5856916",
"0.58556825",
"0.58473384",
"0.5838611",
"0.58313143",
"0.5823555",
"0.5823387",
"0.5819633",
"0.580858"
] | 0.0 | -1 |
Erstellt eine VisitMultiplayerGame Activity | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_visit_multiplayer_game);
bt = new Bluetooth();
status = (TextView) findViewById(R.id.visit_game_status);
int btState = bt.blutoothOK();
if(btState == 1){
/*
* Geraet unterstuetzt kein Bluetooth
* Meldung ausgeben und zum vorheriger Activity wechseln
*/
Toast t = Toast.makeText(getApplicationContext(), getString(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG);
t.show();
finish();
}
else if(btState == 2){
//Bluetooth ist nicht enabled
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, Bluetooth.REQUEST_ENABLE_BT);
}
else{
createAct();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void returnToGame(View view) {\n String gameGson = gson.toJson(game);\n Intent intent = new Intent(this, GameActivity.class);\n intent.putExtra(\"Game\", gameGson);\n intent.putExtra(\"CurrentPlayer\", Integer.toString(currentPlayer));\n startActivity(intent);\n }",
"@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(context, GameActivity.class);\r\n\t\t\t\t\t// put extras\r\n\t\t\t\t\tintent.putExtra(\"game_id\", item.getGameId());\r\n\t\t\t\t\tintent.putExtra(\"game_title\", item.getGameTitle());\r\n\t\t\t\t\tintent.putExtra(\"dotchi_time\", item.getDotchiTime());\r\n\t\t\t\t\tintent.putExtra(\"is_personal\", item.getIsPersonal());\r\n\t\t\t\t\tintent.putExtra(\"is_secret\", item.getIsSecret());\r\n\t\t\t\t\tintent.putExtra(\"is_official\", false);\r\n\t\t\t\t\t//intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\t\t//TODO: make sure this is correct\r\n\t\t\t\t\t((Activity) context).startActivity(intent);\r\n\t\t\t\t\t((Activity) context).finish();\r\n\t\t\t\t}",
"public void gameOver(){\n Intent intent = new Intent(getContext(), GameOver.class); //set intent to game over activity\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n getContext().startActivity(intent); //goes to game over activity\n }",
"public void startGame(Activity a, Class<?> c){\n\t\tIntent intent = new Intent(a,c);\n\t\tintent.putExtra(\"ipaddress\", ip);\n\t\ta.startActivity(intent);\n\t}",
"public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(),GameActivity.class);\n\n\n startActivity(i);\n }",
"@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), Gametwofive.class);\n startActivity(intent);\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent = new Intent(MapActivity.this, GameActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}",
"public void startGame(View view) {\n Intent intent = new Intent(this, GameActivity.class);\n\n switch (view.getId()) {\n case R.id.GPACatcherGame:\n intent.putExtra(\"GAME\", GamesEnum.GPACATCHER);\n break;\n case R.id.RotateTile:\n intent.putExtra(\"GAME\", GamesEnum.ROTATETILE);\n break;\n case R.id.PixelGame:\n intent.putExtra(\"GAME\", GamesEnum.PIXELS);\n break;\n default:\n break;\n }\n startActivity(intent);\n }",
"protected void empezar(String op){\n Intent llamada = new Intent(this, MainActivity.class);\n llamada.putExtra(TYPE_GAME,op);\n startActivity(llamada);\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.ivBack:\n onBackPressed();\n break;\n case R.id.btnSubmit:\n if (submitMatch()) {\n individualJoinMatch();\n }\n break;\n case R.id.server:// 选择服务器\n intent = new Intent();\n intent.setClass(context, GameServersActivity.class);\n intent.putExtra(\"gameId\", item_id + \"\");\n startActivityForResult(intent, REQUEST_CREAT_ZHANDUI_GAME);\n break;\n }\n }",
"public void playerView(View view) {\n PlayerCapabilityFacade pcf = new PlayerCapabilityFacade();\n Intent intent;\n if(pcf.isTournamentActive()) {\n intent = new Intent(ModeSelectionActivity.this, PlayerTourneyActivity.class);\n } else {\n intent = new Intent(ModeSelectionActivity.this, PlayerTotalsActivity.class);\n }\n\n startActivity(intent);\n\n //else onclick go to PlayerTourneyActivity\n }",
"private void startMultiPlayerGame() {\n Intent intent = Games.RealTimeMultiplayer.getSelectOpponentsIntent(getApiClient(), 1, 1);\n startActivityForResult(intent, RC_SELECT_PLAYERS);\n }",
"public void onClick(View v) {\n\n switch (v.getId()) {\n\n case R.id.battleText:\n\n if(mPager.getCurrentItem() == 0) {\n\n if(!battleOver) {\n\n gameMaster.advance();\n\n //new CallBackendTask(CallBackendTask.START_BATTLERESULTS, this).execute(\"http://91.155.202.223:7500/api/battleresult\", Guser.getToken());\n\n } else {\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n finish();\n startActivity(intent);\n overridePendingTransition(0,0);\n }\n\n } else {\n\n pushText(\"Select an action to use before advancing the turn...\");\n }\n\n return;\n\n case R.id.eslot1:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(1);\n }\n else\n return;\n\n break;\n\n case R.id.eslot2:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(2);\n }\n else\n return;\n\n break;\n\n case R.id.eslot3:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(3);\n }\n else\n return;\n\n break;\n\n case R.id.eslot4:\n\n if(mPager.getCurrentItem() != 0) {\n\n setSelectedTarget(4);\n }\n else\n return;\n\n break;\n\n default:\n\n return;\n }\n\n if(gameMaster.getTargets(gameMaster.getP(selectedSlot).getSelectedAction()) == 1)\n\n highlightEnemy(gameMaster.getSelectedTarget(selectedSlot), true);\n\n else {\n\n highlightEnemy(1, false);\n highlightEnemy(2, false);\n highlightEnemy(3, false);\n highlightEnemy(4, false);\n }\n }",
"@Override\n public void onClick(View view) {\n Intent wannaGuess = new Intent(mContext, WannaGuessActivity.class);\n mContext.startActivity(wannaGuess);\n\n// Intent detailIntent = Game.starter(mContext, mCurrentSport.getTitle(),\n// mCurrentSport.getImageResource());\n\n\n //Start the detail activity\n// mContext.startActivity(detailIntent);\n\n //anoter ver\n\n // @Override\n// protected void onCreate(Bundle savedInstanceState) {\n// super.onCreate(savedInstanceState);\n// setContentView(R.layout.activity_main);\n//\n// //Find the view that shows the catch me category\n//// TextView catchMe = (TextView) findViewById(R.id.catch_me);\n//// catchMe.setOnClickListener(new View.OnClickListener() {\n//// @Override\n//// public void onClick(View v) {\n//// Intent catchMeIntent = new Intent(MainActivity.this, CatchMe.class);\n//// startActivity(catchMeIntent);\n//// }\n//// });\n//\n// }\n }",
"@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(GameActivity.this, LeaderboardActivity.class);\r\n startActivity(intent);\r\n }",
"private Intent createIntent() {\n Intent intent = new Intent(this, GameOverActivity.class);\n intent.putExtra(POINTS, presenter.getPoints() + points);\n intent.putExtra(PASS_USER, user);\n intent.putExtra(CORRECT, correct);\n intent.putExtra(INCORRECT, incorrect);\n intent.putExtra(TIME, time);\n intent.putExtra(EVIL, evil);\n intent.putExtra(FRIENDLY, friendly);\n intent.putExtra(\"from\", \"bonus\");\n return intent;\n }",
"@Override\n public void onClick(View V) {\n\n int itemPosition = RC.getChildLayoutPosition(V);\n Session session = sessions.get(itemPosition);\n Intent intent = new Intent(context, CharOnSessActivity.class);\n intent.putExtra(\"session_id\", session.getId());\n intent.putExtra(\"player_id\", player_id);\n intent.putExtra(\"sess_date\", session.getStrDate());\n intent.putExtra(\"sess_city\", session.getCity());\n\n\n intent.putExtra(\"mode\", 1);\n parent.getContext().startActivity(intent);\n\n\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl()+1);\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n Intent i = new Intent(NewGame.this, EmptyGame.class);\n startActivity(i);\n }",
"public void onClick(View v) {\n newGame();\n }",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl());\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}",
"@Override\n public void onClick(View view) {\n stopPlaying();\n startGameActivity();\n }",
"@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent=new Intent();\n\t\tif(!newSeason){\n\t\t\tintent.setClass(League.this,TeamList.class);\n\t\t\tintent.putExtra(\"goal1\", t1);\n\t\t\tintent.putExtra(\"goal2\", t2);\n\t\t\tintent.putExtra(\"id1\", id1);\n\t\t\tintent.putExtra(\"id2\", id2);\n\t\t\tintent.putExtra(\"team1\", team1);\n\t\t\tintent.putExtra(\"team2\", team2);\n\t\t\tstartActivity(intent);\n\t\t}\n\t\telse{\n\t\t\t//intent.setClass(League.this, ChoosePlayers.class);\n\t\t\t//intent.putExtra(\"season\", \"end\");\n\t\t\t//intent.putExtra(\"balance\", balance);\n\t\t\tintent.setClass(League.this, Knockout.class);\n\t\t\tintent.putExtra(\"team1\", t[0].name);\n\t\t\tintent.putExtra(\"team2\", t[1].name);\n\t\t\tintent.putExtra(\"id1\", t[0].ImageId);\n\t\t\tintent.putExtra(\"id2\", t[1].ImageId);\n\t\t\tstartActivity(intent);\n\t\t\tfinish();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Intent intent = new Intent(MainActivity.this, replayGame.class);\n intent.putExtra(\"gameName\",gameSelected);\n startActivity(intent);\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(SetInfo.this, ClientGame.class);\n\t\t\t\t\tintent.putExtra(\"IPServer\", et.getText().toString());\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}",
"void listenAndSwitchNewGame() {\n Button button = findViewById(R.id.newButton2048);\n button.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n boardManager = new BoardManager2048();\n switchToActivity(GameActivity2048.class);\n }\n });\n }",
"@Override\n public void onClick(View v) {\n \tIntent intent = new Intent(getApplicationContext(), Gameonesix.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"@Override\n public void onClick(View v) {\n Intent gameSelection = new Intent(\n OpponentSelectionActivity.this, GameSelectionActivity.class);\n // TODO: have id of opponent to send to game selection\n startActivity(gameSelection);\n overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);\n finish();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMap<String,String>map=new HashMap<String,String>();\n\t\t\t\tmap.put(\"videoID\", object.videoID);\n\t\t\t\tmap.put(\"videoname\", object.videoname);\n\t\t\t\tString albumVideoImgUrl=CommonUrl.baseUrl + object.videoImgUrl +\".small\"+ object.suffix;\n\t\t\t\tmap.put(\"videoImgUrl\", albumVideoImgUrl);\n\t\t\t\tCommonUtil.jumpToPlayerActivity(context, map);\n\t\t\t}",
"public void gameOver() {\n tb.setState();\n Date finalDate = new Date();\n float currTime = (finalDate.getTime() - start) / 1000F;\n Intent intent = new Intent(getContext(), TrueBlueOverActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n intent.putExtra(\"Score\", score);\n\n intent.putExtra(\"Time\", currTime);\n\n intent.putExtra(\"Level\", level);\n getContext().startActivity(intent);\n }",
"private void goToGameActivity(boolean single) {\n Intent intent = new Intent(this, GameActivity.class);\n intent.putExtra(\"single\", single);\n startActivity(intent);\n }",
"void startGame() {\n if (getHealth() <= 0) {\n startAgain();\n }\n int level = getLevel();\n if (level == 1) {\n Intent intent = new Intent(this, Level1Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 2) {\n Intent intent = new Intent(this, Level2Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n } else if (level == 3) {\n Intent intent = new Intent(this, Level3Activity.class);\n intent.putExtra(sendPlayer, currPlayer);\n startActivity(intent);\n }\n }",
"private void joinGame(int gameId){\n\n }",
"@Override\n public void onClick(View v) {\n if (mModelList.get(position).getMatchStarted()==\"true\") {\n String temp=mModelList.get(position).getWinner()+\" \"+mModelList.get(position).getTeam1()\n +\" \"+mModelList.get(position).getTeam2();\n Log.d(\"onClick: \",temp);\n Intent i = new Intent(mContext, Main3Activity.class);\n i.putExtra(\"Matches\",mModelList.get(position));\n mContext.startActivity(i);\n }\n else{\n Toast.makeText(mContext ,\"Match has not yet Started \"+mModelList.get(position).getWinner(), Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void connected() {\n int[] statusFlags={TurnBasedMatch.MATCH_TURN_STATUS_MY_TURN,TurnBasedMatch.MATCH_TURN_STATUS_INVITED,TurnBasedMatch.MATCH_TURN_STATUS_COMPLETE,TurnBasedMatch.MATCH_TURN_STATUS_THEIR_TURN};\n Games.TurnBasedMultiplayer.loadMatchesByStatus(googleApiClient,statusFlags).setResultCallback(new ResultCallback<TurnBasedMultiplayer.LoadMatchesResult>() {\n @Override\n public void onResult(TurnBasedMultiplayer.LoadMatchesResult loadMatchesResult) {\n LoadMatchesResponse response=loadMatchesResult.getMatches();\n\n\n if (response.hasData()){\n\n int invitations=response.getInvitations()!=null? response.getInvitations().getCount():0;\n int turn = response.getMyTurnMatches()!=null? response.getMyTurnMatches().getCount():0;\n int completed = response.getCompletedMatches()!=null? response.getCompletedMatches().getCount():0;\n int their_turn = response.getTheirTurnMatches()!=null? response.getTheirTurnMatches().getCount():0;\n TurnBasedMatchBuffer buffer = response.getCompletedMatches();\n\n for (int i=0;i<completed;i++){\n TurnBasedMatch match = buffer.get(i);\n String msg;\n switch (match.getStatus()){\n case TurnBasedMatch.MATCH_STATUS_AUTO_MATCHING:\n msg=\"Auto matching\";\n break;\n case TurnBasedMatch.MATCH_STATUS_ACTIVE:\n msg=\"Active\";\n break;\n case TurnBasedMatch.MATCH_STATUS_COMPLETE:\n msg=\"Complete\";\n break;\n case TurnBasedMatch.MATCH_STATUS_EXPIRED:\n msg=\"Expired\";\n break;\n case TurnBasedMatch.MATCH_STATUS_CANCELED:\n msg=\"Canceled\";\n break;\n default:\n msg=\"Don't know\";\n break;\n }\n Log.d(TAG,\"Completed Matches: \" + i + \" status: \"+ msg);\n }\n\n\n //Toast.makeText(getApplicationContext(),\"Invitations: \" + invitations + \", Turn: \" + turn + \", Completed: \" + completed + \", Their turn: \" + their_turn,Toast.LENGTH_SHORT).show();\n response.release();\n }\n\n\n }\n });\n\n super.connected();\n multiplayerGameButton.setEnabled(true);\n }",
"void listenAndLoadGame() {\n Button loadButton = findViewById(R.id.loadButton2048);\n loadButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n switchToActivity(LoadActivity.class);\n }\n });\n }",
"void ChangeActivity(){\n\n Intent intent = new Intent(this, MainActivity.class);\n\n intent.putExtra(NUMBER, number_of_players);\n\n startActivity(intent);\n finish();\n\n }",
"public void startGame(View view) {\n Intent intent = new Intent(this, Game.class);\n startActivity(intent);\n }",
"private void players() {\n\t\n\tstartActivity (new Intent(getApplicationContext(), Players.class));\n}",
"private void gotoPlay() {\n Intent launchPlay = new Intent(this, GameConfig.class);\n startActivity(launchPlay);\n }",
"void onStartGameRequested();",
"public void onCaptureButtonClick(View view) {\n if(playerTurn == 2 && currentTurnNumber == maxTurnNumber){\n int player1Count = 0;\n int player2Count = 0;\n for(int p = 0; p < players.size(); p++){\n if(players.get(p).intValue() == 1){\n player1Count = player1Count + 1;\n }\n else if (players.get(p).intValue() == 2) {\n player2Count = player2Count + 1;\n }\n }\n //End Game\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.GameComplete);\n String message = \"\";\n if(player1Count == player2Count){\n message = getResources().getString(R.string.GameEndTie);\n } else if (player1Count > player2Count) {\n message = String.format(getResources().getString(R.string.GameEndWon), player1Name);\n } else if (player2Count > player1Count){\n message = String.format(getResources().getString(R.string.GameEndWon), player2Name);\n }\n builder.setMessage(message);\n builder.setPositiveButton(R.string.DialogOkButton, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onEndGame();\n }\n });\n\n // Create the dialog box and show it\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }\n else{\n // create intent and bundle\n Intent intent2 = new Intent(this, CaptureActivity.class);\n Bundle b = new Bundle();\n // if its player 2 increase the round number\n if(playerTurn == 2)\n b.putInt(\"turnNumber\", currentTurnNumber + 1);\n else\n b.putInt(\"turnNumber\", currentTurnNumber);\n // save the value to the bundle\n b.putInt(\"maxNumOfTurns\", maxTurnNumber);\n b.putString(\"player1Name\", player1Name);\n b.putString(\"player2Name\", player2Name);\n if(playerTurn == 1)\n b.putInt(\"playerTurn\", 2);\n else\n b.putInt(\"playerTurn\", 1);\n b.putInt(\"selectionMethod\", cap_method);\n b.putIntegerArrayList(\"players\",players);\n intent2.putExtras(b);\n // start activity\n startActivity(intent2);\n finish();\n }\n }",
"@Override\n public void onClick(View v) {\n Intent dayMatch = new Intent(LeagueActivity.this, dayMatch.class);\n dayMatch.putExtra(\"leagueId\", leagueId);\n dayMatch.putExtra(\"leagueName\", leagueName);\n startActivity(dayMatch);\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(this, Game.class);\n intent.putExtra(\"MODE\",isInvert);\n\n int id = view.getId();\n if(id == easy.getId()){\n intent.putExtra(\"FLAG\", 0);\n startActivity(intent);\n }\n\n if (id == medium.getId()){\n intent.putExtra(\"FLAG\", 1);\n startActivity(intent);\n }\n\n if (id == expert.getId()){\n intent.putExtra(\"FLAG\", 2);\n startActivity(intent);\n }\n if (id == statistics.getId()){\n startActivity(new Intent(this, ScoreActivity.class));\n }\n }",
"@Override\n public void run() {\n isSelectable = true;\n hideResultView();\n initialScreenConditions();\n\n\n if (currentPlay <= Utility.game.getLength()) {\n // hiding time view\n if (Utility.isUmpire) {\n showUmpireOptions();\n } else {\n showPlayerOptions();\n }\n } else {\n RelativeLayout gameOver = (RelativeLayout) findViewById(com.ryansplayllc.ryansplay.R.id.final_game_sceen);\n gameOver.setVisibility(View.VISIBLE);\n playerStatsView();\n gameOver.bringToFront();\n currentPlay = 1;\n\n\n finalLeaderBoard.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n\n finish();\n Utility.enterdGameLobbyStatus = false;\n Intent i = new Intent(GameScreenActivity.this, FinalLeaderBoardActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP\n | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(i);\n }\n });\n\n }\n }",
"void onNewGame();",
"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 }",
"public void startMultiPlayer() {\r\n\t\tmultiplayer.setEnabled(true);\r\n\t\tIntent intent = new Intent(Main.this, DrawingActivityMulti.class);\r\n\t\tstartActivityForResult(intent, DrawingActivityMulti.APPLICATION_ID);\r\n\t}",
"@Override\n public void onClick(View v) {\n Intent next = new Intent(HomeActivity.this,Playerinfo.class); //set intent for going to playerinfo class\n startActivity(next); // click to continue to the next activity\n //player.pause();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(Glory.this,GamePlay.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}",
"public void newGame(View v){\n\n startActivity(new Intent(getApplicationContext(),MainActivity.class)); // same as startActivity(new Intent (this, Main2Activity.class));\n\n }",
"public static void joinSingleLiveActivity(Context cnx, LiveResult item){\n\n\n loge(\"ACTIVITYUTILS\", toGson(item) );\n\n Intent intent = new Intent(cnx, HostPKLiveActivity.class);\n\n intent.putExtra(Global.Constants.TAB_KEY, 3);\n intent.putExtra(Global.Constants.KEY_IS_ROOM_OWNER, false);\n intent.putExtra(Global.Constants.KEY_CREATE_ROOM, false);\n\n intent.putExtra(Global.Constants.KEY_ROOM_NAME, item.getAdd_broadcast_title());\n intent.putExtra(Global.Constants.KEY_ROOM_ID, item.getRoom_id());\n\n intent.putExtra(Global.Constants.KEY_ROOM_OWNER_ID, item.getUser_id());\n intent.putExtra(Global.Constants.USER_PROFILE, item.getImage());\n intent.putExtra(Global.Constants.USERNAME, item.getUser_name());\n intent.putExtra(Global.Constants.TAB_KEY, Integer.parseInt(item.getBroadcasting_type()));\n intent.putExtra(Global.Constants.BROADCAST_ID, item.getAdd_broadcast_id());\n intent.putExtra(Global.Constants.BROADCASTERID, item.getUser_id());\n\n intent.putExtra(Global.Constants.USER_GENDER, item.getGender());\n intent.putExtra(Global.Constants.USER_AGE, item.getAge());\n\n putUserLevel(intent, item.getDiamond(), item.getLevel(), item.getHeart(), item.getMy_xp());\n\n intent.putExtra(Global.Constants.COUNTDOWN, item.getCount_down_in_sec());\n\n cnx.startActivity(intent);\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent intent = new Intent(SetInfo.this, ServerGame.class);\n\t\t\t\t\tintent.putExtra(\"KEY\", et.getText().toString());\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}",
"private void scoreboard() {\n Intent intent = new Intent(this, AlienPainterScoreboardActivity.class);\n intent.putExtra(SCOREBOARD_STATUS, presenter.getIsVictorious());\n intent.putExtra(POINTS, presenter.getPoints());\n intent.putExtra(NUM_MOVES, presenter.getNumMoves());\n intent.putExtra(TIME_LEFT, presenter.getTimeLeft());\n intent.putExtra(LANGUAGE, isEnglish);\n intent.putExtra(PASS_USER, currUser);\n startActivity(intent);\n finish();\n }",
"public void openPromotion() {\n myActivity.setContentView(R.layout.promotion);\n Button promotionButtonToGame = myActivity.findViewById(R.id.button6);\n\n promotionButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n\n\n );\n\n\n }",
"public static GameActivity getGameActivity() {\n\t\treturn act;\n\t}",
"@Override\n public void onClick(View view) {\n Intent hitsIntent = new Intent(Playlists.this, Playing_now.class);\n startActivity(hitsIntent);\n }",
"void showActiveGames() {\n\t\tif(gameHelper == null){return;}\n\t\tif (gameHelper.getApiClient().isConnected()) {\n\t\t\tIntent i = Games.TurnBasedMultiplayer.getInboxIntent(gameHelper\n\t\t\t\t\t.getApiClient());\n\t\t\tstartActivityForResult(i, RC_INVITATION_BOX);\n\t\t} else if (gameHelper.isConnecting()) {\n\t\t\tToast.makeText(getActivity(), R.string.wait_connecting_to_google,\n\t\t\t\t\tToast.LENGTH_LONG).show();;\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btnNewGame:\n Intent intent = new Intent(MainActivity.this, GameActivity.class);\n startActivity(intent);\n break;\n\n case R.id.btnShowLeaderBoard:\n Intent i = new Intent(MainActivity.this, LeaderBoardActivity.class);\n startActivity(i);\n //Toast.makeText(MainActivity.this, \"First play to see high scores!\", Toast.LENGTH_LONG).show();\n break;\n\n case R.id.imgBtnMute:\n if(!GameActivity.isMute) {\n btnMute.setImageResource(R.mipmap.ic_mute);\n }\n else {\n btnMute.setImageResource(R.mipmap.ic_unmute);\n }\n GameActivity.isMute = !GameActivity.isMute;\n break;\n }\n }",
"@Override\n public void onPlay(GameState gameState) {\n gameState.promptActivityForLocation(this);\n\n }",
"@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.btTeam2:\n addTeam1Members();\n Intent team2entry = new Intent(\"ca.longship.planetkubb.TEAMLISTS2\");\n startActivity(team2entry);\n\n break;\n case R.id.bAddPlayer1:\n if (sTeam1PlayNum == 1) {\n\n playercount = 2;\n } else if (sTeam1PlayNum == 2) {\n\n playercount = 3;\n } else if (sTeam1PlayNum == 3) {\n\n playercount = 4;\n\n } else if (sTeam1PlayNum == 4) {\n\n playercount = 5;\n\n } else if (sTeam1PlayNum == 5) {\n\n playercount = 6;\n\n } else if (sTeam1PlayNum == 6) {\n Toast.makeText(getBaseContext(),\n \"Cannot add any more players. Max is 6\",\n Toast.LENGTH_SHORT).show();\n playercount = 6;\n\n }\n sTeam1PlayNum = playercount;\n team1Players = sTeam1PlayNum;\n setVisiblePlayers();\n break;\n case R.id.bDelPlayer1:\n if (sTeam1PlayNum == 1) {\n Toast.makeText(getBaseContext(),\n \"Must have at least 1 player\",\n Toast.LENGTH_SHORT).show();\n playercount = 1;\n } else if (sTeam1PlayNum == 2) {\n tvt1p2.setVisibility(View.INVISIBLE);\n spnPlayer2.setVisibility(View.INVISIBLE);\n playercount = 1;\n } else if (sTeam1PlayNum == 3) {\n tvt1p3.setVisibility(View.INVISIBLE);\n spnPlayer3.setVisibility(View.INVISIBLE);\n playercount = 2;\n\n } else if (sTeam1PlayNum == 4) {\n tvt1p4.setVisibility(View.INVISIBLE);\n spnPlayer4.setVisibility(View.INVISIBLE);\n playercount = 3;\n\n } else if (sTeam1PlayNum == 5) {\n tvt1p5.setVisibility(View.INVISIBLE);\n spnPlayer5.setVisibility(View.INVISIBLE);\n playercount = 4;\n\n } else if (sTeam1PlayNum == 6) {\n tvt1p6.setVisibility(View.INVISIBLE);\n spnPlayer6.setVisibility(View.INVISIBLE);\n playercount = 5;\n\n }\n sTeam1PlayNum = playercount;\n team1Players = sTeam1PlayNum;\n setVisiblePlayers();\n\n break;\n }\n }",
"@Override\n public void onClick(View v) {\n Intent rockintent = new Intent(GameActivity.this, ResultsActivity.class);\n rockintent.putExtra(\"playerA\", \"Scissors\");\n rockintent.putExtra(\"playerB\", playerB);\n rockintent.putExtra(\"playerAimage\", playerAweaponimage[RandomImageNum]);\n rockintent.putExtra(\"playerAscore\", TotalPlayerA);\n rockintent.putExtra(\"playerBscore\", TotalPlayerB);\n rockintent.putExtra(\"playerAname\", playerAname);\n rockintent.putExtra(\"playerBname\", playerBname);\n startActivity(rockintent);\n }",
"public void startGame(){\n\t\tIntent intent = new Intent(getApplicationContext(), AndroidLauncher.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\n\t\tintent.putExtra(Bluetooth.PRIMARY_BT_GAME, String.valueOf(false));\n\t\tintent.putExtra(Bluetooth.SECONDARY_BT_GAME, String.valueOf(true));\n\t\tstartActivity(intent);\n\t}",
"@Override\n public void onClick(View v) {\n Intent rockintent = new Intent(GameActivity.this, ResultsActivity.class);\n rockintent.putExtra(\"playerA\", \"Paper\");\n rockintent.putExtra(\"playerB\", playerB);\n rockintent.putExtra(\"playerAimage\", playerAweaponimage[RandomImageNum]);\n rockintent.putExtra(\"playerAscore\", TotalPlayerA);\n rockintent.putExtra(\"playerBscore\", TotalPlayerB);\n rockintent.putExtra(\"playerAname\", playerAname);\n rockintent.putExtra(\"playerBname\", playerBname);\n startActivity(rockintent);\n }",
"public void fightClick(View view) {\n this.player.incrementTries();\n this.player.setTarget(level);\n Intent fightIntent = new Intent(this, FightActivity.class);\n fightIntent.putExtra(\"player\", player);\n fightIntent.putExtra(\"level\", level);\n startActivity(fightIntent);\n }",
"public void addGame(View item){\n Intent intent = new Intent(this, NewGameActivity.class);\n startActivity(intent);\n }",
"public Game startGame(Game game);",
"public static void start(GameActivity a) {\n\t\tact = a;\n\t\tgame.start();\n\t}",
"public void onClick(View v) {\n \tm_main.gameStart();\n }",
"@Override\n public void onClick(View v) {\n\n presenter.terminateTimer();\n presenter.recordStats();\n Intent intent = new Intent(v.getContext(), MainActivity.class);\n intent.putExtra(PASS_USER, currUser);\n startActivity(intent);\n finish();\n }",
"@Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n // Needs to be reversed here due to the setting of the team in the\n // Inkast module\n if (team1.isChecked()) {\n GlobalVars.setFirstTeam(team2.getText().toString());\n } else if (team2.isChecked()) {\n GlobalVars.setFirstTeam(team1.getText().toString());\n }\n\n GlobalVars.setTurnNumber(1);\n GlobalVars.initializegame();\n\n GlobalVars.addToString(\"{{Game initialize}}\\n\");\n Intent processturn = new Intent(\"ca.longship.planetkubb.TURNINKAST\");\n\n startActivity(processturn);\n\n }",
"@Override\n public void onClick(View v) {\n if (arg0 == 0) {//清理缓存\n final String filePath = Environment.getExternalStorageDirectory().getPath()+\"/video\";\n DataCleanManager.cleanApplicationData(Setinfo_Activity.this, filePath);\n try {\n //获取缓存大小\n notifyDataSetChanged();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } else if (arg0 == 1) {//检查新版本\n presenter.getVersionInfo();\n } else if (arg0 == 2) { // 帮助与反馈\n Intent feedBackIntent = new Intent(Setinfo_Activity.this, FeedbackActivity.class);\n ScreenManager.getScreenManager().startPage(Setinfo_Activity.this, feedBackIntent, true);\n }else if(arg0 == 3){//关于我们\n\t\t\t\t\t\tIntent intent3 = new Intent(Setinfo_Activity.this,AboutMy_Activity.class);\n\t\t\t\t\t\tScreenManager.getScreenManager().startPage(Setinfo_Activity.this, intent3, true);\n\t\t\t\t\t}\n }",
"public void forwardOnClick(View view){\n while(Integer.parseInt(mazeController.getPercentDone()) < 99) {\n\n }\n Intent newIntent = new Intent(this, Play.class);\n startActivity(newIntent);\n }",
"@Override\n public void onClick(View v) {\n Intent rockintent = new Intent(GameActivity.this, ResultsActivity.class);\n rockintent.putExtra(\"playerA\", \"Rock\");\n rockintent.putExtra(\"playerB\", playerB);\n rockintent.putExtra(\"playerAimage\", playerAweaponimage[RandomImageNum]);\n rockintent.putExtra(\"playerAscore\", TotalPlayerA);\n rockintent.putExtra(\"playerBscore\", TotalPlayerB);\n rockintent.putExtra(\"playerAname\", playerAname);\n rockintent.putExtra(\"playerBname\", playerBname);\n startActivity(rockintent);\n }",
"@Override\n public void onClick(View v) {\n Log.d(TAG,\"JOINING ROOMID\" + chat_list.get(position).roomhash );\n mSocket.emit(\"CreateRoom\",chat_list.get(position).roomhash,chat_list.get(position).gcmID);\n Intent intent2 = new Intent(CTX, ChatInstance.class);\n intent2.putExtra(\"roomnum\", chat_list.get(position).roomhash);\n\n CTX.startActivity(intent2);\n\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tLoadPlayerLog(); \n\t\t\t\t}",
"public void onItemClick(AdapterView<?> parent, View v,\n int position, long id) {\n Intent intent = new Intent(TwitchGames.this, TwitchStreams.class);\n //pass the name of the game to the new intent\n intent.putExtra(\"gameName\", gameList.get(position));\n intent.putExtra(\"gameViewers\", channelViewersList.get(position));\n startActivity(intent);\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tstartGame();\n\t\t\t\t\t\t\t\t}",
"public void openMoving() {\n myActivity.setContentView(R.layout.moving);\n Button movingButtonToGame = myActivity.findViewById(R.id.button10);\n\n movingButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n public void onClick(View v) {\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingRulesScreen = false;\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }",
"public void onClick(View v) {\n \tm_main.gameContinue();\n }",
"@Override\n public void onClick(View v) {\n setGameTotal();\n\n // Call other player when click on hold\n callOtherPlayer();\n\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\tgameProgressService.newGame();\n\t\t\t\t}",
"private void launchLocal(String name) {\n Intent loc = new Intent(homeActivity.this, cardsMenu.class);\n Bundle b = new Bundle();\n b.putString(\"key\",\"local\"); //pass along that this will be a single player multigame\n b.putString(\"name\",name); //pass the player's name\n // b.putString(\"State\", State); //pass along the game type\n loc.putExtras(b);\n startActivity(loc);\n\n }",
"@Override\n protected void onCreate(Bundle bundle) {\n // get the intents bundle to get the extras\n Bundle b = getIntent().getExtras();\n int selectionMethod = 10;\n // if the bundle is not null load the values in\n if(b != null)\n {\n selectionMethod = b.getInt(\"selectionMethod\");\n player1Name = b.getString(\"player1Name\");\n player2Name = b.getString(\"player2Name\");\n currentTurnNumber = b.getInt(\"turnNumber\");\n maxTurnNumber = b.getInt(\"maxNumOfTurns\");\n playerTurn = b.getInt(\"playerTurn\");\n players=b.getIntegerArrayList(\"players\");\n }\n\n // set content view\n super.onCreate(bundle);\n setContentView(R.layout.activity_game);\n\n // get the text views\n TextView tv1 = (TextView)findViewById(R.id.CaptureMethodType);\n TextView tv2 = (TextView)findViewById(R.id.GamePlayerName);\n TextView tv3 = (TextView)findViewById(R.id.RoundNum);\n // set the players name in the label for whose turn it is\n if(playerTurn == 1)\n {\n tv2.setText(player1Name);\n }\n else\n {\n tv2.setText(player2Name);\n }\n\n // load the round info string and set the label\n String turnText = String.format(getResources().getString(R.string.RoundLabelText), currentTurnNumber, maxTurnNumber);\n tv3.setText(turnText);\n // set the text for the capture method\n switch(selectionMethod){\n case 0: tv1.setText(R.string.GuaranteedCollect);\n break;\n case 1: tv1.setText(R.string.Line);\n break;\n case 2: tv1.setText(R.string.Rectangle);\n break;\n default: tv1.setText(R.string.Error);\n break;\n }\n // get the game view and set info\n gameView = (GameView)this.findViewById(R.id.gameView);\n gameView.set_cap_method(selectionMethod);\n gameView.setplayer_info(playerTurn);\n gameView.setPlayers(players);\n gameView.instance(this);\n if(bundle != null) {\n // We have saved state\n gameView.loadInstanceState(bundle);\n }\n cap_method=selectionMethod;\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tintent.putExtra(\"key\", gamesdata.get(para.get(position)+1).getAmazonkey());\n\t\t\t\t\t\t\tc.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(Glory.this,SettingsActivity.class);\n\t\t\t\tintent.putExtra(\"GAMESTARTED\", false);\n\t\t\t\tstartActivity(intent);\n\t\t\t}",
"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 void clickStartGame(View view) {\n String userName = nameInputField.getText().toString();\n String roundLimit = pointLimitInputField.getText().toString();\n\n boolean inputAccepted = checkUserInput(userName, roundLimit);\n\n if (inputAccepted) {\n // User input is valid so we keep the input data and switch to the GameActivity screen.\n Intent intent = new Intent(MainActivity.this, GameActivity.class);\n Bundle bundle = new Bundle();\n bundle.putString(\"userName\", userName);\n bundle.putString(\"roundLimit\", roundLimit);\n intent.putExtras(bundle);\n startActivity(intent);\n }\n }",
"private void nextLevel(){\n Intent intent = new Intent(MainActivity.this, Main2Activity.class);\n intent.putExtra(\"currentPoints\", score);\n startActivity(intent);\n }",
"private void startActivity(String gameName, GameManager gameManager){\n switch(gameName){\n case \"Sliding Tile\":\n gameCentre.saveManager(SlidingTileStartingActivity.SLIDING_TILE_START_FILE, gameManager);\n switchToSlidingTile();\n break;\n case \"Card Matching\":\n gameCentre.saveManager(CardMatchingStartingActivity.CARD_MATCHING_START_FILE, gameManager);\n switchToCardMatching();\n break;\n case \"Sudoku\":\n gameCentre.saveManager(SudokuStartingActivity.SUDOKU_START_FILE, gameManager);\n switchToSudoku();\n break;\n }\n }",
"@Override\n\tpublic void listMinutesPerGame(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MinutesPerGameListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}",
"public void startGame(View view) {\n\t\tstartActivity(new Intent(this, Game.class));\n\t}",
"public abstract void onSolvedGame();",
"public void GameStart()\n\t\t{\n\t\t\tplayers_in_game++;\n\t\t}",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(NowPlaying.this, classDestination);\n // starting new activity\n startActivity(intent);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(context, MainVideo.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getApplicationContext(),\n\t\t\t\t\t\tLeaderBoard.class);\n\t\t\t\tstartActivity(i);\n\t\t\t}",
"@Override\n\tpublic void onGameStarted(String arg0, String arg1, String arg2) {\n\t\t\n\t}",
"public void OnPlayer(Joueur joueur);",
"@Override\n\tprotected void onNewIntent(Intent intent) {\n\t\tsuper.onNewIntent(intent);\n\t\tToast.makeText(MainActivity.this, \"player\", Toast.LENGTH_SHORT).show();\n\t}",
"@Override\n public void onClick(View view) {\n // Create a new intent\n Intent new_release_intent = new Intent(VietPopActivity.this, MainActivity.class);\n new_release_intent.putExtra(\"uniqueid\",\"from_viet\");\n // Start the new activity\n startActivity(new_release_intent);\n }"
] | [
"0.6642911",
"0.6641557",
"0.65951437",
"0.6458213",
"0.6378625",
"0.6377353",
"0.63070685",
"0.6294319",
"0.62593454",
"0.6237136",
"0.6234234",
"0.62008417",
"0.6193135",
"0.6188712",
"0.6163223",
"0.61567974",
"0.6145604",
"0.6132625",
"0.61300886",
"0.6126401",
"0.61002874",
"0.6088652",
"0.6073265",
"0.6066433",
"0.60589206",
"0.60577387",
"0.605556",
"0.6052439",
"0.6041526",
"0.6037491",
"0.6030198",
"0.6008913",
"0.59994084",
"0.5981608",
"0.59607905",
"0.59570193",
"0.5935035",
"0.5932447",
"0.5930604",
"0.59105474",
"0.5905533",
"0.58880275",
"0.5887815",
"0.58836806",
"0.5879668",
"0.5873968",
"0.5873014",
"0.5848957",
"0.5848345",
"0.5841295",
"0.5830162",
"0.581049",
"0.58075285",
"0.58066726",
"0.58066314",
"0.5805804",
"0.5799259",
"0.57857573",
"0.5772694",
"0.57699734",
"0.57683563",
"0.5746667",
"0.5733586",
"0.5729893",
"0.5725319",
"0.572461",
"0.5705169",
"0.5701153",
"0.5698312",
"0.5692775",
"0.56889653",
"0.56879586",
"0.5675606",
"0.5675252",
"0.5668816",
"0.5663078",
"0.5661722",
"0.56616175",
"0.5638031",
"0.5637604",
"0.5633978",
"0.5625994",
"0.5617372",
"0.5616066",
"0.56099594",
"0.5608792",
"0.5606804",
"0.56059974",
"0.5597341",
"0.55970556",
"0.55841464",
"0.5582177",
"0.5575273",
"0.5572166",
"0.5571665",
"0.5566499",
"0.55641407",
"0.55622476",
"0.5561506",
"0.5560519",
"0.5559843"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.visit_multiplayer_game, menu);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}",
"public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}",
"@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246102",
"0.7201358",
"0.7194834",
"0.7176498",
"0.71066517",
"0.7039537",
"0.7037961",
"0.70112145",
"0.70094734",
"0.69807225",
"0.6944953",
"0.69389373",
"0.6933199",
"0.6916928",
"0.6916928",
"0.6891486",
"0.68831646",
"0.68754137",
"0.68745375",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68621665",
"0.68515885",
"0.68467957",
"0.68194443",
"0.6817494",
"0.6813087",
"0.6813087",
"0.6812847",
"0.6805774",
"0.6801204",
"0.6797914",
"0.6791314",
"0.6789091",
"0.67883503",
"0.6783642",
"0.6759701",
"0.6757412",
"0.67478645",
"0.6744127",
"0.6744127",
"0.67411774",
"0.6740183",
"0.6726017",
"0.6723245",
"0.67226785",
"0.67226785",
"0.67208904",
"0.67113477",
"0.67079866",
"0.6704564",
"0.6699229",
"0.66989094",
"0.6696622",
"0.66952467",
"0.66865396",
"0.6683476",
"0.6683476",
"0.6682188",
"0.6681209",
"0.6678941",
"0.66772443",
"0.6667702",
"0.66673946",
"0.666246",
"0.6657578",
"0.6657578",
"0.6657578",
"0.6656586",
"0.66544783",
"0.66544783",
"0.66544783",
"0.66524047",
"0.6651954",
"0.6650132",
"0.66487855",
"0.6647077",
"0.66467404",
"0.6646615",
"0.66464466",
"0.66449624",
"0.6644209",
"0.6643461",
"0.6643005",
"0.66421187",
"0.6638628",
"0.6634786",
"0.6633529",
"0.6632049",
"0.6632049",
"0.6632049",
"0.66315657",
"0.6628954",
"0.66281766",
"0.6627182",
"0.6626297",
"0.6624309",
"0.6619582",
"0.6618876",
"0.6618876"
] | 0.0 | -1 |
Dieser Toast muss ueber den UI Thread ausgefuehrt werden, da er von ausserhalb aufgerufen wird | public void showToast(final String message){
runOnUiThread(new Runnable() {
public void run()
{
Toast.makeText(VisitMultiplayerGame.this, message, Toast.LENGTH_SHORT).show();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }",
"@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }",
"public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }",
"private static void checkToast() {\n\t\tif (mToast == null) {\n\t\t\tmToast = Toast.makeText(GlobalApp.getApp(), null,\n\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t}\n\t}",
"protected void toast() {\n }",
"private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void run() {\n setToast(\"연결에 성공하였습니다.\");\n }",
"private void showErrorToast() {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}",
"private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}",
"@Override\n public void run() {\n if (mToast == null) {\n mToast = Toast.makeText(getApplicationContext(), text,\n Toast.LENGTH_SHORT);\n } else {\n mToast.setText(text);\n }\n mToast.show();\n }",
"private void showToast(final String message) {\n main.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(main.getApplicationContext(), message, Toast.LENGTH_LONG).show();\n }\n });\n }",
"protected void toastshow() {\n \n\t\tToast toast=new Toast(getApplicationContext());\n\t\tImageView imageView=new ImageView(getApplicationContext());\n\t\timageView.setImageResource(R.drawable.icon);\n\t\ttoast.setView(imageView);\n\t\ttoast.show();\t\n\t}",
"public void ToastPopper(String t){\n Context context = getApplicationContext();\n CharSequence text = t;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"I'm a toast!\", Toast.LENGTH_SHORT).show();\n }",
"public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }",
"public void onToast (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tdoToast ();\r\n\t}",
"void showToast(String message);",
"void showToast(String message);",
"private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }",
"@Override\n public void run() {\n Toast.makeText(rootView.getContext(), mensaje,\n Toast.LENGTH_LONG).show();\n }",
"public static void toastIt(Context context, Toast toast, CharSequence msg) {\n if(toast !=null){\n toast.cancel();\n }\n\n //Make and display new toast\n toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n toast.show();\n }",
"private void displayToast() {\n if(getActivity() != null && toast != null) {\n Toast.makeText(getActivity(), toast, Toast.LENGTH_LONG).show();\n toast = null;\n }\n }",
"public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }",
"public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}",
"private void makeToast(String msg)\n {\n FinanceApp.serviceFactory.getUtil().makeAToast(this, msg);\n }",
"@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}",
"private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }",
"protected void toastshow1() {\n \n\t\tToast toast=Toast.makeText(this, \"image and text\", Toast.LENGTH_LONG);\n\t\t\n\t\tLinearLayout linearLayout=new LinearLayout(this);\n\t\tlinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tImageView imageView=new ImageView(this);\n\t\timageView.setImageResource(R.drawable.icon);\n\t\tButton button=new Button(this);\n\t\tbutton.setText(\"progress over\");\n\t\tView toastView=toast.getView();\n\t\tlinearLayout.addView(imageView);\n\t\tlinearLayout.addView(button);\n\t\tlinearLayout.addView(toastView);\n\t\t\n\t\ttoast.setView(linearLayout);\n\t\ttoast.show();\n\t\t\n\t}",
"static void makeToast(Context ctx, String s){\n Toast.makeText(ctx, s, Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }",
"public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}",
"@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }",
"private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }",
"static void displayToast(Handler handler, final Context con, final String text, final int toast_length){\n\t\thandler.post(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\tToast.makeText(con, text, toast_length).show();\n\t\t\t}\n\t\t});\n\t}",
"public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }",
"private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }",
"private void cancelToast() {\n\t\tToast.makeText(getActivity(),\n\t\t\t\t\t\"Vorgang abgebrochen\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}",
"public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tMaterialToast.fireToast(caught.getMessage());\n\t\t\t}",
"private void logAndToast(String msg) {\n Log.d(TAG, msg);\n if (logToast != null) {\n logToast.cancel();\n }\n logToast = Toast.makeText(this, msg, Toast.LENGTH_LONG);\n logToast.show();\n }",
"@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }",
"void toast(int resId);",
"private void displayToast(CharSequence text){\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }",
"public void toast(String toast) {\n\t\t// TODO Auto-generated method stub\n\t\t Toast toast1 = Toast.makeText(getApplicationContext(), toast, \n Toast.LENGTH_LONG); \n\t\t toast1.setDuration(1);\n\t\t toast1.show();\n\t\t \n\t}",
"@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }",
"void onMessageToast(String string);",
"@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }",
"private void showLongToast(final String msg) {\n this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }\n });\n }",
"public static void displayToast(Context context, String msg) {\n Toast.makeText(context, msg, Toast.LENGTH_LONG).show();\n\n }",
"private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }",
"@Override\n\tpublic void createToast(String slogan, float duration) {\n\t\tif (Gdx.app.getType() == ApplicationType.Android) {\n\t\t\tgGame.iFunctions.createToast(slogan, duration);\n\t\t} else\n\t\tsuper.createToast(slogan, duration);\n\t}",
"@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }",
"private void showToast(final String message) {\n Log.e(App.TAG, message);\n\n Handler h = new Handler(Looper.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();\n }\n });\n }",
"private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }",
"private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }",
"private void mostrarToast () {\n Toast.makeText(this, \"Imagen guardada en la galería.\", Toast.LENGTH_SHORT).show();\n }",
"private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }",
"public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }",
"@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }",
"protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}",
"@Override\n public void run() {\n setToast(recvInput);\n }",
"@Override\n public void run() {\n setToast(recvInput);\n }",
"@Override\n public void run() {\n setToast(recvInput);\n }",
"@Override\n public void run() {\n setToast(recvInput);\n }",
"@Override\n public void run() {\n setToast(recvInput);\n }",
"public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }",
"private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }",
"protected void showToast(CharSequence text) {\r\n\t Context context = getApplicationContext();\r\n\t int duration = Toast.LENGTH_SHORT;\r\n\t \r\n\t Toast toast = Toast.makeText(context, text, duration);\r\n\t toast.show();\r\n\t}",
"public void showToastMessage(String str) {\n Toast.makeText(self, str, Toast.LENGTH_SHORT).show();\n }",
"private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }",
"@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}",
"@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}",
"@Override\n\t\t\tpublic void onCallback(Exception e) {\n\t\t\t\t ToastUtils.showCustomToast(e.getLocalizedMessage());\n\t\t\t}",
"public static void hideToast() {\n if (null != toast) {\n toast.cancel();\n }\n }",
"private void makeToast(String message, boolean longToast) {\n\t\tif (longToast)\t{ Toast.makeText(this, message, Toast.LENGTH_LONG).show(); }\n\t\telse\t\t\t{ Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); }\n\t}",
"public static void showToast(Context context, String msg) {\n Toast.makeText(context, \"\" + msg, Toast.LENGTH_LONG).show();\n\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }",
"public static void toastText(Context context, String s)\n\t{\n\t\tif(Utils.ConstantVars.canToastDebugText) \n\t\t\tToast.makeText(context, s, 2 * Toast.LENGTH_LONG).show();\n\t}",
"private void toastMessage(String message) {\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n\n }",
"public void showToast(View view) {\n // Initialize an object named 'toast' using the 'Toast' class\n Toast toast = Toast.makeText(this, R.string.toast_message, Toast.LENGTH_SHORT);\n\n // Use the method 'show()' under the 'Toast' class to show a message\n toast.show();\n }",
"public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }",
"private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }",
"private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }",
"@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }",
"private void toast(String bread) {\n Toast.makeText(getActivity(), bread, Toast.LENGTH_SHORT).show();\n }",
"private void makeToast(String string) {\n\t\tToast.makeText(this, string, Toast.LENGTH_SHORT).show();\r\n\r\n\t}",
"public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}",
"@Override\n public void onThinking() {\n toast(\"Processing\");\n showDialog();\n }",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }",
"private void toast(String string){\n Toast.makeText(this, string, Toast.LENGTH_SHORT).show();\n }",
"private void showToast(@StringRes int resId) {\n mHandler.post(\n () -> Toast.makeText(mWindowContext, getText(resId), Toast.LENGTH_LONG).show());\n }",
"@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }",
"@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }"
] | [
"0.7613293",
"0.761031",
"0.7561402",
"0.7467926",
"0.74063236",
"0.7374436",
"0.7349279",
"0.73385805",
"0.7251055",
"0.7221835",
"0.71759444",
"0.7124438",
"0.7109772",
"0.70803934",
"0.7049832",
"0.70428264",
"0.70309126",
"0.7020132",
"0.7020132",
"0.6997827",
"0.69915056",
"0.6979803",
"0.6945512",
"0.69347227",
"0.6932528",
"0.69233245",
"0.69018066",
"0.69018066",
"0.68938655",
"0.68744767",
"0.68731433",
"0.68691313",
"0.68358314",
"0.68330353",
"0.6829267",
"0.68287",
"0.68194664",
"0.68181217",
"0.68113965",
"0.6809387",
"0.680899",
"0.6806484",
"0.68029",
"0.6802124",
"0.68001384",
"0.6796752",
"0.67931247",
"0.67695874",
"0.67503667",
"0.67424893",
"0.6740326",
"0.6733417",
"0.671908",
"0.670726",
"0.6705662",
"0.6692996",
"0.6677715",
"0.66666216",
"0.6662484",
"0.6662484",
"0.6644905",
"0.6637916",
"0.66317177",
"0.6624749",
"0.66213304",
"0.6613314",
"0.6613314",
"0.6613314",
"0.6613314",
"0.6613314",
"0.66126513",
"0.66121984",
"0.66051483",
"0.66011226",
"0.65709454",
"0.6569229",
"0.6569229",
"0.6569229",
"0.6561775",
"0.65613747",
"0.65561986",
"0.65521574",
"0.65489036",
"0.6539842",
"0.6536456",
"0.6534606",
"0.65241385",
"0.65241385",
"0.6511468",
"0.6505656",
"0.6505285",
"0.6505007",
"0.65005475",
"0.64929014",
"0.64929014",
"0.64929014",
"0.6492883",
"0.6492516",
"0.64908046",
"0.64886814"
] | 0.65247566 | 86 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.7905683",
"0.7805918",
"0.7766949",
"0.77280927",
"0.76328415",
"0.76229936",
"0.7585238",
"0.75312966",
"0.7488599",
"0.7458191",
"0.7458191",
"0.74387765",
"0.74228644",
"0.7403772",
"0.7392029",
"0.7387223",
"0.73796284",
"0.73707056",
"0.7362735",
"0.7356231",
"0.73459065",
"0.7341539",
"0.7330543",
"0.73291767",
"0.73262036",
"0.7319113",
"0.73170453",
"0.7313933",
"0.73042923",
"0.73042923",
"0.73021746",
"0.7298463",
"0.7293577",
"0.72871155",
"0.728366",
"0.72813606",
"0.72788465",
"0.7260218",
"0.7260118",
"0.7260118",
"0.7260118",
"0.7259794",
"0.7250006",
"0.72262347",
"0.7219645",
"0.7217006",
"0.72047913",
"0.7201841",
"0.7200691",
"0.7192642",
"0.71852654",
"0.71776754",
"0.7168698",
"0.7167816",
"0.7154364",
"0.7154273",
"0.7136245",
"0.71353966",
"0.71353966",
"0.71301633",
"0.71298534",
"0.71242434",
"0.7123501",
"0.7123328",
"0.7122727",
"0.71177506",
"0.71177506",
"0.71177506",
"0.71177506",
"0.71177506",
"0.71171933",
"0.711691",
"0.7115056",
"0.71125406",
"0.71098775",
"0.7109295",
"0.7106308",
"0.70996547",
"0.70985293",
"0.7096212",
"0.709441",
"0.709441",
"0.708686",
"0.7083485",
"0.70817393",
"0.7080634",
"0.7073991",
"0.70688444",
"0.70622706",
"0.7060854",
"0.70605165",
"0.7052146",
"0.70383173",
"0.70383173",
"0.70361066",
"0.70361066",
"0.7036086",
"0.7032447",
"0.70313036",
"0.7029748",
"0.7019589"
] | 0.0 | -1 |
Activity wird beendet BroadcastReceiver deregistrieren | @Override
protected void onDestroy() {
super.onDestroy();
if(mReceiver != null) unregisterReceiver(mReceiver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onReceive(Context context, Intent intent) {\n\n gerarNotificacaoTomarRemedio(context, new Intent(context , MainActivity.class));\n }",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), StartActivityReceiver.class);\n intent.putExtra(\"zjf\", \"123\");\n sendBroadcast(intent);\n }",
"@Override \n protected void onResume() {\n\t super.onResume(); \n\t registerReceiver(mReceiver, mIntentFilter); \n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n }",
"private void setReceiver() {\n broadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n update(bundle);\n }\n };\n IntentFilter filter = new IntentFilter();\n filter.addAction(RunningContract.progress);\n registerReceiver(broadcastReceiver, filter);\n }",
"@Override\n public void onResume() {\n super.onResume();\n if (broad == null) {\n broad = new MyBroadcastReceiver();\n }\n\n IntentFilter intentFilter = new IntentFilter(Constant.REFRESH_FLAG);\n if (!StringUtil.isEmpty(mContext)) {\n mContext.registerReceiver(broad, intentFilter);\n }\n }",
"@Override\r\n protected void onResume() {\n \tsuper.onResume();\r\n \tregisterReceiver(mReceiver, mIntentFilter);\r\n }",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t}",
"private void m5312e() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isReLoginHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"instakk\");\n\t\t}",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t}",
"@Override\n public void onReceive(final Context context, Intent intent) {\n// PPApplicationStatic.logE(\"[IN_BROADCAST] DashClockBroadcastReceiver.onReceive\", \"xxx\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null) {\n dashClockExtension.updateExtension();\n }\n\n //final boolean refresh = (intent == null) || intent.getBooleanExtra(EXTRA_REFRESH, true);\n\n /*PPApplication.startHandlerThreadBroadcast();\n final Handler handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThread\", \"START run - from=DashClockBroadcastReceiver.onReceive\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null)\n {\n dashClockExtension.updateExtension();\n }\n }\n });*/\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n setAlarm(context);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"AlarmCustomerReceiver\", \"zyf onReceive: AlarmCustomerReceiver\");\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"got it\");\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsmsReceiver = new SMSReceiver();\r\n\t\t\t\tIntentFilter filter = new IntentFilter();\r\n\t\t\t\tfilter.addAction(SMS_ACTION);\r\n\t\t\t\tMainActivity.this.registerReceiver(smsReceiver, filter);\r\n\t\t\t}",
"@Override\n protected void onStop() {\n unregisterReceiver(myReceiverActivity);\n super.onStop();\n }",
"@Override\r\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\r\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"android.provider.Telephony.SMS_RECEIVED\");\n registerReceiver(myReciever, filter);\n }",
"@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);\n // setOneTimeAlarm();\n System.out.println(\"inside boot complete\");\n setRepeatingAlarm(context);\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"void intentHasBeenReceivedThroughTheBroadCast(Intent intent);",
"@Override\n public void onResume() {\n super.onResume();\n registerReceiver(manager, intentFilter);\n }",
"@Override\r\n public void onReceive(Context context, Intent intent) {\n Log.e(\"BROADCAST GOT\", intent.toString());\r\n\r\n Intent startLoginScreen = new Intent(context, MainActivity.class);\r\n Bundle b = intent.getExtras();\r\n if (b != null && !b.isEmpty())\r\n startLoginScreen.putExtras(b);\r\n\r\n startLoginScreen.putExtra(\"request\", intent.getAction());\r\n\r\n context.startActivity(startLoginScreen);\r\n\r\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState){\n\t\tmStart.setOnClickListener(new OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t\tmStop.setOnClickListener(new OnClickListener(){\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (receiver!=null) {\n\t\t\t\t\tmActivity.unregisterReceiver(receiver);\n\t\t\t\t\treceiver=null;\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(mActivity,trafficMonitorService.class);\n\t\t\t\tmActivity.stopService(intent);\n\t\t\t\tToast.makeText(mActivity, \"ֹͣ\",Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"private void registerBroadcastReceiver() {\n IntentFilter filter = new IntentFilter();\n filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);\n filter.addAction(Constants.GRAB_ORDER_FAIL_ACTION);\n filter.addAction(Constants.GRAB_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.DISPATCH_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.IS_OPERATING_STATE_ORDER_ACTION);\n filter.addAction(Constants.OPERATED_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_GRABBED_ORDER_ACTION);\n registerReceiver(receiver, filter);\n }",
"@Override\n\t\t\t\t\tpublic Intent myRegisterReceiver(BroadcastReceiver receiver, IntentFilter filter)\n\t\t\t\t\t{\n\t\t\t\t\t\tregisterReceiver(receiver, filter);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tmContext = context;\r\n\t\r\n\t\t\r\n\t\tif(intent.getAction().equals(serviceRecieved)){\r\n\t\t\t Toast.makeText(logActivity, \"BroadCasting Recieved\", Toast.LENGTH_LONG).show();\r\n\t\t\tdialogBoxgenerator();\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n showReminderNotification(context);\n }",
"@Override\r\n\tpublic void run() {\n\t\tIntent intent = new Intent(\"android.intent.action.BOOT_COMPLETED\"); \r\n\t\tresolveInfo = context.getPackageManager().queryBroadcastReceivers(intent, 0);\r\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, OnBootUpAlarmScheduler.class));\n }",
"private void registerBroadcastReceiver(){\n final IntentFilter hceNotificationsFilter = new IntentFilter();\n hceNotificationsFilter.addAction(\"unitap.action.NOTIFY_MAIN_DATA\");\n activity.registerReceiver(hceNotificationsReceiver, hceNotificationsFilter);\n Log.v(\"Registering Receiver\", \"MAIN Receiver\");\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n AppUtils.setMorningAlarm(context);\n }",
"@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n AlarmAlertWakeLock.acquireScreenCpuWakeLock(context);\n Bundle bundle = intent.getExtras();\n final Alarm alarm = (Alarm) bundle.getSerializable(\"alarm\");\n\n Intent alarmActivityIntent = new Intent(context, AlarmAlertActivity.class);\n alarmActivityIntent.putExtra(\"alarm\", alarm);\n\n alarmActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(alarmActivityIntent);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n switch (action) {\n case RoosterConnectionService.NEW_MESSAGE:\n// k = RoosterConnectionService.NEW_MESSAGE;\n String from = intent.getStringExtra(RoosterConnectionService.BUNDLE_FROM_JID);\n String body = intent.getStringExtra(RoosterConnectionService.BUNDLE_MESSAGE_BODY);\n// if(body.toUpperCase().contains(\"V\".toUpperCase()) ) {\n message(body);\n// }\n return;\n\n case RoosterConnectionService.UI_AUTHENTICATED:\n Toast.makeText(getApplicationContext(), \"authenticated\", Toast.LENGTH_SHORT).show();\n// Log.d(TAG,\"Got a broadcast to show the main app window\");\n //Show the main app window\n// showProgress(false);\n// Intent i2 = new Intent(mContext,ContactListActivity.class);\n// startActivity(i2);\n// finish();\n\n break;\n }\n\n\n }",
"@SuppressLint(\"NewApi\")\n\tprivate void registReciver() {\n\t\tmyReciver = new MyReciver();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(\"justlink.action.intent.data_inited_outside_order\");\n\t\tfilter.addAction(\"justlink.action.intent.refresh_searchcount\");\n\t\tgetActivity().registerReceiver(myReciver, filter);\n\t\t\n\t}",
"@SuppressLint(\"LongLogTag\")\n @Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context.getApplicationContext(), \"Alarm Fired\", Toast.LENGTH_SHORT).show();\n Log.d(\"Alarm Receiver\", \"Alarm Receiver Triggered\");\n //Log.i(\"intent name\",intent.toString());\n\n alarmManager = (AlarmManager) context.getSystemService(context.ALARM_SERVICE);\n\n Intent alarmReceiverIntent = new Intent(context.getApplicationContext(),\n AlarmBroadcastReceiver.class);\n PendingIntent alarmIntent = PendingIntent.getBroadcast(context, 0, alarmReceiverIntent, 0);\n\n alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + 30000, alarmIntent);\n\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n IntentFilter filter = new IntentFilter();\n filter.addAction(RSSService.REFRESH);\n registerReceiver(receiver, filter);\n }",
"private void initializeBroadcastReceiver() {\n mIntentFilterForMainActivity = new IntentFilter();\n mIntentFilterForMainActivity.addAction(\"action.intent.action.MYRECEIVER\");\n mLocalReceiverForMainActivity = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n Intent i = new Intent();\n i.setClass(context, MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(i);\n }\n };\n registerReceiver(mLocalReceiverForMainActivity, mIntentFilterForMainActivity);\n\n }",
"@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }",
"public static void sendBroadcast(){\n Intent intent = new Intent(CUSTOM_BROADCAST_ACTION);\n context.sendBroadcast(intent);\n }",
"private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tsdPref.registerOnSharedPreferenceChangeListener(this);\r\n\t\tIntentFilter iFilter = new IntentFilter(BROADCAST_ACTION);\r\n\t\tregisterReceiver(br, iFilter);\r\n\t}",
"private BroadcastReceiverHandler() {\n\n }",
"private void registerBroadcastReceivers(){\n if (!mBufferBroadcastIsRegistered){\n this.registerReceiver(BufferBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_BUFFER));\n mBufferBroadcastIsRegistered=true;\n }\n /** register broadcastReceiver for seekBar*/\n if (!mSeekBarBroadcastIsRegistered) {\n this.registerReceiver(seekBarBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ACTION));\n mSeekBarBroadcastIsRegistered = true;\n }\n /** register broadcastReceiver for alertDialog in case call when audioTale is playing*/\n if(!mADialogBroadcastIsRegistered){\n this.registerReceiver(afterCallBroadcastReceiver,\n new IntentFilter(TalePlay_Service.BROADCAST_ADIALOG));\n mADialogBroadcastIsRegistered = true;\n }\n\n\n }",
"@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tSharedPreferences mode=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tBundle bundle=intent.getExtras();\n\t\tScheduleProtected schedule=bundle.getParcelable(\"Schedule\");\n\t\tString msg=schedule.getLabel();\n\t\tAudioManager audio=(AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n\t\t\n\t\tif(mode.getString(\"response\", null)==\"a\")\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n\t\telse\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n\t\t\n\t\tNotificationManager mNotManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n\t\tString MyText = \"Silent Mode Activated\";\n\t Notification mNotification = new Notification(R.drawable.icon, MyText, System.currentTimeMillis());\n\t \n\t String MyNotifyTitle = \"Diam Leh\";\n String MyNotifiyText = msg+\": Silent Mode Activated\";\n Intent MyIntent = new Intent( context.getApplicationContext(), Main.class);\n \n MyIntent.putExtra(\"extendedTitle\", MyNotifyTitle);\n MyIntent.putExtra(\"extendedText\" , MyNotifiyText);\n PendingIntent StartIntent = PendingIntent.getActivity(context.getApplicationContext(), 0, MyIntent, 0);\n \n mNotification.setLatestEventInfo(context.getApplicationContext(), MyNotifyTitle, MyNotifiyText, StartIntent);\n \n mNotification.ledOnMS = 200; //Set led blink (Off in ms)\n mNotification.ledOffMS = 200; //Set led blink (Off in ms)\n mNotification.ledARGB = 0x9400d3; //Set led color\n \n mNotManager.notify(399940 , mNotification );\n \n\t\tSharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tSharedPreferences.Editor editor=pref.edit();\n\t\teditor.putBoolean(\"Mode\", true);\n\t\teditor.putLong(\"RowID\", schedule.getRowId());\n\t\teditor.commit();\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Intent ringtoneIntent = new Intent(context, AlarmService.class);\n\n //1. get EXTRA VALUE from \"alarm_intent\"\n String AlarmStatus = intent.getExtras().getString(EXTRA);\n Remind chosenRemind = (Remind) intent.getExtras().get(NEW_REMIND);\n\n Log.d(\"SAMN\", \"test: Alarm Status:: \" + AlarmStatus);\n\n if(AlarmStatus.equals(ALARM_OFF)){\n /*set up Diable receiver*/\n //to \"enable the receiver\": override the manifest\n ComponentName receiver = new ComponentName(context, AlarmReceiver.class);\n PackageManager pm = context.getPackageManager();\n ///--- ///\n\n pm.setComponentEnabledSetting(receiver,\n PackageManager.COMPONENT_ENABLED_STATE_DISABLED,\n PackageManager.DONT_KILL_APP);\n\n Log.d(\"COMPONENT SETTING: \", String.valueOf(pm.getComponentEnabledSetting(receiver)));\n }\n /*else {\n Intent alarmIntent = new Intent(context, AlarmActivity.class);\n alarmIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(alarmIntent);\n }*/\n\n // 2. pass it to ringtoneIntent to send to RingtonePlayingService\n ringtoneIntent.putExtra(EXTRA, AlarmStatus);\n ringtoneIntent.putExtra(NEW_REMIND, chosenRemind);\n\n //start service ringtone\n context.startService(ringtoneIntent);\n //explain: ringtoneIntent will be sent to RingtonePlayingService => out Extra Value to notice if ALARM IS ON OR OFF?\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(\"android.intent.action.BOOT_COMPLETED\")) {\n // instatiate an alarm scheduler\n AlarmScheduler alarmScheduler = new AlarmScheduler();\n // instantiate the database\n SQLiteHelperAlarm sqLiteHelper = new SQLiteHelperAlarm(context);\n // get all the alarms stored in the database\n List<Alarm> alarms = sqLiteHelper.getAllAlarms();\n // pass each alarm to the alarmScheduler object\n for (Alarm alarm : alarms) {\n alarmScheduler.setAlarm(context, alarm);\n }\n }\n }",
"public void onButtonMyReceiverIntent(View view) {\n\n Intent myCustomIntent = new Intent(this, CustomIntent.class);\n startActivity(myCustomIntent);\n\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume: Registering for broadcasts\");\n placesBroadcastReceiver = new PlacesBroadcastReceiver(this, this); //we are a place broadcast listener\n AppEventsLogger.activateApp(this);\n }",
"private void registerBroadCastReceiver() {\n // Create a filter with the broadcast intents we are interested in.\n IntentFilter filter = new IntentFilter();\n filter.addAction(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n // Register for broadcasts of interest.\n registerReceiver(mBroadcastReceiver, filter, null, null);\n }",
"public void sendToActivity(String message){\n //In questo metodo \"avviso\" l'app che è arrivato un nuovo dato dal raspberry.\n\n Intent intent = new Intent(\"NOTIFY_ACTIVITY\");\n\n if(message != null){\n intent.putExtra(\"CURRENT_ACTIVITY\",message);\n }\n\n //invio messaggio tramite broadcaster\n broadcast.sendBroadcast(intent);\n\n }",
"private void registerBLEBrocastReceiver() {\n BlueToothReceiver.registerCardStatusMonitoring(mHandler);\n\n //MyBroadcastReceiver\n mBleReceiver = new BlueToothReceiver();\n IntentFilter filter = new IntentFilter();\n filter.addAction(\"android.bluetooth.device.action.ACL_CONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECTED\");\n filter.addAction(\"android.bluetooth.device.action.FOUND\");\n filter.addAction(\"android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED\");\n //register receiver\n registerReceiver(mBleReceiver, filter);\n }",
"@Override\n protected void onPause() {\n super.onPause();\n unregisterReceiver(myReciever);\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n activity.unregisterReceiver(brocast);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n filterDayWise();\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"Broadcast Listened\", \"Service tried to stop\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n context.startForegroundService(new Intent(context, LocationService.class));\n } else {\n context.startService(new Intent(context, LocationService.class));\n }\n\n }",
"@Override\n protected void onResume() {\n super.onResume();\n registerReceiver(mReceiver, mIntentFilter);\n registerLocalService();\n }",
"@Override\n\t\tpublic void finish() {\n\t\t\tunregisterReceiver(mBroadcastReceiver);\n\t\t\tsuper.finish();\n\t\t}",
"@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)\n @Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Время поливать свои растения! \", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n boolean isAlarmOn = Utils.isAlarmOn();\n PollService.setServiceAlarm(MyApplication.getContext(), isAlarmOn);\n }",
"private void setupMsgBroadcastReceiver() {\n broadcastReceiverLoraMsg = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.MSG_RECEIVED\".equals(intent.getAction())) {\n byte[] bytes = intent.getByteArrayExtra(\"com.example.loravisual.MSG\");\n\n String totalNumber = Integer.toString(bytes[11] + (bytes[10] * multipliers[5])); // + correct total message number calculated from two ble transmitted bytes (#msg number in iteration = [11], (#iteration = [10])\n String msg = new String(bytes).substring(0, 10); // msg = header (ble transmitted from board as string\n\n if (colorToggle) {\n msgTextView.setTextColor(getResources().getColor(R.color.colorPrimaryDark, null));\n } else {\n msgTextView.setTextColor(getResources().getColor(R.color.white, null));\n }\n colorToggle = !colorToggle;\n msgTextView.setText(msg + \" (\" + totalNumber + \")\");\n\n if (dbEntries == null) {\n dbEntries = new String[5];\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n } else {\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n databaseHandler.logReceivedTransmission(Integer.toString(experimentNumber), dbEntries);\n dbEntries = null;\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.MSG_RECEIVED\");\n registerReceiver(broadcastReceiverLoraMsg, filter);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Alibi alibi = (Alibi) context.getApplicationContext();\n UserEventManager uem = alibi.getUserEventManager();\n UserEvent event = uem.getCurrentEvent();\n\n if (event == null) {\n Log.d(Alibi.TAG, \"ReminderAlarm: null current event\");\n return;\n }\n\n String msgNotify = getNotificationMessage(event);\n String msgToast = context.getString(R.string.reminder_title) + \"\\n\" +\n msgNotify + \" since \" + event.getNiceStartTime();\n\n setNotification(context, msgNotify);\n remind(context, msgToast);\n }",
"@Override\r\n public void onReceive(Context context, Intent intent) {\n Log.d(TAG, \"onReceive: -->\");\r\n String str = intent.getDataString();\r\n Toast.makeText(context, \"Got brocastcast\" + intent.getStringExtra(\"Extra\"), Toast.LENGTH_SHORT).show();\r\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Intent intent1 = new Intent(context, CoreService.class);\n context.startService(intent1);\n Log.d(TAG, \"broadcast receive\");\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (MainService.ACTION_SYNFINSH_SPORTS.equals(action)) { // 同步 运动模式数据\n initdata();\n dismissLoadingDialog();\n Toast.makeText(getApplicationContext(), getString(R.string.data_refresh_success), Toast.LENGTH_LONG).show(); // 数据刷新成功\n }\n }",
"@Override\n public void onPause() {\n super.onPause();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(receiver);\n }",
"@Override\n public void onReceive(Context arg0, Intent intent) {\n CTSCLog.d(TAG, \"onReceive():\" + \"intent action = \" + intent.getAction());\n if (intent != null\n && intent.getAction().equals(CheckItemBase.NOTIFY_ACTIVITY_ACTION)) {\n mIsNeedPopReboot = false;\n CTSCLog.d(TAG, \"onReceive() reset mIsNeedPopReboot = false\");\n refresh(true, true);\n }\n }",
"public void onReceive(Context context, Intent intent) {\n\t\t\tBundle extras = intent.getExtras();\n\t\t\tString flags = extras != null ? extras.getString(REMINDER_BUNDLE)\n\t\t\t\t\t: \"nothing returned\";\n\t\t\tif (Lullabye.debug) Log.d(tag,\"alarm received \"+flags+\" intent \"+intent);\n\t\t\tif (flags.equals(\"alarm\")) {\n\t\t\t\tif (Lullabye.debug) Log.d(tag, \"starting automatically \");\n\t\t\t\t// if repeat is true, set new alarm in 24 h (86 400seconds)\n\t\t\t\tif (Options.isMalarmRepeat()) {\n\t\t\t\t\tnew Alarm(context, \"alarm\", (86400));\n\t\t\t\t}\n\t\t\t\tLullabye.startplaying();\n\t\t\t} \n\t\t}",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tVibrator v = (Vibrator) context\r\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\r\n\t\tv.vibrate(500);\r\n\r\n\t\t// also display a toast.\r\n\t\tToast.makeText(context, \"Boradcast received successfully\",\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\t}",
"@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tSystem.out.println(\"ALARM CALLED\");\n\t\t\tsendPostRequest();\n\t\t}",
"@Override\n public void onResume()\n {\n super.onResume();\n mReceiver = new WiFiServerBroadCastReciever(mManager, mChannel, this);\n registerReceiver(mReceiver, mIntentFilter);\n\n searchDevices();\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if(\"com.example.brdcst_rec.toast\".equals(intent.getAction())){\n Integer received = intent.getIntExtra(\"com.example.brdcst_rec.text\", -1);\n Intent in = new Intent(context, BrowserActivity.class);\n in.putExtra(\"number\", received);\n context.startActivity(in);\n }\n }",
"@Override \n protected void onPause() {\n\t super.onPause(); \n\t unregisterReceiver(mReceiver); \n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(broadcastReceiver);\n }",
"public void onReceive(Context context, Intent intent) {\n\n Toast.makeText(context, \"Alarm worked.\", Toast.LENGTH_LONG).show();\n final Calendar c = Calendar.getInstance();\n long mHour = c.get(Calendar.HOUR_OF_DAY);\n long mMinute = c.get(Calendar.MINUTE);\n Log.d(\"myTag\", \"Alarm executed at : \" + mHour + \":\" + mMinute);\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String SMS = intent.getExtras().getString(\"sms\");\n Intent SMSReceivedActivityIntent = new Intent(MainActivity.this, SMSReceivedActivity.class);\n SMSReceivedActivityIntent.putExtra(\"SMS\", SMS);\n\n //vibrate & play sound, then start activity\n vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);\n vibrator.vibrate(500);\n try {\n mediaPlayer = MediaPlayer.create(getBaseContext(), R.raw.ding);\n\n Log.d(\"log mediaplayer\", \"mediaplayer is not null\");\n mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mediaPlayer) {\n mediaPlayer.release();\n }\n });\n mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mediaPlayer) {\n mediaPlayer.start();\n }\n });\n\n } catch (Exception e) {\n Log.d(\"debug\", e.getMessage());\n }\n\n startActivity(SMSReceivedActivityIntent);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"TAG\", \"someone called me 3\");\n\n // Explicitly specify that GcmIntentService will handle the intent.\n ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());\n // Start the service, keeping the device awake while it is launching.\n Log.i(\"TAG\", \"someone called me 4\");\n startWakefulService(context, (intent.setComponent(comp)));\n setResultCode(Activity.RESULT_OK);\n Log.i(\"TAG\", \"someone called me 5\");\n\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tIntentFilter fillterwifi = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);\n\t\tregisterReceiver(Receiver, fillterwifi);\n\t}",
"protected void ap() {\n Object object = this.li;\n synchronized (object) {\n if (this.lz != null) {\n return;\n }\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n this.lz = new BroadcastReceiver(){\n\n public void onReceive(Context context, Intent intent) {\n ab.this.d(false);\n }\n };\n this.lp.registerReceiver(this.lz, intentFilter);\n return;\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n Uri alarmsound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);\n\n Intent intent1 = new Intent(context, Reminderku.class);\n intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n TaskStackBuilder taskStackBuilder = TaskStackBuilder.create(context);\n taskStackBuilder.addParentStack(Reminderku.class);\n taskStackBuilder.addNextIntent(intent1);\n\n PendingIntent intent2 = taskStackBuilder.getPendingIntent(1,PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context);\n\n NotificationChannel channel = null;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n channel = new NotificationChannel(\"my_channel_01\",\"hello\", NotificationManager.IMPORTANCE_HIGH);\n }\n\n Notification notification = builder.setContentTitle(\"KitaFit\")\n .setContentText(intent.getStringExtra(\"Message\")).setAutoCancel(true)\n .setSound(alarmsound).setSmallIcon(R.mipmap.ic_launcher_round)\n .setContentIntent(intent2)\n .setChannelId(\"my_channel_01\")\n .build();\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n notificationManager.createNotificationChannel(channel);\n }\n notificationManager.notify(1, notification);\n\n }",
"@Override\n public void onResume() {\n super.onResume();\n IntentFilter intentFilter = new IntentFilter(RESPONSE_SERVICE_ACTION);\n receiver = new ResponseReceiver();\n if (receiver != null) {//register receiver\n LocalBroadcastManager.getInstance(this).registerReceiver(receiver, intentFilter);\n }\n }",
"@Override\r\n\tpublic void onReceive(Context context, Intent intent)\r\n\t{\n\t\tLog.e(\"m\", \"com.airtalkee.receiver onReceive\");\r\n\t\tif (intent.getAction().equals(ACTION_VOICE_LONG_PRESS))\r\n\t\t{\r\n\r\n\t\t\tif (intentFilter == null)\r\n\t\t\t\tintentFilter = new IntentFilter();\r\n\t\t\tintentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);\r\n\t\t\tcontext.registerReceiver(instance, intentFilter);\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_VOICE_UP))\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_KNOB_ADD))\r\n\t\t{\r\n\t\t\tAirSessionControl.getInstance().channelSelect(true);\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_KNOB_SUB))\r\n\t\t{\r\n\t\t\tAirSessionControl.getInstance().channelSelect(false);\r\n\t\t}\r\n\t}",
"public void run() {\n\t\t\t\tInetAddress bAddr = AndyNet.getBroadcastIP(activity);\n\t\t\t\tLog.i(TAG, \"Broadcast Address: \" + bAddr.getHostAddress());\n\t\t\t\tif (bAddr != null) {\n\t\t\t\t\tAndyNet.startBroadcast(AndyMaster.getName(), 0, bAddr);\n\t\t\t\t}\n\n\t\t\t}",
"@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tString action = arg1.getAction();\n\t\t\tmContext = arg0;\n\t\t\t\n\t\t\tif(action.equals(\"com.example.timeshowactivity.OFF\")){\n\t\t\t mDelayFlag = 0;\n\t\t\t //WhetherSendIntent =false;\n\t\t\t setTimeShowState(false);\n\t\t\t Log.i(TAG,\"qiuyaobo onReceive com.example.timeshowactivity.OFF\");\n\t\t\t}else if(action.equals(\"com.example.timeshowactivity.ON\")){\n\t\t\t mDelayFlag = 1;\n\t\t\t\t//WhetherSendIntent =true;\n\t\t\t setTimeShowState(true);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive00com.example.timeshowactivity.ON***\");\n\t\t\t}else if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n\t\t\t\tLog.d(\"ljz\", \"set hall\");\n\t\t\t\t//PowerManager pm = (PowerManager) arg0.getSystemService(Context.POWER_SERVICE);\n\t\t\t\t//pm.setHallSensor(true, 0);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....android.intent.action.BOOT_COMPLETED***\");\n\t\t\t\treturn;\n\t\t }else if (MTK_ACTION_UNREAD_CHANGED.equals(action)){\n\t\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....MTK_ACTION_UNREAD_CHANGED***\");\n\t\t\t\t\t\t\tboolean lidOpen =SystemProperties.getBoolean(\"persist.sys.lidopen\",false);\n\t\t\t\t\t\t\tif(lidOpen){//hal is off ,at the same time a call is arriving,open the hal ,at hal Call interface,hang up the call ,we should display the TimeShow \n\t\t\t\t\t\t\t\t\tmDelayFlag = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tmDelayFlag = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!isIdle()){\n\t\t\t\t\t\t\t\treturn;//when we opened call waiting function ,we hanged up one call ,the other call has been activitied,at this time we cannot update TimeShow actovity if the TimeShow actovity on Background process!\n\t\t\t\t\t\t\t}\n\t\t\t\t\t MainActivity m = MainActivity.getInstance();\n\t\t\t\t\t if(m != null){\n\t\t\t\t\t m.updatetInfo();\n\t }\n\t }\n\t\n\t\t if(!isIdle()){\n\t\t\t\t\t\tIntent updateIncallTouchUi = new Intent(\"UPDATE_INCALLSCREEN_TOUCHUI\");\n\t\t\t\t\t\tmContext.sendBroadcast(updateIncallTouchUi);\n\t\n\t }\n\t\t \n\t\t long milliseconds = SystemClock.elapsedRealtime();\n\t\t long timeSinceLastEvent = milliseconds - mLastReceiveEventTime;\n\t\t mLastReceiveEventTime = milliseconds;\n\t\t mHandler.removeCallbacks(mDelayTimeTask);\n\t\t\t\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ******** flag=\" +mDelayFlag + \" timeSinceLastEvent=\"+timeSinceLastEvent);\n\t\t if(timeSinceLastEvent < DELAY_TIME){\n\t\t\t\t\t\tlong i;\n\t\t\t\t\t\ti= DELAY_TIME - timeSinceLastEvent;\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***timeSinceLastEvent < DELAY_TIME..timeSinceLastEvent=\" +timeSinceLastEvent + \"; DELAY_TIME=\"+DELAY_TIME+\";i=\"+i);\n\t\t mHandler.postDelayed(mDelayTimeTask, DELAY_TIME - timeSinceLastEvent);\n\t\t return;\n\t\t }\n\t\n\t\t\t\tif(mDelayFlag == 0){\n\t\t\t\t\t\tMainActivity m = MainActivity.getInstance();\n\t\t\t\t\t\tLog.i(TAG,\" qiuyaobo onReceive mDelayFlag == 0 m=\" +m);\n\t\t\t\n\t\t\t\t\t\tif(m != null){\n\t\t\t\t\t\t m.finish();\n\t\t\t\t\t\t\t//m.moveTaskToBack(false);\n\t\t\t // m.onBackPressed();\n\t\t\t\t\t\t\t//ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n\t\t\t\t\t\t//\tam.forceStopPackage(\"com.example.timeshowactivity\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(mDelayFlag == 1){\n\t\t\n\t\t /// mTelephonyManager = (TelephonyManager) (mContext.getSystemService(Context.TELEPHONY_SERVICE));//hj\n\t\t // mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); //hj\n\t\t\t\t\n\t\t\t\t\tComponentName cn = new ComponentName(\"com.example.timeshowactivity\",\"com.example.timeshowactivity.MainActivity\");\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tintent.setComponent(cn);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}\n\t\t\t\n\t\t}",
"@Override\r\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tisCancle = true;\r\n\t\t}",
"@Override\n protected void onPause() {\n super.onPause();\n unregisterReceiver(broadcastReceiverDriverLocation);\n }",
"private void registerForBatteryStatus()\n\t{\n\t\tif(!isReceiverRegistered)\n\t\t{\n\t\t\tLogger.D(TAG, \"registerForBatteryStatus async\");\n\t\t\tActivity activity = RhodesActivity.safeGetInstance();\n\t\t\tif(activity != null)\n\t\t\t{\n\t\t\t\tactivity.registerReceiver(this, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));\n\t\t\t\tactivity.registerReceiver(this, new IntentFilter(Intent.ACTION_BATTERY_LOW));\n\t\t\t\tisReceiverRegistered = true;\n\t\t\t}\n\t\t\telse Logger.E(TAG, \"Could not communicate with main Activity\");\n\t\t}\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Broadcast Received\", Toast.LENGTH_LONG).show();\n /*\n first param is the context\n second param is message to display\n third param is the duration to display the message\n */\n }",
"private void registerReceivers() {\r\n\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"UPDATE_ROSTER_MANUALLY\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_Group_Adapter\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"GROUP NEW MESSAGE RECEIVED\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_User_Adapter\"));\r\n\t\tThatItApplication.getApplication().registerReceiver(\r\n\t\t\t\tnew IncomingReceiver(),new IntentFilter(\"Refresh_Adapter\"));\r\n\t}",
"public void mo29430b() {\n Log.w(\"MessageCenter\", \"unregistering MessageCenter's Broadcast Receiver\");\n C1049a.m3996a(this.f9292a).mo4058a((BroadcastReceiver) this.f9298g);\n }",
"@Override\n public void onReceive(Context c, Intent intent) {\n unregisterReceiver(this);\n\n SupplicantState supplicantState = intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE);\n if (supplicantState == (SupplicantState.COMPLETED)) {\n // Wifi is enabled\n scanSSIDsInBackground();\n }\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n\n if (!PPApplicationStatic.getApplicationStarted(true, true))\n return;\n\n Calendar now = Calendar.getInstance();\n int gmtOffset = 0; //TimeZone.getDefault().getRawOffset();\n final long _time = now.getTimeInMillis() + gmtOffset;\n\n final String alarmPackageName = intent.getStringExtra(EXTRA_ALARM_PACKAGE_NAME);\n\n if (EventStatic.getGlobalEventsRunning(context)) {\n final Context appContext = context.getApplicationContext();\n //PPApplication.startHandlerThreadBroadcast(/*\"AlarmClockBroadcastReceiver.onReceive\"*/);\n //final Handler __handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n //__handler.post(new PPApplication.PPHandlerThreadRunnable(context.getApplicationContext()) {\n //__handler.post(() -> {\n Runnable runnable = () -> {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", \"START run - from=AlarmClockBroadcastReceiver.onReceive\");\n\n //Context appContext= appContextWeakRef.get();\n\n //if (appContext != null) {\n PowerManager powerManager = (PowerManager) appContext.getSystemService(Context.POWER_SERVICE);\n PowerManager.WakeLock wakeLock = null;\n try {\n if (powerManager != null) {\n wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, PPApplication.PACKAGE_NAME + \":AlarmClockBroadcastReceiver_onReceive\");\n wakeLock.acquire(10 * 60 * 1000);\n }\n\n// PPApplicationStatic.logE(\"[EVENTS_HANDLER_CALL] AlarmClockBroadcastReceiver.onReceive\", \"sensorType=SENSOR_TYPE_ALARM_CLOCK\");\n EventsHandler eventsHandler = new EventsHandler(appContext);\n eventsHandler.setEventAlarmClockParameters(_time, alarmPackageName);\n eventsHandler.handleEvents(EventsHandler.SENSOR_TYPE_ALARM_CLOCK);\n\n } catch (Exception e) {\n// PPApplicationStatic.logE(\"[IN_EXECUTOR] PPApplication.startHandlerThread\", Log.getStackTraceString(e));\n PPApplicationStatic.recordException(e);\n } finally {\n if ((wakeLock != null) && wakeLock.isHeld()) {\n try {\n wakeLock.release();\n } catch (Exception ignored) {\n }\n }\n }\n //}\n }; //);\n PPApplicationStatic.createEventsHandlerExecutor();\n PPApplication.eventsHandlerExecutor.submit(runnable);\n }\n }",
"@Override\n public void run() {\n Intent intent = new Intent(ACTION);\n intent.putExtra(\"result\", \"baz\");\n mLocalBroadcastManager.sendBroadcast(intent);\n // If desired, stop the service\n// stopSelf();\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n\n if (action.equals(TCSAppInstance.kTCSAppActionsUpdated)) {\n reloadNotifications();\n }\n\n if (action.equals(TCSAppInstance.kTCSAppInstanceActive)) {\n setupBannerItems();\n setupToolbarButtons();\n syncNotifications();\n }\n }"
] | [
"0.74602824",
"0.7256964",
"0.72048163",
"0.7175124",
"0.7175124",
"0.7175124",
"0.7159467",
"0.7159467",
"0.71184826",
"0.71173024",
"0.70962155",
"0.7088813",
"0.70595884",
"0.70221466",
"0.7009449",
"0.6999298",
"0.69851935",
"0.6951621",
"0.6941811",
"0.693865",
"0.69132805",
"0.68736625",
"0.6856744",
"0.6816759",
"0.6809755",
"0.67875296",
"0.6767306",
"0.6765932",
"0.6757963",
"0.6740305",
"0.6713215",
"0.66656166",
"0.6663036",
"0.66615325",
"0.6659733",
"0.6659505",
"0.6654574",
"0.6649627",
"0.6649485",
"0.66470104",
"0.6622469",
"0.6591475",
"0.65840876",
"0.6583925",
"0.65612006",
"0.6560791",
"0.6558052",
"0.6555077",
"0.65515393",
"0.65349853",
"0.6532825",
"0.65152305",
"0.6508108",
"0.64880455",
"0.64873475",
"0.64850956",
"0.64825416",
"0.64785326",
"0.64770293",
"0.6475254",
"0.6458855",
"0.64567304",
"0.64504653",
"0.64450264",
"0.6419391",
"0.6411143",
"0.63893205",
"0.6386572",
"0.6385909",
"0.6383895",
"0.63819414",
"0.63791186",
"0.637839",
"0.6374548",
"0.6371422",
"0.63691914",
"0.636527",
"0.6362438",
"0.63591754",
"0.6355213",
"0.63550174",
"0.6354556",
"0.6345361",
"0.6326946",
"0.6321066",
"0.6319306",
"0.63134056",
"0.63053507",
"0.6304469",
"0.6303401",
"0.63029146",
"0.6301458",
"0.6300742",
"0.6300396",
"0.62905777",
"0.62890553",
"0.6285766",
"0.62842536",
"0.6284224",
"0.62831414",
"0.6281279"
] | 0.0 | -1 |
Constructor for objects of class deal | public deal()
{
player1Hand = 0;
player2Hand = 0;
dealerHand = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DingnedDealManager() {}",
"public Article() {\n\t}",
"public ShopArticle() {\r\n\t\tsuper();\r\n\t}",
"public Dealer()\n {\n\n\n }",
"public Item(){}",
"public Dealer() {\n dealerHand = new Deck();\n }",
"public Article() {\n }",
"private void __sep__Constructors__() {}",
"public Postoj() {}",
"private Item(){}",
"private SingleObject(){}",
"protected abstract void construct();",
"public CD() {}",
"Constructor() {\r\n\t\t \r\n\t }",
"public Household() {\n }",
"Dog(){\n\t\t\n\t\t//I want to create a chemicals object. Inorder to do this, I have to first create a Cardiac obj, then a Cells obj, then a Chemicals object.\n\t\t//I have to create a Chemicals object, to get a chemicals constructor \n\t\tnew Cardiac().new Cells().new Chemicals();\n\t\t\n\t}",
"public Good() {\n }",
"public Deck()\n {\n this(1);\n }",
"public Product() {\n\t}",
"public Item() {\n\t}",
"public Item() {\n\t}",
"public Clade() {}",
"public Dealer(List<Car> owned_cars, HashSet<Integer> leasing_cars, List<Status> leasing_details, String city, String name, Integer budget, int objectId) {\r\n this.owned_cars = owned_cars;\r\n this.leasing_cars = leasing_cars;\r\n this.leasing_details = leasing_details;\r\n this.city = city;\r\n this.name = name;\r\n this.budget = budget;\r\n //this.objectId = objectId;\r\n }",
"public Purp() {\n }",
"public Item() {\n }",
"public Item() {\n }",
"public Product() { }",
"public Product() { }",
"public Product() {\n }",
"public Product() {\n }",
"public Constructor(){\n\t\t\n\t}",
"public Producto() {\r\n }",
"public Department(){}",
"public Achterbahn() {\n }",
"public Bean_article() {\n }",
"private SingleObject()\r\n {\r\n }",
"public Dealer() {\n this(1);\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Cohete() {\n\n\t}",
"public Caso_de_uso () {\n }",
"public Dynamic() {\n }",
"public Dealer()\n {\n super(\"Dealer\");\n }",
"public Item() {}",
"public void constructor() {\n setEdibleAnimals();\n }",
"public CD(){\r\n\t\t\r\n\t}",
"public Sad() {\n }",
"protected Doodler() {\n\t}",
"public Ads() {\n }",
"public Product() {}",
"public PaymentDetails () {\n\t}",
"public Card () {}",
"public Car(){\n\t\t\n\t}",
"public Dog() {\r\n\r\n }",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"protected Product() {\n\t\t\n\t}",
"public Producto (){\n\n }",
"public Pleasure() {\r\n\t\t}",
"public Corso() {\n\n }",
"public DozentPublikation(){}",
"public Commande() {\n }",
"public Equipas() {\r\n\t\t\r\n\t}",
"public Order() {\n\t}",
"protected Animal() {\t\r\n\t}",
"protected Settlement() {\n // empty constructor\n }",
"public Truck(){\n }",
"public DesastreData() { //\r\n\t}",
"public DABeneficios() {\n }",
"public Source(String name, String description, String story, double mass, \n String itemtype, String itemname, String itemdescription, String itemstory, \n double itemmass, double itemnutrition) \n {\n super(name, description, story, mass);\n this.itemtype = itemtype;\n \n this.itemname = itemname;\n this.itemdescription = itemdescription;\n this.itemstory = itemstory; \n this.itemmass = itemmass;\n this.itemnutrition = itemnutrition;\n \n //creates item of the type itemtype, which is specified upon creation of the source\n if(itemtype.equals(\"Drink\")) {new Drink(itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Food\")) {new Food (itemname, itemdescription, itemstory, itemmass, itemnutrition);}\n else if(itemtype.equals(\"Item\")) {item = new Item (itemname, itemdescription, itemstory, itemmass);} \n }",
"public Post() {\n\t\t\n\t}",
"public D() {}",
"public Merchant() {\n\n\t}",
"public OrderItem() {}",
"public Soil()\n\t{\n\n\t}",
"public Pasien() {\r\n }",
"protected Item() {\n }",
"public Post() {\n }",
"public Related() {\n }",
"protected MoneyFactory() {\n\t}",
"protected Product()\n\t{\n\t}",
"public ObjectFactory() {\n\t}",
"public Post(){\n\n }",
"public AllOne() {\n \n }",
"public Ship(){\n\t}",
"public Surgeon() {\n }",
"public DebtorsAgingBean() {\n }",
"public Requisition() {\n\n }",
"public Bike(){\n\t}",
"public Cgg_jur_anticipo(){}",
"public Post()\n {\n }",
"public StoreOwner_Imp() {\n }",
"public ObjectFactory() {\r\n\t}",
"public Banco(){}",
"public Vehicle(){}",
"public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }",
"public Aliases( ) {\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Duke() {\n this.ui = new Ui();\n this.storage = new Storage();\n this.tasks = new TaskList();\n this.parse = new Parser();\n this.lists = new ArrayList<Task>();\n\n }",
"public Order() {\n }",
"public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }",
"private SingleObject(){\n }",
"public TGroupGoods() {\n }"
] | [
"0.68551934",
"0.6225502",
"0.62197334",
"0.62044805",
"0.6144494",
"0.61251336",
"0.6119874",
"0.6119114",
"0.60698855",
"0.60393006",
"0.60004944",
"0.5992871",
"0.598906",
"0.5986169",
"0.59739655",
"0.5967056",
"0.59611017",
"0.594265",
"0.5936167",
"0.59074795",
"0.59074795",
"0.58962256",
"0.5891954",
"0.58861405",
"0.5883649",
"0.5883649",
"0.5878299",
"0.5878299",
"0.5873742",
"0.5873742",
"0.58667135",
"0.5863409",
"0.5863284",
"0.58567244",
"0.5856065",
"0.58489454",
"0.58461034",
"0.58412397",
"0.58407766",
"0.5837224",
"0.58361423",
"0.5833804",
"0.583347",
"0.5828088",
"0.5827329",
"0.582412",
"0.582363",
"0.5822129",
"0.5814465",
"0.5799474",
"0.579643",
"0.5789834",
"0.57858866",
"0.5777394",
"0.5777207",
"0.57749933",
"0.5774407",
"0.57743233",
"0.57740575",
"0.57724345",
"0.5770504",
"0.57675636",
"0.57628393",
"0.5762046",
"0.5759836",
"0.5752786",
"0.57523715",
"0.57503146",
"0.57487404",
"0.5748539",
"0.57388026",
"0.57382",
"0.5737866",
"0.573603",
"0.5724537",
"0.57219005",
"0.5719223",
"0.57128084",
"0.5706191",
"0.57051796",
"0.56986785",
"0.56986445",
"0.5695561",
"0.56906754",
"0.56847227",
"0.5681673",
"0.5672503",
"0.56709635",
"0.56696504",
"0.56681424",
"0.56669545",
"0.56655836",
"0.56655806",
"0.56602937",
"0.5660073",
"0.5659654",
"0.565917",
"0.5657189",
"0.56462365",
"0.5643213",
"0.564227"
] | 0.0 | -1 |
Toggle the logging service | public static void toggleService(Context context, final boolean enabled){
invokeLoggerService(context, enabled ? MainPipeline.ACTION_ENABLE : MainPipeline.ACTION_DISABLE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enableLogging();",
"public void setLogging(boolean logging);",
"public void setLogging(boolean logging){\n this.logging=logging;\n }",
"public void setLogging(boolean logging) {\n\t\tthis.isLogging = logging;\n\t}",
"public void disableLogging();",
"public boolean isLogging();",
"public boolean logging() {\n\treturn logging;\n }",
"public void setLog(boolean log)\n {\n this.log = log;\n }",
"public void setLoggingToFile(boolean loggingToFile) {\n loggingToFileChecked = true;\n this.loggingToFile = loggingToFile;\n }",
"void fixLoggingControls(){\n if((hardware==null || (hardware!=null && !hardware.isOpen())) && playMode!=playMode.PLAYBACK ){ // we can log from live input or from playing file (e.g. after refiltering it)\n loggingButton.setEnabled(false);\n loggingMenuItem.setEnabled(false);\n return;\n }else{\n loggingButton.setEnabled(true);\n loggingMenuItem.setEnabled(true);\n }\n if(!loggingEnabled && playMode==PlayMode.PLAYBACK){\n loggingButton.setText(\"Start Re-logging\");\n loggingMenuItem.setText(\"Start Re-logging\");\n }else if(loggingEnabled){\n loggingButton.setText(\"Stop logging\");\n loggingButton.setSelected(true);\n loggingMenuItem.setText(\"Stop logging data\");\n }else{\n loggingButton.setText(\"Start logging\");\n loggingButton.setSelected(false);\n loggingMenuItem.setText(\"Start logging data\");\n }\n }",
"@Override\n public boolean isUseInOutLogging() {\n return true;\n }",
"public void setLog(boolean log) {\n this.log = log;\n }",
"public void setShowLogging(boolean showLogging) {\n this.showLogging = showLogging;\n }",
"private void stopLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, false);\n\n startService(intent);\n }",
"public void log(boolean log) {\n this.log = log;\n }",
"public void setConsoleLog(boolean isSet) {\r\n consoleLog = isSet;\r\n }",
"public void setLoggingActions(boolean logActions) {\r\n\t\t\tthis.loggingActions = logActions;\r\n\t\t}",
"private void toggleGameLogHandler() {\n ((ChessPanel) this.getParent()).getGameLog().setVisible(\n !((ChessPanel) this.getParent()).getGameLog().isVisible());\n ((ChessPanel) this.getParent()).revalidate();\n }",
"public static void setLogEnabled(boolean enable) {\n mLogEnabled = enable;\n }",
"public void setDataLogging (boolean dataLogging) {\n this.dataLogging = dataLogging;\n }",
"public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"void setLogAbandoned(boolean logAbandoned);",
"@Reference\n public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"@Reference\n public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"public void activateConsoleMode() {\n logger.addHandler(mConsoleHandler);\n }",
"public void enableLogging(Logger logger) {\n m_logger = logger;\n }",
"public void setLoggable(boolean value) {\n this.loggable = value;\n }",
"public boolean isLoggingEnabledNow() {\n return this.decider.isLoggingEnabledNow();\n }",
"public void setLogService(LogService logService) {\r\n this.logService = logService;\r\n }",
"public boolean isShowLogging() {\n return showLogging;\n }",
"public void enableLogCollection(LogCollectionState state);",
"public void setLogEvents(boolean logEvents) {\n mLogEvents = logEvents;\n }",
"default boolean isActivityLoggingEnabled() {\n return false;\n }",
"public void setLoggingToFileChecked(boolean loggingToFileChecked) {\n this.loggingToFileChecked = loggingToFileChecked;\n }",
"public void setLogged(boolean logged) {\n _logged = logged;\n }",
"abstract public LoggingService getLoggingService();",
"public void enableLogging( final Logger logger )\n {\n m_logger = logger;\n }",
"public boolean isLogoffEnabled() \n {\n return configfile.is_logoff_enabled;\n }",
"public void setAuditOn(boolean flag)\n {\n this.setProperty(GUILoggerSeverityProperty.AUDIT, flag);\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"private void setStopped(boolean isStop) {\n if (isStopped != isStop)\n isStopped = isStop;\n\n iLogApplication.stopLoggingMonitoringService();\n }",
"public synchronized boolean isLoggingFeatureEnabled(){\n\t\treturn isLoggingFeatureEnabled;\n\t}",
"public static void enableConsoleLogger(boolean enable){\n enableConsoleLogger = enable;\n }",
"public static void setActivateConsoleLog(boolean activateConsoleLog) {\r\n\t\tLoggerFactory.activateConsoleLog = activateConsoleLog;\r\n\t}",
"private static void setTraceONOFF(String traceONOFF) {\n if (traceONOFF.matches(\"off\")){\n System.out.println(\"Trace is now off\");\n dvm.setTraceONOFF(false);\n }\n else{\n System.out.println(\"Trace is now on\");\n dvm.setTraceONOFF(true);\n }\n }",
"public void enableSDKLog() {\r\n\t\tString path = null;\r\n\t\tpath = Environment.getExternalStorageDirectory().toString() + \"/IcatchWifiCamera_SDK_Log\";\r\n\t\tEnvironment.getExternalStorageDirectory();\r\n\t\tICatchWificamLog.getInstance().setFileLogPath(path);\r\n\t\tLog.d(\"AppStart\", \"path: \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tFile file = new File(path);\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\t\t}\r\n\t\tICatchWificamLog.getInstance().setSystemLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setFileLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setPtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t\tICatchWificamLog.getInstance().setPtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t}",
"public static final void ccSetDoseLog(boolean pxVal){\n cmLogOn=pxVal;\n }",
"private void startLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, true);\n\n startService(intent);\n }",
"@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}",
"public boolean isLoggingEnabled() {\n return !Level.OFF.equals(getLogLevel());\n }",
"public SimpleDatabase setLogging(boolean logging) {\n SimpleDatabase.logging = logging;\n return INSTANCE;\n }",
"public void toggle() {\n if (isOn()) {\n turnOff();\n } else {\n turnOn();\n }\n }",
"public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }",
"public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}",
"public void setLogLater(boolean b) {\n\t\tlogLater = b;\n\t}",
"static public boolean isLogging()\n {\n return GetInstance().m_bLog;\n }",
"public void toggleDebug() {\n\t\tdebug = debug ? false : true;\n\t}",
"public static void turnOffLogBackLogger() {\n\t\tLogger orgHibernateLogger = (Logger) LoggerFactory.getLogger(\"ROOT\");\n\t\tch.qos.logback.classic.Level oldLogLevel = orgHibernateLogger\n\t\t\t\t.getLevel();\n\t\torgHibernateLogger.setLevel(Level.OFF);\n\t}",
"public void turnOn() {\n\t\tOn = true;\n\t}",
"public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}",
"public void toggleStartStop() {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (stateMachine.isStartState() || stateMachine.isFinal()) {\r\n /* download is in idle or stopped state */\r\n DownloadWatchDog.this.startDownloads();\r\n } else {\r\n /* download can be stopped */\r\n DownloadWatchDog.this.stopDownloads();\r\n }\r\n }\r\n }, true);\r\n }",
"public synchronized void changeServiceStatus() {\n\t\tthis.serviced = true;\n\t}",
"public LogCollectionState logCollectionEnabled();",
"public void toggle(){\n isOn = !isOn;\n }",
"@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}",
"void initializeLogging();",
"abstract public void enableLogCollection(LogCollectionState state);",
"public void turn_off () {\n this.on = false;\n }",
"void logoff();",
"public Builder setEnableStackdriverLogging(boolean value) {\n\n enableStackdriverLogging_ = value;\n bitField0_ |= 0x00000008;\n onChanged();\n return this;\n }",
"public static void traceOff() {\r\n\t\ttraceOn = false;\r\n\r\n\t}",
"public void setLogData(boolean enabled) {\n\t\tthis.logData = enabled;\n\t}",
"public void turnOffSystemOutput() {\n if (originalSystemOut != null) {\n System.setOut(originalSystemOut);\n originalSystemOut = null;\n\n // WARNING: It is not possible to reconfigure the logger here! This\n // method is called in the UI thread, so reconfiguring the logger\n // here would mean that the UI thread waits for the logger, which\n // could cause a deadlock.\n }\n }",
"@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}",
"public javax.swing.JToggleButton getLoggingButton() {\n return loggingButton;\n }",
"@Override\n public void onDisable() {\n getLogger().info(\"Successfully disabled.\");\n }",
"public void turn_on () {\n this.on = true;\n }",
"private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"public void setLogTime(boolean logTime) {\n this.logTime = logTime;\n }",
"public boolean isLog()\n\t{\n\t\treturn log;\n\t}",
"public void setUseGlobalService(boolean flag);",
"public static boolean isLogEnabled() {\n return mLogEnabled;\n }",
"public void switchOn();",
"public static void enableHttpLoggingFilter(boolean enabled) {\n HttpLoggingFilter.toggleLogging(enabled);\n }",
"public void onServiceToggleClicked(View v) {\n\t\tboolean on = ((ToggleButton) v).isChecked();\n\t\tif (on) {\n\t\t\tbNotification = true;\n\t\t\tstartAccelService();\n\t\t\tstartGyroService();\n\t\t\tstartMagneService();\n\t\t\tstartLightService();\n\t\t\tdoAccelBindService();\n\t\t\tdoGyroBindService();\n\t\t\tdoMagneBindService();\n\t\t\tdoLightBindService();\n\t\t} else {\n\t\t\tbNotification = false;\n\t\t\tstopAccelService();\n\t\t\tstopGyroService();\n\t\t\tstopMagneService();\n\t\t\tstopLightService();\n\t\t\ttaskCancel();\n\t\t}\n\t\tifNotificationOnChecked();\n\t\tifServiceOnChecked();\n\t}",
"public static Boolean getShowlog()\n\t{\n\t\treturn showlog;\n\t}",
"private void switchMonitor(CompoundButton monitor, boolean isChecked) {\n EditText text = (EditText) findViewById(R.id.statusBox);\n\n if (isChecked && !serviceStarted) {\n text.setText(\"\");\n writeDeviceInfo();\n updateShareIntent();\n startLoggerService();\n } else if (!isChecked && serviceStarted) {\n stopLoggerService();\n updateShareIntent();\n }\n }",
"public static void setLog(java.io.OutputStream out)\n {\n logNull = (out == null);\n UnicastServerRef.callLog.setOutputStream(out);\n }",
"@Override\n public void setLogTracer(LogTracer log) {\n\n }",
"public static void turnOffSysoutLog() {\n\t\tSystem.setOut(new PrintStream(new OutputStream() {\n\t\t\t@Override\n\t\t\tpublic void write(int arg0) throws IOException {\n\t\t\t}\n\t\t}));\n\t}",
"protected void toggleLaser() {\n laserOn = !laserOn;\n }",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"public static boolean isDisableLogging()\n {\n return BaseBoot.getInstance().getGlobalConfig().getConfigProperty\n (DISABLE_LOGGING, DISABLE_LOGGING_DEFAULT).equalsIgnoreCase(\"true\");\n }",
"public void toggleVerbose() {\n\t\tverbose = !verbose;\n\t}",
"@Override\r\n public void turnOn(){\r\n isOn = true;\r\n Reporter.report(this, Reporter.Msg.SWITCHING_ON);\r\n if (isOn){\r\n engageLoads();\r\n }\r\n }",
"public void desactivateConsoleMode() {\n logger.removeHandler(mConsoleHandler);\n }",
"public static boolean debugOff()\r\n {\r\n on = false;\r\n System.out.println(\"Debug Mode Off\");\r\n return on;\r\n }",
"public static void setTrace(boolean traceOn) {\r\n\t\ttrace = traceOn;\r\n\t}",
"public static void setDisableLogging(final boolean disableLogging)\n {\n BaseBoot.getConfiguration().setConfigProperty\n (DISABLE_LOGGING, String.valueOf(disableLogging));\n }",
"public void setLog (Logger log) {\n this.log = log;\n }"
] | [
"0.7245382",
"0.71956176",
"0.69065416",
"0.65918845",
"0.63348323",
"0.63267136",
"0.6308786",
"0.63012654",
"0.6219475",
"0.6201889",
"0.62012905",
"0.61899793",
"0.6183358",
"0.61587495",
"0.61304826",
"0.611888",
"0.60830474",
"0.60772836",
"0.6061643",
"0.5987351",
"0.5957571",
"0.5935838",
"0.5872789",
"0.5872789",
"0.58536994",
"0.5836219",
"0.58322304",
"0.58292204",
"0.5821621",
"0.5818926",
"0.57869107",
"0.575281",
"0.57397604",
"0.5714791",
"0.5706938",
"0.5697644",
"0.56973284",
"0.5673109",
"0.5671004",
"0.5641842",
"0.5640929",
"0.5634677",
"0.56334084",
"0.56181353",
"0.5609298",
"0.5596805",
"0.55926776",
"0.5573166",
"0.55602586",
"0.5548297",
"0.554638",
"0.55425906",
"0.5535806",
"0.55135596",
"0.5510028",
"0.54934686",
"0.5489265",
"0.54876477",
"0.5464936",
"0.54645044",
"0.5460844",
"0.54600805",
"0.54596233",
"0.54527146",
"0.5445516",
"0.5436629",
"0.5426504",
"0.5422317",
"0.5420998",
"0.5412834",
"0.541251",
"0.54099816",
"0.5405862",
"0.54056776",
"0.54047984",
"0.5390731",
"0.5368229",
"0.53670293",
"0.53532827",
"0.53508365",
"0.5347975",
"0.53459245",
"0.53145075",
"0.53099346",
"0.53019613",
"0.5298217",
"0.5295362",
"0.52886164",
"0.52817184",
"0.5281401",
"0.5263502",
"0.525778",
"0.52494717",
"0.5243949",
"0.5243658",
"0.52418303",
"0.5240906",
"0.5235325",
"0.5231616",
"0.5219038"
] | 0.7216134 | 1 |
Ask to export the data from internal memory to SDcard | public static void exportData(Context context){
invokeLoggerService(context, MainPipeline.ACTION_ARCHIVE_DATA);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void exportDB(){\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n\t\tprgUserData.setMessage(getResources().getText(R.string.please_wait_data_dump) );\n\t\tprgUserData.show();\n\n\t\tint myDeviceId = prefs.getInt(\"my_device_id\", 0);\n\t\t// String currentDateTimeString = DateFormat.getDateTimeInstance().format(\"dd-MM-yyyyhh:mm:ssa\");\n\t\tFile sd =new File(Environment.getExternalStorageDirectory().getPath() + \"/vkb_database\");\n\t\tsd.mkdirs();\n\t\tFile data = Environment.getDataDirectory();\n\t\tLog.d(\"dump1\",\"file sd:\"+sd);\n\t\tLog.d(\"dump1\",\"file data:\"+data);\n\t\tFileChannel source=null,sourceSess=null;\n\t\tFileChannel destination=null,destinationSess=null;\n\n\t\tString currentDBPath = \"/data/game.Typing/databases/UT_Marathi\";\n\t\tString currentDBSessPath = \"/data/game.Typing/databases/\"+ApplicationConstants.DATABASE_NAME;\n\n\t\tString backupDBPath = myDeviceId+\"_UT_Users\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\t\tString backupDBSessPath = myDeviceId+\"_UT_Sessions\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\n\t\tFile currentDB = new File(data, currentDBPath);\n\t\tFile currentSessDB = new File(data, currentDBSessPath);\n\n\t\tFile backupDB = new File(sd, backupDBPath);\n\t\tFile backupDBSess = new File(sd, backupDBSessPath);\n\n\t\ttry {\n\t\t\tsource = new FileInputStream(currentDB).getChannel();\n\t\t\tsourceSess = new FileInputStream(currentSessDB).getChannel();\n\n\t\t\tdestination = new FileOutputStream(backupDB).getChannel();\n\t\t\tdestinationSess = new FileOutputStream(backupDBSess).getChannel();\n\n\t\t\tdestination.transferFrom(source, 0, source.size());\n\t\t\tdestinationSess.transferFrom(sourceSess, 0, sourceSess.size());\n\n\t\t\tsource.close();\n\t\t\tsourceSess.close();\n\n\t\t\tdestination.close();\n\t\t\tdestinationSess.close();\n\n\t\t\tToast.makeText(this, \"DB Exported!\", Toast.LENGTH_LONG).show();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tToast.makeText(this, \"DB Exception!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\ttry{\n\t\t\tprgUserData.hide();\n\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onClick(View view) {\n File direct = new File(Environment.getExternalStorageDirectory() + \"/Scrittor_Backup\");\n\n if (!direct.exists()) {\n if (direct.mkdir()) {\n exportDB();\n } else {\n direct.mkdir();\n exportDB();\n }\n }\n exportDB();\n }",
"public static boolean writeSD(String data, String fileName) {\n\n try {\n\n String state = Environment.getExternalStorageState();\n if (state.equals(Environment.MEDIA_MOUNTED)) {\n\n File ext = Environment.getExternalStorageDirectory();\n\n FileOutputStream fos = new FileOutputStream(new File(ext, fileName), true);\n fos.write(data.getBytes());\n fos.close();\n\n return true;\n\n }\n\n return false;\n\n\n } catch (Exception e) {\n\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n\n return false;\n\n }\n\n }",
"@Override\n public void onClick(View v) {\n try {\n File dir = getExternalFilesDir(\"Myfiles\");\n File sdCard = new File(dir, \"myfile.txt\");\n dir.mkdirs();\n\n if(!sdCard.exists()) { //if file doesn't exists\n sdCard.createNewFile();\n }\n\n FileOutputStream fOut = new FileOutputStream(sdCard, true);\n\n fOut.write(txtData.getText().toString().getBytes());\n fOut.close();\n\n Toast.makeText(MainActivity.this, \"Done writing SD 'myfile.txt\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void writeToSDFile() {\n File root = android.os.Environment.getExternalStorageDirectory();\n //Environment.getExternalStoragePublicDirectory()\n File dir = root.getAbsoluteFile();\n // See http://stackoverflow.com/questions/3551821/android-write-to-sd-card-folder\n //dir = new File (root.getAbsolutePath() + \"../extSdCard/FieldImages\"); //wrote to internal directory\n\n File dirnew = new File(dir.getParent());\n File dirfinal = new File(dirnew.getParent() + \"/extSdCard/FieldImages/mydata.txt\");\n Log.d(\"Files\", \"Path: \" + dirfinal.getPath());\n// String path = dirnew.getParent();\n File file[] = new File(dirnew.getParentFile() + \"/extSdCard/FieldImages\").listFiles();\n Log.d(\"Files\", \"Size: \" + file.length);\n for (int i = 0; i < file.length; i++) {\n Log.d(\"Files\", \"FileName:\" + file[i].getName());\n }\n\n// String pathnew = dir.getParent() + \"/legacy\";\n// Log.d(\"Files\", \"Pathnew: \" + pathnew);\n// File fnew = new File(pathnew);\n// File filenew[] = f.listFiles();\n// Log.d(\"Files\", \"Size: \"+ filenew.length);\n// for (int i=0; i < filenew.length; i++)\n// {\n// Log.d(\"Files\", \"FileName:\" + filenew[i].getName());\n// }\n //dir.mkdirs();\n //File file = new File(dir, \"myData.txt\");\n\n// try {\n// FileOutputStream f = new FileOutputStream(dirfinal);\n// PrintWriter pw = new PrintWriter(f);\n// pw.println(\"Hi , How are you\");\n// pw.println(\"Hello\");\n// pw.flush();\n// pw.close();\n// f.close();\n// } catch (FileNotFoundException e) {\n// e.printStackTrace();\n// Log.i(TAG, \"******* File not found. Did you\" +\n// \" add a WRITE_EXTERNAL_STORAGE permission to the manifest?\");\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n\n //Get the text file\n File filetest = dirfinal;\n\n //Read text from file\n StringBuilder text = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(filetest));\n String line;\n\n while ((line = br.readLine()) != null) {\n text.append(line);\n text.append('\\n');\n }\n br.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n Log.i(TAG, \"******* File not found. Did you\" +\n \" add a WRITE_EXTERNAL_STORAGE permission to the manifest?\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Log.v(null,text.toString());\n\n }",
"private void doExport() {\n\t\tSQLiteDatabase db = null;\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tdb = openOrCreateDatabase(MyDbHelper.DATABASE_NAME, SQLiteDatabase.OPEN_READWRITE, null);\n\t\t\tcursor = db.rawQuery(\"SELECT * \" +\n \" FROM \" + LocationTable.TABLE_NAME +\n \" ORDER BY \" + LocationTable.COLUMN_TIMESTAMP + \" ASC\",\n null);\n \n\t\t\tint timestampColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_TIMESTAMP);\n int latitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LATITUDE);\n int longitudeColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_LONGITUDE);\n int accuracyColumnIndex = cursor.getColumnIndexOrThrow(LocationTable.COLUMN_ACCURANCY);\n \n\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\tStringBuffer fileBuf = new StringBuffer();\n\t\t\t\tString beginTimestamp = null;\n\t\t\t\tString endTimestamp = null;\n\t\t\t\tString timestamp = null;\n\t\t\t\tdo {\n\t\t\t\t\ttimestamp = cursor.getString(timestampColumnIndex);\n\t\t\t\t\tif (beginTimestamp == null) {\n\t\t\t\t\t\tbeginTimestamp = timestamp;\n\t\t\t\t\t}\n\t\t\t\t\tdouble latitude = cursor.getDouble(latitudeColumnIndex);\n\t\t\t\t\tdouble longitude = cursor.getDouble(longitudeColumnIndex);\n\t\t\t\t\tdouble accuracy = cursor.getDouble(accuracyColumnIndex);\n\t\t\t\t\tfileBuf.append(sevenSigDigits.format(longitude)+\",\"+sevenSigDigits.format(latitude)+\"\\n\");\n\t\t\t\t} while (cursor.moveToNext());\n\t\t\t\t\n\t\t\t\tendTimestamp = timestamp;\n\t\t\t\t\n\t\t\t\tcloseFileBuf(fileBuf, beginTimestamp, endTimestamp);\n\t\t\t\tString fileContents = fileBuf.toString();\n\t\t\t\tLog.d(ActivityName, fileContents);\n\t\t\t\tFile sdcard_path = Environment.getExternalStorageDirectory();\n\t\t\t\tFile sdDir = new File(sdcard_path, \"GPSLogger\");\n\t\t\t\tsdDir.mkdirs();\n\t\t\t\tFile file = new File(sdDir, zuluFormat(beginTimestamp) + \".kml\");\n\t\t\t\tFileWriter sdWriter = new FileWriter(file, false);\n\t\t\t\tsdWriter.write(fileContents);\n\t\t\t\tsdWriter.close();\n \t\t\tToast.makeText(getBaseContext(),\n \t\t\t\t\t\"Export completed!\",\n \t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\t\"I didn't find any location points in the database, so no KML file was exported.\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t}\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying access the SD card. Make sure your handset is not connected to a computer and the SD card is properly installed\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(),\n\t\t\t\t\t\"Error trying to export: \" + e.getMessage(),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t} finally {\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t\tif (db != null && db.isOpen()) {\n\t\t\t\tdb.close();\n\t\t\t}\n\t\t}\n\t}",
"private void export(){\n //get available number for file name\n int number = getPosition();\n\n //creates the file\n final File file = new File(Environment.getExternalStorageDirectory().getPath() + \"/csv_\" + number + \".csv\");\n\n //creates a output stream and then streams the file to the external storage\n try {\n file.createNewFile();\n FileOutputStream fOut = new FileOutputStream(file);\n OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);\n myOutWriter.append(csvFile.toString());\n\n //closes the writer and stream\n\n myOutWriter.close();\n\n fOut.flush();\n fOut.close();\n\n Toast.makeText(this, \"CSV created\", Toast.LENGTH_LONG).show();\n\n Intent intentShareFile = new Intent(Intent.ACTION_SEND);\n\n //opens the chooser pop-up to choose share function\n if(file.exists()) {\n intentShareFile.setType(\"text/*\");\n intentShareFile.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));\n\n intentShareFile.putExtra(Intent.EXTRA_SUBJECT,\"CSV\");\n intentShareFile.putExtra(Intent.EXTRA_TEXT, \"The exported CSV File\");\n\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n\n startActivity(Intent.createChooser(intentShareFile, \"Share File\"));\n }\n } catch (IOException e) {\n e.printStackTrace();\n Log.d(\"csvError\", e.getMessage());\n }\n }",
"public static boolean exportDB(String path, String dbname) {\n\n try {\n\n File sd = Environment.getExternalStorageDirectory();\n File data = Environment.getDataDirectory();\n File dir = new File(path);\n if (!dir.exists()){\n if (!dir.mkdir()){\n // directory creation failed\n return false;\n }\n }\n if (sd.canWrite()) {\n String currentDBPath= \"//data//\" + \"selfdriving.streaming\"\n + \"//databases//\" + dbname;\n\n File currentDB = new File(data, currentDBPath);\n File backupDB = new File(dir, dbname);\n\n FileChannel src = new FileInputStream(currentDB).getChannel();\n FileChannel dst = new FileOutputStream(backupDB).getChannel();\n dst.transferFrom(src, 0, src.size());\n src.close();\n dst.close();\n return true;\n }\n } catch (Exception e) {\n Log.e(\"DbHelper\", \"Error in exporting database : \" + e.getMessage());\n }\n return false;\n }",
"@Override\n public void onClick(View v) {\n\n writeFile();\n\n File INTERNAL = getFilesDir();\n File EXT_DIR = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File dataDir = Environment.getExternalStorageDirectory();\n\n Log.d(\"FILE\", \"INTERNAL: \" + INTERNAL.getAbsolutePath());\n Log.d(\"FILE\", \"EXTERNAL: \" + EXT_DIR.getAbsolutePath());\n Log.d(\"FILE\", \"DATA: \" + dataDir.getAbsolutePath());\n }",
"@Override\n\t\tpublic boolean onMenuItemClick(MenuItem arg0) {\n\t\t\tif(Environment.getExternalStorageState()!=Environment.MEDIA_MOUNTED){\n\t\t\t\ttry {\n\t\t\t\t\tString name=System.currentTimeMillis()+\".cvs\";\n\t\t\t\t\tFile file=new File(Environment.getExternalStorageDirectory(), name);\n\t\t\t\t\tif(!file.exists()){\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\n\t\t\t\t\tFileOutputStream fos=new FileOutputStream(file);\n\t\t\t\t\tOutputStreamWriter osw=new OutputStreamWriter(fos);\n\t\t\t\t\tBufferedWriter bw=new BufferedWriter(osw);\n\t\t\t\t\tbw.write(\"id,title, content, record_date,remind_time, remind, shake, ring\\r\\n\");\n\t\t\t\t\tCursor cursor=dbService.querydata(null);\n\t\t\t\t\twhile(cursor.moveToNext()){\n\t\t\t\t\t\tbw.write(cursor.getString(0)+\",\"+cursor.getString(1)+\",\"+cursor.getString(2)+\",\"+cursor.getString(3)+\",\"+cursor.getString(4)+\",\"+cursor.getString(5)+\",\"+cursor.getString(6)+\",\"+cursor.getString(7)+\"\\r\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcursor.close();\n\t\t\t\t\tbw.close();\n\t\t\t\t\tosw.close();\n\t\t\t\t\tfos.close();\n\t\t\t\t\tToast.makeText(Main.this, \"导出成功,已保存到sd卡,文件名为\"+name, Toast.LENGTH_LONG).show();\n\t\t\t\t} catch (Exception 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\t\t\n\t\t\t}else{\n\t\t\t\tToast.makeText(Main.this, \"SD存储卡不可用\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"void Writer(String data, String FileName, Context context) {\n FileOutputStream outputStream = null;\n try {\n outputStream = context.openFileOutput(FileName,Context.MODE_PRIVATE);\n outputStream.write(data.getBytes());\n\n } catch (Exception e) {\n e.printStackTrace();\n }finally{\n if (outputStream != null){\n try {\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"void bytetest() {\n byte[] myByteArray = new byte[256];\n for (int i = 0; i < 256; ++i) {\n myByteArray[i] = (byte)i;\n }\n\n Intent writeIntent = new Intent(BGXpressService.ACTION_WRITE_SERIAL_BIN_DATA);\n writeIntent.putExtra(\"value\", myByteArray);\n writeIntent.setClass(mContext, BGXpressService.class);\n writeIntent.putExtra(\"DeviceAddress\", mDeviceAddress);\n startService(writeIntent);\n }",
"public String saveCapturedImagesToSdcard(Bitmap bitmap) {\n\t\tFile destDir = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (!destDir.exists()) {\n\t\t\tdestDir.mkdir();\n\t\t}\n\t\tString filePath = destDir + File.separator + Tattle_Config_Constants.SD_SCREENSHOT_IMAGE_NAME;\n\t\tFile imagePath = new File(filePath);\n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfos = new FileOutputStream(imagePath);\n\t\t\tbitmap.compress(CompressFormat.PNG, 100, fos);\n\t\t\tfos.flush();\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.e(\"GREC\", e.getMessage(), e);\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"GREC\", e.getMessage(), e);\n\t\t}\n\t\treturn destDir.getAbsolutePath();\n\t}",
"private String saveToSdCard() throws IOException {\n\t\tif (!Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_noExternalStorage));\n\t\t}\n\n\t\tStringBuffer whiteBoardFilePath = new StringBuffer(\n\t\t\t\tWHITEBOARD_DATA_FOLDER_PATH);\n\t\twhiteBoardFilePath.append(whiteBoard.id).append(\".dat\");\n\n\t\t// Create the white board file if it doesn't exist.\n\t\tFile whiteBoardFile = new File(whiteBoardFilePath.toString());\n\t\tif (!whiteBoardFile.exists()) {\n\t\t\t// Make sure the path to the file exists.\n\t\t\tnew File(WHITEBOARD_DATA_FOLDER_PATH).mkdirs();\n\n\t\t\tif (!whiteBoardFile.createNewFile()) {\n\t\t\t\tLog.e(TAG, \"Failed to create new white board data file. \"\n\t\t\t\t\t\t+ whiteBoardFilePath.toString());\n\t\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\t\tR.string.error_savingWhiteBoard));\n\t\t\t}\n\t\t}\n\n\t\t// Serialise the white board to the file.\n\t\ttry {\n\t\t\tmDataStore.serializeDataStore(new FileOutputStream(whiteBoardFile));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.e(TAG,\n\t\t\t\t\t\"Failed to write white board data file. \" + e.getMessage());\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_savingWhiteBoard));\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG,\n\t\t\t\t\t\"Failed to write white board data file. \" + e.getMessage());\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_savingWhiteBoard));\n\t\t}\n\t\treturn whiteBoardFile.getAbsolutePath();\n\t}",
"public void saveData(int argLowAlpha, int argHighAlpha, int argLowBeta, int argHighBeta, int argLowGamma, int argMidGamma, int argDelta, int argTheta) {\n\n try {\n File sdCard = Environment.getExternalStorageDirectory();\n File dir = new File(sdCard.getAbsolutePath() + \"/cerebro_files/\");\n dir.mkdirs();\n\n if (fileCountFlag == 0) {\n File[] files = dir.listFiles();\n int numberOfFiles = files.length;\n String index = new Integer(numberOfFiles + 1).toString();\n Toast.makeText(getApplicationContext(), \"Number of files is: \"+index, Toast.LENGTH_SHORT).show();\n filename = \"file\" + index + \".csv\";\n fileCountFlag = 1;\n }\n\n //File file = new File(dir, \"filename1.csv\"+index);\n File file = new File(dir, filename);\n //Toast.makeText(getApplicationContext(), \"init file\",Toast.LENGTH_SHORT).show();\n\n FileOutputStream f = new FileOutputStream(file, true);\n\n //Toast.makeText(getApplicationContext(), \"got output stream\",Toast.LENGTH_SHORT).show();\n\n //String strLowAlpha = new Integer(lowAlpha).toString();\n String strHighAlpha = new Integer(argHighAlpha).toString();\n String strLowBeta = new Integer(argLowBeta).toString();\n String strHighBeta = new Integer(argHighBeta).toString();\n String strLowGamma = new Integer(argLowGamma).toString();\n String strMidGamma = new Integer(argMidGamma).toString();\n String strDelta = new Integer(argDelta).toString();\n String strTheta = new Integer(argTheta).toString();\n\n //string1 = string1 + \"\\n\";\n\n String strCSV = new Integer(argLowAlpha).toString();\n\n strCSV = strCSV+','+strHighAlpha+','+strLowBeta+','+strHighBeta+','+strLowGamma+','+strMidGamma+','+strDelta+','+strTheta+'\\n';\n\n //f.write(string.getBytes());\n //bf.write(passData.getBytes());\n f.write(strCSV.getBytes());\n //Toast.makeText(getApplicationContext(), \"Done writing\",Toast.LENGTH_SHORT).show();\n f.close();\n //Toast.makeText(getApplicationContext(), \"File buffer closed\",Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"failed to write\",Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public OutputStream writeFileInternal(String _fileName) throws IOException\n { // Writes a file to the internal device storage. Takes a filename as a parameter and throws an IOException if failed.\n return context.openFileOutput(_fileName, Context.MODE_PRIVATE);\n }",
"public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"public void saveToSD() {\n sizeOfArrayList = scannedList.size();\n for (int i = 0; i < sizeOfArrayList; i++) {\n String fileName = \"STS\" + \".txt\";//like 2016_01_12.txt\n try {\n File root = new File(Environment.getExternalStorageDirectory() + File.separator + \"ScanToSheet\");\n if (!root.exists()) {\n root.mkdirs();\n }\n File gpxfile = new File(root, fileName);\n FileWriter writer = new FileWriter(gpxfile, true);\n writer.append(\"--------------------------------------------------------\\n\"\n +scannedList.get(i)+\"-\"+listDescOfItem.get(i)\n +\"\\n\"+listNoteOfItem.get(i)+\"\\n--------------------------------------------------------\\n\\n\\n\");\n writer.flush();\n writer.close();\n if(sizeOfArrayList==i+1){\n Snackbar.make(view, sizeOfArrayList+\" item saved to './ScanToSheet/STS.txt'...️\", Snackbar.LENGTH_LONG).show();\n }\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }\n }",
"void export(UtilityDataExportQuery query) throws ApplicationException;",
"private void saveToFileData() {//Context context) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(fileNameData, Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(Data.userData);\n objectOutputStream.close();\n fileOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void rescanSdcard(){\n }",
"private void copyDatabaseToDevice() throws IOException {\n try {\n InputStream input = context.getAssets().open(DB_NAME);\n String outputName = DB_PATH + DB_NAME;\n OutputStream output = new FileOutputStream(outputName);\n\n byte[] buff = new byte[1024];\n int length = input.read(buff);\n\n while(length >0){\n output.write(buff, 0, length);\n length = input.read(buff);\n }\n\n output.flush();\n output.close();\n input.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Test\n public void exportTest1() {\n isl.exportSP();\n SharedPreferences sp = appContext.getSharedPreferences(spName, Context.MODE_PRIVATE);\n assertEquals(5, sp.getInt(\"nr\", 0));\n assertEquals(\"#suiker#smaakmakers#5.0#2.1#GRAMS#\", sp.getString(\"1\", null));\n assertEquals(\"#spruitjes#groente#20.0#3.0#NONE#\", sp.getString(\"3\", null));\n }",
"private void saveToSd(InputStream stream) {\n\t\tString fileName = \"exchange_rates.xml\";\n\n\t\tFile sdCard = android.os.Environment.getExternalStorageDirectory(); \n\t\tFile dir = new File (sdCard.getAbsolutePath() + \"/Android/data/com.douchedata.exchange/files/\");\n\t\tFile file = new File(dir, fileName);\n\t\t\n\t\ttry {\n\t\t\tif ((file.exists() != false))\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\n\t\t\tint len = 0;\n\t\t\twhile ((len = stream.read(buffer)) > 0) {\n\t\t\t\tfos.write(buffer, 0, len);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public File exportData() {\n File zephyrlogFolder = new File(Environment.getExternalStorageDirectory(), \"QuestionnaireActs\");\n\n boolean dirExists = zephyrlogFolder.exists();\n //if the directory doesn't exist, create it\n if (!dirExists) {\n dirExists = zephyrlogFolder.mkdirs();\n //if it still doesn't exist, give up and exit\n if (!dirExists) {\n Toast.makeText(this, \"Could not create ZephyrLogs directory!\", Toast.LENGTH_LONG).show();\n }\n }\n\n\n //create a data file and write into it\n File file = new File(zephyrlogFolder, \"Questionnaire_\"+promptName+\".txt\");\n try {\n FileWriter writer;\n if(!file.exists()){\n boolean created = file.createNewFile();\n if (!created) throw new IOException(\"Could not create data file\");\n writer = new FileWriter(file, true);\n //if this is a new file, write the CSV format at the top\n writer.write(\"Ονοματεπώνυμο: \"+promptName+\"\\n\"+\"Score: \"+myscore+\"\\n\\n\");\n } else {\n writer = new FileWriter(file, true);\n }\n writer.write(\"Ονοματεπώνυμο: \"+promptName+\"\\n\"+\"Score: \"+myscore+\"\\n\\n\");\n writer.close();\n } catch (FileNotFoundException e) {\n Toast.makeText(this, \"Could not create logging file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n Toast.makeText(this, \"Unsupported encoding exception thrown trying to write file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (IOException e) {\n Toast.makeText(this, \"IO Exception trying to write to data file!\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n return file;\n }",
"public void exportMedia(){\r\n \r\n }",
"void export(DataExportOptions options, Pageable pageable, OutputStream outputStream);",
"private void exportFiles()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\t\t\n\t\t// Report String\n\t\t//----------------\n\t\tString reportString = \"Date,Location Latitude, Location Longitude,Vehicle,Description\\n\";\t\n\t\t\n\t\tStringBuilder reportBuilder = new StringBuilder();\n\t\treportBuilder.append(reportString);\n\t\t\n\t\tString objectString = \"\"+ \n\t\t\t\tincident.getDate()+\",\" +\n\t\t\t\tincident.getLatitude() + \",\" +\n\t\t\t\tincident.getLongitude()+\",\" +\n\t\t\t\tincident.getVehicleReg()+\",\" +\n\t\t\t\tincident.getDescription()+\",\" + \"\\n\";\n\t\t\n\t\treportBuilder.append(objectString);\n\t\t\n\t\t// Witnesses String\n\t\t//----------------\n\t\tString witnessString = \"witnessName,witnessEmail,witnessNumber,witnessStatement\\n\";\n\t\t\n\t\tStringBuilder witnessesBuilder = new StringBuilder();\n\t\twitnessesBuilder.append(witnessString);\n\t\t\n\t\tfor(int i=0; i<incident.getWitnesses().size(); i++)\n\t\t{\n\t\t\tobjectString = \"\"+ \n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessName\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessEmail\") + \",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessNumber\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessStatement\")+\",\" + \"\\n\";\n\t\t\t\n\t\t\twitnessesBuilder.append(objectString);\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Create file\n\t\t//===========================================\n\t\t// Incident Report\n\t\t//-------------------------------------------------\n\t\tfinal File reportFile = new File(getFilesDir() + \"/\" + \"incident_report.csv\");\n\t\treportFile.setReadable(true,false);\n\t\t\n\t\tif( reportFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"incident_report.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(reportBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Witnesses file\n\t\t//-------------------------------------------------\n\t\tfinal File witnessesFile = new File(getFilesDir() + \"/\" + \"witnesses.csv\");\n\t\twitnessesFile.setReadable(true,false);\n\t\t\n\t\tif( witnessesFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"witnesses.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(witnessesBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Media files\n\t\t//-------------------------------------------------\t\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(),new GetCallback<ParseObject>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void done(final ParseObject parseIncident, ParseException e) \n\t\t\t{\n\t\t\t\tif(e == null)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Get number of photos attached\n\t\t\t\t\tParseQuery<ParseObject> queryPhotos = parseIncident.getRelation(\"incidentPhotos\").getQuery();\n\t\t\t\t\tqueryPhotos.findInBackground(new FindCallback<ParseObject>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(List<ParseObject> parsePhotos, ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tArrayList<byte[]> bytes = new ArrayList<byte[]>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i<parsePhotos.size(); i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\t\t\tParseFile photo = (ParseFile) parsePhotos.get(i).get(\"photoFile\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbytes.add(photo.getData());\n\t\t\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tphotoFiles = AssetsUtilities.saveIncidentPhoto(ReviewReportActivity.this, bytes);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Video\n\t\t\t\t\t\t\tParseFile parseVideo = (ParseFile) parseIncident.get(\"incidentVideo\");\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(parseVideo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparseVideo.getDataInBackground(new GetDataCallback()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(byte[] data, ParseException e) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(e == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Save file\n\t\t\t\t\t\t\t\t\t\t\tvideoFile = AssetsUtilities.saveIncidentVideo(ReviewReportActivity.this,data);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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}",
"public static void writeFileSdCardFile(String fileName, String writeStr) {\n\n FileOutputStream fout = null;\n try {\n fout = new FileOutputStream(fileName);\n byte[] bytes = writeStr.getBytes();\n\n fout.write(bytes);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fout != null) {\n try {\n fout.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }",
"public void exportarapolice(){\n gettableconteudo();\n conexao.Conectar();\n File f = null;\n try {\n conexao.sql = \"SELECT data, nomefile, arquivo FROM arquivo WHERE data = ?\"; \n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1, id1);\n ResultSet rs = ps.executeQuery(); \n if ( rs.next() ){ \n byte [] bytes = rs.getBytes(\"arquivo\"); \n String nome = rs.getString(\"nomefile\");\n f = new File(\"C:\\\\rubinhosis\\\\exportacoes\\\\\" + nome); \n FileOutputStream fos = new FileOutputStream( f);\n fos.write( bytes ); \n fos.close(); \n }\n rs.close(); \n ps.close(); \n \n \n } catch (SQLException ex) { \n ex.printStackTrace();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n\n}",
"private String storeImage(Bitmap imageData) {\n // get path to external storage (SD card)\n String filePath = null;\n if (imageData != null) {\n\n\n try {\n //boolean s = sdIconStorageDir.mkdirs();\n filePath = Environment.getExternalStorageState()\n + System.currentTimeMillis() + \".jpg\";\n Log.d(\"Donde\", filePath);\n FileOutputStream fileOutputStream = new FileOutputStream(\n filePath);\n\n BufferedOutputStream bos = new BufferedOutputStream(\n fileOutputStream);\n\n // choose another format if PNG doesn't suit you\n imageData.compress(Bitmap.CompressFormat.JPEG, 0, bos);\n\n bos.flush();\n bos.close();\n return filePath;\n } catch (IOException e) {\n return \"fail\";\n }\n } else {\n return \"fail\";\n }\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\tIntent intent = new Intent(); \n\t\t\tintent.setClass(DataStoredActivity.this, FileSdCardActivity.class);\n\t\t\tstartActivity(intent);\n\t\t\t}",
"public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }",
"protected Boolean doInBackground(final String... args) {\n\t\t\t// File dbFile=getDatabasePath(\"excerDB.db\");\n\n\t\t\tFile exportDir = new File(Environment.getExternalStorageDirectory(), \"\");\n\t\t\tif (!exportDir.exists()) {\n\t\t\t\texportDir.mkdirs();\n\t\t\t}\n\t\t\tfile = new File(exportDir, \"MoneyManager.csv\");\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t\tCSVWriter csvWrite = new CSVWriter(new FileWriter(file));\n\t\t\t\tDatabase db = new Database(ExportActivity.this);\n\t\t\t\tList<String[]> mang = new ArrayList<String[]>();\n\t\t\t\tmang = db.exportCSV();\n\t\t\t\tint i = 0;\n\t\t\t\tif (mang != null) {\n\t\t\t\t\twhile (i != mang.size()) {\n\t\t\t\t\t\tcsvWrite.writeNext(mang.get(i));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tcsvWrite.close();\n\t\t\t\t\t// Log.e(\"TAG\",file.toString());\n\t\t\t\t\t/*\n\t\t\t\t\t * get account dia chi email\n\t\t\t\t\t */\n\t\t\t\t\t/*\n\t\t\t\t\t * GetAccount getacc= new GetAccount(); String email =\n\t\t\t\t\t * getacc.getEmail(getApplicationContext()); if\n\t\t\t\t\t * (email!=null) {\n\t\t\t\t\t */\n\t\t\t\t\t/*\n\t\t\t\t\t * Uri u1 = null; u1 = Uri.fromFile(file); Intent sendIntent\n\t\t\t\t\t * = new Intent(Intent.ACTION_SEND);\n\t\t\t\t\t * sendIntent.putExtra(Intent.EXTRA_SUBJECT,\n\t\t\t\t\t * \"Money manager\"+new\n\t\t\t\t\t * LayDate_Month_Yeah().NgayThangNamCurrent());\n\t\t\t\t\t * sendIntent.putExtra(Intent.EXTRA_EMAIL, new String[]\n\t\t\t\t\t * {\"[email protected]\"});\n\t\t\t\t\t * sendIntent.putExtra(Intent.EXTRA_STREAM, u1);\n\t\t\t\t\t * sendIntent.setType(\"text/html\");\n\t\t\t\t\t * startActivity(Intent.createChooser(\n\t\t\t\t\t * sendIntent,\"Check email\"));\n\t\t\t\t\t */\n\t\t\t\t\t// }\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} catch (SQLException sqlEx) {\n\t\t\t\tLog.e(\"ExportDatabase\", sqlEx.getMessage(), sqlEx);\n\t\t\t\treturn false;\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e(\"ExportDatabase\", e.getMessage(), e);\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"protected Boolean doInBackground(final String... args) {\r\n\r\n File dbFile = new File(context.getDatabasePath(DatabaseHelper.DATABASE_NAME).toString());\r\n System.out.println(context.getDatabasePath(DatabaseHelper.DATABASE_NAME.toString()));\r\n File exportDir = new File(Environment.getExternalStorageDirectory(), \"\");\r\n if (!exportDir.exists()) {\r\n exportDir.mkdirs();\r\n }\r\n File file = new File(exportDir, \"LandlordBuddy_DB\");\r\n\r\n try {\r\n file.createNewFile();\r\n this.copyFile(dbFile, file);\r\n return true;\r\n } catch (IOException e) {\r\n Log.e(\"mypck\", e.getMessage(), e);\r\n return false;\r\n }\r\n }",
"public void writeFileToPrivateStorage(int fromFile, String toFile) {\n InputStream is = getApplicationContext().getResources().openRawResource(fromFile);\n int bytes_read;\n byte[] buffer = new byte[4096];\n try {\n FileOutputStream fos = getApplicationContext().openFileOutput(toFile, Context.MODE_PRIVATE);\n\n while ((bytes_read = is.read(buffer)) != -1)\n fos.write(buffer, 0, bytes_read); // write\n\n fos.close();\n is.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void saveImage(Bitmap bitmap, String fileName) {\n File createFolder = new File(Environment.getExternalStorageDirectory(), FILEPATH);\n if (!createFolder.exists())\n createFolder.mkdir();\n\n File output = new File(Environment.getExternalStorageDirectory(),\n FILEPATH + \"/\" + fileName + \".jpg\");\n if (output.exists()) {\n output.delete();\n\n /*Whenever you delete a file, let MediaStore Content Provider knows about it*/\n// getContentResolver().delete(Uri.fromFile(output), null, null);\n }\n\n// System.currentTimeMillis()\n File saveImage = new File(createFolder, fileName + \".jpg\");\n try {\n OutputStream outputStream = new FileOutputStream(saveImage);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n if (saveImage.exists()) {\n /*Whenever you add a file, let MediaStore Content Provider knows about it using*/\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(saveImage)));\n\n\n publishResults(fileName, result);//output.getAbsolutePath()\n Log.v(TAG, fileName + \", size : \" + saveImage.getAbsoluteFile().length());\n }\n } catch (FileNotFoundException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n }\n }",
"public void onClick(View v) {\n try {\n File sdCard = new File(getExternalFilesDir(\"Myfiles\"), \"myfile.txt\");\n\n FileInputStream fIn = new FileInputStream(sdCard);\n InputStreamReader isw = new InputStreamReader(fIn);\n\n byte[] data = new byte[fIn.available()];\n while (fIn.read(data) != -1) { //read until data is done\n }\n txtData.setText(new String(data));\n fIn.close();\n\n Toast.makeText(MainActivity.this, \"Done reading SD 'myfile.txt'\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}",
"public boolean saveDoodle(String name){\n Bitmap bitmap = this.getDrawingCache();\n // Get the path to android storage\n String path = Environment.getExternalStorageDirectory().getAbsolutePath();\n // Make a new file\n File file = new File(path + File.separator + name + \".png\");\n try {\n // If the file doesn't exist\n if(!file.exists()) {\n // Make a new file\n file.createNewFile();\n }\n // Place bitmap into the file\n FileOutputStream ostream = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.PNG, 10, ostream);\n ostream.close();\n return true;\n }\n catch (Exception e) {\n return false;\n }\n }",
"public void saveImageToExternal(String imgName, Bitmap bm) throws IOException {\n String appFolder = \" MashCam\";\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES + appFolder); //Creates app specific folder\n path.mkdirs();\n File imageFile = new File(path, imgName + \".png\"); // Imagename.png\n FileOutputStream out = new FileOutputStream(imageFile);\n try {\n bm.compress(Bitmap.CompressFormat.PNG, 100, out); // Compress Image\n out.flush();\n out.close();\n\n // Tell the media scanner about the new file so that it is\n // immediately available to the user.\n MediaScannerConnection.scanFile(getWindow().getContext(), new String[]{imageFile.getAbsolutePath()}, null, new MediaScannerConnection.OnScanCompletedListener() {\n public void onScanCompleted(String path, Uri uri) {\n Log.i(\"ExternalStorage\", \"Scanned \" + path + \":\");\n Log.i(\"ExternalStorage\", \"-> uri=\" + uri);\n }\n });\n } catch (Exception e) {\n throw new IOException();\n }\n }",
"private void loadFromSdCard() throws IOException {\n\t\tif (!Environment.getExternalStorageState().equals(\n\t\t\t\tEnvironment.MEDIA_MOUNTED)) {\n\t\t\tthrow new IOException(getResources().getString(\n\t\t\t\t\tR.string.error_noExternalStorage));\n\t\t}\n\n\t\tStringBuffer whiteBoardFilePath = new StringBuffer(\n\t\t\t\tWHITEBOARD_DATA_FOLDER_PATH);\n\t\twhiteBoardFilePath.append(whiteBoard.id).append(\".dat\");\n\n\t\ttry {\n\t\t\tmDataStore.deserializeDataStore(new FileInputStream(new File(\n\t\t\t\t\twhiteBoardFilePath.toString())));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not load save file\");\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"I/O error loading save file\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n BackupModel model = backupList.get(position);\n String inPath = Environment.getExternalStorageDirectory() + \"/InsuranceBackup/\";\n String inFile = model.getFileName();\n String outPath = getDatabasePath(\"MyDB1\").toString();\n copyFile(inPath, inFile, outPath);\n }",
"public void saveToFile() throws InterruptedException\n {\n //generate data\n StringBuilder data = new StringBuilder();\n data.append(\"X,Y,Z,GPS,Timestamp\");\n //loop voor de hardcoded data die wordt aangemaakt in de loop.\n for (int i = 0; i < 5; i++)\n {\n Long currentTime = System.currentTimeMillis();\n data.append(\"\\n\" + i + \",\" + i * i + \",\" + (i + i) + \",\" + (i+i+i)*i + \",\" + currentTime);\n TimeUnit.SECONDS.sleep(1);\n }\n\n FileOutputStream fos = null;\n try\n {\n //saving the file into device\n fos = this.mainActivity.openFileOutput(MainActivity.FILE_NAME, Context.MODE_PRIVATE);\n fos.write(data.toString().getBytes());\n mEditText.getText().clear();\n Toast.makeText(this.mainActivity, \"Saved to\" + mainActivity.getFilesDir() + \"/\" + MainActivity.FILE_NAME, Toast.LENGTH_LONG).show();\n }\n catch (FileNotFoundException e)\n {\n e.printStackTrace();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n if (fos != null)\n {\n try\n {\n fos.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }",
"private static String writeToFile(String data, String fileName, Context context) {\n try {\n File documentsPath = new File(context.getExternalFilesDir(null).toString());\n if (!documentsPath.exists()) {\n documentsPath.mkdirs();\n }\n File myExternalFile = new File(documentsPath, fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(myExternalFile);\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n fileOutputStream.close();\n return myExternalFile.getAbsolutePath();\n } catch (IOException e) {\n writeLog(LOG_LEVEL.ERROR, \"File write failed: \" + e.toString());\n }\n return \"\";\n }",
"public void dump_datamemory(String filename)\n {\n Utils.dump(data_memory, filename, DATA_MEMORY_SIZE);\n }",
"private void dumpQuery(ByteArrayOutputStream out) {\n try {\n OutputStream file = new BufferedOutputStream(new FileOutputStream(new File(dumpDir, dataReqFile)));\n file.write(out.toByteArray());\n file.flush();\n file.close();\n } catch (Exception e) {\n try {\n String s = new String(out.toByteArray(), \"utf-8\");\n Log.i(TAG, \"----------------query data begin---------------------\");\n Log.i(TAG, s);\n Log.i(TAG, \"----------------query data end-----------------------\");\n } catch (Exception e2) {\n\n }\n }\n }",
"void saveAs() {\n writeFile.Export();\n }",
"public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }",
"String export(UserDataExportQuery query) throws ApplicationException;",
"private void saveToInternalStorage(Bitmap bitmapImage) {\n String root = Environment.getExternalStorageDirectory().toString();\n File myDir = new File(root + \"/saved_images\");\n if (!myDir.exists()) {\n myDir.mkdirs();\n }\n String fname = \"profile.jpg\";\n File file = new File(myDir, fname);\n if (file.exists()){\n file.delete();\n }\n try {\n FileOutputStream out = new FileOutputStream(file);\n bitmapImage.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n out.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"int[] export();",
"private void m6666x() {\n if (C1424v.m6870a(\"android.permission.WRITE_EXTERNAL_STORAGE\", this)) {\n C0927a.m4982a().mo5050a(new C1306Za(this), 0);\n }\n }",
"@Override\n\t\t\t\tpublic void onClick() {\n\t\t\t\t\tP2PHandler.getInstance().setSdFormat(contact.contactId, contact.contactPassword, sdId);\n\t\t\t\t\tLog.e(\"SDcardId\", \"SDcardId\"+SDcardId);\n\t\t\t\t}",
"public String saveBitmap(Bitmap bitmap){\n String imagePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+ \"/screenshot.png\";\n File mFile = new File(imagePath);\n FileOutputStream outputStream;\n try\n {\n outputStream = new FileOutputStream(mFile);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return imagePath;\n }",
"@Override\n\tpublic void doAction() {\n\t\tString filename = ModuleContext.getInstance().getAppContext().getFilesDir()+\"/dexfile.dex\";\n\t\tDexFileInfoCollecter.getInstance().backsmaliDexFile(filename, dexpath);\n\t\tLogger.log(\"the dexfile data save to =\"+filename);\n\t}",
"@Override\n public void onPause() {\n super.onPause();\n try {\n storeRetrieveData.saveToFile((ArrayList<TaskCollector>) taskCollectors);\n } catch (JSONException | IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void run() {\n try {\n final String filename = Environment.getExternalStorageDirectory().toString() + \"/FeedEx_\"\n + System.currentTimeMillis() + \".opml\";\n\n // OPML.exportToFile(filename);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), String.format(getString(R.string.message_exported_to), filename),\n Toast.LENGTH_LONG).show();\n }\n });\n } catch (Exception e) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), R.string.error_feed_export, Toast.LENGTH_LONG).show();\n }\n });\n }\n }",
"private String saveBitmapToInternalStorage(Bitmap bitmapImage, String imageName){\n\n\t\tContextWrapper cw = new ContextWrapper(getApplicationContext());\n\t\t// path to /data/data/yourapp/app_data/imageDir\n\t\tFile directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\t//readable is just for testing\n\t\t// Create imageDir\n\t\tFile mypath=new File(directory, imageName.replaceFirst(\"/\", \"\")+\".jpg\");\n\n\t\tFileOutputStream fos = null;\n\n\t\ttry { \n\t\t\tfos = new FileOutputStream(mypath);\n\n\t\t\tbitmapImage.compress(Bitmap.CompressFormat.PNG, 100, fos);\n\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\tToast.makeText(getBaseContext(), \"Catch #12:49\", Toast.LENGTH_LONG).show();\n\t\t}\n\n\t\treturn directory.getAbsolutePath();\n\t}",
"public static void saveFile(Context context, byte[] data, String fileName) {\n\t\tFile file = new File(context.getExternalFilesDir(null), fileName);\n\t\ttry {\n\t OutputStream os = new FileOutputStream(file);\n\t os.write(data);\n\t os.close();\n\t } catch (IOException e) {\n\t // Unable to create file, likely because external storage is\n\t // not currently mounted.\n\t Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n\t }\n\t}",
"@Override\n public OutputStream writeFileExternal(String _fileName) throws IOException \n { // Writes a file to the external storage. Takes a filename as a parameter and throws an IOException if failed.\n return new FileOutputStream(externalStoragePath + _fileName);\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tString buf = edit.getText().toString();\n\t\t\t\t\t\tif (\"\".equals(buf)) {\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"你得先输入点东西\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tFileOutputStream fos = openFileOutput(FILE_NAME, Context.MODE_PRIVATE);//专用写内部存储文件的接口\n\t\t\t\t\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\t\t\t\t\tosw.write(buf);\n\t\t\t\t\t\t\tosw.flush();\n\t\t\t\t\t\t\tosw.close();\n\t\t\t\t\t\t\tfos.close();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"保存成功\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t}",
"private void saveData() {\n\t\tdataSaver.save(data);\n\t}",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }",
"private String[] saveFile(Bitmap bmp) {\n FileOutputStream out = null;\n\n // image file name\n String filename = \"foodieroute-\" +\n username + \"-\" +\n System.currentTimeMillis() + \".jpg\";\n\n // get device's PICTURE folder path\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n // PICTURE path + /FoodieRoute Folder.\n File newFolderFromPath = new File(path.toString() + \"/FoodieRoute\");\n\n // check folder existsted, if not, create new folder.\n if (!newFolderFromPath.exists()) {\n newFolderFromPath.mkdir();\n }\n\n File filepathname = new File(newFolderFromPath, filename);\n\n // saving the image into device folder\n try {\n out = new FileOutputStream(filepathname);\n System.out.println(\"elliot: fileoutputstream: \" + out.toString());\n System.out.println(\"elliot: filepathname: \" + filepathname.toString());\n bmp.compress(Bitmap.CompressFormat.JPEG, 100, out); // bmp is your Bitmap instance\n // PNG is a lossless format, the compression factor (100) is ignored\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (out != null) {\n out.close();\n// return Uri.fromFile(getFileStreamPath(filename));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return new String[]{filepathname.toString(), filename};\n }",
"public String saveImage() {\n\t\tFile externalPath = Environment.getExternalStorageDirectory();\n\n\t\t// Create a new folder in SD Card\n\t\tFile dir = new File(externalPath.getAbsolutePath() + \"/\" + DIRECTORY_NAME\n\t\t\t\t+ \"/\");\n\t\tdir.mkdirs();\n\n\t\tString fileName = df.format(Calendar.getInstance().getTime()) + \".png\";\n\t\t// Create a name for the saved image\n\t\tFile file = new File(dir, fileName);\n\t\tString filePath = file.getAbsolutePath();\n\t\ttry {\n\t\t\toutput = new FileOutputStream(file);\n\t\t\t// Compress into png format image from 0% - 100%\n\t\t\tif (bitmap != null) {\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, output);\n\t\t\t}\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tfilePath = \"SORRY, THERE IS AN ERROR WHILE SAVING!\";\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn filePath;\n\t}",
"private void saveItems() {\n PrintWriter writer = null;\n try {\n FileOutputStream fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n fos)));\n\n for (int idx = 0; idx < mAdapter.getItemCount(); idx++) {\n\n writer.println(mAdapter.getItem(idx));\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (null != writer) {\n writer.close();\n }\n }\n }",
"@Override\n public void onClick(View v) {\n File sdCard = Environment.getExternalStorageDirectory().getAbsoluteFile();\n File path = new File(sdCard + \"/easeWave\");\n path.mkdirs();\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"*/*\");\n intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(path));\n startActivity(Intent.createChooser(intent, getActivity().getString(R.string.sendfile)));\n dialog2.dismiss();\n }",
"public void save(View view) {\n String root = Environment.getExternalStorageDirectory().toString();\n File myDir = new File(root + \"/App_images\");\n if (!myDir.exists()) {\n myDir.mkdir();\n }\n // STOP creating directory for images\n Random generator = new Random();\n int n = 10000;\n n = generator.nextInt(n);\n String fname = \"Image-\" + n + \".jpg\";\n File file = new File(myDir, fname);\n if (file.exists()) file.delete();\n try {\n FileOutputStream out = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void copyDataBase() throws IOException {\n InputStream myInput = this.getAssets().open(\"nes.sqlite\");\n // Path to the just created empty db\n\n String outFileName = getApplicationInfo().dataDir + \"/databases/\" + \"nes.sqlite\";\n //String outFileName = \"/data/data/\" +getApplicationContext().getPackageName() + \"/databases/\" + \"nes.sqlite\";\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n\n }\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n //Toast toast = Toast.makeText(getApplicationContext(),\n // \"Creating nes database\",\n // Toast.LENGTH_SHORT);\n //toast.show();\n }",
"public void Write_data() {\n // add-write text into file\n try {\n FileOutputStream fileout=openFileOutput(\"savedata11.txt\", MODE_PRIVATE);\n OutputStreamWriter outputWriter=new OutputStreamWriter(fileout);\n outputWriter.write(Integer.toString(_cnt));\n outputWriter.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void downloadApk(String url) {\n if (UpdateHelper.CheckForSDCard.isSDCardPresent()) {\n\n //check if app has permission to write to the external storage.\n if (EasyPermissions.hasPermissions(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n new DownloadFileHelper(MainActivity.this).execute(url);\n\n } else {\n //If permission is not present request for it.\n EasyPermissions.requestPermissions(MainActivity.this, getString(R.string.write_file), WRITE_REQUEST_CODE, Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n\n }\n }",
"public void copyDataBase() throws IOException{\n try {\n InputStream myInput = context.getAssets().open(DB_NAME);\n String outputFileName = DB_PATH + DB_NAME;\n OutputStream myOutput = new FileOutputStream(outputFileName);\n\n byte[] buffer = new byte[1024];\n int length;\n\n while((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n myOutput.flush();\n myOutput.close();\n myInput.close();\n } catch (Exception e) {\n Log.e(\"tle99 - copyDatabase\", e.getMessage());\n }\n\n }",
"@Override\n public void onClick(View v) {\n byte[] bytes = command.getBytes();\n\n if (sPort != null) {\n\n try {\n sPort.write(bytes, 100000);\n Log.e(LOG_TAG, \"inside write\");\n// mExecutor.submit(mSerialIoManager);\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(LOG_TAG, \"Exception \" + e);\n }\n } else {\n Log.e(LOG_TAG, \"UsbSerialPort is null\");\n }\n }",
"public void exportDbFileToDownloadFoler(final Activity curr_activity){\n buttonImportExportDB.setOnClickListener(\n new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n try {\n app_utils.copyAppDbToDownloadFolder(curr_activity, getApplicationContext(), app_db.getDatabaseName());\n Toast.makeText(MainActivity.this, \"DB File copied to Download folder\", Toast.LENGTH_LONG).show();\n return;\n } catch (IOException e) {\n Toast.makeText(MainActivity.this, \"Error exporting to Download folder\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n }\n );\n }",
"@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tif(filename==null){\n\t\t\t\t\t\t\tcommond.setToast( getApplication().getString(R.string.dilog_digtool_empty));\n\t\t\t\t\t\t}\n\t\t\t\t\t Xlsmake xls=new Xlsmake(xyz);\n\t\t\t\t try {\n xls.toxls(fname);\n commond.setToast( getApplication().getString(R.string.dilog_export_success));\n //Toast.makeText(getApplicationContext(), \"导出成功\", Toast.LENGTH_SHORT).show();\n } catch (RowsExceededException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n } catch (WriteException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n }\n\t\t\t\t}",
"private void exportFile()\n\t{\n\t\ttry\n\t\t{\n\t\t\tdrinkListFileOutput = new BufferedWriter(new FileWriter(drinkListFile));\n\t\t\tdrinkListFileOutput.write(exportDrinkList);//insert string of drinks\n\t\t\tdrinkListFileOutput.close();\n\t\t\tJOptionPane.showMessageDialog(null, \"Successfully saved drinks\");\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.toString();//change this\n\t\t\tJOptionPane.showMessageDialog(null, \"Drink save error: \" + e.toString());//change this);\n\t\t}\n\n\n\n\t}",
"private void copyDataBase() throws IOException {\n InputStream myInput = myContext.getAssets().open(DATABASE_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DATABASE_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }",
"int exportTo(int[] buffer, int from);",
"@Override\n public void onSnapshotReady(Bitmap snapshot) {\n bitmap = snapshot;\n try {\n FileOutputStream out = new FileOutputStream(\"/mnt/sdcard/\"\n + \"MyActivity\"\n + \".png\");\n\n // above \"/mnt ..... png\" => is a storage path (where image will be stored) + name of image you can customize as per your Requirement\n\n bitmap.compress(Bitmap.CompressFormat.PNG, 90, out);\n myBitmap = bitmap;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void flushData()\n {\n try {\n //outputStreamAccelerometer.flush();\n //outputStreamLinear.flush();\n outputStreamAccelerometer.close();\n outputStreamLinear.close();\n\n String paths[] = {fileAccelerometer.getPath(), fileLinear.getPath(), fileSettings.getPath()};\n MediaScannerConnection.scanFile(context, paths, null, this);\n }\n catch(Exception exc)\n {\n Log.e(\"LOGGER_ERROR_FLUSH\", exc.toString());\n exc.printStackTrace();\n }\n }",
"private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(object);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onClick(View v) {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(Environment.getExternalStorageDirectory().getPath() + \"/\" + SAVE_FILENAME);\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"public interface IDataExportService {\n\n /**\n * Exports data for a single user to a temporary file.\n *\n * @param query the query that selects the data to export.\n * @return a unique token for downloading the exported file.\n *\n * @throws ApplicationException if the query execution or file creation fails.\n */\n String export(UserDataExportQuery query) throws ApplicationException;\n\n /**\n * Exports data for a single utility to a file. Any exported data file is replaced.\n *\n * @param query the query that selects the data to export.\n *\n * @throws ApplicationException if the query execution or file creation fails.\n */\n void export(UtilityDataExportQuery query) throws ApplicationException;\n\n}",
"private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}",
"private void copyDataBase() throws IOException {\n\n\t\tInputStream myInput = rssContext.getAssets().open(DATABASE_NAME);\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\n\t\tOutputStream myOutput = new FileOutputStream(outFileName);\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = myInput.read(buffer)) > 0) {\n\t\t\tmyOutput.write(buffer, 0, length);\n\t\t}\n\t\tmyOutput.flush();\n\t\tmyOutput.close();\n\t\tmyInput.close();\n\t}",
"public String saveimage(Bitmap bmp, String file_name) {\n String path = null;\n File filepath = Environment.getExternalStorageDirectory();\n OutputStream output;\n // Create a new folder in SD Card\n\n File dir = new File(filepath.getAbsolutePath()\n + \"/JVHUB/\");\n if (dir.exists() && dir.isDirectory()) {\n // do something here\n\n\n // Create a name for the saved image\n String timeStamp = \"JVHUB_pic\";\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HH_mm_ss\");\n String currentTimeStamp = dateFormat.format(new Date());\n File file = new File(dir, currentTimeStamp + \".png\");\n\n // Show a toast message on successful save\n\n try {\n\n output = new FileOutputStream(file);\n path = file.getAbsolutePath();\n\n // Compress into png format image from 0% - 100%\n bmp.compress(Bitmap.CompressFormat.PNG, 100, output);\n output.flush();\n output.close();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n dir.mkdirs();\n String timeStamp = \"JVHUB_pic\";\n File file = new File(dir, timeStamp + \".png\");\n\n // Show a toast message on successful save\n\n try {\n\n output = new FileOutputStream(file);\n path = file.getAbsolutePath();\n\n // Compress into png format image from 0% - 100%\n bmp.compress(Bitmap.CompressFormat.PNG, 100, output);\n output.flush();\n output.close();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return path;\n }",
"private void saveMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (!varTmpDir.exists()) {\n varTmpDir.createNewFile();\n }\n FileOutputStream fileOut = new FileOutputStream(varTmpDir);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(longTermMemory);\n out.close();\n fileOut.close();\n System.out.println(\"SAVED LONG TERM MEMORIES IN \" + brainLocation);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }",
"private void copyDataBase() throws IOException{\n\n //Open your local db as the input stream\n InputStream myInput = myContext.getAssets().open(DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }",
"private void copyDataBase() throws IOException{\n\n //Open your local db as the input stream\n InputStream myInput = myContext.getAssets().open(DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer))>0){\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }",
"public static void store() {\r\n//\t\tSystem.out.println(\"mar\"+readMAR().getStr());\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Write memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n\t\t\r\n\t\tcontent = readMBR();\r\n\t\tgetBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)] = content.getStr();\r\n\t\tTraceINF.write(\"Write finished.\");\r\n\t}",
"private void updateStatusSDCard(){\n\t\tString status = StorageUtils.getSDcardState();\n\t\tString readOnly = \"\";\n\t\tif (status.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tstatus = Environment.MEDIA_MOUNTED;\n\t\t\treadOnly = getResources().getString(R.string.read_only);\n\t\t}\n\n\t\t// Calculate the space of SDcard\n\t\tif (status.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\ttry {\n\t\t\t\tString path = StorageUtils.getSDcardDir();\n\t\t\t\tStatFs stat = new StatFs(path);\n\t\t\t\tlong blockSize = stat.getBlockSize();\n\t\t\t\tlong totalBlocks = stat.getBlockCount();\n\t\t\t\tlong availableBlocks = stat.getAvailableBlocks();\n\t\t\t\tmSdTotalSpace=formatSize(totalBlocks * blockSize);\n\t\t\t\tmSdAvailableSpace=formatSize(availableBlocks * blockSize) + readOnly;\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tstatus = Environment.MEDIA_REMOVED;\n\t\t\t}\n\t\t}else{\n\t\t\tmSdTotalSpace=getResources().getString(R.string.sd_unavailable);\n\t\t\tmSdAvailableSpace=getResources().getString(R.string.sd_unavailable);\n\t\t}\n\t}",
"private void saveData() {\n }",
"@Override\n public void onClick(View view) {\n if(TextUtils.isEmpty(et_namaFile.getText().toString())){\n et_namaFile.setError(\"Nama File Tidak Boleh Kosong!\");\n Toast.makeText(MainActivity.this, Environment.getExternalStorageDirectory().getPath(), Toast.LENGTH_SHORT).show();\n } else{\n //proses menyimpan file\n String namaFile = et_namaFile.getText().toString() + \".txt\";\n\n File file = new File(\"/storage/11E5-250A\", namaFile);\n\n try{\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(et_isi.getText().toString().getBytes());\n fos.close();\n Toast.makeText(MainActivity.this, \"Data berhasil Di Simpan!\", Toast.LENGTH_SHORT).show();\n } catch (FileNotFoundException e) {\n Toast.makeText(MainActivity.this, \"FileNotFoundException : \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n } catch (IOException e) {\n Toast.makeText(MainActivity.this, \"IOException : \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }\n }",
"private void saveData( ) throws IOException {\n \tString FILENAME = \"data_file\";\n String stringT = Long.toString((SystemClock.elapsedRealtime() - timer.getBase())/1000)+\"\\n\";\n String stringS = textView.getText().toString()+\"\\n\";\n String stringD = Long.toString(System.currentTimeMillis())+\"\\n\";\n FileOutputStream fos;\n\t\ttry {\n\t\t\tfos = openFileOutput(FILENAME, Context.MODE_APPEND); //MODE_APPEND\n\t\t\tfos.write(stringS.getBytes());\n\t\t\tfos.write(stringT.getBytes());\n\t\t\tfos.write(stringD.getBytes());\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"public void save(DataOutputStream dataOut) {\n int i;\n int j;\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n try {\n dataOut.writeDouble(points[i][j].x);\n dataOut.writeDouble(points[i][j].y);\n dataOut.writeDouble(points[i][j].z);\n } catch (IOException e) {\n System.out.println(\"Problem creating file\");\n }\n\n }\n }\n }",
"private void copyDataBase() throws IOException {\n InputStream myInput = myContext.getAssets().open(\"db/\" + DB_NAME);\n\n // Path to the just created empty db\n String outFileName = DB_PATH + DB_NAME;\n\n // Open the empty db as the output stream\n OutputStream myOutput = new FileOutputStream(outFileName);\n\n // transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n // Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n }",
"public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}",
"private static boolean hasWritableSd(Context context){\n File[] paths = context.getExternalFilesDirs(null);\n if(paths.length > 1){\n String state = Environment.getExternalStorageState(paths[1]);\n return state.equals(Environment.MEDIA_MOUNTED);\n }\n return false;\n }",
"public interface ExportFileApi {\n public boolean export(String data);\n}",
"private void copyDataBase() throws IOException {\n\n //Open your local db as the input stream\n InputStream myInput = context.getAssets().open(DATABASE_NAME);\n\n // Path to the just created empty db\n String outFileName = DATABASE_PATH + DATABASE_NAME;\n\n //Open the empty db as the output stream\n OutputStream myOutput = null;\n myOutput = new FileOutputStream(outFileName);\n\n //transfer bytes from the inputfile to the outputfile\n byte[] buffer = new byte[1024];\n int length;\n while ((length = myInput.read(buffer)) > 0) {\n myOutput.write(buffer, 0, length);\n }\n\n //Close the streams\n myOutput.flush();\n myOutput.close();\n myInput.close();\n\n }"
] | [
"0.6551028",
"0.6540627",
"0.63902515",
"0.62812",
"0.61417097",
"0.6074463",
"0.6047224",
"0.58736163",
"0.5822605",
"0.58029824",
"0.57753325",
"0.5758857",
"0.5610596",
"0.55828136",
"0.55776936",
"0.55739367",
"0.5546968",
"0.55360323",
"0.55250424",
"0.5497771",
"0.5496299",
"0.54933345",
"0.54828084",
"0.5460603",
"0.54375714",
"0.54244095",
"0.54242486",
"0.5423961",
"0.53944254",
"0.5387052",
"0.5386231",
"0.5375864",
"0.5363165",
"0.5359925",
"0.5349622",
"0.53481716",
"0.53099394",
"0.53080034",
"0.5302024",
"0.5294895",
"0.5282402",
"0.5277728",
"0.52748007",
"0.52576077",
"0.5250484",
"0.52387583",
"0.5226157",
"0.5218444",
"0.5212748",
"0.5211469",
"0.51983917",
"0.5197231",
"0.519117",
"0.51728773",
"0.5169277",
"0.5167067",
"0.51612496",
"0.5159687",
"0.51514614",
"0.5139647",
"0.5134672",
"0.5132527",
"0.5124139",
"0.51236594",
"0.51201576",
"0.51175624",
"0.51068586",
"0.51062983",
"0.51037836",
"0.5102852",
"0.5094712",
"0.50933486",
"0.50898874",
"0.50855863",
"0.50796616",
"0.5079086",
"0.5073697",
"0.5070152",
"0.50700694",
"0.50694066",
"0.5068641",
"0.50593233",
"0.50591546",
"0.50563383",
"0.5054522",
"0.50535965",
"0.5049821",
"0.5039722",
"0.503744",
"0.503744",
"0.50364643",
"0.503521",
"0.50259376",
"0.50154376",
"0.5002365",
"0.49997464",
"0.4999598",
"0.49962655",
"0.4977835",
"0.49769697",
"0.497684"
] | 0.0 | -1 |
Check if the logging is running | public static final boolean isRunning(Context context){
mIsRunning = MainPipeline.isEnabled(context);
return mIsRunning;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isLogging();",
"static public boolean isLogging()\n {\n return GetInstance().m_bLog;\n }",
"public boolean hasLog() {\r\n\t\treturn hasLog;\r\n\t}",
"private static final boolean isRunning() {\r\n /*\r\n * LogUtil.isRunning : shutdown detected : java.lang.Throwable at\r\n * org.ivoa.util.LogUtil.isRunning(LogUtil.java:151) at\r\n * org.ivoa.util.LogUtil.getLoggerDev(LogUtil.java:177) at\r\n * org.ivoa.web.servlet.BaseServlet.<clinit>(BaseServlet.java:69) at\r\n * sun.misc.Unsafe.ensureClassInitialized(Native Method) at\r\n * sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)\r\n * at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122) at\r\n * java.lang.reflect.Field.acquireFieldAccessor(Field.java:918) at\r\n * java.lang.reflect.Field.getFieldAccessor(Field.java:899) at\r\n * java.lang.reflect.Field.set(Field.java:657) at\r\n * org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1644) at\r\n * org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1524) at\r\n * org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:707) at\r\n * org.apache.catalina.core.StandardContext.stop(StandardContext.java:4557) at\r\n * org.apache.catalina.manager.ManagerServlet.stop(ManagerServlet.java:1298) at\r\n * org.apache.catalina.manager.HTMLManagerServlet.stop(HTMLManagerServlet.java:622) at\r\n * org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:131)\r\n */\r\n if (LOGGING_DIAGNOSTICS && isShutdown) {\r\n if (SystemLogUtil.isDebugEnabled()) {\r\n SystemLogUtil.debug(\"LogUtil.isRunning : shutdown detected : \");\r\n }\r\n }\r\n\r\n return !isShutdown;\r\n }",
"public boolean isShowLogging() {\n return showLogging;\n }",
"public boolean isLoggingEnabledNow() {\n return this.decider.isLoggingEnabledNow();\n }",
"public boolean isLoggable() {\r\n\t\tif (logger == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn logger.isLoggable(level)\r\n\t\t\t\t|| PerformanceLogger.isEnabled();\r\n\t}",
"public static boolean isLogEnabled() {\n return mLogEnabled;\n }",
"public boolean isLog()\n\t{\n\t\treturn log;\n\t}",
"public boolean logging() {\n\treturn logging;\n }",
"public boolean isRunning() {\n return (service != null) && service.isMonitoring();\n }",
"@Override\n\tpublic boolean isAlive() {\n\t\tif(unitList.size()==0) {\n\t\t\tlogger.close();\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}",
"public static boolean isActivateConsoleLog() {\r\n\t\treturn activateConsoleLog;\r\n\t}",
"public boolean isLoggingEnabled() {\n return !Level.OFF.equals(getLogLevel());\n }",
"private boolean isLoggable() {\n return Log.isLoggable(tag, level);\n }",
"public static boolean isRunning()\n {\n synchronized( Lifecycle.class ) {\n return context != null;\n }\n }",
"public static boolean log() {\n\t\tif ((xml == null) || (log == null)) return false;\n\t\treturn log.equals(\"yes\");\n\t}",
"public static boolean loggerIsInitialized() {\r\n\t\treturn loggerIsInitialized;\r\n\t}",
"public boolean isRunning();",
"public boolean isRunning();",
"public boolean isRunning();",
"public boolean isRunning();",
"public boolean isRunning();",
"public boolean isRunning();",
"public boolean isRunning ()\n {\n return server == null ? false : true;\n }",
"public boolean isListenerRunning(){\n\t\tsynchronized (httpServerMutex) {\n\t\t\tif( webServer == null )\n\t\t\t\treturn false;\n\t\t\telse{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}",
"public boolean checklogin() {\n\t\treturn (pref.getBoolean(\"isLog\", false));\n\t}",
"boolean isRunning();",
"boolean isRunning();",
"boolean isRunning();",
"boolean isRunning();",
"boolean isRunning();",
"public static boolean isRunning() {\n return _thd != null && _thd.isAlive();\n }",
"public boolean isRunning(){\r\n try{\r\n List<String> dbNames = mongo.getDatabaseNames();\r\n if(!dbNames.isEmpty()){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } catch (MongoException e){\r\n// e.printStackTrace();\r\n return false;\r\n }\r\n }",
"@Override\n public boolean isopen( )\n {\n return logfile != null && out != null;\n }",
"public boolean isSetLogInfo() {\n return this.LogInfo != null;\n }",
"public boolean isSetLogInfo() {\n return this.LogInfo != null;\n }",
"public boolean isSetLogInfo() {\n return this.LogInfo != null;\n }",
"public boolean isSetLogInfo() {\n return this.LogInfo != null;\n }",
"public boolean isSetLoggers() {\n return this.loggers != null;\n }",
"public boolean isLog4JAvailable() {\n return isLogLibraryAvailable(\"Log4J\", LOGGING_IMPL_LOG4J_LOGGER);\n }",
"boolean isStarted();",
"boolean isStarted();",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"@Override\n public boolean isRunning() {\n if (lumenClient == null || spine == null || !spine.isRunning()) {\n return false;\n } else {\n return true;\n }\n }",
"public synchronized boolean isLoggingFeatureEnabled(){\n\t\treturn isLoggingFeatureEnabled;\n\t}",
"public boolean isRunning()\n\t{\n\t\tif(mBoundService != null){\t// Service already started\n\t\t\tif(mBoundService.testThread != null && mBoundService.testThread.isAlive())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}else{\n\t\t\tLog.v(\"4G Test\", \"mBoundService null not running\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean hasErrorLog() {\n return result.hasErrorLog();\n }",
"private void CheckIfServiceIsRunning() {\n\t\tLog.i(\"Convert\", \"At isRunning?.\");\n\t\tif (eidService.isRunning()) {\n//\t\t\tLog.i(\"Convert\", \"is.\");\n\t\t\tdoBindService();\n\t\t} else {\n\t\t\tLog.i(\"Convert\", \"is not, start it\");\n\t\t\tstartService(new Intent(IDManagement.this, eidService.class));\n\t\t\tdoBindService();\n\t\t}\n\t\tLog.i(\"Convert\", \"Done isRunning.\");\n\t}",
"protected void checkLog() {\n String keyword = \"Connected controllable Agent to the Introscope Enterprise Manager\";\n LogUtils util = utilities.createLogUtils(umAgentConfig.getLogPath(), keyword);\n assertTrue(util.isKeywordInLog());\n\t}",
"public boolean isServiceRunning();",
"@Override\n public boolean isRunning() {\n return isRunning;\n }",
"@Override\n public boolean isRunning() {\n return isRunning;\n }",
"public boolean enabled()\n {\n return binLog != null;\n }",
"public boolean logErrors()\r\n {\r\n return errorLevelHandler.getBoolean();\r\n }",
"boolean isMonitoring();",
"boolean isMonitoring();",
"public static Boolean getShowlog()\n\t{\n\t\treturn showlog;\n\t}",
"public static boolean isMonitoring(){\n\t\treturn ZMonitorManager.getInstance().getMonitorLifecycle().isMonitorStarted();\n\t}",
"public static boolean present (String logMessage) {\n\n\t\t// Add the message if logging is enabled. \n\t\tif (logging) {\n\t\t\ttrail.append(logMessage);\n\t\t}\n\n\t\t// Return whether the logging actually occurred.\n\t\treturn logging;\n\n\t}",
"@Override\n public final boolean isRunning() {\n return (this.running && runningAllowed());\n }",
"public boolean isRunning() { return _timer!=null && _timer.isRunning(); }",
"boolean hasStartingConfig() {\n return startCfg_ != null;\n }",
"public boolean isLoggable() {\n return (FINE >= getLevel());\n }",
"public boolean isRunning()\n {\n\n // TODO Auto-generated method stub\n return !started || running;\n }",
"private boolean isDistributedLogReplay(Configuration conf) {\n return false;\n }",
"public boolean isRunning() {\n \t\tif (localMonitor == null) {\n\t\t\treturn localMonitor.isRunning();\n \t\t}\n \n \t\treturn localMonitor.isRunning();\n \t}",
"public boolean isRunning() {\n return isRunning;\n }",
"public static boolean isAuditEnabled() {\n\n return debugLogger.isInfoEnabled();\n }",
"@Override\r\n public boolean isRunning()\r\n {\n return initialized;\r\n }",
"public boolean isRunning() {\n return this.runningThread != null && !serverSocket.isClosed();\n }",
"public void enableLogging();",
"public boolean isRunning()\n\t{\n\t\treturn updateTimer.isRunning();\n\t}",
"protected final boolean isRunning() {\n\t\treturn _running;\n\t}",
"private boolean checkServiceIsRunning(){\r\n if (CurrentLocationUtil.isRunning()){\r\n doBindService();\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }",
"@Override\n public boolean isRunning() {\n return running;\n }",
"private boolean isMyServiceRunning() {\n\t ActivityManager manager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n\t if (\"com.example.MyService\".equals(service.service.getClassName())) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t}",
"public boolean iAmRunning();",
"public static boolean isTrace() {\n return getInstance().trace;\n }",
"public boolean isConfigLoggable() {\n return logger.isLoggable(Level.CONFIG);\n }",
"public boolean isStarted()\n\t{\n\t\treturn isStarted;\n\t}",
"public boolean isRunning() {\r\n\t\treturn __flagRunning;\r\n\t}",
"public boolean isRunning() {\n\t\treturn !loopTask.stop;\n\t}",
"public boolean isStarted() {\n \t\treturn isStarted;\n \t}",
"public synchronized static boolean isServiceRunning(){\n return prefs.getBoolean(IS_SERVICE_RUNNING, false);\n }",
"public boolean checkEngineStatus(){\r\n return isEngineRunning;\r\n }",
"public boolean hasScriptRun() {\n return scriptHistory != null && scriptHistory.isRan();\n }",
"public boolean isRunning(){\n return isRunning;\n }",
"public boolean isStarted() {\n\t\treturn started.get();\n\t}",
"public boolean isRunning() {\n\t\treturn isRunning;\n\t}",
"boolean isMonitoringTerminated();",
"boolean hasStartingInfo();",
"private static boolean hasConsoleHandler(Logger logger) {\n\n /*\n * [#18277] Add null check of logger.getHandlers() because the Resin\n * app server's implementation of logging can return null instead of an\n * empty array.\n */\n Handler[] handlers = logger.getHandlers();\n if (handlers == null) {\n return false;\n }\n\n for (Handler h : handlers) {\n if (h instanceof java.util.logging.ConsoleHandler) {\n return true;\n }\n }\n\n return false;\n }",
"public void setConsoleLog(boolean isSet) {\r\n consoleLog = isSet;\r\n }",
"boolean isDaemon();",
"public final boolean isRunning() {\n return running;\n }",
"public boolean isRunning() {\n return running;\n }",
"public boolean isRunning() {\n return running;\n }",
"public static boolean isDisableLogging()\n {\n return BaseBoot.getInstance().getGlobalConfig().getConfigProperty\n (DISABLE_LOGGING, DISABLE_LOGGING_DEFAULT).equalsIgnoreCase(\"true\");\n }",
"public boolean isInfoLoggingOn() {\n return verbose || !quiet;\n }",
"public static boolean isLogged() {\n\t\treturn \"1\".equals(MemberSessionFacade.getAttribute(ConfigKeys.LOGGED));\n//\t\treturn \"1\".equals(ControllerUtils.getCookie(ConfigKeys.LOGGED));\n\t}"
] | [
"0.76012343",
"0.75634074",
"0.69980425",
"0.67798406",
"0.6749174",
"0.6723703",
"0.6603144",
"0.657219",
"0.6538202",
"0.6530271",
"0.64771765",
"0.6444357",
"0.6377551",
"0.63642925",
"0.6323985",
"0.6305862",
"0.6295134",
"0.6283867",
"0.6259069",
"0.6259069",
"0.6259069",
"0.6259069",
"0.6259069",
"0.6259069",
"0.62566876",
"0.62497085",
"0.62150705",
"0.61845446",
"0.61845446",
"0.61845446",
"0.61845446",
"0.61845446",
"0.6156041",
"0.615191",
"0.6151425",
"0.6142856",
"0.6142856",
"0.6142856",
"0.6142856",
"0.61395085",
"0.6137661",
"0.61243093",
"0.61243093",
"0.61237127",
"0.6122691",
"0.60739666",
"0.6071747",
"0.60605264",
"0.60527855",
"0.5967962",
"0.59498173",
"0.5945003",
"0.5945003",
"0.59338623",
"0.59276164",
"0.5902645",
"0.5902645",
"0.58993894",
"0.58868164",
"0.587864",
"0.58659214",
"0.58635575",
"0.5859896",
"0.58584356",
"0.5829155",
"0.582229",
"0.58065724",
"0.5792828",
"0.5792422",
"0.5790641",
"0.5785882",
"0.5779748",
"0.57785106",
"0.5772417",
"0.5759122",
"0.57564807",
"0.5750042",
"0.57493144",
"0.5738678",
"0.5737237",
"0.5734202",
"0.5732246",
"0.5727334",
"0.5726692",
"0.5718291",
"0.5713816",
"0.5712875",
"0.57120836",
"0.5704693",
"0.5703275",
"0.57022554",
"0.5698906",
"0.56961393",
"0.5696127",
"0.5694287",
"0.56836104",
"0.56767887",
"0.56767887",
"0.567565",
"0.5672195",
"0.56711245"
] | 0.0 | -1 |
Notify the record framework that the data has been broadcast. | public static void sendEventBoradcast(Context context, final String actionPayload, final String data){
if(TextUtils.isEmpty(actionPayload)){
throw new IllegalArgumentException("Invalid action payload");
}
Intent intent = new Intent();
intent.setAction(CUSTOM_INTENT_ACTION);
intent.putExtra("APPLICATION_ACTION", actionPayload);
if(!TextUtils.isEmpty(data)){
intent.putExtra("APPLICATION_DATA", data);
}
context.sendBroadcast(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sendEntryDataBroadcast() {\n Log.v(TAG, recordingEntry + \" == recordingENtry\");\n Intent i = new Intent();\n i.setAction(IntentFilterNames.ENTRY_DATA_RECEIVED);\n i.putExtra(IntentFilterNames.ENTRY_DATA, journalEntryController.getEntry());\n sendBroadcast(i);\n }",
"public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }",
"public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}",
"public void broadcast(Object msg);",
"public void run() {\n\t\t\t\tInetAddress bAddr = AndyNet.getBroadcastIP(activity);\n\t\t\t\tLog.i(TAG, \"Broadcast Address: \" + bAddr.getHostAddress());\n\t\t\t\tif (bAddr != null) {\n\t\t\t\t\tAndyNet.startBroadcast(AndyMaster.getName(), 0, bAddr);\n\t\t\t\t}\n\n\t\t\t}",
"private void broadcast() {\n for (int key : bootstrapMap.keySet()) {\n bootstrapMap.get(key).getBroadcastView().show(Colors.BLUE + gameService.getCurrentPlayer().getName() + Colors.NOCOLOR, lastAnswer);\n }\n gameService.upDateCurrentPlayer();\n }",
"public static void sendBroadcast(){\n Intent intent = new Intent(CUSTOM_BROADCAST_ACTION);\n context.sendBroadcast(intent);\n }",
"public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}",
"public void dataSent(LLRPDataSentEvent event);",
"public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }",
"public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}",
"public abstract boolean broadcast() throws IOException;",
"private void broadcastData(String data, User currentUser) throws IOException {\n Set<User> keySet = connectedUsers.keySet();\n int count = 0;\n\n for (User temp : keySet) {\n if (temp.equals(currentUser)) {\n continue;\n }\n\n SocketChannel socketChannel = connectedUsers.get(temp);\n OperationHandler.sendData(socketChannel, currentUser.getUserName() + \": \" + data);\n count++;\n }\n\n // Send feedback to the user.\n SocketChannel socketChannel = connectedUsers.get(currentUser);\n OperationHandler.sendData(socketChannel, String.format(Constants.MESSAGE_SENT, count));\n }",
"public void broadcast(PacketHandle packet) {\n super.broadcast(packet);\n }",
"public interface MyBroadcastListener {\n void receivedBroadcast();\n }",
"private void reportData() {\n getSender().tell(new GameRoomDataMessage(gameRoomName, capacity, players), this.getSelf());\n }",
"public void notifyNotifyPresenceReceived(Friend lf);",
"@Override\r\n\t\t\tpublic void broadcast(ID source, ID target, Boolean hit) {\n\t\t\t\t\r\n\t\t\t}",
"public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}",
"public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }",
"boolean notifySchedule(InetAddress address, NetRecordingEntry spec);",
"public void broadcast(byte[] data)\n\t{\n\t\tfor(Connection c : CLIENTS)\n\t\t{\n\t\t\tsend(new Packet(data, c.getAddress(), c.getPort()));\n\t\t}\n\t}",
"@Override\n public void onConnected(Bundle bundle) {\n Wearable.DataApi.addListener(googleApiClient, this);\n }",
"@Override\n public void onData(SocketIOClient client, Message data, AckRequest ackRequest) {\n data = new Message(\"hello i'm server\");\n //yuyuenamespace.getBroadcastOperations().sendEvent(\"message\", data);\n }",
"void fireOnMessage(QRecord qr);",
"@Override\n public void broadcastBlock(final Block block) {}",
"public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}",
"@Override\n\tpublic void run() {\n\t\tkafkaProducer.send(record);\n\t\tkafkaProducer.close();\n\t}",
"public void setBroadcast(boolean broadcast) {\n this.broadcast = broadcast;\n }",
"public void setBroadcast(boolean broadcast) {\r\n this.broadcast = broadcast;\r\n }",
"private void broadcast(ArrayList<Integer> update){\n for (Player p : players.values()){\n p.sendModel(update);\n }\n }",
"@Override\n public void notifyAppointmentUpdated( int nIdAppointment )\n {\n }",
"void notifyWrite();",
"private void notifyOnBinaryReceived(byte[] data) {\n synchronized (globalLock) {\n if (isRunning) {\n onBinaryReceived(data);\n }\n }\n }",
"public void broadcast(CommonPacket packet) {\n super.broadcast(packet);\n }",
"public boolean isBroadcast() {\r\n return broadcast;\r\n }",
"void update(Subscriber record);",
"@Override\n public void onConnected(@Nullable Bundle bundle) {\n readPreviousStoredDataAPI();\n Wearable.DataApi.addListener(mGoogleApiClient, this);\n }",
"public interface ReceiverObserver {\n\n void update(DataNotification notification);\n}",
"private void sendClientsChangedBroadcast() {\n Intent intent = new Intent(WifiHotspotManager.WIFI_HOTSPOT_CLIENTS_CHANGED_ACTION);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);\n mContext.sendBroadcastAsUser(intent, UserHandle.ALL);\n }",
"private void notifyOnPingReceived(byte[] data) {\n synchronized (globalLock) {\n if (isRunning) {\n onPingReceived(data);\n }\n }\n }",
"private void sendBroadcast(){\n if (temp != -1){\n Intent intent = new Intent(\"com.example.brdcst_rec.toast\");\n intent.putExtra(\"com.example.brdcst_rec.text\", temp);\n sendOrderedBroadcast(intent, null);\n }\n else{\n Toast.makeText(this, \"No Option Selected!\", Toast.LENGTH_SHORT).show();\n }\n }",
"private void broadcastReadyAction() {\n Log.d(TAG, \"broadcastReadyAction start\");\n final Intent intent = new Intent();\n intent.setAction(BeaconsMonitoringService.SERVICE_READY_ACTION);\n getBaseContext().sendBroadcast(intent);\n Log.d(TAG, \"broadcastReadyAction end\");\n }",
"public void rebroadcastLastEvent()\n\t{\n\t\tif (lastWasClearEvent)\n\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\tlistener.nowPlayingSongCleared(lastEvent);\n\t\telse\n\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\tlistener.nowPlayingSongSet(lastEvent);\n\t}",
"void onStartRecord();",
"public void notifyUpdate(String publicID) {\n }",
"@Override\n\tpublic void onNotify(EventData data) {\n\t\tEchoResponseEventData echoData = (EchoResponseEventData) data;\n\t\tSocket connection = echoData.getPacket().getConnection();\n\n\t\ttry {\n\t\t\tDataOutputStream dos = new DataOutputStream(\n\t\t\t\t\tconnection.getOutputStream());\n\t\t\tdos.writeUTF(echoData.getPacket().getMessage());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public synchronized void tellAt(){\n\t\tnotifyAll();\n\t}",
"@Override\n\tpublic synchronized void sendBroadcast(Broadcast b) {\n\t\tif (typesQueue != null && !typesQueue.isEmpty())\n\t\t{\n\t\t\tif(typesQueue.containsKey(b.getClass()) && !typesQueue.get(b.getClass()).isEmpty())\n\t\t\t{\n\t\t\t\tif(subscribersMessages!=null)\n\t\t\t\t{\n\t\t\t\t\tfor (Subscriber s : typesQueue.get(b.getClass())) {\n\t\t\t\t\t\tsubscribersMessages.get(s).add(b);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnotifyAll();\n\t}",
"public void notifyListener() {\n\t\tbuffer.putInt(1);\n\t\tbuffer.flip();\n\t\tsocketLock.lock();\n\t\ttry {\n\t\t\tnotifyChannel.write(buffer);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"[Turing Server] Non è stato possibile notificare il client.\");\n\t\t}\n\t\tsocketLock.unlock();\n\t\tbuffer.clear();\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"i m in Broadcast recive\", \"i m in Broadcast recive\");\n Double latitude = intent.getDoubleExtra(\"latitude\",0.0);\n Double longitude = intent.getDoubleExtra(\"longitude\",0.0);\n int pendingPoints = intent.getIntExtra(\"pendingPoints\",0);\n String timeStamp = intent.getStringExtra(\"lastUpdated\");\n boolean isBulkUpload = intent.getBooleanExtra(\"isBulkUpload\",false);\n\n\n textViewLastUpdatedTime.setText(\"Last Updated On: \"+timeStamp);\n textViewPointsCount.setText(\"Pending Points: \"+pendingPoints);\n if(getAddress(latitude,longitude).isEmpty()){\n textview_tracking_updates.setText(\"Updating Details: \\n\"+latitude+\" / \"+longitude );\n }else{\n textview_tracking_updates.setText(\"Updating Details: \\n\\nLast Updated Location is : \"+getAddress(latitude,longitude));\n }\n\n\n }",
"public void beginBroadcast() {\n updateNewsMessages();\n setDelay(getConfigUtil().getDelay());\n setNewsTask(initiateNewsTask(getNewsMessages().listIterator()));\n }",
"void intentHasBeenReceivedThroughTheBroadCast(Intent intent);",
"@Override\n\t\t\t\tpublic void notifyReceived(LinphoneCore lc, LinphoneCall call,\n\t\t\t\t\t\tLinphoneAddress from, byte[] event) {\n\t\t\t\t\t\n\t\t\t\t}",
"public void mo5976m() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.android.activity.SoundRecorder.MARKRECEIVER\");\n registerReceiver(this.f5430ma, intentFilter);\n }",
"public boolean isBroadcast() {\r\n \t\treturn (broadcast != null);\r\n \t}",
"public void run()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\t// Get a broadcast\n\t\t\tString str = sc.nextLine();\n\t\t\t\n\t\t\t// Split the data into its elements\n\t\t\tString[] parts = str.split(\"\\0\");\n\t\t\t\n\t\t\t// Determine whether something new is playing, or nothing is playing\n\t\t\t// If nothing is playing ...\n\t\t\tif (parts[0].equals(\"nothinghere\"))\n\t\t\t{\n\t\t\t\t// ... package that as a NowPlayingEvent\n\t\t\t\tNowPlayingEvent ev = new NowPlayingEvent(null, null, null, null, colorParse(parts[1]), str);\n\t\t\t\t\n\t\t\t\t// ... keep track of it\n\t\t\t\tlastEvent = ev;\n\t\t\t\tlastWasClearEvent = true;\n\t\t\t\t\n\t\t\t\t// ... and notify all registered 'NowPlayingListener's\n\t\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\t\tlistener.nowPlayingSongCleared(ev);\n\t\t\t}\n\t\t\t// Otherwise, something new is playing ...\n\t\t\telse\n\t\t\t{\n\t\t\t\t// ... package that as a NowPlayingEvent\n\t\t\t\tNowPlayingEvent ev = new NowPlayingEvent(parts[0], parts[1], parts[2], parts[3], colorParse(parts[4]), str);\n\t\t\t\t\n\t\t\t\t// ... keep track of it\n\t\t\t\tlastEvent = ev;\n\t\t\t\tlastWasClearEvent = false;\n\t\t\t\t\n\t\t\t\t// ... and notify all registered 'NowPlayingListener's\n\t\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\t\tlistener.nowPlayingSongSet(ev);\n\t\t\t}\n\t\t}\n\t}",
"public void sendHeartbeat();",
"@Override\n\t\t\t\tpublic void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) {\n\t\t\t\t\t\n\t\t\t\t}",
"private void SendBroadcastLocation() {\n Intent locationBroadcast = new Intent();\n locationBroadcast.putExtra(Constants.INTENT_LOCATION, mCurrentLocation);\n locationBroadcast.putExtra(Constants.INTENT_LAST_UPDATED_TIME, mLastUpdateTime);\n Log.d(Constants.SENDING_BROADCAST, Constants.SENDING_BROADCAST);\n locationBroadcast.setAction(CUSTOM_INTENT);\n sendBroadcast(locationBroadcast);\n }",
"public void record() {\n stats.record();\n }",
"void notify(String data, PushType type);",
"void prepareBroadcastDataNotify(\n BluetoothGattCharacteristic gattCharacteristic) {\n if ((gattCharacteristic.getProperties() | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) {\n BluetoothLeService.setCharacteristicNotification(gattCharacteristic,true);\n }\n }",
"@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n if (messageEvent.getPath().equals(\"/watch/newSmokeEvents\")) {\n\n /* ...retrieve the message */\n final byte[] receivedEvents = messageEvent.getData();\n\n Intent messageIntent = new Intent();\n messageIntent.setAction(Intent.ACTION_SEND);\n messageIntent.putExtra(\"NEW_EVENTS_DATA\", receivedEvents);\n\n /* Broadcast the received Data Layer messages locally -> send to Synchronize */\n LocalBroadcastManager.getInstance(this).sendBroadcast(messageIntent);\n }\n else if (messageEvent.getPath().equals(\"/watch/newSensorData\")){\n\n Intent synchronizeServiceIntent = new Intent(this, SynchronizeService.class);\n synchronizeServiceIntent.putExtra(\"RECEIVED_SYNC_HASH_LIST_REQUEST\", true);\n SynchronizeService.enqueueWork(this, synchronizeServiceIntent);\n\n }\n else {\n super.onMessageReceived(messageEvent);\n }\n\n }",
"private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}",
"@Override\n\tpublic void sendBroadcast(Broadcast b) {\n\t\tArrayList<MicroService> a = registrationHashMap.get(b);\n\t\t// adding the broadcast message to the queue of each microservice on the subscribed list\n\t\tfor (Object o : a) {\n\t\t\tint index = registeredMicroservice.indexOf(o);\n\t\t\tmicroserviceMessageQueue.get(index).add(b);\n\t\t}\n\t}",
"void notifyTrace(RecorderTraceEvent event);",
"public void notify(ObserveSession observeSession) {\n Lwm2mNotifyResponse response = new Lwm2mNotifyResponse(observeSession.node);\n observeSession.lastNotifyTime = System.currentTimeMillis();\n observeSession.coapResource.changed(response);\n LOG.debug(\"Sent notify on node {} to server {}\", observeSession.coapResource.getName(), observeSession.getServerUri());\n }",
"private void m5312e() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isReLoginHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }",
"public void dataNotifyTopic(Object data, String name) throws RemoteException;",
"public void notifyAllFriends(PresenceModel presence);",
"private void sendNotification() {\n }",
"public abstract void broadcastTraceTime(Server s);",
"private void startBroadcaster() {\n mHandler.post(mBroadcaster);\n }",
"@Override\n\tpublic void forceStateBroadcast() {\n\t\tpeerDiscoveryService.sendStateMulticast();\n\t}",
"@Override\n public void notify(Object event){\n }",
"public void sendPreparedBroadcast() {\n Intent intent = new Intent(getString(R.string.broadcast_prepared));\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }",
"public final synchronized void signalDataAvailable() {\n\n\t\t//\tNotify any waiting threads that the file data ia available\n\t\t\t\n\t\tnotifyAll();\n\t}",
"public Broadcast getBroadcast() {\r\n \t\treturn broadcast;\r\n \t}",
"void emit(TrackerPayload payload);",
"public void broadcast(DefinedPacket packet)\n {\n for (UserConnection con : connections.values())\n {\n con.packetQueue.add(packet);\n }\n }",
"void storeEvents()\n {\n this.storedPresences = new ArrayList<Presence>();\n this.storeEvents = true;\n }",
"void onHisNotify();",
"public void sendBroadcast(byte[] bytesToSend)\n {\n if (m_name != null)\n {\n m_socket.write(bytesToSend);\n }\n\n }",
"@Override\n public void onMessage(Context context, Intent intent) {\n \tNoteApplication app = (NoteApplication) getApplication();\n \tapp.notifyListener(intent);\n }",
"@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\n\t\t\tBundle bundleBroadcast = intent.getExtras();\n\t\t\tdateTextView.setText(bundleBroadcast.getString(\"key\"));\n\n\t\t\tList.clear();\n\t\t\tList = ActivityModule.get_fitmi_exercise_log(databaseObject);\n\t\t\t// setAdapter();\n\t\t\tactivityAdapter.notifyDataSetChanged();\n\n\t\t}",
"public void onDataChanged();",
"private void sendMyBroadCast(String s)\n {\n try\n {\n Intent broadCastIntent = new Intent();\n broadCastIntent.setAction(MainActivity.BROADCAST_ACTION);\n\n // uncomment this line if you want to send data\n broadCastIntent.putExtra(\"data\", s);\n\n sendBroadcast(broadCastIntent);\n\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }",
"@Override\n public void onDataChanged(DataEventBuffer dataEvents) {\n super.onDataChanged(dataEvents);\n \n Log.d(TAG, \"onDataChanged: \" + dataEvents);\n \n final List<DataEvent> events = FreezableUtils.freezeIterable(dataEvents);\n \n // Establish a connection using Google API.\n GoogleApiClient googleApiClient = new GoogleApiClient.Builder(this)\n \t.addApi(Wearable.API)\n \t.build();\n\n ConnectionResult connectionResult = googleApiClient.blockingConnect(30, TimeUnit.SECONDS);\n\n if (!connectionResult.isSuccess()) {\n \tLog.e(TAG, \"Failed to connect to GoogleApiClient.\");\n \treturn;\n }\n\n // Attempts to retrieve the data from Android Wear device.\n for (DataEvent event : events) {\n \n final Uri uri = event.getDataItem().getUri();\n final String path = uri!=null ? uri.getPath() : null;\n \n if (\"/dreamforcedata\".equals(path)) {\n \n String PEDOMETERKEY = \"df_pedometer\";\n final DataMap map = DataMapItem.fromDataItem(event.getDataItem()).getDataMap();\n int pedValues = map.getInt(PEDOMETERKEY);\n \n // Stores the value in preferences.\n AID_prefs = getSharedPreferences(AID_OPTIONS, MODE_PRIVATE); // Main preferences variable.\n AID_prefs_editor = AID_prefs.edit();\n AID_prefs_editor.putInt(PEDOMETERKEY, 0); // Stores the retrieved integer value.\n AID_prefs_editor.putBoolean(\"df_isWearDataSent\", true);\n Log.d(TAG, \"PEDOMETER VALUE: \" + pedValues); // LOGGING\n }\n }\n }",
"@Override\n\tpublic void NotifyObserver() {\n\n\t}",
"@Override\n\tpublic void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) {\n\t\t\n\t}",
"void track(String sender, String additionalInfo);",
"void notifyPending(MessageSnapshot snapshot);",
"@Override\n\tpublic void notifyReceived(LinphoneCore lc, LinphoneCall call,\n\t\t\tLinphoneAddress from, byte[] event) {\n\t\t\n\t}",
"public void sendRecordingNotification(){\n\n NotificationCompat.Builder mBuilder = (android.support.v7.app.NotificationCompat.Builder) new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.road)\n .setContentTitle(\"Sprint LT is recording your session\")\n .setContentText(mySession.getTrackName());\n // .setContentIntent(pendingIntent);\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n mNotificationManager.notify(mRecordingNotificationID, mBuilder.build());\n\n }",
"void notifyError(RecorderErrorEvent event);",
"void onDataChanged();",
"public void broadcastState() {\n StringBuilder sb = new StringBuilder();\n sb.append(MSG_STATE);\n\n if(mService.isTransmitterMode()) {\n sb.append(\" t \");\n }\n else {\n sb.append(\" r \");\n }\n\n sb.append(mService.getVADThreshold());\n sb.append(\" \");\n\n sb.append(mService.getNoiseTracker().getLastNoiseHeard() / 1000);\n\n try {\n sendChannelMessage(sb.toString());\n }\n catch(RemoteException e) {\n e.printStackTrace();\n }\n }",
"public void notifyObservers() {}",
"public void systemBroadcast(Object inData) {\n\t\tString data = Encoder.toJson(inData);\n\t\tShout shout = createShout(TYPE_SYSTEM, data);\n\t\tMessage onShout = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\t\tonShout(null, onShout);\n\t}",
"private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }"
] | [
"0.65055454",
"0.63334143",
"0.60673666",
"0.58997333",
"0.5821891",
"0.57698226",
"0.5692176",
"0.5679357",
"0.5643866",
"0.563834",
"0.56241536",
"0.561824",
"0.5603535",
"0.55947345",
"0.5571702",
"0.555141",
"0.55285126",
"0.55199987",
"0.54290724",
"0.5414342",
"0.5399471",
"0.53977436",
"0.53974086",
"0.53748417",
"0.53705966",
"0.5360781",
"0.5359221",
"0.53548944",
"0.5348266",
"0.53479654",
"0.5332017",
"0.53136873",
"0.5311297",
"0.53058726",
"0.52976406",
"0.5295318",
"0.5294017",
"0.5254849",
"0.5252889",
"0.5245068",
"0.52408385",
"0.52233315",
"0.52232355",
"0.5212431",
"0.5203513",
"0.51943713",
"0.5193681",
"0.51893455",
"0.5187489",
"0.5182696",
"0.5175961",
"0.51743996",
"0.51618373",
"0.51587814",
"0.5157271",
"0.51546586",
"0.5154214",
"0.51500547",
"0.5140061",
"0.51338226",
"0.51320326",
"0.5129324",
"0.5126701",
"0.51184696",
"0.5118254",
"0.5118245",
"0.511614",
"0.5113353",
"0.5112075",
"0.5109718",
"0.5105908",
"0.5102013",
"0.50966924",
"0.50928867",
"0.50880474",
"0.5082888",
"0.50822425",
"0.5082018",
"0.50764513",
"0.5069344",
"0.50561404",
"0.5041152",
"0.5038853",
"0.5033068",
"0.50317574",
"0.5031305",
"0.50265527",
"0.50253916",
"0.5022195",
"0.501931",
"0.5015742",
"0.5014432",
"0.500062",
"0.50005907",
"0.49907583",
"0.49858212",
"0.49857277",
"0.49837694",
"0.4982639",
"0.4980959",
"0.4975621"
] | 0.0 | -1 |
Fallback to the origin if the server is offline | @Override
public void onFailure(Call<JourneySearchResponse> call, Throwable t) {
Call<JourneySearchResponse> newCall = apiClient.getJourneys(apiQuery);
newCall.enqueue(new Callback<JourneySearchResponse>() {
@Override
public void onResponse(Call<JourneySearchResponse> call, Response<JourneySearchResponse> response) {
callback.onSuccess(response);
}
@Override
public void onFailure(Call<JourneySearchResponse> call, Throwable t) {
callback.onFailure(t);
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ServerName getOrigin() {\n return origin;\n }",
"@Override\n\tprotected boolean sameOriginDisabled() {\n\t\treturn true;\n\t}",
"@Override\n public String getUrl() {\n return getOriginUrl();\n }",
"@Override\n public Origin getOrigin() {\n return Origin.unknown();\n }",
"@java.lang.Override\n public boolean hasOrigin() {\n return origin_ != null;\n }",
"@java.lang.Override\n public boolean hasOrigin() {\n return origin_ != null;\n }",
"@Test\n public void testDefaultOriginMethod() throws Exception {\n final HttpResponse response = Request.Get(\"http://localhost:\" + httpPort.getValue() + CORS_DEFAULT_ENDPOINT_PATH).addHeader(\"Origin\", CORS_DEFAULT_ORIGIN).execute().returnResponse();\n\n assertNotNull(\"Response should not be null\", response);\n\n //we should have an access control allow origin\n assertNotNull(\"Allowed origin should be present\", response.getFirstHeader(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN));\n assertThat(IOUtils.toString(response.getEntity().getContent()), equalTo(EXPECTED_RETURN));\n\n }",
"@ZAttr(id=257)\n public boolean isAuthFallbackToLocal() {\n return getBooleanAttr(Provisioning.A_zimbraAuthFallbackToLocal, false);\n }",
"public URL getServer() {\n\t\treturn null;\n\t}",
"public String getServerUrl()\n {\n return null;\n }",
"@Override\n\tpublic boolean isSafeOrigin(URL linkedURL) {\n\t\tURL base = getBaseURL();\n\t\tString docHost = base.getHost();\n\t\tint docPort = base.getPort();\n\t\tif (docPort == -1) {\n\t\t\tdocPort = base.getDefaultPort();\n\t\t}\n\t\tString linkedHost = linkedURL.getHost();\n\t\tint linkedPort = linkedURL.getPort();\n\t\tif (linkedPort == -1) {\n\t\t\tlinkedPort = linkedURL.getDefaultPort();\n\t\t}\n\t\treturn (docHost.equalsIgnoreCase(linkedHost) || linkedHost.endsWith(docHost)) && docPort == linkedPort;\n\t}",
"public java.lang.String getWebToCaseDefaultOrigin() {\n return webToCaseDefaultOrigin;\n }",
"boolean getOffline();",
"@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getRemoteHost() {\n\t\treturn null;\n\t}",
"Origin getOrigin();",
"@Test\n public void testDefaultOriginMethodNotAllowed() throws Exception {\n final HttpResponse response = Request.Post(\"http://localhost:\" + httpPort.getValue() + CORS_DEFAULT_ENDPOINT_PATH).addHeader(\"Origin\", CORS_DEFAULT_ORIGIN).execute().returnResponse();\n\n //a well behaved client should have sent a preflight\n //but we don't want to be well behaved\n assertNull(\"Allowed origin should NOT be present\", response.getFirstHeader(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN));\n\n //the payload should NOT be the expected response\n assertThat(IOUtils.toString(response.getEntity().getContent()), not(equalTo(EXPECTED_RETURN)));\n\n }",
"@Override\n\t\tpublic String getRemoteHost() {\n\t\t\treturn null;\n\t\t}",
"public void test4(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().equalsIgnoreCase(\"trustme.com\")){ /* BUG */\n\n }\n }",
"public URL getServerLocation() {\n return serverLocation;\n }",
"public boolean IsLocal() {\r\n\t\treturn BrickFinder.getDefault().isLocal();\r\n\t}",
"private void setUpForCrossBrowser() {\n String origin = request.getHeader(\"Origin\");\n if (origin==null || origin.length()==0) {\n //this does not always work, but what else can we do?\n origin=\"*\";\n }\n response.setHeader(\"Access-Control-Allow-Origin\", origin);\n response.setHeader(\"Access-Control-Allow-Credentials\", \"true\");\n response.setHeader(\"Access-Control-Allow-Methods\", \"GET, POST, OPTIONS, PUT, DELETE\");\n response.setHeader(\"Access-Control-Allow-Headers\", \"Origin, X-Requested-With, Content-Type, Accept, Authorization, If-Modified-Since\");\n response.setHeader(\"Access-Control-Max-Age\", \"1\");\n response.setHeader(\"Vary\", \"*\");\n\n //default content type is JSON set it otherwise if you need something different\n response.setContentType(\"application/json; charset=utf-8\");\n }",
"String fallbackBaseUrl() {\n return settings.get(FALLBACK_BASE_URL);\n }",
"public void setOrigin(String origin) {\n this.origin = origin;\n }",
"public void setOrigin(String origin) {\n this.origin = origin;\n }",
"public Location getOrigin() {\n/* 1094 */ Location origin = (getHandle()).origin;\n/* 1095 */ return (origin == null) ? null : origin.clone();\n/* */ }",
"@Override\n\tpublic String getRemoteAddr() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getRemoteAddr() {\n\t\treturn null;\n\t}",
"private static void checkForRedirection(Connection conn) {\n JSONObject bestServer = ServerManager.getLowestLoadServer();\n if (bestServer != null && bestServer.get(\"id\") != Settings.getServerId()) {\n Message.sendRedirect(conn, (String) bestServer.get(\"hostname\"), (int) bestServer.get(\"port\"));\n }\n }",
"@Override\n\t\tpublic String getRemoteAddr() {\n\t\t\treturn null;\n\t\t}",
"public void test2(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().endsWith(\"trustme.com\")){ /* BUG */\n\n }\n }",
"@Override\n public void onNetworkConnectionChanged(boolean isInternetConnected) {\n if(isInternetConnected){\n hideLoadingDialog();\n getCurrentLocation();\n }else {\n showLoadingDialog(R.string.no_internet_connection);\n }\n }",
"@Override\n public final void updateOrigin() {\n }",
"public void test3(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().equals(\"trustme.com\")){ /* BUG */\n\n }\n }",
"public String getOrigin() {\n return origin;\n }",
"public String getOrigin() {\n return origin;\n }",
"protected boolean getNoFallback() {\n return noFallback;\n }",
"private String getUrlBaseForLocalServer() {\n\t HttpServletRequest request = ((ServletRequestAttributes) \n\t\t\t RequestContextHolder.getRequestAttributes()).getRequest();\n\t String base = \"http://\" + request.getServerName() + ( \n\t (request.getServerPort() != 80) \n\t \t\t ? \":\" + request.getServerPort() \n\t\t\t\t : \"\");\n\t return base;\n\t}",
"@java.lang.Override\n public boolean getIsFallback() {\n return isFallback_;\n }",
"public boolean hasOrigin() {\n return originBuilder_ != null || origin_ != null;\n }",
"public boolean hasOrigin() {\n return originBuilder_ != null || origin_ != null;\n }",
"@Override\n\tpublic boolean isRemote() {\n\t\treturn remote;\n\t}",
"String getInternetseite();",
"public void downloadWeatherForCurrentLocation() {\n if(checkConnection()) {\n LocationManager locationManager = LocationManager.getInstance(this, view);\n locationManager.getCoordinates();\n } else {\n showNoConnectionDialog();\n }\n }",
"public String getServerUrl() {\r\n return this.fedoraBaseUrl;\r\n }",
"@java.lang.Override\n public boolean getIsFallback() {\n return isFallback_;\n }",
"@Override\n\tpublic boolean isLocal() {\n\t\treturn heldObj.isLocal();\n\t}",
"public String getOrigin(){\n\t\treturn origin;\n\t}",
"public static boolean isSecurityOnlyLocalRequests() {\r\n return (isSecurityOnlyLocalRequests);\r\n }",
"public void internetConnectionProble()\n\t\t{\n\n\n\t\t}",
"private boolean checkOrigin(InetSocketAddress remoteAddress, boolean isSecured) {\n try {\n if (GlobalSettingsAndNotifier.singleton.getSetting(\"RESTRICT_SECURE\").equals(\"true\") && !isSecured) {\n return false;\n }\n String mode = GlobalSettingsAndNotifier.singleton.getSetting(\"NET_ORIGIN\");\n if (mode.equals(\"NO_RESTRICTIONS\")) {\n return true;\n }\n String a = remoteAddress.getAddress().toString().split(\"/\")[1];\n String add = a.split(\":\")[0];\n if (add == null) {\n add = a;\n }\n System.out.println(add);\n String[] parts = null;\n if (add.contains(\"-\")) {\n\n parts = add.split(\"-\");\n }\n if (add.contains('.' + \"\")) {\n\n parts = add.split(\"\\\\.\");\n }\n\n if (parts == null) {\n\n return false;\n }\n if (parts.length != 4) {\n\n return false;\n }\n final int[] remote = new int[]{Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]), Integer.parseInt(parts[3])};\n if (mode.equals(\"RESTRICT_LAN\")) {\n return networkAddressRange.isOnLAN(remote);\n }\n Iterator<networkAddressRange> inar = GlobalSettingsAndNotifier.singleton.permited.iterator();\n System.out.println(\"NrOf rules \" + GlobalSettingsAndNotifier.singleton.permited.size());\n while (inar.hasNext()) {\n\n networkAddressRange n = inar.next();\n System.out.println(\"Check\" + n.getNetworkForHumans());\n n.getAction();\n switch (n.isAllowed(new int[]{Integer.parseInt(parts[0]), Integer.parseInt(parts[1]), Integer.parseInt(parts[2]), Integer.parseInt(parts[3])}, isSecured)) {\n case 1:\n return true;\n case -1:\n return false;\n\n }\n }\n } catch (Exception ex) {\n System.out.println(ex.toString());\n\n }\n\n if (GlobalSettingsAndNotifier.singleton.getSetting(\"IMPLICIT_ALLOW\").equalsIgnoreCase(\"true\")) {\n\n return true;\n }\n\n return false;\n }",
"public String getOrigin()\n {\n return m_origin;\n }",
"private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}",
"private void checkInternetConnection() {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}",
"boolean isOmniProxyServer();",
"@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}",
"Origins(String origin){\n\t\tthis.origin = origin;\n\t}",
"public static boolean checkNetworkForOfflineDataStorage(Context context) {\r\n if (!checkNetConnection(context)) {\r\n //Logger.showShortMessage(context, context.getString(R.string.check_internet_for_sync));\r\n return false;\r\n }\r\n return true;\r\n }",
"public String getOrigin(){\r\n\t\treturn route.getOrigin();\r\n\t}",
"@Override\n\tpublic String getLocalAddr() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getLocalAddr() {\n\t\treturn null;\n\t}",
"@Override\n public void onRemoteMapNotFound() {\n // non implementato\n }",
"public InetSocketAddress getOrigin () {\n\t\treturn origin;\n\t}",
"@Nonnull\n\tprivate URI getPossiblyInsecureBaseUri() {\n\t\tUriInfo ui = getUriInfo();\n\t\tif (ui != null && ui.getBaseUri() != null)\n\t\t\treturn ui.getBaseUri();\n\t\t// See if JAX-WS *cannot* supply the info\n\t\tif (jaxws == null || jaxws.getMessageContext() == null)\n\t\t\t// Hack to make the test suite work\n\t\t\treturn URI.create(\"http://\" + DEFAULT_HOST\n\t\t\t\t\t+ \"/taverna-server/rest/\");\n\t\tString pathInfo = (String) jaxws.getMessageContext().get(PATH_INFO);\n\t\tpathInfo = pathInfo.replaceFirst(\"/soap$\", \"/rest/\");\n\t\tpathInfo = pathInfo.replaceFirst(\"/rest/.+$\", \"/rest/\");\n\t\treturn URI.create(\"http://\" + getHostLocation() + pathInfo);\n\t}",
"private static void sendNotModified(HttpResponse response) throws ForceCloseConnection {\n\t\tresponse.setStatus(HttpResponseStatus.NOT_MODIFIED);\n\t\tsetDateHeader(response);\n\n\t\t// Close the connection as soon as the error message is sent.\n\t\tthrow new ForceCloseConnection();\n\t}",
"public String getFallback() {\n return fallback;\n }",
"protected String getServerUrl() {\r\n\t\treturn server;\r\n\t}",
"@Override\n\tpublic String getSiteUrl() {\n\t\treturn null;\n\t}",
"private static boolean isLocalRequest(String remoteIPAddress, String uri) {\r\n return (remoteIPAddress.equals(getLocalIPAddress()) || remoteIPAddress.equals(LOCAL_HOST_IP) ||\r\n uriExceptions.contains(uri));\r\n }",
"private boolean dataAvailableOffline() {\n return false;\n }",
"@ZAttr(id=257)\n public void unsetAuthFallbackToLocal() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraAuthFallbackToLocal, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }",
"@Override\n\tpublic InetAddress getRemoteAddress() {\n\t\treturn null;\n\t}",
"private String getSource() {\n SharedPreferences settings =\n PreferenceManager.getDefaultSharedPreferences(Collect.getInstance().getBaseContext());\n String serverUrl = settings.getString(PreferencesActivity.KEY_SERVER_URL, null);\n String source = null;\n // Remove the protocol\n if(serverUrl.startsWith(\"http\")) {\n \tint idx = serverUrl.indexOf(\"//\");\n \tif(idx > 0) {\n \t\tsource = serverUrl.substring(idx + 2);\n \t} else {\n \t\tsource = serverUrl;\n \t}\n }\n \n return source;\n }",
"public String getFollowOrigin() {\n return this.FollowOrigin;\n }",
"public void test6(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().startsWith(\"trustme.com\")){ /* BUG */\n\n }\n }",
"public String getUnproxiedFieldDataServerUrl() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tString hostName = prefs.getString(\"serverHostName\", \"\");\n\t\tString context = \"bdrs-core\";//prefs.getString(\"contextName\", \"\");\n\t\tString path = prefs.getString(\"path\", \"\");\n\t\t\n\t\tStringBuilder url = new StringBuilder();\n\t\turl.append(\"http://\").append(hostName).append(\"/\").append(context);\n\t\t\n\t\tif (path.length() > 0) {\n\t\t\turl.append(\"/\").append(path);\n\t\t}\n\t\t\n\t\treturn url.toString();\n\t}",
"public String getRemoteURL(){\r\n\t\treturn this.remoteURL;\r\n\t}",
"public String getServerURI() {\n return settings.getString(\"server_url\", DEFAULT_SERVER_URL);\n }",
"@Override\n\t\tpublic String getLocalAddr() {\n\t\t\treturn null;\n\t\t}",
"public Boolean allowForwardedTraffic() {\n return this.innerProperties() == null ? null : this.innerProperties().allowForwardedTraffic();\n }",
"public boolean checkServer() {\n boolean result = false;\n \n int url = 195885416; //Using www.vg.no for now. There might be a problem in the ip-format, but we'll know more after testing.\n if(isNetworkAvailable()) {\n ConnectivityManager cm = (ConnectivityManager)ctx.getSystemService(Context.CONNECTIVITY_SERVICE);\n \n if(cm.requestRouteToHost(ConnectivityManager.TYPE_WIFI, url)) {\n result = true;\n } else if(cm.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, url)) {\n result = true;\n }\n }\n \n return result;\n }",
"public String getOrigin() {\n return mOrigin;\n }",
"private static boolean isUnknownSource(String url) {\n return false;\n }",
"boolean isIsRemote();",
"@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}",
"@Override\n public boolean isOnline() {\n if(mSocket != null && mSocket.isConnected())\n return true;\n return false;\n }",
"public boolean isDirectFromOrigin() {\n if ((packetHeader == null) || (packetHeader.getOriginUUID() == PacketHeader.BROADCAST_ADDRESS))\n return false;\n return packetHeader.isDirectFromOrigin();\n }",
"@Override\r\n public URI getRequestUri() {\n return null;\r\n }",
"public boolean isOfflineMessagingSupported()\n {\n return false;\n }",
"@Override\n public boolean localMirrorExists( Corpus corp, Ice.Current __current )\n {\n CorpusI cs = checkValidityAndLookup( corp );\n // don't query if no local mirror required in the first place;\n // this protects directory-based corpora from being queried\n if (null==cs || !cs.isImmutableMirror) return false;\n return cs.localMirrorExists();\n }",
"@Override\n public void cannotRetrieveRemoteMapDetails() {\n // non implementato\n }",
"@Test\n public void testLocalIPOverride() throws Exception {\n System.setProperty(PacScriptMethods.OVERRIDE_LOCAL_IP, \"123.123.123.123\");\n try {\n PacProxySelector pacProxySelector = new PacProxySelector(\n new UrlPacScriptSource(toUrl(\"testLocalIP.pac\")));\n List<Proxy> result = pacProxySelector.select(TestUtil.HTTP_TEST_URI);\n assertEquals(\n result.get(0),\n new Proxy(Type.HTTP, InetSocketAddress.createUnresolved(\n \"123.123.123.123\", 8080)));\n } finally {\n System.setProperty(PacScriptMethods.OVERRIDE_LOCAL_IP, \"\");\n }\n\n }",
"@Override\n public boolean getDataSetRequiresLocalMirror( Corpus corp, Ice.Current __current )\n {\n CorpusI cs = checkValidityAndLookup( corp );\n // if you're changing this function, please also change localMirrorExists\n if (null!=cs && cs.isImmutableMirror)\n {\n return true;\n }\n return false;\n }",
"private void setOffline(boolean value) {\n \n offline_ = value;\n }",
"@Test\n void preFlightTestFromAllowedOrigin() {\n ResponseSpec response = client.options()\n .uri(BASE_GUESTBOOK_URL)\n .header(\"Access-Control-Request-Method\", \"GET\")\n .header(\"Origin\", \"http://allowed-origin.ca\")\n .exchange();\n\n response.expectHeader().valueEquals(\"Access-Control-Allow-Methods\", \"GET,POST\")\n .expectHeader().valueEquals(\"Access-Control-Allow-Origin\", \"http://allowed-origin.ca\");\n }",
"default String remoteAddr() {\n return (String) metadata().get(\"x-remote-addr\");\n }",
"public void sendNotModified(ChannelHandlerContext ctx) {\r\n FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_MODIFIED);\r\n setDateHeader(response);\r\n\r\n // Close the connection as soon as the error message is sent.\r\n ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);\r\n }",
"@Override\r\n public String getUrl()\r\n {\n return null;\r\n }",
"public boolean internetErisimi() {\n\n ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (conMgr.getActiveNetworkInfo() != null\n\n && conMgr.getActiveNetworkInfo().isAvailable()\n\n && conMgr.getActiveNetworkInfo().isConnected()) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }",
"@Override\n\tpublic java.lang.String getRemoteHost() {\n\t\treturn _userTracker.getRemoteHost();\n\t}",
"public void test1(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n\n if(addr.getCanonicalHostName().contains(\"trustme.com\")){ // disabled\n\n }\n }"
] | [
"0.5988459",
"0.5969303",
"0.58347535",
"0.58333206",
"0.58285",
"0.58285",
"0.56150246",
"0.56017387",
"0.5400882",
"0.5362816",
"0.53418237",
"0.53038317",
"0.52599597",
"0.52018166",
"0.52018166",
"0.5196723",
"0.5163721",
"0.51614225",
"0.5119541",
"0.51040816",
"0.50971425",
"0.5088636",
"0.5083936",
"0.5082912",
"0.5082912",
"0.5079115",
"0.5044115",
"0.5044115",
"0.5042461",
"0.5010595",
"0.49798787",
"0.49574584",
"0.49533477",
"0.49491453",
"0.4938531",
"0.4938531",
"0.49317697",
"0.4930237",
"0.49269888",
"0.4918325",
"0.4918325",
"0.49136662",
"0.49017817",
"0.48935723",
"0.48899242",
"0.48593548",
"0.4855401",
"0.48536745",
"0.482176",
"0.4812564",
"0.480864",
"0.48071682",
"0.48051643",
"0.47984767",
"0.47904074",
"0.478715",
"0.4769468",
"0.47646907",
"0.47490254",
"0.4745722",
"0.4745722",
"0.47387272",
"0.47326884",
"0.47167674",
"0.47128507",
"0.47124082",
"0.47088462",
"0.4702362",
"0.47010916",
"0.47001347",
"0.46981618",
"0.46955174",
"0.46949008",
"0.46848056",
"0.4672549",
"0.467116",
"0.4664949",
"0.46644777",
"0.46618465",
"0.4658585",
"0.46563476",
"0.46548042",
"0.46498722",
"0.4641663",
"0.4641476",
"0.463481",
"0.46334073",
"0.463032",
"0.46285495",
"0.46277913",
"0.4624959",
"0.46214443",
"0.46168363",
"0.46153107",
"0.46141717",
"0.46118647",
"0.45982",
"0.45924547",
"0.45907733",
"0.45906335",
"0.4587078"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onComplete(Bundle values) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFacebookError(FacebookError e) {
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onError(DialogError e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onCancel() {
} | {
"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 |
Called when the dialog has completed successfully | public void onComplete(Bundle values) {
final String postId = values.getString("post_id");
if (postId != null) {
Log.d("FB Sample App", "Dialog Success! post_id=" + postId);
mAsyncRunner.request(postId, new WallPostRequestListener());
} else {
Log.d("FB Sample App", "No wall post made");
}
Intent intent=new Intent(getActivity(), TelaPrincipal.class);
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void successDialog() {\n AlertDialog dialog = _dialogFactory.createDialog(this, R.string.completed, R.string.success);\n\n dialog.setButton(DialogInterface.BUTTON_NEUTRAL, getString(R.string.ok), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n gotoGameEnd(IGameConstants.GAME_SUCCESS);\n }\n });\n\n dialog.setCancelable(false);\n _dialogActive = true;\n dialog.show();\n }",
"@Override\n protected void complete()\n {\n // Log the result of the script execution(s)\n logScriptCompletionStatus(associations, isBad);\n\n // Enable the calling dialog's controls\n dialog.setControlsEnabled(true);\n }",
"@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n \t\t\n\t\t\t//close the dialog and the activity\n\t\t\tsave.dismiss();\n \t\tfinish();\n\t\t}",
"@Override\r\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tif(dialog.isShowing())\r\n\t\t\t\tdialog.cancel();\r\n\t\t\tToast.makeText(getApplicationContext(), \"Inserted Succesfully\", Toast.LENGTH_LONG).show();\r\n\t\t\t\r\n\t\t\t\r\n\t\t \r\n\t\t}",
"@Override\n protected void onPreExecute()\n {\n dialog.show();\n super.onPreExecute();\n }",
"@Override\n protected void onDialogClosed(boolean positiveResult) {\n super.onDialogClosed(positiveResult);\n\n if (positiveResult) {\n save();\n }\n }",
"@Override\n\tpublic void postResult(boolean success, String text) {\n\t\t\n\t\tif (progressDialog.isShowing())\n\t\t\tprogressDialog.dismiss();\n\t\t\n\t\tfinish();\n\t}",
"protected void onPreExecute() {\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }",
"protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }",
"protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }",
"protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }",
"@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\t\t\tdialog = new Dialog(Data4.this);\r\n\t\t\tdialog.setTitle(\"Please wait\");\r\n\t\t\tTextView tv = new TextView(Data4.this.getApplicationContext());\r\n\t\t\ttv.setText(\"Uploading Data to SpreadSheet...\");\r\n\t\t\tdialog.setContentView(tv);\r\n\t\t\tdialog.show();\r\n\t\t}",
"@Override\n protected void onPreExecute() {\n\n this.dialog.setMessage(\"Please wait ...\");\n this.dialog.show();\n }",
"public void onComplete() {\r\n\r\n }",
"@Override\r\n\tprotected void onPostExecute(String result) {\r\n\t\tprogressDialog.setMessage(\"Finalizado!\");\r\n\t\t// fecha o dialog\r\n\t\tprogressDialog.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}",
"protected void onPostExecute(final Boolean success) {\r\n \t if (this.dialog.isShowing()) {\r\n this.dialog.dismiss();\r\n }\r\n \t if (success){\r\n Toast.makeText(context, \"Export successful!\", Toast.LENGTH_SHORT).show();\r\n }\r\n else {\r\n Toast.makeText(context, \"Export failed!\", Toast.LENGTH_SHORT).show();\r\n }\r\n }",
"public void working() {\n\t\t Dialog d = new Dialog(this);\r\n\t\t d.setTitle(\"hech yea!\");\r\n\t\t TextView tv = new TextView(this);\r\n\t\t tv.setText(\"Success\");\r\n\t\t d.setContentView(tv);\r\n\t\t d.show();\t\r\n\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog.show();\n\t\t}",
"@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\tmDialog.dismiss();\n\t}",
"DialogResult show();",
"private void doneScanning() {\n CustomToast.showTopToast(this, \"Success!\");\n\n instructions.setVisibility(View.GONE);\n resultIcon.setVisibility(View.GONE);\n\n ScanItemSuccessFragment scanItemSuccessFragment = new ScanItemSuccessFragment();\n getFragmentManager().beginTransaction().replace(R.id.fragment_container, scanItemSuccessFragment).commit();\n }",
"@Override\r\n\t\t\tpublic void onFinish() {\n\t\t\t\tsuper.onFinish();\r\n\t\t\t\tLog.i(\"finish\", \"finish\");\r\n\t\t\t\tdismissProgress();\r\n\t\t\t}",
"@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n callbackContext.success(edittext.getText().toString());\n }",
"@Override\n protected void onPreExecute() {\n\n Dialog.setMessage(\"Posting Outlet Payment...\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Outlet Inventory..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\tif(progressDialog!=null)progressDialog.dismiss();\n\t\t\t}",
"private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }",
"@Override\n\t\tprotected void onPreExecute()\n\n\t\t{\n\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\n\t\t\tthis.dialog.show();\n\n\t\t}",
"private void showFinishMsg() {}",
"private void onOK() {\n this.applySettings();\n dispose();\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tWindow.alert(\"Thank you for selecting\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}",
"protected void handleResultSuccessful(final T result) {\n\t\tgetContentResultHolder().setVisible(true);\n\t}",
"private void savedDialog() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Changes to the current recipe have been saved.\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Success\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}",
"public void onClick(DialogInterface dialogBox, int id) {\n completebatch();\n //showMessage(\"\",response.toString());\n\n }",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\t\t\tthis.dialog.show();\n\t\t}",
"@Override\n\tpublic void succeed(int taskId, JSONObject jObject) {\n\t\tdimissDialog();\n\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }",
"@Override\n protected void onPreExecute() {\n\n Dialog.setMessage(\"Posting Outlet Expense...\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Posting Sale Details...\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}",
"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\t\tprotected void onPreExecute() {\n\t\t\tDialog.setMessage(\"Downloading Delivery Data..\");\n\t\t\tDialog.setCancelable(false);\n\t\t\tDialog.show();\n\t\t}",
"@Override\n public void run() {\n if (!AddClient.this.isFinishing() && progressDialog != null) {\n progressDialog.dismiss();\n }\n }",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"public void onFinish() {\n }",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\n\t\t\tif (dialog != null)\n\t\t\t\tdialog.dismiss();\n\n\t\t\tOpenActivty();\n\t\t}",
"private void showSuccess() {\n if (binder.isValid()){\n Notification notification = Notification.show(\"Your Advert Has Been Updated \");\n notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);\n UI.getCurrent().getPage().reload();\n }\n }",
"@Override\n\t\tpublic void onFinish() {\n\t\t\tfinalizar();\n\t\t}",
"@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}",
"protected void onPostExecute(Boolean result) {\n\t\t\tmDlg.hide();\n\t\t\tif (result == true) {\n\t\t\t\t// notify observers of buildprovider's build table that its contents have changed\n\t\t\t\tJsonBuildService.notifyBuildProviderObservers(EditBuildActivity.this);\n\t\t\t\tshowMessage(R.string.edit_build_save_successful);\n\t\t\t\tEditBuildActivity.this.finish();\n\t\t\t} else {\n\t\t\t\tshowMessage(R.string.edit_build_title_already_taken_error);\n\t\t\t}\n\t\t}",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tthis.dialog.setMessage(\"Mise à jour des horaires ....\");\n\t\tthis.dialog.show();\n\t}",
"@Override\n public void onButtonClick(View view) {\n successDialog.dismiss();\n }",
"protected void onPreExecute() { \r\n\t\t\t this.dialog.setMessage(getString(R.string.processing)); \r\n \t\t\t this.dialog.show(); \r\n\t\t }",
"@Override\n protected void onPreExecute() {\n\n Dialog.setMessage(\"Posting Primary Receipt...\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"private void onOK() {\n if (TextUtil.isEmpty(nick.getText())) {\n showMessage(\"插件名称\");\n return;\n }\n if (TextUtil.isEmpty(name.getText())) {\n showMessage(\"插件代号\");\n return;\n }\n if (TextUtil.isEmpty(version.getText())) {\n showMessage(\"插件版本\");\n return;\n }\n if (TextUtil.isEmpty(path.getText())) {\n showMessage(\"插件路径\");\n return;\n }\n String nickV = nick.getText();\n String nameV = name.getText();\n String versionV = version.getText();\n UploadPluginDto dto = RequestManagement.uploadPlugin(selectFile, nameV, versionV, nickV);\n if (dto != null && dto.getResult() != null) {\n if (pluginPanel != null) {\n pluginPanel.addItem(dto.getResult());\n }\n }\n dispose();\n }",
"@Override\n\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t//status of 1 is success\n\t\t\t\t\t\tif (status==1){\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildSuccessDialog();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//else error\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tmainDialog.dispose();\n\t\t\t\t\t\t\tbuildErrorDialog(status);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\t\t\n\t\t\tprogressDialog.dismiss();\n\t\t\tsetAllValues();\n\t\t}",
"public void onFinish() {\n\n }",
"@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }",
"@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }",
"@Override\n public void onFinish() {\n }",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Pending Delivery Status..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"public void run() {\n onSignupSuccess();\n // onSignupFailed();\n progressDialog.dismiss();\n }",
"@Override\r\n protected void onPostExecute(JSONObject jso) {\r\n try {\r\n dlg.dismiss();\r\n } catch (Exception e1) { \r\n // Ignore this error \r\n }\r\n if (jso != null) {\r\n try {\r\n boolean succeeded = jso.getBoolean(\"succeeded\");\r\n String message = jso.getString(\"message\");\r\n \r\n if (succeeded) {\r\n // Finish this activity in order to start properly \r\n // after redirection from Browser\r\n // Because of initializations in onCreate...\r\n AccountSettingsActivity.this.finish();\r\n } else {\r\n Toast.makeText(AccountSettingsActivity.this, message, Toast.LENGTH_LONG).show();\r\n \r\n state.builder.setCredentialsVerificationStatus(CredentialsVerificationStatus.FAILED);\r\n showUserPreferences();\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"private void onExportComplete(String message) {\n Toast.makeText(ExportActivity.this, message, Toast.LENGTH_SHORT).show();\n finish();\n }",
"@Override\n public void run() {\n pDialog.dismiss();\n finish();\n }",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\td.dismiss();\n\t\t}",
"public void done() \r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tif (ok) {\r\n\t\t\t\t\t//resultsTabbedPanel.setEntryPointsData(entryPointsTable);\r\n\t\t\t\t\t// Actualizo la tabla de estadisticas globales\r\n\t\t\t\t\tcreateGlobalStatsTable(0); // XXX TODO\r\n\r\n\t\t\t\t\tregenStatsTree();\r\n\r\n\t\t\t\t\tvalidateTree();\r\n\r\n\r\n\t\t\t\t\ttimeRange.enable();\r\n\r\n\t\t\t\t\tif (!isCached) {\r\n\t\t\t\t\t\ttimeRange.setLimits(minTs, maxTs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, \"Error showing data\", e);\r\n\t\t\t} finally {\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t\tmainPanel.remove(1); \r\n\t\t\t\tJScrollPane treePanelScroll = new JScrollPane();\r\n\t\t\t\tmainPanel.add(treePanelScroll);\r\n\t\t\t\tMainFrame.this.toFront();\r\n\t\t\t}\r\n\t\t}",
"@Override\n\t\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\t\tcontinueWithForm(events);\n\t\t\t\t}",
"@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Stock Adjustment..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }",
"public EndingDialog(Game game, Occupant result) {\r\n this.game = game;\r\n this.result = result;\r\n initializeUI();\r\n }",
"@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }",
"public void finalRequest() {\n if (!isSaved) {\n mDialogInfoWithTwoButtons = new DialogInfoWithTwoButtons(mContext,\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n isFinish = true;\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n addToTemplates();\n }\n }, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialogInfoWithTwoButtons.getDialog().dismiss();\n getActivity().finish();\n }\n }, mTitle, mMessageFinal, mTitleButtonOneFinal, mTitleButtonTwoFinal);\n mDialogInfoWithTwoButtons.getDialog().show();\n } else {\n getActivity().finish();\n }\n }",
"@Override\n public void onStart() {\n pDialog.show();\n }",
"public void onSuccess(Boolean arg0) {\n\t\t\t\t\t\tMessageBox.info(\"Hotovo\",\"plán v době svátků odebrán\",null);\n\t\t\t\t\t}",
"@Override\n\t\tprotected void onPostExecute(final Boolean success)\n\n\t\t{\n\n\t\t\tif (this.dialog.isShowing())\n\n\t\t\t{\n\n\t\t\t\tthis.dialog.dismiss();\n\n\t\t\t}\n\n\t\t\tif (success)\n\n\t\t\t{\n\n\t\t\t\tToast.makeText(ctx, \"Export successful!\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\n\t\t\t\tfilename.setText(getString(R.string.saved_history)\n\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t+ SaveUtils\n\t\t\t\t\t\t\t\t.getLastExportedFileName(StatisticExportActivity.this));\n\t\t\t}\n\n\t\t\telse\n\n\t\t\t{\n\n\t\t\t\tToast.makeText(ctx, \"Export failed\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}\n\n\t\t}"
] | [
"0.74075675",
"0.72845674",
"0.66863084",
"0.66773325",
"0.6647824",
"0.6644251",
"0.66257477",
"0.65888816",
"0.6577075",
"0.6577075",
"0.6577075",
"0.65488374",
"0.65389895",
"0.64881825",
"0.646403",
"0.6461012",
"0.64556986",
"0.64404386",
"0.6431895",
"0.64236873",
"0.6413419",
"0.6406537",
"0.63909876",
"0.6388402",
"0.6386415",
"0.63597107",
"0.63414204",
"0.6337758",
"0.633142",
"0.63275397",
"0.63123983",
"0.6309925",
"0.628409",
"0.6282678",
"0.6276053",
"0.6274772",
"0.6255082",
"0.6254314",
"0.6254314",
"0.62536657",
"0.624986",
"0.6247045",
"0.6243519",
"0.6241789",
"0.6237097",
"0.6230325",
"0.62219",
"0.62194467",
"0.6219358",
"0.62191886",
"0.6216517",
"0.6215934",
"0.62143886",
"0.6211822",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6209504",
"0.6206615",
"0.61996067",
"0.61896783",
"0.61896497",
"0.61892134",
"0.618779",
"0.61863273",
"0.6186208",
"0.6186017",
"0.6184649",
"0.6170157",
"0.6166269",
"0.6152718",
"0.6151995",
"0.61454546",
"0.61454546",
"0.61454546",
"0.61454546",
"0.61454546",
"0.61454546",
"0.61454546",
"0.6145059",
"0.61425626",
"0.61404115",
"0.61384374",
"0.61333627",
"0.61316115",
"0.61306256",
"0.6128247",
"0.61240333",
"0.6116215",
"0.6115852",
"0.61154985",
"0.6112031"
] | 0.6120969 | 96 |
No special processing if dialog has been canceled | @Override
public void onCancel() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n executor.cancel();\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"protected abstract void onCancel();",
"@Override\r\n\tpublic void dialogCancelled(int dialogId) {\n\t\t\r\n\t}",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void onCancel();",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n String nada = null;\n callbackContext.error(\"cancelled\");\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"void onCancel();",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog){\n }",
"protected abstract void handleCancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n cancelCurrentTask();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"public boolean cancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }",
"@Override\n protected void onCancel() {\n }",
"private void onCancel()\n\t{\n\t\tdispose();\n\t}",
"@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }",
"@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}",
"@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }",
"@Override\n public void cancel() {\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"private void onCancel() {\n\t\tdispose();\n\t}",
"private void onCancelExistingLibraryDialog() {\n rootView.findViewById(R.id.import_step1_check).setVisibility(View.INVISIBLE);\n rootView.findViewById(R.id.import_step2).setVisibility(View.INVISIBLE);\n ((TextView) rootView.findViewById(R.id.import_step1_folder)).setText(\"\");\n step1FolderButton.setVisibility(View.VISIBLE);\n setCancelable(true);\n }",
"@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}",
"public abstract boolean cancel();",
"@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}",
"@Override\r\n\tpublic boolean isCanceled() {\n\t\treturn false;\r\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"void onCanceled();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"void cancelOriginal();",
"@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void onDialogNegativeClick(CarDialog dialog) {\n\t\tdialog.getDialog().cancel();\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void onCancel() {\n }",
"@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t}",
"private void onCancel() {\n data.put(\"cerrado\",true);\n dispose();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}",
"@Override\r\n public void run() {\n dialog.dismiss();\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n public void onCancel() {\n }",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\n\t\tpublic void onCancel() {\n \n \t}",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n\n }",
"public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n public void cancel() {\n }"
] | [
"0.7708512",
"0.76572424",
"0.7426453",
"0.73918",
"0.72855884",
"0.72563064",
"0.7255605",
"0.7219352",
"0.71857107",
"0.7180482",
"0.7155693",
"0.714779",
"0.714539",
"0.714539",
"0.712922",
"0.71282595",
"0.7112448",
"0.7105156",
"0.7101293",
"0.70869464",
"0.7073372",
"0.7073372",
"0.7048148",
"0.70453995",
"0.70325196",
"0.7030498",
"0.7027678",
"0.70167786",
"0.70160854",
"0.70086986",
"0.7008079",
"0.700366",
"0.70013195",
"0.6999825",
"0.6993701",
"0.699145",
"0.699145",
"0.6991074",
"0.6981514",
"0.6981514",
"0.6981514",
"0.6975039",
"0.6968943",
"0.6964017",
"0.69541657",
"0.6947545",
"0.6946905",
"0.69447756",
"0.69433385",
"0.69408405",
"0.6936546",
"0.692764",
"0.692764",
"0.692764",
"0.692764",
"0.692764",
"0.692764",
"0.69265777",
"0.6922588",
"0.6916611",
"0.69097394",
"0.69097394",
"0.69097394",
"0.6908499",
"0.6906392",
"0.6904615",
"0.6899218",
"0.68926644",
"0.68851864",
"0.6884683",
"0.6882401",
"0.68819314",
"0.6881019",
"0.6880725",
"0.6874638",
"0.68726695",
"0.6872271",
"0.6872271",
"0.6866772",
"0.68589646",
"0.68589646",
"0.68589646",
"0.68589646",
"0.68589646",
"0.6846083",
"0.6844664",
"0.6841956",
"0.6841596",
"0.6841596",
"0.6840993",
"0.68395853",
"0.68297434",
"0.6826309",
"0.68254894",
"0.68244874",
"0.68187046",
"0.6817798",
"0.68150043",
"0.6814643",
"0.6808352"
] | 0.6842158 | 86 |
No special processing if dialog has been canceled | @Override
public void onError(DialogError e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n executor.cancel();\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"protected abstract void onCancel();",
"@Override\r\n\tpublic void dialogCancelled(int dialogId) {\n\t\t\r\n\t}",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void onCancel();",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n String nada = null;\n callbackContext.error(\"cancelled\");\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"void onCancel();",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog){\n }",
"protected abstract void handleCancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n cancelCurrentTask();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"public boolean cancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }",
"@Override\n protected void onCancel() {\n }",
"private void onCancel()\n\t{\n\t\tdispose();\n\t}",
"@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }",
"@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}",
"@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }",
"@Override\n public void cancel() {\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"private void onCancel() {\n\t\tdispose();\n\t}",
"private void onCancelExistingLibraryDialog() {\n rootView.findViewById(R.id.import_step1_check).setVisibility(View.INVISIBLE);\n rootView.findViewById(R.id.import_step2).setVisibility(View.INVISIBLE);\n ((TextView) rootView.findViewById(R.id.import_step1_folder)).setText(\"\");\n step1FolderButton.setVisibility(View.VISIBLE);\n setCancelable(true);\n }",
"@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}",
"public abstract boolean cancel();",
"@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}",
"@Override\r\n\tpublic boolean isCanceled() {\n\t\treturn false;\r\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"void onCanceled();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"void cancelOriginal();",
"@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void onDialogNegativeClick(CarDialog dialog) {\n\t\tdialog.getDialog().cancel();\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"@Override\n public void onCancel() {\n }",
"@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t}",
"private void onCancel() {\n data.put(\"cerrado\",true);\n dispose();\n }",
"@Override\r\n\t\tpublic void onCancel() {\n\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}",
"@Override\r\n public void run() {\n dialog.dismiss();\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n public void onCancel() {\n }",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\n\t\tpublic void onCancel() {\n \n \t}",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n public void cancel() {\n }"
] | [
"0.7709884",
"0.7658516",
"0.74279463",
"0.73941255",
"0.72867745",
"0.7258502",
"0.72578984",
"0.72213316",
"0.7187679",
"0.7181683",
"0.715703",
"0.71499676",
"0.7146894",
"0.7146894",
"0.713083",
"0.7129805",
"0.7113891",
"0.71073025",
"0.7103589",
"0.7088845",
"0.7075153",
"0.7075153",
"0.7050167",
"0.70471317",
"0.7034055",
"0.7031837",
"0.7029398",
"0.70180476",
"0.7017169",
"0.7010535",
"0.7010019",
"0.70046526",
"0.7003721",
"0.7001191",
"0.6995619",
"0.69937706",
"0.69937706",
"0.6992829",
"0.69832623",
"0.69832623",
"0.69832623",
"0.6977005",
"0.6970129",
"0.69654775",
"0.6955416",
"0.6949452",
"0.6947369",
"0.6946537",
"0.69451314",
"0.69425666",
"0.6938171",
"0.69292355",
"0.69292355",
"0.69292355",
"0.69292355",
"0.69292355",
"0.69292355",
"0.69284445",
"0.69242674",
"0.6917306",
"0.691208",
"0.691208",
"0.691208",
"0.69093776",
"0.6907611",
"0.6906408",
"0.69013566",
"0.6894519",
"0.68869936",
"0.6886269",
"0.68840086",
"0.6883596",
"0.6883099",
"0.6882857",
"0.6876898",
"0.68750703",
"0.68744147",
"0.68744147",
"0.68685603",
"0.686081",
"0.686081",
"0.686081",
"0.686081",
"0.686081",
"0.68482715",
"0.68465996",
"0.6844446",
"0.68441033",
"0.68435717",
"0.68435717",
"0.6843101",
"0.68408775",
"0.68313956",
"0.68285894",
"0.6827072",
"0.68267846",
"0.6820325",
"0.68195075",
"0.68166125",
"0.68155617",
"0.6810726"
] | 0.0 | -1 |
No special processing if dialog has been canceled | @Override
public void onFacebookError(FacebookError e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancelDialog() {dispose();}",
"@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}",
"@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n executor.cancel();\n }",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}",
"protected abstract void onCancel();",
"@Override\r\n\tpublic void dialogCancelled(int dialogId) {\n\t\t\r\n\t}",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void onCancel();",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"@Override\n\t\tprotected void onCancelled() {\n\t\t\tsuper.onCancelled();\n\t\t\tdialog.dismiss();\n\t\t}",
"public void onClick(DialogInterface dialog, int whichButton) {\n String nada = null;\n callbackContext.error(\"cancelled\");\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n // dismiss the progress dialog\n MyTask.this.cancel(true);\n finish();\n pDialog.dismiss();\n // Tell the system about cancellation\n\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}",
"void onCancel();",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog) {\n }",
"@Override\n public void onCancel(DialogInterface dialog) {\n }",
"@Override\n public void onCancel(AmbilWarnaDialog dialog){\n }",
"protected abstract void handleCancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n cancelCurrentTask();\n }",
"@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }",
"public boolean cancel();",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n task.cancel(true); //meng- cancel AsincTask\n pd.dismiss(); //menghilangkan progress dialog\n }",
"@Override\n protected void onCancel() {\n }",
"private void onCancel()\n\t{\n\t\tdispose();\n\t}",
"@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }",
"@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}",
"@Override\n public void cancel() {\n super.cancel();\n\n /** Flag cancel user request\n */\n printingCanceled.set(true);\n\n /** Show a warning message\n */\n JOptionPane.showMessageDialog( MainDemo.this , \"Lorem Ipsum printing task canceled\", \"Task canceled\" , JOptionPane.WARNING_MESSAGE );\n }",
"@Override\n public void cancel() {\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}",
"private void onCancel() {\n\t\tdispose();\n\t}",
"private void onCancelExistingLibraryDialog() {\n rootView.findViewById(R.id.import_step1_check).setVisibility(View.INVISIBLE);\n rootView.findViewById(R.id.import_step2).setVisibility(View.INVISIBLE);\n ((TextView) rootView.findViewById(R.id.import_step1_folder)).setText(\"\");\n step1FolderButton.setVisibility(View.VISIBLE);\n setCancelable(true);\n }",
"@Override\n\tpublic void onCancel(DialogInterface dialog) {\n\t\tBase.car_v.wzQueryDlg = null;\n\t}",
"public abstract boolean cancel();",
"@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}",
"@Override\r\n\tpublic boolean isCanceled() {\n\t\treturn false;\r\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}",
"void onCanceled();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"void cancelOriginal();",
"@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"@Override\n\tpublic void onDialogNegativeClick(CarDialog dialog) {\n\t\tdialog.getDialog().cancel();\n\t}",
"@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}",
"@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }",
"@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic boolean onCancel() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void onCancel() {\n }",
"@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\r\n\t\t}",
"@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t}",
"private void onCancel() {\n data.put(\"cerrado\",true);\n dispose();\n }",
"@Override\r\n\t\tpublic void onCancel() {\n\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\tmProgressHUD.dismiss();\t\n\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\n\t\t\tmProgressHUD.dismiss();\n\t\t\t\n\t\t}",
"@Override\r\n public void run() {\n dialog.dismiss();\r\n }",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }",
"@Override\n public void onCancel() {\n }",
"@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}",
"@Override\n\t\tpublic void onCancel() {\n \n \t}",
"@Override\n public void onCancel(DialogInterface dialog) {\n\n }",
"@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\tfinish();\n\t\t\t}",
"public void dissMissDialog(){\r\n if (dialog != null && dialog.isShowing()\r\n && dialog.getContext() != null) {\r\n try {\r\n dialog.dismiss();\r\n\r\n if(mCallback != null){\r\n mCallback.onProgressDissmiss();\r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}",
"@Override\n public void onClick(View v) {\n dialog.cancel();\n }"
] | [
"0.77103364",
"0.7658541",
"0.74283814",
"0.7393809",
"0.72860175",
"0.72581613",
"0.7257494",
"0.7220073",
"0.7187767",
"0.7180745",
"0.7156052",
"0.7149053",
"0.7147468",
"0.7147468",
"0.713006",
"0.7129438",
"0.7112571",
"0.7106974",
"0.7102946",
"0.7088056",
"0.70750755",
"0.70750755",
"0.7049946",
"0.70471114",
"0.7032734",
"0.7031047",
"0.7028927",
"0.70174253",
"0.701585",
"0.70101166",
"0.7009793",
"0.700476",
"0.7002404",
"0.70006853",
"0.6994731",
"0.69928926",
"0.69928926",
"0.6992364",
"0.6982804",
"0.6982804",
"0.6982804",
"0.69767845",
"0.697026",
"0.69658417",
"0.695444",
"0.6949331",
"0.69469166",
"0.6946078",
"0.6944603",
"0.69420165",
"0.6937464",
"0.6928132",
"0.6928132",
"0.6928132",
"0.6928132",
"0.6928132",
"0.6928132",
"0.69278616",
"0.6923732",
"0.6916579",
"0.69107497",
"0.69107497",
"0.69107497",
"0.6908543",
"0.6907159",
"0.69059986",
"0.6900584",
"0.68939185",
"0.6886374",
"0.6885599",
"0.6883645",
"0.68830144",
"0.68822956",
"0.6881863",
"0.68760425",
"0.6874157",
"0.68737",
"0.68737",
"0.6867993",
"0.6860203",
"0.6860203",
"0.6860203",
"0.6860203",
"0.6860203",
"0.68475753",
"0.68460685",
"0.68436515",
"0.6843399",
"0.68427455",
"0.68427455",
"0.6842434",
"0.6841066",
"0.6831019",
"0.6827781",
"0.6826966",
"0.6825907",
"0.6819551",
"0.6819329",
"0.68159074",
"0.6815743",
"0.6809729"
] | 0.0 | -1 |
Called when the wall post request has completed | public void onComplete(final String response) {
Intent intent=new Intent(getActivity(), TelaPrincipal.class);
startActivity(intent);
Log.d("Facebook-Example", "Got response: " + response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void facebookWallPost()\n\t{\n\t\tPreferences preferences = new Preferences(getActivity());\n\t\tString accessToken = preferences.getFacebookAccessToken();\n\t\tlong expiration = preferences.getFacebookAccessExpiration();\n\n\t\tif(accessToken != null) mFacebook.setAccessToken(accessToken);\n\t\tif(expiration != 0) mFacebook.setAccessExpires(expiration);\n\t\t\n\t\tif(mFacebook.isSessionValid())\n\t\t{\n\t\t\t// parameters\n\t\t\tBundle bundle = new Bundle();\n\t\t\t//bundle.putString(\"to\", \"123456789\");\n\t\t\tbundle.putString(\"name\", \"Name\");\n\t\t\tbundle.putString(\"description\", \"Description\");\n\t\t\tbundle.putString(\"picture\", \"http://placedog.com/200/200\");\n\t\t\tbundle.putString(\"link\", \"http://example.com\");\n\t\t\t\n\t\t\tmFacebook.dialog(getActivity(), \"feed\", bundle, new DialogListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void onComplete(Bundle values)\n\t\t\t\t{\n\t\t\t\t\t// TODO: run callbacks in TaskFragment.runTaskCallback()\n\t\t\t\t\t\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onComplete(): \" + mFacebook.getAccessToken());\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onFacebookError(FacebookError e)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onFacebookError(): \" + e.getErrorType() + \" / \" + e.getLocalizedMessage() + \" / \" + e.getMessage());\n\t\t\t\t\t\n\t\t\t\t\t// toast\n\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(DialogError e)\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onError(): \" + e.getLocalizedMessage() + \" / \" + e.getMessage());\n\t\t\t\t\t\n\t\t\t\t\t// toast\n\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onCancel()\n\t\t\t\t{\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onCancel()\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tToast.makeText(getActivity(), \"You are logged out.\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@SuppressWarnings(\"deprecation\")\n\tprotected void postToWall() {\n\t\tBundle parameters = new Bundle();\n\n\t\tparameters.putString(\"link\", link);\n\t\tfacebook.dialog(FacebookActivity.this, \"feed\", parameters,\n\t\t\t\tnew DialogListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(DialogError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\t\t\t\tpublic void onComplete(Bundle values)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tLogcat.d(\"Fragment.facebookWallPost().onComplete(): \" + mFacebook.getAccessToken());\n\t\t\t\t}",
"private void postNewPost() {\n if (mIsReplyOnBulletin) {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewReply(etNewPostMsg.getText().toString(),\n getIntent().getExtras().getLong(EXTRA_POST_ID), NewPostActivity.this);\n } else {\n OperationManager operationManager = OperationManager.getInstance(NewPostActivity.this);\n operationManager.postNewBulletin(etNewPostSubject.getText().toString()\n , etNewPostMsg.getText().toString(), mFilesAdapter.getData(), NewPostActivity.this);\n\n }\n finish();\n }",
"public void onComplete(Bundle values) {\r\n\t\t final String postId = values.getString(\"post_id\");\r\n\t\t if (postId != null) {\r\n\t\t Log.d(\"FB Sample App\", \"Dialog Success! post_id=\" + postId);\r\n\t\t mAsyncRunner.request(postId, new WallPostRequestListener());\r\n\t\t } else {\r\n\t\t Log.d(\"FB Sample App\", \"No wall post made\");\r\n\t\t }\r\n\t\t \r\n\t\t Intent intent=new Intent(getActivity(), TelaPrincipal.class);\r\n\t\t\tstartActivity(intent);\r\n\t\t}",
"public void onCompleted(GraphResponse response) {\n JSONArray postArray = null;\n try {\n postArray = response.getJSONObject().getJSONArray(\"data\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n int postLimit = 10;\n if(postArray.length()<10) {postLimit=postArray.length();}\n\n for (int i=0; i<postLimit; i++) {\n String postId;\n try {\n postId = postArray.getJSONObject(i).getString(\"id\");\n\n final int finalI = i;\n final JSONArray finalPostArray = postArray;\n\n // se non esiste in DB\n if(DBManager.getDBManager(context).getPostById(postId)==null) {\n Log.e(\"FB POST MANAGER\", \"New post found\");\n\n new GraphRequest(\n AccessToken.getCurrentAccessToken(),\n \"/\" + postId + \"/attachments\",\n null,\n HttpMethod.GET,\n new GraphRequest.Callback() {\n public void onCompleted(GraphResponse response) {\n /* handle the result */\n try {\n FbPost p = FbPostParser.parseFbPostResponse(finalPostArray.getJSONObject(finalI), response.getJSONObject().getJSONArray(\"data\"));\n if (p != null && DBManager.getDBManager(context).getPostById(p.getId()) == null) {\n postList.add(p);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n ).executeAndWait();\n }\n else {\n Log.e(\"FB POST MANAGER\", \"Post skipped\");\n totalImages--;\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }",
"public void publishEvents() {\n Bundle params = new Bundle();\n params.putString(\"name\", \"Reserva Cancha Finder\");\n params.putString(\"caption\", \"CanchaFinder\");\n params.putString(\"description\", Seleccion);\n params.putString(\"link\", \"http://www.solweb.co/reservas/CanchaFinder/index.php\");\n params.putString(\"picture\",\"http://www.solweb.co/reservas/api_movil/ic_launcher.png\");\n\n WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,currentSession, params))\n .setOnCompleteListener(new WebDialog.OnCompleteListener() {\n\n @Override\n public void onComplete(Bundle values,FacebookException error) {\n if (error == null) {\n // When the story is posted, echo the success\n // and the post Id.\n final String postId = values.getString(\"post_id\");\n if (postId != null) {\n // do some stuff\n } else {\n // User clicked the Cancel button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n }\n } else if (error instanceof FacebookOperationCanceledException) {\n // User clicked the \"x\" button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\", Toast.LENGTH_SHORT).show();\n } else {\n // Generic, ex: network error\n Toast.makeText(getApplicationContext(),\n \"Error posting story\", Toast.LENGTH_SHORT).show();\n }\n }\n\n }).setFrom(\"\").build();\n feedDialog.show();\n\n }",
"private void publishFeedDialog() {\n\t\tBundle postParams = new Bundle();\n postParams.putString(\"name\", \"Care Apps\");\n postParams.putString(\"description\", description);\n postParams.putString(\"picture\", profile_path);\n \n\t WebDialog feedDialog = (new WebDialog.FeedDialogBuilder(this,com.facebook.Session.getActiveSession(),postParams))\n\t .setOnCompleteListener(new OnCompleteListener() {\n\t @Override\n\t public void onComplete(Bundle values,\n\t FacebookException error) {\n\t if (error == null) {\n\t final String postId = values.getString(\"post_id\");\n\t if (postId != null) {\n\t Toast.makeText(FB_ShareActivity.this,\n\t \"Posted story, id: \"+postId,\n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t } \n\t else if (error instanceof FacebookOperationCanceledException) {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Publish cancelled\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t } \n\t else {\n\t Toast.makeText(FB_ShareActivity.this, \n\t \"Error posting story\", \n\t Toast.LENGTH_SHORT).show();\n\t onBackPressed();\n\t }\n\t }\n\t })\n\t .build();\n\t feedDialog.show();\n\t}",
"@Override\n\tpublic void post(String text) throws ActivityNotFoundException, NullPointerException{\n\t\tif(context == null)\tthrow new ActivityNotFoundException(\"It seems, you've forgotten to call setActivity(), dude.\");\t\n\t\tif(text == null) throw new NullPointerException(\"Unfortunately, @text is null\");\n\t\tlastPost = text;\n\t\t\n\t\tBundle params = new Bundle();\t\t\n\n\t\tRequest.Callback callback = new Request.Callback() {\n\t\t\t@Override\n\t public void onCompleted(Response response) {\n\t\t\t\tFacebookRequestError error = response.getError();\n\t\t\t\tif(error != null){\n\t\t\t\t\tToast.makeText(context, error.getErrorMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(context, R.string.facebook_post_successful, Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\tdoFinish();\n\t\t\t}};\t\t\n\n\t\tLog.d(TAG, \"ENTERD POST\");\t\t\n\t\t\n\t\t//if we're not logged in, log in first and than try to post in callback!\n\t\tif(!isLoggedIn()){//it cannot log in here! need review\n\t\t\tLog.d(TAG, \"NOT LOGGED IN\");\n\t\t\tneedPostAfterLogin = true;\n\t\t\tParseFacebookUtils.logIn((Activity) context, pLICB);\n\t\t}\n\t\telse {\n\t\t\t//there are funky   in some books instead of simple spaces (WTF, what for..?). Replace them.\n\t\t\ttext = text.replaceAll(\"([\\\\t\\\\r\\\\f\\\\xA0])\", \" \");\n\t\t\tparams.putString(\"message\", text);\n\t\t\tnew Request(Session.getActiveSession(), \"/me/feed\", params, HttpMethod.POST, callback).executeAsync();\n\t\t}\n\t}",
"public void postData()\n\t{\n\t\tnew NetworkingTask().execute(message);\n\t}",
"public void onCompleted(Response response) {\n\t\t\t\t\t\tMylog.i(TAG, response.toString());\n\t\t\t\t\t\tDAO db = new DAO(fragment, getActivity()\n\t\t\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\t\t\tFacebookPost fbpost = new FacebookPost();\n\t\t\t\t\t\tfbpost.setContent(message);\n\t\t\t\t\t\tfbpost.setlogType(\"facebookPost\");\n\t\t\t\t\t\tdb.postData(dbName, fbpost, \"touch\");\n\t\t\t\t\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tLooper.prepare();\r\n\t\t\tAsyncHttpClient client = new AsyncHttpClient();\r\n\t\t\tif (\"friend_go\".equals(category)) {\r\n\t\t\t\tclient.addHeader(\"Authorization\", \"Basic MTM3OTgwNDAyMzk6ZWM4YTcxMWYtNGI0OS0xMWUzLTg3MTUtMDAxNjNlMDIxMzQz\");\r\n\r\n\t\t\t}\r\n\t\t\tclient.post(HotelListActivity.this, creatUrl(), createParams(), new AsyncHttpResponseHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onFailure(Throwable arg0, String arg1) {\r\n\t\t\t\t\tToast.makeText(mContext, arg1, Toast.LENGTH_LONG).show();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onStart() {\r\n\t\t\t\t\tif (debugger) {\r\n\t\t\t\t\t\tToast.makeText(HotelListActivity.this, createParams().toString(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsuper.onStart();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onSuccess(final String arg0) {\r\n\t\t\t\t\tif (debugger) {\r\n\t\t\t\t\t\tToast.makeText(mContext, arg0, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJSONObject jsObj;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tjsObj = new JSONObject(arg0);\r\n\t\t\t\t\t\tmApplication.saveCahce(category, jsObj);\r\n\t\t\t\t\t\t// pg_cnt = jsObj.getInt(\"pgCnt\");\r\n\t\t\t\t\t\tJSONArray array = jsObj.getJSONArray(\"items\");\r\n\t\t\t\t\t\tmyHandler.obtainMessage(0, -1, -1, array).sendToTarget();\r\n\r\n\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tmyHandler.obtainMessage(1, -1, -1, e.getMessage()).sendToTarget();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tLooper.loop();\r\n\t\t}",
"private void postImageToFacebook() {\n Session session = Session.getActiveSession();\n final String extraText = postTextView.getText().toString();\n if (session.isPermissionGranted(\"publish_actions\")){\n Bundle param = new Bundle();\n\n // Add the image\n try {\n Drawable myDrawable = getResources().getDrawable(extrasIntent.getInt(\"image\"));\n Bitmap bitmap = ((BitmapDrawable) myDrawable).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] byteArrayData = stream.toByteArray();\n param.putByteArray(\"picture\", byteArrayData);\n } catch (Exception ioe) {\n // The image that was send through is now not there?\n Assert.assertTrue(false);\n }\n\n // Add the caption\n param.putString(\"message\", extraText);\n Request request = new Request(session,\"me/photos\", param, HttpMethod.POST, new Request.Callback() {\n @Override\n public void onCompleted(Response response) {\n addNotification(getString(R.string.photo_post), response.getGraphObject(), response.getError());\n\n }\n }, null);\n RequestAsyncTask asyncTask = new RequestAsyncTask(request);\n asyncTask.execute();\n finish();\n }\n }",
"public void postButtonPressed(View view){\n if (isOnline()) {\n Toast.makeText(this, getResources().getString(R.string.sharing_facebook_toast), Toast.LENGTH_SHORT).show();\n mPendingAction = true;\n Session session = Session.getActiveSession();\n if (session == null) {\n session = new Session(getApplicationContext());\n Session.OpenRequest openSessionRequest = new Session.OpenRequest(this);\n }\n else{\n if (session.getState().equals(SessionState.CREATED)){\n // Session is not opened or closed, session is created but not opened.\n session = new Session(this);\n Session.setActiveSession(session);\n session.openForPublish(new Session.OpenRequest(this).setCallback(callback).setPermissions(PERMISSION));\n }\n else{\n onSessionStateChange(session, session.getState(), null);\n }\n }\n Session.setActiveSession(session);\n }else{\n Toast.makeText(this, getResources().getString(R.string.sharing_facebook_toast_no_internet), Toast.LENGTH_SHORT).show();\n\n }\n\n }",
"private void generatePost(final JSONObject jsonRoot) {\n\t\t\tpostCurrent.setText(\"Post Current Weather\");\n\t\t\tpostForecast.setText(\"Post Weather Forecast\");\n\t\t\tpostCurrent.setFocusable(true);\n\t\t\tpostForecast.setFocusable(true);\n\t\t\tpostCurrent.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Current Weather\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}).executeAsync();\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\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}\n\t\t\t});\n\t\t\t\n postForecast.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Weather Forecast\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"forecast\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}).executeAsync();\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\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}",
"public interface FacebookPostListener {\n\tpublic void doAfterPostOnWall(boolean status);\n}",
"public void onCompleted(GraphResponse response) {\n try {\n FbPost p = FbPostParser.parseFbPostResponse(finalPostArray.getJSONObject(finalI), response.getJSONObject().getJSONArray(\"data\"));\n if (p != null && DBManager.getDBManager(context).getPostById(p.getId()) == null) {\n postList.add(p);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!loggedIn){\n\t\t\t\t\tLog.d(\"POST FAILED\",\"NOT LOGGED IN\");\n\t\t\t\t}\n\t\t\t\tTweet tweet = new Tweet(text);\n\t\t\t\tTweetER ter = TweetER.getInstance(accntMgr);\n\t\t\t\ttry {\n\t\t\t\t\ttweet = ter.post(tweet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (LimitExceededException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Current Weather\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}).executeAsync();\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\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}",
"public void run() {\n\t\t\t\t\tString resultString = post(url, packet);\n\t\t\t\t\tMessage msg;\n\t\t\t\t\tif (null != handler) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(resultString)) {\n\t\t\t\t\t\t\tmsg = handler.obtainMessage(Constant.FAIL_CODE, Constant.EXCEPTION);\n\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLog.i(TAG, \"=\" + resultString);\n\t\t\t\t\t\t\tLog.i(TAG, \"messageWhat=\" + messageWhat);\n\t\t\t\t\t\t\tmsg = handler.obtainMessage(messageWhat, resultString);\n\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"post ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}",
"@Override\n public final void doPost() {\n try {\n checkPermissions(getRequest());\n final IItem jSonStreamAsItem = getJSonStreamAsItem();\n final IItem outputItem = api.runAdd(jSonStreamAsItem);\n\n output(JSonItemWriter.itemToJSON(outputItem));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}",
"public void run() {\n\t\t\t\t\tString resultString = upload(url, formParameters, datas);\n\t\t\t\t\tif (null != resultString) {\n\t\t\t\t\t\tMessage message = handler.obtainMessage(MessageWhat.UPLOADRESP, resultString);\n\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t}\n\t\t\t\t}",
"@Override\n public void run() {\n new AddFcmDetails(SuccessFullActivity.this).execute();\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"private void publishFeedExample() {\n final OnPublishListener onPublishListener = new OnPublishListener() {\n\n @Override\n public void onFail(String reason) {\n hideDialog();\n // insure that you are logged in before publishing\n Log.w(TAG, \"Failed to publish\");\n }\n\n @Override\n public void onException(Throwable throwable) {\n hideDialog();\n }\n\n @Override\n public void onThinking() {\n // show progress bar or something to the user while publishing\n toast(\"Processing\");\n showDialog();\n }\n\n @Override\n public void onComplete(String postId) {\n hideDialog();\n toast(\"Published successfully. The new post id = \" + postId);\n post_id=postId;\n }\n };\n\n // feed builder\n final Feed feed = new Feed.Builder()\n .setMessage(\"Album\")\n .setName(\"Album android App\")\n .setCaption(\"Its all about sharing moments\")\n .setDescription(\"This app provides you to share your photos. Like App official page.\")\n .setPicture(\"http://img1.wikia.nocookie.net/__cb20140420205329/ssb/images/b/bf/Abc.png\").setLink(\"https://www.facebook.com/pages/Album/1399781043626089\").build();\n\n // click on button and publish\n mButtonPublishFeed.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mSimpleFacebook.publish(feed, true, onPublishListener);\n }\n });\n }",
"private void createPost() {\n PostModel model = new PostModel(23, \"New Title\", \"New Text\");\n Call<PostModel> call = jsonPlaceHolderAPI.createPost(model);\n call.enqueue(new Callback<PostModel>() {\n @Override\n @EverythingIsNonNull\n public void onResponse(Call<PostModel> call, Response<PostModel> response) {\n if (!response.isSuccessful()) {\n textResult.setText(response.code());\n return;\n }\n PostModel postResponse = response.body();\n String content = \"\";\n assert postResponse != null;\n content += \"Code: \" + response.code() + \"\\n\";\n content += \"ID: \" + postResponse.getId() + \"\\n\";\n content += \"User ID: \" + postResponse.getUserId() + \"\\n\";\n content += \"Title: \" + postResponse.getUserId() + \"\\n\";\n content += \"Body: \" + postResponse.getText();\n textResult.append(content);\n }\n\n @Override\n @EverythingIsNonNull\n public void onFailure(Call<PostModel> call, Throwable t) {\n textResult.setText(t.getMessage());\n }\n });\n }",
"public void postToFB(View view) {\n\n// Toast.makeText(getBaseContext(), \"Posted Story on Timeline\", Toast.LENGTH_SHORT).show();\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = null;\n try {\n linkContent = new ShareLinkContent.Builder()\n .setContentTitle(basic.getString(\"title\"))\n .setContentUrl(Uri.parse(basic.getString(\"viewItemURL\")))\n .setContentDescription(\n ((TextView) findViewById(R.id.price)).getText().toString() + \"\\n\" +\n ((TextView) findViewById(R.id.shippingInfo)).getText().toString()\n )\n .setImageUrl(Uri.parse(basic.getString(\"galleryURL\")))\n .build();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n// if(linkContent != null)\n shareDialog.show(linkContent);\n\n// ShareLinkContent content = new ShareLinkContent.Builder()\n// .setContentUrl(Uri.parse(\"https://developers.facebook.com\"))\n// .build();\n//\n// shareDialog.show(content);\n\n\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tURL url = new URL(\n\t\t\t\t\t\tnew UriFactory().getHeadPortraitUrl());\n\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\n\t\t\t\tconnection.setRequestMethod(\"POST\");\n\t\t\t\tconnection.setConnectTimeout(8000);\n\t\t\t\tconnection.setReadTimeout(8000);\n\t\t\t\tconnection.setDoOutput(true);\n\t\t\t\tconnection.setDoInput(true);\n\t\t\t\tInputStream in = connection.getInputStream();\n\t\t\t\treader = new BufferedReader(new InputStreamReader(in));\n\t\t\t\tresponse = new StringBuilder();\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tresponse.append(line);\n\t\t\t\t}\n\t\t\t\tString msg = JSONAnalysis(response.toString().trim());\n\t\t\t\tSystem.out.println(\"=======================\" + msg);\n\t\t\t\tUserDao user = new UserDao(context);\n\t\t\t\tString imgutl = user.detailImgUrl();\n\t\t\t\tString imageurl = msg + imgutl;\n\t\t\t\tSystem.out.println(imageurl);\n\t\t\t\tMessage message = new Message();\n\t\t\t\tBundle data = new Bundle();\n\t\t\t\tdata.putString(\"imgurl\", imageurl);\n\t\t\t\tmessage.what = 1;\n\t\t\t\tmessage.setData(data);\n\t\t\t\thandler1.sendMessage(message);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tif (reader != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treader.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.disconnect();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void postRequest() {\n\t\tSystem.out.println(\"post request, iam playing money\");\n\t}",
"public void run() {\n\t\t\t\t\tMessage msg;\n\t\t\t\t\tVector<File> files = new Vector<File>();\n\t\t\t\t\tfiles.add(new File(fileName));\n\t\t\t\t\tString result = upload(url, formParameters, files);\n\t\t\t\t\tif (StringUtils.isEmpty(result)) {\n\t\t\t\t\t\tmsg = handler.obtainMessage(Constant.UPLOAD_FAIL_CODE, Constant.UPLOAD_EXCEPTION);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.i(TAG, result);\n\t\t\t\t\t\tmsg = handler.obtainMessage(messageWhat, result);\n\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t}\n\n\t\t\t\t}",
"public void submitComment(View view){\n //make url\n String url = \"\";\n try {\n url = App.baseURL + \"posts/comment/\" + URLEncoder.encode(forumPost.getId(), \"UTF-8\");\n } catch(UnsupportedEncodingException e) {\n Log.e(\"Error\", \"Caught encoding exception: \" + e);\n }\n\n //grab timestamp and comment content\n String commentContent = this.commentContent.getText().toString();\n //get timestamp since epoch\n long timeStamp = System.currentTimeMillis();\n String ts = Long.toString(timeStamp);\n\n //make JSON object with timestamp, author, and content\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"content\", commentContent);\n jsonObject.put(\"author\", username);\n jsonObject.put(\"time\", ts);\n } catch(JSONException e) {\n Log.e(\"Error\", \"Caught JSON object exception: \" + e);\n }\n\n //make request\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, jsonObject, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n //get response status\n try {\n String responseStatus = response.getString(\"status\");\n Log.d(\"status responcse: \", responseStatus);\n //check status\n if(responseStatus.equals(\"200\") || responseStatus.equals(\"OK\")){\n //request was good\n //make success toast\n Toast success = Toast.makeText(CreateComment.this, R.string.create_comment_success, Toast.LENGTH_SHORT);\n success.setGravity(Gravity.BOTTOM, 0, 50);\n success.show();\n //create intent and redirect back to view post page\n Intent intent = new Intent(CreateComment.this, ViewPost.class);\n Bundle bundle = new Bundle(8);\n\n bundle.putString(\"username\", username);\n bundle.putString(\"title\", forumPost.getTitle());\n bundle.putString(\"author\", forumPost.getAuthor());\n bundle.putString(\"id\", forumPost.getId());\n bundle.putString(\"time\", forumPost.getCreatedAt());\n bundle.putString(\"content\", forumPost.getContent());\n bundle.putString(\"lastEditTime\", forumPost.getLastModified());\n bundle.putString(\"timeRaw\", forumPost.getTimeRaw());\n\n intent.putExtras(bundle);\n startActivity(intent);\n }\n } catch(JSONException e) {\n Log.e(\"Error\", \"Caught JSON object exception: \" + e);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Error\", \"Volley error submitting comment POST: \" + error);\n }\n });\n\n //submit request\n queue.add(request);\n }",
"public void onClickPostBtn(View v){\n\t\tmProgressDialog = CustomProgressDialog.createDialog(this);\n\t\tmProgressDialog.show();\n\t\tmActor.postFeedback();\n\t}",
"@Override\n public void onPostAdded(final Post post) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n post.setFullView(false);\n post.processData();\n post.setCallbackManager(manager);\n\n manager.addCallback(new CallbackManager.Callback<BaseGlobalPostListFragment>() {\n @Override\n public void execute(BaseGlobalPostListFragment object) {\n object.postsAdapter.add(0, post);\n object.offset++;\n }\n });\n }\n }).start();\n }",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tnew AlertDialog.Builder(MainActivity.this) \n\t\t\t\t\t.setTitle(\"Post to Facebook\") \n\t\t\t\t\t.setPositiveButton(\"Post Weather Forecast\", new DialogInterface.OnClickListener() { \n\t\t\t\t\t @Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) { \n\t\t\t\t\t \tSession.openActiveSession(MainActivity.this, true, new Session.StatusCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"forecast\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}).executeAsync();\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\t\t\t\t\t } \n\t\t\t\t\t}) \n\t\t\t\t\t.setNegativeButton(\"Cancel\",null ) \n\t\t\t\t\t.show(); \n\t\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tPostParameter[] params = new PostParameter[2];\n\t\t\t\tparams[0] = new PostParameter(\"userID\", userID);\n\t\t\t\tparams[1] = new PostParameter(\"problemID\", problemID);\n\t\t\t\tString jsonString = ConnectUtil.httpRequest(\n\t\t\t\t\t\tConnectUtil.collectQuestion, params, ConnectUtil.POST);\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 3;\n\t\t\t\tif (jsonString != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJSONObject result = new JSONObject(jsonString);\n\t\t\t\t\t\tString status = result.getString(\"Status\");\n\t\t\t\t\t\tif (status.equalsIgnoreCase(\"success\")) {\n\t\t\t\t\t\t\tmsg.obj = \"收藏成功\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmsg.obj = \"收藏失败\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\tmyHandler.sendMessage(msg);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n startPosting();\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tURL url = new URL(\"https://mail.google.com/mail/feed/atom\");\n\t\t\t\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\t\t\t\tconn.addRequestProperty(\"Authorization\", token_type + \" \"+access_token);\n\t\t\t\t\tint respCode = conn.getResponseCode();\n\t\t\t\t\tif (respCode == HttpURLConnection.HTTP_OK) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tInputStream is = conn.getInputStream();\n\t\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\t\tString str;\n\t\t\t\t\t\twhile((str = br.readLine()) != null) {\n\t\t\t\t\t\t\tsb.append(str).append(\"\\n\\r\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinal String text = sb.toString();\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmHandler.post(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException 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\t}",
"protected abstract void sendNewPost(Discussion discussion, Post post);",
"@Override\n public void run() {\n HttpsURLConnection connPut = null;\n try {\n URL webServerUrl = new URL(DB_URL);\n\n connPut = (HttpsURLConnection) webServerUrl.openConnection();\n\n connPut.setReadTimeout(10000 /* milliseconds */);\n connPut.setConnectTimeout(15000 /* milliseconds */);\n connPut.setDoOutput(true);\n\n connPut.setRequestMethod(\"POST\");\n connPut.setRequestProperty(\"Content-type\", \"application/json\");\n AuthenticationValidator authenticationValidator = new AuthenticationValidator(context);\n String token = authenticationValidator.getAuthenticationToken();\n connPut.addRequestProperty(\"Authorization\", \"Bearer \" + token);\n connPut.connect();\n OutputStreamWriter out = new OutputStreamWriter(connPut.getOutputStream());\n\n\n\n\n for(RestRecord rr : toBePushed)\n {\n out.write(rr.getJSON().toString());\n out.flush();\n }\n out.close();\n\n if(connPut.getResponseCode() == 200)\n System.out.println(\"Successfully posted new route(s).\");\n else\n System.out.println(connPut.getResponseMessage());\n\n connPut.disconnect();\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(connPut!=null)\n connPut.disconnect();\n }\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n if (posts.size() == 0) {\n Toast.makeText(getContext(), \"You've reached the end of all posts!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\n\t\t\tLog.d(TAG, \" posting\");\n\t\t}",
"@Override\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\n\t\t\tLog.d(TAG, \" posting\");\n\t\t}",
"public void postData() {\n\n\t}",
"public boolean postWallItemToWall(String userUuid, WallItem wallItem);",
"private void publishFeedDialog(String url, String description) {\n Bundle params = new Bundle();\n params.putString(\"description\", description);\n params.putString(\"link\", url);\n\n WebDialog feedDialog = (\n new WebDialog.FeedDialogBuilder(this,\n Session.getActiveSession(),\n params))\n .setOnCompleteListener(new WebDialog.OnCompleteListener() {\n\n @Override\n public void onComplete(Bundle values,\n FacebookException error) {\n if (error == null) {\n // When the story is posted, echo the success\n // and the post Id.\n final String postId = values.getString(\"post_id\");\n if (postId != null) {\n Toast.makeText(getApplicationContext(),\n \"Posted story, id: \" + postId,\n Toast.LENGTH_SHORT).show();\n } else {\n // User clicked the Cancel button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (error instanceof FacebookOperationCanceledException) {\n // User clicked the \"x\" button\n Toast.makeText(getApplicationContext(),\n \"Publish cancelled\",\n Toast.LENGTH_SHORT).show();\n } else {\n // Generic, ex: network error\n Toast.makeText(getApplicationContext(),\n \"Error posting story\",\n Toast.LENGTH_SHORT).show();\n }\n }\n\n })\n .build();\n feedDialog.show();\n }",
"public void upload() {\n for (int i = 0; i< newHazards.size(); i++) {\n frags.get(i).getHazard().setDescription(frags.get(i).getDescription());\n }\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n if (isConnected) {\n for (Hazard h : newHazards) {\n try {\n AsyncTask<Hazard, Void, Void> uploadTask = new AsyncTask<Hazard, Void, Void>() {\n @Override\n protected Void doInBackground(Hazard... h) {\n try {\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n if (isConnected) {\n ServerInterface.uploadHazards(HazardManager.newHazardJSON(h[0]));\n Log.i(\"ReviewActivity\", \"Send new hazard\");\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return null;\n }\n };\n uploadTask.execute(h);\n uploadTask.get();\n } catch (InterruptedException inte) {\n inte.printStackTrace();\n } catch (ExecutionException exe) {\n exe.printStackTrace();\n } catch (ClassCastException cce) {\n cce.printStackTrace();\n }\n }\n }\n // close activity since review of hazards complete\n finish();\n }",
"public void publishOnFacebook()\n {\n\n }",
"@Override\r\n\t public void run() {\n\r\n\t\ttry {\r\n\t\t URL uri = new URL(url);\r\n\t\t String newParams = URLEncoder.encode(params, \"utf-8\");\r\n\t\t HttpURLConnection conn = (HttpURLConnection) uri\r\n\t\t\t .openConnection();\r\n\t\t conn.setRequestMethod(\"POST\");\r\n\t\t // 设置请求的参数\r\n\t\t conn.setDoInput(true);\r\n\t\t conn.setDoOutput(true);\r\n\r\n\t\t conn.getOutputStream().write(newParams.getBytes());\r\n\r\n\t\t if (conn.getResponseCode() == 200) {\r\n\t\t\tInputStream is = conn.getInputStream();\r\n\t\t\tString result = convertInputStreamToString(is);\r\n\t\t\t// 通过handler发送消息\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = 1;\r\n\t\t\tmsg.obj = result;\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t }\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t e.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }",
"@Override\r\n public void run() {\n upload();\r\n }",
"@Override\n public void run(){\n if(statusCode != 204) {\n TextView errMsg = (TextView) findViewById(R.id.ratingErrorLabel);\n errMsg.setVisibility(View.VISIBLE);\n }\n // If the rating was successfully created, then send the user to the\n // SeePodcast activity\n else {\n Intent intent = new Intent(RatePodcast.this, SeePodcast.class);\n intent.putExtra(\"podcastID\", podcastID);\n startActivity(intent);\n }\n }",
"@Override\n public void onComplete(Object response) {\n Toast.makeText(TabMainActivity.this, \"分享完成!\", Toast.LENGTH_SHORT).show();\n }",
"void sendPost(String title, String body);",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tString result = DataUtil.callWebService(\n\t\t\t\t\t\tMethods.DISPLAY_NEW,\n\t\t\t\t\t\tgetJson(Member_ID, Note, Lng, Lat,\n\t\t\t\t\t\t\t\tLoc, Picture, Manager_ID));\n\t\t\t\tLog.e(TAG,\"提交数据:\"+ getJson(Member_ID, Note, Lng, Lat, Loc, Picture, Manager_ID));\n\t\t\t\t// 先判断网络数据是否获取成功,防止网络不好导致程序崩溃\n\t\t\t\tif (result != null) {\n\t\t\t\t\t// 获取对象的Type\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(result);\n\t\t\t\t\t\t// Log.e(TAG, \"code:\" + jsonObject.getInt(\"Code\"));\n\t\t\t\t\t\tint code = jsonObject.getInt(\"Code\");\n\t\t\t\t\t\tLog.e(TAG, \"code------:\" + code);\n\t\t\t\t\t\t// 假如code返回为0则表示删除成功,否则为失败\n\t\t\t\t\t\tif (code == 0) {\n\t\t\t\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmHandler.sendEmptyMessage(3);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmHandler.sendEmptyMessage(3);\n\n\t\t\t\t}\n\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tPostParameter[] params = new PostParameter[1];\n\t\t\t\tparams[0] = new PostParameter(\"answerID\", answerID);\n\t\t\t\tString jsonString = ConnectUtil.httpRequest(\n\t\t\t\t\t\tConnectUtil.addSupportAnswer, params, ConnectUtil.POST);\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = 3;\n\t\t\t\tif (jsonString != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJSONObject result = new JSONObject(jsonString);\n\t\t\t\t\t\tString status = result.getString(\"Status\");\n\t\t\t\t\t\tif (status.equalsIgnoreCase(\"success\")) {\n\t\t\t\t\t\t\tmsg.obj = \"+1\";\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tmsg.obj = \"点赞失败\";\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\tmyHandler.sendMessage(msg);\n\t\t\t}",
"@Override\n public void run() {\n mTencent.shareToQzone(activity, params, new IUiListener() {\n\n @Override\n public void onCancel() {\n Log.v(\"activity\", \"onCancel: \");\n }\n\n @Override\n public void onError(UiError e) {\n // TODO Auto-generated method stub\n Log.v(\"onError: \" + e.errorMessage, \"e\");\n }\n\n @Override\n public void onComplete(Object response) {\n // TODO Auto-generated method stub\n Log.v(\"onComplete: \", response.toString());\n UMPlatformData platform = new UMPlatformData(UMPlatformData.UMedia.TENCENT_QZONE, AppSharedPref.newInstance(ctx).getUserId());\n MobclickAgent.onSocialEvent(ctx, platform);\n Toast.makeText(ctx,\"分享成功!\",Toast.LENGTH_LONG).show();\n }\n\n });\n }",
"public void post(ActionEvent actionEvent) throws IOException, ClassNotFoundException {\n Post post;\n if (postPic != null) {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage(), postPic);\n post.setPostPicAddress(file.toString());\n } else {\n post = new Post(thisUser.getUser().getUsername(), title.getText()\n , description.getText(), new Date(), thisUser.getUser().getProfileImage());\n post.setPostPicAddress(\"No postPic\");\n }\n\n post.setOwner(thisUser.getUser().getUsername());\n\n CommandSender commandSender = new CommandSender(CommandType.NEWPOST\n , post);\n\n Client.getObjectOutputStream().writeObject(commandSender);\n\n thisUser.setSearchedUser(thisUser.getUser());\n Main.loadAPage(actionEvent\n , \"../FXMLs/MyProfile.fxml\"\n , \"SBUgram - Your Profile\"\n );\n\n }",
"@Override\n public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n mHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(context, \"分享成功\", Toast.LENGTH_SHORT).show();\n }\n });\n if (mShareCallback!=null) {\n mShareCallback.onSuccess();\n }\n\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetGmailAtomFeed(access_token,token_type);\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"@Override\n public void PostDownloaded(ArrayList<Locality> localityList) {\n\n NewPostCacheManager cacheManager = new NewPostCacheManager(this);\n cacheManager.SaveNewApiPostPaginate(localityList);\n\n\n Intent intent = new Intent();\n intent.setAction(MY_ACTION);\n\n intent.putExtra(\"newApiPosts\", NewsListActivity.NEW_POSTS_DOWNLOADED);\n\n sendBroadcast(intent);\n\n stopSelf();\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"public PostMessage()\n\t{\n\t\tsuper(MessageType.POST_MESSAGE);\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CREATE_NEW_POST) {\n if (resultCode == RESULT_OK) {\n String user = data.getStringExtra(PostingActivity.USER);\n String subject = data.getStringExtra(PostingActivity.SUBJECT);\n String question = data.getStringExtra(PostingActivity.QUESTION);\n\n Post post = new Post(user, subject, question);\n postQuestion(post);\n }\n }\n }",
"private void offerwallAds() {\n Log.d(TAG, \"offerwallAds invoked\");\n final RequestCallback requestCallback = new RequestCallback() {\n\n @Override\n public void onAdAvailable(Intent intent) {\n // Store the intent that will be used later to show the Offer Wall\n offerwallIntent = intent;\n Log.d(TAG, \"OW: Offers are available\");\n Toast.makeText(MainActivity.this, \"OW: Offers are available\", Toast.LENGTH_SHORT).show();\n showOW.setEnabled(true);\n }\n\n @Override\n public void onAdNotAvailable(AdFormat adFormat) {\n // Since we don't have an ad, it's best to reset the Offer Wall intent\n offerwallIntent = null;\n Log.d(TAG, \"OW: No ad available\");\n Toast.makeText(MainActivity.this, \"OW: No ad available\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onRequestError(RequestError requestError) {\n // Since we don't have an ad, it's best to reset the Offer Wall intent\n offerwallIntent = null;\n Log.d(TAG, \"OW: Something went wrong with the request: \" + requestError.getDescription());\n Toast.makeText(MainActivity.this, \"OW: Something went wrong with the request:\", Toast.LENGTH_SHORT).show();\n }\n };\n\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n boolean shouldCloseOfferwall = true;\n OfferWallRequester.create(requestCallback)\n .closeOnRedirect(shouldCloseOfferwall)\n .request(MainActivity.this);\n Log.d(TAG, \"OW request: added delay of 5 secs\");\n }\n }, 5000);\n }",
"public synchronized void postRequest (final Runnable r) {\n postRequest (r, false);\n }",
"protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}",
"@Override\n public void run() {\n handler.post(Update);\n }",
"public void postComments(String fid) {\n\t\tJSONObject jsObject = new JSONObject();\n\t\tString nid=myPrefs.getString(\"garden_id\", \"none\");\n\n\t\ttry {\n\t\t\tjsObject.put(\"nid\", nid);\n\t\t\t//\t\t\tjsObject.put(\"subject\", commentSubject);\n\t\t\tjsObject.put(\"comment_body\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"value\", commentStr))));\n\t\t\tif(null!=fid)\n\t\t\t\tjsObject.put(\"field_image\", new JSONObject().put(\"und\", new JSONArray().put(0, new JSONObject().put(\"fid\", fid))));\n\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t\tcd = new ConnectionDetector(getActivity());\n\n\t\t// Check if Internet present\n\t\tif (!cd.isConnectingToInternet()) {\n\t\t\t// Internet Connection is not present\n\t\t\talert.showAlertDialog(getActivity(),\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to working Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}else{\n\t\t\ttaskPostComment=new PostComment(jsObject,myPrefs){\n\n\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\tAppUtil.initializeProgressDialog(getActivity(), \"Finalizing post...\", progressDialog);\n\t\t\t\t};\n\n\t\t\t\tprotected void onPostExecute(JSONObject result) {\n\t\t\t\t\tAppUtil.cancelProgressDialog();\n\t\t\t\t\tCalenderHelper calenderHelper=new CalenderHelper(getActivity());\n\t\t\t\t\tCalendar cal=Calendar.getInstance();\n\t\t\t\t\tDate date=new Date();\n\t\t\t\t\tcalenderHelper.createEvent(\"\", \"Status:\"+commentStr, cal.get(Calendar.YEAR),cal.get(Calendar.MONTH),cal.get(Calendar.DATE),cal.get(Calendar.HOUR),cal.get(Calendar.MINUTE),cal.get(Calendar.SECOND),cal.get(Calendar.MILLISECOND),date.getTime(),date.getTime(),null);\n\t\t\t\t\t//\t\t\t\t\tsubject.setText(\"\");\n\t\t\t\t\tcomment.setText(\"\");\n\t\t\t\t\tsharedImagePath=null;\n\t\t\t\t\tToast.makeText(getActivity(), \"Post Successful\", 1000).show();\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tif(isRefreshEnabled()){\n\t\t\t\t\t\tsetRefreshEnabled(false);\n\t\t\t\t\t\tfetchGardenDetails(homeFrgRootView,true);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}.execute(\"http://www1.kitchengardens.in/svc/comment/\");\n\t\t}\n\t}",
"@Override\n public void run() {\n handler.post(Update);\n }",
"@Override\n public void run() {\n handler.post(Update);\n }",
"@Override\n public void run() {\n handler.post(Update);\n }",
"@Override\n public void run() {\n handler.post(Update);\n }",
"@Override\n public void run() {\n handler.post(Update);\n }",
"@Override\n public void run() {\n handler.post(Update);\n }",
"public void saveWalk() {\n try {\n long id = this.currentRoute.getId();\n DatabaseHandler db = new DatabaseHandler(this.getApplicationContext());\n currentRoute.setWaypoints(db.getAllWaypoints(id));\n\n HTTPPostSender postSender = new HTTPPostSender();\n postSender.buildString(currentRoute, this.getContentResolver());\n postSender.cm = (ConnectivityManager) getSystemService(this.getApplicationContext().CONNECTIVITY_SERVICE);\n\n\n\n\n if(isOnline()) {\n postSender.execute(this.currentRoute);\n Toast.makeText(this.getApplicationContext(),\"Walk successfully sent to server\",Toast.LENGTH_LONG).show();\n\n } else {\n //oh god why..\n Toast.makeText(this.getApplicationContext(),\"Something bad happened\",Toast.LENGTH_LONG).show();\n }\n } catch(Exception e) {\n Toast.makeText(this.getApplicationContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n }",
"private void send() {\n ModelManager.putFeedBack(getCurrentActivity(),\n GlobalValue.myAccount.getId() + \"\", edtTitle.getText()\n .toString(), edtDes.getText().toString(),type, true,\n new ModelManagerListener() {\n\n @Override\n public void onSuccess(Object object) {\n // TODO Auto-generated method stub\n edtDes.setText(\"\");\n edtTitle.setText(\"\");\n MainUserActivity activity = (MainUserActivity) getCurrentActivity();\n activity.backFragment(new AccountFragment());\n }\n\n @Override\n public void onError(VolleyError error) {\n // TODO Auto-generated method stub\n Toast.makeText(self, ErrorNetworkHandler.processError(error), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tUri insertedUri = context.getContentResolver().insert(uri,\n\t\t\t\t\t\tvalues);\n\t\t\t\tMessage msg = Message.obtain();\n\t\t\t\t// msg.what=INSERT_OPERATION;\n\t\t\t\tif (ContentUris.parseId(insertedUri) > 0) {\n\t\t\t\t\tmsg.what = SUCCESS;\n\t\t\t\t} else {\n\t\t\t\t\tmsg.what = FAIL;\n\t\t\t\t}\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t}",
"@Override\n public void onComplete(@NonNull Task<DocumentReference> task) {\n creatingPost = false;\n }",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n public void onComplete(Bundle values) {\n final SharedPreferences.Editor editor = mPrefs.edit();\n editor.putString(\"access_token\", facebook.getAccessToken());\n editor.putLong(\"access_expires\", facebook.getAccessExpires());\n editor.commit();\n\n final RequestParams params=new RequestParams();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n JSONObject meResponse;\n String appAccessToken;\n \n try {\n meResponse=new JSONObject(facebook.request(\"me\"));\n\n Facebook appTokenGetter=new Facebook(facebook.getAppId());\n\n Bundle appTokenParams=new Bundle();\n appTokenParams.putString(\"client_id\", \"220182624731035\");\n appTokenParams.putString(\"client_secret\", \"4eaad26ffa800e232438647bbc8af28f\");\n appTokenParams.putString(\"grant_type\", \"client_credentials\");\n\n appAccessToken=appTokenGetter.request(\"oauth/access_token\", appTokenParams);\n\n editor.putString(\"app_access_token\", appAccessToken.replace(\"access_token=\", \"\"));\n\n Log.d(\"ScoreboardActivity\", \"Received app access token: \" + appAccessToken);\n\n editor.putString(\"facebook_id\", meResponse.getString(\"id\"));\n editor.commit();\n\n params.put(\"facebook_id\", meResponse.getString(\"id\"));\n params.put(\"name\", meResponse.getString(\"name\"));\n params.put(\"avatar\", \"http://graph.facebook.com/\"+meResponse.getString(\"id\")+\"/picture\");\n }\n catch(Exception e)\n {\n\n }\n\n GetBonkersAPI.post(\"/admin/players/\"+GetBonkersAPI.getPlayerUUID(getApplicationContext()), params, getApplicationContext(), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(String response)\n {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n wait.dismiss();\n if(mode==1)\n {\n finish();\n }\n else\n {\n updateScoreboard();\n rightSelectorTapped(null);\n }\n }\n });\n }\n\n @Override\n public void onFailure(Throwable error)\n {\n wait.dismiss();\n }\n });\n\n }\n }).start();\n\n\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tPostParameter[] params = new PostParameter[2];\n\t\t\t\tparams[0] = new PostParameter(\"userID\", userid);\n\t\t\t\tparams[1] = new PostParameter(\"answerID\", Answerid);\n\n\t\t\t\tString jsonString = ConnectUtil.httpRequest(\n\t\t\t\t\t\tConnectUtil.getDetailedAnswers, params,\n\t\t\t\t\t\tConnectUtil.POST);\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tif (jsonString != null) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJSONObject result = new JSONObject(jsonString);\n\t\t\t\t\t\tString status = result.getString(\"Status\");\n\t\t\t\t\t\tif (status.equalsIgnoreCase(\"success\")) {\n\n\t\t\t\t\t\t\thotanswer.setAgoodnum(result\n\t\t\t\t\t\t\t\t\t.getInt(\"answer_support\"));\n\t\t\t\t\t\t\thotanswer.setAtime(result.getString(\"answer_date\"));\n\n\t\t\t\t\t\t\tmsg.what = 1;// 代表成功\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmsg.what = 2;\n\t\t\t\t\t\t\tmsg.obj = \"加载失败\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tmsg.what = 0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmsg.what = 0;\n\t\t\t\t}\n\t\t\t\tmyHandler.sendMessage(msg);\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void call(Session session,\n\t\t\t\t\t\t\t\t\t\tSessionState state, Exception exception) {\n\t\t\t\t\t\t\t\t\tif (session.isOpened()) {\n\t\t\t\t\t\t\t\t\t\tRequest.newMeRequest(session, new Request.GraphUserCallback() {\n\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"current\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\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}).executeAsync();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}",
"public void onRequestMore() {\n buildTimeline(getLastTweetId() - 1, NO_SINCE_ID);\n }",
"private void postEvent(){\n final Map<String, Object> eventDocData = new HashMap<>();\n eventDocData.put(\"address\", newEvent.getAddress());\n eventDocData.put(\"author\", newEvent.getAuthor());\n eventDocData.put(\"categories\", newEvent.getCategories());\n eventDocData.put(\"date\", newEvent.getDate());\n eventDocData.put(\"description\", newEvent.getDescription());\n eventDocData.put(\"distanceFromUser\", 0);\n eventDocData.put(\"event18\", false);\n eventDocData.put(\"event21\", false);\n eventDocData.put(\"eventKey\", newEvent.getEventKey());\n eventDocData.put(\"lat\", newEvent.getLat());\n eventDocData.put(\"lon\", newEvent.getLon());\n eventDocData.put(\"notificationOnly\", null);\n eventDocData.put(\"paid\", true);\n eventDocData.put(\"radius\", null);\n eventDocData.put(\"time\", null);\n\n //Compress and Upload\n purchaseProgressBar.setVisibility(View.VISIBLE);\n\n //Compress Image\n File profileImgFile = new File(mainImgURI.getPath());\n try {\n compressedImageFile = new Compressor(PurchaseEventActivity.this).setQuality(85).compressToBitmap(profileImgFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressedImageFile.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imgData = baos.toByteArray();\n\n //Upload Img & Name\n UploadTask setupUpload = storageReference.child(\"events\").child(newEvent.getEventKey() + \".jpg\").putBytes(imgData);\n\n setupUpload.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri download_uri = taskSnapshot.getDownloadUrl();\n eventDocData.put(\"pathToImage\", download_uri);\n\n //Send to Firebase\n firebaseFirestore.collection(\"events\").document(newEvent.getEventKey())\n .set(eventDocData)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(PurchaseEventActivity.this, \"Event Posted!\", Toast.LENGTH_SHORT).show();\n Intent mainIntent = new Intent(PurchaseEventActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n Toast.makeText(PurchaseEventActivity.this, \"There Was an Issue Posting Your Event. Please Contact Support.\", Toast.LENGTH_LONG).show();\n }\n });\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n String error = e.getMessage();\n Toast.makeText(PurchaseEventActivity.this, \"Posting Error. Please Contact Support.\", Toast.LENGTH_LONG).show();\n\n purchaseProgressBar.setVisibility(View.INVISIBLE);\n }\n });\n }",
"private void sendPost() {\n Map<String,Object> values = new HashMap<>();\n values.put(Constants.MANAGEMENT,management);\n values.put(Constants.GENERAL_INFORMATION,generalnformation);\n values.put(Constants.SYMPTOMS,symptoms);\n\n FireBaseUtils.mDatabaseDiseases.child(caseStudyUrl).child(url).updateChildren(values);\n Toast.makeText(DiseaseEditActivity.this, \"Item Posted\",LENGTH_LONG).show();\n finish();\n }",
"void makeTweet(OnTweetPostListener onTweetPostListener);",
"public void run() {\n \tif (counter == POP_SIZE){\n \t\ttemp_wallpapers.clear();\n \t\tadView.requestFreshAd();\n \t\tsaveToDB();\n \t\tcrossover();\n \t\tmutation();\n \t\tcounter = 0;\n \t}\n \t// Make two thumbnails. \n \t// Set nodes that were choose to universal variables to keep track of which ones were selected.\n for (int r = 0; r < 2; r++){\n \tnodes[r] = getNode();\n \tbMap[r] = makeBitmap(nodes[r], r, 50, 50, height, width); \t\n }\n Message msg = mHandler.obtainMessage();\n Bundle b = new Bundle();\n b.putInt(\"total\", 100);\n msg.setData(b);\n mHandler.sendMessage(msg);\n\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onCompleted(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGraphUser user,\n\t\t\t\t\t\t\t\t\t\t\t\t\tResponse response) {\n\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishfeed(\"forecast\", jsonRoot);\n\t\t\t\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}",
"@Override\n public void onCompleted(JSONObject object, GraphResponse response) {\n Bundle bFacebookData = getFacebookData(object);\n\n final String email;\n final String password;\n final String name;\n\n name = bFacebookData.getString(\"first_name\");\n email = bFacebookData.getString(\"email\");\n password = \"adminacc\";\n if (!ifUserExsist(email)) {\n dbHelper.openToWrite();\n long rowID = dbHelper.insert(name, email, password);\n //Log.d(LOG_TAG, \"row inserted, ID = \" + rowID);\n }\n\n new android.os.Handler().postDelayed(\n new Runnable() {\n public void run() {\n // On complete call either onLoginSuccess or onLoginFailed\n if (userAutentification(email, password)) {\n onLoginSuccess(name, email);\n } else {\n onLoginFailed();\n // onLoginFailed();\n }\n mConnectionProgressDialog.dismiss();\n }\n }, 3000);\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tdbHelper.InsertCategory(listResult);\r\n\t\t\t\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\t\t\t\tmsg.obj = \"CategorySave\";\r\n\t\t\t\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\t\t}",
"@Override\n public void onComplete(Object response) {\n Log.v(\"onComplete: \", response.toString());\n UMPlatformData platform = new UMPlatformData(UMPlatformData.UMedia.TENCENT_QZONE, AppSharedPref.newInstance(ctx).getUserId());\n MobclickAgent.onSocialEvent(ctx, platform);\n Toast.makeText(ctx,\"分享成功!\",Toast.LENGTH_LONG).show();\n }",
"@Override\n public void run() {\n postGetRoomMessages();\n updateMessagesHandler.postDelayed(messageStatusChecker, updateMessagesInterval);\n }",
"public void addPostEvent()\r\n\t{\r\n\t\tfor(Event recordedEvent : eventsCount)\r\n\t\t{\r\n\t\t\tif(recordedEvent.getRequestType().equals(RequestMethod.POST))\r\n\t\t\t{\r\n\t\t\t\trecordedEvent.setAccessCount(recordedEvent.getAccessCount() + 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void onFinished()\n {\n if (_requestPayload == null)\n {\n _streamResponseCallback.onError(Messages.toStreamException(RestException.forError(400,\n \"Did not receive any parts in the multipart mime request!\")));\n return;\n }\n\n //At this point, this means that the multipart mime envelope didn't have any attachments (apart from the\n //json/pson payload). Technically the rest.li client would not create a payload like this, but to keep the protocol\n //somewhat flexible we will allow it.\n //If there had been more attachments, then onNewPart() above would be invoked and we would have passed the\n //attachment reader onto the framework.\n\n //It is also important to note that this callback (TopLevelReaderCallback) will no longer be used. We provide\n //null to the application developer since there are no attachments present. Therefore it is not possible for this\n //callback to ever be used again. This is a bit different then the onNewPart() case above because in that case\n //there is a valid non-null attachment reader provided to the resource method. In that case application developers\n //could call drainAllAttachments() without registering a callback which would then lead to onDrainComplete() being\n //invoked.\n\n _restRequestBuilder.setEntity(_requestPayload);\n RestRequest restRequest = _restRequestBuilder.build();\n //We have no attachments so we pass null for the reader.\n // Debug request should have already handled by one of the request handlers.\n _fallback.handleResourceRequest(restRequest,\n _routingResult, toRestResponseCallback(_streamResponseCallback, _routingResult.getContext()));\n }",
"private void getSocialMediaPost() {\n Call<List<SocialMediaPost>> call = api_interface.getSocialMediaPost();\n\n //runs on a separate thread\n call.enqueue(new Callback<List<SocialMediaPost>>() {\n @Override\n public void onResponse(Call<List<SocialMediaPost>> call, Response<List<SocialMediaPost>> response) {\n if (!response.isSuccessful()){\n textView.setText(\"code: \"+ response.code());\n return;\n }\n\n List<SocialMediaPost> socialMediaPosts = response.body();\n StringBuilder stringBuilder = new StringBuilder();\n\n if (socialMediaPosts != null) {\n for (SocialMediaPost socialMediaPost : socialMediaPosts) {\n stringBuilder.append(socialMediaPost).append(\"/\");\n }\n }\n\n textView.setText(stringBuilder);\n\n }\n\n @Override\n public void onFailure(Call<List<SocialMediaPost>> call, Throwable t) {\n //Something went wrong with communication with the server\n //json object doesnt fit into what we are trying to pass it into\n textView.setText(t.getMessage());\n }\n });\n }",
"@Override\n public void onOnlineDiveDataPostBackground(\n ArrayList<Object> resultList,\n String message) {\n\n }",
"public void post(Object event);"
] | [
"0.7157645",
"0.6978044",
"0.65840423",
"0.65661645",
"0.6547352",
"0.64997494",
"0.6352662",
"0.63516897",
"0.62220204",
"0.60813457",
"0.60791266",
"0.6028208",
"0.60248876",
"0.6021081",
"0.59905726",
"0.5985",
"0.59683084",
"0.5965598",
"0.58533967",
"0.58448654",
"0.5793949",
"0.57392913",
"0.5728518",
"0.56779295",
"0.5648928",
"0.56392866",
"0.56229",
"0.5622444",
"0.5622326",
"0.5620888",
"0.5618448",
"0.56137776",
"0.5611292",
"0.56013995",
"0.5593488",
"0.559086",
"0.5550784",
"0.55321354",
"0.55308497",
"0.5515292",
"0.55001396",
"0.54978544",
"0.5443311",
"0.5443311",
"0.54422015",
"0.5438007",
"0.5431162",
"0.54081714",
"0.5401928",
"0.5387535",
"0.5386678",
"0.5379731",
"0.53677016",
"0.5363283",
"0.5362764",
"0.53519803",
"0.53467196",
"0.53404605",
"0.53360313",
"0.53354484",
"0.5332514",
"0.53243613",
"0.53223294",
"0.5304025",
"0.53034675",
"0.5303155",
"0.53004664",
"0.529757",
"0.5295859",
"0.5291874",
"0.5282147",
"0.5282147",
"0.5282147",
"0.5282147",
"0.5282147",
"0.5282147",
"0.5279761",
"0.5265157",
"0.52639604",
"0.52639604",
"0.5254341",
"0.5253911",
"0.52536",
"0.52476794",
"0.52439976",
"0.52285796",
"0.52207994",
"0.5212059",
"0.52005786",
"0.5200484",
"0.5182305",
"0.51722944",
"0.516417",
"0.5163347",
"0.5159077",
"0.51584786",
"0.51424515",
"0.51371896",
"0.5120961",
"0.51204854",
"0.51105475"
] | 0.0 | -1 |
Ignore File not found errors | public void onFileNotFoundException(FileNotFoundException e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void handleFileNotFoundException() {\n System.out.println(\"\\tUnfortunately, I could not detect any files in the database!\");\n System.out.println(\"\\tBut don't worry sir.\");\n System.out.println(\"\\tI will create the files you might be needing later.\");\n Duke.jarvis.printDivider();\n }",
"private static void file_not_found(String filename, int errno)\n\t\t\tthrows FileNotFoundException {\n\t\tswitch (errno) {\n\t\tcase ENOENT:\n\t\t\tthrow new FileNotFoundException(filename + \": not found\");\n\t\tcase ENOTDIR:\n\t\t\tthrow new FileNotFoundException(\"a component in path of \"\n\t\t\t\t\t+ filename + \" is not directory\");\n\t\t}\n\t}",
"public void testNonExistentFile() {\n TestWARCBatchJob job = new TestWARCBatchJob();\n boolean success =\n job.processFile(NON_EXISTENT_FILE, new ByteArrayOutputStream());\n assertEquals(\"Should record exactly one exception\",\n job.getExceptionArray().length, 1);\n assertFalse(\"Should fail on missing file\", success);\n }",
"public void myMethod() throws FileNotFoundException {\n\t\ttry {\n\t\tsoccer = new FileInputStream(\"soccer.txt\");\n\t\t} catch (FileNotFoundException f) {//checked exception handled here\n//\t\t\tf.printStackTrace();\n\t\tSystem.out.println(\"file not found\");//throw fnfe; //this needs to be handled or declared\n\t\t}\n\t\t}",
"@Override\n\tpublic FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\t\tSystem.out.println(\"Error Accessing File\"+file.toAbsolutePath());\n\t\tSystem.out.println(exc.getLocalizedMessage());\n\t\t\n\t\t\n\t\t\n\t\treturn super.visitFileFailed(file, exc);\n\t}",
"@Override\n public void fileNotFound(String path, Throwable cause) {\n headers.put(CONTENT_TYPE, MediaType.getType(\".html\"));\n send404NotFound(ctx, headers, \"404 NOT FOUND\".getBytes(), true);\n }",
"@Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n LOG.warn(\"An IOException occurred while reading a file on path {} with message: {}\", file, exc.getMessage());\n LOG.debug(\"An IOException occurred while reading a file on path {} with message: {}\", file,\n LOG.isDebugEnabled() ? exc : null);\n return FileVisitResult.CONTINUE;\n }",
"@Override\n public String getMessage() {\n return \"File not found.\";\n }",
"@Test(expected = PipelineException.class)\n public void testNonExistentDirectory() throws FileNotFoundException {\n\n KicIngester.ingestScpFiles(KicIngester.getScpFiles(\n findNonExistentDirectory(), SCP_FILENAME_PATTERN));\n }",
"@org.junit.Test(expected = FileNotFoundException.class)\r\n public void testProspectParserFileNotFound() throws FileNotFoundException {\r\n\r\n ProspectParser p = new ProspectParser(new File(\"TjollahoppTjollahej.asd\"), namePattern, digitPattern);\r\n p.parse();\r\n\r\n }",
"private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }",
"@Test (expected=LogHandlerException.class)\n\t\t\tpublic void filedoesntExistException() throws PizzaException, LogHandlerException{\n\t\t\t\tLogHandler.populatePizzaDataset(\"invalidFilePath\");\n\t\t\t}",
"public static void couldNotReadFromFile(QWidget parent){\n \t\tQMessageBox.information(parent, \"Info\", \"En error oppsto.\"+\n \t\t\t\t\"\\nKunne ikke skrive fra fil.\");\n \t}",
"@Test\n void Load_NonExistentFileName() {\n XmlImporter importer = new XmlImporter();\n\n assertThrows(FileNotFoundException.class, () -> importer.Load(\"c:\\\\DoesNotExist\\\\DoesNotExist.xml\"));\n }",
"private static void searchFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File targetFile = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileExists = targetFile.exists();\n if (fileExists) {\n System.out.println(\"File is found on current directory.\");\n } else {\n throw new FileNotFoundException(\"No such file on current directory.\");\n }\n }",
"private void reportMissingFile(JavaClass javaClass) {\n\t\tstatus.add(new Status(IStatus.ERROR, status.getPlugin(), 1, pattern\n\t\t\t\t+ \": A sourcefile for the \\\"\" + javaClass.className() + \"\\\" \"\n\t\t\t\t+ (javaClass.isInterface() ? \"interface\" : \"class\")\n\t\t\t\t+ \" is missing. Try to generate code or update the model.\"\n\t\t\t\t+ \" \", null));\n\t}",
"public List<FileWithFaultLocations> getFaultyFiles();",
"@Test\n public void AppFileError() {\n try{\n App.main(new String[]{TEST_PATH + \"asdfghjkl-nice.dot\",\"1\"});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Input file does not exist\");\n }\n }",
"public FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}",
"public FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}",
"public FileVisitResult visitFileFailed(Path file, IOException e) {\r\n\t\t\t\t\treturn FileVisitResult.CONTINUE;\r\n\t\t\t\t}",
"public void unknownFile(final PrintWriter errout, final String file)\n {\n printMessage(errout, Level.ERROR, \"unknown_file\", \"Tidy\", file);\n }",
"public static void insurePathToFileExists(String filename) {\r\n insurePathToFileExists(new File(filename));\r\n }",
"private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }",
"public static void fileExists(String fileName)throws FileNotFoundException{\r\n File file=new File(fileName);\r\n if(!file.exists()){\r\n throw new FileNotFoundException(file.getName());\r\n }\r\n }",
"@ExceptionHandler(value=FileNotFound.class)\n\tpublic void resolveException(String ex,HttpServletResponse response) {\n\t\ttry {\n\t\t\tresponse.getOutputStream().println(\"Warning: File vuoto\\nException message: \"+ex);\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t}\n\t}",
"protected void validateFile() {\r\n\t\tFile f = new File(FileUltil.joinPath(dOutputFolder, dFileName));\r\n\t\tif (f.exists() && !f.isDirectory()) {\r\n\t\t\tdFileName = \"Copy of \" + dFileName;\r\n\t\t\tvalidateFile();\r\n\t\t}\r\n\t}",
"@Test\n public void loadFromFileWithWrongConnects() throws Exception{\n fileInOut.setFilePath(\"src/wrongConnects\");\n fileInOut.loadFromFile();\n }",
"public void filesNotFound(File... f) { }",
"public void filesNotFound(File... f) { }",
"private File validateFile(String filename)\n {\n if (filename == null)\n {\n throw new IllegalArgumentException(\"Filename is null\");\n }\n File f = new File(filename);\n //if (!f.exists()) sometimes this throws false even if the program does exist.\n //{\n // throw new IllegalArgumentException(\"Path \"+filename+\" does not refer to a file\");\n //}\n return f;\n }",
"public void onFileFolderOpenFailed(File file);",
"boolean getFileErr();",
"private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }",
"private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}",
"public FileNotFoundException(String message) {\n super(message);\n }",
"@Test\n void nonEXistingFile () {\n assertThatThrownBy(()-> testObj.parseMap(\"no file\")).isInstanceOf(PacmanConfigurationException.class);\n }",
"private boolean isIgnoredFile(String filename) {\n String[] splitClassName = filename.split(\"\\\\.\");\n return Arrays.asList(IGNORE_FILE).contains(splitClassName[splitClassName.length - 1]);\n }",
"public void errorFileEscenario() {\n\t\tvisorEscenario.errorFileEscenario();\t\n\t}",
"@ExceptionHandler(StorageFileNotFoundException.class)\n public ResponseEntity<?> handleStorageFileNotFound(StorageFileNotFoundException exc) {\n return ResponseEntity.notFound().build();\n }",
"private static boolean isBadFile(String file) {\n for (int i=0; i<configFiles.size(); i++) {\n try {\n String s = (String) configFiles.get(i);\n if (!config.isParsed(s)) {\n config.addFile(s);\n }\n }\n catch (IOException exc) {\n LogTools.trace(exc);\n }\n }\n return !config.testFile(file) && !file.endsWith(\".bioformats\");\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"private File findNonExistentDirectory() throws FileNotFoundException {\n final int MAX_TRIES = 10000;\n for (int i = 0; i < MAX_TRIES; i++) {\n File dir = new File(TMP_DIR_BASE + i);\n if (!dir.exists()) {\n return dir;\n }\n }\n\n throw new FileNotFoundException(\"Directories from \" + TMP_DIR_BASE\n + \"/0 to \" + TMP_DIR_BASE + \"/\" + MAX_TRIES + \" already exist\");\n }",
"public static void main(String[] args) \n { \n try \n { \n FileInputStream Program9 = new FileInputStream(\"/downloads/except.txt\");\n Program9.toString();\n } \n catch (FileNotFoundException e) \n { \n System.out.println(\"File does not exist\"); \n } \n }",
"@Override\n\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\tLog.d(\"arvi\", \"arvi3333\");\n\t\t}",
"private void checkForOrphanFiles() {\n List<String> dbFileNames = getPhotoFilesInDatabase();\n List<String> dirFileNames = getPhotoFilesInDirectory();\n\n // Find files that are not in the db.\n dirFileNames.removeAll(dbFileNames);\n\n // Create a new photo shoot for the orphaned photos.\n if (dirFileNames.size() > 0) {\n long shootId = createOrphanShoot(dirFileNames);\n\n GhostPhotoPreferences.setHasOrphanPhotoShootBeenCreated(getApplicationContext(), true);\n Log.d(LOG_TAG, \"checkForOrphanFiles: Created orphan photo shoot: \" + shootId);\n }\n }",
"@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }",
"public void addFailedFilePath(String path){failedFilepaths.add(path);}",
"@Override\r\n\t\tpublic void onFileNotFoundException(FileNotFoundException e, Object state) {\n\t\t\t\r\n\t\t}",
"@Test\n\tpublic void executeInvalidFileForSlash() {\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\/\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"//\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"/\"));\n\t}",
"@Override\n public void findFiles_hdfs_native() throws Exception {\n assumeTrue( !isWindows() );\n super.findFiles_hdfs_native();\n }",
"@Test\n public void testFileOpen() {\n \n FileHandler fileToTest;\n \n fileToTest = new FileHandler(\"Kalle.xml\");\n \n try {\n fileToTest.openFile();\n fail(\"Should have raised a fileNotFoundException\");\n }\n catch (FileNotFoundException fnf) {\n }\n }",
"public static void printFileError() {\n printLine();\n System.out.println(\" Oops! Something went wrong with duke.txt\");\n printLine();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tPath path=Paths.get(\"E:\\\\Online Sessions\\\\Java Morning 9-11\\\\testfile.txt\");\n\t\tboolean fileExists=Files.notExists(path, LinkOption.NOFOLLOW_LINKS);\n\t\tSystem.out.println(fileExists);\t\n\n\t}",
"@Override\n public MethodOutcome fileAlreadyExistsOutcome() {\n return new MethodOutcome(MethodOutcome.Type.THROWS_EXCEPTION, IOException.class);\n }",
"private void checkUntracked(String fileName, HashMap<String, Blob> cur) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists() && (cur.get(fileName) == null\n || !cur.get(fileName).getContent()\n .equals(Utils.readContentsAsString(fileInCWD)))) {\n System.out.println(\"There is an untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n }",
"private void handleMissingResource(MissingResourceException e) {\r\n System.err.println();\r\n System.err.println(\"Can't find the properties file \"\r\n + \"that contains the image names.\");\r\n System.err.println(\"Its name should be imagenames.properties, \"\r\n + \"and it should\");\r\n System.err.println(\"contain a single line that specifies \"\r\n + \"one or more image\");\r\n System.err.println(\"files to be found in a directory \"\r\n + \"named images. Example:\");\r\n System.err.println();\r\n System.err.println(\" images=Bird.gif Cat.gif Dog.gif\");\r\n System.err.println();\r\n throw (e); //Used to be exit(1), but that causes the console to\r\n //go away under Java Web Start; this way, you're\r\n //more likely to see a relevant error message.\r\n }",
"@Test\n\tpublic void invalidFileTest() {\n\t\t// Test error handling: invalid file\n\t\tfileName = \"invalid.txt\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file\n\t\tfileName = \"./misc/secondinvalid.txt\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file name with numbers\n\t\tfileName = \"12345\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file name with spaces\n\t\tfileName = \"not a file\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: blank file\n\t\tfileName = \"\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\tfileName = \" \";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\tfileName = null;\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t}",
"@Test(expected = IOException.class)\n\tpublic void testMainInvalidFilePath() throws Exception {\n\t\tString[] arguments = { \"/invalid/file/path\" };\n\t\tAutomaticMowerMain.main(arguments);\n\t}",
"void moveFileToDirectoryNotValidFiles(String pathToFile);",
"@Test\n\tpublic void testWellknownFileAnalyzers() {\n\t\tfinal File py = new File(\"./src/test/resources/file.py\");\n\t\tFileAnalyzer fa = FileAnalyzerFactory.buildFileAnalyzer(py);\n\t\tassertTrue(fa instanceof PythonFileAnalyzer);\n\t\t\n\t\tfinal File d = new File(\"./src/test/resources\");\n\t\tfa = FileAnalyzerFactory.buildFileAnalyzer(d);\n\t\tassertTrue(fa instanceof DirAnalyzer);\n\t\t\n\t\tfinal File ja = new File(\"./src/test/resources/file.java\");\n\t\tfa = FileAnalyzerFactory.buildFileAnalyzer(ja);\n\t\tassertTrue(fa instanceof JavaFileAnalyzer2);\n\t}",
"boolean haveToSkip(String path);",
"@SuppressWarnings(\"ResultOfMethodCallIgnored\")\r\n private static void fileExists(String filepath) throws IOException {\r\n File file = new File(filepath + filePath);\r\n if (!file.exists()) {\r\n file.createNewFile();\r\n }\r\n }",
"public void setIgnoreResourceNotFound(boolean ignoreResourceNotFound) {\n\t\tthis.ignoreResourceNotFound = ignoreResourceNotFound;\n\t}",
"private void showInformationAboutWrongFile(Shell shell) {\n\t\tMessageDialog\n \t.openInformation(\n \t\t shell, \n \t\t \"Info\",\n \t\t \"Please select a *.\" + TestCasePersister.FILE_EXTENSION + \" file\");\n\t}",
"@Override\n\t\tpublic void onFileNotFoundException(FileNotFoundException e,\n \t\t\tObject state) {\n \n \t}",
"@Test\n public void givenStateCodeExtension_WhenFalse_ReturnExceptionFileNotFound() {\n String CSV_FILE_PATH = \"src/test/resources/StateCode.jpg\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.NO_FILE_FOUND, e.typeOfException);\n }\n }",
"@Test\n public void givenStateCensusAnalyserFile_WhenImproperFileName_ReturnsException() {\n String CSV_FILE_PATH = \"src/test/resources/StateCensus.jpg\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.NO_FILE_FOUND, e.typeOfException);\n }\n }",
"public ConfigFileNotFoundException(String msg) {\n\tsuper(msg);\n }",
"@Override\r\n public void handleIOException(\r\n File file,\r\n java.io.IOException cause\r\n )\r\n {\n }",
"private void checkFail(String filename) throws IOException {\n\t\tChecker checker = new Checker();\n\t\ttry {\n\t\t\tthis.compiler.check(parse(filename));\n\t\t\tchecker.check(parse(filename));\n\t\t\tfail(filename + \" shouldn't check but did\");\n\t\t} catch (ParseException exc) {\n\t\t\t// this is the expected behaviour\n\t\t}\n\t}",
"@Override\r\n\tpublic InputStream getFile(String filepath) throws FileSystemUtilException {\r\n\t\t\r\n\t\tthrow new FileSystemUtilException(\"000000\",null,Level.ERROR,null);\t\r\n\r\n\t}",
"static void ignore() {\n }",
"private void showInformationAboutBrokenFile(Shell shell) {\n\t\tMessageDialog\n \t.openInformation(\n \t\t shell, \n \t\t \"Info\",\n \t\t \"There was error during test cases generation, make sure selected file is correct!\");\n\t}",
"@Test(expected = Exception.class)\n public void givenThatFileDoesNotExistThrowException() throws Exception {\n String[] args = new String[1];\n args[0] = testFile + \"test\";\n\n try{\n ConferenceManager.main(args);\n } catch (Exception e) {\n assertEquals(e.getMessage(), \"File cant be found - \" + testFile + \"test\"); // TODO: check spelling in assertion messages\n throw e;\n }\n fail(\"Exception not thrown\");\n\n }",
"public boolean isFile() { return false; }",
"public boolean fileExists(Context context, String filename)\r\n{\r\n File file = context.getFileStreamPath(filename);\r\n if(file == null || !file.exists())\r\n {\r\n return false;\r\n }\r\nreturn true;\r\n}",
"protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please set the path to the Rhapsody Project !\");\n else\n if(value.length()<4)\n warning(\"isn't the path too short?\");\n else {\n \tFile file = new File(value);\n \tif (file.isDirectory()) {\n \t\terror(\"you entered a directory please select the *.rpy file !\");\n \t} else \n \t\t//TODO add more checks\n \t\tok();\n }\n\n }",
"public void onException( String path) {\n LOG.warn(\"\\nThe element not found by path =>\" + path);\n }",
"public void checkFile() {\n\t\tFile file = new File(\"src/Project11Problem1Alternative/names.txt\");\n\t\tSystem.out.println(file.exists() ? \"Exists!\" : \"Doesn't exist!\");\n\t\tSystem.out.println(file.canRead() ? \"Can read!\" : \"Can't read!\");\n\t\tSystem.out.println(file.canWrite() ? \"Can write!\" : \"Can't write!\");\n\t\tSystem.out.println(\"Name: \" + file.getName());\n\t\tSystem.out.println(\"Path: \" + file.getPath());\n\t\tSystem.out.println(\"Size: \" + file.length() + \" bytes\");\n\t}",
"public void findMissingExecutableScenario() throws CustomException{\n\t\tfor(int k = 0 ; k <= testCaseYCnt-1; ++k){\t\t\t\t\r\n\t\t\tif(!featurefilelistOFlist.get(k).equals(featureFileListOFListTestSheet.get(k))){\r\n\t\t\t\tthrow new CustomException(featurefilelistOFlist, featureFileListOFListTestSheet, testcasename, k);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"No Mismatch in Feature Files name on Scenario and TC Sheets\");\r\n\t}",
"@Test\n public void wrongFilterFileReturnsNullAndPrintsMessage() {\n String[] inputArgs = new String[] {\"-i\", \"/path/\", \"-o\", \"/path/\", \n \"-a\", apkFile.getAbsolutePath(), \n \"-f\", \"/wrong/\"};\n ArgumentReader sut = new ArgumentReader(inputArgs);\n\n Arguments args = sut.read();\n\n assertThat(args, nullValue());\n String message = File.separator + \"wrong is not found!\";\n assertThat(errContent.toString(), containsString(message));\n }",
"public static void checkFile(Path path) {\n\n if (!path.isAbsolute()) {\n System.out.format(\"%s must be an absolute path to a file.\", path);\n System.exit(0);\n } else if (!Files.exists(path)) {\n System.out.format(\"%s does not exist.\", path);\n System.exit(0);\n }\n\n // Verify that the path references a file\n try {\n BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);\n if (!attr.isRegularFile()) {\n System.out.format(\"%s is not a file.\", path);\n System.exit(0);\n }\n } catch (IOException e) {\n System.err.println(\"I/O error: \" + e);\n e.printStackTrace();\n System.exit(1);\n }\n }",
"@Test\n\tpublic void testBadRead(){\n\t\ttry{\n\t\t\tXMLReader reader = new XMLReader(\"nonExistent\");\n\t\t\treader.close();\n\t\t\tfail(\"XMLReader should not have been able to read nonexistent file\");\n\t\t} catch (FileNotFoundException e){\n\t\t}\n\t}",
"public void rejects(String input, boolean isFilePath) {\n\t\ttry {\n\t\t\tif (isFilePath) {\n\t\t\t\tcompiler.parse(new File(input));\n\t\t\t} else {\n\t\t\t\tcompiler.parse(input);\n\t\t\t}\n\t\t\tAssert.fail(\"Should have failed, but passed (Input: \" + input + \")\");\n\t\t} catch (ParseException e) {\n\t\t\t// Pass the test\n\t\t\tSystem.out.println(\"Caught expected errors (Input: '\" + input + \"'): \");\n\t\t\te.print();\n\t\t\tSystem.out.println();\n\n\t\t} catch (IOException e) {\n\t\t\tAssert.fail(\"File does not exist\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\r\n\tvoid testImportRecordsShouldThrowExceptionOnInvalidFile() {\r\n\t\tRecordParser parser = new RecordParser();\r\n\t\tassertThrows(FileNotFoundException.class, () -> {\r\n\t\t\tparser.importRecords(new File(\"unknown.txt\"));\r\n\t\t});\r\n\t}",
"public static void readMyFile() throws IOException {\n\n List<String> allLines = Files.readAllLines(Paths.get(\"src/ErfansInputFile\"));\n System.out.println(\"allLines = \" + allLines);\n System.out.println(\"Reading the file in my computer. \");\n\n throw new FileNotFoundException(\"Kaboom, file is not found!!!\");\n }",
"public Superfluous() {\n\t\t//Give the checkFolder() files to work with\n\t\tfor (File toDo : myFile) {\n\t\t\tcheckFolder(toDo);\n\t\t}\n\t\t/*Print out the defective files*/\n\t\tSystem.out.println(\"**********************************\");\n\t\tfor (File guilty : guiltyFiles) {\n\t\t\t//System.out.println(guilty.getAbsolutePath());\n\t\t\tdesignFile(guilty);\n\t\t}\n\t\tSystem.out.println(\"The Number of files are: \" + guiltyFiles.size());\n\t}",
"@java.lang.Deprecated boolean hasFile();",
"public static File getNonExistantFile(File file) {\n if (!file.exists())\n return file;\n\n int id = 0;\n\n File result = file;\n while (result.exists())\n result = getFile(file, ++id);\n\n return result;\n }",
"private void dialogFichierInexistant(File file){\n\t\tJOptionPane.showMessageDialog(null, \"le fichier \" + file.getName() +\"\\n'existe pas\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t}",
"public static void saveMissingStringFiles() {\n\t\tif (foundStringsIndexList.size() < 1)\n\t\t\treturn;\n\t\tif (!latestStringsFile.exists())\n\t\t\texportStrings();\n\t\tif (!stringsPackedFile.exists())\n\t\t\texportStringsPacked();\n\t\tif (!stringTreeFile.exists())\n\t\t\texportStringTree();\n\t}",
"public boolean fileExistance(String fileName) {\n File file = getActivity().getFileStreamPath(fileName);\n return file.exists();\n }",
"private void checkFile(File dir, String Language) {\n //디렉토리가 없으면 디렉토리를 만들고 그후에 파일을 카피\n if (!dir.exists() && dir.mkdirs()) {\n copyFiles(Language);\n }\n //디렉토리가 있지만 파일이 없으면 파일카피 진행\n if (dir.exists()) {\n String datafilepath = mDataPath + \"tessdata/\" + Language + \".traineddata\";\n File datafile = new File(datafilepath);\n if (!datafile.exists()) {\n copyFiles(Language);\n }\n }\n }",
"@Override\n public boolean exists(File file) {\n\treturn false;\n }",
"boolean hasFileLocation();",
"public static void printReadFileIdentificationError() {\n System.out.println(Message.READ_FILE_IDENTIFICATION_ERROR);\n }",
"public static void searchFile(String path){\n try {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter the File Name You need to Find:\");\n String name = scanner.next();\n File file = new File(path + \"/\" + name);\n if (file.isFile()) {\n file.getName();\n System.out.println(\"File Exists\");\n }\n else{\n System.out.println(\"File Not Found\");\n\n }\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"public void testPropFindForNonExistingWorkspace() throws Exception\n {\n String file = TestUtils.getFileName();\n\n ContainerResponse response =\n service(WebDAVMethods.PROPFIND, getPathWS() + \"_\" + file, \"\", null, null);\n assertEquals(HTTPStatus.CONFLICT, response.getStatus());\n }",
"boolean haveToSkip(String path, boolean addSrcPrefix, boolean withoutFilename);"
] | [
"0.6842304",
"0.6735484",
"0.65035856",
"0.63973796",
"0.63890207",
"0.63792163",
"0.6374305",
"0.63126075",
"0.62014395",
"0.6199282",
"0.6066597",
"0.59963447",
"0.594404",
"0.586051",
"0.5851542",
"0.584431",
"0.58437175",
"0.57941514",
"0.57735527",
"0.57735527",
"0.57735527",
"0.57671314",
"0.57661736",
"0.57274765",
"0.57252467",
"0.57180744",
"0.56992906",
"0.5683567",
"0.5682657",
"0.5682657",
"0.56525487",
"0.56421125",
"0.56371224",
"0.5629004",
"0.56169283",
"0.5609178",
"0.5593873",
"0.5588497",
"0.5562704",
"0.5560145",
"0.55530035",
"0.55354774",
"0.5495937",
"0.5490171",
"0.5489819",
"0.5477092",
"0.5476276",
"0.5475706",
"0.54359144",
"0.5426189",
"0.5412249",
"0.5407505",
"0.54024243",
"0.5398851",
"0.5383808",
"0.53804094",
"0.5375601",
"0.53747886",
"0.5368056",
"0.5366803",
"0.53637564",
"0.5356623",
"0.53488016",
"0.53415143",
"0.5340635",
"0.53368586",
"0.5335015",
"0.5334435",
"0.53337723",
"0.5321548",
"0.5311751",
"0.53043056",
"0.53035456",
"0.5299809",
"0.52981144",
"0.5286796",
"0.5260624",
"0.5248495",
"0.52423817",
"0.5239041",
"0.522767",
"0.52206737",
"0.52144915",
"0.5183746",
"0.5182101",
"0.51790446",
"0.51789945",
"0.5178221",
"0.51763433",
"0.5175738",
"0.51697665",
"0.51664144",
"0.5163584",
"0.5156468",
"0.51557916",
"0.51540923",
"0.51534575",
"0.5141852",
"0.5140142",
"0.5137845"
] | 0.5400749 | 53 |
Ignore IO Facebook errors | public void onIOException(IOException e) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onError(FacebookException exception) {\n }",
"@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onFacebookError(FacebookError fberror) {\n\n\t\t\t\t\t\t}",
"@Override\r\n\t\tpublic void onFacebookError(FacebookError e) {\n\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onFacebookError(FacebookError e) {\n\n\t\t\t}",
"@Override\n public void onError(FacebookException exception) {\n\n }",
"@Override\n public void onError(FacebookException exception) {\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void onFacebookError(FacebookError e, Object state) {\n \n \t}",
"@Override\r\n\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onFacebookError(FacebookError e) {\n\t\t\t\t\t\t\tToast.makeText(FBactivity.this, \"fb error\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t public void onFacebookError(FacebookError fberror) {\n\n\t\t\t\t\t errorMessage = \"Facebook Error Occured\";\n\t\t\t\t\t getResponse();\n\t\t\t\t }",
"@Override\n\t\tpublic void onFacebookError(FacebookError e, Object state) {\n\t\t\tLog.d(\"arvi\", \"arvi444\");\n\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"private void ensureOpen() throws IOException {\n if (out == null) {\n throw new IOException(\n/* #ifdef VERBOSE_EXCEPTIONS */\n/// skipped \"Stream closed\"\n/* #endif */\n );\n }\n }",
"@Override\n public void onIOException(IOException e) {\n }",
"@Override\r\n\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\r\n\t\t}",
"@Override\n\t\tpublic void onIOException(IOException e, Object state) {\n \n \t}",
"@Override\n\t\t\tpublic void onError(SocialAuthError arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onError(FacebookException e) {\n Log.e(\"FAcebook\", e.getMessage());\n Util.showErrorSnackBar(getView(), e.getMessage());\n\n }",
"@Override\r\n\t\tpublic void onIOException(IOException arg0) {\n\t\t\tif(pd!=null)pd.dismiss();\r\n\t\t\tToast.makeText(CommentWeibo.this, \"微博评论失败。\", Toast.LENGTH_SHORT).show();\r\n\t\t\tfinish();\r\n\t\t}",
"public void onStreamError(Throwable throwable);",
"protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }",
"@Override\n\tpublic void onIOException(IOException arg0) {\n\n\t}",
"@Override\n\t\t\t\t public void onError(DialogError error) {\n\n\t\t\t\t\t errorMessage = \"Facebook Error Occured\";\n\t\t\t\t\t getResponse();\n\n\t\t\t\t }",
"protected void onConnectionError() {\n\t}",
"@Override\n\t\t\t\t\t\tpublic void onError(DialogError e) {\n\t\t\t\t\t\t\tToast.makeText(FBactivity.this, \"dialogError\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}",
"private void m44337f() throws BaseException {\n Throwable th = this.f30622n;\n if (th != null) {\n if (th instanceof StreamClosedException) {\n throw new BaseException(1068, \"async reader closed!\");\n }\n DownloadUtils.m44505a(th, \"async_read\");\n }\n throw new BaseException(1069, \"async reader terminated!\");\n }",
"@Override\n\tpublic void onError(WeiboException arg0) {\n\n\t}",
"@Override\n\tpublic void demoCheckedException() throws IOException {\n\n\t}",
"@Override\n protected boolean continueOnWriteError() {\n return true;\n }",
"@Override\n\tpublic void onSkipInRead(Throwable t) {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void onIOException(IOException arg0) {\n\t\t\tif(pd!=null)pd.dismiss();\r\n\t\t\tToast.makeText(CommentWeibo.this, \"转发失败。\\r\\n\"+arg0.getMessage(), Toast.LENGTH_SHORT).show();\r\n\t\t\tfinish();\r\n\t\t}",
"@Override\n public void onStreamError(Throwable throwable)\n {\n if (throwable instanceof MultiPartIllegalFormatException)\n {\n //If its an illegally formed request, then we send back 400.\n _streamResponseCallback.onError(Messages.toStreamException(RestException.forError(400, \"Illegally formed multipart payload\")));\n return;\n }\n //Otherwise this is an internal server error. R2 will convert this to a 500 for us. As mentioned this should never happen.\n _streamResponseCallback.onError(throwable);\n }",
"@Override\n\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\tLog.d(\"arvi\", \"arvi2222\");\n\t\t}",
"private final void m37301b(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i == 410) {\n throw ((Throwable) new NoUsernameAvailableException());\n }\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }",
"private void postErrorPage() throws IOException {\n out.println(OK);\n System.out.println(NO);\n out.println(htmlType);\n out.println(closed);\n out.println(\"Content-Length: \" + ERROR_FILE.length());\n out.println(ENDLINE);\n String htmlLine = ERROR_READER.readLine();\n while (htmlLine != null) {\n out.println(htmlLine);\n htmlLine = ERROR_READER.readLine();\n }\n ERROR_READER.close();\n }",
"private void processCurrentMediaError(Exception ex){\n logger.error(Thread.currentThread().getName() + \" can't open [\" + streamSpec.getAudioMedias().get(0) + \"], skipping file\", ex);\n consumeMedia(0);\n frameIterator = SilentMediaReader.getInstance();\n updateCurrentMedia(null);\n status = Status.PLAYING_SILENCE;\n for (StreamListener listener : streamListeners) {\n listener.mediaChanged();\n }\n }",
"private static Response handleIOError(IOException e) {\n log.log(Level.WARNING, \"Error retrieving values\", e);\n ServiceError errMsg = new ServiceError(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), \"Internal error retrieving value. If this error persists, please contact the site administrator\");\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(errMsg)\n .build();\n }",
"protected T onError(String uri) {\r\n\t\treturn null;\r\n\t}",
"void uploadFailed(StreamingErrorEvent event);",
"@Test\n public void testIOExceptionWhileEvaluatingQueries() {\n assertStackTraceOfIOExceptionWhileEvaluatingQueries(PROJOG_DEFAULT_PROPERTIES);\n }",
"protected boolean closeOnReadError(Throwable cause) {\n/* 606 */ if (cause instanceof SocketException) {\n/* 607 */ return false;\n/* */ }\n/* 609 */ return super.closeOnReadError(cause);\n/* */ }",
"@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}",
"@Override\n public void ensureOpen() throws IOException {\n }",
"@Test\n public void testBlobNoJobFetchWithTooManyFailures() throws IOException {\n testBlobFetchWithTooManyFailures(new VoidBlobStore(), null, TRANSIENT_BLOB);\n }",
"void onPhotoError();",
"Object getFailonerror();",
"Object getFailonerror();",
"public static void parseHtmlError(BufferedReader in) throws IOException, LoginException, BugzillaException {\n \t\tHtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);\n \n \t\tboolean isTitle = false;\n \t\tString title = \"\";\n \t\tString body = \"\";\n \n \t\ttry {\n \n \t\t\tfor (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {\n \t\t\t\tbody += token.toString();\n \t\t\t\tif (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == HtmlTag.Type.TITLE\n \t\t\t\t\t\t&& !((HtmlTag) (token.getValue())).isEndTag()) {\n \t\t\t\t\tisTitle = true;\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \n \t\t\t\tif (isTitle) {\n \t\t\t\t\t// get all of the data in the title tag\n \t\t\t\t\tif (token.getType() != Token.TAG) {\n \t\t\t\t\t\ttitle += ((StringBuffer) token.getValue()).toString().toLowerCase() + \" \";\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t} else if (token.getType() == Token.TAG\n \t\t\t\t\t\t\t&& ((HtmlTag) token.getValue()).getTagType() == HtmlTag.Type.TITLE\n \t\t\t\t\t\t\t&& ((HtmlTag) token.getValue()).isEndTag()) {\n \n\t\t\t\t\t\tif (title.indexOf(\"login\") != -1\n \t\t\t\t\t\t\t\t|| (title.indexOf(\"invalid\") != -1 && title.indexOf(\"password\") != -1)\n \t\t\t\t\t\t\t\t|| title.indexOf(\"check e-mail\") != -1) {\n \t\t\t\t\t\t\tthrow new LoginException(IBugzillaConstants.ERROR_INVALID_USERNAME_OR_PASSWORD);\n \t\t\t\t\t\t} else if (title.indexOf(IBugzillaConstants.ERROR_MIDAIR_COLLISION) != -1) {\n \t\t\t\t\t\t\tthrow new BugzillaException(IBugzillaConstants.ERROR_MSG_MIDAIR_COLLISION);\n \t\t\t\t\t\t} else if (title.indexOf(IBugzillaConstants.ERROR_COMMENT_REQUIRED) != -1) {\n \t\t\t\t\t\t\tthrow new BugzillaException(IBugzillaConstants.ERROR_MSG_COMMENT_REQUIRED);\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\tthrow new UnrecognizedReponseException(body);\n \n \t\t} catch (ParseException e) {\n \t\t\tthrow new IOException(\"Unable to parse result from repository:\\n\" + e.getMessage());\n \t\t}\n \t}",
"private void throwsError() throws OBException {\n }",
"@Override\n public void onError() {\n\n }",
"@Test\n\tpublic void testBadRead(){\n\t\ttry{\n\t\t\tXMLReader reader = new XMLReader(\"nonExistent\");\n\t\t\treader.close();\n\t\t\tfail(\"XMLReader should not have been able to read nonexistent file\");\n\t\t} catch (FileNotFoundException e){\n\t\t}\n\t}",
"@Override\n\tpublic void onNetWorkError() {\n\t\t\n\t}",
"void handleError(Exception ex);",
"@Override\n\tprotected URLConnection openConnection(final URL u) throws IOException {\n\t\treturn null;\n\t}",
"@Override\n public void onError(UiError e) {\n Toast.makeText(TabMainActivity.this, \"分享失败!\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n protected boolean closeOnReadError(Throwable cause) {\n if (cause instanceof SocketException) {\n return false;\n }\n return super.closeOnReadError(cause);\n }",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}",
"static boolean isBroken(Exception e) {\n\t\treturn e instanceof SocketException; // check broken pipe?\n\t}",
"public abstract void disableStreamFlow();",
"public void handleError(ClientHttpResponse response) throws IOException {\n }",
"protected abstract void handleRealtimeLinkCommitException(Throwable t);",
"@Override\r\n\t\t\t\tpublic void onFail(String desc) {\n\t\t\t\t Log.e(\"upload\",desc);\t\r\n\t\t\t\t}",
"@Override\r\n public void handleIOException(\r\n File file,\r\n java.io.IOException cause\r\n )\r\n {\n }",
"@Override\n public void onError(Exception e) {\n }",
"private void handleBadContent (HttpHeader header, String desc) {\n\tgetLogger ().logDebug (\"bad content for:\\n\" + header);\n\tdoError (400, \"Bad content: \" + desc);\n }",
"private void handleFaceAuthFailed() {\n Assert.isMainThread();\n setFaceRunningState(0);\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricAuthFailed(BiometricSourceType.FACE);\n }\n }\n }",
"protected void VerifyUrlDoesntHaveAnError() {\n\t\tif (urlHasAnError())\n\t\t\tReports.logAMessage(LogStatus.ERROR, \"BasePage: URL has an error\");\n\t}",
"private final void m37299a(int i) throws Exception {\n if (Callback.DEFAULT_DRAG_ANIMATION_DURATION <= i) {\n if (299 >= i) {\n return;\n }\n }\n if (i != 405) {\n if (i != 409) {\n if (i != 410) {\n if (i != 422) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Network Error: status code \");\n stringBuilder.append(i);\n throw new IOException(stringBuilder.toString());\n }\n }\n }\n }\n throw ((Throwable) new UsernameTakenException());\n }",
"public void onConnectionError()\n\t\t{\n\t\t}",
"@Override\n public void onMachineBroken()\n {\n \n }",
"@Override\n public void onError(Platform arg0, int arg1, Throwable arg2) {\n mHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(context, \"分享失败\", Toast.LENGTH_SHORT).show();\n }\n });\n if (mShareCallback!=null) {\n mShareCallback.onFailure();\n }\n }",
"private void handleFaceError(int i, String str) {\n int i2;\n Assert.isMainThread();\n if (DEBUG_FACE) {\n Log.d(\"KeyguardUpdateMonitor\", \"Face error received: \" + str);\n }\n if (i == 5 && this.mHandler.hasCallbacks(this.mCancelNotReceived)) {\n this.mHandler.removeCallbacks(this.mCancelNotReceived);\n }\n if (i == 5 && this.mFaceRunningState == 3) {\n setFaceRunningState(0);\n updateFaceListeningState();\n } else {\n setFaceRunningState(0);\n this.mFaceCancelSignal = null;\n }\n if ((i == 1 || i == 2) && (i2 = this.mHardwareFaceUnavailableRetryCount) < 10) {\n this.mHardwareFaceUnavailableRetryCount = i2 + 1;\n this.mHandler.removeCallbacks(this.mRetryFaceAuthentication);\n this.mHandler.postDelayed(this.mRetryFaceAuthentication, 500);\n }\n if (i == 9) {\n this.mLockPatternUtils.requireStrongAuth(8, getCurrentUser());\n }\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onBiometricError(i, str, BiometricSourceType.FACE);\n }\n }\n }",
"@Override\r\n\t\t\tpublic void onNetworkError(NetworkError networkError) {\n\r\n\t\t\t}",
"void onIOException(final IOException e);",
"@Override\r\n\tpublic void onWeiboException(WeiboException arg0) {\n\t\t\r\n\t}",
"public void exceptionEncountered(IOException ioe) {}",
"@Test\n public void throwsIOExceptionWhenCannotHash() throws IOException {\n File nonExistent = new File(\"nonExistent.gb\");\n\n thrown.expect(IOException.class);\n // Can not use message due to FileNotFoundException containing localized text on some OS:es\n\n // Throws\n new GameFile(nonExistent);\n }",
"@Override\n\tpublic void processIOException(IOExceptionEvent exceptionEvent) {\n\t}",
"@Override\n\t\tprotected boolean onError(final Exception e) {\n\t\t\treturn false;\n\t\t}",
"private void ensureOpen() throws IOException {\n if (closed) {\n throw new IOException(\"Stream closed\");\n }\n }",
"@Override\n\t\t\t\t\tpublic void onError(String url) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tpublic void onStartBlobStoreSessionFail() {\n\t\t\n\t}",
"void onError(Exception e);",
"private void onUnknownMessage(ACLMessage msg) {\n\t\tLOG.warn(\"received unknown message: {}\", msg);\n\t}",
"@Override\n public void failure(Throwable t)\n {\n System.err.println(\"Call to Embedded Social failed with exception: \" + t.getMessage());\n }",
"private static boolean isUnknownSource(String url) {\n return false;\n }",
"private void sendOldError(Exception e) {\n }",
"@ExceptionHandler(IOException.class)\n public ModelAndView handleIOException(Locale locale){\n ModelAndView modelAndView = new ModelAndView(\"/profile\");\n modelAndView.addObject(\"error\",messageSource.getMessage(\"image.io.exception\",null,locale));\n return modelAndView;\n }",
"@Override\n public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {\n log.error(\"Input Stream {} : {}\", name, e.getCause());\n Channel ch = e.getChannel();\n ch.close();\n channelAtomicReference.set(null);\n }",
"public void OnConnectionError();",
"public void onReceivedError();",
"public void checkError() throws IOException{\n if (transactionFailure == null) {\n FacesContext.getCurrentInstance().getExternalContext().\n redirect(\"converter.xhtml\");\n }\n }",
"void onErrorOccurred() {\n mUserAwarenessListener.onErrorOccurred(Errors.UNDEFINED);\n\n //start light sensor because eye tracking is not running we don't need light sensor now\n mLightIntensityManager.stopLightMonitoring();\n }",
"public static void handleFileNotFoundException() {\n System.out.println(\"\\tUnfortunately, I could not detect any files in the database!\");\n System.out.println(\"\\tBut don't worry sir.\");\n System.out.println(\"\\tI will create the files you might be needing later.\");\n Duke.jarvis.printDivider();\n }"
] | [
"0.64702576",
"0.6439135",
"0.6437884",
"0.64252186",
"0.6395685",
"0.639314",
"0.6317084",
"0.6311999",
"0.61553574",
"0.60991997",
"0.6070233",
"0.60419756",
"0.60060686",
"0.5905532",
"0.58971286",
"0.5880814",
"0.5843538",
"0.57671046",
"0.57141435",
"0.5600621",
"0.5531432",
"0.54953223",
"0.5380846",
"0.5330807",
"0.53202057",
"0.52466244",
"0.5214357",
"0.5213118",
"0.52099526",
"0.5202349",
"0.517235",
"0.5121099",
"0.51204455",
"0.5110723",
"0.5063206",
"0.50561696",
"0.50552464",
"0.504657",
"0.50297326",
"0.5023457",
"0.50222933",
"0.50172186",
"0.50141525",
"0.49885222",
"0.49680042",
"0.4961463",
"0.49581882",
"0.49352473",
"0.49193233",
"0.49138278",
"0.49005252",
"0.49005252",
"0.48997742",
"0.48995858",
"0.48972502",
"0.48958454",
"0.4882027",
"0.48777404",
"0.48755985",
"0.48737076",
"0.4853576",
"0.48444116",
"0.4842286",
"0.48408276",
"0.48402253",
"0.4836051",
"0.48306477",
"0.48293692",
"0.48273948",
"0.4815109",
"0.48116714",
"0.48049706",
"0.4796852",
"0.4795075",
"0.4794231",
"0.47899136",
"0.47773305",
"0.4775404",
"0.47718608",
"0.4769593",
"0.4762914",
"0.47569332",
"0.47551286",
"0.4752841",
"0.47502697",
"0.4747159",
"0.47468287",
"0.47467804",
"0.47398275",
"0.473976",
"0.47382352",
"0.47340083",
"0.47337845",
"0.4732109",
"0.47281945",
"0.47280237",
"0.47249153",
"0.47187555",
"0.47020692",
"0.470098"
] | 0.4788 | 76 |
TODO Autogenerated method stub | @Override
public void onComplete(String response, Object state) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onIOException(IOException e, Object state) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFileNotFoundException(FileNotFoundException e, Object state) {
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onMalformedURLException(MalformedURLException e, Object state) {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFacebookError(FacebookError e, Object state) {
} | {
"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 |
This method takes in an ArrayList of Comparable objects and sorts them in descending order using a bubble sorting algorithm. | public void bubbleSort(ArrayList <Comparable> list){
steps += 2; //init, check condition
for (int i = list.size() - 1; i >= 0; i --){
steps += 2; //init, check condition
for (int j = 0; j < i ; j ++){
steps += 5;
if (list.get(j).compareTo(list.get(j + 1)) < 0){
steps += 2;
swap(list, j, j + 1);
steps += 5;
}
steps += 2;
}
steps += 2;
}
System.out.println();
System.out.println("Bubble Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void bubbleSort() {\n\t\tint n = data.size();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tfor (int j = 1; j < n - i; j++) {\n\t\t\t\tif (data.get(j - 1) > data.get(j)) {\n\t\t\t\t\tswap(j, j - 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}",
"public static <T extends Comparable<? super T>> void bubbleSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = size - 1; i >= 0; i--){\n for(int j = 0; j < i; j++){\n if(list.get(j).compareTo(list.get(j + 1)) > 0){\n swap(list, j, j + 1);\n }\n }\n }\n }\n }",
"public void sortDescending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items, Collections.reverseOrder());\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}",
"public static void DecOrder(ArrayList<Integer> list)\n{\n // Your code here\n Collections.sort(list, Collections.reverseOrder());\n}",
"public void bubbleSort() {\n boolean unordered = false;\n do {\n unordered = false;\n for (int i = 0; i < array.length - 1; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n T temp = array[i + 1];\n array[i + 1] = array[i];\n array[i] = temp;\n unordered = true;\n }\n }\n } while (unordered);\n }",
"public static void main(String[] args) {\n ArrayList<Comparable> BestBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestInsertion = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstInsertion = new ArrayList<Comparable>();\r\n\r\n // Best and worst case bubbleSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestBubble.add(i * 2);\r\n } System.out.println(\"BestBubble in pre-sorted ascending order...\\n\" + BestBubble + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstBubble.add(x);\r\n }\r\n System.out.println(\"WorstBubble in descending order...\\n\" + WorstBubble + \"\\n\");\r\n\r\n // Best and worst case selectionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestSelection.add(i * 2);\r\n } System.out.println(\"BestSelection in pre-sorted ascending order...\\n\" + BestSelection + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstSelection.add(x);\r\n }\r\n System.out.println(\"WorstSelection in descending order...\\n\" + WorstSelection + \"\\n\");\r\n\r\n // Best and worst case insertionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestInsertion.add(i * 2);\r\n } System.out.println(\"BestInsertion in pre-sorted ascending order...\\n\" + BestInsertion + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstInsertion.add(x);\r\n }\r\n System.out.println(\"WorstInsertion in descending order...\\n\" + WorstInsertion + \"\\n\");\r\n\r\n // Sort every single instantiation of ArrayList\r\n MySorts.bubbleSortV(BestBubble);\r\n MySorts.bubbleSortV(WorstBubble);\r\n\r\n MySorts.selectionSortV(BestSelection);\r\n MySorts.selectionSortV(WorstSelection);\r\n\r\n MySorts.insertionSortV(BestInsertion);\r\n MySorts.insertionSortV(WorstInsertion);\r\n\r\n // Prints all the instantiations of ArrayList\r\n System.out.println(\"Sorted BestBubble...\\n\" + BestBubble + \"\\n\");\r\n System.out.println(\"Sorted WorstBubble...\\n\" + WorstBubble + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestSelection...\\n\" + BestSelection + \"\\n\");\r\n System.out.println(\"Sorted WorstSelection...\\n\" + WorstSelection + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestInsertion...\\n\" + BestInsertion + \"\\n\");\r\n System.out.println(\"Sorted WorstInsertion...\\n\" + WorstInsertion + \"\\n\");\r\n }",
"public void bubbleSort(ArrayList<Pokemon> p);",
"public void bubbleSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Bubble Sort\");\n System.out.println();\n\n steps = 0;\n for (int outer = 0; outer < list.size() - 1; outer++){\n for (int inner = 0; inner < list.size()-outer-1; inner++){\n steps += 3;//count one compare and 2 gets\n if (list.get(inner)>(list.get(inner + 1))){\n steps += 4;//count 2 gets and 2 sets\n int temp = list.get(inner);\n list.set(inner,list.get(inner + 1));\n list.set(inner + 1,temp);\n }\n }\n }\n }",
"@Test\n public void testReverseOrderSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i2.compareTo(i1);\n }\n });\n\n checkReverseOrder(\"Bubble sort doesn't work with other comparator!\", array);\n }",
"public static void sort(ArrayList<Comparable> list)\n {\n sort(list, 0, list.size() - 1);\n }",
"private static <E extends Comparable<? super E>> List<E > bubbleSort(List<E > comparable) {\n\t boolean changed = false;\n\t do {\n\t changed = false;\n\t for (int a = 0; a < comparable.size() - 1; a++) {\n\t if (comparable.get(a).compareTo(comparable.get(a + 1)) > 0) {\n\t E tmp = comparable.get(a);\n\t comparable.set(a, comparable.get(a + 1));\n\t comparable.set(a + 1, tmp);\n\t changed = true;\n\t }\n\t }\n\t } while (changed);\n\t \n\t\treturn comparable;\n\t}",
"public void bubbleSort(){\n for(int i = arraySize -1; i > 1; i--){\n for(int j = 0; j < i; j++){\n // Use < to change it to Descending order\n if(theArray[j] > theArray[j+1]){\n swapValues(j, j+1);\n printHorizontalArray(i, j);\n }\n printHorizontalArray(i, j);\n }\n }\n }",
"public static void bubbleSort(IntList l) {\n\t\tif (l.getFirst() == null)\n\t\t\treturn;\n\t\tl1: while (true) {\n\t\t\tfor (\tIntListEntry e = l.getFirst().getNext();\n\t\t\t\t\te != null;\n\t\t\t\t\te = e.getNext()) {\n\t\t\t\tIntListEntry d = e.getPrevious();\n\t\t\t\tif (d.getItem() > e.getItem()) {\n\t\t\t\t\tl.delete(e);\n\t\t\t\t\tl.insertBefore(e, d);\n\t\t\t\t\tcontinue l1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public static void bubbleSort(Array a) {\n int temp;\n for (int i = 0; i < a.length - 1; i++) { // for passes\n int flag = 0;\n for (int j = 0; j < a.length - 1 - i; j++) { // for iteration\n if (a.get(j) > a.get(j + 1)) {\n temp = a.get(j);\n a.set(j, a.get(j + 1));\n a.set(j + 1, temp);\n flag = 1;\n }\n }\n if (flag == 0) break; // if the list is already sorted\n }\n }",
"public static void main(String[] args) {\n List list = new ArrayList<>();\n list.add(10);\n list.add(50);\n list.add(30);\n list.add(60);\n list.add(20);\n list.add(90);\n list.add(20);\n \n// Iterator i = list.iterator();\n System.out.println(\"Printing Given Array..\");\n// while(i.hasNext())\n// {\n// \t System.out.println(i.next());\n// }\n for(int j=0;j<list.size();j++)\n {\n \t System.out.println(list.get(j));\n }\n \n Comparator cmp = Collections.reverseOrder();\n Collections.sort(list, cmp);\n System.out.println(\"printing list in descending order..\");\n Iterator i2 = list.iterator();\n while(i2.hasNext())\n {\n \t System.out.println(i2.next());\n }\n\t}",
"private void bubbleSort(T[] arr) {\n boolean swaps;\n for (int i = 0; i < n - 1; i++) { // since we always compare two elements, we will need to iterate up to (n - 1) times\n swaps = false;\n for (int j = 1; j < n - i; j++) // we reduce the inspected area by one element at each loop, because the largest element will already be pushed to the right\n if (arr[j].compareTo(arr[j - 1]) < 0) {\n swap(arr, j, j - 1); // the swap method is implemented further\n swaps = true;\n }\n if (!swaps) break; // we stop if there were no swaps during the last iteration\n }\n }",
"public void bubbleSort() {\n \tfor (int i = 0; i < contarElementos()-1; i++) {\n\t\t\tboolean intercambiado= false;\n\t\t\tfor (int j = 0; j < contarElementos()-1; j++) {\n\t\t\t\tif (encontrarNodoEnElndice(j).getElemento().compareTo(encontrarNodoEnElndice(j+1).getElemento())>0) {\n\t\t\t\t\tintercambiar(j, j+1);\n\t\t\t\t\tintercambiado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!intercambiado) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n }",
"private void sortBubble(ArrayList<String[]> jtData, int col)\n {\n String first, second;\n for(int i=0; i < jtData.size();i++)\n {\n for(int j=1; j < (jtData.size()-i); j++)\n {\n first = jtData.get(j-1)[col];\n second = jtData.get(j)[col];\n if(col == 2)\n {\n // Price is integer\n int x = Integer.valueOf(first);\n int y = Integer.valueOf(second);\n if(x < y)\n { \n Collections.swap(jtData, j, j-1);\n }\n }\n else if (first.compareToIgnoreCase(second) > 0) \n {\n // For Strings\n Collections.swap(jtData, j, j-1);\n }\n }\n }\n }",
"public void setBubbleSort() \n\t{\n\t\tint last = recordCount + NOT_FOUND; //array.length() - 1\n\n\t\twhile(last > RESET_VALUE) //last > 0\n\t\t{\n\t\t\tint localIndex = RESET_VALUE; \n\t\t\tboolean swap = false;\n\n\t\t\twhile(localIndex < last) \n\t\t\t{\n\t\t\t\tif(itemIDs[localIndex] > itemIDs[localIndex + 1]) \n\t\t\t\t{\n\t\t\t\t\tsetSwapArrayElements(localIndex);\n\t\t\t\t\tswap = true;\n\t\t\t\t}\n\t\t\t\tlocalIndex++;\n\t\t\t}\n\n\t\t\tif(swap == false) \n\t\t\t{\n\t\t\t\tlast = RESET_VALUE;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tlast = last + NOT_FOUND;\n\t\t\t}\n\n\t\t}//END while(last > RESET_VALUE)\n\t\treturn;\n\t}",
"public static <T extends Comparable<T>> void bubbleSort(T[] arrayToSort) {\n for(int i = 0; i < arrayToSort.length - 1; i++)\n for(int j = arrayToSort.length - 1; j > i + 1; j--)\n if(arrayToSort[j].compareTo(arrayToSort[j - 1]) < 0) {\n T value = arrayToSort[j];\n arrayToSort[j] = arrayToSort[j - 1];\n arrayToSort[j - 1] = value;\n }\n }",
"private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}",
"public void sort(ArrayList<Integer> arrayList) {\r\n System.out.println(arrayList.toString());\r\n mergeSort(arrayList, 0, arrayList.size()-1);\r\n System.out.println(arrayList.toString());\r\n }",
"public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}",
"public static void BubbleSort(int[] input) {\r\n for (int i = input.length - 1; i > 0; i--) {\r\n for (int j = 0; j < i; i++) {\r\n if (input[j] > input[j + 1]) {\r\n swap(input, j, j + 1);\r\n }\r\n }\r\n }\r\n }",
"public static void bubbleSort(String [] list1)\r\n\t{\r\n\t\t\r\n\t String temp;\r\n\t int swap=1000;\r\n\t while(swap>0) \r\n\t {\r\n\t \tswap=0;\r\n\t \tfor(int outside=0; outside<list1.length-1; outside++)\r\n\t \t{\r\n\t \t\tif(list1[outside+1].compareTo(list1[outside])<0)\r\n\t \t\t{\r\n\t \t\t\tswap++;\r\n\t \t\t\ttemp=list1[outside];\r\n\t \t\t\tlist1[outside]=list1[outside+1];\r\n\t \t\t\tlist1[outside+1]=temp;\r\n\t \t\t}\r\n\t \t}\r\n\t }\r\n\t \r\n\t}",
"public static void BubbleSort(int[] a) {\n\t int n = a.length;\n\t int temp = 0;\n\n\t for(int i = 0; i < n; i++) {\n\t for(int j=1; j < (n-i); j++) {\n\t if(a[j-1] > a[j]) {\n\t temp = a[j-1];\n\t a[j-1] = a[j];\n\t a[j] = temp;\n\t }\n\t }\n\t }\n\t}",
"public static void sort(ArrayList<Integer> list) {\n\t\tint temp;\n\t\tfor (int i=0; i < list.size() ; i++) {\n\t\t\tfor (int j=i+1;j<list.size()-1;j++){\n\t\t\t\tif(list.get(i)>list.get(j)){\n\t\t\t\t\ttemp = list.get(i);\n\t\t\t\t\tlist.set(i,list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static <T extends Comparable<T>> void myBubbleSort(T[] arrayToSort) {\n boolean isNotSorted = true;\n while(isNotSorted) {\n isNotSorted = false;\n for(int i = 0; i < arrayToSort.length - 1; i++)\n if(arrayToSort[i].compareTo(arrayToSort[i + 1]) > 0) {\n T value = arrayToSort[i];\n arrayToSort[i] = arrayToSort[i + 1];\n arrayToSort[i + 1] = value;\n isNotSorted = true;\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tEmployee emp1 = new Employee(1,\"Hibachi\",2000000);\n\t\tEmployee emp2 = new Employee(2,\"Budh\",50000000);\n\t\tEmployee emp3 = new Employee(3,\"Som\",1000000);\n\t\tEmployee emp4 = new Employee(4,\"Mangal\",600000);\n\t\tEmployee emp5 = new Employee(5,\"Brihaspati\",7000000);\n\t\t\n\t\tList<Employee> empList = new ArrayList<>();\n\t\tempList.add(emp1);\n\t\tempList.add(emp2);\n\t\tempList.add(emp3);\n\t\tempList.add(emp4);\n\t\tempList.add(emp5);\n\t\t\n\t\t// sorting done using comparable implementation Employee\n\t\tSystem.out.println(\"sorting using comparable. Sorts by default by name\");\n \t\tCollections.sort(empList);\n\t\t\n\t\tempList.forEach(empl -> System.out.println(empl));\n\n\t\t//using comparator in Employee sort the employees by salary\n\t\tCollections.sort(empList, Employee.compareSalary);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on salary\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//using comparator in Employee sort the employees by id\n\t\tCollections.sort(empList, Employee.compareId);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on Id\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//Now let's say we want to use the comparator to sort in descending order\n\t\tComparator<Employee> reverseSortSalaryDescendingOrder = Collections.reverseOrder(Employee.compareSalary);\n\t\tCollections.sort(empList,reverseSortSalaryDescendingOrder );\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"Salary soreted in reverse order i.e. descending order using same comparator and Collections reverseOrder()\");\n\t\tempList.forEach(empl -> System.out.println(empl));\n\t\t\n\t\t// Or we can reverse using the comparator's own reversed() method. Internally it calls reverseOrder() \n\t\tCollections.sort(empList, Employee.compareSalary.reversed());\n\t\t\n\t\t\n\t}",
"private void bubbleSort() {\r\n\r\n int n = leaderboardScores.size();\r\n int intChange;\r\n String stringChange;\r\n\r\n for (int i = 0 ; i < n - 1 ; i ++ ) {\r\n for (int j = 0 ; j < n - i - 1 ; j ++ ) {\r\n\r\n if (leaderboardScores.get(j) > leaderboardScores.get(j + 1)) {\r\n // swap arr[j+1] and arr[i]\r\n intChange = leaderboardScores.get(j);\r\n leaderboardScores.set(j, leaderboardScores.get(j + 1));\r\n leaderboardScores.set(j + 1, intChange);\r\n\r\n stringChange = leaderboardUsers.get(j);\r\n leaderboardUsers.set(j, leaderboardUsers.get(j + 1));\r\n leaderboardUsers.set(j + 1, stringChange);\r\n }\r\n\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n // auxIntArr is found in AuxPkg.AuxFuncs\n int[] arr = auxIntArr.clone();\n\n System.out.println(\"BubbleSort:\");\n System.out.print(\"Before: \");\n printIntArr(arr);\n\n // Main loop where the index will grow smaller as the array gets sorted\n for( int lastUnsortedIdx = arr.length -1;\n lastUnsortedIdx > 0;\n lastUnsortedIdx--)\n {\n // Nested loop for bubbling highest values to the next sorted slot\n // in the main loop\n for(int idx = 0; idx < lastUnsortedIdx; idx++)\n {\n if(arr[idx] > arr[idx+1])\n {\n swap(arr, idx, idx+1);\n }\n }\n }\n\n System.out.print(\"After: \");\n printIntArr(arr);\n System.out.println();\n }",
"public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }",
"public List<Integer> bubbleSort(List<Integer> list) {\n List<Integer> listCopy = new ArrayList<>(list);\n\n for (int i = 0; i < listCopy.size() - 1; i++) {\n boolean isSorted = true;\n for (int j = 0; j < listCopy.size() - 1 - i; j++) {\n if (listCopy.get(j) > listCopy.get(j + 1)) {\n Collections.swap(listCopy, j, j + 1);\n isSorted = false;\n }\n }\n\n if (isSorted) {\n break;\n }\n }\n\n return listCopy;\n }",
"@Override public LinkedList<int[]> sortDescending(int[] sortArr) {\n return qSortDescending( sortArr, 0, sortArr.length-1 );\n }",
"public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}",
"private void reverseSortArrayList()\n {\n this.layoutManager = new LinearLayoutManager(this);\n\n List<FoodModel> foodNames = foodModelList;\n\n //Call the collection sort method on the food\n Collections.sort(foodNames, new Comparator<FoodModel>() {\n @Override\n public int compare(FoodModel f1, FoodModel f2) {\n if(f1.getName().compareTo(f2.getName()) > 0)\n {\n return -1;\n }\n else if (f1.getName().compareTo(f2.getName()) < 0)\n {\n return +1;\n }\n else\n {\n return 0;\n }\n }\n });\n//\n// //Creates the adapter\n this.adapter = new ApiFoodAdapter(foodNames, this);\n//\n// //Sets the adapter\n this.recyclerView.setAdapter(adapter);\n// //Sets the layout manager\n this.recyclerView.setLayoutManager(layoutManager);\n//\n// //Notify the adapter of change in data\n adapter.notifyDataSetChanged();\n }",
"public void selectionSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2;\r\n\t\tfor (int i = list.size() - 1; i >= 0; i--){\r\n\t\t\tsteps ++;\r\n\t\t\tint biggest = 0; \r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int j = 0; j < i; j++){\r\n\t\t\t\tsteps += 4;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(biggest)) > 0){\r\n\t\t\t\t\tsteps ++;\r\n\t\t\t\t\tbiggest = j;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 5;\r\n\t\t\tswap(list, i, biggest);\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Selection Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<Integer> ints = new ArrayList<>(Arrays.asList(10, 23, 1, 234, 56, 78, 77, 45, 24));\r\n\t\tints.add(99);\r\n\t\tSystem.out.println(ints);\r\n//\t\t//Objective : Display sorted ints in desc order\r\n//\t\tCollections.sort(ints,new Comparator<Integer>() {\r\n//\r\n//\t\t\t@Override\r\n//\t\t\tpublic int compare(Integer o1, Integer o2) {\r\n//\t\t\t\t// TODO Auto-generated method stub\r\n//\t\t\t\treturn o2.compareTo(o1);\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t});\r\n//\t\tfor(int i : ints)\r\n//\t\t\tSystem.out.println(i);\r\n//\t\t\r\n\r\n\t\tCollections.sort(ints, (i1, i2) -> i2.compareTo(i1));\r\n\t\tints.forEach(i -> System.out.print(i + \" \"));\r\n\r\n\t}",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> arrayList = new ArrayList<Integer>();\n\t\tarrayList.add(11);\n\t\tarrayList.add(2);\n\t\tarrayList.add(7);\n\t\tarrayList.add(3);\n\t\t\n\t\t// ArrayList before the sorting\n\t\tSystem.out.println(\"Before Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t\t\n\t\t// Sorting of arrayList using Collections.sort\n\t\tCollections.sort(arrayList);\n\t\t\n\t\t// ArrayList after sorting\n\t\tSystem.out.println(\"\\nAfter Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t}",
"private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }",
"@Test\n public void testBubbleSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i1.compareTo(i2);\n }\n });\n\n checkArray(\"Bubble sort doesn't work!\", array);\n }",
"public static void mySort(ArrayList<Integer> myList)\n {\n\n }",
"public static void bubbleSort() {\r\n\t\tfor(int i = nodeArrList.size() -1; i > 0; i--) {\r\n\t\t\tfor(int j = 0; j < i; j++) {\r\n\t\t\t\tif(nodeArrList.get(j).frequency > nodeArrList.get(j +1).frequency) {\r\n\t\t\t\t\tHuffmanNode temp = nodeArrList.get(j);\r\n\t\t\t\t\tnodeArrList.set(j, nodeArrList.get(j + 1));\r\n\t\t\t\t\tnodeArrList.set(j + 1, temp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }",
"public static ArrayList<Integer> sortArrayList (ArrayList<Integer> arrList) {\n\t Collections.sort(arrList);\n return arrList;\n}",
"public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}",
"public static void sortY(ArrayList<Point> points) {\n\t\tCollections.sort(points, new Comparator<Point>() {\n\t\t\t public int compare(Point p1, Point p2) {\n\t\t\t\tif (p1.getY() < p2.getY())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (p1.getY() > p2.getY())\n\t\t\t\t\treturn 1;\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) {\n ArrayList<Integer> mainList = new ArrayList<Integer>();\n mainList.add(5);\n mainList.add(2);\n mainList.add(10);\n mainList.add(14);\n mainList.add(3);\n mainList.add(6);\n mainList.add(9);\n boolean asc = false;\n System.out.println(listSort(mainList, asc));\n }",
"private ArrayList<BoulderProblem> SortBps()\n {\n ArrayList<BoulderProblem> sortedBps = displayBps;\n if(sortOption.equals(\"name\"))\n {\n Collections.sort(sortedBps, bpNameComparator);\n }\n else if(sortOption.equals(\"grade\"))\n {\n Collections.sort(sortedBps, bpGradeComparator);\n }\n else\n {\n Collections.sort(sortedBps, bpSetterComparator);\n }\n return sortedBps;\n }",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}",
"public static void bubbleSortNumberList(long[] list) {\n /*make N passes through the list (N is length of the list) */\n for(int i=0;i<list.length-1;i++) {\n /* for index from 0 to N-1, compare item[index] to next item, swap if needed */\n for(int j=0; j<list.length-1-i;j++) {\n if(list[j]>list[j+1]){\n long tmp = list[j];\n list[j] = list[j+1];\n list[j+1] = tmp;\n }\n }\n }\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}",
"@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }",
"private Integer[] bubbleSortList() {\n\t\tInteger[] localList = new Integer[intList.size()];\n\t\tlocalList = intList.toArray(localList);\n\n\t\tint temp;\n\t\tfor (int i = 5; i >= 0; i--) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tif (localList[j] > localList[j + 1]) {\n\t\t\t\t\ttemp = localList[j];\n\t\t\t\t\tlocalList[j] = localList[j + 1];\n\t\t\t\t\tlocalList[j + 1] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn localList;\n\t}",
"@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void testbubbleSort_Sorted() {\r\n\t\tItem[] input = new Item[]{new Item(2),new Item(9),new Item(12),new Item(41),new Item(55)};\r\n\t\tobj.bubbleSort(input);\r\n\t\tassertTrue(expected[1].key == input[1].key);\r\n\t\tassertTrue(expected[2].key == input[2].key);\r\n\t\tassertTrue(expected[3].key == input[3].key);\r\n\t\tassertTrue(expected[4].key == input[4].key);\r\n\t}",
"void sort();",
"void sort();",
"public void fletteSort(ArrayList<Integer> list) {\n\t\tmergesort(list, 0, list.size() - 1);\n\t}",
"public void myBubbleSort(int array[]) {\n for (int i = 0; i < array.length - 1; i++) {\n //Iterate through the array to the index to the left of i\n for (int j = 0; j < array.length - i - 1; j++) {\n //Check if the value of the index on the left is less than the index on the right\n if (array[j] > array[j + 1]) {\n //If so, swap them.\n int temp = array[j];\n array[j] = array[j + 1];\n array[j + 1] = temp;\n\n }\n }\n }\n }",
"public void bubbleSort(long [] a){\n\t\tint upperBound=a.length-1;\n\t\tint lowerBound =0;\n\t\tint swaps=0;\n\t\tint iterations=0;\n\t\twhile(upperBound>=lowerBound){\n\t\t\tfor(int i=0,j=1;i<=upperBound && j<=upperBound; j++,i++){\n\t\t\t\tlong lowerOrderElement = a[i];\n\t\t\t\tlong upperOrderElement = a[j];\n\t\t\t\titerations++;\n\t\t\t\tif(lowerOrderElement>upperOrderElement){ //swap positions\n\t\t\t\t\ta[i] = a[j];\n\t\t\t\t\ta[j]= lowerOrderElement;\n\t\t\t\t\tswaps=swaps+1;\n\t\t\t\t}\n\t\t\t\telse{ // sorted.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tupperBound--;\n//\t\tSystem.out.println(\"upperBound:- \" +upperBound);\n//\t\tSystem.out.println(\"lowerBound:- \" +lowerBound);\n\t\t}displayArr(a);\n\t\t\n\t\tSystem.out.println(\"Total Swaps:- \" + swaps);\n\t\tSystem.out.println(\"Total Iterations:- \" + iterations);\n\t}",
"public static void main(String[] args) {\n int[] intArray = {20, 35, -15, 7, 55, 1, -22};\n\n for (int lastUnsortedIndex = intArray.length - 1; lastUnsortedIndex > 0; lastUnsortedIndex--) {\n for (int i = 0; i < lastUnsortedIndex; i++) {\n if (intArray[i] > intArray[i + 1]) {\n swap(intArray, i, i + 1);\n }\n }\n }\n\n for (int i = 0; i < intArray.length; i ++) {\n System.out.println(intArray[i]);\n }\n }",
"ArrayList<String> sortFiles(String[] allFiles){\n\n ArrayList<String> tempArrayList = new ArrayList<String>();\n ArrayList<String> returnArrayList = new ArrayList<String>();\n String[] tempArray = allFiles;\n String[] returnArray;\n\n int numOfFiles = tempArray.length;\n\n //delete nonneeded files\n for(int k = 0; k < numOfFiles; k++){\n if (tempArray[k].startsWith(\"G-\") || tempArray[k].startsWith(\"M-\") || tempArray[k].startsWith(\"I-\")){\n tempArrayList.add(tempArray[k]);\n }\n }\n\n returnArray = new String[tempArrayList.size()];\n for(int i = 0; i < tempArrayList.size(); i++){\n returnArray[i] = tempArrayList.get(i);\n }\n\n //if 0 return empty array\n if (returnArray.length < 2){\n return returnArrayList;\n }\n\n //bubble sort\n for (int i = 0; i < returnArray.length-1; i++){\n for (int j = 0; j < returnArray.length-i-1; j++){\n //get string of full number from file\n String tempFirst = returnArray[j].split(\"_\")[2] + returnArray[j].split(\"_\")[3];\n String tempSecond = returnArray[j+1].split(\"_\")[2] + returnArray[j+1].split(\"_\")[3];\n //take out csv if it is not a subgraph\n if (!tempFirst.contains(\"_subgraph_\")){\n tempFirst = tempFirst.substring(0,14);\n }\n if (!tempSecond.contains(\"_subgraph_\")){\n tempSecond = tempSecond.substring(0,14);\n }\n //get int of string\n long tempFirstNum = Long.parseLong(tempFirst);\n long tempSecondNum = Long.parseLong(tempSecond);\n //compare and swap if bigger\n if (tempFirstNum >= tempSecondNum)\n {\n String temp = returnArray[j];\n returnArray[j] = returnArray[j+1];\n returnArray[j+1] = temp;\n }\n }\n }\n\n //add elements to arraylist with newest date being first\n for(int k = returnArray.length-1; k >= 0; k--){\n returnArrayList.add(returnArray[k]);\n System.out.println(allFiles[k]);\n }\n\n return returnArrayList;\n }",
"void BubbleSortforLinkedList() {\n\t\tif (isEmpty() || head.next == null) return;\n\t\tNode curr = head;\n\t\tBoolean change = true;\n\t\twhile (change) {\n\t\t\tchange = false;\n\t\t\twhile (curr != null) {\n\t\t\t\tif (curr.next.data < curr.data) {\n\t\t\t\t\tint temp = curr.data;\n\t\t\t\t\tcurr.data = curr.next.data;\n\t\t\t\t\tcurr.next.data = temp;\n\t\t\t\t\tchange = true;\n\t\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t\t} \n\t\t}\n\t}",
"@Override\n public void sort(List<T> items) {\n }",
"public static void sortDesc(int[] theArray) {\n\n\n //convert the array with int to a list with Integer\n //boxed convert the int to an Integer. collectors.toList() converts the array to a list.\n List<Integer> thelist = Arrays.stream(theArray).boxed().collect(Collectors.toList());\n //sort it in reverse\n Collections.sort(thelist, Collections.reverseOrder());\n\n //since the List has Integer and not int anymore..\n for (int i = 0; i < theArray.length; i++) {\n theArray[i] = thelist.get(i);\n }\n\n ////ALT code\n ////using bubblesort Algorithm\n\n// int len = theArray.length;\n// int temp = 0;\n//\n// for (int i = 0; i < len; i++) {\n// for (int j = 1; j < (len-i); j++) {\n//\n// if (theArray[j - 1] < theArray[j]) {\n// //switch position\n// temp = theArray[j - 1];\n// theArray[j - 1] = theArray[j];\n// theArray[j] = temp;\n// }\n//\n// }\n// }\n\n }",
"public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}",
"public static void main(String[] args) {\n int list[] = {8,7,6,5,1};\n \t//System.out.println(\"the list number is \" + list[0]);\n int temp;\n for(int j = list.length; j>= 0; j --){\n \tfor (int i = 0; i < j - 1; i ++){\n \t\tif( list[i] > list[i + 1]){\n \t\t\ttemp = list[i + 1];\n \t\t\tlist[i + 1] = list [i];\n \t\t\tlist [i] = temp;\n\n \t}\n\n\n \t//\n }\n\n \t}\t\n \t \t\tfor(int x = 0; x < list.length; x ++){\n\t\t\tSystem.out.println(list[x]);\n\t\t}\n }",
"void sortEntities(ArrayList<Entity> entities){\n Collections.sort(entities, new Comparator<Entity>() {\n @Override\n public int compare(Entity e1, Entity e2) {\n if(e1.getCollisionBox().bottom < e2.getCollisionBox().bottom) return -1;\n else if(e1.getCollisionBox().bottom == e2.getCollisionBox().bottom) return 0;\n else return 1;\n }\n });\n }",
"public static List<ScoreBean> sortDescending(List<ScoreBean> listScores) {\n Comparator<ScoreBean> comparator = new Comparator<ScoreBean>() {\n @Override\n public int compare(ScoreBean o1, ScoreBean o2) {\n return o2.getScore() - o1.getScore();\n }\n };\n Collections.sort(listScores, comparator);\n return listScores;\n }",
"public ArrayList<CollegeFootballTeam> selectionSort(ArrayList<CollegeFootballTeam> list)\r\n\t{\r\n\t\tCollegeFootballTeam highestRankedTeam;\r\n\t\tint maxI;\r\n\t\tfor(int i = 0; i < list.size(); i++)\r\n\t\t{\r\n\t\t\thighestRankedTeam = list.get(i);\r\n\t\t\tmaxI = i;\r\n\t\t\tfor(int j=i+1; j<list.size(); j++)\r\n\t\t\t{\r\n\t\t\t\tif(list.get(j).getSumOfVotes() < highestRankedTeam.getSumOfVotes())\r\n\t\t\t\t{\r\n\t\t\t\t\thighestRankedTeam = list.get(j);\r\n\t\t\t\t\tmaxI = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tCollegeFootballTeam temp = list.get(i);\r\n\t\t\tlist.set(i, highestRankedTeam);\r\n\t\t\tlist.set(maxI, temp);\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"static void BubbleSort(int[] arr){\n for(int i = 0; i< arr.length-1;i++){\n int numberOfSwaps = 0;\n for(int j = 0; j<arr.length-i-1;j++){\n if(arr[j]>arr[j+1]){\n Swap(arr, j, j+1);\n numberOfSwaps++;\n }\n }\n if(numberOfSwaps == 0){\n break;\n }\n }\n }",
"public static void sortDesc(long[]arr)\n\t{\n\t\tfor(int i=0;i<arr.length-1;++i)\n\t\t{\n\t\t\tfor(int j=i+1;j<arr.length;++j)\n\t\t\t{\n\t\t\t\tif(arr[j]>arr[i])\n\t\t\t\t{\n\t\t\t\t\tlong temp=arr[i];\n\t\t\t\t\tarr[i]=arr[j];\n\t\t\t\t\tarr[j]=temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\r\n int[] numbers = {25, 43, 29, 50, -6, 32, -20, 43, 8, -6};\r\n\t\r\n\tSystem.out.print(\"before sorting: \");\r\n\toutputArray(numbers);\r\n \r\n\tbubbleSort(numbers);\r\n\t\r\n\tSystem.out.print(\"after sorting: \");\r\n\toutputArray(numbers);\r\n }",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n int[] arr1 = new int[]{49,123,6,90,5};\n Arrays.sort(arr1);\n System.out.println(Arrays.toString(arr1));\n System.out.println(\"=============================================\");\n\n //non primitive type sorting and reversing\n Integer[] arr = new Integer[]{49,123,6,90,5};\n Arrays.sort(arr, Collections.reverseOrder());\n System.out.println(Arrays.toString(arr));\n System.out.println(\"=============================================\");\n\n // using comparable and compareTo to sort the objects\n Coordinates[] pointers = new Coordinates[]{new Coordinates(1,5)\n ,new Coordinates(98,4)\n ,new Coordinates(0,76)\n ,new Coordinates(2,67)};\n\n Arrays.sort(pointers);\n for(int i=0;i<pointers.length;i++){\n System.out.println(pointers[i].getX()+\" \" + pointers[i].getY());\n }\n\n System.out.println(\"=============================================\");\n // using comparator to sort the objects of non primitive type\n Points[] points = new Points[]{new Points(1,5)\n ,new Points(98,4)\n ,new Points(0,76)\n ,new Points(2,67)};\n Arrays.sort(points,new ComparatorObj());\n for(int i=0;i<pointers.length;i++){\n System.out.println(points[i].getX()+\" \" + points[i].getY());\n }\n\n\n }",
"public void sortObjectList(){\n\t\tint counter = gameObjectsList.size() - 1;\n\t\tif (gameObjectsList == null || gameObjectsList.size() == 0){\n\t\t\treturn;\n\t\t}\n\t\tquicksort(0, counter);\n\t}",
"public static void main(String[] args) {\n\t\tList<String> alist = new ArrayList<>();\n\t\talist.add(\"Virat\");\n\t\talist.add(\"ganesh\");\n\t\talist.add(\"Amol\");\n\t\talist.add(\"Ritesh\");\n\t\talist.add(\"deva\");\n\t\talist.add(\"sachin\");\n\t\talist.add(\"Xavier\");\n\t\t\n\t\tSystem.out.println(\"Arraylist before sorting: \");\n\t\tSystem.out.println(alist);\n\t\t\n\t\t//Collections.sort(alist);\n\t\tCollections.sort(alist,String.CASE_INSENSITIVE_ORDER);\n\t\t\n\t\tSystem.out.println(\"Arraylist after sorting: \");\n\t\tSystem.out.println(alist);\n\t\t\n\t\t\t\t\n\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\tComparator integerComparator = (Object arg0, Object arg1) -> {\r\n\t\t\treturn ((Integer)arg0>(Integer)arg1)?-1:((Integer)arg0>(Integer)arg1)?1:0;\r\n\t\t};\r\n\t\t\r\n\t\tCollectionUtils utils = new CollectionUtils();\r\n\t\tList<Integer> list = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list, integerComparator);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\t\t\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list,(a,b)->(a>b)?-1:(a>b)?1:0);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list);\r\n\t\tSystem.out.println(\"After sorting in ascending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t}",
"static int[] bubbleSort(int[] a) {\n int n = a.length;\n while(n > 0) {\n int newLastN = 0; // if no swap occurred in last step we won't need to run next iteration\n for (int i = 1; i < n; i++) {\n comparisonCount++;\n if (a[i - 1] > a[i]) {\n swapCount++;\n swap(a, i - 1, i);\n newLastN = i;\n }\n }\n n = newLastN;\n }\n return a;\n }",
"public static void bubbleSort(int [] arr){\n int temp = 0; //temporary variable\n boolean flag = false; //mark if any reversion has happened\n for (int i = 0; i < arr.length - 1;i++){\n\n for (int j = 0; j < arr.length - 1-i; j++) {\n //if the previous number is bigger than the latter, reverse\n if (arr[j] > arr[j + 1]) {\n flag = true;\n temp = arr[j];\n arr[j] = arr[j + 1];\n arr[j + 1] = temp;\n }\n }\n\n //System.out.printf(\"After the %d round of sorting\",i+1);\n //System.out.println(Arrays.toString(arr));\n\n if(!flag){\n break;\n } else {\n flag = false;\n //reset flag to true to do the next check\n }\n }\n }",
"@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }",
"public ArrayList<ArrayList<String>> inputTestListAndSort (ArrayList<ArrayList<String>> testList){\n ArrayList<ArrayList<String>> testList1=new ArrayList<>(testList);\n Collections.sort(testList1, new SubClass_CompareItemsInTheRowsOfTheTimetable_in_TeachingOverlapAndHours());\n return testList1;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint [] arr= {3,43,2,320,143,4};\n\t\t\n\t\tint temp=0;\n\t\tint lenth=arr.length;\n\t\t\n\t\tfor(int i=0;i<lenth;i++) {\n\t\t\t\n\t\t\tfor(int j=1;j<(lenth-i);j++)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif(arr[j-1]>arr[j]) {\n\t\t\t\t\ttemp=arr[j-1];\n\t\t\t\t\tarr[j-1]=arr[j];\n\t\t\t\t\t\t\tarr[j]=temp;\n\t\t\t\t\tSystem.out.println(arr[j]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t\t\n\t\t\n\n\t}",
"public void triCollection(){\r\n Collections.sort(collection);\r\n }",
"void bubblesort(int arr[],int n)\n {\n for(int i=0;i<n;i++)\n {\n for(int j=0;j<n-1;j++) //after its 1st iteration we have our maximum value sorted\n {\n if(arr[j]>arr[j+1]) // if value at present index is > the next index value then its swap the value \n {\n int temp=arr[j];\n arr[j]=arr[j+1];\n arr[j+1]=temp;\n }\n }\n }\n }",
"public void sortScores(){\r\n // TODO: Use a single round of bubble sort to bubble the last entry\r\n // TODO: in the high scores up to the correct location.\r\n \tcount=0;\r\n \tfor(int i=Settings.numScores-1; i>0;i--){\r\n \t\tif(scores[i]>scores[i-1]){\r\n \t\t\tint tempS;\r\n \t\t\ttempS=scores[i];\r\n \t\t\tscores[i]=scores[i-1];\r\n \t\t\tscores[i-1]=tempS;\r\n \t\t\t\r\n \t\t\tString tempN;\r\n \t\t\ttempN=names[i];\r\n \t\t\tnames[i]=names[i-1];\r\n \t\t\tnames[i-1]=tempN;\r\n \t\t\tcount++;\r\n \t\t}\r\n \t}\r\n }",
"public void sort() {\n }",
"public static void bubbleSort(int[] arr)\n\t{\n\t\tint len=arr.length;\n\t\tboolean swapped=true;\n\t\twhile(swapped){\n\t\t\tswapped=false;\n\t\t\tfor(int j=1;j<len;j++){\n\t\t\t\tif(arr[j-1]>arr[j]){\n\t\t\t\t\tint temp=arr[j-1];\n\t\t\t\t\tarr[j-1]=arr[j];\n\t\t\t\t\tarr[j]=temp;\n\t\t\t\t\tswapped=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void bubbleSortAlgo(int[] arr) {\n for(int i = 1; i<arr.length-1; i++){\n // inner loop to compare each element with it's next one in every iteration in one complete outer loop\n for(int j = 0; j<arr.length -1; j++){\n if(isSmaller(arr, j+1, j)){ // compares the jth element from it's next element\n swap(arr, j+1, j); // if ismaller condition is true swaps both the elements\n }\n }\n }\n \n }",
"public int compare(ArrayList<Object> obj1, ArrayList<Object> obj2) {\n if (obj1.get(0).equals(obj2.get(0))) {\n return (int) Math.ceil((Double) obj1.get(1) - (Double) obj2.get(1));\n }\n // higher BV first\n return (int) Math.ceil((Double) obj2.get(0) - (Double) obj1.get(0));\n }",
"public BubbleSort(){\r\n super();\r\n }",
"public static List<Integer> bubbleSort(List<Integer> lista) {\r\n int aux = 0;\r\n for (Integer lista1 : lista) {\r\n for (int j = 0; j < lista.size() - 1; j++) {\r\n if (lista.get(j) > lista.get(j + 1)) {\r\n aux = lista.get(j);\r\n lista.set(j, lista.get(j + 1));\r\n lista.set(j + 1, aux);\r\n }\r\n }\r\n }\r\n return lista;\r\n }",
"static ArrayList<Card> sortCardArray(ArrayList<Card> c)\n {\n \n \n Collections.sort(c, new CardComparator());\n \n return c;\n }",
"public void bubbleSort(int [] intArray)\n {\n int n = intArray.length;\n int temp = 0;\n try\n {\n for(int i=0; i < n; i++)\n {\n thread.sleep(100); //sleep the thread to particular to view the results in panel\n this.setThreadState();\n for(int j=1; j < (n-i); j++)\n { \n if(!orderPanel) //check for Descending order\n {\n if(intArray[j-1] > intArray[j])\n {\n //swap the elements!\n temp = intArray[j-1];\n intArray[j-1] = intArray[j];\n intArray[j] = temp;\n repaint();\n \n \n }\n }\n else if(intArray[j-1] < intArray[j]) //check for Ascending order\n {\n temp = intArray[j-1]; \n intArray[j-1] = intArray[j];\n intArray[j] = temp;\n repaint();\n \n }\n \n }\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Exception occured\" + e);\n }\n }",
"private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint[] myArray = {6,3,9,4,7,5,8,2,1,10};\n\t\t\n\t\t// change the outer loop LCV so that we are making one fewer pass\n\t\tfor(int i = myArray.length - 2; i > 0; i--) {\n\t\t\t\n\t\t\tboolean swapOccurred = false;\n\t\t\t\n\t\t\tfor(int j = 0; j < i; j++) {\n\t\t\t\t// Compare current element to next highest\n\t\t\t\n\t\t\t\t// if the second element is greater than the first\n\t\t\t\tif(myArray[j] > myArray[j + 1]) {\n\t\t\t\t\n\t\t\t\t\t// swap\n\t\t\t\t\tswapOccurred = true;\n\t\t\t\t\t\n\t\t\t\t\t// (hold onto the element so we don't lose it!)\n\t\t\t\t\tint temp = myArray[j + 1];\n\t\t\t\t\t// assign lower element:\n\t\t\t\t\tmyArray[j + 1] = myArray[j];\t// at this point, both array elements hold the same value\n\t\t\t\t\t// assign higher element:\n\t\t\t\t\tmyArray[j] = temp;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t}// inner loop ends\t\t\n\t\t\t\n\t\t\t// if swap occurred, break:\n\t\t\tif(!swapOccurred) {\t// or \n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tprintArray(myArray);\n\t\t\t\n\t\t}// outer loop ends\t\n\t\t\n\t}",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate static ArrayList<Result> sortByScore(ArrayList<Result> sortThis){\n\t\tArrayList<Result> sorted = sortThis;\n\t\tCollections.sort(sorted, new Comparator(){\n\t\t\t\n\t\t\tpublic int compare(Object o1, Object o2){\n\t\t\t\tResult r1 = (Result) o1;\n\t\t\t\tResult r2 = (Result) o2;\n\n\t\t\t\tDouble Score1 = new Double(r1.getScore());\n\t\t\t\tDouble Score2 = new Double(r2.getScore());\n\t\t\t\treturn Score1.compareTo(Score2);\n\t\t\t}\n\t\t});\n\t\tCollections.reverse(sorted);\n\t\t\n\t\treturn sorted;\n\t}",
"@Override\r\n\tpublic void sortDESC(int[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tfor (int j = i + 1; j < array.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tif (array[i] < array[j]) {\r\n\t\t\t\t\tint temp = array[i];\r\n\t\t\t\t\tarray[i] = array[j];\r\n\t\t\t\t\tarray[j] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) \r\n {\n ArrayList<String> al = new ArrayList<String>(); \r\n al.add(\"Geeks For Geeks\"); \r\n al.add(\"Friends\"); \r\n al.add(\"Dear\"); \r\n al.add(\"Is\"); \r\n al.add(\"Superb\"); \r\n \r\n /* Collections.sort method is sorting the \r\n elements of ArrayList in ascending order. */\r\n Collections.sort(al); \r\n \r\n // Let us print the sorted list \r\n System.out.println(\"List after the use of\"\r\n + \" Collection.sort() :\\n\" + al); \r\n }",
"public void bubbleSort(int[] array){\n int last = array.length;\r\n // boolean to flag a swap\r\n boolean swap = true;\r\n // continue if a swap has been made\r\n while(swap){\r\n // assume no swaps will be done\r\n swap = false;\r\n // look for swaps\r\n for(int i = 0; i < last - 1; i++){\r\n // find a bigger value?\r\n if(array[i] > array[i+1]){\r\n // swap\r\n swap(array, i, i+1);\r\n // set flag to true\r\n swap = true;\r\n }\r\n }\r\n // move the last position tracker\r\n last--;\r\n }\r\n }"
] | [
"0.67808867",
"0.67381394",
"0.66713905",
"0.66199523",
"0.6606896",
"0.65431255",
"0.650932",
"0.64553446",
"0.63450646",
"0.63382345",
"0.6135303",
"0.61080134",
"0.6103676",
"0.6094335",
"0.60016483",
"0.5968577",
"0.5963827",
"0.59551454",
"0.5951832",
"0.59156966",
"0.59004307",
"0.58993596",
"0.58942115",
"0.58874106",
"0.58768624",
"0.5875336",
"0.58609414",
"0.5850477",
"0.5842338",
"0.5833819",
"0.5832247",
"0.5821395",
"0.5808785",
"0.5803298",
"0.5802637",
"0.5801286",
"0.5790544",
"0.5790516",
"0.578811",
"0.577138",
"0.57680434",
"0.57669413",
"0.5754849",
"0.5736175",
"0.57256633",
"0.57243776",
"0.57106876",
"0.5689196",
"0.56891376",
"0.5685355",
"0.56849045",
"0.56606233",
"0.5640782",
"0.56232756",
"0.56207854",
"0.5610277",
"0.5610277",
"0.5606895",
"0.5602511",
"0.56024516",
"0.5602244",
"0.5585667",
"0.5582984",
"0.558025",
"0.5576091",
"0.5574874",
"0.55721164",
"0.55645186",
"0.55631644",
"0.55549324",
"0.5550944",
"0.55472004",
"0.5545772",
"0.55420434",
"0.5535106",
"0.5527317",
"0.55253196",
"0.55135757",
"0.55088526",
"0.55069834",
"0.55053806",
"0.5493793",
"0.5486155",
"0.5485667",
"0.5482086",
"0.5477411",
"0.5475282",
"0.54732126",
"0.5472745",
"0.54665565",
"0.54654324",
"0.5465429",
"0.5461058",
"0.54544246",
"0.5439495",
"0.5434342",
"0.5429236",
"0.5425891",
"0.54224145",
"0.54220617"
] | 0.7017459 | 0 |
This method takes in an ArrayList of Comparable objects and sorts it into ascending order using a selection sort algorithm | public void selectionSort(ArrayList <Comparable> list){
steps += 2;
for (int i = list.size() - 1; i >= 0; i--){
steps ++;
int biggest = 0;
steps += 2;
for (int j = 0; j < i; j++){
steps += 4;
if (list.get(j).compareTo(list.get(biggest)) > 0){
steps ++;
biggest = j;
}
steps += 2;
}
steps += 5;
swap(list, i, biggest);
steps += 2;
}
System.out.println();
System.out.println("Selection Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T extends Comparable<? super T>> void selectionSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = 0; i < size; i++){\n int lowestIndex = i;\n for(int j = i; j < size; j++){\n if(list.get(lowestIndex).compareTo(list.get(j)) > 0){\n lowestIndex = j;\n }\n }\n if(lowestIndex != i){\n swap(list, i, lowestIndex);\n }\n }\n }\n }",
"public void selectionSort()\r\n {\r\n for(int x = 0; x < numItems; x++)\r\n {\r\n int smallestLoc = x;\r\n for(int y = x+1; y<numItems; y++)\r\n {\r\n if(mArray[y]< mArray[smallestLoc])\r\n {\r\n smallestLoc = y;\r\n }\r\n }\r\n int temp = mArray[x];\r\n mArray[x] = mArray[smallestLoc];\r\n mArray[smallestLoc] = temp;\r\n }\r\n }",
"public void selectionSort() {\n int nextMin;\n\n for (int i = 0; i < IntList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < IntList.length; j++) {\n if (IntList[j] < IntList[nextMin])\n nextMin = j;\n }\n if (nextMin != i)\n swapSelection(IntList, i, nextMin);\n }\n }",
"public static void selectionSort(Comparable[] a) {\n int n = a.length;\n int im;\n for (int i = 0; i < n; i++) {\n im = i;\n for (int j = im; j < n; j++) {\n // Find the min\n if (less(a[j], a[im])) im = j;\n if (i != im) exch(a, i, im);\n }\n }\n }",
"public static void main(String[] args) {\n ArrayList<Comparable> BestBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestInsertion = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstInsertion = new ArrayList<Comparable>();\r\n\r\n // Best and worst case bubbleSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestBubble.add(i * 2);\r\n } System.out.println(\"BestBubble in pre-sorted ascending order...\\n\" + BestBubble + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstBubble.add(x);\r\n }\r\n System.out.println(\"WorstBubble in descending order...\\n\" + WorstBubble + \"\\n\");\r\n\r\n // Best and worst case selectionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestSelection.add(i * 2);\r\n } System.out.println(\"BestSelection in pre-sorted ascending order...\\n\" + BestSelection + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstSelection.add(x);\r\n }\r\n System.out.println(\"WorstSelection in descending order...\\n\" + WorstSelection + \"\\n\");\r\n\r\n // Best and worst case insertionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestInsertion.add(i * 2);\r\n } System.out.println(\"BestInsertion in pre-sorted ascending order...\\n\" + BestInsertion + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstInsertion.add(x);\r\n }\r\n System.out.println(\"WorstInsertion in descending order...\\n\" + WorstInsertion + \"\\n\");\r\n\r\n // Sort every single instantiation of ArrayList\r\n MySorts.bubbleSortV(BestBubble);\r\n MySorts.bubbleSortV(WorstBubble);\r\n\r\n MySorts.selectionSortV(BestSelection);\r\n MySorts.selectionSortV(WorstSelection);\r\n\r\n MySorts.insertionSortV(BestInsertion);\r\n MySorts.insertionSortV(WorstInsertion);\r\n\r\n // Prints all the instantiations of ArrayList\r\n System.out.println(\"Sorted BestBubble...\\n\" + BestBubble + \"\\n\");\r\n System.out.println(\"Sorted WorstBubble...\\n\" + WorstBubble + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestSelection...\\n\" + BestSelection + \"\\n\");\r\n System.out.println(\"Sorted WorstSelection...\\n\" + WorstSelection + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestInsertion...\\n\" + BestInsertion + \"\\n\");\r\n System.out.println(\"Sorted WorstInsertion...\\n\" + WorstInsertion + \"\\n\");\r\n }",
"public static void selectionSort(double[] list) {\r\n for (int i = 0; i < list.length - 1; i++) {\r\n // Find the minimum in the list[i..list.length-1]\r\n \t\tint min_index = i;\r\n \t\tfor(int k = i+1; k < list.length; k++) {\r\n \t\t if(list[k] < list[min_index]) {\r\n \t\t min_index = k;\r\n }\r\n }\r\n\r\n // Swap list[i] with list[currentMinIndex] if necessary;\r\n \t\tdouble temp = list[i];\r\n \t\tlist[i] = list[min_index];\r\n \t\tlist[min_index] = temp;\r\n }\r\n }",
"public void sortObjectList(){\n\t\tint counter = gameObjectsList.size() - 1;\n\t\tif (gameObjectsList == null || gameObjectsList.size() == 0){\n\t\t\treturn;\n\t\t}\n\t\tquicksort(0, counter);\n\t}",
"public static void selectionSort2(IntList l) {\n\t\tIntListEntry input = l.getFirst();\n\t\tIntListEntry output = null;\n\t\twhile (input != null) {\n\t\t\tIntListEntry min = input;\n\t\t\tfor (IntListEntry e = input; e != null; e = e.getNext())\n\t\t\t\tif (e.getItem()<min.getItem())\n\t\t\t\t\tmin = e;\n\t\t\tif (min != input) {\n\t\t\t\tl.delete(min);\n\t\t\t\tif (output == null)\n\t\t\t\t\tl.prepend(min);\n\t\t\t\telse\n\t\t\t\t\tl.insertAfter(min,output);\n\t\t\t}\n\t\t\toutput = min;\n\t\t\tinput = min.getNext();\n\t\t}\n\t}",
"public static void mySort(ArrayList<Integer> myList)\n {\n\n }",
"@Test\n public void testSelectionSort(){\n SimpleList<Integer> simpleList = new SimpleList<Integer>();\n simpleList.append(1);\n simpleList.append(2);\n simpleList.append(3);\n simpleList.append(4);\n simpleList.append(5);\n simpleList.append(6);\n simpleList.append(7);\n simpleList.append(8);\n simpleList.append(9);\n simpleList.append(10);\n Sorter.selectionSort(simpleList);\n List<Integer> list = simpleList.getList();\n Integer[] expected = new Integer[]{10,9,8,7,6,5,4,3,2,1};\n Integer[] real = new Integer[simpleList.size()];\n list.toArray(real);\n assertArrayEquals(expected, real);\n }",
"public static IntList selectionSort1(IntList input) {\n\t\tIntList output = new SimpleIntList();\n\t\twhile (!input.isEmpty()) {\n\t\t\tIntListEntry min = input.getFirst();\n\t\t\tfor (IntListEntry e = input.getFirst(); e != null; e = e.getNext())\n\t\t\t\tif (e.getItem()<min.getItem())\n\t\t\t\t\tmin = e;\n\t\t\tinput.delete(min);\n\t\t\toutput.append(min);\n\t\t}\n\t\treturn output;\n\t}",
"public SortingAlgorithmResult<E> sort(List<E> l);",
"public static void selectionSort(int[] list) {\n for (int i = 0; i < list.length - 1; i++) {\n int currentMin = list[i];\n int currentMinIndex = i;\n \n for (int j = i + 1; j < list.length; j++) {\n if (currentMin < list[j]) {\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // swap list[i] with list[currentMinIndex] if necessary\n if (currentMinIndex != i) {\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n }\n }",
"public static Comparable[] selectionSort(Comparable[] array) {\n int indexSorted = 0;\r\n //loops once for every array member, although value itself is unused\r\n for (Comparable member : array) {\r\n //remembers the index of the next ,owest member, by default the next index\r\n int low = indexSorted;\r\n \r\n //loops over every array member and comares with current lowest value\r\n for(int j = indexSorted; j < array.length; j++) {\r\n //if a lower value than low is found, set low to index of lower value\r\n if (array[j].compareTo(array[low]) < 0) {\r\n low = j;\r\n }\r\n }\r\n \r\n //if an index other than the next one is the lowest, swap the values of the two indexs\r\n if (low != indexSorted) {\r\n Comparable toShift = array[indexSorted];\r\n array[indexSorted] = array[low];\r\n array[low] = toShift;\r\n }\r\n \r\n //adds one index to the amount of sorted index\r\n indexSorted++;\r\n }\r\n \r\n return array;\r\n }",
"@Override\n public void sortIt(final Comparable a[]) {\n }",
"public static void selectionSort(int[] list) {\n for (int i=0; i<list.length-1; i++) {\n //find the minimum in the list [i... list.length-1]\n int currentMin= list[i];\n int currentMinIndex=i;\n \n for (int j=i+1; j<list.length; j++) {\n if (currentMin>list[j]) {\n currentMin=list[j];\n currentMinIndex=j;\n }\n }\n \n //swap list[i] with list[currentMinIndex] if necessary\n if (currentMinIndex != i) {\n list[currentMinIndex]=list[i];\n list[i]= currentMin;\n }\n }\n for (int j=0;j<list.length;j++) { //loop that print out all the values inputed\n System.out.print(list[j]+\" \");\n }\n }",
"public static void Selectionsort(int a[]) { \n\t int n = a.length; \n\t for (int i = 0; i < n-1; i++) \n\t { \n\t int min_idx = i; \n\t for (int j = i+1; j < n; j++) \n\t if (a[j] < a[min_idx]) \n\t min_idx = j; \n\t \n\t int temp = a[min_idx]; \n\t a[min_idx] = a[i]; \n\t a[i] = temp; \n\t } \n\t }",
"@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }",
"private static void selectionSort(ArrayList<Box> BoxArray) { \n\n\t\tfor ( int i = 0; i < BoxArray.size(); i++ ) { \n\t\t\tint lowPos = i; \n\t\t\tfor ( int j = i + 1; j < BoxArray.size(); j++ ) \n\t\t\t\tif ( BoxArray.get(j).volume() < BoxArray.get(lowPos).volume() ) \n\t\t\t\t\tlowPos = j;\n\t\t\tif ( BoxArray.get(lowPos) != BoxArray.get(i) ) { \n\t\t\t\tBox temp = BoxArray.get(lowPos);\n\t\t\t\tBoxArray.set(lowPos, BoxArray.get(i));\n\t\t\t\tBoxArray.set(i, temp);\n\t\t\t}\n\t\t}\n\t}",
"public static void selectionSort(double [] list1)\r\n\t{\r\n\t\tdouble temp= 0.0;\r\n\t\tint smallest=0;\r\n\t\r\n\t\tfor(int outside=0; outside<list1.length; outside++)\r\n\t\t{\r\n\t\t\t//System.out.println(\"Outside: \" + outside);\r\n\t\t\tsmallest=outside;\r\n\t\t\tfor(int inside=1+outside; inside<list1.length; inside++)\r\n\t\t\t{\r\n\t\t\t\tif(list1[inside]<list1[smallest])\r\n\t\t\t\t{\r\n\t\t\t\t\tsmallest = inside;\t\t\r\n\t\t\t\t\t//System.out.println(smallest);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttemp=list1[smallest];\r\n\t\t\tlist1[smallest]=list1[outside];\r\n\t\t\tlist1[outside]=temp;\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\n public void sort(List<T> items) {\n }",
"public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}",
"public static void sortitems(ArrayList<item> svd)\r\n{\n\r\n\tCollections.sort(svd, new Comparator<item>(){\r\n\t\tpublic int compare(item o1, item o2){\r\n\t\t\t\tif(o1.density == o2.density)\r\n\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t\treturn o1.density > o2.density ? -1 : 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n}",
"public static void sort(Object[] object) {\n // Set the variables for the current min, minIndex, and compare value\n Object currentMin;\n int currentMinIndex;\n int compareInt;\n\n // Begin loop to work through the list.\n for (int i = 0; i < object.length; i++) {\n // Find the minimum in the list.\n currentMin = object[i];\n currentMinIndex = i;\n for (int k = i + 1; k < object.length; k++) {\n compareInt = ((Comparable) currentMin).compareTo(object[k]);\n if(compareInt > 0) {\n currentMin = object[k];\n currentMinIndex = k;\n }\n }\n\n // Swap list[i] with list[currentMaxIndex] if needed.\n if (currentMinIndex != i) {\n object[currentMinIndex] = object[i];\n object[i] = currentMin;\n }\n }\n }",
"static void selectionSort(int a[])\n {\n int n = a.length;\n for(int i = 0; i < n-1; i++)\n {\n for(int j = i + 1; j < n; j++)\n {\n if(a[i] > a[j])\n swap(a,i,j);\n }\n }\n }",
"public void stringSelectionSort() {\n int nextMin;\n\n for (int i = 0; i < StringList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < StringList.length; j++) {\n if (StringList[j].compareTo(StringList[nextMin]) < 0)\n nextMin = j;\n }\n if (nextMin != i)\n swapSelectionStrings(StringList, i, nextMin);\n }\n }",
"public static <T extends Comparable<? super T>> \n\t\t\tvoid selectionSort (T [] array)\n {\t\n\t int startScan, index, minIndex;\n T minValue; \t// Note that T is now a type that can be used in\n \t\t\t\t// this method\n\n for (startScan = 0; startScan < (array.length-1); startScan++)\n {\n minIndex = startScan;\n minValue = array[startScan];\n for(index = startScan + 1; index < array.length; index++)\n {\n if (array[index].compareTo(minValue) < 0)\n {\n minValue = array[index];\n minIndex = index;\n }\n }\n array[minIndex] = array[startScan];\n array[startScan] = minValue;\n }\n \n }",
"public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }",
"public static void selectionSort(int input[]) {\n\t\tfor(int i = 0;i<input.length-1;i++) {\n\t\t\tint min = input[i];\n\t\t\tint minindex = i;\n\t\t\tfor(int j = i+1 ;j<input.length;j++) {\n\t\t\t\tif(min > input[j] ) {\n\t\t\t\t\tmin = input[j];\n\t\t\t\t\tminindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(minindex!=i) {\n\t\t\tinput[minindex] = input[i];\n\t\t\t input[i]= min;\n\t\t\t}\n\t\t}\n\t}",
"public static void sort(java.util.List arg0)\n { return; }",
"public static void sort(Comparable[] a){\n for(int i=1;i<a.length;i++){\n // Insert a[i] among a[i-1],a[i-2],a[i-3]...\n for (int j=i;j>0&&less(a[j],a[j-1]);j--){\n exch(a,j,j-1);\n }\n }\n }",
"public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}",
"public static void selectionSort (int[] elts) {\r\n\t\tint minPosition;\r\n\t\tint length = elts.length;\r\n\t\tfor (int i = 0; i < length-1; i++) {\r\n\t\t\tminPosition = findMinPositionSegment (elts, i, length-i);\r\n\t\t\tif (minPosition != i)\r\n\t\t\t\tswap (elts, i, minPosition);\r\n\t\t}\r\n\t}",
"public static double [] selectionSort (double a[]) {\n int length = a.length;\n int i, j;\n boolean needToExchange = false; // can be used to reduce the number of exchanges\n\n for(i = 0; i < length-1; i++)\n {\n int minIndex = i;\n for(j = i+1; j < length; j++)\n {\n if(a[j] < a[minIndex])\n {\n minIndex = j;\n needToExchange = true;\n }\n\n }\n\n if(needToExchange) {\n double tempValue = a[minIndex];\n a[minIndex] = a[i];\n a[i] = tempValue;\n needToExchange = false;\n }\n }\n\n return a;\n }",
"Vector<NewsArticle> insertionSort(Vector<NewsArticle> articles) {\n int i, j;\n int size = articles.size();\n NewsArticle sortedList[] = new NewsArticle[articles.size()];\n\n articles.copyInto(sortedList);\n NewsArticle temp;\n\n for (i = 1; i < size; i++) {\n temp = sortedList[i];\n\n j = i;\n while ((j > 0) && (sortedList[j - 1].getScore(filterType) < temp.getScore(filterType))) {\n sortedList[j] = sortedList[j - 1];\n j = j - 1;\n }\n sortedList[j] = temp;\n }\n Vector<NewsArticle> outList = new Vector<NewsArticle>();\n\n for (i = 0; i < size; i++) {\n temp = sortedList[i];\n outList.addElement(temp);\n }\n return outList;\n }",
"public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }",
"private void selectionSort(T[] arr) {\n for (int i = 0; i < n; i++) {\n int min = i; // the index of the minimal element is set to i by default\n for (int j = i + 1; j < n; j++) {\n if (arr[j].compareTo(arr[min]) < 0)\n min = j;\n }\n swap(arr, i, min);\n }\n }",
"public ArrayList<CollegeFootballTeam> selectionSort(ArrayList<CollegeFootballTeam> list)\r\n\t{\r\n\t\tCollegeFootballTeam highestRankedTeam;\r\n\t\tint maxI;\r\n\t\tfor(int i = 0; i < list.size(); i++)\r\n\t\t{\r\n\t\t\thighestRankedTeam = list.get(i);\r\n\t\t\tmaxI = i;\r\n\t\t\tfor(int j=i+1; j<list.size(); j++)\r\n\t\t\t{\r\n\t\t\t\tif(list.get(j).getSumOfVotes() < highestRankedTeam.getSumOfVotes())\r\n\t\t\t\t{\r\n\t\t\t\t\thighestRankedTeam = list.get(j);\r\n\t\t\t\t\tmaxI = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tCollegeFootballTeam temp = list.get(i);\r\n\t\t\tlist.set(i, highestRankedTeam);\r\n\t\t\tlist.set(maxI, temp);\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public void sort(){\n Collections.sort(list, new SortBySpecies());\n }",
"public void selectionSort(){\n for(int x=0; x < arraySize; x++){\n int minimum = x;\n for(int y = x; y < arraySize; y++){\n // Change to < for descending sort\n if(theArray[minimum] > theArray[y]){\n minimum = y;\n }\n }\n swapValues(x, minimum);\n printHorizontalArray(x, -1);\n }\n }",
"public static void selectionSort(int[] a) \n {\n for (int i = 0; i < a.length; i++) \n {\n int minPos = minimumPosition(a, i);\n swap(a, minPos, i);\n }\n }",
"@Override\r\n\tpublic List<T> sort(List<T> list) {\n\t\tassert list != null : \"list cannot be null\";\r\n\t\tfor(int i = 0; i < list.size() - 1; i ++){\r\n\t\t\tint min = i;\r\n\t\t\tfor(int j = i + 1; j < list.size(); j ++){\r\n\t\t\t\tint current = j;\r\n\t\t\t\tif(this.comparator.compare(list.get(min), list.get(current)) > 0){\r\n\t\t\t\t\tmin = current;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswap(list, i, min);\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\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}",
"public static void sort(Comparable[] a) {\n int minPos = 0;\n for (int i = 1; i < a.length; i++) {\n if (less(a[i], a[minPos])) minPos = i;\n }\n if (minPos != 0) exch(a, 0, minPos);\n\n // Modify i from 0 to 1, this can avoid index out of bound error\n for (int i = 1; i < a.length; i++) {\n for (int j = i; less(a[j], a[j - 1]); j--) {\n exch(a, j, j - 1);\n }\n }\n }",
"public static ArrayList<Pets> sortArrayList(ArrayList<Pets> input){\n\t\t// destination ArrayList\n\t\tArrayList<Pets> sortedPets = new ArrayList<Pets>();\n\t\t\n\t\t// for each element read from the input list, compare it to the values in the destination list\n\t\t// and insert it.\n\t\tfor (int inputIndex = 0; inputIndex < input.size(); inputIndex++){\n\t\t\tint addIndex = 0;\n\t\t\tfor (int spIndex = 0; spIndex < sortedPets.size(); spIndex++) {\n\t\t\t\tif (input.get(inputIndex).getId() > sortedPets.get(spIndex).getId()) {\n\t\t\t\t\taddIndex++;\n\t\t\t\t} \n\t\t\t}\n\t\t\tsortedPets.add(addIndex, input.get(inputIndex));\n\t\t}\n\t\treturn sortedPets;\n\t}",
"void sort();",
"void sort();",
"public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }",
"public static void sort(ArrayList<Integer> list) {\n\t\tint temp;\n\t\tfor (int i=0; i < list.size() ; i++) {\n\t\t\tfor (int j=i+1;j<list.size()-1;j++){\n\t\t\t\tif(list.get(i)>list.get(j)){\n\t\t\t\t\ttemp = list.get(i);\n\t\t\t\t\tlist.set(i,list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }",
"public static void sort(ArrayList<Comparable> list)\n {\n sort(list, 0, list.size() - 1);\n }",
"public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }",
"public static void main(String[] args) {\n ArrayList<Integer> mainList = new ArrayList<Integer>();\n mainList.add(5);\n mainList.add(2);\n mainList.add(10);\n mainList.add(14);\n mainList.add(3);\n mainList.add(6);\n mainList.add(9);\n boolean asc = false;\n System.out.println(listSort(mainList, asc));\n }",
"@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }",
"static void SelectionSort(int[] arr){\n int minIndex;\n for(int i = 0; i<arr.length-1; i++){\n minIndex = i;\n for(int j = i+1; j<arr.length;j++){\n if(arr[minIndex]>arr[j]){\n minIndex = j;\n }\n }\n if(minIndex>i){\n Swap(arr,i,minIndex);\n }\n }\n }",
"private void Sort(int[] list)\r\n {\r\n switch (SortField.getText())\r\n {\r\n case \"Insertion Sort\":\r\n {\r\n InsertionSort insertionSort = new InsertionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n insertionSort.insertionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(insertionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(insertionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*2)\");\r\n\r\n break;\r\n }\r\n case \"Selection Sort\":\r\n {\r\n SelectionSort selectionSort = new SelectionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n selectionSort.selectionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(selectionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(selectionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n2)\");\r\n\r\n break;\r\n }\r\n case \"Quick Sort\":\r\n {\r\n QuickSort quickSort = new QuickSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n quickSort.quickSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(quickSort.getComparisons()));\r\n MovementField.setText(String.valueOf(quickSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n log n)\");\r\n\r\n break;\r\n }\r\n case \"Merge Sort\":\r\n {\r\n MergeSort mergeSort = new MergeSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n mergeSort.mergeSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(mergeSort.getComparisons()));\r\n MovementField.setText(String.valueOf(mergeSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"T(n) = 2T(n/2) + θ(n)\");\r\n\r\n break;\r\n }\r\n case \"Heap Sort\":\r\n {\r\n HeapSort heapSort = new HeapSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n heapSort.heapSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(heapSort.getComparisons()));\r\n MovementField.setText(String.valueOf(heapSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(nLogn)\");\r\n\r\n break;\r\n }\r\n case \"Radix Sort\":\r\n {\r\n RadixSort radixSort = new RadixSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n radixSort.radixSort(list, Integer.parseInt(SizeField.getText()));\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(\"Radix Sort has 0 comparisons\");\r\n MovementField.setText(String.valueOf(radixSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(kn)\");\r\n\r\n break;\r\n }\r\n\r\n case \"Bubble Sort\":\r\n {\r\n BubbleSort bubbleSort = new BubbleSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n bubbleSort.bubbleSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(bubbleSort.getComparisons()));\r\n MovementField.setText(String.valueOf(bubbleSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*n)\");\r\n\r\n break;\r\n }\r\n }\r\n }",
"@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }",
"public void selectionSort(int[] x)\n {\n for (int i = 0; i < x.length-1; i++) {\n int minIndex = i;\n for (int j = i+1; j < x.length; j++) {\n if (x[minIndex] > x[j]) {\n minIndex = j;\n }\n }\n int temp = x[i];\n x[i] = x[minIndex];\n x[minIndex] = temp;\n }\n \n public void replaceFirst(int oldVal, int newVal)\n {\n \n }\n}",
"public void insertionSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2; //init, check condition\r\n\t\tfor (int i = 1 ; i < list.size(); i++){\r\n\t\t\tsteps ++; //=\r\n\t\t\tint j = i;\r\n\t\t\tsteps += 7; //-, >, get(), compareTo(), get(), -, <\r\n\t\t\twhile ((j - 1 > 0) && (list.get(j).compareTo(list.get(j - 1)) > 0)){\r\n\t\t\t\tsteps += 3; // swap(), -, --\r\n\t\t\t\tswap(list, j, j - 1);\r\n\t\t\t\tsteps += 5;\r\n\t\t\t\tj--;\r\n\t\t\t\tsteps += 7; //-, >, get(), compareTo(), get(), -, <\r\n\t\t\t}\r\n\t\t\tsteps += 2; //increment, check condition\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Insertion Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"public static void selectionSorter(int[] arr) {\n //run n-1 times where n is array length\n for(int i = 0; i < arr.length - 1; i++) {\n //find the minimum element in unsorted list\n //swap it with arr[i]\n int min = i;\n for(int j = i + 1; j < arr.length; j++) {\n if(arr[j] < arr[min]) {\n min = j;\n }\n }\n swap(arr,min,i);\n }\n }",
"public String doSort();",
"public static ArrayList<Integer> sortArrayList (ArrayList<Integer> arrList) {\n\t Collections.sort(arrList);\n return arrList;\n}",
"public static void IncOrder(ArrayList<Integer> list)\n{\n // Your code here\n Collections.sort(list);\n}",
"static void selectionSort(int arr[]) {\n\t\tfor (int i = 0; i < arr.length - 1; i++) {\r\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\r\n\t\t\t\tif (arr[i] > arr[j]) {\r\n\t\t\t\t\tswap(arr, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void sortV();",
"public static void selectionSort(int[] a) {\r\n int temp; // catalyst variable for Integer swapping\r\n int spot; //location in array where minimum will be inserted\r\n int minimum; //location of minimum value in remainder\r\n\r\n for (spot = 0; spot < a.length - 1; spot++) {\r\n minimum = spot; //\r\n for (int i = spot + 1; i < a.length; i++) {\r\n if (a[i] < a[minimum]) {\r\n minimum = i; //if i is less than minimum, i is new minimum\r\n }\r\n }//end for i\r\n\r\n //swap a[spot] and a[minimum]\r\n temp = a[minimum];\r\n a[minimum] = a[spot];\r\n a[spot] = temp;\r\n }//end for spot\r\n }",
"public int[] selectionSort(int[] lista) {\r\n\t for (int i = 0; i < lista.length; i++) {\r\n\t int inicial = lista[i];\r\n\t int minId = i;\r\n\t for (int j = i+1; j < lista.length; j++) {\r\n\t if (lista[j] < inicial) {\r\n\t inicial = lista[j];\r\n\t minId = j;\r\n\t }\r\n\t }\r\n\t // swapping\r\n\t int cambiar = lista[i];\r\n\t lista[i] = inicial;\r\n\t lista[minId] = cambiar;\r\n\t }\r\n\t return lista;\r\n\t}",
"public static void main(String[] args) {\n\t\tSelectionSort ss = new SelectionSort();\n\t\tInsertionSort is = new InsertionSort();\n\t\tint [] listToSort = ss.listToSort();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tis.insertionSort(listToSort);\n\t\tSystem.out.println(\"Time Taken to Sort :: \"+(System.currentTimeMillis()-startTime)+\"ms\");\n\t\tss.printList(listToSort);\n\n\t}",
"@Test\n\tvoid SelectionSortTest() \n\t{\t\n\t\tint[] twoNumbers = new int[] {2, 1};\n\t\tint[] expTwoNumbers = new int[] {1, 2};\n\t\tint[] everyOther = new int[] {1, 3, 5, 6, 4, 2};\n\t\tint[] expEveryOther = new int[] {1, 2, 3, 4, 5, 6};\n\t\tint[] smallestFirst = new int[] {1, 2, 5, 6, 3, 4};\n\t\tint[] expSmallestFirst = new int[] {1, 2, 3, 4, 5, 6};\n\t\tint[] smallestMiddle = new int[] {3, 4, 1, 2, 5, 6};\n\t\tint[] expSmallestMiddle = new int[] {1, 2, 3, 4, 5, 6};\n\t\t\n\t\tassertArrayEquals(expTwoNumbers, utilities.SelectionSort(twoNumbers));\n\t\tassertArrayEquals(expEveryOther, utilities.SelectionSort(everyOther));\n\t\tassertArrayEquals(expSmallestFirst, utilities.SelectionSort(smallestFirst));\n\t\tassertArrayEquals(expSmallestMiddle, utilities.SelectionSort(smallestMiddle));\n\t}",
"public void sort() {\n }",
"public static ArrayList<Process> sortList(ArrayList<Process> in, Process p) {\n\tProcess o1=in.get(0);\n\tint index=0;\n\tfor(int i=1; i<in.size();i++) {\n\t\tif(in.get(i).getCycleTracker()>p.getCycleTracker()) {\n\t\t\tindex=i;\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()<p.getCycleTracker()) {\n\t\t\t//o1=in.get\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()==p.getCycleTracker()){\n\t\t\tif(in.get(i).getA()> p.getA()) {\n\t\t\t\tindex=i;\n\t\t\t}\n\t\t\telse if(in.get(i).getA()==p.getA()) {\n\t\t\t\tif(in.get(i).getID()>p.getID()) {\n\t\t\t\t\tindex=i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tin.add(index, p);\n\t\t\n\t\treturn in;\n\t\n}",
"public static void selectionSort(List<Integer> values) {\r\n for (int i = 0; i < values.size(); i++) {\r\n int j = findPosMin(values, i);\r\n swap(values, i, j);\r\n } // for\r\n }",
"private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }",
"private static ArrayList<Integer> sort(ArrayList<Integer> v) {\n\t\tint key, i, j; \n\t\tfor (j = 1; j != v.size(); j++) {\n\t\t\tkey = v.get(j); \n\t\t\ti = j - 1; \n\t\t\twhile ((i >= 0) && (v.get(i) > key)) {\n\t\t\t\tv.set(i+1, v.get(i));\n\t\t\t\ti -= 1; \n\t\t\t}\n\t\t\tv.set(i+1, key); \n\t\t}\n\t\treturn v; \n\t}",
"public static void selection(double[] list){\n \n double currentMin = 0;\n int currentMinIndex = 0;\n \n // searches overall array\n for(int i = 0; i < list.length - 1; i++){\n currentMin = list[i];\n currentMinIndex = i;\n \n // This is where the array will be sorted\n for(int j = i + 1; j < list.length; j++){\n // will comapre current numbers to next\n if(currentMin < list[j]){\n currentMin = list[j];\n currentMinIndex = j;\n }\n }\n \n // This is where the values are swaped\n if(currentMinIndex != i){\n list[currentMinIndex] = list[i];\n list[i] = currentMin;\n }\n } \n }",
"private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }",
"public static void main(String[] args) {\n\t\tSelectionSort ob=new SelectionSort();\n\t\tint i=0;\n\t\tint min=0;\n\t\tfor(int j=i+1;j<a.length;j++){\n\t\t\tmin=ob.mini(a, j);\n\t\t\tif(a[i]>a[min]){\n\t\t\t\tob.exch(a, i, min);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tfor(int i1=0;i1<a.length;i1++){\n\t\t\tSystem.out.println(a[i1]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void selectionSort (int array[])\n {\n for (int i = 0; i < (array.length -1); i++)\n {\n for (int j = i + 1; j < (array.length); j++)\n {\n if(array[i] > array[j])\n //the new found smallest element is swapped\n swap(array, j, i);\n }\n }\n }",
"public static void selectionSort(int[] data){\n\n\tfor(int i = 0; i < data.length; i++){\n\t int min = data[i];\n\t int indexToReplace = i;\n\n\t for(int k = i; k < data.length; k++){\n\t\tif(data[k] < min){\n\t\t indexToReplace = k;\n\t\t min = data[k];\n\t\t}\n\t }\n\n\t int old = data[i];\n\t data[i] = min;\n\t data[indexToReplace] = old;\n\t}\n }",
"public static void selectionSort(int[] arr) {\n for (int firstUnordered = 0; firstUnordered < arr.length; firstUnordered++) {\n int smallestIndex = firstUnordered;\n for (int j = firstUnordered; j < arr.length; j++) {\n if (arr[j] < arr[smallestIndex]) {\n smallestIndex = j;\n }\n }\n int aux = arr[firstUnordered];\n arr[firstUnordered] = arr[smallestIndex];\n arr[smallestIndex] = aux;\n }\n }",
"private static void sortByVerified( ArrayList<Volunteer> list)\n {\n // Find the string reference that should go in each cell of\n // the array, from cell 0 to the end\n for ( int j = 0; j < list.size();j++ )\n {\n // Find min: the index of the string reference that should go into cell j.\n // Look through the unsorted strings (those at j or higher) for the one that is first in lexicographic order\n int min = j;\n for ( int k=j+1; k < list.size(); k++ ) {\n if (list.get(k).compareTo(list.get(min)) > 0) {\n min = k;\n }\n\n }\n\n // Swap the reference at j with the reference at min\n Collections.swap(list, j, min);\n }\n }",
"static void selectionSort(int[] arr){\r\n\t\t\r\n\t\tfor(int i=0;i<arr.length-1;i++) {\r\n\t\t\t\r\n\t\t\tfor(int j=(i+1);j<arr.length;j++) {\r\n\t\t\t\t\r\n\t\t\t\tif(arr[j] < arr[i]) MyUtil.swap(arr,i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tMyUtil.displayArray(arr);\r\n\t\t\r\n\t}",
"public static void sortitems(ArrayList<item> svd)\n\t{\n\t\tCollections.sort(svd, new Comparator<item>(){\n\t\t public int compare(item o1, item o2){\n\t\t if(o1.density == o2.density)\n\t\t return 0;\n\t\t return o1.density > o2.density ? -1 : 1;\n\t\t }\n\t\t});\n\t\t\n\t\t\n\t}",
"private static void selectSortingOption(ArrayList<Person> p) {\n\t\tArrayList<Person> personList = p;\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tboolean again = true;\n\t\twhile (again) {\n\t\t\tagain = false;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Pick your sorting option\\n\" + \"1: First Name\\n\" + \"2: Last Name\\n\" + \"3: Starting Date\");\n\n\t\t\tint input = scan.nextInt();\n\n\t\t\tswitch (input) {\n\t\t\tcase 1:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getFirstName().toUpperCase().compareTo(object2.getFirstName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getLastName().toUpperCase().compareTo(object2.getLastName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\tDateFormat f = new SimpleDateFormat(\"yyyyMMdd\");\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Person o1, Person o2) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn f.parse(o1.getStartDate()).compareTo(f.parse(o2.getStartDate()));\n\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tagain = true;\n\t\t\t\tSystem.out.println(\"Enter a number between 1 and 3\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscan.close();\n\t}",
"public static void selectionSort(int[] data){ \n for (int i = 0; i < data.length; i++) {\n\t int placeholder = 0;\n\t for( int j = i; j < data.length; j++) {\n\t if (data[j] < data[i]) {\n\t\t placeholder = data[i];\n\t\t data [i] = data[j];\n\t\t data[j] = placeholder;\n\t }\n\t }\n }\n }",
"static <T extends Comparable<T>> List<T> sort(List<T> list) {\n\t\tif (list == null || list.size() < 2) {\n\t\t\treturn list;\n\t\t}\n\t\tfor (int i = 1; i < list.size(); i++) {\n\t\t\t// the current is begin from index of 1\n\t\t\tT current = list.get(i);\n\t\t\tint j = i - 1;\n\t\t\tint origin = j;\n\t\t\twhile (j >= 0 && list.get(j).compareTo(current) > 0) {\n\t\t\t\t// insert into the head of the sorted list\n\t\t\t\t// or as the first element into an empty sorted list\n\t\t\t\t// last element of the sorted list\n\t\t\t\t// middle of the list\n\t\t\t\t// insert into middle of the sorted list or as the last element\n\t\t\t\tlist.set(j + 1, list.get(j));\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tlist.set(j + 1, current);\n\t\t\tprintInsertionSortAnimation(list, current, j, origin);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn list;\n\t}",
"static void selectionSort(int[] arr) {\n\t\t\t\n\t\tfor(int i = 0; i<arr.length-1;i++) {\n\t\t\tint index =i;\n\t\t\tfor(int j =i+1; j<arr.length;j++) {\n\t\t\t\tif(arr[j]<arr[index]) {\n\t\t\t\t\tindex = j; //finding the smallest index\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//Swap the found minimum element with the first element\n\t\t\tint temp = arr[index]; \n arr[index] = arr[i]; \n arr[i] = temp;\n\t\t\t\t\t\t}\t\n\t\tfor(int a:arr) \n\t\t{\t\n\t\t\tSystem.out.print(a+ \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t}",
"public void selectionSort(int [] nums) {\n\t\tfor(int i=0;i<nums.length;i++) {\n\t\t\tint min=i;\n\t\t\tfor(int j=i+1;j<nums.length;j++) {\n\t\t\t\tif(less(nums[j],nums[i])) \n\t\t\t\t\tmin=j;\n\t\t\t}\n\t\t\tswap(nums,i,min);\n\t\t}\n\t}",
"public void selectionSort(int [] nums) {\n\t\tfor(int i=0;i<nums.length;i++) {\n\t\t\tint min=i;\n\t\t\tfor(int j=i+1;j<nums.length;j++) {\n\t\t\t\tif(less(nums[j],nums[i])) \n\t\t\t\t\tmin=j;\n\t\t\t}\n\t\t\tswap(nums,i,min);\n\t\t}\n\t}",
"public void listSort() {\n\t\tCollections.sort(cd);\n\t}",
"public void sort() {\r\n Collections.sort(this.list, this);\r\n }",
"public static void selectionSort(int[] data){\n\n int sfIndex, lowestSF, store;\n sfIndex = 0;\n for (int i = 0; i < data.length; i++){\n lowestSF = data[i];\n for (int j = i; j < data.length; j++){\n if (data[j] < lowestSF){\n lowestSF = data[j];\n sfIndex = j;\n }\n }\n store = data[i];\n data[i] = lowestSF;\n data[sfIndex] = store;\n }\n }",
"@Override\n public int compareTo(ArrayListOfIntsWritable obj)\n {\n ArrayListOfIntsWritable other = (ArrayListOfIntsWritable) obj;\n if (isEmpty())\n {\n if (other.isEmpty())\n {\n return 0;\n }\n else\n {\n return -1;\n }\n }\n\n for (int i = 0; i < size(); i++)\n {\n if (other.size() <= i)\n {\n return 1;\n }\n if (get(i) < other.get(i))\n {\n return -1;\n }\n else if (get(i) > other.get(i))\n {\n return 1;\n }\n }\n\n if (other.size() > size())\n {\n return -1;\n }\n else\n {\n return 0;\n }\n }",
"public static void main(String args[])\r\n {\r\n JavaSort ob = new JavaSort();\r\n \r\n CatalogueItem arr[] = {\r\n new CatalogueItem( 3, \"Life of Pi\",\"Books\"),\r\n new CatalogueItem( 7, \"Deelongie 4 way toaster\",\"Home and Kitchen\"),\r\n new CatalogueItem( 2, \"Glorbarl knife set\",\"Home and Kitchen\"),\r\n new CatalogueItem( 4, \"Diesorn vacuum cleaner\",\"Appliances\"),\r\n new CatalogueItem( 5, \"Jennie Olivier sauce pan\",\"Home and Kitchen\"),\r\n new CatalogueItem( 6, \"This book will save your life\",\"Books\"),\r\n new CatalogueItem( 9, \"Kemwould hand mixer\",\"Appliances\"),\r\n new CatalogueItem( 1, \"Java for Dummies\",\"Books\"),\r\n };\r\n System.out.println(\"The Unsorted array is\");\r\n ob.printArray(arr);\r\n\r\n /*\r\n //apply sort\r\n ob.doOptimisedBubbleSort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n */\r\n\r\n sort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n\r\n System.out.println(\"The algorithm that is most efficient is the Java built in sort.\\n\\n\" +\r\n \"It uses Timsort, which has on average is the same level of time complexity\\n\" +\r\n \"as Quicksort - O(n log(n)). But Timsort is better at it's best and worst\\n\" +\r\n \"when compared with Quicksort.\\n\\n\" +\r\n \"Quicksort best = O(n log(n)) worst = O(n^2)\\n\" +\r\n \"Timsort best = O(n) worst = O(n log(n))\\n\" +\r\n \"\\n\" +\r\n \"This means at it's best, Timsort will only have to traverse the array 'n' times, to sort.\\n\" +\r\n \"And Quicksort at it's worst will have to check an array length squared amount of elements.\\n\");\r\n\r\n }",
"public static void userSort(ArrayList<FileData> fromFile, int primary_sort, int secondary_sort, int primary_order, int secondary_order)\n {\n \n // user wants to sort by primary = state code and secondary = county code\n if(primary_sort == 1 && secondary_sort == 2) \n {\n if(primary_order == 1 && secondary_order == 1){// user wants both primary and secondary in ascending order\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order == 2 && secondary_order == 2){ // user wants both primary and secondary in decending order\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){// primary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n // user wants to sort by primary = county code and secondary = state code\n if(primary_sort == 2 && secondary_sort == 1){\n if(primary_order == 1 && secondary_order == 1){\n //primary and seconary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2 && secondary_order == 2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){//primary is ascending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); // primary sort\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); // primary sort\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==1&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==1&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n } \n } \n }\n \n \n if(primary_sort==1&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n \n if(primary_sort==8&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==6&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==7&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==8&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==3&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==4&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==5&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n }",
"public static void sort(Comparable[] a){\n Comparable[] aux = new Comparable[a.length];\n sort(a,aux,0,a.length-1);\n }",
"public void selectionSort(int [] array) {\n\t\t\n\t\t//10,3,6,13,2,1\n\t\t//1,3,6,13,2,10 \n\t\t//1,2,6,13,3,10\n\t\t//1,2,3,13,6,10\n\t\t//1,2,3,6,13,10\n\t\t//1,2,3,6,10,13\n\t\t\n\t\tint minValue = 0;\n\t\tint minIndex = 0; \n\t\t\n\t\tfor(int i=0; i<array.length-1; i++) {\n\t\t\t\n\t\t\tminValue = array[i];\n\t\t\t\n\t\t\tfor(int j=i; j<array.length; j++) {\n\t\t\t\t\n\t\t\t\tif(array[j]<minValue) {\n\t\t\t\t\t\n\t\t\t\t\tminValue = array[j];\n\t\t\t\t\tminIndex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tint temp = array[i];\n\t\t\tarray[i] = array[minIndex];\n\t\t\tarray[minIndex] = temp;\n\t\t\tSystem.out.println(Arrays.toString(array));\n\t\t}\n\t}",
"public static <E> void selectionSort(E[] list,\n\t\t\tComparator<? super E> comparator) {\n\t\tfor (int i = 0; i < list.length - 1; i++) {\n\t\t\t// Find the minimum in the list[i..list.length-1]\n\t\t\tE currentMin = list[i];\n\t\t\tint currentMinIndex = i;\n\n\t\t\tfor (int j = i + 1; j < list.length; j++) {\n\t\t\t\tif (comparator.compare(currentMin, list[j]) > 0) {\n\t\t\t\tcurrentMin = list[j];\n\t\t\t\tcurrentMinIndex = j;\n\t\t\t}\n\t\t}\n\n\t\t// Swap list[i] with list[currentMinIndex] if necessary\n\t\tif (currentMinIndex != i) {\n\t\t\t\tlist[currentMinIndex] = list[i];\n\t\t\t\tlist[i] = currentMin;\n\t\t\t}\n\t\t}\n\t}",
"private void sortRating()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getRating().compareTo(b.getRating());\n if(result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }"
] | [
"0.73516554",
"0.69924325",
"0.68247426",
"0.68078357",
"0.67747176",
"0.6644862",
"0.65355587",
"0.65083945",
"0.6501248",
"0.6498777",
"0.6478257",
"0.6444247",
"0.64246255",
"0.63986444",
"0.6385198",
"0.63604367",
"0.63436526",
"0.63313764",
"0.6260163",
"0.6259721",
"0.62444454",
"0.6218876",
"0.621633",
"0.6213599",
"0.62070286",
"0.62036586",
"0.62012017",
"0.6200442",
"0.619654",
"0.617831",
"0.6165963",
"0.61583364",
"0.6156662",
"0.6156662",
"0.6152752",
"0.6148695",
"0.6138009",
"0.61369187",
"0.6124238",
"0.61153066",
"0.61098117",
"0.60979706",
"0.6074527",
"0.60743105",
"0.6043159",
"0.60254073",
"0.60029846",
"0.60029846",
"0.6000416",
"0.59938806",
"0.5988592",
"0.5987661",
"0.5982901",
"0.5970831",
"0.59658366",
"0.5962781",
"0.5961789",
"0.59437865",
"0.59424555",
"0.59339577",
"0.59258634",
"0.5918308",
"0.59163445",
"0.5902746",
"0.5900895",
"0.5886311",
"0.5866883",
"0.58562446",
"0.5853364",
"0.5848713",
"0.5845988",
"0.58385116",
"0.58341694",
"0.583039",
"0.58278495",
"0.5827323",
"0.5806795",
"0.58050853",
"0.5803382",
"0.57962114",
"0.57863086",
"0.57860523",
"0.57854414",
"0.5780519",
"0.5776695",
"0.5776339",
"0.5775526",
"0.576742",
"0.57647413",
"0.57647413",
"0.57628447",
"0.5761582",
"0.57596487",
"0.57530224",
"0.57528144",
"0.5752245",
"0.5746825",
"0.5741419",
"0.5723742",
"0.57189983"
] | 0.7651938 | 0 |
This method takes in an ArrayList of Comparable objects and sorts them in descending order using an insertion sorting algorithm. | public void insertionSort(ArrayList <Comparable> list){
steps += 2; //init, check condition
for (int i = 1 ; i < list.size(); i++){
steps ++; //=
int j = i;
steps += 7; //-, >, get(), compareTo(), get(), -, <
while ((j - 1 > 0) && (list.get(j).compareTo(list.get(j - 1)) > 0)){
steps += 3; // swap(), -, --
swap(list, j, j - 1);
steps += 5;
j--;
steps += 7; //-, >, get(), compareTo(), get(), -, <
}
steps += 2; //increment, check condition
}
System.out.println();
System.out.println("Insertion Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n ArrayList<Comparable> BestBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestInsertion = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstInsertion = new ArrayList<Comparable>();\r\n\r\n // Best and worst case bubbleSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestBubble.add(i * 2);\r\n } System.out.println(\"BestBubble in pre-sorted ascending order...\\n\" + BestBubble + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstBubble.add(x);\r\n }\r\n System.out.println(\"WorstBubble in descending order...\\n\" + WorstBubble + \"\\n\");\r\n\r\n // Best and worst case selectionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestSelection.add(i * 2);\r\n } System.out.println(\"BestSelection in pre-sorted ascending order...\\n\" + BestSelection + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstSelection.add(x);\r\n }\r\n System.out.println(\"WorstSelection in descending order...\\n\" + WorstSelection + \"\\n\");\r\n\r\n // Best and worst case insertionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestInsertion.add(i * 2);\r\n } System.out.println(\"BestInsertion in pre-sorted ascending order...\\n\" + BestInsertion + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstInsertion.add(x);\r\n }\r\n System.out.println(\"WorstInsertion in descending order...\\n\" + WorstInsertion + \"\\n\");\r\n\r\n // Sort every single instantiation of ArrayList\r\n MySorts.bubbleSortV(BestBubble);\r\n MySorts.bubbleSortV(WorstBubble);\r\n\r\n MySorts.selectionSortV(BestSelection);\r\n MySorts.selectionSortV(WorstSelection);\r\n\r\n MySorts.insertionSortV(BestInsertion);\r\n MySorts.insertionSortV(WorstInsertion);\r\n\r\n // Prints all the instantiations of ArrayList\r\n System.out.println(\"Sorted BestBubble...\\n\" + BestBubble + \"\\n\");\r\n System.out.println(\"Sorted WorstBubble...\\n\" + WorstBubble + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestSelection...\\n\" + BestSelection + \"\\n\");\r\n System.out.println(\"Sorted WorstSelection...\\n\" + WorstSelection + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestInsertion...\\n\" + BestInsertion + \"\\n\");\r\n System.out.println(\"Sorted WorstInsertion...\\n\" + WorstInsertion + \"\\n\");\r\n }",
"public static void DecOrder(ArrayList<Integer> list)\n{\n // Your code here\n Collections.sort(list, Collections.reverseOrder());\n}",
"public static void sort(ArrayList<Comparable> list)\n {\n sort(list, 0, list.size() - 1);\n }",
"Vector<NewsArticle> insertionSort(Vector<NewsArticle> articles) {\n int i, j;\n int size = articles.size();\n NewsArticle sortedList[] = new NewsArticle[articles.size()];\n\n articles.copyInto(sortedList);\n NewsArticle temp;\n\n for (i = 1; i < size; i++) {\n temp = sortedList[i];\n\n j = i;\n while ((j > 0) && (sortedList[j - 1].getScore(filterType) < temp.getScore(filterType))) {\n sortedList[j] = sortedList[j - 1];\n j = j - 1;\n }\n sortedList[j] = temp;\n }\n Vector<NewsArticle> outList = new Vector<NewsArticle>();\n\n for (i = 0; i < size; i++) {\n temp = sortedList[i];\n outList.addElement(temp);\n }\n return outList;\n }",
"public static void sort(ArrayList<Integer> list) {\n\t\tint temp;\n\t\tfor (int i=0; i < list.size() ; i++) {\n\t\t\tfor (int j=i+1;j<list.size()-1;j++){\n\t\t\t\tif(list.get(i)>list.get(j)){\n\t\t\t\t\ttemp = list.get(i);\n\t\t\t\t\tlist.set(i,list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }",
"public static void mySort(ArrayList<Integer> myList)\n {\n\n }",
"public void insertionSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Insertion Sort\");\n System.out.println();\n\n int current = 0;\n int len = list.size();\n for (int n = 1; n < len; n++) {\n current = list.get(n);\n int j = n - 1;\n while (j >= 0 && list.get(j) > current) {\n list.set(j + 1, list.get(j));\n j = j - 1;\n }\n list.set(j + 1, current);\n }\n }",
"public void sortObjectList(){\n\t\tint counter = gameObjectsList.size() - 1;\n\t\tif (gameObjectsList == null || gameObjectsList.size() == 0){\n\t\t\treturn;\n\t\t}\n\t\tquicksort(0, counter);\n\t}",
"public void sort(ArrayList<Integer> arrayList) {\r\n System.out.println(arrayList.toString());\r\n mergeSort(arrayList, 0, arrayList.size()-1);\r\n System.out.println(arrayList.toString());\r\n }",
"public static <T extends Comparable<? super T>> void insertionSort(List<T> a){\n insertionSort(a, 0, a.size()-1);\n }",
"public void sortDescending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items, Collections.reverseOrder());\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}",
"public static ArrayList<Integer> sortArrayList (ArrayList<Integer> arrList) {\n\t Collections.sort(arrList);\n return arrList;\n}",
"public static void sort(Comparable[] a){\n for(int i=1;i<a.length;i++){\n // Insert a[i] among a[i-1],a[i-2],a[i-3]...\n for (int j=i;j>0&&less(a[j],a[j-1]);j--){\n exch(a,j,j-1);\n }\n }\n }",
"private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}",
"public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}",
"public void bubbleSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2; //init, check condition\r\n\t\tfor (int i = list.size() - 1; i >= 0; i --){\r\n\t\t\tsteps += 2; //init, check condition\r\n\t\t\tfor (int j = 0; j < i ; j ++){\r\n\t\t\t\tsteps += 5;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(j + 1)) < 0){\r\n\t\t\t\t\tsteps += 2;\r\n\t\t\t\t\tswap(list, j, j + 1);\r\n\t\t\t\t\tsteps += 5;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Bubble Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"public static <T extends Comparable<? super T>> void insertionSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = 0; i < size; i++){\n int sortedSideIndex = i;\n while(sortedSideIndex > 0 && list.get(sortedSideIndex - 1).compareTo(list.get(sortedSideIndex)) > 0){\n swap(list, sortedSideIndex, sortedSideIndex - 1);\n sortedSideIndex--;\n }\n }\n }\n }",
"public void selectionSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2;\r\n\t\tfor (int i = list.size() - 1; i >= 0; i--){\r\n\t\t\tsteps ++;\r\n\t\t\tint biggest = 0; \r\n\t\t\tsteps += 2;\r\n\t\t\tfor (int j = 0; j < i; j++){\r\n\t\t\t\tsteps += 4;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(biggest)) > 0){\r\n\t\t\t\t\tsteps ++;\r\n\t\t\t\t\tbiggest = j;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 5;\r\n\t\t\tswap(list, i, biggest);\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Selection Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"public static ArrayList<Pets> sortArrayList(ArrayList<Pets> input){\n\t\t// destination ArrayList\n\t\tArrayList<Pets> sortedPets = new ArrayList<Pets>();\n\t\t\n\t\t// for each element read from the input list, compare it to the values in the destination list\n\t\t// and insert it.\n\t\tfor (int inputIndex = 0; inputIndex < input.size(); inputIndex++){\n\t\t\tint addIndex = 0;\n\t\t\tfor (int spIndex = 0; spIndex < sortedPets.size(); spIndex++) {\n\t\t\t\tif (input.get(inputIndex).getId() > sortedPets.get(spIndex).getId()) {\n\t\t\t\t\taddIndex++;\n\t\t\t\t} \n\t\t\t}\n\t\t\tsortedPets.add(addIndex, input.get(inputIndex));\n\t\t}\n\t\treturn sortedPets;\n\t}",
"public static ArrayList<Integer> insertionSort(ArrayList<Integer> list) {\n ArrayList<Integer> outList = new ArrayList<>();\n for (int toInsert : list) {\n for (int j = 0; j < outList.size(); j++) {\n if (outList.get(j) >= toInsert) {\n outList.add(j, toInsert);\n break;\n } else if (j == outList.size() - 1) {\n outList.add(toInsert);\n break;\n }\n }\n if (outList.size() == 0) {\n outList.add(toInsert);\n }\n }\n return outList;\n }",
"public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }",
"public static void IncOrder(ArrayList<Integer> list)\n{\n // Your code here\n Collections.sort(list);\n}",
"public void triCollection(){\r\n Collections.sort(collection);\r\n }",
"private static void sortingArrayList() {\n Collections.sort(allMapData, new Comparator<MapDataModel>() {\n public int compare(MapDataModel d1, MapDataModel d2) {\n return valueOf(d1.getDateTime().compareTo(d2.getDateTime()));\n }\n });\n }",
"private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }",
"@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }",
"@Override\n public void sort(List<T> items) {\n }",
"public static void main(String[] args) {\n\t\t\n\t\tEmployee emp1 = new Employee(1,\"Hibachi\",2000000);\n\t\tEmployee emp2 = new Employee(2,\"Budh\",50000000);\n\t\tEmployee emp3 = new Employee(3,\"Som\",1000000);\n\t\tEmployee emp4 = new Employee(4,\"Mangal\",600000);\n\t\tEmployee emp5 = new Employee(5,\"Brihaspati\",7000000);\n\t\t\n\t\tList<Employee> empList = new ArrayList<>();\n\t\tempList.add(emp1);\n\t\tempList.add(emp2);\n\t\tempList.add(emp3);\n\t\tempList.add(emp4);\n\t\tempList.add(emp5);\n\t\t\n\t\t// sorting done using comparable implementation Employee\n\t\tSystem.out.println(\"sorting using comparable. Sorts by default by name\");\n \t\tCollections.sort(empList);\n\t\t\n\t\tempList.forEach(empl -> System.out.println(empl));\n\n\t\t//using comparator in Employee sort the employees by salary\n\t\tCollections.sort(empList, Employee.compareSalary);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on salary\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//using comparator in Employee sort the employees by id\n\t\tCollections.sort(empList, Employee.compareId);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on Id\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//Now let's say we want to use the comparator to sort in descending order\n\t\tComparator<Employee> reverseSortSalaryDescendingOrder = Collections.reverseOrder(Employee.compareSalary);\n\t\tCollections.sort(empList,reverseSortSalaryDescendingOrder );\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"Salary soreted in reverse order i.e. descending order using same comparator and Collections reverseOrder()\");\n\t\tempList.forEach(empl -> System.out.println(empl));\n\t\t\n\t\t// Or we can reverse using the comparator's own reversed() method. Internally it calls reverseOrder() \n\t\tCollections.sort(empList, Employee.compareSalary.reversed());\n\t\t\n\t\t\n\t}",
"public void insertionNumberSort()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Integer.parseInt(AL.get(possibleIndex - 1).toString()) < Integer.parseInt(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }",
"public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}",
"public void sort(List<T> objects, Comparator<T> comparator) {\n }",
"private static ArrayList<Integer> sort(ArrayList<Integer> v) {\n\t\tint key, i, j; \n\t\tfor (j = 1; j != v.size(); j++) {\n\t\t\tkey = v.get(j); \n\t\t\ti = j - 1; \n\t\t\twhile ((i >= 0) && (v.get(i) > key)) {\n\t\t\t\tv.set(i+1, v.get(i));\n\t\t\t\ti -= 1; \n\t\t\t}\n\t\t\tv.set(i+1, key); \n\t\t}\n\t\treturn v; \n\t}",
"public static void main(String[] args) {\n ArrayList<String> aList = new ArrayList();\n ArrayList<Integer> numList = new ArrayList();\n aList.add(\"Ram\");//0\n aList.add(\"Shyam\");//1\n aList.add(\"hari\");//2\n aList.add(\"Sita\");//3\n aList.add(\"Ram\");//4\n //System.out.println(aList); //[Ram, Shyam, hari, Sita, Ram]\n// System.out.println(aList.get(1)); //Shyam\n // for(ClassType/VariableType variableName : objectName)\n System.out.println(\"before adding\"); \n System.out.println(aList);\n aList.add(3,\"Ravi\");\n System.out.println(\"after adding\"); \n System.out.println(aList);\n aList.remove(3);\n System.out.println(\"after removing\"); \n System.out.println(aList);\n Collections.sort(aList);\n System.out.println(\"after sorting\");\n System.out.println(aList);\n \n }",
"public SortingAlgorithmResult<E> sort(List<E> l);",
"public static void insertionSort2(IntList l) {\n\t\tIntListEntry input = l.getFirst();\n\t\tl1:\twhile (input != null) {\n\t\t\tfor (IntListEntry e = l.getFirst(); e != input; e = e.getNext())\n\t\t\t\tif (e.getItem() > input.getItem()) {\n\t\t\t\t\tIntListEntry next = input.getNext();\n\t\t\t\t\tl.delete(input);\n\t\t\t\t\tl.insertBefore(input, e);\n\t\t\t\t\tinput = next;\n\t\t\t\t\tcontinue l1;\n\t\t\t\t}\n\t\t\tinput = input.getNext();\n\t\t}\n\t}",
"@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public static void sortitems(ArrayList<item> svd)\r\n{\n\r\n\tCollections.sort(svd, new Comparator<item>(){\r\n\t\tpublic int compare(item o1, item o2){\r\n\t\t\t\tif(o1.density == o2.density)\r\n\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t\treturn o1.density > o2.density ? -1 : 1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n}",
"public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n while (j > 0) {\n\n // if the current element, is less than the previous, then....\n if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) < 0) {\n\n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n else if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) == 0) {\n \n if (compareTimes(finalsList.get(j).getBeginTime(), finalsList.get(j - 1).getBeginTime()) < 0) {\n \n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n }\n\n // decrement j\n j--;\n }\n }\n }",
"public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}",
"@Override\n public void sortIt(final Comparable a[]) {\n }",
"public void insertionSort() {\n Comparable p = (Comparable) array[0];\n Comparable[] sorted = new Comparable[array.length];\n sorted[0] = p;\n for (int i = 0; i < array.length - 1; i++) {\n if (p.compareTo(array[i + 1]) < 0) {\n p = (Comparable) array[i + 1];\n sorted[i + 1] = p;\n } else {\n Comparable temp = (Comparable) array[i + 1];\n int j = i;\n while (j >= 0 && sorted[j].compareTo(array[i + 1]) > 0) {\n j--;\n }\n for (int q = i; q > j; q--) {\n sorted[q + 1] = sorted[q];\n }\n sorted[j + 1] = temp;\n }\n }\n this.array = (T[]) sorted;\n }",
"public static void main(String[] args) {\n ArrayList<Integer> mainList = new ArrayList<Integer>();\n mainList.add(5);\n mainList.add(2);\n mainList.add(10);\n mainList.add(14);\n mainList.add(3);\n mainList.add(6);\n mainList.add(9);\n boolean asc = false;\n System.out.println(listSort(mainList, asc));\n }",
"static <T extends Comparable<T>> List<T> sort(List<T> list) {\n\t\tif (list == null || list.size() < 2) {\n\t\t\treturn list;\n\t\t}\n\t\tfor (int i = 1; i < list.size(); i++) {\n\t\t\t// the current is begin from index of 1\n\t\t\tT current = list.get(i);\n\t\t\tint j = i - 1;\n\t\t\tint origin = j;\n\t\t\twhile (j >= 0 && list.get(j).compareTo(current) > 0) {\n\t\t\t\t// insert into the head of the sorted list\n\t\t\t\t// or as the first element into an empty sorted list\n\t\t\t\t// last element of the sorted list\n\t\t\t\t// middle of the list\n\t\t\t\t// insert into middle of the sorted list or as the last element\n\t\t\t\tlist.set(j + 1, list.get(j));\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tlist.set(j + 1, current);\n\t\t\tprintInsertionSortAnimation(list, current, j, origin);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn list;\n\t}",
"void sort();",
"void sort();",
"@Override\n public int compareTo(ArrayListOfIntsWritable obj)\n {\n ArrayListOfIntsWritable other = (ArrayListOfIntsWritable) obj;\n if (isEmpty())\n {\n if (other.isEmpty())\n {\n return 0;\n }\n else\n {\n return -1;\n }\n }\n\n for (int i = 0; i < size(); i++)\n {\n if (other.size() <= i)\n {\n return 1;\n }\n if (get(i) < other.get(i))\n {\n return -1;\n }\n else if (get(i) > other.get(i))\n {\n return 1;\n }\n }\n\n if (other.size() > size())\n {\n return -1;\n }\n else\n {\n return 0;\n }\n }",
"@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }",
"public void fletteSort(ArrayList<Integer> list) {\n\t\tmergesort(list, 0, list.size() - 1);\n\t}",
"public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\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}",
"public void insertionSort() {\n\t\tfor (int i = 1; i < numberOfElements; i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint j = i;\n\t\t\t\n\t\t\twhile (j > 0) {\n\t\t\t\tif (arr[j - 1] <= temp) {\n\t\t\t\t\tnumberOfComparisons++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tnumberOfComparisons++;\n\t\t\t\tarr[j] = arr[j - 1];\n\t\t\t\tnumberOfCopies++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tarr[j] = temp;\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\tComparator integerComparator = (Object arg0, Object arg1) -> {\r\n\t\t\treturn ((Integer)arg0>(Integer)arg1)?-1:((Integer)arg0>(Integer)arg1)?1:0;\r\n\t\t};\r\n\t\t\r\n\t\tCollectionUtils utils = new CollectionUtils();\r\n\t\tList<Integer> list = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list, integerComparator);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\t\t\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list,(a,b)->(a>b)?-1:(a>b)?1:0);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list);\r\n\t\tSystem.out.println(\"After sorting in ascending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t}",
"public ArrayList<URL> insertionSort(ArrayList<URL> bucket) {\n\t\tfor(int j=1;j<bucket.size();j++) {\n\t\t\tURL key = bucket.get(j);\n\t\t\tint i = j-1;\n\t\t\twhile(i>=0 && bucket.get(i).getUrl().compareTo(key.getUrl())>0) {\n\t\t\t\tbucket.set(i+1, bucket.get(i));\n\t\t\t\ti --;\n\t\t\t}\n\t\t\tbucket.set(i+1, key);\n\t\t}\n\t\treturn bucket;\n\t}",
"private void bInsertionSort(int lowerIndex, int higherIndex) {\n \t\tArrayList tmpsorted = new ArrayList();\n \t\tint tmp, lowerbound, upperbound;\n \t\t\n \t\tfor(int i = lowerIndex; i <= higherIndex; i++) {\n \t\t\ttmp = (int) unsorted.get(i);\n \t\t\tif(tmpsorted.isEmpty()) {\n \t\t\t\ttmpsorted.add(tmp);\n \t\t\t} else {\n \t\t\t\t\n \t\t\t\t//Every new number we want to insert needs\n \t\t\t\t//to reset the bounds according to the sorted list.\n \t\t\t\tupperbound = tmpsorted.size() - 1;\n \t\t\t\tlowerbound = 0;\n \t\t\t\t\n \t\t\t\twhile (unsorted.size() != 0){\n \t\t\t\t//Note that each \"break;\" throws us out of the while loop.\n \t\t\t\t//Causing our boundaries to be reset for the new number\n \t\t\t\t\t\n \t\t\t\t\tint j = (upperbound + lowerbound) / 2;\t//j points to the middle of the boundaries\n \t\t\t\t\tif (tmp <= (int)tmpsorted.get(j)){\t//is tmp less or equal to the number in j?\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\tif (j == 0){\t\t\t\t\t\t//Are we at the bottom of the list?\n \t\t\t\t\t\t\ttmpsorted.add(0, tmp);\t\t//Add it to the bottom of the list.\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse if ((int)tmpsorted.get(j-1) > tmp){ \n \t\t\t\t\t\t//Else if the number behind j is bigger than tmp...\n \t\t\t\t\t\t//...we can move the upper bound behind j and repeat the split.\n \t\t\t\t\t\t//NOTE: We do NOT \"break;\" to get thrown out of the while loop.\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\tupperbound = j - 1;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse{ //Else we just add the number to j\n \t\t\t\t\t\t\ttmpsorted.add(j, tmp);\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\n \t\t\t\t\telse{ //If tmp is HIGHER than j\n \t\t\t\t\t\tif (j == tmpsorted.size() - 1){\n \t\t\t\t\t\t//Are we at the end of the list?\n \t\t\t\t\t\t//Just add tmp at the end of the list.\t\n \t\t\t\t\t\t\ttmpsorted.add(j+1, tmp);\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse if((int)tmpsorted.get(j+1) < tmp){\n \t\t\t\t\t\t//if the next number to j is still less than tmp...\n \t\t\t\t\t\t//we raise the lowerbound past j and repeat the split\n \t\t\t\t\t\t//NOTE: We do NOT \"break;\" to get thrown out of the while loop.\n \t\t\t\t\t\t\tlowerbound = j + 1;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t\n \t\t\t\t\t\telse{ \n \t\t\t\t\t\t//Else we can just add tmp after j since it's higher than j\n \t\t\t\t\t\t\ttmpsorted.add(j+1, tmp);\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\n \t\t\t\t}\n \t\t\t\t\n \t\t\t}\n \t\t}\n \t\t// Replace the unsorted values with tmpsorted.\n \t\tint j = 0;\n \t\tfor(int i = lowerIndex; i <= higherIndex; i++) {\n \t\t\tunsorted.set(i, tmpsorted.get(j));\n \t\t\tj++;\n \t\t}\n\n \t}",
"public static String[] insertionSort(String[] list){\n for (int i=1; i<list.length; i++){\r\n //use a variable a to temporarily store the index of the current item\r\n int a = i;\r\n //loop through comparisons with items before it until it reaches an item that is smaller than it\r\n while(list[a].compareTo(list[a-1])<0){\r\n //when item before it is larger, use a temporary string variable to store the current item's value\r\n String temp = list[a];\r\n list[a]=list[a-1];//give list[a] the value of the list[a-1]\r\n list[a-1]=temp;//give list[a-1] the value that is stored in the temporary\r\n a-=1;\r\n if(a==0)\r\n break;\r\n }\r\n }\r\n return list;\r\n }",
"public ArrayList<ArrayList<String>> inputTestListAndSort (ArrayList<ArrayList<String>> testList){\n ArrayList<ArrayList<String>> testList1=new ArrayList<>(testList);\n Collections.sort(testList1, new SubClass_CompareItemsInTheRowsOfTheTimetable_in_TeachingOverlapAndHours());\n return testList1;\n }",
"public static void sort(java.util.List arg0)\n { return; }",
"void sortEntities(ArrayList<Entity> entities){\n Collections.sort(entities, new Comparator<Entity>() {\n @Override\n public int compare(Entity e1, Entity e2) {\n if(e1.getCollisionBox().bottom < e2.getCollisionBox().bottom) return -1;\n else if(e1.getCollisionBox().bottom == e2.getCollisionBox().bottom) return 0;\n else return 1;\n }\n });\n }",
"public static ArrayList<Process> sortList(ArrayList<Process> in, Process p) {\n\tProcess o1=in.get(0);\n\tint index=0;\n\tfor(int i=1; i<in.size();i++) {\n\t\tif(in.get(i).getCycleTracker()>p.getCycleTracker()) {\n\t\t\tindex=i;\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()<p.getCycleTracker()) {\n\t\t\t//o1=in.get\n\t\t}\n\t\telse if(in.get(i).getCycleTracker()==p.getCycleTracker()){\n\t\t\tif(in.get(i).getA()> p.getA()) {\n\t\t\t\tindex=i;\n\t\t\t}\n\t\t\telse if(in.get(i).getA()==p.getA()) {\n\t\t\t\tif(in.get(i).getID()>p.getID()) {\n\t\t\t\t\tindex=i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\tin.add(index, p);\n\t\t\n\t\treturn in;\n\t\n}",
"public void bubbleSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Bubble Sort\");\n System.out.println();\n\n steps = 0;\n for (int outer = 0; outer < list.size() - 1; outer++){\n for (int inner = 0; inner < list.size()-outer-1; inner++){\n steps += 3;//count one compare and 2 gets\n if (list.get(inner)>(list.get(inner + 1))){\n steps += 4;//count 2 gets and 2 sets\n int temp = list.get(inner);\n list.set(inner,list.get(inner + 1));\n list.set(inner + 1,temp);\n }\n }\n }\n }",
"protected void sort(@NotNull ArrayList<Event<?>> events) {\n\t\tevents.sort(new Comparator<Event<?>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Event<?> e1, Event<?> e2) {\n\t\t\t\tif (e1.getEnd() < e2.getStart())\n\t\t\t\t\treturn -1;\n\t\t\t\telse\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t});\n\t\tsnap(this.events);\n\t}",
"static ArrayList<Card> sortCardArray(ArrayList<Card> c)\n {\n \n \n Collections.sort(c, new CardComparator());\n \n return c;\n }",
"public void writeList() {\n\n HeapSort heapSort = new HeapSort();\n heapSort.sort(list);\n\n// QuickSort quickSort = new QuickSort();\n// quickSort.sort(list);\n\n// MergeSort mergeSort = new MergeSort();\n// mergeSort.sortNumbers(list);\n\n System.out.println(\"Result of sorting :\");\n list.stream().forEach(s -> System.out.println(s));\n }",
"public static void main(String[] args) {\n\t\tint a[]= {4,5,5,5,4,6,9,6,4};\n\t ArrayList<Integer> al=new ArrayList<Integer>();\n\t \n\t for(int i=0;i<a.length;i++)\n\t {\n\t \t al.add(a[i]);\n\t }\n\t al.sort(null);\n\t \n\t System.out.println(al);\n\t}",
"public static <T> List<T> SortedInsert(List<T> items, Comparator<T> c) \n {\n\n \n List<T> l = new ArrayList<T>();\n \n for (int i = 0; i < items.size(); i ++)\n {\n \n for (int j = 0; j < l.size(); j ++)\n {\n if (c.compare(l.get(i), l.get(j)) > 0)\n {\n \t l.add(j, l.get(j));\n }\n }\n \n // l.add(items.get(i));\n \n \n }\n\treturn l;\n \n}",
"public static void bubbleSort(IntList l) {\n\t\tif (l.getFirst() == null)\n\t\t\treturn;\n\t\tl1: while (true) {\n\t\t\tfor (\tIntListEntry e = l.getFirst().getNext();\n\t\t\t\t\te != null;\n\t\t\t\t\te = e.getNext()) {\n\t\t\t\tIntListEntry d = e.getPrevious();\n\t\t\t\tif (d.getItem() > e.getItem()) {\n\t\t\t\t\tl.delete(e);\n\t\t\t\t\tl.insertBefore(e, d);\n\t\t\t\t\tcontinue l1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public static void main(String[] args) {\n List list = new ArrayList<>();\n list.add(10);\n list.add(50);\n list.add(30);\n list.add(60);\n list.add(20);\n list.add(90);\n list.add(20);\n \n// Iterator i = list.iterator();\n System.out.println(\"Printing Given Array..\");\n// while(i.hasNext())\n// {\n// \t System.out.println(i.next());\n// }\n for(int j=0;j<list.size();j++)\n {\n \t System.out.println(list.get(j));\n }\n \n Comparator cmp = Collections.reverseOrder();\n Collections.sort(list, cmp);\n System.out.println(\"printing list in descending order..\");\n Iterator i2 = list.iterator();\n while(i2.hasNext())\n {\n \t System.out.println(i2.next());\n }\n\t}",
"public void listSort() {\n\t\tCollections.sort(cd);\n\t}",
"public void bubbleSort(ArrayList<Pokemon> p);",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> arrayList = new ArrayList<Integer>();\n\t\tarrayList.add(11);\n\t\tarrayList.add(2);\n\t\tarrayList.add(7);\n\t\tarrayList.add(3);\n\t\t\n\t\t// ArrayList before the sorting\n\t\tSystem.out.println(\"Before Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t\t\n\t\t// Sorting of arrayList using Collections.sort\n\t\tCollections.sort(arrayList);\n\t\t\n\t\t// ArrayList after sorting\n\t\tSystem.out.println(\"\\nAfter Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t}",
"public static void insertionSort(Comparable[] a) {\n\n for (int i = 1; i < a.length; i++) {\n for (int j = i; j > 0; j--) {\n if (less(a[j], a[j-1])) exch(a, j, j-1);\n else break;\n }\n }\n }",
"public void sort(){\n Collections.sort(list, new SortBySpecies());\n }",
"public void sortareDesc(List<Autor> autoriList){\n\t\tboolean ok;\t\t\t\t \n\t\tdo { \n\t\t ok = true;\n\t\t for (int i = 0; i < autoriList.size() - 1; i++)\n\t\t if (autoriList.get(i).getNrPublicatii() < autoriList.get(i+1).getNrPublicatii()){ \n\t\t \t Autor aux = autoriList.get(i);\t\t//schimbarea intre autori\n\t\t \t Autor aux1 = autoriList.get(i+1);\t\n\t\t \t try {\n\t\t \t\t \trepo.schimbareAutori(aux,aux1);\n\t\t\t } catch (Exception e) {\n\t\t\t System.out.println(e.getMessage());\n\t\t\t }\n\t\t\t\t ok = false;\n\t\t\t}\n\t\t}\n\t while (!ok);\n\t }",
"private void sortDate()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getReleaseDate().compareTo(b.getReleaseDate());\n if( result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> ints = new ArrayList<>(Arrays.asList(10, 23, 1, 234, 56, 78, 77, 45, 24));\r\n\t\tints.add(99);\r\n\t\tSystem.out.println(ints);\r\n//\t\t//Objective : Display sorted ints in desc order\r\n//\t\tCollections.sort(ints,new Comparator<Integer>() {\r\n//\r\n//\t\t\t@Override\r\n//\t\t\tpublic int compare(Integer o1, Integer o2) {\r\n//\t\t\t\t// TODO Auto-generated method stub\r\n//\t\t\t\treturn o2.compareTo(o1);\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t});\r\n//\t\tfor(int i : ints)\r\n//\t\t\tSystem.out.println(i);\r\n//\t\t\r\n\r\n\t\tCollections.sort(ints, (i1, i2) -> i2.compareTo(i1));\r\n\t\tints.forEach(i -> System.out.print(i + \" \"));\r\n\r\n\t}",
"@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}",
"public void sort() {\n }",
"public static void Insertionsort(int a[]) \n\t { \n\t int n = a.length; \n\t for (int i=1; i<n; ++i) \n\t { \n\t int key = a[i]; \n\t int j = i-1;\n\t while (j>=0 && a[j] > key) \n\t { \n\t a[j+1] = a[j]; \n\t j = j-1; \n\t } \n\t a[j+1] = key; \n\t } \n\t }",
"public void sort() {\r\n Collections.sort(this.list, this);\r\n }",
"public static void insertionSort(int[] arr) {\n //write your code here\n for(int i=1;i<arr.length;i++) {\n for(int j=i-1;j>=0;j--) {\n if(isGreater(arr, j, j+1))\n swap(arr, j, j+1);\n else\n break;\n }\n }\n}",
"@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }",
"private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}",
"public void sort() {\n\tqsort(a,0,a.length-1);\n }",
"public static void sortitems(ArrayList<item> svd)\n\t{\n\t\tCollections.sort(svd, new Comparator<item>(){\n\t\t public int compare(item o1, item o2){\n\t\t if(o1.density == o2.density)\n\t\t return 0;\n\t\t return o1.density > o2.density ? -1 : 1;\n\t\t }\n\t\t});\n\t\t\n\t\t\n\t}",
"protected void sort() {\n\n\t\tCollections.sort(this.myRRList);\n\t}",
"public static <T extends Comparable<? super T>> void bubbleSort(List<T> list){\n int size = list.size();\n if(size > 1){\n for(int i = size - 1; i >= 0; i--){\n for(int j = 0; j < i; j++){\n if(list.get(j).compareTo(list.get(j + 1)) > 0){\n swap(list, j, j + 1);\n }\n }\n }\n }\n }",
"public void insertionSortAsc(){\r\n for(int x=1 ; x<numItems ; x++){ //get the starting point\r\n int temp = mArray[x]; //take the item out\r\n int pos = x -1;\r\n while(pos >= 0 && mArray[pos]>temp){\r\n mArray[pos+1] = mArray[pos]; //shift item up\r\n pos--; //move position left\r\n }\r\n mArray[pos+1] = temp; //insert item in the empty spot\r\n }\r\n }",
"@Override\r\n\tpublic <T> void sort(Comparator<T> comparator, List<T> list) {\r\n\t\tsort(comparator, list, 0, list.size() - 1);\r\n\t}",
"private void sortRating()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getRating().compareTo(b.getRating());\n if(result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate static ArrayList<Result> sortByScore(ArrayList<Result> sortThis){\n\t\tArrayList<Result> sorted = sortThis;\n\t\tCollections.sort(sorted, new Comparator(){\n\t\t\t\n\t\t\tpublic int compare(Object o1, Object o2){\n\t\t\t\tResult r1 = (Result) o1;\n\t\t\t\tResult r2 = (Result) o2;\n\n\t\t\t\tDouble Score1 = new Double(r1.getScore());\n\t\t\t\tDouble Score2 = new Double(r2.getScore());\n\t\t\t\treturn Score1.compareTo(Score2);\n\t\t\t}\n\t\t});\n\t\tCollections.reverse(sorted);\n\t\t\n\t\treturn sorted;\n\t}",
"public void insertionNumberSortDouble()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && Double.parseDouble(AL.get(possibleIndex - 1).toString()) < Double.parseDouble(temp.toString()))\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }",
"private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }",
"public static void main(String[] args){\n\n List<Student> arrList = new ArrayList<>(); // arraylist of our own class type\n arrList.add(new Student(111, \"bbb\", \"London\"));\n arrList.add(new Student(222,\"aaa\", \"nyc\"));\n arrList.add(new Student(333, \"ccc\", \"Jaipur\"));\n\n System.out.println(\"Unsorted list : \");\n for (Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on roll no\n Collections.sort(arrList, new Sortbyroll());\n\n System.out.println(\"Sorted by rollNo : \");\n for(Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on name\n Collections.sort(arrList, new Sortbyname());\n\n System.out.println(\"Sorted by name : \");\n for (int i=0; i<arrList.size(); i++)\n System.out.println(arrList.get(i));\n }",
"@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }",
"public void sort(Comparable[] a) {\n Comparable[] aux = new Comparable[a.length];\n sort(a, aux, 0, a.length - 1);\n System.out.println(\"count \" + cnt);\n\n }",
"public static void main(String[] args) throws IOException {\n\n DynArrayList<Integer> TestList = new DynArrayList(5);\n //System.out.printf(\"Is Empty: %b\\n\", TestList.isEmpty());\n\n TestList.sort();\n\n\n TestList.add(0, new Integer(3));\n TestList.add(1, new Integer(4));\n TestList.add(2, new Integer(2));\n TestList.add(3, new Integer(3));\n TestList.add(4, new Integer(6));\n TestList.addLast(new Integer(7));\n TestList.delete(new Integer(3));\n TestList.sort();\n\n\n for(int i = 0; i < TestList.size; i++){\n System.out.printf(\"The element %d is %d\\n\", i, TestList.get(i));\n }\n\n }",
"public static void sort(Comparable[] a){\n Comparable[] aux = new Comparable[a.length];\n sort(a,aux,0,a.length-1);\n }",
"public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}",
"public static IntList insertionSort1(IntList input) {\n\t\tIntList output = new SimpleIntList();\n\t\tl1: while (!input.isEmpty()) {\n\t\t\tIntListEntry first = input.getFirst();\n\t\t\tinput.delete(first);\n\t\t\tfor (IntListEntry e = output.getFirst(); e != null; e = e.getNext())\n\t\t\t\tif (e.getItem() > first.getItem()) {\n\t\t\t\t\toutput.insertBefore(first, e);\n\t\t\t\t\tcontinue l1;\t\t\t\t\t\n\t\t\t\t}\n\t\t\toutput.append(first);\n\t\t}\n\t\treturn output;\n\t}"
] | [
"0.6804917",
"0.66623944",
"0.6644264",
"0.62033707",
"0.6199409",
"0.61849415",
"0.6167538",
"0.613623",
"0.60962623",
"0.6084473",
"0.60487604",
"0.6043973",
"0.6032392",
"0.60232896",
"0.6016598",
"0.59968626",
"0.59950775",
"0.5987428",
"0.5984121",
"0.59654385",
"0.59612036",
"0.594276",
"0.5941985",
"0.5919563",
"0.59150237",
"0.59123564",
"0.58974034",
"0.5896714",
"0.5881377",
"0.58734906",
"0.5868055",
"0.5854551",
"0.58499235",
"0.5846882",
"0.5791378",
"0.57828665",
"0.5781798",
"0.5773555",
"0.57664955",
"0.5756821",
"0.5751921",
"0.5751371",
"0.5751308",
"0.575067",
"0.5749657",
"0.57464665",
"0.57464665",
"0.5728414",
"0.572741",
"0.57064545",
"0.5697931",
"0.568754",
"0.56841886",
"0.5681297",
"0.56749266",
"0.5668488",
"0.56625247",
"0.5661692",
"0.5651517",
"0.5643493",
"0.56369174",
"0.56356573",
"0.5632217",
"0.5624668",
"0.56170225",
"0.56147885",
"0.5609997",
"0.5593553",
"0.55918884",
"0.5591607",
"0.5589373",
"0.55892915",
"0.55807674",
"0.55806476",
"0.5569146",
"0.55673933",
"0.55668914",
"0.55599874",
"0.55574423",
"0.55571264",
"0.5547042",
"0.5538869",
"0.55352557",
"0.5529364",
"0.55230016",
"0.5515754",
"0.550992",
"0.5506537",
"0.5497384",
"0.54961985",
"0.5492168",
"0.5490999",
"0.5481499",
"0.54755324",
"0.5471438",
"0.5470056",
"0.5469563",
"0.5466285",
"0.5457416",
"0.5452559"
] | 0.6486539 | 3 |
Takes in entire vector, but will merge the following sections together: Left sublist from a[first]..a[mid], right sublist from a[mid+1]..a[last]. Precondition: each sublist is already in ascending order | private void merge(ArrayList <Comparable> a, int first, int mid, int last){
steps += 5;
ArrayList<Comparable> temp = new ArrayList<Comparable>();
int firstInd = first;
int middle = mid + 1;
steps += 2;
while (firstInd <= mid && (middle) <= last) {
if (a.get(firstInd).compareTo(a.get(middle)) < 0) {
temp.add(a.get(firstInd));
firstInd ++;
steps += 7;
}else if (a.get(middle).compareTo(a.get(firstInd)) < 0){
temp.add(a.get(middle));
middle++;
steps += 7;
}else {
temp.add(a.get(middle));
middle++;
steps += 3;
}
}
if (firstInd >= mid + 1) {
steps += 4;
for (int i = middle; i <= last; i++) {
temp.add(a.get(i));
}
steps += 3;
}else {
steps += 2;
for (int i = firstInd; i <= mid; i++) {
temp.add(a.get(i));
}
steps += 3;
}
steps += 3;
int j = 0;
for (int i = first; i <= last; i++) {
a.set(i, temp.get(j));
j++;
steps += 4;
}
System.out.println();
System.out.println("Merge");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void merge(ArrayList<Integer> a, int left, int mid, int right) {\n\t\tint chunk1 = mid - left + 1;\r\n\t\tint chunk2 = right - mid;\r\n\t\tArrayList<Integer> tempArrLeft = new ArrayList<>();\r\n\t\tArrayList<Integer> tempArrRight = new ArrayList<>();\r\n\t\t//pipe data into temps\r\n\t\tfor (int i=0; i < chunk1; ++i) {\r\n\t\t\ttempArrLeft.add(a.get(left + i));\r\n\t\t}\r\n\t\tfor (int j=0; j < chunk2; ++j) {\r\n\t\t\ttempArrRight.add(a.get(mid + 1 + j));\r\n\t\t}\r\n\r\n\t\t//merge temp arrays\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = left;\r\n\t\twhile (i < chunk1 && j < chunk2) {\r\n\t\t\tif (tempArrLeft.get(i) <= tempArrRight.get(j)) {\r\n\t\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < chunk1) {\r\n\t\t\ta.set(k, tempArrLeft.get(i));\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < chunk2) {\r\n\t\t\ta.set(k, tempArrRight.get(j));\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}",
"private static <T extends Comparable<? super T>> void mergeSort(List<T> list, int begin, int mid, int finish, T[] auxiliaryArray){\n if(begin + 1 == finish)\n merge(list, begin, mid, mid + 1, finish, auxiliaryArray);\n else{\n if(begin < finish){\n mergeSort(list, begin, (mid + begin)/2, mid, auxiliaryArray);\n mergeSort(list, mid + 1, (finish + mid)/2, finish, auxiliaryArray);\n merge(list, begin, mid, mid + 1, finish, auxiliaryArray);\n }\n }\n }",
"private void merge(int lb, int mid, int ub, int[] ar){\n\t\tint i = lb ,j = lb + mid, k = 0;\n\t\tint[] out = new int[ub - lb + 1];\n\t\twhile( (i <= lb + mid - 1) && (j <= ub)){\n\t\t if(ar[i] <= ar[j]) out[k++] = ar[i++];\n\t\t else out[k++] = ar[j++];\n\t\t}\n\t\twhile(i <= lb + mid - 1) out[k++] = ar[i++];\n\t\twhile(j <= ub) \t out[k++] = ar[j++];\n\t\tfor(int l = 0; l < k; l++) ar[lb + l] = out[l];\n\t}",
"private void merge(Comparable[] a, int min, int mid, int max){\n for(int t = min; t <= max;t++){\n aux[t] = a[t];\n }\n \n int i = min; // start index for left side\n int j = mid + 1; // start index for right side\n \n for(int k = min; k <= max; k++){\n if(i > mid){\n a[k] = aux[j++];\n }\n else if(j > max){\n a[k] = aux[i++];\n }\n else if(aux[i].compareTo(aux[j]) < 0 ){\n a[k] = aux[i++];\n }\n else {\n a[k] = aux[j++];\n }\n }\n }",
"public static ArrayList<String> mergeSort(ArrayList<String> aList) {\n ArrayList<String> left = new ArrayList<String>();\n ArrayList<String> right = new ArrayList<String>();\n int minIndex;\n \n if (aList.size() == 1) { \n return aList;\n } else {\n minIndex = aList.size()/2;\n \n for (int i= 0; i< minIndex; i++) {\n left.add(aList.get(i));\n }\n\n for (int i= minIndex; i< aList.size(); i++) {\n right.add(aList.get(i));\n }\n \n left = mergeSort(left);\n right = mergeSort(right);\n \n merge(aList, right, left);\n }\n return aList;\n }",
"private static void merge(int[] arr, int start, int mid, int end) {\n\t\tint length1 = mid - start + 1;\n\t\tint length2 = end - mid;\n\t\tint left[] = new int[length1];\n\t\tint right[] = new int[length2];\n\t\tfor (int index =0; index < length1; index++) {\n\t\t\tleft[index] = arr[start+index];\n\t\t}\n\t\tfor (int index =0; index < length2; index++) {\n\t\t\tright[index] = arr[mid+index+1];\n\t\t}\n\t\tint leftIndex = 0;\n\t\tint rightIndex = 0;\n\t\tint index = start;\n\t\twhile (leftIndex < length1 && rightIndex < length2) {\n\t\t\tif (left [leftIndex] < right[rightIndex]) {\n\t\t\t\tarr[index] = left[leftIndex];\n\t\t\t\tleftIndex ++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarr[index] = right[rightIndex];\n\t\t\t\trightIndex++;\n\t\t\t\tnumberOfInversions += (mid - leftIndex)+1;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\twhile (leftIndex < length1) {\n\t\t\tarr[index] = left[leftIndex];\n\t\t\tleftIndex++;\n\t\t\tindex++;\n\t\t}\n\t\twhile (rightIndex < length2) {\n\t\t\tarr[index] = right[rightIndex];\n\t\t\trightIndex++;\n\t\t\tindex++;\n\t\t}\n\t\t\t\n\t\t\n\t}",
"private static void merge(Comparable[] a, int[] index, int[] aux, int lo, int mid, int hi){\n for(int k=lo;k<=hi;k++){\n aux[k]=index[k];\n }\n int i=lo,j=mid+1;\n for(int k=lo;k<=hi;k++){\n if(i>mid) index[k]=aux[j++];\n else if(j>hi) index[k]=aux[i++];\n else if(less(a[aux[j]],a[aux[i]])) index[k]=aux[j++];\n else index[k]=aux[i++];\n }\n }",
"static void merge(double a[],int start,int mid, int end) {\r\n \tint i,j,k;\r\n \tint size1 = mid - start +1;\r\n \tint size2 = end - mid;\r\n \tif (size2 > 0 && size1 > 0) {\r\n \t\tdouble leftA[] = new double[size1]; // temp arrays\r\n \tdouble rightA[] = new double[size2];\r\n \tfor(i=0;i < size1;i++) leftA[i] = a[start+i]; //Copy data into temp arrays \r\n \tfor(j=0;j<size2;j++) rightA[j] = a[mid+1+j];\r\n \ti=0; // Merge temp arrays back into a[]\r\n \tj=0;\r\n \tk=start;\r\n \twhile (i<size1 && j < size2) {\r\n \t\tif(leftA[i]<=rightA[j]) {\r\n \t\t\ta[k]=leftA[i];\r\n \t\t\ti++;\r\n \t\t}else {\r\n \t\t\ta[k]=rightA[j];\r\n \t\t\tj++;\r\n \t\t}\r\n \t\tk++;\r\n \t}\r\n \twhile(i<size1) { //if remaining in leftA[] copy in\r\n \t\ta[k]=leftA[i];\r\n \t\ti++;\r\n \t\tk++;\r\n \t}\r\n \twhile(j<size2) { //if remaining in rightA[] copy in\r\n \t\ta[k]=rightA[j];\r\n \t\tj++;\r\n \t\tk++;\r\n \t}\r\n \t}\t\r\n }",
"public static void merge(int []a , int low,int mid,int high) {\n int [] helper = new int[a.length] ; \n for (int i = low; i<=high; i++) {\n helper[i] = a[i]; \n }\n\n int i = low;\n int j = mid + 1;\n int k = low;\n\n // combine the low part of a and its high part \n while (i<=mid && j<=high) {\n if (helper[i] >= helper[j]){\n a[k] = helper[i];\n i++;\n } else {\n a[k] = helper[j];\n j++;\n }\n k++;\n }\n\n // copy the rest of low part of a if there is any\n while (i<=mid) {\n a[k] = helper[i];\n i++; k++;\n }\n\n\n // copy the rest of the high part of a if there is any\n while (j<=high) {\n a[k] = helper[j];\n j++;k++;\n }\n\n // out put each time we sort and let you watch the change sequence\n for (int Item:a) {\n System.out.print(Item+\" \");\n }\n System.out.println();\n\n }",
"private static void merge(Comparable[] a, int[] index, int[] aux, int low, int mid, int high) {\n for(int k=low; k<=high; k++)\n aux[k] = index[k];\n \n // merge back to a[]\n int i=low, j=mid+1;\n for(int k=low; k<=high; k++) {\n if(i>mid) index[k] = aux[j++];\n else if(j>high) index[k] = aux[i++];\n else if(SortUtil.less(a[aux[j]], a[aux[i]])) index[k] = aux[j++];\n else index[k] = aux[i++];\n }\n }",
"public void merge(List<Integer> a, List<Integer> l, List<Integer> r, int left, int right) \n {\n \n int i = 0, j = 0, k = 0;\n while (i < left && j < right) \n {\n if (l.get(i) < r.get(j)) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n else \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }\n \n while (i < left) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n while (j < right) \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }",
"public void mergeSort(ArrayList <Comparable> a, int first, int last){\r\n\t\t\r\n\t\tif (last - first == 0) {\r\n\t\t\tsteps ++;\r\n\t\t}else if (last - first == 1) {\r\n\t\t\tsteps += 4; \r\n\t\t\tif (a.get(first).compareTo(a.get(last)) > 0) {\r\n\t\t\t\tsteps += 5;\r\n\t\t\t\tswap(a, first, last);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tsteps += 3;\r\n\t\t\tint mid = (last + first)/2;\r\n\t\t\tsteps += 4;\r\n\t\t\tmergeSort(a, first, mid);\r\n\t\t\tmergeSort(a, mid + 1, last);\r\n\t\t\tmerge(a, first, mid, last);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Merge Sort\");\r\n\t\tSystem.out.println();\r\n\t}",
"private static <T extends Comparable<? super T>> void merge(List<T> list, int firstBegin, int firstFinish, int secondBegin, int secondFinish, T[] auxiliaryArray){\n int firstIndex = firstBegin;\n int secondIndex = secondBegin;\n int auxiliaryIndex = 0;\n while(firstIndex <= firstFinish && secondIndex <= secondFinish){\n if(list.get(firstIndex).compareTo(list.get(secondIndex)) <= 0){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n }else{\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n }\n auxiliaryIndex++;\n }\n while(firstIndex <= firstFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(firstIndex);\n firstIndex++;\n auxiliaryIndex++;\n }\n while(secondIndex <= secondFinish){\n auxiliaryArray[auxiliaryIndex] = list.get(secondIndex);\n secondIndex++;\n auxiliaryIndex++;\n }\n auxiliaryIndex = 0;\n for(int i = firstBegin; i <= secondFinish; i++){\n list.set(i, auxiliaryArray[auxiliaryIndex]);\n auxiliaryIndex++;\n }\n }",
"public static void mergeReverse(int[] nums, int start, int mid, int end) {\n\n if (nums[mid - 1] >= nums[mid]) {\n return;\n }\n\n int i = start; // i points to first index of left array\n int j = mid; // j points to first index of right array\n int tempIndex = 0;\n int[] tempArray = new int[end - start]; //new array to hold the sorted elements.\n while (i < mid && j < end) {\n tempArray[tempIndex++] = nums[i] >= nums[j] ? nums[i++] : nums[j++];\n }\n\n System.arraycopy(nums, i, nums, start + tempIndex, mid - i);\n // now copying complete temp array to input array.\n System.arraycopy(tempArray, 0, nums, start, tempIndex);\n\n }",
"public static ArrayList<Integer> mergeSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Insertion Sort\");\n System.out.println();\n if (3 > 2){\n int mid= list.size()/2;\n ArrayList<Integer> left= new ArrayList<Integer>(mid);\n ArrayList<Integer> right=new ArrayList<Integer>(list.size()-mid);\n for (int i = 0; i < mid; i++) {\n left.add(list.get(i));\n } \n\n for (int i = 0; i < list.size()-mid; i++) {\n right.add(list.get(i));\n } \n\n left = mergeSort(left); \n right = mergeSort(right);\n merge(left,right,list);\n }\n return list;\n }",
"private static void merge(ArrayList<Score> items, int start, int mid, int end) {\r\n Object[] temp = new Object[items.size()];\r\n int pos1 = start;\r\n int pos2 = mid + 1;\r\n int spot = start;\r\n\r\n while (!(pos1 > mid && pos2 > end)) {\r\n if ((pos1 > mid) || ((pos2 <= end) && (items.get(pos2).compareTo(items.get(pos1)) < 0))) {\r\n temp[spot] = items.get(pos2);\r\n pos2 += 1;\r\n } else {\r\n temp[spot] = items.get(pos1);\r\n pos1 += 1;\r\n }\r\n spot += 1;\r\n }\r\n for (int i = start; i <= end; i++) {\r\n items.set(i, (Score) temp[i]);\r\n }\r\n }",
"private static void mergeAsc(int arr[], int start, int mid, int end) {\n\r\n\t\tint subArrLen1 = mid - start + 1;\r\n\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t// create the sub Arrays as temporary storage\r\n\t\tint subArray1[] = new int[subArrLen1];\r\n\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t// copy data in temporary arrays\r\n\r\n\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t}\r\n\r\n\t\t// merging the temporary arrays\r\n\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = start;\r\n\r\n\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\tif (subArray1[i] <= subArray2[j]) {\r\n\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (i < subArrLen1) {\r\n\t\t\tarr[k] = subArray1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (j < subArrLen2) {\r\n\t\t\tarr[k] = subArray2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t}",
"private void merge(ArrayList<Integer> list, int low, int middle, int high) {\n\t\tArrayList<Integer> temp = new ArrayList<Integer>();\n\t\tList<Integer> s1;\n\t\tList<Integer> s2;\n\t\t\n\t\ts1 = new ArrayList<>(list.subList(low, middle + 1));\n\t\ts2 = new ArrayList<>(list.subList(middle + 1, high + 1));\n\t\t\n\t\tint i1 = 0;\n\t\tint i2 = 0;\n\t\t\n\t\twhile (i1 < s1.size() && i2 < s2.size()) {\n\t\t\tif(s1.get(i1).compareTo(s2.get(i2)) <= 0) {\n\t\t\t\ttemp.add(s1.get(i1));\n\t\t\t\ti1++;\n\t\t\t} else {\n\t\t\t\ttemp.add(s2.get(i2));\n\t\t\t\ti2++;\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (i1 < s1.size()) {\n\t\t\ttemp.add(s1.get(i1));\n\t\t\ti1++;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < temp.size();i++) {\n\t\t\tlist.set(i + low, temp.get(i));\n\t\t}\n\t}",
"static void merge(Comparable[] a, int lo, int mid, int hi) {\n int i = lo, j = mid + 1;\n\n //copy a[lo..hi] to aux[lo..hi]\n for (int k = lo; k <= hi; k++) {\n aux[k] = a[k];\n }\n\n for (int k = lo; k <= hi; k++) {\n if (i > mid) {\n a[k] = aux[j++];\n\n } else if (j > hi) {\n a[k] = aux[i++];\n\n } else if (less(aux[j], aux[i])) {\n a[k] = aux[j++];\n\n } else {\n a[k] = aux[i++];\n\n }\n }\n }",
"private void mergeSubArr(int lowerIndex, int middle, int higherIndex) {\n \t\n \tArrayList tempMergArr = new ArrayList();\n \t\n \t\n \tfor (int i = 0; i < lowerIndex; i++){\n \t\ttempMergArr.add(i, 0);\n \t} \t\n \t\n for (int i = lowerIndex; i <= higherIndex; i++) {\n tempMergArr.add(i, (int)unsorted.get(i));\n }\n \n int i = lowerIndex;\n int j = middle + 1;\n int l = lowerIndex;\n while (i <= middle && j <= higherIndex) {\n if ((int)tempMergArr.get(i) <= (int)tempMergArr.get(j)) {\n unsorted.set(l, tempMergArr.get(i));\n i++;\n } else {\n unsorted.set(l, tempMergArr.get(j));\n j++;\n }\n l++;\n }\n while (i <= middle) {\n unsorted.set(l, tempMergArr.get(i));\n l++;\n i++;\n }\n while (j <= middle) {\n \tunsorted.set(l, tempMergArr.get(j));\n \tl++;\n \ti++;\n }\n\n \n }",
"public void merge(int[] inputArray, int start, int mid, int end) {\n int s1 = mid - start + 1;\n int s2 = end - mid;\n\n //Create a left and right array\n int L[] = new int [s1];\n int R[] = new int [s2];\n\n //Copy elements into two separate arrays\n for (int i=0; i<s1; ++i)\n L[i] = inputArray[start + i];\n for (int j=0; j<s2; ++j)\n R[j] = inputArray[mid + 1+ j];\n\n\n int i = 0, j = 0;\n int k = start;\n\n //Start your comparision\n while (i < s1 && j < s2)\n {\n if (L[i] <= R[j])\n {\n inputArray[k] = L[i];\n i++;\n }\n else\n {\n inputArray[k] = R[j];\n j++;\n }\n k++;\n }\n\n //Copy the remaining elements\n while (i < s1)\n {\n inputArray[k] = L[i];\n i++;\n k++;\n }\n while (j < s2)\n {\n inputArray[k] = R[j];\n j++;\n k++;\n }\n }",
"public List<Integer> mergeSort(List<Integer> list) {\n if (list.size() < 2) {\n return list;\n }\n\n int middle = list.size() / 2;\n\n SortingsZlatopolsky algorithms = new SortingsZlatopolsky();\n\n return merge(algorithms.mergeSort(list.subList(0, middle)),\n algorithms.mergeSort(list.subList(middle, list.size())));\n }",
"public static void merge(Comparable[] a, Comparable[] aux, int lo,int mid,int hi){\n for(int k=lo;k<=hi;k++){\n aux[k]=a[k];\n }\n int i=lo,j=mid+1;\n for(int k=lo;k<=hi;k++){\n if(i>mid) a[k]=aux[j++];\n else if(j>hi) a[k]=aux[i++];\n else if(less(aux[j],aux[i])) a[k]=aux[j++];\n else a[k]=aux[i++];\n }\n }",
"private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }",
"public static void mergeSort(List<Integer> values) {\r\n for (int stepSize = 2; stepSize < values.size(); stepSize *= 2) {\r\n for (int i = 0; i < values.size(); i += stepSize) {\r\n int prefixStart = i;\r\n int suffixStart = i + stepSize / 2;\r\n int suffixEnd = Math.min(values.size(), i + stepSize);\r\n merge(values, prefixStart, suffixStart, suffixEnd);\r\n } // for\r\n if (stepSize > values.size() / 2) {\r\n int prefixStart = 0;\r\n int suffixStart = stepSize;\r\n int suffixEnd = values.size();\r\n merge(values, prefixStart, suffixStart, suffixEnd);\r\n } // if\r\n //printList(values);\r\n } // for\r\n }",
"private void mergeSort(int[] array, int start, int end) {\n\t\tif (start < end) {\n\t\t\tint mid = (start + end) / 2;\n\t\t\tmergeSort(array, start, mid);\n\t\t\tmergeSort(array, mid + 1, end);\n\t\t\tmerge(array, start, mid, end);\n\t\t}\n\t}",
"private void combine( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int mid, int high ){\n\t\tfor(int iterator=low;iterator<high;iterator++){\n\t\t\tauxillary.set(iterator, array.get(iterator));\n\t\t}\n\t\tint arrayPosition=low;\n\t\tint lowPosition=low;\n\t\tint midPosition=mid+1;\n\t\twhile(lowPosition<mid && midPosition<high){\n\t\t\tif(auxillary.get(lowPosition).compareTo(auxillary.get(midPosition))){\n\t\t\t\tarray.set(arrayPosition, auxillary.get(lowPosition));\n\t\t\t\tlowPosition++;\n\t\t\t}else{\n\t\t\t\tarray[arrayPosition]=auxillary[midPosition];\n\t\t\t\tmidPosition++;\n\t\t\t}\n\t\t\tarrayPosition++;\n\t\t}\n\t\tif(lowPosition==mid){\n\t\t\twhile(midPosition<high){\n\t\t\t\tarray[arrayPosition]=auxillary[midPosition];\n\t\t\t\tmidPosition++;\n\t\t\t\tarrayPosition++;\n\t\t\t}\n\t\t}else if(midPosition==high){\n\t\t\twhile(lowPosition<mid){\n\t\t\t\tarray[arrayPosition]=auxillary[lowPosition];\n\t\t\t\tlowPosition++;\n\t\t\t\tarrayPosition++;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static void mergesort(ArrayList<Score> items, int start, int end) {\r\n if (start < end) {\r\n int mid = (start + end) / 2;\r\n mergesort(items, start, mid);\r\n mergesort(items, mid + 1, end);\r\n merge(items, start, mid, end);\r\n }\r\n }",
"private void mergeHalves(int[] array, int[] temp, int leftStart, int rightEnd){\r\n int leftEnd = (rightEnd + leftStart)/2;\r\n int rightStart = leftEnd + 1;\r\n int size = rightEnd - leftStart + 1;\r\n\r\n int left = leftStart;\r\n int right = rightStart;\r\n int index = leftStart;\r\n\r\n while(left <= leftEnd && right <= rightEnd){\r\n if(array[left] <= array[right]){\r\n temp[index] = array[left];\r\n left++;\r\n }else {\r\n temp[index] = array[right];\r\n right++;\r\n }\r\n index++;\r\n }\r\n System.arraycopy(array, left, temp, index, leftEnd - left + 1);\r\n System.arraycopy(array, right, temp, index, rightEnd - right + 1);\r\n System.arraycopy(temp, leftStart, array, leftStart, size);\r\n }",
"public static void mergeSortReverse(int[] nums, int start, int end) {\n // check for the base condition\n if (end - start < 2) {\n return;\n }\n // otherwise break the array [10, 2, 6, -12, 5,12,16] into parts\n int mid = (start + end) / 2;\n // now got the mid and array is divided\n // Left array - [10, 2, 6] & Right array - [-12, 5, 12, 16]\n mergeSortReverse(nums, start, mid); //calling mergeSort for left array\n mergeSortReverse(nums, mid, end); //calling mergeSort for right array\n // merge the sorted array\n mergeReverse(nums, start, mid, end);\n }",
"public static void merge(int start, int mid, int end, int[] numbers) {\n int[] tempArray = new int[numbers.length]; // Create a temporary array\n int tmpArrayIndex = start; // create a temporary index\n\n // initialize start index and mid index to be used as counters\n int startIndex = start;\n int midIndex = mid + 1;\n\n // Iterate until the smaller array reaches the end.\n while (startIndex <= mid && midIndex <= end) {\n if (numbers[startIndex] < numbers[midIndex]) {\n // The ++ increases the value by one after it has been used\n // to prevent the while loop from giving us an infinite loop\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n } else {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n }\n\n // copy the remaining elements into the array\n while(startIndex <= mid) {\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n }\n\n while (midIndex <= end) {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n\n // copy our temporary array to the actual array after sorting\n if (end + 1 - start >= 0) {\n\n // java method for copying arrays\n System.arraycopy(tempArray, start, numbers, start, end + 1 - start);\n }\n }",
"public static void merge(int[] a, int[] temp, int low, int mid, int high) {\r\n // low is the low index of the part of the array to be sorted\r\n // high is the high index of the part of the array to be sorted\r\n // mid is the middle of the array – last item in low half\r\n\r\n // copy the two sets from a[] to the same locations in the temporary array\r\n for (int i = low; i <= high; i++) {\r\n temp[i] = a[i];\r\n }\r\n //set up necessary pointers\r\n int lowP = low; // pointer to current item in low half\r\n int highP = mid + 1; // pointer to current item in high half\r\n int aP = low; // pointer to where each item will be put back in a[]\r\n // while the pointers have not yet reached the end of either half\r\n while ((lowP <= mid) && (highP <= high)) {\r\n // if current item in low half <= current item in high half\r\n if (temp[lowP] <= temp[highP]) {\r\n // move item at lowP back to array a and increment low pointer\r\n a[aP] = temp[lowP];\r\n lowP++;\r\n } else {\r\n // move item at highP back to array a and increment high pointer\r\n a[aP] = temp[highP];\r\n highP++;\r\n } // end if..else\r\n\r\n // increment pointer for location in original array\r\n aP++;\r\n } // end while\r\n // if lowP is at end of low half, then low half is done, move rest of high half.\r\n if (lowP > mid) {\r\n for (int i = highP; i <= high; i++) {\r\n a[aP] = temp[i]; //\r\n aP++;\r\n } // end for\r\n } else // high half is done, move rest of low half\r\n {\r\n for (int i = lowP; i <= mid; i++) {\r\n a[aP] = temp[i];\r\n aP++;\r\n }// end for\r\n }\r\n//\r\n }",
"private static void merge(int[] nums, int[] work, int start, int mid, int end){\n\t\tboolean loop = true;\n\t\tint counter1 = start;\n\t\tint counter2 = mid+1;\n\t\tint workCounter = start;\n\t\t\n\t\twhile(loop){\n\t\t\tif(counter1 > mid){\n\t\t\t\t// Copy all elements from 2nd end to work\n\t\t\t\tfor(int i=counter2; i<=end; i++)\n\t\t\t\t\twork[workCounter++] = nums[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif(counter2 > end){\n\t\t\t\t// Copy all elements from start-mid to work\n\t\t\t\tfor(int i=counter1; i<=mid; i++)\n\t\t\t\t\twork[workCounter++] = nums[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// Swap the number if the numbers in are not is sorted order\n\t\t\tif(nums[counter1] < nums[counter2]){\n\t\t\t\twork[workCounter] = nums[counter1]; \n\t\t\t\tcounter1++;\n\t\t\t}else{\n\t\t\t\twork[workCounter] = nums[counter2]; \n\t\t\t\tcounter2++;\n\t\t\t}\n\t\t\t\n\t\t\tworkCounter++;\n\t\t}\n\t\t\n\t\t// Copy the sorted work array into main array\n\t\tfor(int i=start; i <= end; i++)\n\t\t\tnums[i] = work[i];\n\t}",
"private static void sort(ArrayList<Integer> a, int left, int right) {\r\n\t\tif (left < right) {\r\n\t\t\tint mid = (left+right)/2;\r\n\t\t\t//sort both halves\r\n\t\t\tsort(a, left, mid);\r\n\t\t\tsort(a, mid + 1, right);\r\n\t\t\t//merge back\r\n\t\t\tmerge(a, left, mid, right);\r\n\t\t}\r\n\t}",
"static void mergeSort(int array[], int start, int end) {\n if (start < end) {\n // Find the middle point\n int middle = start + (end - start)/2;\n\n // Sort first and second parts\n mergeSort(array, start, middle);\n mergeSort(array, middle + 1, end);\n\n // Merge the sorted parts\n merge(array, start, middle, end);\n\n }\n\n }",
"private static void merge(Comparable[] as, Comparable[] aux, int lo, int mid, int hi) {\n assert isSorted(as, lo, mid); // precondition that first sub array is ordered\n assert isSorted(as, mid + 1, hi); // precondition that second sub array is ordered\n\n for (int k = lo; k <= hi; k++) {\n aux[k] = as[k];\n }\n\n int i = lo;\n int j = mid + 1;\n for (int k = lo; k <= hi; k++) {\n // done with first sub array\n if (i > mid) as[k] = aux[j++];\n // done with second sub array\n else if (j > hi) as[k] = aux[i++];\n // second less than first\n else if (less(aux[j], aux[i])) as[k] = aux[j++];\n // first less than first\n else as[k] = aux[i++];\n }\n\n assert isSorted(as, lo, hi); // postcondition that whole as array is sorted\n }",
"private void combine( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int mid, int high )\r\n\t{\r\n\t\t//copy the array into auxillary array for scratchwork\r\n\t\tfor (int index = low; index <= high; index++ )\r\n\t\t{\r\n\t\t\tauxillary.set(index, array.get(index));\r\n\t\t}\r\n\t\t\r\n\t\tint lowIndex = low;\r\n\t\tint midIndex= mid + 1;\r\n\t\tfor (int count= low; count <= high; count++)\r\n\t\t{\r\n\t\t\tif (lowIndex > mid)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse if (midIndex > high)\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t\t// if the element at midIndex is smaller than the element at the lowIndex, place it into the\r\n\t\t\t// real array before the element at lowIndex\r\n\t\t\telse if((auxillary.get(midIndex).compareTo(auxillary.get(lowIndex)) == -1))\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(midIndex));\r\n\t\t\t\tmidIndex++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tarray.set(count, auxillary.get(lowIndex));\r\n\t\t\t\tlowIndex++;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t}",
"private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }",
"private static void mergeSort(int[] num, int low, int high) {\n\t\tif ((high - low) >= 1) {\n\n\t\t\t// find the middle index\n\t\t\tint middle = (low + high) / 2;\n\n\t\t\t// make recursive calls to the 'left' and 'right' sides of the sublist\n\t\t\tmergeSort(num, low, middle);\n\t\t\tmergeSort(num, middle + 1, high);\n\n\t\t\t// merge the sublists back together\n\t\t\tmerge(num, low, middle, middle + 1, high);\n\n\t\t}\n\t}",
"static double[] mergeSortRecursive (double a[]) {\r\n \tif(a==null){\r\n \t\tSystem.out.print(\"Array empty\");\r\n \t\treturn null;\r\n \t}\r\n \tif(a.length>1) {\r\n \t\tint mid=a.length/2;\r\n \t\t//spilt left part\r\n \t\tdouble[] left =new double[mid];\r\n \t\tfor(int i =0 ; i <mid;i++) {\r\n \t\t\tleft[i]=a[i];\r\n \t\t}\r\n \t\t//spilt right part\r\n \t\tdouble[] right =new double[a.length-mid];\r\n \t\tfor(int i=mid; i< a.length;i++) {\r\n \t\t\tright[i-mid]=a[i];\r\n \t\t}\r\n \t\tmergeSortIterative(left);\r\n \t\tmergeSortIterative(right);\r\n \t\tint i=0;\r\n \t\tint j=0;\r\n \t\tint k=0;\r\n \t\t//Merge left and right arrays\r\n \t\twhile(i<left.length && j<right.length) {\r\n \t\t\tif(left[i]<right[j]) {\r\n \t\t\t\ta[k]=left[i];\r\n \t\t\t\ti++;\r\n \t\t\t}else {\r\n \t\t\t\ta[k]=right[j];\r\n \t\t\t\tj++;\r\n \t\t\t}\r\n \t\t\tk++;\r\n \t\t}\r\n \t\t//Collect remaining elements\r\n \t\twhile(i<left.length) {\r\n \t\t\ta[k]=left[i];\r\n \t\t\ti++;\r\n \t\t\tk++;\r\n \t\t}\r\n \t\twhile(j<right.length) {\r\n \t\t\ta[k]=right[j];\r\n \t\t\tj++;\r\n \t\t\tk++;\r\n \t\t}\r\n \t}\r\n\r\n \treturn a;\r\n }",
"void mergeSort(int arr[], int l, int r) \n { \n if (l < r) \n { \n // Find the middle point \n int m = (l+r)/2; \n \n // Sort first and second halves \n mergeSort(arr, l, m); \n mergeSort(arr , m+1, r); \n \n // Merge the sorted halves \n sort(arr, l, m, r); \n } \n\t}",
"static double[] mergeSortIterative (double a[]) {\r\n \tif(a==null){\r\n \t\tSystem.out.print(\"Array: empty\");\r\n \t\treturn null;\r\n \t}\r\n \tint length = (a.length-1);\r\n \tint currentSize; //varies from 1 to n/2\r\n\t\tint leftStart; // pick starting index of left subarray to be merged\r\n\t\tfor(currentSize=1; currentSize <= length; currentSize = (2*currentSize)) { //Merge subarrays in bottom up manner\r\n\t\t\t for(leftStart =0; leftStart < length ; leftStart += (2*currentSize)) { //Pick starting point of differnet subarrays of current size\r\n\t\t\t\t int mid = leftStart + currentSize -1;\r\n\t\t\t\t int rightEnd = Math.min(leftStart+2*currentSize-1, length);\r\n\t\t\t\t merge(a,leftStart,mid,rightEnd);\r\n\t\t\t }\r\n\t\t }\r\n\t\t return a;\r\n }",
"private void merge(int[] array, int start, int mid, int end) {\n\t\t\n\t\t// Instantiate and populate subarrays.\n\t\tint leftSize = mid - start + 1;\n\t\tint rightSize = end - mid;\n\t\tint[] leftSubarray = new int[leftSize + 1];\n\t\tint[] rightSubarray = new int[rightSize + 1];\n\t\t\n\t\tfor (int i = 0; i < leftSize; i++) {\n\t\t\tleftSubarray[i] = array[start + i];\n\t\t}\n\t\tfor (int i = 0; i < rightSize; i++) {\n\t\t\trightSubarray[i] = array[mid + i + 1];\n\t\t}\n\t\t\n\t\t// \"Sentinel\" values = approximate infinity.\n\t\tleftSubarray[leftSize] = Integer.MAX_VALUE;\n\t\trightSubarray[rightSize] = Integer.MAX_VALUE;\n\n\t\t// Merge subarrays.\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (int k = start; k <= end; k++) {\n\t\t\tif (leftSubarray[i] < rightSubarray[j]) {\n\t\t\t\tarray[k] = leftSubarray[i];\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray[k] = rightSubarray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t}",
"private int[] mergeSort(int[] nums, int start, int end) {\n if (start == end) {\n return new int[]{nums[start]};\n }\n\n // keep dividing the entire array into sub-arrays\n int mid = (end - start) / 2 + start;\n int[] left = mergeSort(nums, start, mid);\n int[] right = mergeSort(nums, mid + 1, end);\n // return merged array\n return mergeTwoSortedArrays(left, right);\n }",
"private void mergeSortRec(WordList list, Comparator<String> comp, int start, int end)\r\n {\r\n // TODO\r\n\t int middle = start + (end - start)/2; \r\n\t \r\n\t if(start < end) {\r\n\t\t mergeSortRec(list, comp, start, middle);\r\n\t\t mergeSortRec(list, comp, middle+1, end);\r\n\t\t mergeHelp(list, comp, start, middle, end);\r\n\t }\r\n\t \r\n }",
"public static void merge(int inputArray[], int start, int mid, int end) {\n // must account for first marker being pos 0\n int tempArray[] = new int[end - start + 1];\n\n // index counter for l array\n int leftMarker = start;\n // index counter for r array\n int rightMarker = mid + 1;\n // index counter for temporary array\n int k = 0;\n\n // while L isn't past midpoint and R isn't past end\n // fill out tempArray based on which value is higher\n while (leftMarker <= mid && rightMarker <= end) {\n if (inputArray[leftMarker] < inputArray[rightMarker]) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n } else {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n }\n k = k + 1;\n }\n\n // Only one condition must be true to break out of above loop\n // we could theoretically make it to the end of left array\n // without making it to the end of right array\n if (leftMarker <= mid) {\n while (leftMarker <= mid) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n k = k + 1;\n\n }\n } else if (rightMarker <= end) {\n while (rightMarker <= end) {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n k = k + 1;\n }\n }\n\n // copy over the temp array into inputArray\n for (int i = 0; i < tempArray.length; i++) {\n // we add \"start\" to i so that\n // we only write to the \"window\"'s location\n // and the window frame will move from left to right and expand\n // as the recursion proceeds\n inputArray[i + start] = tempArray[i];\n }\n }",
"public static void mergeSort(int start, int end, int[] numbers) {\n int mid = (start + end) / 2;\n\n if (start < end) {\n // sort left half\n mergeSort(start, mid, numbers);\n\n // sort right half\n mergeSort(mid + 1, end, numbers);\n\n // merge\n merge(start, mid, end, numbers);\n }\n }",
"private int merge(Comparable[] a, Comparable[] aux, int lo, int mid, int hi) {\n for (int k = lo; k <= hi; k++) {\n aux[k] = a[k];\n }\n\n int k = lo;\n int i = lo;\n int j = mid + 1;\n int count = 0;\n\n while (k < hi) {\n if (i > mid) a[k++] = aux[j++];\n else if (j > hi) a[k++] = aux[i++];\n else if (less(aux[j], aux[i])) {\n count += mid + 1 - i;\n a[k++] = aux[j++];\n }\n else a[k++] = aux[i++];\n }\n return count;\n }",
"public void mergesort(int[] a, int startI, int endI) {\n\t\t\n\t\t//int si= a.length-1;\n\t\tint [] val = new int[1];\n\t\tint midPoint;\n\t\tlong heapSize = Runtime.getRuntime().totalMemory();\n\t\tlong heapFreeSize = Runtime.getRuntime().freeMemory(); \n\t\t//System.out.println(\"current heap size \"+heapsize);\n\t\tmidPoint = (endI+startI)/2; //midpoint for array\n\t\t\n\t\tif(heapFreeSize<1212015976)\n\t\tSystem.out.println(\"Start: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint+\" current heap size \"+heapSize+\" current free heap \"+heapFreeSize);\n\t\tif (endI-startI < 1) {\n\t\t\tval[0]=a[startI];\n\t\t\t//System.out.println(\"returning \"+val[0]);\n\t\t\treturn ;\n\t\t}\n\t\t/*try\n\t\t{\n\t\t Thread.sleep(3000);\n\t\t}\n\t\tcatch(InterruptedException ex)\n\t\t{\n\t\t Thread.currentThread().interrupt();\n\t\t}*/\n\t\n\t\tmergesort(a, startI, midPoint); //split left\n\t\t\n\t\t\n\t\t//System.out.println(\"Start 2: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint);\n\t\tmergesort(a, midPoint+1, endI);\t\t//split right\n\t\ttemp=mergeSortedArrays(a, startI, midPoint, midPoint+1, endI); //by defining positions in array, we are taking out array slices\n\t\t/*for (int i=0;i<temp.length;i++) {\n\t\t\ta[i]=temp[i];\n\t\t}*/\n\t\t/*System.out.println(\"Printing Temp=>\");\n\t\t\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\tSystem.out.print(temp[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"\\n Printing A=>\");\n\t\t\n\t\tfor (int i=startI;i<endI;i++) {\n\t\t\tSystem.out.print(a[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"==>\");\n\t\treturn a;*/\n\t\t\n\t\t//System.out.println(\"==>\");\n\t\tint fill = startI;\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\ta[fill]=temp[i];\n\t\t\tfill++;\n\t\t}\n\t\treturn ;\n\t}",
"public static void merge(int[] array, int start, int mid, int end) {\n if (array[mid - 1] <= array[mid]) {\n return;\n }\n\n // Index variables\n int i = start;\n int j = mid;\n int tempIndex = 0;\n\n // Create a temp array large enough to hold all elements in the left and right partitions\n int[] temp = new int[end - start];\n\n // While there are elements left in any of the left and right partitions...\n while (i < mid && j < end) {\n /* \n temp[tempIndex++] = array[i] <= array[j] ? array[i++] : array[j++];\n */\n // If the left element is smaller than or equal to the right...\n if (array[i] <= array[j]) {\n // Assign the left element to the temp array, and increment tempIndex and i\n temp[tempIndex++] = array[i++];\n } else {\n // Else assign the right element to the temp array, and increment tempIndex and j\n temp[tempIndex++] = array[j++];\n }\n }\n\n // At this point, either left or right partition will now be empty. \n // Then we simply merge the rest from another partition into temp array \n // as elements left are all larger than the largest elements in the temp array.\n /*\n System.arraycopy(src, srcPos, dest, destPos, length)\n src => source array\n srcPos => source index\n dest => destination array\n destPos => destination index\n */\n\n // Start at unhandled index of the left partition and copy over the rest of the elements\n // to the end of the array from index we've copied over to temp array so far.\n // If there are left over elements in the right partitions, they're already in the end of the array.\n // In the next step, we will be copying over the sorted and merged array from temp array \n // back to the original array, so the the beginning of the array is now sorted in the original array.\n System.arraycopy(array, i, array, start + tempIndex, mid - i);\n\n // Copy the elements in the temp array back into the original array\n System.arraycopy(temp, 0, array, start, tempIndex);\n }",
"private static void merge(int[] nums, int low, int mid, int high) {\n int n1=mid-low+1;\n int n2=high-mid;\n int[] left=new int[n1];\n int[] right=new int[n2];\n for (int i = 0; i <n1 ; i++) {\n left[i]=nums[i+low];\n }\n for (int j = 0; j < n2; j++) {\n right[j]=nums[mid+1+j];\n }\n int k=low;\n int i=0,j=0;\n while (i< left.length && j< right.length){\n if(left[i]<right[j]){\n nums[k++]=left[i++];\n }\n else {\n nums[k++]=right[j++];\n }\n }\n //copy the remaining elements\n\n while (i<left.length){\n nums[k++]=left[i++];\n }\n while (j< right.length){\n nums[k++]=right[j++];\n }\n }",
"private static void mergeSort(int[] array, int startIndex, int endIndex) {\n if (startIndex < endIndex) {\n int halfIndex = (int) Math.floor((startIndex + endIndex) / 2);\n mergeSort(array, startIndex, halfIndex);\n mergeSort(array, halfIndex + 1, endIndex);\n mergeLogic(array, startIndex, halfIndex, endIndex);\n }\n }",
"public static void merge(Comparable[] a, Comparable[] aux, int low, int mid, int high) {\n assert SortUtil.isSorted(a, low, mid);\n assert SortUtil.isSorted(a, mid+1, high);\n \n // copy to aux\n for(int k=low; k<=high; k++)\n aux[k] = a[k];\n \n // merge back to a[]\n int i=low, j=mid+1;\n for(int k=low; k<=high; k++) {\n if(i>mid) a[k] = aux[j++];\n else if(j>high) a[k] = aux[i++];\n else if(SortUtil.less(aux[j], aux[i])) a[k] = aux[j++];\n else a[k] = aux[i++];\n }\n\n assert SortUtil.isSorted(a, low, high);\n }",
"private <T> List<Object> mergeSort(List<T> array, Comparator<? super T> comparator) {\n\t\tif (array.size() <= 1) {\n\t\t\treturn Arrays.<Object> asList(Long.valueOf(0), new LinkedList<T>(array));\n\t\t}\n\n\t\tint median = array.size() >>> 1;\n\t\tLinkedList<T> left = new LinkedList<T>(array.subList(0, median));\n\t\tLinkedList<T> right = new LinkedList<T>(array.subList(median, array.size()));\n\t\tList<Object> leftWithIntersections = mergeSort(left, comparator);\n\t\tList<Object> rightWithIntersections = mergeSort(right, comparator);\n\t\tList<Object> merged = merge((Deque<T>)leftWithIntersections.get(1), (Deque<T>)rightWithIntersections.get(1), comparator);\n\t\tlong intesections = (Long) leftWithIntersections.get(0) + (Long) rightWithIntersections.get(0) + (Long) merged.get(0);\n\t\tmerged.set(0, Long.valueOf(intesections));\n\t\treturn merged;\n\t}",
"public ArrayList<Interval> merge(ArrayList<Interval> intervals){\n Stack<Interval> st = new Stack<Interval>();\n st.push(intervals.get(0));\n int size = intervals.size();\n for(int i = 1; i < size;i++){\n Interval temp = intervals.get(i);\n Interval first = st.peek();\n if(first.end >= temp.start){\n st.pop();\n st.push(mergeInterval(first,temp));\n }else{\n st.push(temp);\n }\n }\n ArrayList<Interval> ans = new ArrayList<Interval>();\n while(!st.isEmpty()){\n ans.add(st.peek());\n st.pop();\n }\n // reverse all the intervals in the arrayList\n Collections.reverse(ans);\n return ans;\n }",
"public ListNode mergeSortList(ListNode head) {\n \tif(head == null || head.next == null) return head;\n \t//递归的出口 空list或者 只有一个值的时候 直接返回 \n \tListNode mid=findMid(head); //找到中间值 \n \tListNode pointer=mid.next; //记录右边的开始\n \tmid.next=null; // 把list拆成两半 \n \tListNode part1=mergeSortList(head); //对前半部分mergeSort 并记录返回指针\n \tListNode part2=mergeSortList(pointer); //对后半部分mergeSort 并记录返回指针\n \treturn merge(part1, part2); //两部分再合并\n }",
"public static int[] mergeSort(int[] elements, int start, int end) {\n\t\tif (start == end)\n\t\t\treturn elements;\n\t\t\n\t\tint middle = (end + start) / 2;\n\t\tmergeSort(elements, start, middle);\n\t\tmergeSort(elements, middle + 1, end);\n\t\tmerge(elements, start, middle, end);\n\t\t\n\t\treturn elements;\n\t}",
"public static void merge(List<Integer> values, int prefixStart,\r\n int suffixStart, int suffixEnd) {\r\n List<Integer> temp = new ArrayList<>();\r\n\r\n int i = prefixStart;\r\n int j = suffixStart;\r\n\r\n while (i < suffixStart && j < suffixEnd) {\r\n if (values.get(i) < values.get(j)) {\r\n temp.add(values.get(i));\r\n i++;\r\n } // if\r\n else {\r\n temp.add(values.get(j));\r\n j++;\r\n } // else\r\n } // while\r\n\r\n while (i < suffixStart) {\r\n temp.add(values.get(i));\r\n i++;\r\n } // while\r\n\r\n while (j < suffixEnd) {\r\n temp.add(values.get(j));\r\n j++;\r\n } // while\r\n\r\n i = prefixStart;\r\n for (int index = 0; index < temp.size(); index++) {\r\n values.set(i, temp.get(index));\r\n i++;\r\n } // for\r\n }",
"public static <T extends Comparable<? super T>> void mergeSort(List<T> a,\n List<T> tmpArray, int low, int high){\n // base case if high - low < 1 then already sorted\n if(high - low < 1){\n return;\n }\n\n // else split array and sort each half and then merge the halves back together\n int center = (low + high)/2;\n mergeSort(a, tmpArray, low, center);\n mergeSort(a, tmpArray, center + 1, high);\n merge(a, tmpArray, low, high);\n }",
"private void mergesort(ToCompare[] a, int l, int r) throws BrokenBarrierException, InterruptedException {\n if (l >= r) {\r\n return;\r\n }\r\n\r\n //recursion step: a[l..r] is not empty \r\n //divide into sublists and merge \r\n int m = (l + r) / 2;\r\n mergesort(a, l, m);\r\n mergesort(a, m + 1, r);\r\n merge(a, l, m, r);\r\n }",
"protected static <T extends Comparable<? super T>> void merge(List<T> a,\n List<T> tmpArray, int low, int high){\n int leftEnd = (low + high)/2;\n int leftPos = low;\n int rightPos = leftEnd + 1;\n int rightEnd = high;\n\n // merge into beginning of tmpArray\n int tmpPos = 0;\n int numElements = high - low + 1;\n\n while(leftPos <= leftEnd && rightPos <= rightEnd){\n // if value at leftPos is less than rightPos\n // copy leftPos into tmpArray and increment leftPos\n if(a.get(leftPos).compareTo(a.get(rightPos)) <= 0){\n tmpArray.set(tmpPos, a.get(leftPos));\n leftPos++;\n \n } else { // else rightPos is less and should be copied\n tmpArray.set(tmpPos, a.get(rightPos));\n rightPos++;\n }\n\n // in either case increment tmpPos\n tmpPos++;\n }\n\n // copy rest of left array if right array finished first\n while(leftPos <= leftEnd){\n tmpArray.set(tmpPos, a.get(leftPos));\n // increment left and tmp position\n leftPos++;\n tmpPos++;\n }\n\n // copy rest of right array if left array finished first\n while(rightPos <= rightEnd){\n tmpArray.set(tmpPos, a.get(rightPos));\n // increment right and tmp position\n rightPos++;\n tmpPos++;\n }\n\n // copy tmpArray back into array a\n for(int i = 0; i < numElements; i++){\n a.set(low+i, tmpArray.get(i));\n }\n }",
"private void merge(ArrayList<Integer> arrayList, int p, int q, int r){\n ArrayList<Integer> lowHalf = new ArrayList<>();\r\n ArrayList<Integer> topHalf = new ArrayList<>();\r\n\r\n int k = p;\r\n int i;\r\n int j;\r\n\r\n //Values from original array entered into the new arrays\r\n for (i = 0; k <= q; i++, k++) {\r\n lowHalf.add(i, arrayList.get(k));\r\n }\r\n for (j = 0; k <= r; j++, k++) {\r\n topHalf.add(j, arrayList.get(k));\r\n }\r\n\r\n\r\n k = p;\r\n i = 0;\r\n j = 0;\r\n\r\n\r\n while (i < lowHalf.size() && j < topHalf.size()) {\r\n if (lowHalf.get(i) < topHalf.get(j)) {\r\n arrayList.set(k, lowHalf.get(i));\r\n i++;\r\n } else {\r\n arrayList.set(k, topHalf.get(j));\r\n j++;\r\n }\r\n k++;\r\n }\r\n\r\n while (i < lowHalf.size()) {\r\n arrayList.set(k, lowHalf.get(i));\r\n k++;\r\n i++;\r\n }\r\n while (j < topHalf.size()) {\r\n arrayList.set(k, topHalf.get(j));\r\n k++;\r\n j++;\r\n }\r\n }",
"private static <T extends Comparable<T>> void merge(T[] arrayToSort, int startIndex, int centerIndex, int endIndex) {\n List<T> left = new ArrayList<>(centerIndex - startIndex);\n List<T> right = new ArrayList<>(endIndex - centerIndex);\n for(int i = startIndex; i < centerIndex; i++)\n left.add(arrayToSort[i]);\n for(int i = centerIndex; i < endIndex; i++)\n right.add(arrayToSort[i]);\n int leftItr = 0;\n int rightItr = 0;\n for(int i = startIndex; i < endIndex; i++) {\n if(leftItr < left.size())\n if(rightItr < right.size())\n if(left.get(leftItr).compareTo(right.get(rightItr)) < 0)\n arrayToSort[i] = left.get(leftItr++);\n else\n arrayToSort[i] = right.get(rightItr++);\n else\n arrayToSort[i] = left.get(leftItr++);\n else\n arrayToSort[i] = right.get(rightItr++);\n }\n }",
"void merge(int arr[], int left, int mid, int right) {\n\t\tint n1 = mid - left + 1;\n\t\tint n2 = right - mid;\n\n\t\t/* Create temporary arrays */\n\t\tint leftArray[] = new int[n1];\n\t\tint rightArray[] = new int[n2];\n\n\t\t/* Copy data to temporary arrays */\n\t\tfor (int i = 0; i < n1; ++i)\n\t\t\tleftArray[i] = arr[left + i];\n\t\tfor (int j = 0; j < n2; ++j)\n\t\t\trightArray[j] = arr[mid + 1 + j];\n\n\t\t/* Merge the temporary arrays */\n\n\t\t// Initial indexes of first and second sub-arrays\n\t\tint i = 0, j = 0;\n\n\t\t// Initial index of merged sub-array array\n\t\tint k = left;\n\t\twhile (i < n1 && j < n2) {\n\t\t\tif (leftArray[i] >= rightArray[j]) {\n\t\t\t\tarr[k] = leftArray[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tarr[k] = rightArray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of L[] if any */\n\t\twhile (i < n1) {\n\t\t\tarr[k] = leftArray[i];\n\t\t\ti++;\n\t\t\tk++;\n\t\t}\n\n\t\t/* Copy remaining elements of R[] if any */\n\t\twhile (j < n2) {\n\t\t\tarr[k] = rightArray[j];\n\t\t\tj++;\n\t\t\tk++;\n\t\t}\n\t\t\n\t}",
"private static void mergeSort(int[] data, int left, int right) {\n\n\t\tint mid;\n\n\t\tif (left < right) {\n\n\t\t\tmid = (left + right) / 2;\n\n\t\t\tmergeSort(data, left, mid);\n\t\t\tmergeSort(data, mid + 1, right);\n\t\t\tmerge(data, left, mid, right);\n\t\t}\n\n\t}",
"private static int[] mergeSort(int numbers[]) {\n\n\t\tif (numbers.length <= 1) {\n\t\t\treturn numbers;\n\t\t}\n\n\t\tint mid = numbers.length / 2;\n\t\tint subArray1[] = new int[mid];\n\t\tint subArray2[] = new int[numbers.length - mid];\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < subArray1.length; i++) {\n\t\t\tsubArray1[i] = numbers[count++];\n\t\t}\n\t\tfor (int i = 0; i < subArray2.length; i++) {\n\t\t\tsubArray2[i] = numbers[count++];\n\t\t}\n\n\t\tsubArray1 = mergeSort(subArray1);\n\t\tsubArray2 = mergeSort(subArray2);\n\t\tnumbers = merge(subArray1, subArray2);\n\n\t\treturn numbers;\n\t}",
"public static int[] merge(int[] A, int start, int middle, int end, int[] B) {\n int i = start;\n int j = middle;\n for (int k = start; k < end; k++) {\n if (i < middle && (j >= end || A[i] <= A[j])) {\n B[k] = A[i];\n i++;\n } else {\n B[k] = A[j];\n j++;\n }\n }//end for\n return A;\n }",
"public static IntList mergeSort(IntList input) {\n\t\tif (input.length() <= 1)\n\t\t\treturn input;\n\t\tIntList part1 = new SimpleIntList();\n\t\tIntList part2 = new SimpleIntList();\n\t\tdivide(input,part1,part2);\n\t\tpart1 = mergeSort(part1);\n\t\tpart2 = mergeSort(part2);\n\t\treturn merge(part1,part2);\n\t}",
"private void merge(int[] left, int[] right, int[] a) {\n\t\t// i - left\n\t\t// j - right\n\t\t// k - original\n\t\tint i = 0, j = 0, k = 0;\n\t\tint sL = left.length;\n\t\tint sR = right.length;\n\n\t\twhile (i < sL && j < sR) {\n\t\t\tif (left[i] < right[j]) {\n\t\t\t\ta[k] = left[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\ta[k] = right[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\twhile (i < sL) {\n\t\t\ta[k] = left[i];\n\t\t\tk++;\n\t\t\ti++;\n\t\t}\n\t\twhile (j < sR) {\n\t\t\ta[k] = right[j];\n\t\t\tk++;\n\t\t\tj++;\n\t\t}\n\t}",
"public static List<Integer> merge(List<Integer> left,List<Integer> right) {\n\t\tList<Integer> mergeArray = new ArrayList<Integer>();\n\t\tint leftLen = left.size();\n\t\tint rightLen = right.size();\n\t\tint len = leftLen+rightLen;\n\t\tint i=0;\n\t\tint j=0;\n\t\twhile(len!=0) {\n\t\t\tif(i<leftLen && j<rightLen && left.get(i)<right.get(j)) {\n\t\t\t\tmergeArray.add(left.get(i));\n\t\t\t\ti++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(i<leftLen && j<rightLen && left.get(i)>right.get(j)) {\n\t\t\t\tmergeArray.add(right.get(j));\n\t\t\t\tj++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(i<leftLen && j>= rightLen) {\n\t\t\t\tmergeArray.add(left.get(i));\n\t\t\t\ti++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}else if(j<rightLen && i>= leftLen) {\n\t\t\t\tmergeArray.add(right.get(j));\n\t\t\t\tj++;\n\t\t\t\tlen--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn mergeArray;\n\t}",
"private void mergeSortHelper(Object arr[], int l, int r) \n\t{ \n\t\tif (l < r) \n\t\t{ \n\t\t\t// Find the middle point \n\t\t\tint m = (l+r)/2; \n\n\t\t\t// Sort first and second halves \n\t\t\tmergeSortHelper(arr, l, m); \n\t\t\tmergeSortHelper(arr , m+1, r); \n\n\t\t\t// Merge the sorted halves \n\t\t\tmerge(arr, l, m, r); \n\t\t} \n\t}",
"private static long merge(int start, int end, int mid) {\n\t\tfor(int i=start; i<=end; i++){\n\t\t\ttempArr[i] = numArr[i];\n\t\t}\n\t\t\t\n\t\tint i=start, j=mid+1, temp=start;\n\t\tlong cnt = 0L;\n\t\twhile(i <= mid && j <= end){\n\t\t\tif(tempArr[i] <= tempArr[j]){\n\t\t\t\tnumArr[temp++] = tempArr[i++];\n\t\t\t}else{\n\t\t\t\tnumArr[temp++] = tempArr[j++];\n\t\t\t\tcnt += (long)(mid+1-i);\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile(i<=mid){\n\t\t\tnumArr[temp++] = tempArr[i++];\n\t\t}\n\t\twhile(j<=end){\n\t\t\tnumArr[temp++] = tempArr[j++];\n\t\t}\n\t\treturn cnt;\n\t}",
"public int[] merge(int[] arr, int[] temp, int left, int right, int mid) {\n\t\tint i = left;\r\n\t\tint j = mid;\r\n\t\tint k = left;\r\n\r\n\t\twhile (i < mid && j <= right) {\r\n\t\t\tif (arr[i] < arr[j])\r\n\t\t\t\ttemp[k++] = arr[i++];\r\n\t\t\telse\r\n\t\t\t\ttemp[k++] = arr[j++];\r\n\t\t}\r\n\r\n\t\twhile (i < mid)\r\n\t\t\ttemp[k++] = arr[i++];\r\n\r\n\t\twhile (j <= right)\r\n\t\t\ttemp[k++] = arr[j++];\r\n\r\n\t\tfor (i = left; i <= right; i++)\r\n\t\t\tarr[i] = temp[i];\r\n\r\n\t\treturn arr;\r\n\t}",
"static List<Interval> merge(List<Interval> intervals) {\n intervals.sort((Interval interval1, Interval interval2) -> Integer.compare(interval1.start, interval2.start));\n\n Iterator<Interval> itr = intervals.iterator();\n\n List<Interval> result = new ArrayList<>();\n Interval first = itr.next();\n int start = first.start;\n int end = first.end;\n\n while (itr.hasNext()) {\n Interval currentInterval = itr.next();\n //overlap\n if (end > currentInterval.start) {\n // change the end value to take the max of the two\n // TIP: changing max to min gives us mutually exclusive intervals , ie, it gets rid if the overlapping intervals\n end = Math.max(end, currentInterval.end);\n // Not adding to final list here cause the next interval could also be overlapped\n } else {\n //add s,e to final list here as we know current interval end < start\n result.add(new Interval(start, end));\n // last pair will not be added in this loop as hasNext will return false\n start = currentInterval.start;\n end = currentInterval.end;\n }\n }\n\n result.add(new Interval(start, end));\n return result;\n\n }",
"private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }",
"public ArrayList<Interval> merge(ArrayList<Interval> intervals) {\n if (intervals.size() > 1) {\n int[] startArray = new int[intervals.size()];\n int[] endArray = new int[intervals.size()];\n ArrayList<Interval> ans = new ArrayList<>();\n int count = 0;\n for (Interval val : intervals) {\n startArray[count] = val.start;\n endArray[count] = val.end;\n count++;\n }\n Arrays.sort(startArray);\n Arrays.sort(endArray);\n\n\n for (int i = 0; i < intervals.size()-1; i++) {\n int start = startArray[i];\n int end = endArray[i];\n\n while (i<intervals.size()-1 && startArray[i+1]<=end){\n end=endArray[i+1];\n i++;\n }\n\n Interval interval = new Interval(start,end);\n ans.add(interval);\n\n }\n\n return ans;\n }\n return intervals;\n }",
"private void mergesort(ArrayList<Integer> list, int l, int h) {\n\t\tif (l < h) {\n\t\t\tint m = (l + h) / 2;\n\t\t\tmergesort(list, l, m);\n\t\t\tmergesort(list, m + 1, h);\n\t\t\tSystem.out.println(list);\n\t\t\tmerge(list, l, m, h);\n\t\t}\n\t}",
"void merge(int[] array, int[] helper, int low, int middle, int high) {\n for(int i = low; i <= high; i++) {\n helper[i] = array[i];\n }\n\n int helperLeft = low;\n int helperRight = middle + 1;\n int current = low;\n\n //Iterate through helper array. Compare left and right half, copying back\n //the smaller element from the two halves into the original array\n while(helperLeft <= middle && helperRight <= high) {\n if(helper[helperLeft] <= helper[helperRight]) {\n array[current] = helper[helperLeft];\n helperLeft++;\n }\n else { //If right element is smaller than left element\n array[current] = helper[helperRight];\n helperRight++;\n }\n current++;\n }\n\n //Copy the rest of the left side of the array into the target array\n int remaining = middle - helperLeft;\n for(int i = 0; i <= remaining; i++) {\n array[current + i] = helper[helperLeft + i];\n }\n }",
"public static int merge(Integer[] arr, Integer[] aux, int low, int mid, int high)\n {\n int k = low, i = low, j = mid + 1;\n int inversionCount = 0;\n\n // While there are elements in the left and right runs\n while (i <= mid && j <= high)\n {\n if (arr[i] <= arr[j]) {\n aux[k++] = arr[i++];\n }\n else {\n aux[k++] = arr[j++];\n inversionCount += (mid - i + 1); // NOTE\n }\n }\n\n // Copy remaining elements\n while (i <= mid)\n aux[k++] = arr[i++];\n\n // Don't need to copy second half\n\n // copy back to the original array to reflect sorted order\n for (i = low; i <= high; i++) {\n arr[i] = aux[i];\n }\n\n return inversionCount;\n }",
"private void merge(Comparable[] array, Comparable[] aux, int low, int high) {\n if (low >= high) return;\n\n int mid = (low + high) / 2;\n // Copy to aux\n for (int i = low; i <= high; i++) {\n aux[i] = array[i];\n }\n\n int i = low;\n int j = mid + 1;\n\n for (int k = low; k <= high; k++) {\n if (i > mid) array[k] = aux[j++];\n else if (j > high) array[k] = aux[i++];\n else if (aux[i].compareTo(aux[j]) <= 0) array[k] = aux[i++]; // <= makes it stable!!\n else array[k] = aux[j++];\n }\n }",
"private int[] merge(int[] left, int[] right) {\r\n\t\tint[] merged = new int[(left.length + right.length)];\r\n\r\n\t\t// l -> arrL index and r -> arrR index\r\n\t\tint l = 0, r = 0;\r\n\t\tfor (int i = 0; i < merged.length; i++) {\r\n\r\n\t\t\tif (l >= left.length) {\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t} \r\n\t\t\telse if (r >= right.length) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] >= right[r]) {\r\n\t\t\t\t// The total inversions will always be left.length - l\r\n\t\t\t\tcounter += (left.length - l);\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] < right[r]) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn merged;\r\n\t}",
"protected ArrayList<Aircraft> mergeSort(ArrayList<Aircraft> list, boolean ascending)\r\n {\r\n\t\t// Use the merge sort algorithm to sort 'aircrafts' and then \r\n\t\t// return it. Initially this method just returns an empty\r\n \t// list - you need to fix this.\r\n \t\r\n \tArrayList<Aircraft> sorted = new ArrayList<Aircraft>();\r\n\r\n \t// TODO\r\n \tif(list.size()<=1) \r\n \t{\r\n \t\treturn list;\r\n \t}\r\n \t \r\n \t int middleIndex = list.size()/2; //find the middle index\r\n \t \r\n \t ArrayList<Aircraft> sortedL = new ArrayList<Aircraft>(middleIndex); //create new Empty array at left\r\n \t ArrayList<Aircraft> sortedR; // initialized new Array at Right \r\n \t \r\n \t \r\n \t if(list.size()%2 == 0) //create new Right Empty array has the same of Left empty array\r\n \t {\r\n \t sortedR = new ArrayList<Aircraft>(middleIndex); \r\n \t }else\r\n \t {\r\n \t sortedR = new ArrayList<Aircraft>(middleIndex+1);\r\n \t }\r\n \t \r\n \t for(int i = 0;i<middleIndex;i++)\r\n \t {\r\n \t sortedL.add(list.get(i)); //get index list with lest than middle index\r\n \t }\r\n \t \r\n \t for(int j = middleIndex ;j < list.size();j++)\r\n \t {\r\n \t sortedR.add(list.get(j)); //get index list with more than middle index\r\n \t }\r\n \t \r\n \t\r\n \t \r\n \t if(ascending == true) {\r\n \t sortedL = mergeSort(sortedL,true); // split elements in the left side;\r\n \t sortedR = mergeSort(sortedR,true); // split element in the right side;\r\n \t \r\n \t sorted= Merge(sortedL,sortedR,true);\r\n \t \r\n \t \r\n \t }else // for descending\r\n \t { \r\n \t \r\n \t sortedL = mergeSort(sortedL,false); // split elements in the left side;\r\n \t sortedR = mergeSort(sortedR,false); // split element in the right side;\r\n \t \r\n \t sorted= Merge(sortedL,sortedR,false);\r\n \t \r\n \t }\r\n \treturn sorted;\r\n\t\t\r\n \t\r\n\t\t\r\n \t\r\n }",
"private static void mergeDesc(int arr[], int start,int mid, int end) {\n\r\n\t\t\t\tint subArrLen1 = mid - start + 1;\r\n\t\t\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t\t\t// create the sub Arrays as temporary storage\r\n\t\t\t\tint subArray1[] = new int[subArrLen1];\r\n\t\t\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t\t\t// copy data in temporary arrays\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// merging the temporary arrays\r\n\r\n\t\t\t\tint i = 0, j = 0;\r\n\t\t\t\tint k = start;\r\n\r\n\t\t\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\t\t\tif (subArray1[i] > subArray2[j]) {\r\n\t\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (i < subArrLen1) {\r\n\t\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// copy left over elements of subArray2[]\r\n\t\t\t\twhile (j < subArrLen2) {\r\n\t\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\r\n\t}",
"public void mergeSort(List<Integer> a, int n) {\n if (n < 2) {\n return;\n }\n int mid = n / 2;\n List<Integer> l = new LinkedList<Integer>();\n List<Integer> r = new LinkedList<Integer>();\n \n for (int i = 0; i < mid; i++) {\n l.add(a.get(i));\n }\n for (int i = mid; i < n; i++) {\n r.add(a.get(i));\n }\n mergeSort(l, mid);\n mergeSort(r, n - mid);\n \n merge(a, l, r, mid, n - mid);\n }",
"private static void sort(Comparable[] a, int[] index, int[] aux, int lo, int hi){\n if(hi<=lo) return;\n int mid=lo+(hi-lo)/2;\n sort(a,index,aux,lo,mid);\n sort(a,index,aux,mid+1,hi);\n merge(a,index,aux,lo,mid,hi);\n }",
"private static <T extends Comparable<T>> void mergeSort(T[] arrayToSort, int startIndex, int endIndex) {\n if(startIndex + 1 < endIndex) {\n int centerIndex = (endIndex + startIndex)/2;\n mergeSort(arrayToSort, startIndex, centerIndex); // sort left half\n mergeSort(arrayToSort, centerIndex, endIndex); // sort right half\n merge(arrayToSort, startIndex, centerIndex, endIndex); // merge two, sorted halves\n }\n }",
"private static void merge(int[] data, int left, int mid, int right) {\n\n\t\tint l = left; // 첫번째 부분 시작\n\t\tint m = mid + 1; // 두번째 부분 시작\n\t\tint k = left; // 배열 tempArr에 저장할 위치\n\n\t\tint[] tempArr = new int[data.length];\n\n\t\twhile (l <= mid && m <= right) {\n\n\t\t\tif (data[l] < data[m]) {\n\t\t\t\ttempArr[k++] = data[l++];\n\t\t\t} else {\n\t\t\t\ttempArr[k++] = data[m++];\n\t\t\t}\n\n\t\t}\n\n\t\twhile (l <= mid) {\n\t\t\ttempArr[k++] = data[l++];\n\t\t}\n\n\t\twhile (m <= right) {\n\t\t\ttempArr[k++] = data[m++];\n\t\t}\n\n\t\tfor (int index = left; index < k; index++) {\n\t\t\tdata[index] = tempArr[index];\n\t\t}\n\n\t\tprint(data);\n\t}",
"private void mergeHelp(WordList list, Comparator<String> comp, int start, int mid, int end) {\r\n\t \r\n\t \r\n\t int pos = 0;\r\n\t int a = start;\r\n\t int len = end - start + 1;\r\n\t int b = mid + 1;\r\n\t String[] sorted = new String[len];\r\n\t \r\n\t while(a <= mid && b <= end) {\r\n\t\t if(comp.compare(list.get(a), list.get(b)) == -1) { \r\n\t\t\t sorted[pos] = list.get(b);\r\n\t\t\t b++;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t sorted[pos] = list.get(a);\r\n\t\t\t a++;\r\n\t\t }\r\n\t\t pos++;\r\n\t }\r\n\t \r\n\t while(a <= mid) {\r\n\t\t sorted[pos] = list.get(a);\r\n\t\t a++;\r\n\t\t pos++;\r\n\t }\r\n\t while(b <= end) {\r\n\t\t sorted[pos] = list.get(b);\r\n\t\t b++;\r\n\t\t pos++;\r\n\t }\r\n\t for(int i = 0; i < len; i++) {\r\n\t\t list.set(i + start, sorted[i]);\r\n\t }\r\n }",
"private void recMergeSort(final long[] workSpace, final int lowerBound,\n final int upperBound) {\n if (lowerBound == upperBound) // if range is 1,\n return; // no use sorting\n else { // find midpoint\n final int mid = (lowerBound + upperBound) / 2;\n // sort low half\n recMergeSort(workSpace, lowerBound, mid);\n // sort high half\n recMergeSort(workSpace, mid + 1, upperBound);\n // merge them\n merge(workSpace, lowerBound, mid + 1, upperBound);\n } // end else\n }",
"public static int[] mergeSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo < hi) {\n int mid = (lo+hi)/2;\n int[] lft = mergeSort(arr, lo, mid);\n int[] rgt = mergeSort(arr, mid+1, hi);\n int[] res = mergeTwoSortedArrays(lft, rgt);\n return res;\n }\n return new int[]{arr[lo]}; // if(lo==hi)\n}",
"void merge(int arr[], int l, int m , int r)\n {\n int n1 = m-l+1;\n int n2 = r-m;\n\n //create temp arrays\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n //copy the elements to the array\n for(int i=0; i < n1 ;i++)\n L[i] = arr[l+i];\n for(int j=0; j < n2 ;j++)\n R[j] = arr[m+1+j];\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarry array\n int k = l;\n\n while(i<n1 && j< n2)\n {\n if(L[i] <= R[j])\n {\n arr[k++] = L[i++];\n }\n else\n {\n arr[k++] = R[j++];\n }\n }\n\n while(i<n1)\n {\n arr[k++]=L[i++];\n }\n\n while(j<n2)\n {\n arr[k++]=R[j++];\n }\n\n }",
"void mergeSort(int[] arr, int l, int r) {\r\n if (l<r)\r\n {\r\n int m = (l+r)/2;\r\n\r\n mergeSort(arr,l,m);\r\n mergeSort(arr, m+1, r);\r\n merge(arr, l, m, r);\r\n }\r\n }",
"public void merge(int l, int m, int r){\n int n1 = m-l+1;\n int n2 = r-m;\n\n // temp arrays \n int[] L = new int[n1];\n int[] R = new int[n2];\n\n // copy data of the 2 subarrays int he temp ones\n // TODO : can be reduced to one loop and another loop of length |n1-n2|\n for(int i=0; i<n1; i++) L[i] = arr[l+i];\n for(int i=0; i<n2; i++) R[i] = arr[m+1+i];\n\n\n // init indexes\n int i=0, j=0, k=l;\n while (i<n1 && j<n2){ // ordering in asc order\n if(L[i] <= R[j]){\n arr[k] = L[i];\n i++;\n } else{\n arr[k] = R[j];\n j++;\n }\n k++;\n }\n\n // insert the remaining items\n while(i<n1){\n arr[k] = L[i];\n i++;\n k++;\n }\n\n while(j<n2){\n arr[k] = R[j];\n j++;\n k++;\n }\n \n\n }",
"private void merge(List<Interval> list) {\n if(list == null) {\n return;\n }\n \n // first sort the list on their start time\n Collections.sort(list, new Comparator<Interval>() {\n\n @Override\n public int compare(Interval i1, Interval i2) {\n if(i1 == null && i2 == null) {\n return 0;\n } else if(i1 != null && i2 != null) {\n if(i1.start > i2.start) {\n return 1;\n } else if(i1.start == i2.start) {\n return 0;\n } else {\n return -1;\n }\n } else if(i1 != null) {\n return 1;\n } else {\n return -1;\n }\n }\n \n });\n \n int index = 0;\n \n // ensure there are at least 2 elements left\n while(index < list.size() - 1) {\n // get the next 2 consecutive elements from the list\n Interval a = list.get(index++);\n Interval b = list.get(index);\n \n\n if(a.start <= b.start && b.end <= a.end) {\n // a completely covers b then delete b\n list.remove(index--);\n } else if(a.start <= b.start && b.start < a.end) {\n // a and b overlaps some \n list.remove(index--);\n list.remove(index);\n \n // replace with the merged one\n list.add(index, new Interval(a.start, b.end));\n }\n }\n }",
"public List<Interval> merge(List<Interval> intervals) {\n List<Interval> result = new ArrayList<>();\n Interval current = null;\n\n Collections.sort(intervals, new Comparator<Interval>() {\n @Override\n public int compare(Interval o1, Interval o2) {\n return Integer.compare(o1.start, o2.start);\n }\n });\n\n for (int i = 0; i < intervals.size(); i++) {\n current = intervals.get(i);\n Interval last = result.size() == 0 ? current : result.get(result.size() - 1);\n\n if (last.end < current.start) {\n result.add(current);\n continue;\n } else {\n result.remove(last);\n\n last.start = Math.min(last.start, current.start);\n last.end = Math.max(last.end, current.end);\n\n result.add(last);\n }\n }\n\n\n return result;\n }",
"static void mergeSort(int[] arr, int l, int r) {\n\t\tif (l<r) {\n\t\t\tint m = (l+r)/2;\n\n\t\t\tmergeSort(arr, l, m);\n\t\t\tmergeSort(arr, m+1, r);\n\t\t\tmerge(arr, l, r, m);\n\t\t}\n\t}",
"private static MyList Merge(MyList L1, MyList L2)\n\t{\n\t\t//however, one assumption is that the length of L1>L2, because of our mid algorithm\n\t\tMyList merged = new MyList(0);//its next is the resulting merged list\n\t\tMyList current = merged;//current points where we are at the time of merging\n\t\tint turn = 1;//we define a turn to know which list element to be merged per loop cycle\n\t\twhile(L1!=null && L2!=null)\n\t\t{\n\t\t\tif(turn==1)//pick from L1\n\t\t\t{\n\t\t\t\tcurrent.next = L1;\n\t\t\t\tL1 = L1.next;//update L1's index to right\n\t\t\t\tturn = 2;//next loop we pick from L2\n\t\t\t}\n\t\t\telse//pick from L2\n\t\t\t{\n\t\t\t\tcurrent.next = L2;\n\t\t\t\tL2 = L2.next;//update L1's index to right\n\t\t\t\tturn = 1;//back to L1 next cycle\n\t\t\t}\n\t\t\tcurrent = current.next;//update the current pointer\n\t\t}\n\t\t//as we said L1's length may be longer than L2 considering size of array\n\t\tif(L1!=null)//we merge the remaining L1 to our current.next\n\t\t\tcurrent.next = L1;\n\n\t\treturn merged.next;\n\t}",
"private static int[] merge( int[] a, int[] b )\n {\n int[] ans = new int[(a.length + b.length)]; //create new array with the combined lengths\n int a1 = 0; //counter for a's position\n int b1 = 0; //counter for b's position\n while (a1 < a.length || b1 < b.length) { //iterates while either counter is not at the end of each array\n\t if (a1 == a.length) { //if you finished with all of a add the remaining b elements\n\t ans[a1 + b1] = b[b1]; \n\t b1 += 1;\n\t }\n\t else if (b1 == b.length) { //if you finished with all of b add the remaining a elements\n\t ans[a1 + b1] = a[a1];\n\t a1 += 1;\n\t }\n\t else if (a[a1] > b[b1]) { //if the current element at position a1 is larger than the one at b1, add the lower b1 to the new array and move to next b position\n\t ans[a1 + b1] = b[b1];\n\t b1 += 1;\n\t }\n\t else {\n\t ans[a1 + b1] = a[a1]; //otherwise add the element at a1 and move to next a position \n\t a1 += 1;\n\t }\n }\n return ans; //return the sorted merged array\t \t \n }",
"static void sort(int arr[], int l, int r) \n { \n if (l < r) \n { \n // Find middle \n int m = (l+r)/2; \n \n // Sort both halves\n sort(arr, l, m); \n sort(arr , m+1, r); \n \n // Merge both halves after they have been sorted \n merge(arr, l, m, r); \n } \n }",
"private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high )\r\n\t{\r\n\t\t// base case\r\n\t\tif ((high - low) <= switchValue)\r\n\t\t{\r\n\t\t\tSort_Utils.insertion_sort(array, low, high);\r\n\t\t}\r\n\t\t\r\n\t\tif (low < high)\r\n\t\t{\r\n\t\t\tint middle = low + (high - low)/2;\r\n\t\t\t\r\n\t\t\t// recursively sort the two halves of the array\r\n\t\t\tmerge_sort(array, auxillary, low, middle);\r\n\t\t\tmerge_sort(array, auxillary, middle + 1, high);\r\n\t\t\tcombine(array, auxillary, low, middle, high);\r\n\t\t}\r\n}"
] | [
"0.6903027",
"0.6717959",
"0.6655416",
"0.65484333",
"0.6504774",
"0.64736646",
"0.6415312",
"0.6338936",
"0.63330144",
"0.63202274",
"0.6319257",
"0.63181657",
"0.63028103",
"0.6298898",
"0.62625927",
"0.62319183",
"0.62115467",
"0.619353",
"0.616535",
"0.6154862",
"0.61439764",
"0.6077812",
"0.6069847",
"0.60479045",
"0.60465443",
"0.6040402",
"0.6038553",
"0.60371876",
"0.60351",
"0.6021318",
"0.6012954",
"0.6002501",
"0.60001767",
"0.5988006",
"0.5985317",
"0.5975536",
"0.5974819",
"0.5962485",
"0.59566516",
"0.59491754",
"0.5946374",
"0.59292585",
"0.5928833",
"0.59152985",
"0.58821505",
"0.58806497",
"0.58737224",
"0.5864836",
"0.58428746",
"0.58258283",
"0.5822695",
"0.5813546",
"0.5807151",
"0.5783311",
"0.57664895",
"0.5762623",
"0.5754821",
"0.5752989",
"0.5751981",
"0.575023",
"0.5748843",
"0.5737594",
"0.5725747",
"0.57240695",
"0.5695728",
"0.5691951",
"0.5684264",
"0.567085",
"0.5667106",
"0.56594795",
"0.5651266",
"0.5642024",
"0.5640381",
"0.5617914",
"0.56102484",
"0.560111",
"0.5598465",
"0.5596863",
"0.55929184",
"0.5590023",
"0.55899644",
"0.5570553",
"0.556328",
"0.55562174",
"0.555211",
"0.55519396",
"0.55511475",
"0.55409354",
"0.55403763",
"0.5534524",
"0.55318147",
"0.5531777",
"0.55103534",
"0.5505141",
"0.5494961",
"0.54859185",
"0.5481274",
"0.54777974",
"0.5477053",
"0.54704356"
] | 0.72128135 | 0 |
Recursive mergesort of an array of integers | public void mergeSort(ArrayList <Comparable> a, int first, int last){
if (last - first == 0) {
steps ++;
}else if (last - first == 1) {
steps += 4;
if (a.get(first).compareTo(a.get(last)) > 0) {
steps += 5;
swap(a, first, last);
}
}else {
steps += 3;
int mid = (last + first)/2;
steps += 4;
mergeSort(a, first, mid);
mergeSort(a, mid + 1, last);
merge(a, first, mid, last);
}
System.out.println();
System.out.println("Merge Sort");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void mergesort(int[] array) {\n\t\t\n\t}",
"public static void mergesort(int[]data){\n if (data.length <= 1)\n return;\n mergesortH(data, 0, data.length - 1);\n \n }",
"private static int[] mergeSort(int numbers[]) {\n\n\t\tif (numbers.length <= 1) {\n\t\t\treturn numbers;\n\t\t}\n\n\t\tint mid = numbers.length / 2;\n\t\tint subArray1[] = new int[mid];\n\t\tint subArray2[] = new int[numbers.length - mid];\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < subArray1.length; i++) {\n\t\t\tsubArray1[i] = numbers[count++];\n\t\t}\n\t\tfor (int i = 0; i < subArray2.length; i++) {\n\t\t\tsubArray2[i] = numbers[count++];\n\t\t}\n\n\t\tsubArray1 = mergeSort(subArray1);\n\t\tsubArray2 = mergeSort(subArray2);\n\t\tnumbers = merge(subArray1, subArray2);\n\n\t\treturn numbers;\n\t}",
"private void mergeSort(int[] array, int start, int end) {\n\t\tif (start < end) {\n\t\t\tint mid = (start + end) / 2;\n\t\t\tmergeSort(array, start, mid);\n\t\t\tmergeSort(array, mid + 1, end);\n\t\t\tmerge(array, start, mid, end);\n\t\t}\n\t}",
"public void mergeSort(int[] array){\n if(array.length <= 1){\r\n return;\r\n }\r\n // divide into 2 arrays\r\n int split = array.length/2;\r\n // create 2 arrays\r\n int[] front = Arrays.copyOfRange(array, 0, split);\r\n int[] back = Arrays.copyOfRange(array, split, array.length);\r\n \r\n // recursively sort\r\n mergeSort(front);\r\n mergeSort(back);\r\n \r\n // put numbers in correct spot\r\n // keeping track of where we are\r\n int fSpot = 0;\r\n int bSpot = 0;\r\n for(int i = 0; i < array.length; i++){\r\n // no more items in front array\r\n if(fSpot == front.length){\r\n // put item from back array in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }else if(bSpot == back.length){\r\n // put item from front array in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else if(front[fSpot] < back[bSpot]){\r\n // put front item in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else{\r\n // put back item in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }\r\n }\r\n }",
"public void mergesort_iterative(){\n\t\tint step = 1;\n\t\tint length = arr.length;\n\t\twhile(step < length){\n\t\t\tint i = 0;\n\t\t\twhile(i<length){\n\t\t\t\tmerge_iterative(i, step);\n\t\t\t\ti += step*2;\n\t\t\t}\n\t\t\tstep <<= 1;\n\t\t}\n\t}",
"static void MergeSort(int[] arr){\n int[] helper = new int[arr.length];\n MergeSort(arr, helper, 0, arr.length-1);\n }",
"public void mergeSort(int[] array) {\n\t\t// Edge cases.\n\t\tif (array == null) return;\n\t\tif (array.length <= 1) return;\n\t\t\n\t\t// Invoke recursive mergeSort.\n\t\tmergeSort(array, 0, array.length - 1);\n\t}",
"public static void mergeSortNonRecursive(int[] input){\n int[] arr;\n Stack<int[]> unsortedStack = new Stack();\n Stack<int[]> sortedStack = new Stack();\n unsortedStack.push(input);\n //while !unsortedStack.isempty, needs to pop int[] from stack , assign to arr, pop status\n //if(arr.length>1), split arr to arr.left and arr.right,push left and right into stack, push false to stack twice\n //else if(arr.length<=1), push arr to sortedStack (while (!unsorted.isempty && peek().length==arr,merge and pushback to stack again)\n //\n\n while(!unsortedStack.empty()) {\n arr = unsortedStack.pop();\n if (arr.length > 1) {\n int begin = 0,end=arr.length,mid=arr.length/2;\n int[] left = Arrays.copyOfRange(arr, begin, mid);\n int[] right = Arrays.copyOfRange(arr, mid, end);\n unsortedStack.push(left);\n unsortedStack.push(right);\n } else {\n while(!sortedStack.isEmpty() && sortedStack.peek().length<=arr.length){\n arr = merge(arr, sortedStack.pop());\n }\n sortedStack.push(arr);\n }\n }\n while(sortedStack.size()>1){\n arr = merge(sortedStack.pop(), sortedStack.pop());\n sortedStack.push(arr);\n }\n int[] tmp = sortedStack.pop();\n for(int i=0;i<input.length;i++){\n input[i]=tmp[i];\n }\n\n }",
"public static void mergeSort(int[] arr) {\r\n if (arr.length - 1 > 0) {\r\n int[] arrLeft = new int[arr.length / 2];\r\n System.arraycopy(arr, 0, arrLeft, 0, arr.length / 2);\r\n int[] arrRight = new int[arr.length - arrLeft.length];\r\n System.arraycopy(arr, arr.length / 2, arrRight, 0, arrRight.length);\r\n mergeSort(arrLeft);\r\n mergeSort(arrRight);\r\n merge(arr, arrLeft, arrRight);\r\n }\r\n }",
"public static int[] mergeSort2(int[] input) {\n\t\tint[] result = input.clone();\n\t\tif (result.length < 2) return result;\n\t\t\n\t\t/* \n\t\t * By iterating over the length of sub-arrays (from 1 to total length), \n\t\t * and then iterating through the sub-arrays at each stage, two nested\n\t\t * loops can be used to replicate the effect of a recursive call without\n\t\t * explicitly recursing\n\t\t */\n\t\tfor (int subArrayLength = 1; subArrayLength < result.length; subArrayLength *= 2) {\n\t\t\t\n\t\t\tfor (int startIndex = 0; startIndex < result.length + subArrayLength; startIndex += 2 * subArrayLength) {\n\t\t\t\tif (startIndex + subArrayLength < result.length) {\n\t\t\t\t\tint rightArrayLength = Math.min(subArrayLength, result.length - (startIndex + subArrayLength)); \n\t\t\t\t\tint[] left = new int[subArrayLength];\n\t\t\t\t\tint[] right = new int[rightArrayLength];\n\t\t\t\t\tSystem.arraycopy(result, startIndex, left, 0, subArrayLength);\n\t\t\t\t\tSystem.arraycopy(result, startIndex + subArrayLength, right, 0, rightArrayLength);\n\t\t\t\t\tint[] mergeResult = merge1(left, right);\n\t\t\t\t\tSystem.arraycopy(mergeResult, 0, result, startIndex, subArrayLength + rightArrayLength);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private static void mergeSort(int[] array, int startIndex, int endIndex) {\n if (startIndex < endIndex) {\n int halfIndex = (int) Math.floor((startIndex + endIndex) / 2);\n mergeSort(array, startIndex, halfIndex);\n mergeSort(array, halfIndex + 1, endIndex);\n mergeLogic(array, startIndex, halfIndex, endIndex);\n }\n }",
"public static int[] mergeSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo < hi) {\n int mid = (lo+hi)/2;\n int[] lft = mergeSort(arr, lo, mid);\n int[] rgt = mergeSort(arr, mid+1, hi);\n int[] res = mergeTwoSortedArrays(lft, rgt);\n return res;\n }\n return new int[]{arr[lo]}; // if(lo==hi)\n}",
"public int[] mergeSort(int in[]) {\n\t\t\n\t\t// Base case\n\t\t\t\tif(in.length == 1) {\n\t\t\t\t\treturn in;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint[] left, right;\n\t\t\t\t\n\t\t\t\tleft = new int[in.length / 2];\n\t\t\t\tSystem.arraycopy(in, 0, left, 0, in.length / 2);\n\t\t\t\t\n\t\t\t\t// Even number of elements\n\t\t\t\tif(in.length % 2 == 0) {\n\t\t\t\t\tright = new int[(in.length / 2)];\n\t\t\t\t\tSystem.arraycopy(in, in.length / 2, right, 0, in.length / 2);\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Odd number of elements\n\t\t\t\telse {\n\t\t\t\t\tright = new int[(in.length / 2) + 1];\n\t\t\t\t\tSystem.arraycopy(in, in.length / 2, right, 0, in.length / 2 + 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tleft = mergeSort(left);\n\t\t\t\tright = mergeSort(right);\n\t\t\t\t\n\t\t\t\treturn merge(left, right);\n\t\t\t\t\n\t}",
"static double[] mergeSortRecursive (double a[]) {\r\n \tif(a==null){\r\n \t\tSystem.out.print(\"Array empty\");\r\n \t\treturn null;\r\n \t}\r\n \tif(a.length>1) {\r\n \t\tint mid=a.length/2;\r\n \t\t//spilt left part\r\n \t\tdouble[] left =new double[mid];\r\n \t\tfor(int i =0 ; i <mid;i++) {\r\n \t\t\tleft[i]=a[i];\r\n \t\t}\r\n \t\t//spilt right part\r\n \t\tdouble[] right =new double[a.length-mid];\r\n \t\tfor(int i=mid; i< a.length;i++) {\r\n \t\t\tright[i-mid]=a[i];\r\n \t\t}\r\n \t\tmergeSortIterative(left);\r\n \t\tmergeSortIterative(right);\r\n \t\tint i=0;\r\n \t\tint j=0;\r\n \t\tint k=0;\r\n \t\t//Merge left and right arrays\r\n \t\twhile(i<left.length && j<right.length) {\r\n \t\t\tif(left[i]<right[j]) {\r\n \t\t\t\ta[k]=left[i];\r\n \t\t\t\ti++;\r\n \t\t\t}else {\r\n \t\t\t\ta[k]=right[j];\r\n \t\t\t\tj++;\r\n \t\t\t}\r\n \t\t\tk++;\r\n \t\t}\r\n \t\t//Collect remaining elements\r\n \t\twhile(i<left.length) {\r\n \t\t\ta[k]=left[i];\r\n \t\t\ti++;\r\n \t\t\tk++;\r\n \t\t}\r\n \t\twhile(j<right.length) {\r\n \t\t\ta[k]=right[j];\r\n \t\t\tj++;\r\n \t\t\tk++;\r\n \t\t}\r\n \t}\r\n\r\n \treturn a;\r\n }",
"public static int[] mergeSortHelper(int num[]) {\n\t\tmergeSort(num, 0, num.length - 1);\n\t\treturn num;\n\t}",
"public static int mergeSort(Integer[] arr, Integer[] aux, int low, int high)\n {\n // Base case\n if (high == low) { // if run size == 1\n return 0;\n }\n\n // find mid point\n int mid = (low + ((high - low) >> 1));\n int inversionCount = 0;\n\n // recursively split runs into two halves until run size == 1,\n // then merge them and return back up the call chain\n\n // split / merge left half\n inversionCount += mergeSort(arr, aux, low, mid);\n\n // split / merge right half\n inversionCount += mergeSort(arr, aux, mid + 1, high);\n\n // merge the two half runs\n inversionCount += merge(arr, aux, low, mid, high);\n\n return inversionCount;\n }",
"public void mergeSort(){\r\n mergeSort(mArray, new int[mArray.length], 0 , mArray.length - 1);\r\n }",
"private static void mergeSort(int[] num, int low, int high) {\n\t\tif ((high - low) >= 1) {\n\n\t\t\t// find the middle index\n\t\t\tint middle = (low + high) / 2;\n\n\t\t\t// make recursive calls to the 'left' and 'right' sides of the sublist\n\t\t\tmergeSort(num, low, middle);\n\t\t\tmergeSort(num, middle + 1, high);\n\n\t\t\t// merge the sublists back together\n\t\t\tmerge(num, low, middle, middle + 1, high);\n\n\t\t}\n\t}",
"static double[] mergeSortIterative (double a[]) {\r\n \tif(a==null){\r\n \t\tSystem.out.print(\"Array: empty\");\r\n \t\treturn null;\r\n \t}\r\n \tint length = (a.length-1);\r\n \tint currentSize; //varies from 1 to n/2\r\n\t\tint leftStart; // pick starting index of left subarray to be merged\r\n\t\tfor(currentSize=1; currentSize <= length; currentSize = (2*currentSize)) { //Merge subarrays in bottom up manner\r\n\t\t\t for(leftStart =0; leftStart < length ; leftStart += (2*currentSize)) { //Pick starting point of differnet subarrays of current size\r\n\t\t\t\t int mid = leftStart + currentSize -1;\r\n\t\t\t\t int rightEnd = Math.min(leftStart+2*currentSize-1, length);\r\n\t\t\t\t merge(a,leftStart,mid,rightEnd);\r\n\t\t\t }\r\n\t\t }\r\n\t\t return a;\r\n }",
"private static void mergeSort(int[] data, int left, int right) {\n\n\t\tint mid;\n\n\t\tif (left < right) {\n\n\t\t\tmid = (left + right) / 2;\n\n\t\t\tmergeSort(data, left, mid);\n\t\t\tmergeSort(data, mid + 1, right);\n\t\t\tmerge(data, left, mid, right);\n\t\t}\n\n\t}",
"private static void recursiveMergesort(\n\t\tint[] ints,\n\t\tint[] copyOfInts,\n\t\tint min,\n\t\tint max\n\t\t) {\n\n\t\tif (min < max - 1) {\n\t\t\tint middleOfArray = (max + min) / 2;\n\t\t\trecursiveMergesort(\n\t\t\t\tints,\n\t\t\t\tcopyOfInts,\n\t\t\t\tmin,\n\t\t\t\tmiddleOfArray\n\t\t\t\t);\n\t\t\trecursiveMergesort(\n\t\t\t\tints,\n\t\t\t\tcopyOfInts,\n\t\t\t\tmiddleOfArray,\n\t\t\t\tmax);\n\t\t\tmergeHalves(\n\t\t\t\tints,\n\t\t\t\tcopyOfInts,\n\t\t\t\tmin,\n\t\t\t\tmiddleOfArray,\n\t\t\t\tmax);\n\t\t}\n\t\t// if min == max - 1, then this range\n\t\t// of ints only contains one int\n\n\t}",
"public static int[] MergeSort(int array[]){\n if(array.length > 1){\n int elementsInA1 = array.length/2;\n int elementsInA2 = elementsInA1;\n if((array.length % 2) == 1)\n elementsInA2 += 1;\n int arr1[] = new int[elementsInA1];\n int arr2[] = new int[elementsInA2];\n for(int i = 0; i < elementsInA1; i++)\n arr1[i] = array[i];\n for(int i = elementsInA1; i < elementsInA1 + elementsInA2; i++)\n arr2[i - elementsInA1] = array[i];\n arr1 = MergeSort(arr1);\n arr2 = MergeSort(arr2);\n int i = 0, j = 0, k = 0;\n while(arr1.length != j && arr2.length != k)\n {\n if(arr1[j] < arr2[k])\n {\n array[i] = arr1[j];\n i++;\n j++;\n }\n else\n {\n array[i] = arr2[k];\n i++;\n k++;\n }\n }\n while(arr1.length != j)\n {\n array[i] = arr1[j];\n i++;\n j++;\n }\n while(arr2.length != k)\n {\n array[i] = arr2[k];\n i++;\n k++;\n }\n }\n return array;\n }",
"public static void mergeSort(int a[]) {\n\t sort(a, 0, a.length-1); \n\t }",
"private int[] mergeSort(int[] nums, int start, int end) {\n if (start == end) {\n return new int[]{nums[start]};\n }\n\n // keep dividing the entire array into sub-arrays\n int mid = (end - start) / 2 + start;\n int[] left = mergeSort(nums, start, mid);\n int[] right = mergeSort(nums, mid + 1, end);\n // return merged array\n return mergeTwoSortedArrays(left, right);\n }",
"private int[] sort(int arr[]) {\r\n\t\tint n = arr.length;\r\n\r\n\t\tif (n == 1) { // base case\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t// divide\r\n\t\tint[] arrL = Arrays.copyOfRange(arr, 0, (n / 2));\r\n\t\tint[] arrR = Arrays.copyOfRange(arr, (n / 2), (n));\r\n\t\t// and conquer\r\n\t\treturn merge(sort(arrL), sort(arrR));\r\n\t}",
"public static void mergeSort(int[] array,int left,int right) {\n if(left<right)\n {\n int middle=(left+right)/2; //9 --> 0,9 -->0-4 5-9|| 8 --> 0-4 5-8\n mergeSort(array,left,middle);\n mergeSort(array,middle+1,right);\n merge(array,left,right,middle);\n }\n }",
"public static void mergeSort(int[] array) {\n int[] tmpArray = new int[array.length];\n mergeSort(array, tmpArray, 0, array.length-1);\n }",
"public static void mergeSort(int[] array, int start, int end) {\n // start = 0\n // end = array.length\n // mid = (start + end) / 2\n\n // Base case: break recursion if there are less than 2 elements in the array - 1 or 0 elements\n if (end - start < 2) {\n return;\n }\n\n // Logical partition of the array\n int mid = (start + end) / 2;\n\n // Recursive calls\n mergeSort(array, start, mid); // mergeSort left partition\n mergeSort(array, mid, end); // mergeSort right partition\n\n // Finally merge the sorted arrays. \n // By the time this method is called, left and right partitions are already handled.\n merge(array, start, mid, end);\n }",
"public static int[] bottomUpMergeSort(int[] num) {\n\n\t\tint[] temp = new int[num.length];\n\n\t\t// repeat merging process while width is smaller than length\n\t\tfor (int width = 2; width <= num.length; width *= 2) {\n\n\t\t\t// System.out.println(\"width = \" + width );\n\n\t\t\t// merge sublists\n\t\t\tfor (int i = 0; i < num.length; i += width)\n\t\t\t\tmergeLists(num, i, width, temp);\n\n\t\t\t// copy temp array back to original array\n\t\t\tfor (int i = 0; i < num.length; i++) {\n\t\t\t\tnum[i] = temp[i];\n\t\t\t\t// System.out.print(num[i] + \" \");\n\t\t\t}\n\n\t\t\t// System.out.println();\n\t\t\t// System.out.println();\n\t\t}\n\n\t\treturn num;\n\n\t}",
"public static double[] mergeSortRecursive (double a[]) {\n if(a.length <= 1) return a;\n double temp [] = new double[a.length];\n mergeSortBottomUp(a, temp, 0, a.length-1);\n return a;\n }",
"public int[] mergeSort(int[] nums) {\n\t\tif(nums.length<=1) return nums;\n\t\t\n\t\tint mid=nums.length/2;\n\t\tint[] numsA=Arrays.copyOfRange(nums,0,mid);\n\t\tint[] numsB=Arrays.copyOfRange(nums,mid,nums.length);\n\t\t\n\t\treturn merge(mergeSort(numsA),mergeSort(numsB));\n\t\t\n\t}",
"public static int[] parallelMergeSort(int[] array, int maxRecursionLevel) {\n\n int length = array.length;\n\n // return if only one element left\n if (length == 1)\n return array;\n\n // divide\n int mid_index = length / 2;\n int[] leftHalf = Arrays.copyOfRange(array, 0, mid_index);\n int[] rightHalf = Arrays.copyOfRange(array, mid_index, length);\n\n // fall back to single threaded merge sort if all threads are currently in use\n if(maxRecursionLevel <= 1) {\n return mergeSort(array);\n }\n\n //\n ExecutorService leftHalfArray = Executors.newSingleThreadExecutor();\n Callable<int[]> leftHalfArrayCallable = () -> parallelMergeSort(leftHalf, maxRecursionLevel - 1);\n\n ExecutorService rightHalfArray = Executors.newSingleThreadExecutor();\n Callable<int[]> rightHalfArrayCallable = () -> parallelMergeSort(rightHalf, maxRecursionLevel - 1);\n\n Future<int[]> leftHalfFuture = leftHalfArray.submit(leftHalfArrayCallable);\n Future<int[]> rightHalfFuture = rightHalfArray.submit(rightHalfArrayCallable);\n\n int[] sortedLeftHalf = null;\n int[] sortedRightHalf = null;\n try {\n sortedLeftHalf = leftHalfFuture.get();\n sortedRightHalf = rightHalfFuture.get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n leftHalfArray.shutdown();\n rightHalfArray.shutdown();\n\n assert sortedLeftHalf != null;\n assert sortedRightHalf != null;\n\n //\n return merge(sortedLeftHalf, sortedRightHalf);\n }",
"public static void mergeSort(int[] array, int size)\n {\n //base case\n if (size < 2)\n return;\n\n //dividing the array from the middle\n int mid = size / 2;\n int[] leftArray = new int[mid];\n int[] rightArray = new int[size - mid];\n for (int i = 0; i < mid; i++)\n {\n leftArray[i] = array[i];\n }\n for (int i = mid; i < size; i++)\n {\n rightArray[i - mid] = array[i];\n }\n //recursion\n mergeSort(leftArray, mid);\n mergeSort(rightArray, size - mid);\n //merging the sorted halves\n merge(array, leftArray, rightArray, mid, size - mid);\n }",
"static void mergeSort(int array[], int start, int end) {\n if (start < end) {\n // Find the middle point\n int middle = start + (end - start)/2;\n\n // Sort first and second parts\n mergeSort(array, start, middle);\n mergeSort(array, middle + 1, end);\n\n // Merge the sorted parts\n merge(array, start, middle, end);\n\n }\n\n }",
"public static void mergeSort(int[] array, int from, int to) {\r\n\t\tif (from < to) {\r\n\t\t\tint middle = (from + to) / 2;\r\n\t\t\tmergeSort(array, from, middle);\r\n\t\t\tmergeSort(array, middle + 1, to);\r\n\t\t\tmerge(array, from, middle, to);\r\n\t\t}\r\n\t}",
"public void mergeSort() {\n this.array = mergeSort(array);\n }",
"private static void merge(int[] arr, int start, int mid, int end) {\n\t\tint length1 = mid - start + 1;\n\t\tint length2 = end - mid;\n\t\tint left[] = new int[length1];\n\t\tint right[] = new int[length2];\n\t\tfor (int index =0; index < length1; index++) {\n\t\t\tleft[index] = arr[start+index];\n\t\t}\n\t\tfor (int index =0; index < length2; index++) {\n\t\t\tright[index] = arr[mid+index+1];\n\t\t}\n\t\tint leftIndex = 0;\n\t\tint rightIndex = 0;\n\t\tint index = start;\n\t\twhile (leftIndex < length1 && rightIndex < length2) {\n\t\t\tif (left [leftIndex] < right[rightIndex]) {\n\t\t\t\tarr[index] = left[leftIndex];\n\t\t\t\tleftIndex ++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarr[index] = right[rightIndex];\n\t\t\t\trightIndex++;\n\t\t\t\tnumberOfInversions += (mid - leftIndex)+1;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\twhile (leftIndex < length1) {\n\t\t\tarr[index] = left[leftIndex];\n\t\t\tleftIndex++;\n\t\t\tindex++;\n\t\t}\n\t\twhile (rightIndex < length2) {\n\t\t\tarr[index] = right[rightIndex];\n\t\t\trightIndex++;\n\t\t\tindex++;\n\t\t}\n\t\t\t\n\t\t\n\t}",
"static void MergeSort(int[] A, int p, int r) {\n\t\tif (p < r) {\n\t\t\tint q = (p + r) / 2;\n\t\t\tMergeSort(A, p, q);\n\t\t\tMergeSort(A, q + 1, r);\n\t\t\tMerge(A, p, q, r);\n\t\t}\n\t}",
"public void mergesort(int[] a, int startI, int endI) {\n\t\t\n\t\t//int si= a.length-1;\n\t\tint [] val = new int[1];\n\t\tint midPoint;\n\t\tlong heapSize = Runtime.getRuntime().totalMemory();\n\t\tlong heapFreeSize = Runtime.getRuntime().freeMemory(); \n\t\t//System.out.println(\"current heap size \"+heapsize);\n\t\tmidPoint = (endI+startI)/2; //midpoint for array\n\t\t\n\t\tif(heapFreeSize<1212015976)\n\t\tSystem.out.println(\"Start: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint+\" current heap size \"+heapSize+\" current free heap \"+heapFreeSize);\n\t\tif (endI-startI < 1) {\n\t\t\tval[0]=a[startI];\n\t\t\t//System.out.println(\"returning \"+val[0]);\n\t\t\treturn ;\n\t\t}\n\t\t/*try\n\t\t{\n\t\t Thread.sleep(3000);\n\t\t}\n\t\tcatch(InterruptedException ex)\n\t\t{\n\t\t Thread.currentThread().interrupt();\n\t\t}*/\n\t\n\t\tmergesort(a, startI, midPoint); //split left\n\t\t\n\t\t\n\t\t//System.out.println(\"Start 2: \"+startI+\" End: \"+endI+\" Mid: \"+midPoint);\n\t\tmergesort(a, midPoint+1, endI);\t\t//split right\n\t\ttemp=mergeSortedArrays(a, startI, midPoint, midPoint+1, endI); //by defining positions in array, we are taking out array slices\n\t\t/*for (int i=0;i<temp.length;i++) {\n\t\t\ta[i]=temp[i];\n\t\t}*/\n\t\t/*System.out.println(\"Printing Temp=>\");\n\t\t\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\tSystem.out.print(temp[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"\\n Printing A=>\");\n\t\t\n\t\tfor (int i=startI;i<endI;i++) {\n\t\t\tSystem.out.print(a[i]+\", \");\n\t\t}\n\t\tSystem.out.println(\"==>\");\n\t\treturn a;*/\n\t\t\n\t\t//System.out.println(\"==>\");\n\t\tint fill = startI;\n\t\tfor (int i=0;i<temp.length;i++) {\n\t\t\ta[fill]=temp[i];\n\t\t\tfill++;\n\t\t}\n\t\treturn ;\n\t}",
"private static void norecursion_mergesort(String[] arr) {\r\n\t\tint n = arr.length, k = 2;\r\n\t\twhile (k <= n) {\r\n\t\t\tfor (int i = 0;i < n;i++) {\r\n\t\t\t\tif ((i+1) % k == 0) {\r\n\t\t\t\t\tmerge(arr, i+1-k, i+1-k/2, i+1);\r\n\t\t\t\t\tif (n-(i+1) < k) {\r\n\t\t\t\t\t\tmerge(arr, (i+1)-k, i+1, n);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tk *= 2;\r\n\t\t}\r\n\t}",
"public static void mergeSort(int[] elts) {\r\n\t\tint size = elts.length;\r\n\t\tif (size == 2) {\r\n\t\t\tif (elts[0] > elts[1])\r\n\t\t\t\tIntArraySortUtils.swap(elts, 0, 1);\r\n\t\t}\r\n\t\telse if (size > 2) {\r\n\t\t\tPair<int[], int[]> split = splitArray(elts);\r\n\t\t\tint[] left = split.first;\r\n\t\t\tint[] right = split.second;\r\n\t\t\tmergeSort(left);\r\n\t\t\tmergeSort(right);\r\n\t\t\tIntArraySortUtils.merge(elts, left, right);\r\n\t\t}\r\n\r\n\t}",
"public static int[] mergeSort(int[] elements, int start, int end) {\n\t\tif (start == end)\n\t\t\treturn elements;\n\t\t\n\t\tint middle = (end + start) / 2;\n\t\tmergeSort(elements, start, middle);\n\t\tmergeSort(elements, middle + 1, end);\n\t\tmerge(elements, start, middle, end);\n\t\t\n\t\treturn elements;\n\t}",
"public static void enhancedMergeSort(int[] array, int size)\n {\n //base case\n if (size < 2)\n return;\n\n //sub arrays are sorted using insertion sort as\n //Mergesort has too much overhead for tiny subarrays.\n\n if ((size-1) < CUTOFF)\n {\n insertSort(array);\n return;\n }\n\n //dividing the array from the middle\n int mid = size / 2;\n int[] leftArray = new int[mid];\n int[] rightArray = new int[size - mid];\n for (int i = 0; i < mid; i++)\n {\n leftArray[i] = array[i];\n }\n for (int i = mid; i < size; i++)\n {\n rightArray[i - mid] = array[i];\n }\n //recursion\n mergeSort(leftArray, mid);\n mergeSort(rightArray, size - mid);\n\n // if the last element of left half is lesser or equal than first element of second half of the array\n // merge() call is skipped as it is not required.\n if ((array[mid] <= array[mid+1]))\n return;\n\n //merging the sorted halves\n merge(array, leftArray, rightArray, mid, size - mid);\n }",
"static void mergeSort(int[] arr, int l, int r) {\n\t\tif (l<r) {\n\t\t\tint m = (l+r)/2;\n\n\t\t\tmergeSort(arr, l, m);\n\t\t\tmergeSort(arr, m+1, r);\n\t\t\tmerge(arr, l, r, m);\n\t\t}\n\t}",
"void mergeSort(int[] arr, int l, int r) {\r\n if (l<r)\r\n {\r\n int m = (l+r)/2;\r\n\r\n mergeSort(arr,l,m);\r\n mergeSort(arr, m+1, r);\r\n merge(arr, l, m, r);\r\n }\r\n }",
"@Test\n public void sortArrayMergeSortTest() {\n int[] array1 = new int[]{5, 2, 3, 1};\n int[] expectedArray1 = new int[]{1, 2, 3, 5};\n int[] actualArray1 = sortArrayMergeSort(array1);\n assertArrayEquals(expectedArray1, actualArray1);\n /**\n * Example 2:\n * Input: nums = [5,1,1,2,0,0]\n * Output: [0,0,1,1,2,5]\n */\n int[] array2 = new int[]{5, 1, 1, 2, 0, 0};\n int[] expectedArray2 = new int[]{0, 0, 1, 1, 2, 5};\n int[] actualArray2 = sortArrayMergeSort(array2);\n assertArrayEquals(expectedArray2, actualArray2);\n }",
"private static void mergeSortInternally(int[] a, int low, int high) {\n\n if (low >= high) {\n return;\n }\n int mid = low + (high - low) / 2;\n mergeSortInternally(a, low, mid);\n mergeSortInternally(a, mid + 1, high);\n System.out.println(\"low:\" + low + \", mid:\" + mid + \", high:\" + high);\n merge(a, low, mid, high);\n }",
"private void merge() {\n for (int i = low; i<high; i++){\n temparray[i]=nums[i];\n }\n\n int i = low;\n int j = middle;\n //index of the original array for which we are making compare\n int index = low;\n //copy the smallest from the left and right partition to temp\n while ((i<middle)&&(j<high)){\n if(temparray[i]<=temparray[j]){\n nums[index]=temparray[i];\n i++;\n }\n else {\n nums[index]=temparray[j];\n j++;\n }\n index++;\n }\n // copy the rest of the the left side\n while (i<middle){\n nums[index]= temparray[i];\n i++;\n index++;\n }\n //and the right\n while (j<high){\n nums[index]=temparray[j];\n j++;\n index++;\n }\n\n }",
"@Override\n public int[] sort(int[] array) {\n return mergeSort(array);\n }",
"private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high )\r\n\t{\r\n\t\t// base case\r\n\t\tif ((high - low) <= switchValue)\r\n\t\t{\r\n\t\t\tSort_Utils.insertion_sort(array, low, high);\r\n\t\t}\r\n\t\t\r\n\t\tif (low < high)\r\n\t\t{\r\n\t\t\tint middle = low + (high - low)/2;\r\n\t\t\t\r\n\t\t\t// recursively sort the two halves of the array\r\n\t\t\tmerge_sort(array, auxillary, low, middle);\r\n\t\t\tmerge_sort(array, auxillary, middle + 1, high);\r\n\t\t\tcombine(array, auxillary, low, middle, high);\r\n\t\t}\r\n}",
"private int[] merge(int[] left, int[] right) {\r\n\t\tint[] merged = new int[(left.length + right.length)];\r\n\r\n\t\t// l -> arrL index and r -> arrR index\r\n\t\tint l = 0, r = 0;\r\n\t\tfor (int i = 0; i < merged.length; i++) {\r\n\r\n\t\t\tif (l >= left.length) {\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t} \r\n\t\t\telse if (r >= right.length) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] >= right[r]) {\r\n\t\t\t\t// The total inversions will always be left.length - l\r\n\t\t\t\tcounter += (left.length - l);\r\n\t\t\t\tmerged[i] = right[r++];\r\n\t\t\t}\r\n\t\t\telse if (left[l] < right[r]) {\r\n\t\t\t\tmerged[i] = left[l++];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn merged;\r\n\t}",
"public static void sort(int[] arr) {\n // Base Case\n if (arr.length == 1) return;\n\n // Splitting the array\n int midpoint = arr.length / 2;\n int[] left_arr = Arrays.copyOfRange(arr, 0, midpoint);\n int[] right_arr = Arrays.copyOfRange(arr, midpoint, arr.length);\n\n // Sorting the subarrays \n sort(left_arr);\n sort(right_arr);\n\n // Combining the subarrays\n int left_pointer = 0;\n int right_pointer = 0;\n /** \n * Check which array has smaller value then \n * assign it to sorted array\n */ \n while (left_pointer + right_pointer < arr.length) {\n // Left array has been traversed\n if (left_pointer >= left_arr.length) {\n arr[left_pointer + right_pointer] \n = right_arr[right_pointer];\n right_pointer++;\n }\n // Right array has been traversed\n else if (right_pointer >= right_arr.length) {\n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Both arrays still have values.\n else {\n // Left array has smaller or equal value\n if (left_arr[left_pointer] <= right_arr[right_pointer]) { \n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Right array has smaller value\n else {\n arr[left_pointer + right_pointer]\n = right_arr[right_pointer];\n right_pointer++;\n }\n }\n }\n // Array is sorted. Replace given array.\n }",
"public static void sort(int[] arr){\n\t\tif(arr == null){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint len = arr.length;\n\t\tif(len < 2){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint mid = len/2;\n\t\t\n\t\tint[] leftarr = new int[mid];\n\t\tint[] rightarr = new int[len-mid];\n\t\t\n\t\tfor(int i=0; i<mid; i++){\n\t\t\tleftarr[i] = arr[i];\n\t\t}\n\t\tfor(int j=mid; j<len; j++){\n\t\t\trightarr[j-mid] = arr[j];\n\t\t}\n\t\t\n\t\tsort(leftarr);\n\t\tsort(rightarr);\n\t\t\n\t\tmerge(leftarr, rightarr, arr);\n\t}",
"private void merge(int[] array, int start, int mid, int end) {\n\t\t\n\t\t// Instantiate and populate subarrays.\n\t\tint leftSize = mid - start + 1;\n\t\tint rightSize = end - mid;\n\t\tint[] leftSubarray = new int[leftSize + 1];\n\t\tint[] rightSubarray = new int[rightSize + 1];\n\t\t\n\t\tfor (int i = 0; i < leftSize; i++) {\n\t\t\tleftSubarray[i] = array[start + i];\n\t\t}\n\t\tfor (int i = 0; i < rightSize; i++) {\n\t\t\trightSubarray[i] = array[mid + i + 1];\n\t\t}\n\t\t\n\t\t// \"Sentinel\" values = approximate infinity.\n\t\tleftSubarray[leftSize] = Integer.MAX_VALUE;\n\t\trightSubarray[rightSize] = Integer.MAX_VALUE;\n\n\t\t// Merge subarrays.\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (int k = start; k <= end; k++) {\n\t\t\tif (leftSubarray[i] < rightSubarray[j]) {\n\t\t\t\tarray[k] = leftSubarray[i];\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray[k] = rightSubarray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t}",
"public T[] mergeSort(T[] array) {\n if (array.length == 1) {\n return array;\n }\n if (array.length == 2) {\n Comparable first = (Comparable) array[0];\n if (((Comparable) array[0]).compareTo(array[1]) > 0) {\n array[0] = array[1];\n array[1] = (T) first;\n }\n return array;\n }\n int mid = array.length / 2;\n T[] first = (T[]) new Object[mid];\n T[] second = (T[]) new Object[array.length - mid];\n for (int i = 0; i < mid; i++) {\n first[i] = array[i];\n }\n for (int i = mid; i < array.length; i++) {\n second[i - mid] = array[i];\n }\n first = mergeSort(first);\n second = mergeSort(second);\n int j = 0;\n int k = 0;\n int i = 0;\n while ((first.length != j) && (second.length != k)) {\n if (((Comparable) first[j]).compareTo(second[k]) < 0) {\n array[i] = first[j];\n j++;\n i++;\n } else {\n array[i] = second[k];\n k++;\n i++;\n }\n }\n if (first.length == j) {\n for (; i < array.length; i++) {\n array[i] = second[k];\n k++;\n }\n } else {\n for (; i < array.length; i++) {\n array[i] = first[j];\n j++;\n }\n }\n return array;\n }",
"public FindInversionsAndMergeSort() {\n\t\tthis.intArr = null;\n\t}",
"public static void sort(int[] a) {\n\tif (a.length <= 1) { return; }\n\n\t// Makes two new arrays that are half the length of the initial array\n\tint[] first = new int[a.length / 2];\n\tint[] second = new int[a.length - first.length];\n\n\t//Splits intial array into the two new arrays (first half and second half)\n\tfor (int i = 0; i < first.length; i++) \n\t\tfirst[i] = a[i];\n\tfor (int i = 0; i < second.length; i++)\n\t\tsecond[i] = a[first.length + i];\n\n //loops the method to make the arrays as small as possible (1) then merges the two new arrays\n\tsort(first);\n\tsort(second);\n\tmerge(first, second, a);\n}",
"private static void mergeAsc(int arr[], int start, int mid, int end) {\n\r\n\t\tint subArrLen1 = mid - start + 1;\r\n\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t// create the sub Arrays as temporary storage\r\n\t\tint subArray1[] = new int[subArrLen1];\r\n\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t// copy data in temporary arrays\r\n\r\n\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t}\r\n\r\n\t\t// merging the temporary arrays\r\n\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = start;\r\n\r\n\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\tif (subArray1[i] <= subArray2[j]) {\r\n\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (i < subArrLen1) {\r\n\t\t\tarr[k] = subArray1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (j < subArrLen2) {\r\n\t\t\tarr[k] = subArray2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t}",
"public static void merge(int[] array, int start, int mid, int end) {\n if (array[mid - 1] <= array[mid]) {\n return;\n }\n\n // Index variables\n int i = start;\n int j = mid;\n int tempIndex = 0;\n\n // Create a temp array large enough to hold all elements in the left and right partitions\n int[] temp = new int[end - start];\n\n // While there are elements left in any of the left and right partitions...\n while (i < mid && j < end) {\n /* \n temp[tempIndex++] = array[i] <= array[j] ? array[i++] : array[j++];\n */\n // If the left element is smaller than or equal to the right...\n if (array[i] <= array[j]) {\n // Assign the left element to the temp array, and increment tempIndex and i\n temp[tempIndex++] = array[i++];\n } else {\n // Else assign the right element to the temp array, and increment tempIndex and j\n temp[tempIndex++] = array[j++];\n }\n }\n\n // At this point, either left or right partition will now be empty. \n // Then we simply merge the rest from another partition into temp array \n // as elements left are all larger than the largest elements in the temp array.\n /*\n System.arraycopy(src, srcPos, dest, destPos, length)\n src => source array\n srcPos => source index\n dest => destination array\n destPos => destination index\n */\n\n // Start at unhandled index of the left partition and copy over the rest of the elements\n // to the end of the array from index we've copied over to temp array so far.\n // If there are left over elements in the right partitions, they're already in the end of the array.\n // In the next step, we will be copying over the sorted and merged array from temp array \n // back to the original array, so the the beginning of the array is now sorted in the original array.\n System.arraycopy(array, i, array, start + tempIndex, mid - i);\n\n // Copy the elements in the temp array back into the original array\n System.arraycopy(temp, 0, array, start, tempIndex);\n }",
"static void mergeSortInner(int[] array, int low, int high, int[] extra) {\n if (low == high - 1) {\r\n return;\r\n }\r\n if (low >= high) {\r\n return;\r\n }\r\n // 1. 平均切分\r\n int mid = low + (high - low) / 2;\r\n // [low, mid) + [mid, high)\r\n // 2. 分治算法处理所有两个小区间\r\n mergeSortInner(array, low, mid, extra);\r\n mergeSortInner(array, mid, high, extra);\r\n\r\n // 左右两个小区间已经有序了\r\n merge(array, low, mid, high, extra);\r\n }",
"public static int merge(Integer[] arr, Integer[] aux, int low, int mid, int high)\n {\n int k = low, i = low, j = mid + 1;\n int inversionCount = 0;\n\n // While there are elements in the left and right runs\n while (i <= mid && j <= high)\n {\n if (arr[i] <= arr[j]) {\n aux[k++] = arr[i++];\n }\n else {\n aux[k++] = arr[j++];\n inversionCount += (mid - i + 1); // NOTE\n }\n }\n\n // Copy remaining elements\n while (i <= mid)\n aux[k++] = arr[i++];\n\n // Don't need to copy second half\n\n // copy back to the original array to reflect sorted order\n for (i = low; i <= high; i++) {\n arr[i] = aux[i];\n }\n\n return inversionCount;\n }",
"public static void Mergesort(int[]data,int[]storageA,int[]storageB){\n int length=data.length;\n while (length>8){\n for(int i=0;i<data.length/2;i++){\n storageA[i]=data[i];\n }\n int index=0;\n for(int i=data.length/2;i<data.length;i++){\n storageB[index]=data[i];\n index++;\n }\n int[]temp1=new int[storageA.length/2];\n int[]temp2=new int[storageA.length-temp1.length];\n int[]temp3=new int[storageB.length/2];\n int[]temp4=new int[storageB.length-temp3.length];\n Mergesort(storageA,temp1,temp2);\n Mergesort(storageB,temp3,temp4);\n\n merge(data,storageA,storageB);\n // System.out.println(Arrays.toString(data));\n length=8;\n }\n insertion(data);\n\n // System.out.println(Arrays.toString(storageA));\n //System.out.println(Arrays.toString(storageB));\n //data=merge(storageA,storageB,0,1);\n }",
"public static IntList mergeSort(IntList input) {\n\t\tif (input.length() <= 1)\n\t\t\treturn input;\n\t\tIntList part1 = new SimpleIntList();\n\t\tIntList part2 = new SimpleIntList();\n\t\tdivide(input,part1,part2);\n\t\tpart1 = mergeSort(part1);\n\t\tpart2 = mergeSort(part2);\n\t\treturn merge(part1,part2);\n\t}",
"static int[] Sort(int array[])\n\t{\n\t\t//Check to see if there is one or more numbers in the array.\n\t\tif(array.length > 1)\n\t\t//If there is more than one number, begin the process of splitting the array in half.\n\t\t{\n\t\t\tint sparray1 = array.length/2;\n\t\t\tint sparray2 = sparray1;\n\t\t\t\tif((array.length % 2) == 1)\n\t\t\t\t\tsparray2 += 1;\n\t\t//Initialize the new split sub-arrays and copy for sorting.\n\t\t\tint split1[] = new int[sparray1];\n\t\t\tint split2[] = new int[sparray2];\n\t\t\tfor(int i = 0; i < sparray1; i++)\n\t\t\t\tsplit1[i] = array[i];\n\t\t\tfor(int i = sparray1; i < sparray1 + sparray2; i++)\n\t\t\t\tsplit2[i - sparray1] = array[i];\n\t\t//Send sub-arrays back through the methods to be sorted.\n\t\t\tsplit1 = Sort(split1);\n\t\t\tsplit2 = Sort(split2);\n\t\t//Compare the numbers in the sub-arrays and sort them from small to large.\n\t\t\tint i = 0, j = 0, k = 0;\n\t\t\twhile(split1.length != j && split2.length != k)\n\t\t\t{\n\t\t\t\tif(split1[j] < split2[k])\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split1[j];\n\t\t\t\t\ti++;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tarray[i] = split2[k];\n\t\t\t\t\ti++;\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t//Recombine the sorted sub-arrays and return the completed sorted array. \n\t\t\twhile(split1.length != j)\n\t\t\t{\n\t\t\t\tarray[i] = split1[j];\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\twhile(split2.length != k)\n\t\t\t{\n\t\t\t\tarray[i] = split2[k];\n\t\t\t\ti++;\n\t\t\t\tk++;\n\t\t\t}\n\t\t}\n\t\treturn array;\n\t}",
"public static int[] sort( int[] arr ) \n {\n\tif (arr.length <= 1){\n\t return arr;\n\t}\n\n\t int m = arr.length;\n\t int[] a = new int[arr.length/2];\n\t int[] b = new int [arr.length-a.length];\t \n\t for (int i = 0; i < a.length; i++) a[i] = arr[i];\n\t for (int i = 0; i < b.length; i++) b[i] = arr[i+m/2];\n\n\t return merge(sort(a),sort(b));\t\n\n }",
"public static void mergeSort(int start, int end, int[] numbers) {\n int mid = (start + end) / 2;\n\n if (start < end) {\n // sort left half\n mergeSort(start, mid, numbers);\n\n // sort right half\n mergeSort(mid + 1, end, numbers);\n\n // merge\n merge(start, mid, end, numbers);\n }\n }",
"public static void sort(Comparable[] a)\n {\n // Do lg N passes of pairwise merges.\n int N = a.length;\n aux = new Comparable[N];\n for (int sz = 1; sz < N; sz = sz+sz) // sz: subarray size\n for (int lo = 0; lo < N - sz; lo += sz + sz) // lo: subarray index\n merge(a, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, N - 1));\n }",
"private static <T extends Comparable<T>> void mergeSort(T[] arrayToSort, int startIndex, int endIndex) {\n if(startIndex + 1 < endIndex) {\n int centerIndex = (endIndex + startIndex)/2;\n mergeSort(arrayToSort, startIndex, centerIndex); // sort left half\n mergeSort(arrayToSort, centerIndex, endIndex); // sort right half\n merge(arrayToSort, startIndex, centerIndex, endIndex); // merge two, sorted halves\n }\n }",
"@Test(timeout = SHORT_TIMEOUT)\n public void testTinyMergeSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }",
"public static void merge(int []a , int low,int mid,int high) {\n int [] helper = new int[a.length] ; \n for (int i = low; i<=high; i++) {\n helper[i] = a[i]; \n }\n\n int i = low;\n int j = mid + 1;\n int k = low;\n\n // combine the low part of a and its high part \n while (i<=mid && j<=high) {\n if (helper[i] >= helper[j]){\n a[k] = helper[i];\n i++;\n } else {\n a[k] = helper[j];\n j++;\n }\n k++;\n }\n\n // copy the rest of low part of a if there is any\n while (i<=mid) {\n a[k] = helper[i];\n i++; k++;\n }\n\n\n // copy the rest of the high part of a if there is any\n while (j<=high) {\n a[k] = helper[j];\n j++;k++;\n }\n\n // out put each time we sort and let you watch the change sequence\n for (int Item:a) {\n System.out.print(Item+\" \");\n }\n System.out.println();\n\n }",
"private void mergeSort(int low, int high) {\n\t\tif (low < high) {\n\t\t\tint middle = low + (high - low) / 2;\n\t\t\tmergeSort(low, middle);\n\t\t\tmergeSort(middle + 1, high);\n\t\t\tmergeParts(low, middle, high);\n\t\t}\n\t}",
"public int[] sort(int arr[]) {\n int length = arr.length;\n if (length <= 1) {\n return arr;\n }\n int mid = Math.floorDiv(length, 2);\n int[] leftArray = Arrays.copyOfRange(arr, 0, mid);\n int[] rightArray = Arrays.copyOfRange(arr, mid, length);\n return merge(sort(leftArray), sort(rightArray));\n }",
"void mergeSort(int arr[], int l, int r) \n { \n if (l < r) \n { \n // Find the middle point \n int m = (l+r)/2; \n \n // Sort first and second halves \n mergeSort(arr, l, m); \n mergeSort(arr , m+1, r); \n \n // Merge the sorted halves \n sort(arr, l, m, r); \n } \n\t}",
"public static int[] sort( int[] arr ) \n {\n\tif (arr.length == 1){\n\t return arr;\n\t}\n\telse{\n\t int[] part1 = new int[arr.length/2];\n\t for (int x= 0; x < part1.length; x++){\n\t\tpart1[x] = arr[x];\n\t }\n\t int[] part2 = new int[(arr.length)-part1.length];\n\t int counter = 0;\n\t for (int y = part1.length; y<arr.length; y++){\n\t\tpart2[counter] = arr[y];\n\t\tcounter++;\n\t }\n\t printArray(part1);\n\t System.out.print(\" \");\n\t printArray(part2);\n\t System.out.println();\n\t part1 = sort(part1);\n\t part2 = sort(part2);\n\t return merge(part1,part2);\n\t}\n }",
"private static void mergeSort(int[] attr, int low, int hight) {\n\t\t\n\t}",
"public void merge(paintIntegers[] arr, int lidx, int midx, int ridx){\n int leftn = midx - lidx + 1;\n int rightn = ridx - midx;\n\n //instantiating the left and right arrays\n int Left[] = new int [leftn];\n int Right[] = new int [rightn];\n\n //copies the data from original to the left and right\n for (int i=0; i < leftn; ++i) {\n Left[i] = arr[lidx + i].val;\n }\n for (int j=0; j < rightn; ++j) {\n Right[j] = arr[midx + 1 + j].val;\n }\n\n //merges the two arrays and updates the original array\n //initializes leftIndex and rightIndex to iterate over the left and right arrays\n //if it is added to the original array, then where it came from, it would increment\n int leftIndex = 0;\n int rightIndex = 0;\n int k = lidx; //to properly align where the elements to go, left\n //System.out.println(k);\n //while it hasnt gone through all the elements in the left and right array\n //between the two arrays check which one is lowest, and then updates original array\n while (leftIndex < leftn && rightIndex < rightn)\n {\n if (Left[leftIndex] <= Right[rightIndex])\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n }\n else\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n }\n k++;\n }\n //if there are some left on the left array then just adds to original array\n //possible because all the elements in right array have been added\n //all thats left is the sorted elements from the left array\n while (leftIndex < leftn)\n {\n arr[k].val = Left[leftIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n leftIndex++;\n k++;\n }\n //same explanation as above but with the right array\n while (rightIndex < rightn)\n {\n arr[k].val = Right[rightIndex];\n sorting.add(paintIntegers.deepCopy(arr));//adds current array to list\n rightIndex++;\n k++;\n }\n }",
"public static void mergeSort3WayRec(Integer[] gArray, int low, int high, Integer[] destArray) {\n//Si el array tiene tamaño 1 no haga nada \n\t\tif (high - low < 2) {\n\t\t\treturn;\n\t\t}\n// Separando el array en tres partes \n\t\tint mid1 = low + ((high - low) / 3);\n\t\tint mid2 = low + 2 * ((high - low) / 3) + 1;\n// Ordenando las tres partes recursivamente \n\t\tmergeSort3WayRec(destArray, low, mid1, gArray);\n\t\tmergeSort3WayRec(destArray, mid1, mid2, gArray);\n\t\tmergeSort3WayRec(destArray, mid2, high, gArray);\n// Uniendo las tres partes\n\t\tmerge(destArray, low, mid1, mid2, high, gArray);\n\t}",
"private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }",
"private void merge(Comparable[] array, Comparable[] aux, int low, int high) {\n if (low >= high) return;\n\n int mid = (low + high) / 2;\n // Copy to aux\n for (int i = low; i <= high; i++) {\n aux[i] = array[i];\n }\n\n int i = low;\n int j = mid + 1;\n\n for (int k = low; k <= high; k++) {\n if (i > mid) array[k] = aux[j++];\n else if (j > high) array[k] = aux[i++];\n else if (aux[i].compareTo(aux[j]) <= 0) array[k] = aux[i++]; // <= makes it stable!!\n else array[k] = aux[j++];\n }\n }",
"public static int[] sort( int[] arr )\n {\n int m = arr.length / 2; //find the half way point \n if (arr.length == 1) { //base case: when the array has one number\n\t return arr; }\n else \n\t int[] firstH = new int[m]; //array holding the first half\n\t int[] secondH = new int[m]; //array holding the second half\n\t for (int i = 0; i < firstH.length; i++) { //fills both arrays up with the respective halves\n\t firstH[i] = arr[i];\n\t secondH[i] = arr[arr.length - 1 - i];\n\t }\n\t return merge(sort(firstH),sort(secondH)); //recursive that calls sort again on both halves, halfing them further until they reach the base case and merge will kick in, merging them together until you reach the top again and merge the original 2 halves \n }",
"private static int[] mergeSortedArray(int[] a, int[] b){\n int i = a.length -1;\n for(int j = 3, k = 3, x=0; ( (j >= 0) && (k >= 0)) ; x++){\n\n if(a[j] > b[k]){\n a[i] = a[j];\n a[j] = 0;\n --j;\n --i;\n\n } else{\n a[i] = b[k];\n --k;\n --i;\n }\n\n if(j == -1 ) // this condition worked\n j = 0;\n }\n\n return a;\n\n }",
"private void merge_sort( ArrayList<Type> array, ArrayList<Type> auxillary, int low, int high ){\n\t\tif((high-low)>switchOff){\n\t\t\tint middle=low+((high-low)/2);\n\t\t\tmerge_sort(array,auxillary,low,middle);\n\t\t\tmerge_sort(array,auxillary,middle+1,high);\n\t\t\tcombine(array,auxillary,low,middle,high);\n\t\t}else{\n\t\t\tSort_Utils.insertion_sort(array, low, high);\n\t\t}\n\t}",
"private <T> List<Object> mergeSort(List<T> array, Comparator<? super T> comparator) {\n\t\tif (array.size() <= 1) {\n\t\t\treturn Arrays.<Object> asList(Long.valueOf(0), new LinkedList<T>(array));\n\t\t}\n\n\t\tint median = array.size() >>> 1;\n\t\tLinkedList<T> left = new LinkedList<T>(array.subList(0, median));\n\t\tLinkedList<T> right = new LinkedList<T>(array.subList(median, array.size()));\n\t\tList<Object> leftWithIntersections = mergeSort(left, comparator);\n\t\tList<Object> rightWithIntersections = mergeSort(right, comparator);\n\t\tList<Object> merged = merge((Deque<T>)leftWithIntersections.get(1), (Deque<T>)rightWithIntersections.get(1), comparator);\n\t\tlong intesections = (Long) leftWithIntersections.get(0) + (Long) rightWithIntersections.get(0) + (Long) merged.get(0);\n\t\tmerged.set(0, Long.valueOf(intesections));\n\t\treturn merged;\n\t}",
"public abstract void sort(int[] array);",
"private void mergeSortHelper(Object arr[], int l, int r) \n\t{ \n\t\tif (l < r) \n\t\t{ \n\t\t\t// Find the middle point \n\t\t\tint m = (l+r)/2; \n\n\t\t\t// Sort first and second halves \n\t\t\tmergeSortHelper(arr, l, m); \n\t\t\tmergeSortHelper(arr , m+1, r); \n\n\t\t\t// Merge the sorted halves \n\t\t\tmerge(arr, l, m, r); \n\t\t} \n\t}",
"static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}",
"public void merge(int[] inputArray, int start, int mid, int end) {\n int s1 = mid - start + 1;\n int s2 = end - mid;\n\n //Create a left and right array\n int L[] = new int [s1];\n int R[] = new int [s2];\n\n //Copy elements into two separate arrays\n for (int i=0; i<s1; ++i)\n L[i] = inputArray[start + i];\n for (int j=0; j<s2; ++j)\n R[j] = inputArray[mid + 1+ j];\n\n\n int i = 0, j = 0;\n int k = start;\n\n //Start your comparision\n while (i < s1 && j < s2)\n {\n if (L[i] <= R[j])\n {\n inputArray[k] = L[i];\n i++;\n }\n else\n {\n inputArray[k] = R[j];\n j++;\n }\n k++;\n }\n\n //Copy the remaining elements\n while (i < s1)\n {\n inputArray[k] = L[i];\n i++;\n k++;\n }\n while (j < s2)\n {\n inputArray[k] = R[j];\n j++;\n k++;\n }\n }",
"private int merge(Comparable[] a, Comparable[] aux, int lo, int mid, int hi) {\n for (int k = lo; k <= hi; k++) {\n aux[k] = a[k];\n }\n\n int k = lo;\n int i = lo;\n int j = mid + 1;\n int count = 0;\n\n while (k < hi) {\n if (i > mid) a[k++] = aux[j++];\n else if (j > hi) a[k++] = aux[i++];\n else if (less(aux[j], aux[i])) {\n count += mid + 1 - i;\n a[k++] = aux[j++];\n }\n else a[k++] = aux[i++];\n }\n return count;\n }",
"void merge(int []arr,int low, int mid, int high){\n int n1 = mid-low+1;\n int n2 = high-mid; //high - (mid+1)+1\n\n //create temp arrays\n int temp1[] = new int[n1];\n int temp2[] = new int[n2];\n\n //copy data to temp arrays\n for(int i=0;i<n1;i++){\n temp1[i] = arr[low+i];\n }\n for(int i=0;i<n2;i++){\n temp2[i] = arr[mid+1+i];\n }\n\n //Merge the temp arrays\n int i=0, j=0,k=low;\n while(i<n1 && j <n2){\n if(temp1[i]<temp2[j]){\n arr[k++] = temp1[i++];\n }else{\n arr[k++] = temp2[j++];\n }\n }\n\n //copy remaining elements\n while(i<n1){\n arr[k++]= temp1[i++];\n }\n while(j<n2){\n arr[k++] = temp2[j++];\n }\n }",
"public static Integer[] mergeSort(int[] left, int[] right, int k) {\n Integer[] output;\n if (k <= left.length + right.length) {\n output = new Integer[k];\n } else {\n output = new Integer[left.length + right.length];\n k = left.length + right.length;\n }\n int leftIdx = 0;\n int rightIdx = 0;\n int outputIdx = 0;\n while (k > 0) {\n if (leftIdx >= left.length) {\n leftIdx = -1;\n }\n if (rightIdx >= right.length) {\n rightIdx = -1;\n }\n if (leftIdx != -1 && rightIdx != -1) {\n int leftVal = left[leftIdx];\n int rightVal = right[rightIdx];\n if (left[leftIdx] == right[rightIdx]) {\n if (k >= 2) {\n output[outputIdx++] = leftVal;\n output[outputIdx++] = rightVal;\n leftIdx++;\n rightIdx++;\n k -= 2;\n } else {\n output[outputIdx++] = leftVal;\n leftIdx++;\n k--;\n }\n } else if (leftVal < rightVal) {\n output[outputIdx++] = leftVal;\n leftIdx++;\n k--;\n } else {\n output[outputIdx++] = rightVal;\n rightIdx++;\n k--;\n }\n } else if (leftIdx != -1) {\n output[outputIdx++] = left[leftIdx++];\n k--;\n } else if (rightIdx != -1) {\n output[outputIdx++] = right[rightIdx++];\n k--;\n }\n }\n return output;\n }",
"private static void sort(int[] arr, int i, int j) {\n\t\tif (j > i) {\n\t\t\tint mid = (j + i)/2;\n\t\t\tsort(arr, i, mid);\n\t\t\tsort(arr, mid+1, j);\t\t\t\n\t\t\tmerge(arr, i, mid, j);\n\t\t}\n\t\t\n\t}",
"private void mergesort(ToCompare[] a, int l, int r) throws BrokenBarrierException, InterruptedException {\n if (l >= r) {\r\n return;\r\n }\r\n\r\n //recursion step: a[l..r] is not empty \r\n //divide into sublists and merge \r\n int m = (l + r) / 2;\r\n mergesort(a, l, m);\r\n mergesort(a, m + 1, r);\r\n merge(a, l, m, r);\r\n }",
"private static void merge(int[] nums, int low, int mid, int high) {\n int n1=mid-low+1;\n int n2=high-mid;\n int[] left=new int[n1];\n int[] right=new int[n2];\n for (int i = 0; i <n1 ; i++) {\n left[i]=nums[i+low];\n }\n for (int j = 0; j < n2; j++) {\n right[j]=nums[mid+1+j];\n }\n int k=low;\n int i=0,j=0;\n while (i< left.length && j< right.length){\n if(left[i]<right[j]){\n nums[k++]=left[i++];\n }\n else {\n nums[k++]=right[j++];\n }\n }\n //copy the remaining elements\n\n while (i<left.length){\n nums[k++]=left[i++];\n }\n while (j< right.length){\n nums[k++]=right[j++];\n }\n }",
"public String[] mergeSort(String in[]){\n\t\t// if nothing to sort, return the string\n\t\tif (in.length == 1) {\n\t\t\treturn in;\n\t\t}\n\t\t\n\t\tString[] left = new String[in.length / 2];\n\t\tSystem.arraycopy(in, 0, left, 0, in.length / 2);\n\t\tString[] right;\n\t\t\n\t\t// Even number\n\t\tif (in.length % 2 == 0) {\n\t\t\tright = new String[in.length / 2];\n\t\t\tSystem.arraycopy(in, in.length / 2, right, 0, in.length / 2);\n\t\t}\n\t\t// Odd number\n\t\telse {\n\t\t\tright = new String[(in.length / 2) + 1];\n\t\t\tSystem.arraycopy(in, in.length / 2, right, 0, in.length / 2 + 1);\n\t\t}\n\t\tleft = mergeSort(left);\t\t\t// Using recursion to split into new arrays\n\t\tright = mergeSort(right);\n\t\t\n\t\treturn merge(left, right);\t\t// Using merge function to merge the arrays into a new sorted one\n\t}",
"private void merge(int lb, int mid, int ub, int[] ar){\n\t\tint i = lb ,j = lb + mid, k = 0;\n\t\tint[] out = new int[ub - lb + 1];\n\t\twhile( (i <= lb + mid - 1) && (j <= ub)){\n\t\t if(ar[i] <= ar[j]) out[k++] = ar[i++];\n\t\t else out[k++] = ar[j++];\n\t\t}\n\t\twhile(i <= lb + mid - 1) out[k++] = ar[i++];\n\t\twhile(j <= ub) \t out[k++] = ar[j++];\n\t\tfor(int l = 0; l < k; l++) ar[lb + l] = out[l];\n\t}",
"private void merge(int[] left, int[] right, int[] a) {\n\t\t// i - left\n\t\t// j - right\n\t\t// k - original\n\t\tint i = 0, j = 0, k = 0;\n\t\tint sL = left.length;\n\t\tint sR = right.length;\n\n\t\twhile (i < sL && j < sR) {\n\t\t\tif (left[i] < right[j]) {\n\t\t\t\ta[k] = left[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\ta[k] = right[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\n\t\twhile (i < sL) {\n\t\t\ta[k] = left[i];\n\t\t\tk++;\n\t\t\ti++;\n\t\t}\n\t\twhile (j < sR) {\n\t\t\ta[k] = right[j];\n\t\t\tk++;\n\t\t\tj++;\n\t\t}\n\t}",
"public static int[] mergeSortedArrayInPlace(int[] a, int[] b) {\n\t\tint i = 0;\n\t\twhile (i < a.length && a[i] != 0)\n\t\t\ti++;\n\t\ti--;\n\t\tint j = b.length - 1;\n\t\tint cur = a.length - 1;\n\t\twhile (i >= 0 || j >= 0) {\n\t\t\tif (i >= 0 && j >= 0) {\n\t\t\t\tif (a[i] > b[j]) {\n\t\t\t\t\ta[cur--] = a[i];\n\t\t\t\t\ti--;\n\t\t\t\t} else {\n\t\t\t\t\ta[cur--] = b[j];\n\t\t\t\t\tj--;\n\t\t\t\t}\n\t\t\t} else if (j >= 0) {\n\t\t\t\ta[cur--] = b[j];\n\t\t\t\tj--;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn a;\n\t}",
"void merge(int arr[], int l, int m , int r)\n {\n int n1 = m-l+1;\n int n2 = r-m;\n\n //create temp arrays\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n //copy the elements to the array\n for(int i=0; i < n1 ;i++)\n L[i] = arr[l+i];\n for(int j=0; j < n2 ;j++)\n R[j] = arr[m+1+j];\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarry array\n int k = l;\n\n while(i<n1 && j< n2)\n {\n if(L[i] <= R[j])\n {\n arr[k++] = L[i++];\n }\n else\n {\n arr[k++] = R[j++];\n }\n }\n\n while(i<n1)\n {\n arr[k++]=L[i++];\n }\n\n while(j<n2)\n {\n arr[k++]=R[j++];\n }\n\n }",
"public static void merge(int start, int mid, int end, int[] numbers) {\n int[] tempArray = new int[numbers.length]; // Create a temporary array\n int tmpArrayIndex = start; // create a temporary index\n\n // initialize start index and mid index to be used as counters\n int startIndex = start;\n int midIndex = mid + 1;\n\n // Iterate until the smaller array reaches the end.\n while (startIndex <= mid && midIndex <= end) {\n if (numbers[startIndex] < numbers[midIndex]) {\n // The ++ increases the value by one after it has been used\n // to prevent the while loop from giving us an infinite loop\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n } else {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n }\n\n // copy the remaining elements into the array\n while(startIndex <= mid) {\n tempArray[tmpArrayIndex++] = numbers[startIndex++];\n }\n\n while (midIndex <= end) {\n tempArray[tmpArrayIndex++] = numbers[midIndex++];\n }\n\n // copy our temporary array to the actual array after sorting\n if (end + 1 - start >= 0) {\n\n // java method for copying arrays\n System.arraycopy(tempArray, start, numbers, start, end + 1 - start);\n }\n }",
"@Override\n public void sort(int[] input) {\n }"
] | [
"0.77437156",
"0.76627284",
"0.7573673",
"0.7496878",
"0.747172",
"0.7395951",
"0.73645556",
"0.73607934",
"0.7345116",
"0.73440474",
"0.72652745",
"0.72646403",
"0.7261126",
"0.7228032",
"0.7222291",
"0.7189666",
"0.71270466",
"0.7105658",
"0.7092467",
"0.708895",
"0.7076245",
"0.70669526",
"0.70490366",
"0.7046383",
"0.70329386",
"0.702584",
"0.70043707",
"0.70012146",
"0.69958454",
"0.6985796",
"0.69772995",
"0.6967277",
"0.6948183",
"0.6946926",
"0.6935242",
"0.69008285",
"0.687996",
"0.6877219",
"0.685735",
"0.6852337",
"0.68159235",
"0.68038005",
"0.6796267",
"0.6782102",
"0.67795116",
"0.67456466",
"0.6738901",
"0.67333436",
"0.67225903",
"0.6708798",
"0.6707013",
"0.6675227",
"0.66589534",
"0.6644263",
"0.66300714",
"0.66272604",
"0.66235626",
"0.66191304",
"0.6613353",
"0.659262",
"0.6584556",
"0.65528345",
"0.6546448",
"0.6546345",
"0.6529824",
"0.6521582",
"0.65210116",
"0.6516389",
"0.65159917",
"0.65088826",
"0.65071774",
"0.6504091",
"0.65030384",
"0.6501866",
"0.64867455",
"0.6484079",
"0.6475285",
"0.6464947",
"0.6456831",
"0.6432093",
"0.64086115",
"0.64035004",
"0.6388748",
"0.6379848",
"0.63790154",
"0.63770354",
"0.63749343",
"0.6374033",
"0.63705564",
"0.6341371",
"0.6341263",
"0.63386464",
"0.63313586",
"0.6323544",
"0.6316539",
"0.63156474",
"0.6307079",
"0.6305187",
"0.6304992",
"0.6297052",
"0.6295659"
] | 0.0 | -1 |
Accessor method to return the current value of steps | public long getStepCount(){
return steps;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Double getStep();",
"int getStep();",
"int getStep();",
"int getStep();",
"public double getStep() {\n\t\treturn step;\n\t}",
"public Integer getStep() {\n return step;\n }",
"public int getStep() {\n return step;\n }",
"public int getSteps() {\n\t\treturn this.steps;\n\t}",
"public int getSteps() {\n\t\treturn steps;\n\t}",
"public int getStep()\n\t{\n\t\treturn step;\n\t}",
"protected int getStep() {\n\t\treturn step;\n\t}",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"@Override\r\n\tpublic double getCurrentStepStart() {\n\t\treturn 0;\r\n\t}",
"public int getStep () {\n\t\treturn step_;\n\t}",
"public int getStep() {\n\t\treturn step;\n\t}",
"public long getStepCount(){\n return steps;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"public double getStepsCycle() {\n\t\treturn stepsSleep + stepsCS;\n\t}",
"@Override\r\n\tpublic int getSteps() {\n\t\treturn 0;\r\n\t}",
"public int getStepNumber() {\n return stepNumber;\n }",
"public long getStepNumber() {\n return schedule.getSteps();\n }",
"@Override\r\n\tpublic double getStep(double step){\n\t\treturn 0;\r\n\t}",
"public int getCurSteps() {\n\t\treturn nativegetCurSteps();\n\t}",
"public int getStepY() {\n return stepY;\n }",
"public int getStep() {\r\n\t\t\treturn this.enabled;\r\n\t\t}",
"public int numberOfSteps() {\t\r\n\t\treturn steps.size();\r\n\t}",
"abstract int steps();",
"public ProofStep [ ] getSteps ( ) ;",
"public Optional<Step> getCurrentStep() {\n return fromNullable(currentStep);\n }",
"double getStep() {\n\t\t\treturn scale;\n\t\t}",
"public List<NewTaskStepValues> getStepsValues() {\n return stepsValues;\n }",
"public int getStepCount() {\r\n\t\treturn stepCount;\r\n\t}",
"public Vertex2F getStep()\n {\n return this.step.clone();\n }",
"public double getStepLength() {\n\t\treturn m_dStepLength;\n\t}",
"public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}",
"public static int getCurrentStepNumber() {\n return threadStepNumber.get();\n }",
"public Element getStepExpression() {\n\t\treturn stepExpression;\n\t}",
"public String nextStep();",
"public int step() {\n // PUT YOUR CODE HERE\n }",
"public T getMinStep() {\n return minStep;\n }",
"public T getStepSize() {\r\n return this.stepSize;\r\n }",
"int stepsToGo();",
"float getStepPhaseShiftIncrement();",
"@Override public List<ExecutionStep> getSteps() {\n return Collections.singletonList(step);\n }",
"Integer getTotalStepCount();",
"int getSequenceStepsCount();",
"public int totalSteps() {\n return moves.size();\n }",
"java.util.ArrayList<CloneableObject> getStepParameter()\n\t{\n\t\treturn this.stepParameter;\n\t}",
"java.util.ArrayList<CloneableObject> getStepParameter()\n\t{\n\t\treturn this.stepParameter;\n\t}",
"public E nextStep() {\r\n\t\tthis.current = this.values[Math.min(this.current.ordinal() + 1, this.values.length - 1)];\r\n\t\treturn this.current;\r\n\t}",
"public int length() {\n return steps.size();\n }",
"@Override\n public List<OExecutionStep> getSteps() {\n return (List) steps;\n }",
"public double getMutationStep() {\n // The variable mutationStep is obtained from the parameter file\n if(!mutStepFromSD){\n return mutationStep;\n }\n else{\n return mutationStep * experimentalData.getDataset(DatasetType.TRAINING).getOutputSD();\n }\n }",
"public int getAnswer(){\n return getVectorOne().getSteps() + getVectorTwo().getSteps();\n }",
"public FieldODEStateAndDerivative<T> getStepStart() {\r\n return this.stepStart;\r\n }",
"public int getStepLength() {\n return OffsetOriginStep.getLength();\n }",
"protected double[] getCurrentSteps() {\n// final int speedSteps = mPowerProfile.getNumSpeedSteps(); //amount of CPU working Frequents\n final int speedSteps = 10;\n final double[] powerCpuNormal = new double[speedSteps];\n for (int p = 0; p < speedSteps; p++) {\n// powerCpuNormal[p] = mPowerProfile.getAveragePower(PowerProfile.POWER_CPU_ACTIVE, p);\n powerCpuNormal[p] = 100 * (p + 1);\n }\n\n return powerCpuNormal;\n }",
"public T getMaxStep() {\n return maxStep;\n }",
"public int getStepId() {\n return stepId;\n }",
"double getStepSize();",
"public StepInterface getOriginalStep()\n {\n return this.step;\n }",
"public ElementHeader getCurrentStep()\n {\n return currentStep;\n }",
"public double averageSteps() {\n if (day==0) return 0;\n return (double) totalSteps / day;}",
"public int liftStepper() {\n if(robot.wrist.getPosition()> .25)\n {\n if(robot.jaw.getPosition()> .25)\n {\n telemetry.addLine(\"I could self damage.\");\n }\n }\n else{\n if (this.improvedGamepad1.y.isInitialPress()) {\n step = step + 1;\n if (step > 5) {\n step = 5;\n }\n power = .5;\n //up by one\n }\n if (this.improvedGamepad1.a.isInitialPress()) {\n step = step - 1;\n if (step < 0) {\n step = 0;\n }\n power = .5;\n //down by one\n }\n\n if (this.improvedGamepad1.b.isInitialPress()) {\n topStep = step;\n step = 0;\n power = .7;\n //to bottom\n }\n\n if (this.improvedGamepad1.x.isInitialPress()) {\n step = topStep;\n power = .7;\n //to top\n }\n\n }\n\n telemetry.addData(\"Step\", step);\n telemetry.addData(\"Top Step\", topStep);\n telemetry.update();\n\n\n //DcMotor lift = this.hardwareMap.dcMotor.get(\"lift\");\n int targetPosition = step * 750;\n\n robot.lift.setTargetPosition(targetPosition);\n robot.lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.lift.setPower(power);\n\n telemetry.update();\n return step;\n\n }",
"public float getIterationValue()\n\t{\n\t\tif (getDuration() <= 0) { return 1; }\n\t\treturn getCurrentTime() / getDuration();\n\t}",
"@Override\n public double getValue() {\n return currentLoad;\n }",
"public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }",
"public String getStepName()\r\n\t{\r\n\t\treturn stepName;\r\n\t}",
"@Override\n public double getTransitionValue() {\n return value.doubleValue();\n }",
"public int step() {\n ArrayList<Integer> copy = new ArrayList<Integer>();\n for (int i = 1; i < register.size(); i++) { \n copy.add(register.get(i));\n }\n int tapNum = register.get(register.size()-tap-1);\n int begin = register.get(0);\n if (tapNum == 1 ^ begin == 1) {\n copy.add(1);\n }\n else {\n copy.add(0);\n }\n register.clear();\n register.addAll(copy);\n return register.get(register.size()-1);\n }",
"public void step();",
"public void step();",
"public java.lang.String getStepName() {\n return stepName;\n }",
"public com.sforce.soap.enterprise.QueryResult getProcessSteps() {\r\n return processSteps;\r\n }",
"java.lang.String getNextStep();",
"public java.lang.String getStepStatus() {\n return stepStatus;\n }",
"public float getCurrentValue() {\n return currentValue;\n }",
"public java.lang.String getStepDescription() {\n return stepDescription;\n }",
"public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}",
"public String getStepDescription()\r\n\t{\r\n\t\treturn stepDescription;\r\n\t}",
"float getVoltageStepIncrementOutOfPhase();",
"public DoubleExpression getProgress()\n {\n return progress;\n }",
"public double getGiven() {\n return givenNum;\n }",
"public Step stepAt(final int index) {\r\n\t\treturn getSteps().get( index );\r\n\t}",
"@Override\r\n\tpublic double getCurrentSignedStepsize() {\n\t\treturn 0;\r\n\t}",
"public int getStepLineNumber()\n\t{\n\t\treturn this.stepLineNumber;\n\t}",
"public int getStepLineNumber()\n\t{\n\t\treturn this.stepLineNumber;\n\t}",
"public long getPropertyVolumeSteps()\n {\n return iPropertyVolumeSteps.getValue();\n }",
"@Override\r\n public double doubleValue() {\r\n return this.m_current;\r\n }",
"boolean previousStep();",
"public E previousStep() {\r\n\t\tthis.current = this.values[Math.max(this.current.ordinal() - 1, 0)];\r\n\t\treturn this.current;\r\n\t}",
"public abstract void setProgress (int currentStep, int totalSteps);",
"@Override\r\n\tpublic void stepHasBeenTaken(int steps) {\n\t\tTextView currLoc = (TextView) findViewById(R.id.stepsCount);\r\n\t\tcurrLoc.setText(\"\"+steps);\r\n\t}",
"public double getSimulationStepDuration() {\n\t\treturn Kernel.getSingleton().getSimulationClock().getSimulationStepDuration();\n\t}",
"private double getValue() {\n return value;\n }",
"StepTracker(int minimum) {\n STEPS = minimum;\n day=0;\n activeDay=0;\n totalSteps=0;\n }"
] | [
"0.80837345",
"0.8011761",
"0.8011761",
"0.8011761",
"0.7855403",
"0.7816976",
"0.78083503",
"0.7731867",
"0.770646",
"0.76708895",
"0.76467276",
"0.7572865",
"0.7572865",
"0.7572865",
"0.7525834",
"0.7512569",
"0.75052786",
"0.7468937",
"0.7418205",
"0.7418205",
"0.7418205",
"0.7217412",
"0.7191377",
"0.7170921",
"0.7134556",
"0.7124793",
"0.70698917",
"0.7056774",
"0.6947052",
"0.69078547",
"0.69019634",
"0.6890512",
"0.6880089",
"0.6875811",
"0.6864945",
"0.68439484",
"0.68386966",
"0.679936",
"0.6790949",
"0.67456794",
"0.6745401",
"0.6719248",
"0.66732943",
"0.6646939",
"0.6607619",
"0.658123",
"0.65697354",
"0.65312546",
"0.65201837",
"0.64901227",
"0.6464738",
"0.6453702",
"0.6453702",
"0.6442139",
"0.6427659",
"0.6418931",
"0.6403715",
"0.6402381",
"0.6390298",
"0.6382983",
"0.6370966",
"0.63709545",
"0.6360305",
"0.6302254",
"0.6290591",
"0.6277265",
"0.62748325",
"0.625271",
"0.62469107",
"0.6232652",
"0.62258506",
"0.6220065",
"0.6201562",
"0.6198041",
"0.61721",
"0.61721",
"0.6166833",
"0.6142614",
"0.61206865",
"0.6090656",
"0.6083486",
"0.60789794",
"0.60755914",
"0.6060785",
"0.60556823",
"0.60553443",
"0.6038149",
"0.602088",
"0.6011077",
"0.60035545",
"0.60035545",
"0.5946959",
"0.59301156",
"0.59251946",
"0.59199923",
"0.5913608",
"0.59125865",
"0.58961415",
"0.5864601",
"0.58481187"
] | 0.72770125 | 21 |
Modifier method to set or reset the step count. Usually called prior to invocation of a sort method. | public void setStepCount(long stepCount){
steps = stepCount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetStepCount() {\r\n\t\tstepCount = 500;\r\n\t}",
"public void setStepCount(long stepCount){\n steps = stepCount;\n }",
"public static void resetStepCounter() {\n logger.debug(\"The step counter was reset to 1\");\n threadStepNumber.set(1);\n }",
"@Override\n public void stepCount(long step, int timestamp) {\n }",
"public void setStep(int step) {\n this.step = step;\n }",
"public void setStep(Integer step) {\n this.step = step;\n }",
"public void setStep(double step) {\n\t\tthis.step = step;\n\t}",
"public void setStep(int step)\n {\n this.step = step;\n this.stepSpecified = true;\n }",
"public void setStep(int step) {\n\t\tthis.step = step;\n\t}",
"public int getStepCount() {\r\n\t\treturn stepCount;\r\n\t}",
"public void setPrevCount(double n)\n {\n\n this.prevCount = n;\n }",
"public long getStepCount(){\n return steps;\n }",
"public long getStepCount(){\r\n\t\treturn steps;\r\n\t}",
"public void markRunStart(){\r\n runStart = stepCount;\r\n }",
"public void setSteps(int steps) {\n\t\tthis.steps = steps;\n\t}",
"public void resetRunCount() {\n\n }",
"public abstract void setProgress (int currentStep, int totalSteps);",
"void updateInitialSortedCount(int sortedCount) {\n this.initialSortedCount = sortedCount;\n }",
"public Builder setStep(int value) {\n bitField0_ |= 0x00000002;\n step_ = value;\n onChanged();\n return this;\n }",
"public Builder setStep(int value) {\n bitField0_ |= 0x00000002;\n step_ = value;\n onChanged();\n return this;\n }",
"public Builder setStep(int value) {\n bitField0_ |= 0x00000004;\n step_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\tpublic double getStep(double step){\n\t\treturn 0;\r\n\t}",
"public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}",
"public void resetCount() {\n\t\tresetCount(lineNode);\n\t}",
"@Override\r\n\tpublic int getSteps() {\n\t\treturn 0;\r\n\t}",
"public void setLastSyncStepsCount(int i) {\n ((SharedPreferences) this.fitClientStore.get()).edit().putInt(GoogleFitConstants.SharedPreferences.LAST_SYNC_STEP_COUNT, i).apply();\n }",
"public void setStepNumber(int stepNumber) {\n this.stepNumber = stepNumber;\n }",
"void setStepLineNumber(int number)\n\t{\n\t\tthis.stepLineNumber = number;\n\t}",
"void setStepLineNumber(int number)\n\t{\n\t\tthis.stepLineNumber = number;\n\t}",
"public void setNumDeparting() {\n if (isStopped() && !embarkingPassengersSet){\n \tRandom rand = new Random();\n \tint n = rand.nextInt(this.numPassengers+1);\n \tif (this.numPassengers - n <= 0) {\n \t\tthis.numPassengers = 0;\n n = this.numPassengers;\n \t} else {\n this.numPassengers = this.numPassengers - n;\n }\n trkMdl.passengersUnboarded(trainID, n);\n }\n \t//return 0;\n }",
"protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }",
"StepTracker(int minimum) {\n STEPS = minimum;\n day=0;\n activeDay=0;\n totalSteps=0;\n }",
"void setStepCounterTileXY();",
"public void setStep(int step) {\r\n\t\t\tthis.enabled = step;\r\n\t\t\trepaint();\r\n\t\t}",
"protected int getStep() {\n\t\treturn step;\n\t}",
"public int getStepNumber() {\n return stepNumber;\n }",
"public int getStep() {\n return step;\n }",
"@Override\r\n\tpublic double getCurrentStepStart() {\n\t\treturn 0;\r\n\t}",
"public void setInitialStepSize(final T initialStepSize) {\n if (initialStepSize.subtract(minStep).getReal() < 0 ||\n initialStepSize.subtract(maxStep).getReal() > 0) {\n initialStep = getField().getOne().negate();\n } else {\n initialStep = initialStepSize;\n }\n }",
"public void resetCount() {\n count = 0;\n }",
"public void resetCount() {\n\t\tcount = 0;\n\t}",
"public StepList(){ this.step=null; this.rest=null; this.weight=0; this.increment=0.0; this.decrement=0;}",
"Integer getTotalStepCount();",
"public DancingBug(int[] steps) {\r\n\t\tnumber = 0;\r\n\t\tthis.steps = steps;\r\n\t}",
"public abstract void setMovementPerTick(float step);",
"@Override\n public void init(int maxSteps) {\n }",
"public void setCount() {\n\t\tLinkedListIterator iter = new LinkedListIterator(this.head);\n\t\tint currentSize = 1;\n\t\twhile (iter.hasNext()) {\n\t\t\titer.next();\n\t\t\tcurrentSize++;\n\t\t}\n\t\tthis.size = currentSize;\n\t}",
"public void chg() {\n currentChangeStep = 3;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"int getStep();",
"int getStep();",
"int getStep();",
"public static void resetCount() {\n count = 1;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"public int getStep() {\n return step_;\n }",
"@Override\n public void sortAndCount() {\n Insertion.reset();\n Insertion.sort(arrayForTests);\n comp = Sort.getComparisonOperations(); // Sort.getComp();\n copy = Sort.getCopyOperations(); // Sort.getCopy();\n }",
"public static void resetTestCount() {\n mTestCount = 0;\n }",
"protected void runBeforeStep() {}",
"public void resetIteration(){\n\t\titeration = 0;\n\t}",
"public int numberOfSteps() {\t\r\n\t\treturn steps.size();\r\n\t}",
"public void onStepStarted(int index, int total, String name);",
"public void setIterations(int iter) {\n\t\tnumIterations = iter;\n\t}",
"public void advanceSimulation () {\n\t\tstep_++;\n\t}",
"public void step() {\r\n\t\tif (location == Location.SAFARI) {\r\n\t\t\tstepCount--;\r\n\t\t}\r\n\t}",
"int stepsToGo();",
"public void initialize (long step, long startTime)\n {\n this.stepSize = step;\n this.state = new AlgorithmState (step, startTime, getAlgorithmName());\n }",
"public void updateStep(int current){\n visualization.setProgress(current + stepsToMoveForward);\n }",
"public Builder clearStep() {\n bitField0_ = (bitField0_ & ~0x00000002);\n step_ = 0;\n onChanged();\n return this;\n }",
"public Builder clearStep() {\n bitField0_ = (bitField0_ & ~0x00000002);\n step_ = 0;\n onChanged();\n return this;\n }",
"public int getStep() {\n\t\treturn step;\n\t}",
"public int getStep()\n\t{\n\t\treturn step;\n\t}",
"public int getSteps() {\n\t\treturn steps;\n\t}",
"@BeforeAll\n public void before() {\n Accumulator<Index> acc = create();\n var it = values().iterator();\n while (it.hasNext()) {\n long value = it.nextLong();\n min = Math.min(min, value);\n max = Math.max(max, value);\n ++count;\n acc.add(value);\n }\n this.index = acc.seal();\n }",
"@Override\n protected void beforeSearch() {\n index = 0;\n numberOfIterations = 0;\n pageCounter = 0;\n }",
"public void setSteps(List<Step> steps) {\n mSteps = steps;\n }",
"public int getStep () {\n\t\treturn step_;\n\t}",
"private void updateTotalPageNumbers() {\n totalPageNumbers = rows.size() / NUM_ROWS_PER_PAGE;\n }",
"public Builder clearStep() {\n bitField0_ = (bitField0_ & ~0x00000004);\n step_ = 0;\n onChanged();\n return this;\n }",
"public abstract void setProgress (String description, int currentStep, int totalSteps);",
"double getStepSize();",
"public double getStep() {\n\t\treturn step;\n\t}",
"public Integer getStep() {\n return step;\n }",
"@Override\n\tpublic void resetTripCount() {\n\t\tthis.tripCount = 0;\n\t}",
"public void reset() {\n\t\tthis.count = 0;\n\t}",
"void setTotalsRowCount(int count);",
"public void resetMoveCount() {\r\n\t\tmoveCount = 0;\r\n\t}",
"protected void initialize() {\r\n if (dumper.isLimitSwitchPressed()){ \r\n dumper.stop();\r\n state = STATE_SUCCESS;\r\n }\r\n else {\r\n startPosition = dumper.getPosition();\r\n desiredPosition = startPosition + increment;\r\n dumper.backward();\r\n state = STATE_SEEK_LEFT;\r\n }\r\n }",
"public void setPageIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n pageIncrement = value;\n }\n }",
"public int getSteps() {\n\t\treturn this.steps;\n\t}",
"void setSpikesPerChunk(VariableAmount count);",
"public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void resetTripCount() {\n\t\tthis.tripCount = 0;\n\n\t}",
"void assignRange() {\n rangeIndex = (int) Math.floor(value / step);\n }",
"public void setCount(int value) {\n this.count = value;\n }",
"public void setCount(int value) {\n this.count = value;\n }",
"public void setCount(int value) {\n this.count = value;\n }",
"public int step() {\n // PUT YOUR CODE HERE\n }"
] | [
"0.74898314",
"0.71755546",
"0.6598937",
"0.65536684",
"0.6499915",
"0.6486114",
"0.64586294",
"0.63304114",
"0.6324068",
"0.6201179",
"0.61752266",
"0.6128118",
"0.61182016",
"0.6091395",
"0.6068469",
"0.6018931",
"0.60043085",
"0.59922594",
"0.596338",
"0.596338",
"0.5952993",
"0.59510636",
"0.5902113",
"0.5889248",
"0.5836751",
"0.58154505",
"0.57866406",
"0.57809454",
"0.57809454",
"0.57686204",
"0.5763254",
"0.5761271",
"0.5720304",
"0.56660897",
"0.56593716",
"0.56490916",
"0.56435066",
"0.56102246",
"0.55994976",
"0.5589662",
"0.5589136",
"0.5588282",
"0.55809855",
"0.557857",
"0.55680203",
"0.5556274",
"0.55556625",
"0.55359775",
"0.5523983",
"0.5523983",
"0.5523983",
"0.5481224",
"0.5481224",
"0.5481224",
"0.54737794",
"0.5465019",
"0.5465019",
"0.5465019",
"0.5458614",
"0.54478127",
"0.54388267",
"0.5426826",
"0.5425703",
"0.54111534",
"0.54074883",
"0.53981656",
"0.53956",
"0.53942865",
"0.5390878",
"0.5388543",
"0.53880125",
"0.53880125",
"0.5384399",
"0.5380577",
"0.5373303",
"0.5369515",
"0.53691584",
"0.5366463",
"0.5363614",
"0.5358705",
"0.5357183",
"0.53557473",
"0.53555316",
"0.5341186",
"0.5338591",
"0.5300153",
"0.52995944",
"0.52810645",
"0.52803385",
"0.526899",
"0.52630675",
"0.5251131",
"0.52495563",
"0.5249145",
"0.5243799",
"0.5234529",
"0.5232977",
"0.5232977",
"0.5232977",
"0.52323014"
] | 0.7005202 | 2 |
Interchanges two elements in an ArrayList | public void swap(ArrayList <Comparable> list, int a, int b){
Comparable temp = list.get(a);
list.set(a, list.get(b));
list.set(b, temp);
System.out.println();
System.out.println("Swap");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"private static <E> void swap(ArrayList<E> a, int i, int j) {\n\t\tE t = a.get(i);\n\t\ta.set(i, a.get(j));\n\t\ta.set(j, t);\n\t}",
"static void swap(List<CustomCharacter> list, int a, int b){\n CustomCharacter temp = getClone(list, a);\n list.set(a, list.get(b));\n list.set(b, temp);\n }",
"private static <T,S> void swap(List<T> x, List<S> a2, int a, int b) {\n\t\tT t = x.get(a);\n\t\tx.set(a, x.get(b));\n\t\tx.set(b,t);\n\t\tS t2 = a2.get(a);\n\t\ta2.set(a,a2.get(b));\n\t\ta2.set(b,t2);\n\t}",
"private static void swap(List<Integer> list, int i, int j){\n int temp = list.get(i);\n list.set(i,list.get(j));\n list.set(j, temp);\n }",
"static void swap(List l, int i1, int i2) {\n\t\tObject tmp=l.get(i1);\n\t\tl.set(i1, l.get(i2));\n\t\tl.set(i2, tmp);\n\t}",
"private static <T> void swap(List<T> list, int x, int y){\n T temp = list.get(x);\n list.set(x, list.get(y));\n list.set(y, temp);\n }",
"protected static void swapReferences(List<?> array, int a, int b){\n Collections.swap(array, a, b);\n }",
"private static <T,P> void vecswap(List<T> x, List<P> a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private void switchElements(int a, int b) {\r\n\t\tE temp = c[a];\r\n\t\tc[a] = c[b];\r\n\t\tc[b] = temp;\r\n\t}",
"public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }",
"private static <T> void vecswap(List<T> x, int a, int b, int n) {\n for (int i = 0; i < n; i++, a++, b++) {\n swapElements(x, a, b);\n }\n }",
"public static void swap(List<Integer> values, int i, int j) {\r\n int temp = values.get(i);\r\n values.set(i, values.get(j));\r\n values.set(j, temp);\r\n }",
"public static void swapCity2(ArrayList<City> routine, int index1, int index2, int num) {\n int i = 0;\n while(i < num){\n City temp = routine.get(index1 + i);\n routine.set(index1 + i, routine.get(index2 + i));\n routine.set(index2 + i, temp);\n i++;\n }\n \n }",
"public static ArrayList<String>\n swap(ArrayList<String> list,int pos1,int pos2)\n { Collections.swap(list,pos1,pos2);\n return list;\n }",
"private synchronized void swapElements(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\t// the two elements to be swapped\n\t\tLinearElement firstElement = root.getVector().get(index1);\n\t\tLinearElement secondElement = root.getVector().get(index2);\n\n\t\t// the two elements after each of the elements to be swapped\n\t\tLinearElement secondElementNext;\n\t\tLinearElement firstElementNext;\n\t\t/*\n\t\t * There is a corner case where secondElement.previousChild is\n\t\t * firstElement\n\t\t */\n\n\t\t// the first element's previous child before it is reassigned\n\t\tLinearElement tempPrevChild = firstElement.getPreviousChild();\n\n\t\tif (index2 != index1 + 1) {// the elements are not adjacent\n\n\t\t\t// set previous elements for the two nodes\n\t\t\tfirstElement.setPreviousChild(secondElement.getPreviousChild());\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the swapped nodes\n\t\t\tif (index1 + 1 < root.getVector().size()) {\n\t\t\t\tfirstElementNext = root.getVector().get(index1 + 1);\n\t\t\t\tfirstElementNext.setPreviousChild(secondElement);\n\t\t\t}\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\n\t\t} else { // the elements are adjacent\n\t\t\tfirstElement.setPreviousChild(secondElement);\n\t\t\tsecondElement.setPreviousChild(tempPrevChild);\n\n\t\t\t// set previous elements for the nodes referencing the second node\n\t\t\tif (index2 + 1 < root.getVector().size()) {\n\t\t\t\tsecondElementNext = root.getVector().get(index2 + 1);\n\t\t\t\tsecondElementNext.setPreviousChild(firstElement);\n\t\t\t}\n\t\t}\n\n\t\t// swap the elements in root\n\t\troot.getVector().swap(index1, index2);\n\n\t\troot.focusPosition();\n\t}",
"private void exchange(int i, int j) {\n int temp = numbers[i];\n numbers[i] = numbers[j];\n numbers[j] = temp;\n \n }",
"private void swapElement ( int p1, int p2 )\n\t{\n\t}",
"public synchronized void elementSwapped(Object newParam, int index1,\n\t\t\tint index2) {\n\n\t\tif (index1 < index2) {\n\t\t\tswapElements(newParam, index1, index2);\n\t\t} else {\n\t\t\tswapElements(newParam, index2, index1);\n\t\t}\n\n\t}",
"public synchronized void elementSwapped(Object source, int index1,\n\t\t\tObject other, int index2) {\n\n\t}",
"private void exchange(int i, int j){\n\t\tString temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\t}",
"public static void swap(java.util.List arg0, int arg1, int arg2)\n { return; }",
"private void exchange(int i, int j) {\r\n\t\t//swap values\r\n\t\tint temp = mutualNum[i];\r\n\t\tmutualNum[i] = mutualNum[j];\r\n\t\tmutualNum[j] = temp;\r\n\t\t//swap the same friends\r\n\t\tString Stemp = potentialFriends[i];\r\n\t\tpotentialFriends[i] = potentialFriends[j];\r\n\t\tpotentialFriends[j] = Stemp;\r\n\t}",
"public void decendingLikes(ArrayList<tutorDetails> list){\n\n int n = list.size();\n tutorDetails temp ;\n\n for(int i=0; i < n; i++){\n for(int j=1; j < (n-i); j++){\n\n if(list.get(j-1).getViews()< list.get(j).getViews()){\n //swap the elements!\n temp = list.get(j-1);\n list.set(j-1, list.get(j)); //Do not use add(),it does not replace the value it simply pushes the values to higher\n list.set(j,temp); // indexes,use set() to replace\n }\n\n }\n }\n\n\n }",
"public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}",
"public static void intercambiar(int []Grado1, int ii, int jj){\nint aux=Grado1[ii];\nGrado1[ii]= Grado1[jj];\nGrado1[jj]=aux;\n}",
"ArrayList<Float> polaczListy (ArrayList<Float> L1, ArrayList<Float> L2)\n\t{\n\t\tint i=L1.size();\n\t\twhile(i<Stale.horyzontCzasowy)\n\t\t{\n\t\t\tL1.add(L2.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn L1;\n\t}",
"void update(List<E> list, E o, E n) {\n\t\tint index = list.indexOf(o);\n\t\tlist.set(index, n);\n\t}",
"public void swap(ArrayList<TodoList> newData){\n data = new ArrayList<>(newData);\n notifyDataSetChanged();\n }",
"private void exchange(int i, int j){\n\t\tnode_data t = _a[i];\n\t\t_a[i] = _a[j];\n\t\t_a[j] = t;\n\t}",
"private void updateElementListFromSegmet(int changeValue, List<Integer> elementList) {\n\n int changeIndex = 0;\n int change = 0;\n\n for (int i = 0; i < elementList.size(); i++) {\n if (changeValue == elementList.get(i)) {\n changeIndex = i;\n change++;\n }\n }\n\n if (change == 0) {\n for (int i = 0; i < elementList.size(); i++) {\n if (changeValue > elementList.get(i)) {\n continue;\n }\n int value = elementList.get(i) - 1;\n elementList.set(i, value);\n }\n return;\n }\n\n for (int i = elementList.size() - 1; i >= 0; i--) {\n if (elementList.get(i) == changeValue) {\n break;\n } else {\n int value = elementList.get(i) - 1;\n elementList.set(i, value);\n }\n\n }\n\n elementList.remove(changeIndex);\n\n }",
"public List<Integer> interleaveLists(List<Integer> listOne, List<Integer> listTwo) {\n\t\tList<Integer> weave = new ArrayList<>();\n\t\tint i = 0;\n\t\tfor (i = 0; i < listOne.size() && i < listTwo.size(); i++) {\n\t\t\tweave.add(listOne.get(i));\n\t\t\tweave.add(listTwo.get(i));\n\t\t}\n\n\t\tif (listOne.size() > listTwo.size()) {\n\t\t\tfor(int j = i; j < listOne.size(); j++) {\n\t\t\t\tweave.add(listOne.get(j));\n\t\t\t}\n\t\t}\n\n\t\tif (listTwo.size() > listOne.size()) {\n\t\t\tfor(int k = i; k < listTwo.size(); k++) {\n\t\t\t\tweave.add(listTwo.get(k));\n\t\t\t}\n\t\t}\n\t\treturn weave;\n\t\t\n\t}",
"private static <T> void vecswap(int x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(float x[],T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T,P> void vecswap(T x[], int[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"public void flipIndexes() {\n int temp = index1;\n index1 = index2;\n index2 = temp;\n }",
"private static void exchange(int[] A, int i, int j) {\n if(A[i] == A[j]) return;\n\n A[i] = A[i] ^ A[j];\n A[j] = A[i] ^ A[j];\n A[i] = A[i] ^ A[j];\n }",
"private static ArrayList<String> modify(ArrayList<String> answer, Graph g) {\n\t\tfor (int i=0; i<=answer.size()-2; i++) {\n\t\t\tfor (int j=i+1; j<=answer.size()-1;j++) {\n\t\t\t\tString first=answer.get(i);\n\t\t\t\tString second=answer.get(j);\n\t\t\t\t\n\t\t\t\tPerson personFirst=g.members[g.map.get(first)];\n\t\t\t\tPerson personSecond=g.members[g.map.get(second)];\n\t\t\t\t\n\t\t\t\t//if the personFirst's friend's name is the same as second\n\t\t\t\tif ((g.members[personFirst.first.fnum].name.equals(second)&& personFirst.first.next==null)&&\n\t\t\t\t\t\t(g.members[personSecond.first.fnum].name.equals(first)&& personSecond.first.next==null)) {\n\t\t\t\t\tif (answer.size()==2) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tanswer.remove(i);\n\t\t\t\t\tanswer.remove(j+1);\n\t\t\t\t\ti=-1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}",
"private static <T> void vecswap(int x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"public static void main(String args[]) {\n ArrayList al = new ArrayList();\n // add elements to the array list\n al.add(\"C\");\n al.add(\"A\");\n al.add(\"E\");\n al.add(\"B\");\n al.add(\"D\");\n al.add(\"F\");\n\n // Use iterator to display contents of al\n System.out.print(\"Original contents of al: \");\n Iterator itr = al.iterator();\n\n while (itr.hasNext()) {\n Object element = itr.next();\n System.out.print(element + \" \");\n }\n System.out.println();\n\n // Modify objects being iterated\n ListIterator litr = al.listIterator();\n while (litr.hasNext()) {\n Object element = litr.next();\n litr.set(element + \"+\");\n }\n System.out.print(\"Modified contents of al: \");\n itr = al.iterator();\n while (itr.hasNext()) {\n Object element = itr.next();\n System.out.print(element + \" \");\n }\n System.out.println();\n // Now, display the list backwards\n System.out.print(\"Modified list backwards: \");\n\n while (litr.hasPrevious()) {\n Object element = litr.previous();\n System.out.print(element + \" \");\n }\n System.out.println();\n }",
"public ArrayList<Integer> enLigeListe(ArrayList<Integer> list) {\r\n ArrayList<Integer> ligeListe = new ArrayList<>();\r\n for (int i = 0; i < list.size(); i++) {\r\n if (list.get(i) % 2 != 1) {\r\n ligeListe.add(list.get(i));\r\n }\r\n }\r\n return ligeListe;\r\n }",
"public void swapGroups(int i1, int i2)\n/* 30: */ {\n/* 31:26 */ String s1 = (String)this.members.get(i1);\n/* 32:27 */ String s2 = (String)this.members.get(i2);\n/* 33: */ \n/* 34:29 */ this.members.set(i1, s2);\n/* 35:30 */ this.members.set(i2, s1);\n/* 36: */ }",
"private static <T> void vecswap(byte x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T> void vecswap(char x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"private static <T,P> void vecswap(T x[], P[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void vecswap(int x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"public ArrayList<ArrayList<String>> fromFirstToSecond(ArrayList<String> words);",
"@Override\n protected void swap(int i, int j)\n {\n E temp = this.elements[i];\n this.elements[i] = this.elements[j];\n \tthis.elementsToArrayIndex.put(elements[i], i);\n this.elements[j] = temp;\n \tthis.elementsToArrayIndex.put(elements[j], j);\n }",
"private static void vecswap(char x[], char[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}",
"public static List<Integer> replace(List<Integer> list){\n\t\tList<Integer> r= new ArrayList<Integer>();\n\t\tr.add(7);\n\t\tr.add(-4);\n\t\tr.add(0);\n\t\tr.add(7);\n\t\tr.add(7);\n\t\t\n\t\treturn r;\n\t}",
"private static <T> void vecswap(long x[], T[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private static void vecswap(double x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"public static <T> void swap(List<T> listA, int indexA, List<T> listB, int indexB) {\n T tmp = listA.get(indexA);\n listA.set(indexA, listB.get(indexB));\n listB.set(indexB, tmp);\n }",
"public static void main(String[] args) {\n\t\tArrayList<String> list=new ArrayList();\r\n\t\tlist.add(\"first\");//add the first into list\r\n\t\tlist.add(\"second\");\r\n\t\tIterator itr=list.iterator();\r\n\t\tSystem.out.println(\"List of values\");\r\n\t\twhile(itr.hasNext())//returns true if the iteration\r\n\t\t{\r\n\t\t\tSystem.out.println(itr.next());\r\n\t\t}\r\n\t\tSystem.out.println(\"Update values\");\r\n\t\tlist.set(1, \"35\");\r\n\t\tIterator itr1=list.iterator();\r\n\t\twhile(itr1.hasNext())//returns true if the iteration\r\n\t\t{\r\n\t\t\tSystem.out.println(itr1.next());\r\n\t\t}\r\n\t}",
"private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }",
"public static void slide127() {\n ArrayList<String> obj = new ArrayList<String>();\n\n //This is how we add elements to an ArrayList\n obj.add(\"Alex\");\n obj.add(\"Con\");\n obj.add(\"Paul\");\n obj.add(\"Estel\");\n obj.add(\"Peter\");\n\n // Displaying elements\n System.out.println(\"Original ArrayList:\");\n for(String str:obj)\n System.out.println(str);\n\n // Add element at the specific index\n\n obj.add(0, \"Mary\");\n obj.add(1, \"Justin\");\n\n // Displaying elements\n System.out.println(\"ArrayList after add operation:\");\n for(String str:obj)\n System.out.println(str);\n\n //Remove elements from ArrayList like this\n obj.remove(\"Peter\");\n obj.remove(\"Paul\");\n\n // Displaying elements\n System.out.println(\"ArrayList after remove operation:\");\n for(String str:obj)\n System.out.println(str);\n\n // Edit element from ArrayList\n obj.set(2, \"Tom\");\n\n // Displaying elements\n System.out.println(\"ArrayList after edit operation:\");\n for(String str:obj)\n System.out.println(str);\n\n\n //Remove element from the specified index\n obj.remove(1); //Removes Second element from the List\n\n // Displaying elements\n System.out.println(\"Final ArrayList:\");\n for(String str:obj)\n System.out.println(str);\n }",
"private static <T> void vecswap(double x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"@Test\n public void testSubList_SubList_Item_Update_idempotent() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> expResult = Arrays.asList(1, 7, 7);\n SegmentedOasisList<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n\n instance.set(3, 8);\n\n assertTrue(isEqual(expResult, result));\n\n }",
"private static void swap(Object[] x, int a, int b)\n {\n Object t = x[a];\n x[a] = x[b];\n x[b] = t;\n }",
"public static void reverse(ArrayList<City> routine, int index1 , int index2){\n ArrayList <City> temp = new ArrayList <>(routine.subList(index1, index2));\n Collections.reverse(temp);\n int j = 0;\n for(int i = index1; i < index2; i++){\n routine.set(i, temp.get(j));\n j++;\n }\n }",
"public void swapArrayElement(int elem1, int elem2) {\n int index1 = 0, index2 = 0, temp;\n for (int i = 1; i < myArray.length; i++) {\n if (myArray[i] == elem1)\n index1 = i;\n if (myArray[i] == elem2)\n index2 = i;\n }\n temp = myArray[index1];\n myArray[index1] = myArray[index2];\n myArray[index2] = temp;\n }",
"private static void vecswap(double x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}",
"private void updateElementListFromSegment(ArrayList<Integer> indices, List<Integer> elementList) {\n\n for (int j = indices.size() - 1; j >= 0; j--) {\n\n updateElementListFromSegmet(indices.get(j), elementList);\n\n }\n }",
"private static <Key extends Comparable<Key>> void exch(Key[] a, int i, int j)\n\t{\n\t\tKey tmp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = tmp;\n\t}",
"private static void listIteratorMovesInBothDirections(){\n\t ArrayList<String> list = new ArrayList<String>();\n\t \n\t list.add(\"ONE\");\n\t \n\t list.add(\"TWO\");\n\t \n\t list.add(\"THREE\");\n\t \n\t list.add(\"FOUR\");\n\t \n\t //RSN NOTE ListIterator\n\t ListIterator iterator = list.listIterator();\n\t \n\t System.out.println(\"Elements in forward direction\");\n\t \n\t while (iterator.hasNext())\n\t {\n\t System.out.println(iterator.next());\n\t }\n\t \n\t System.out.println(\"Elements in backward direction\");\n\t \n\t while (iterator.hasPrevious())\n\t {\n\t System.out.println(iterator.previous());\n\t }\n\t}",
"private void exchangeCards(int i, int j){\r\n\t Card temp = cards[i];\r\n\t cards[i] = cards[j];\r\n\t cards[j] = temp;\r\n\t}",
"public ArrayList<ArrayList<String>> fromSecondToFirst(ArrayList<String> words);",
"public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}",
"public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }",
"private static <T,S> void swap(T x[], int[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void exch(Object[] a, int i, int j) {\r\n Object swap = a[i];\r\n a[i] = a[j];\r\n a[j] = swap;\r\n }",
"public static void stepOne(ArrayList<Integer> list) {\n\t\t\n\t\t//keep track of number of times list is passed through\n\t\tint passNumber = 0;\n\t\t\n\t\t//iterate through arraylist from right to left\n\t\tfor(int i = list.size()-1; i >= 0; i--) {\n\n\t\t\tint newNum = list.get(i);\n\t\t\tpassNumber++;\n\t\t\t\n\t\t\t//for every other number beginning with second from the right\n\t\t\t//double number -- if two digit number results, add digits together\n\t\t\tif (passNumber % 2 == 0) {\n\t\t\t\n\t\t\t\tnewNum *= 2;\n\t\t\t\t\n\t\t\t\t//add digits together if two digit number \n\t\t\t\tif (newNum > 9) {\n\t\t\t\t\tint sum = 0;\n\t\t\t\t\t\n\t\t\t\t\twhile(newNum > 0) {\n\t\t\t\t\t\tsum = sum + newNum % 10;\n\t\t\t\t\t\tnewNum = newNum / 10;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnewNum = sum;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//replace number in list with new number\n\t\t\t\tlist.set(i, newNum);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"private static <Key extends Comparable<Key> > void exch(Key []a, int i, int j){\n Key tmp=a[i-1];\n a[i-1]=a[j-1];\n a[j-1]=tmp;\n }",
"private static void exchange( Comparable[] datos, int i, int j)\n\t{\n\t\t// TODO implementar\n\t\tComparable copia=datos[j];\n\t\tdatos[j]=datos[i];\n\t\tdatos[i]=copia; \n\t}",
"private static <T> void swap(byte x[],T[] a2, int a, int b) {\n\t\tbyte t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private void swapAt(int i, int j) {\n\t\tfloat tmp = sequence[i];\n\t\tsequence[i] = sequence[j];\n\t\tsequence[j] = tmp;\n\t}",
"private static void copyRemainder(ArrayList<Integer> inputList, int inputIndex, ArrayList<Integer> outList, int outIndex) {\n while (inputIndex < inputList.size()) {\n outList.set(outIndex, inputList.get(inputIndex));\n\n inputIndex++;\n outIndex++;\n }\n }",
"private static <T> void swap(long x[], T[] a2, int a, int b) {\n\t\tlong t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static <T> void swap(int x[], double[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"private static void mergeLists() {\n\t\tint length = (photoList.size() / 2) - 1;\n\t\t\n\t\tif (photoList.size() % 2 == 0) {\n\t\t\tlength++;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tList<String> tL = new ArrayList<String>();\n\t\t\t\n\t\t\tPhoto p1 = photoList.get(i),\n\t\t\t\t p2 = photoList.get(photoList.size() - 1 - i);\n\t\t\t\n\t\t\tfor (String tag : p1.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String tag : p2.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < tL.size() - 1; j++) {\n\t\t\t\tfor (int k = j; k < tL.size(); k++) {\n\t\t\t\t\tif (tL.get(j).equals(tL.get(k))) {\n\t\t\t\t\t\ttL.remove(k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tslideList.add(new Slide(p1.getPhotoId(), p2.getPhotoId(), tL));\n\t\t}\n\t}",
"private void swap(int i, int j) {\n\t\tint tmp = data.get(i);\n\t\tdata.set(i, data.get(j));\n\t\tdata.set(j, tmp);\n\t}",
"public void swap(List<PhotoDBVo> photoDBVoList)\n {\n if(mItems != null)\n {\n mItems.clear();\n }\n mItems.addAll(photoDBVoList);\n notifyDataSetChanged();\n }",
"private static <T> void swap(int x[], T[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static void main(String[] args) {\n\n\t\tArrayList arr = new ArrayList();\n\n\t\tarr.add(2);\n\t\tarr.add(10);\n\t\tarr.add(\"Hello\");\n\t\tarr.add(\"Java Developer\");\n\t\tarr.add('J');\n\t\tarr.add(2.5);\n\t\tarr.add(2);\n\t\tarr.add(2);\n\n\t\tSystem.out.println(arr);\n\t\tSystem.out.println(\"Size of ArrayList :\" + arr.size());\n\t\t\n\t\tListIterator itr = arr.listIterator();\n\t\twhile(itr.hasNext()){\n\t\t\t\n\t\t\tObject obj = itr.next();\n\t\t\titr.set(obj +\"Tops\");\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"After the modification\");\n\t\t\n\t\titr = arr.listIterator();\n\t\t\n\t\twhile(itr.hasNext()){\n\t\t\t\n\t\t\tObject obj = itr.next();\n\t\t\tSystem.out.println(\"Ele :\"+obj);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Reverse Order\");\n\t\twhile(itr.hasPrevious()){\n\t\t\t\n\t\t\tObject obj = itr.previous();\n\t\t\tSystem.out.println(\"Ele :\" +obj);\n\t\t}\n\n\t}",
"public Integer addStuffTogether(ArrayList<Integer> original1, ArrayList<Integer> original2) {\n Integer sum = 0;\n for (Integer i : original1) {\n sum += i;\n }\n for (Integer i : original2) {\n sum += i;\n }\n return sum;\n }",
"private void swap( int i, int j )\n {\n\t\n\tString jStr = _fruits[j] ;\n\t_fruits[j] = _fruits[i];\n\t_fruits[i] = jStr;\n }",
"private static void vecswap(int x[], int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a, b);\n\t}",
"private static void exch(String[] a, int i, int j) {\n String temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }",
"private static void exch(String[] a, int i, int j) {\n String temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }",
"private void swap(int one, int two)\r\n {\r\n//*** one->two\r\n long temp = a[two];\r\n a[one] = a[two];\r\n a[two] = temp;\r\n }",
"public void permutate(Object[] x) {\n for (int i = 0; i < x.length; i++) {\n int j = i + nextInt(x.length - i);\n Math.swap(x, i, j);\n }\n }",
"private static void swap(int x[], int[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"public static Object[] updateAbsInfos(Object[] a1, Object[] a2) {\n ArrayList<Object> a = new ArrayList<>();\n Collections.addAll(a, a1.length != 0 ? a1 : a2);\n\n // on actualise les elements qui ont le meme id, sinon on ajoute une entree\n for (Object o : a2) {\n Information i = (Information) o;\n for (int c = 0; c < a1.length; c++)\n //for (Object i1 : a1)\n if (a1[c] instanceof Information && ((Information) a1[c]).getIdInformation() == i.getIdInformation()) {\n // s'ils ont le meme id\n a.set(a.indexOf(a1[c]), i);\n break;\n } else if(c == a1.length - 1) a.add(i); // sinon on l'ajoute à la liste\n }\n\n return a.toArray(new Object[]{});\n }",
"IList<Cell> updateCells(ArrayList<ArrayList<Cell>> cells) {\n IList<Cell> result = new MtList<Cell>();\n for (int i = 0; i < cells.size(); i = i + 1) {\n for (int j = 0; j < cells.get(i).size(); j = j + 1) {\n result = new ConsList<Cell>(cells.get(i).get(j), result);\n }\n }\n return result;\n }",
"private Pallet exchange(int i, int j) {\n Pallet result = (Pallet) clone();\n result.pallet[i] = pallet[j];\n result.pallet[j] = pallet[i];\n return result;\n }",
"private static <T,S> void swap(T x[], S[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tS t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}",
"@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }"
] | [
"0.6445739",
"0.6445739",
"0.63292384",
"0.6266192",
"0.62650967",
"0.6198205",
"0.6133181",
"0.6081563",
"0.60116553",
"0.59627163",
"0.5943907",
"0.58384424",
"0.58279544",
"0.57907045",
"0.57080704",
"0.5701544",
"0.56629115",
"0.565555",
"0.5631874",
"0.56278974",
"0.56136394",
"0.55917996",
"0.5535891",
"0.5517866",
"0.5506316",
"0.5505556",
"0.5494994",
"0.54560906",
"0.54344374",
"0.5428258",
"0.54185534",
"0.5390253",
"0.5329905",
"0.53226334",
"0.5319891",
"0.5312415",
"0.5309852",
"0.53060466",
"0.529697",
"0.5288763",
"0.52813774",
"0.5272829",
"0.5269777",
"0.52644485",
"0.52577186",
"0.5242238",
"0.52381825",
"0.5238065",
"0.5237921",
"0.5236816",
"0.5230811",
"0.5193866",
"0.5182418",
"0.5165843",
"0.5165743",
"0.5164188",
"0.5162339",
"0.5157773",
"0.515234",
"0.5152132",
"0.5151553",
"0.51495236",
"0.51455855",
"0.51447797",
"0.5141886",
"0.5139564",
"0.51375586",
"0.5135601",
"0.5135601",
"0.5129812",
"0.5129812",
"0.5129812",
"0.5121862",
"0.51029056",
"0.50999683",
"0.50959533",
"0.50894624",
"0.5085321",
"0.5082859",
"0.50804806",
"0.50720704",
"0.50716287",
"0.50659025",
"0.50546086",
"0.5054509",
"0.50541484",
"0.5050335",
"0.50436985",
"0.5036553",
"0.5035554",
"0.50295603",
"0.50295603",
"0.5023983",
"0.5020385",
"0.5018179",
"0.5003103",
"0.49984217",
"0.49959642",
"0.49939924",
"0.49891835"
] | 0.599226 | 9 |
TODO Autogenerated method stub | @Override
public void Update() {
super.Update();
super.decisionRect.x=coordinate.x+(Global.GetGlobal().GetTreeImgRect().width-decisionRect.width)/2;
super.decisionRect.y=coordinate.y+(Global.GetGlobal().GetTreeImgRect().height-decisionRect.height)/2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void Draw(Graphics g) {
super.Draw(g);
// g.drawRect(decisionRect.x,decisionRect.y,decisionRect. width, decisionRect.height);
} | {
"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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\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.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
] | 0.0 | -1 |
Created by Administrator on 2017/8/25. | public interface BasicConfig {
public static final String CONFIG_RREFIX = "atencn.netty";
public static final int PINGPONG_CMD = -16705;
public static final int PINGPONG_SUB = -50761;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\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 bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"public final void mo51373a() {\n }",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private static void cajas() {\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\n public void memoria() {\n \n }",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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 }",
"Petunia() {\r\n\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public contrustor(){\r\n\t}",
"private TMCourse() {\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\n\tpublic void create () {\n\n\t}",
"public void mo6081a() {\n }",
"@Override\n public void init() {\n\n }",
"public void mo55254a() {\n }",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void create() {\n\t\t\n\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n protected void getExras() {\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"public void create() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n void init() {\n }",
"private UsineJoueur() {}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo12930a() {\n }",
"public void verarbeite() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void create() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private static void oneUserExample()\t{\n\t}",
"private Singletion3() {}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tpublic void create() {\n\r\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\tprotected void initialize() {\n\n\t}",
"private void poetries() {\n\n\t}",
"protected void mo6255a() {\n }",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void create() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@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\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public int describeContents() { return 0; }"
] | [
"0.63064265",
"0.6114075",
"0.5849247",
"0.5845641",
"0.58346254",
"0.5826698",
"0.5792644",
"0.57583886",
"0.5751052",
"0.5751052",
"0.57508814",
"0.57332253",
"0.5726226",
"0.5706651",
"0.5706191",
"0.5703412",
"0.5703412",
"0.5691554",
"0.5673844",
"0.56733227",
"0.56693476",
"0.56326437",
"0.56286806",
"0.56278217",
"0.5614617",
"0.5597232",
"0.5597232",
"0.5597232",
"0.5597232",
"0.5597232",
"0.5597232",
"0.5597232",
"0.55874455",
"0.5572868",
"0.5570592",
"0.5562145",
"0.5554751",
"0.55542994",
"0.5543922",
"0.5531557",
"0.5522339",
"0.5518383",
"0.55076927",
"0.5496693",
"0.5496506",
"0.5489821",
"0.54835236",
"0.5482663",
"0.5482663",
"0.5482663",
"0.5482663",
"0.5482663",
"0.5482663",
"0.54715794",
"0.54603386",
"0.54543465",
"0.544865",
"0.54255337",
"0.5413515",
"0.54041034",
"0.5402565",
"0.54025453",
"0.5402111",
"0.54017967",
"0.54011965",
"0.5392999",
"0.53857285",
"0.53856885",
"0.53839976",
"0.53839105",
"0.53839105",
"0.5383278",
"0.5382876",
"0.5374105",
"0.5363669",
"0.53629375",
"0.53609496",
"0.535883",
"0.5357673",
"0.5355623",
"0.5353628",
"0.53519684",
"0.53519684",
"0.53519684",
"0.53519684",
"0.53519684",
"0.53515184",
"0.53506875",
"0.5347502",
"0.534239",
"0.53306925",
"0.5329817",
"0.5326263",
"0.5320608",
"0.532038",
"0.532038",
"0.5305229",
"0.5305229",
"0.5305229",
"0.53035575",
"0.53033024"
] | 0.0 | -1 |
/ algo 1. find the multiples of numbers in first array | public static void main(String[] args) {
int[] arr = {2,6};
for (int i = 0; i < arr.length; i++) {
int[] arrNew = null;
for (int j = 1; j < 100; j++) {
arrNew[j] = arr[i] *j ;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int countMults(int[] nums, int divisibility){\n int total = 0;\n for(int num : nums){\n if(num % divisibility == 0){\n total ++;\n }\n }\n// System.out.println(\"Should return 3 \" + total);\n return total;\n }",
"public static void exArray01() {\r\n\r\n\t\tint i = 0;\r\n\t\tint K = 2;\r\n\t\tint sum = 0;\r\n\t\tint[] a = new int[5];\r\n\r\n\t\tSystem.out.println(\"Array with random numbers: \");\r\n\r\n\t\tfor (i = 0; i < a.length; i++) {\r\n\t\t\ta[i] = Helper.getRandomRange(1, 10);\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < a.length; i++) {\r\n\r\n\t\t\tif ((a[i] % K) == 0) {\r\n\t\t\t\tsum += a[i];\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"\\nSum of all multiples to \" + K + \" equals to \" + sum);\r\n\r\n\t}",
"public static void main(String[] args) {\n int product = 1;\n int[] factors = new int[max]; //The position in the array represents the actual factor, the number at that position is the number of occurrences of that factor\n\n for (int i = 2; i < max + 1; i++) { //Checking divisibility by numbers 2-20 inclusive.\n int temp = i;\n for (int j = 2; j < max; j++) { //Checking to see if the number can be represented with current factors in the factors array\n int numOfFactor = factors[j]; //Don't want to change the actual value in the array so we make a copy\n\n while (temp % j == 0 && temp >= j) { //While j, the current factor in the array, is a factor of i and i is smaller than j then divide by j and increment its occurrence in the factors array\n if (numOfFactor > 0) //If j is in the array of factors \"use it\" and decrement the counter for it\n numOfFactor--;\n else //otherwise if the factor doesn't exist in the array add it by incrementing value at the position\n factors[j]++;\n temp /= j; //No matter what, if temp had a factor, it gets smaller\n }\n if (temp < j)\n break; //Don't bother checking the rest of the array since larger numbers can't go into a smaller one...\n }\n }\n\n for (int i = 2; i < max; i++) { //Find the product of all the factors\n if (factors[i] > 0) {\n for (int j = factors[i]; j > 0; j--) { //If there are factors at position j, multiply them!\n product *= i;\n }\n }\n }\n System.out.println(product);\n\n }",
"public int[] repeatedNumber(final int[] a) {\n\n long rSum = 0, rSumSq = 0, aSum = 0, aSumSq = 0;\n\n for (int i = 0; i < a.length; i++) {\n\n aSum += a[i];\n\n rSum += (i + 1);\n\n aSumSq += (long) ((long) a[i] * (long) a[i]);\n\n rSumSq += (long) ((long) (i + 1) * (long) (i + 1));\n\n }\n\n long x = 0, y = 0, z = 0;\n\n y = (rSum - aSum);\n\n z = (rSumSq - aSumSq);\n\n if (y != 0)\n\n x = z / y;\n\n else\n x = 0;\n\n int res[] = new int[2];\n\n res[1] = (int) (x + y) / 2;\n\n res[0] = (int) (x - y) / 2;\n\n return res;\n\n }",
"public static int getTotalX(List<Integer> a, List<Integer> b) {\n\t List<Integer> num=new ArrayList<>();\n\t for(int ind=a.get(a.size()-1);ind<=b.get(0);ind++){\n\t int count=0;\n\t for(int ind1=0;ind1<a.size();ind1++){\n\t if(ind%a.get(ind1)==0){\n\t count++;\n\t }else{\n\t break;\n\t }\n\t }if(count==a.size()){\n\t num.add(ind);\n\t }\n\t }\n\t for(int ind=0;ind<num.size();ind++){\n\t for(int ind1=0;ind1<b.size();ind1++){\n\t if(b.get(ind1)%num.get(ind)!=0){\n\t num.remove(ind);\n\t break;\n\t }\n\t }\n\t }\n\t System.out.println(num);\n\t return num.size();\n\n\t }",
"private int[] process(int[] ip)\n\t{\n\t\tint[] result = new int[ip.length];\n\t\t//first multiply all numbers\n\t\tint x = ip[0];\n\t\tfor(int i=0; i<ip.length; i++)\n\t\t{\n\t\t\tx = x*ip[i];\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ip.length; i++)\n\t\t{\n\t\t\tresult[i] = x / ip[i];\n\t\t}\n\t\treturn result;\n\t}",
"public List<Integer> largestDivisibleSubsetA(int[] nums) {\r\n List<Integer> lstSubset = new ArrayList<>();\r\n if (nums == null || nums.length == 0) return lstSubset;\r\n if (nums.length == 1) {\r\n lstSubset.add(nums[0]);\r\n return lstSubset;\r\n }\r\n \r\n int n = nums.length;\r\n int i;\r\n int nMaxLen = 0;\r\n int baseNum = 0;\r\n int facted = 0;\r\n int newNum = 0;\r\n boolean bExist = false;\r\n Set<Integer> setNum = new HashSet<Integer>();\r\n \r\n Arrays.sort(nums);\r\n \r\n for (i=0; i<n; i++) setNum.add(nums[i]);\r\n \r\n for (i=0; i<n-1; i++) {\r\n List<Integer> lstSubTmp = new ArrayList<Integer>();\r\n baseNum = nums[i];\r\n \r\n lstSubTmp.add(baseNum);\r\n bExist = false;\r\n facted = 2; \r\n newNum = baseNum*facted;\r\n \r\n while (newNum <= nums[n-1]) {\r\n if (setNum.contains(newNum)) {\r\n lstSubTmp.add(newNum);\r\n baseNum = newNum;\r\n bExist = true;\r\n } else {\r\n bExist = false;\r\n }\r\n \r\n if (bExist == true) {\r\n facted = 2;\r\n } else {\r\n facted++;\r\n }\r\n \r\n newNum = baseNum*facted;\r\n }\r\n \r\n if (nMaxLen < lstSubTmp.size()) {\r\n nMaxLen = Math.max(nMaxLen, lstSubTmp.size());\r\n lstSubset = new ArrayList<Integer>(lstSubTmp);\r\n }\r\n }\r\n \r\n return lstSubset;\r\n }",
"public List<Integer> getSelfDivisibleNumbers() \r\n\t{\r\n\t\tList <Integer> rtnList = new ArrayList <Integer>();\r\n\t\tint[] strArray = {1,2};\r\n\t\tint start = getFirstKDigitNumber(strArray,2);\r\n\r\n\t\tfor(int i = start; i < 99; i++)\r\n\t\t{\r\n\t\t\tif(isDivisible(i,2) && !isDivisible(i,10))\r\n\t\t\t{\r\n\t\t\t\trtnList.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\t * ^^^^ This code gets all the even double digit numbers that don't contain zero;\r\n\t\t */\r\n\r\n\t\tfor(int j = 3; j < 10; j++)\r\n\t\t{\r\n\t\t\tint listLength = rtnList.size();\r\n\t\t\tfor(int k = 0; k < listLength; k++)\r\n\t\t\t{\r\n\t\t\t\tboolean [] presentDigits = new boolean[10];\r\n\t\t\t\tint num = rtnList.get(k);\r\n\r\n\t\t\t\twhile(num != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tint digit = num%10;\r\n\t\t\t\t\tpresentDigits[digit] = true; // initial run establishes true positions in both 1 and 2 as the first number in array (i.e position 0) is 12;\r\n\t\t\t\t\tnum = num/10;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(int z = 1; z < 10; z++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(presentDigits[z] == false) // loop through finding where false in boolean array (i.e position 3 on initial run);\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tint currNum = rtnList.get(k);\r\n\t\t\t\t\t\tcurrNum *= 10; // 120.....140 // Multiply first number in array by 10 (i.e 12 * 10 = 120);\r\n\t\t\t\t\t\tcurrNum += z; // 3.......3 // Add the number z to the number (i.e 120 + 3 = 123);\r\n\r\n\t\t\t\t\t\tif(isDivisible(currNum, j)) // check if 123 is divisible by starting loop number j which is 3! \r\n\t\t\t\t\t\t\t//as we have now three digits in our number 123 this process continues for all numbers up to 9;\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\trtnList.add(currNum);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tint x = 0;\r\n\r\n\t\t\twhile (x < listLength)\r\n\t\t\t{ \t\r\n\t\t\t\trtnList.remove(0);\r\n\t\t\t\tx++;\t\r\n\t\t\t} \r\n\r\n\t\t\t// resets array once surpassing inital length in order to speed up run time and such\r\n\t\t}\r\n\t\treturn rtnList;\r\n\t}",
"public static void main(String[] args) throws java.lang.Exception {\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\t// output the sum of divisors of numbers in an array having exactly 4 divisors.\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint len = s.nextInt();\n\t\t\tint[] subsequence = new int[len];\n\t\t\tint key = 0;\n\t\t\tint[] div = new int[len];\n\t\t\tint[] div1 = new int[len];\n\t\t\tint sum = 0;\n\t\t\tfor (int j = 0; j < len; j++) {\n\n\t\t\t\tsubsequence[j] = s.nextInt();\n\t\t\t\tint d = (int) Math.sqrt(subsequence[j]);\n\t\t\t\tif (d * d == subsequence[j])\n\t\t\t\t\tcontinue;\n\t\t\t\tboolean f = false;\n\t\t\t\tfor (int k = 2; k <= d; k++) {\n\t\t\t\t\tif (subsequence[j] % k == 0) {\n\t\t\t\t\t\tif (div1[key] == 0) {\n\t\t\t\t\t\t\tdiv1[key] = k;\n\t\t\t\t\t\t\tdiv[key] = subsequence[j];\n\t\t\t\t\t\t\tf = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tf = false;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif (f) {\n\t\t\t\t\tkey++;\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t}\n\t\t\tint n = 0;\n\t\t\tfor (int k = 0; k < key; k++) {\n\t\t\t\tn = div[k] / div1[k];\n\t\t\t\tsum += 1 + div[k] + div1[k] + n;\n\t\t\t}\n\t\t\tSystem.out.println(sum);\n\n\t\t}\n\n\t\ts.close();\n\n\t}",
"public List<Integer> largestDivisibleSubset(int[] nums) {\n //1,2,6,18\n if(nums.length == 0){\n return new ArrayList<>();\n }\n Arrays.sort(nums);\n List<Integer>[] cache = new ArrayList[nums.length];\n for(int i=0; i<cache.length; i++){\n List<Integer> list = new ArrayList<>();\n list.add(nums[i]);\n cache[i] = list;\n }\n\n for(int i=nums.length-2; i>=0; i--){\n for(int j=i+1; j<nums.length; j++){\n if(nums[j]%nums[i] == 0 && cache[j].size()+1 > cache[i].size()){\n List<Integer> list = new ArrayList<>();\n list.add(nums[i]);\n list.addAll(cache[j]);\n cache[i] = list;\n }\n }\n }\n\n int maxCnt = 0;\n int pos = 0;\n for(int i=0; i<cache.length; i++){\n if(cache[i].size() > maxCnt){\n maxCnt = cache[i].size();\n pos = i;\n }\n }\n return cache[pos];\n }",
"public static List<Integer> largestDivisibleSubsetUsingDp(int[] a) {\n\t\tArrays.sort(a);\n\t\tint t[] = new int[a.length];\n\t\tint r[] = new int[a.length];\n\n\t\tList<Integer> res = new ArrayList<>();\n\t\tint max_value = 1;\n\t\tint max_index = 0;\n\t\tArrays.fill(t, 1);\n\t\tr[0] = -1;\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (a[i] % a[j] == 0) {\n\t\t\t\t\tif (1 + t[j] > t[i]) {\n\t\t\t\t\t\tt[i] = 1 + t[j];\n\t\t\t\t\t\tr[i] = j;\n\t\t\t\t\t\tif (t[i] > max_value) {\n\t\t\t\t\t\t\tmax_value = t[i];\n\t\t\t\t\t\t\tmax_index = i;\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\n\t\tint idx = max_index;\n\t\twhile (idx >= 0) {\n\t\t\tres.add(a[idx]);\n\t\t\tidx = r[idx];\n\t\t}\n\t\treturn res;\n\t}",
"public int getSumOfMultiples(int i, int[] set) {\n\t\tint min = set[0];\n\t\tint sum = 0;\n\t\t\n\t\tfor(int k = 0; k < set.length; k++) {\n\t\t\tif(set[k] < min) {\n\t\t\t\tmin = set[k];\n\t\t\t}\n\t\t}\n\t\tfor(int x = min; x < i; x++) {\n\t\t\tboolean multiplefound = false;\n\t\t\tfor(int y = 0; y < set.length; y++) {\n\t\t\t\tif(x % set[y] == 0) {\n\t\t\t\t\tmultiplefound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(multiplefound == true) {\n\t\t\t\tsum += x;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//System.out.println(sum);\n\t\treturn sum;\n\t}",
"public static int solution(int[] l) {\n // remainder 1 mod 3\n final List<Integer> r1 = new ArrayList<>();\n // remainder 2 mod 3\n final List<Integer> r2 = new ArrayList<>();\n // remainder 0 mod 3;\n final List<Integer> r0 = new ArrayList<>();\n int total = 0;\n for (int num : l) {\n if (num % 3 == 0) {\n r0.add(num);\n } else if (num % 3 == 1) {\n r1.add(num);\n } else {\n r2.add(num);\n }\n total = (total + num) % 3;\n }\n final List<Integer> ok = new ArrayList<>(r0);\n if (total == 0) {\n ok.addAll(r1);\n ok.addAll(r2);\n } else if (total == 1) {\n Collections.sort(r1);\n Collections.sort(r2);\n if (!r1.isEmpty()) {\n for (int i = 1; i < r1.size(); i++) { ok.add(r1.get(i)); }\n ok.addAll(r2);\n } else {\n for (int i = 2; i < r2.size(); i++) { ok.add(r2.get(i)); }\n }\n } else if (total == 2) {\n Collections.sort(r1);\n Collections.sort(r2);\n if (!r2.isEmpty()) {\n for (int i = 1; i < r2.size(); i++) { ok.add(r2.get(i)); }\n ok.addAll(r1);\n } else {\n for (int i = 2; i < r1.size(); i++) { ok.add(r1.get(i)); }\n }\n }\n ok.sort(Collections.reverseOrder());\n int res = 0;\n for (int num : ok) {\n res = res * 10 + num;\n }\n return res;\n }",
"public int[] getExpectedProducts(int[] arr) {\n int[] res = new int[arr.length];\n\n for(int i = 0; i < arr.length; i++) {\n res[i] = 1;\n\n for(int j = 0; j < arr.length; j++) {\n if(i != j) {\n res[i] *= arr[j];\n }\n }\n }\n\n return res;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tint n = sc.nextInt();\r\n\t\tint[] a = new int[n];\r\n\t\tfor(int i = 0; i < n; i++){\r\n\t\t\ta[i] = sc.nextInt();\r\n\t\t}\r\n\t\tint res = 0, p = 0, t = 0;\r\n\t\twhile(true){\r\n\t\t\tp = 0; t = 0;\r\n\t\t\tfor(int i = 0; i < a.length; i++){\r\n\t\t\t\t\r\n\t\t\t\tif(i == a.length-1){\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t\ta[0] += p;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\tint temp = a[0];\r\n\t\t\tfor(int j = 1; j < a.length; j++){\r\n\t\t\t\tif(a[j] != temp){\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag){\r\n\t\t\t\tSystem.out.println(res);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(int j = 0; j < a.length; j++){\r\n\t\t\t\tif(a[j] % 2 != 0){\r\n\t\t\t\t\ta[j] += 1;\r\n\t\t\t\t\tres++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint[] a = {23,12,45,98,54};\r\n\t\t\r\n\t\tint [] result = new int [6]; //{54,98,45,12,23}\r\n\t\t\r\n\t\tint [] b = new int[6];\r\n\t\r\n\t\t\r\n\t\tfor(int i =0; i<a.length; i++) {\r\n\t\t\tresult[5 - i] = a[i];\r\n\t\t}\r\n\t\tfor(int i : result) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\t//a 배열과 b배열의 값은 index 해당하는 값을 더하고 그 결과가 3의 배수이면 result 의 \r\n\t\t//해당 index에 값을 5배 하여 저장하고 그렇지 않은 index에는 10을 저장함 \r\n\t\t\r\n\t\tfor (int i=0; i<6; i++) {\r\n\t\t\tif((a[i] + b[i])%3 ==0)\r\n\t\t\t{\r\n\t\t\t\tresult[i] = a[i] + b[i]*5;\r\n\t\t\t}\r\n\t\t\telse result[i] = 10;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"static int getTotalX(int[] aryA, int[] aryB){\n int maxA = getMax(aryA);\n int minA = getMin(aryA);\n int maxB = getMax(aryB);\n int minB = getMin(aryB);\n // identify the range of values we need to check\n int min = Math.max(minA, maxA);\n int max = Math.min(minB, maxB);\n int nBetweenAB = 0; // the number of integers \"between\" set A and B\n\n boolean allA_divides_x;\n boolean xDividesAllB;\n // test each candidate and determin if it is \"between\" set A and B\n for(int x=min; x<=max; x++) {\n // check to see if all A | x\n allA_divides_x = true; // default to true, will trigger false if it occurs and break\n for(int idx=0; idx<aryA.length; idx++) {\n if(x % aryA[idx] != 0){\n allA_divides_x = false;\n break;\n }\n } // for\n\n // check to see if x | all B\n xDividesAllB = true;\n for(int idx=0; idx<aryB.length; idx++) {\n if(aryB[idx] % x != 0) {\n xDividesAllB = false;\n continue;\n }\n }\n // count if all conditions are met\n if( allA_divides_x && xDividesAllB )\n nBetweenAB++;\n } // for x\n return nBetweenAB;\n}",
"public static void main(String[] args) {\n int v1[] = new int[50];\r\n int v2[] = new int[50];\r\n int posicao_v2 = 0;\r\n int quantidade_divisores = 0;\r\n //preenche o vetor de 1 a 50 \r\n for (int i = 0; i < 50; i++) {\r\n v1[i] = i + 1;\r\n\r\n }\r\n \r\n \r\n //procura numero primos no vetor\r\n for (int i = 0; i < v1.length; i++) {\r\n //testar se v1[i] e um numero primo\r\n //Um número é divisível por outro quando o resto da divisão entre os dois é igual a zero\r\n quantidade_divisores = 0;\r\n //calcula a quatidade de divisores\r\n for (int j = 0; j < v1[i]; j++) {\r\n if (v1[i] % v1[j] == 0) {\r\n quantidade_divisores++;\r\n //sera divisivel\r\n }\r\n }\r\n if (quantidade_divisores == 2 ){\r\n //e primo \r\n v2[posicao_v2] = v1[i];\r\n posicao_v2++;\r\n }\r\n \r\n \r\n \r\n\r\n }\r\n for (int i = 0; i < 50; i++) {\r\n System.out.print(v1[i]+\" \");\r\n \r\n }\r\n System.out.println();\r\n for (int i = 0; i < 50; i++) {\r\n if (v2[i] > 0) {\r\n System.out.print(\"v1{\");\r\n System.out.print(v2[i]+\" , }\");\r\n }\r\n \r\n \r\n \r\n }\r\n \r\n System.out.println();\r\n }",
"public static void times (int[] n1, int[] n2, int[] result) {\n\t\tint pos = result.length-1;\n\n\t\t// clear all values....\n\t\tfor (int i = 0; i < result.length; i++) { result[i] = 0; }\n\n\t\tfor (int m = n1.length-1; m>=0; m--) {\n\t\t\tint iPos = pos - (n1.length-1 - m);\n\t\t\tint iPosSubOne = iPos-1;\n\t\t\tif (n1[m] == 0) {\n\t\t\t\tcontinue; // skip zero multiplier! Won't affect total.\n\t\t\t}\n\n\t\t\tfor (int n = n2.length-1; n>=0; n--, iPos--,iPosSubOne--) {\n\t\t\t\tint prod = n1[m]*n2[n];\n\t\t\t\t\n\t\t\t\t// GENERATED-BEGIN\n\t\t\t\tswitch (prod) {\n\t\t\t\tcase 0: break;\n\t\t\t\tcase 1: result[iPos] += 1;break;\n\t\t\t\tcase 2: result[iPos] += 2;break;\n\t\t\t\tcase 3: result[iPos] += 3;break;\n\t\t\t\tcase 4: result[iPos] += 4;break;\n\t\t\t\tcase 5: result[iPos] += 5;break;\n\t\t\t\tcase 6: result[iPos] += 6;break;\n\t\t\t\tcase 7: result[iPos] += 7;break;\n\t\t\t\tcase 8: result[iPos] += 8;break;\n\t\t\t\tcase 9: result[iPos] += 9;break;\n\t\t\t\tcase 10: result[iPosSubOne] += 1;break;\n\t\t\t\tcase 11: result[iPos] += 1;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 12: result[iPos] += 2;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 13: result[iPos] += 3;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 14: result[iPos] += 4;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 15: result[iPos] += 5;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 16: result[iPos] += 6;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 17: result[iPos] += 7;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 18: result[iPos] += 8;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 19: result[iPos] += 9;result[iPosSubOne] += 1;break;\n\t\t\t\tcase 20: result[iPosSubOne] += 2;break;\n\t\t\t\tcase 21: result[iPos] += 1;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 22: result[iPos] += 2;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 23: result[iPos] += 3;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 24: result[iPos] += 4;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 25: result[iPos] += 5;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 26: result[iPos] += 6;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 27: result[iPos] += 7;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 28: result[iPos] += 8;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 29: result[iPos] += 9;result[iPosSubOne] += 2;break;\n\t\t\t\tcase 30: result[iPosSubOne] += 3;break;\n\t\t\t\tcase 31: result[iPos] += 1;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 32: result[iPos] += 2;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 33: result[iPos] += 3;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 34: result[iPos] += 4;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 35: result[iPos] += 5;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 36: result[iPos] += 6;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 37: result[iPos] += 7;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 38: result[iPos] += 8;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 39: result[iPos] += 9;result[iPosSubOne] += 3;break;\n\t\t\t\tcase 40: result[iPosSubOne] += 4;break;\n\t\t\t\tcase 41: result[iPos] += 1;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 42: result[iPos] += 2;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 43: result[iPos] += 3;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 44: result[iPos] += 4;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 45: result[iPos] += 5;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 46: result[iPos] += 6;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 47: result[iPos] += 7;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 48: result[iPos] += 8;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 49: result[iPos] += 9;result[iPosSubOne] += 4;break;\n\t\t\t\tcase 50: result[iPosSubOne] += 5;break;\n\t\t\t\tcase 51: result[iPos] += 1;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 52: result[iPos] += 2;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 53: result[iPos] += 3;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 54: result[iPos] += 4;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 55: result[iPos] += 5;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 56: result[iPos] += 6;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 57: result[iPos] += 7;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 58: result[iPos] += 8;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 59: result[iPos] += 9;result[iPosSubOne] += 5;break;\n\t\t\t\tcase 60: result[iPosSubOne] += 6;break;\n\t\t\t\tcase 61: result[iPos] += 1;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 62: result[iPos] += 2;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 63: result[iPos] += 3;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 64: result[iPos] += 4;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 65: result[iPos] += 5;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 66: result[iPos] += 6;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 67: result[iPos] += 7;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 68: result[iPos] += 8;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 69: result[iPos] += 9;result[iPosSubOne] += 6;break;\n\t\t\t\tcase 70: result[iPosSubOne] += 7;break;\n\t\t\t\tcase 71: result[iPos] += 1;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 72: result[iPos] += 2;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 73: result[iPos] += 3;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 74: result[iPos] += 4;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 75: result[iPos] += 5;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 76: result[iPos] += 6;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 77: result[iPos] += 7;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 78: result[iPos] += 8;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 79: result[iPos] += 9;result[iPosSubOne] += 7;break;\n\t\t\t\tcase 80: result[iPosSubOne] += 8;break;\n\t\t\t\tcase 81: result[iPos] += 1;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 82: result[iPos] += 2;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 83: result[iPos] += 3;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 84: result[iPos] += 4;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 85: result[iPos] += 5;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 86: result[iPos] += 6;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 87: result[iPos] += 7;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 88: result[iPos] += 8;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 89: result[iPos] += 9;result[iPosSubOne] += 8;break;\n\t\t\t\tcase 90: result[iPosSubOne] += 9;break;\n\t\t\t\tcase 91: result[iPos] += 1;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 92: result[iPos] += 2;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 93: result[iPos] += 3;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 94: result[iPos] += 4;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 95: result[iPos] += 5;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 96: result[iPos] += 6;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 97: result[iPos] += 7;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 98: result[iPos] += 8;result[iPosSubOne] += 9;break;\n\t\t\t\tcase 99: result[iPos] += 9;result[iPosSubOne] += 9;break;\n\t\t\t\t};\n\t\t\t\tswitch (result[iPos]) {\n\t\t\t\tcase 0: break; \n\t\t\t\tcase 1: break; \n\t\t\t\tcase 2: break; \n\t\t\t\tcase 3: break; \n\t\t\t\tcase 4: break; \n\t\t\t\tcase 5: break; \n\t\t\t\tcase 6: break; \n\t\t\t\tcase 7: break; \n\t\t\t\tcase 8: break; \n\t\t\t\tcase 9: break; \n\t\t\t\tcase 10: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 11: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 12: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 13: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 14: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 15: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 16: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 17: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 18: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 19: result[iPosSubOne] += 1; result[iPos] -= 10; break; \n\t\t\t\tcase 20: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 21: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 22: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 23: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 24: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 25: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 26: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 27: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 28: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 29: result[iPosSubOne] += 2; result[iPos] -= 20; break; \n\t\t\t\tcase 30: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 31: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 32: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 33: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 34: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 35: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 36: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 37: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 38: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 39: result[iPosSubOne] += 3; result[iPos] -= 30; break; \n\t\t\t\tcase 40: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 41: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 42: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 43: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 44: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 45: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 46: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 47: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 48: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 49: result[iPosSubOne] += 4; result[iPos] -= 40; break; \n\t\t\t\tcase 50: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 51: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 52: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 53: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 54: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 55: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 56: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 57: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 58: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 59: result[iPosSubOne] += 5; result[iPos] -= 50; break; \n\t\t\t\tcase 60: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 61: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 62: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 63: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 64: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 65: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 66: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 67: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 68: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 69: result[iPosSubOne] += 6; result[iPos] -= 60; break; \n\t\t\t\tcase 70: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 71: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 72: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 73: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 74: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 75: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 76: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 77: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 78: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 79: result[iPosSubOne] += 7; result[iPos] -= 70; break; \n\t\t\t\tcase 80: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 81: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 82: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 83: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 84: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 85: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 86: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 87: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 88: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 89: result[iPosSubOne] += 8; result[iPos] -= 80; break; \n\t\t\t\tcase 90: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 91: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 92: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 93: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 94: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 95: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 96: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 97: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 98: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\tcase 99: result[iPosSubOne] += 9; result[iPos] -= 90; break; \n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// GENERATED-END\n\t\t\t}\n\t\t}\n\t}",
"public static int villa(int... result) {\n\n int score = nSame(3, 6, result);\n int firstPairVal = score/3;\n\n result = IntStream.of(result).filter(val -> val != firstPairVal).toArray();\n score = nSame(3, 6, result);\n int secondPairVal = score/3;\n\n if (firstPairVal*secondPairVal > 0) {\n score = 3*firstPairVal + 3*secondPairVal;\n } else {\n score = 0;\n }\n\n return score;\n }",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int T = scanner.nextInt();\n assert T >=1;\n assert T<=100000;\n long []numArr = new long[T];\n for(int i=0; i<T; i++) {\n numArr[i] = scanner.nextLong ();\n assert numArr[i]>=1;\n assert numArr[i]<=1000000000;\n }\n\n for (long num : numArr) {\n int i=1;\n long sum=0;\n while(i*3<num) {\n sum +=i*3;\n if(i*5<num && i%3!=0)\n sum +=i*5;\n i++;\n }\n System.out.println(sum);\n }\n }",
"public static void test(){\n int[] a = {3,6,9, 12,81,72};\n int n = 648;\n boolean flag = areFactors(n, a);\n if(flag == true){\n System.out.println(n +\" is divisible by all elements of array.\");\n }\n else{\n System.out.println(n + \" fails the test.\");\n }\n }",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\r\n int m=sc.nextInt();\r\n int n=sc.nextInt();\r\n int l=sc.nextInt();\r\n int a[]=new int[(n-m+1)];\r\n int temp1=m;\r\n for(int i=0;i<n-m+1;i++){\r\n \ta[i]= temp1;\r\n \ttemp1++;\r\n }\r\n int b[]=new int[n-m+1];\r\n int temp=0;\r\n for(int i=0;i<n-m+1;i++)\r\n {\t\ttemp=a[i];\r\n \t while (temp != 0)\r\n \t {\r\n \t b[i] = b[i] * 10 + temp % 10;\r\n \t temp = temp / 10;\r\n \t }\r\n }\r\n \r\n long k=0,count=0;\r\n for(int i=0;i<n-m+1;i++){\r\n \tk=((Math.abs(a[i]-b[i]))%l);\r\n \tif(k==0){\r\n \t\tcount++;\r\n \t}\r\n \t\r\n\t}\r\nSystem.out.println(count);\r\n}",
"public int singleNumber_Math(int[] nums) {\n \n Set<Integer> set = new HashSet<Integer>();\n \n int sumOfnums = 0;\n int setSum = 0;\n \n for(int a : nums){\n set.add(a);\n sumOfnums += a;\n }\n \n for(int a : set)\n setSum += a;\n \n \n return 2*(setSum)-sumOfnums;\n \n }",
"static ArrayList<Integer> getMajortiy(int arr[]){\n int num1=-1, num2=-1, count1=0, count2=0;\n for(int i:arr){\n if(i==num1) count1++;\n else if(i ==num2) count2++;\n else if(count1==0){\n num1=i;\n count1=1;\n }\n else if(count2==0){\n num2=i;\n count2=1;\n }\n else{\n count1--;\n count2--;\n }\n }\n count1=0; count2=0;\n for(int i:arr){\n if(i==num1) count1++;\n if(i==num2) count2++;\n }\n ArrayList<Integer>res= new ArrayList<>();\n if(count1>arr.length/3) res.add(num1);\n if(count2>arr.length/3) res.add(num2);\n return res;\n\n }",
"public static void highlyDivisibleTriangularNumber(){\n\n int position = 1;\n long triangleNumber;\n Long[] factors;\n do{\n position ++;\n triangleNumber = getTriangleNumber(position);\n factors = getFactors(triangleNumber); \n }while(factors.length <= 500);\n\n System.out.println(triangleNumber);\n}",
"public static int processArray(ArrayList<Integer> array) {\n\n ArrayList<Integer> dataArray = new ArrayList<>();\n int ctr = 0;\n for(int i=0;i<array.size();i++){\n if(array.get(i)%2==1){\n dataArray.add(array.get(i));\n }\n else{\n if(dataArray.size()>0)\n ctr+=getOddData(dataArray);\n dataArray.clear();\n }\n }\n if(dataArray.size()>0)\n ctr+=getOddData(dataArray);\n\n return ctr;\n }",
"public static void main(String[] args) {\n\t\tint[] prime= new int[1229]; //only need primes up to 10000\n\t\tint n=1;\n\t\tint index=0;\n\t\tint test=0;\n\t\tfor (int i=2; (i-n)<=1229; i++) {\n\t\t\tfor (int j=2; j<=Math.sqrt(i); j++) {\n\t\t\t\tint k=i%j;\n\t\t\t\tif (k==0) {\n\t\t\t\t\tn++;\n\t\t\t\t\ttest++;\n\t\t\t\t\tj=(int)Math.sqrt(i);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (test==0) {\n\t\t\t\tprime[index]=i;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\ttest=0;\n\t\t}\n\t\t\n\t\t//use primes to find prime factorization and sum of divisors\n\t\tint [] divides= new int[1229]; //Number of times each prime divides a number\n\t\tint [] sumOfDivisors= new int[10000]; //Sum of divisors for i at index i\n\t\tint total=0;\n\t\tint sum=1;\n\t\tindex=1;\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tint d=i;\n\t\t\tfor (int j=0; j<1229; j++) { //find prime factorization for i\n\t\t\t\twhile (d%prime[j]==0 && d>1) {\n\t\t\t\t\td=d/prime[j];\n\t\t\t\t\tdivides[j]++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tfor (int j=0; j<1229; j++) { //use Number theory formula for sum of divisors\n\t\t\t\tsum*=(Math.pow(prime[j], divides[j]+1)-1)/(prime[j]-1);\n\t\t\t}\n\t\t\tif (sum-i<i) { //only check if sum of divisors of i is less than i\n\t\t\t\tif (sumOfDivisors[sum-i-1]==i) { //check if amicable pair\n\t\t\t\t\ttotal=total+i+sum-i; //add both to total (only happens once)\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrays.fill(divides,0); //reset divisors array\n\t\t\tsumOfDivisors[index]=sum-i; //store number of divisors\n\t\t\tsum=1;\n\t\t\tindex++;\n\t\t}\n\t\tSystem.out.print(\"The sum of all amicable numbers less than 10000 is: \");\n\t\tSystem.out.println(total);\n long endTime = System.currentTimeMillis();\n System.out.println(\"It took \" + (endTime - startTime) + \" milliseconds.\");\n\n\t}",
"public static void main(String[] args) {\n\t\tArrays.fill(arr, 1);\n\t\tlong startTime = System.nanoTime();\n\t\t// Traverse till square root of MAX\n\t\t// Using logic similar to sieve of eratosthenes to\n\t\t// populate factor sum array\n\t\tint limit = (int)Math.sqrt(MAX);\n\t\tfor (int i = 2; i <= limit; ++i) {\n\t\t\tint j = i+i;\n\t\t\tint count = 2;\n\t\t\twhile (j <= MAX){\n\t\t\t\t// As we already add count (j/i) to the factor sum when adding i,\n\t\t\t\t// we don't add when i is equal to or greater than count\n\t\t\t\tif (i < count) {\n\t\t\t\t\t// Adding i and count (j/i) to the factor sum of j\n\t\t\t\t\tarr[j] += i;\n\t\t\t\t\tarr[j] += count;\n\t\t\t\t}\n\t\t\t\tj += i;\n\t\t\t\tcount++;\n\t\t\t} \n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tSystem.out.println(\"The following are amicable numbers\");\n\t\tfor (int i = 2; i <= MAX; ++i) {\n\t\t\tint num = arr[i];\n\t\t\tif (num <= MAX && num > i) {\n\t\t\t\tif (arr[num] == i) {\n\t\t\t\t\tSystem.out.println(count+\": \"+i+\" and \"+num);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlong endTime = System.nanoTime();\n\t\tdouble duration = timeInSec(endTime,startTime) ;\n\t\tSystem.out.println(\"Run time \" + duration + \" : secs\");\t\t\n\t}",
"static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }",
"public int singles(int [] arr){\n HashMap<Integer, Integer> hm = new HashMap<>();\n long s1 = 0, s2 = 0;\n for(int x = 0; x < arr.length; x++){\n if(!hm.containsKey(arr[x])){\n s1 += arr[x];\n hm.put(arr[x], 1);\n }\n s2 += arr[x];\n }\n return (int)(2* s1 - s2);\n }",
"public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }",
"public static void main(String[] arrr){\n\t\tlong mod = 10000000011L;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\tlong total=0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotal = (total+((long)Math.pow((countBit(arr[i])),(i+1))%mod))%mod;\n\t\t}\n\t\tSystem.out.println(total);\n\t}",
"public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }",
"public static int count(int[] arr){\n\t\tint[] remCounts = {0,0,0}; \n\t\tfor(int i=0; i<arr.length; i++)\n\t\t\tremCounts[arr[i]%3]++; \n\t\t\n\t\tint total = 0; \n\t\t/**\n\t\t * Count the group of size 2, two possibilities:\n\t\t * (1) both elements have remainder of 0 \n\t\t * => select 2 values from group 0 \n\t\t * (2) one has remainder of 1, and the other has 2 \n\t\t * => select 1 from group 1 and the other from group 2 \n\t\t */\n\t\ttotal += calcCombinations(remCounts[0], 2); \n\t\ttotal += (remCounts[1] * remCounts[2]); \n\t\t\n\t\t/**\n\t\t * count the group of size 3: \n\t\t * \n\t\t * (1) all of them are from group 0 \n\t\t * (2) all of them are from group 1 \n\t\t * (3) all of them are from group 2 \n\t\t * (4) each of them are from group 0, 1, and 2 respectively\n\t\t */\n\t\ttotal += calcCombinations(remCounts[0], 3);\n\t\ttotal += calcCombinations(remCounts[1], 3);\n\t\ttotal += calcCombinations(remCounts[2], 3);\n\t\ttotal += remCounts[0] * remCounts[1] * remCounts[2];\n\t\t\n\t\treturn total ; \n\t}",
"int product(int[] nums) {\n int total = 1;\n for (int n: nums) {\n total = total * n;\n }\n return total; \n }",
"public static void main(String[] args) \n\t{\n\t\t int i=20, j=40;\n\t\t int k=0;\n\t\t ArrayList<Integer> l1=new ArrayList<Integer>();\n\t\t ArrayList<Integer> l2=new ArrayList<Integer>();\n\t\t for(int a=i;a<=j;a++){\n\t\t int count=0;\n\t\t for(int b=2;b<a;b++)\n\t\t if(a%b==0)\n\t\t count++;\n\t\t if(count==0)\n\t\t l1.add(a); }\n\t\t for(int e=i;e<=j;e++)\n\t\t l2.add(e);\n\t\t l2.removeAll(l1);\n\t\t for(int d=0;d<l2.size();d++)\n\t\t k=k+l2.get(d);\n\t\t \n\t\tSystem.out.println(k);\n\t}",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }",
"public List<Integer> largestDivisibleSubset(int[] nums) {\n longest = new ArrayList<>();\n if (nums == null) {\n return longest;\n }\n Arrays.sort(nums);\n sorted = nums;\n System.out.println(\"Sorted = \" + Arrays.toString(sorted));\n int[] beDividor = new int[nums.length]; // 统计一个数被整除的次数\n Map<Integer, List<Integer>> edges = new HashMap<>();\n for (int i = 0; i < sorted.length - 1; i++) {\n for (int j = i + 1; j < sorted.length; j++) {\n if (sorted[j] % sorted[i] == 0) {\n beDividor[j]++;\n if (!edges.containsKey(i)) {\n edges.put(i, new ArrayList<Integer>());\n }\n edges.get(i).add(j);\n }\n }\n }\n System.out.println(\"Map =\\t\" + edges);\n max = 0;\n List<Integer> chain = new ArrayList<>();\n for (int i = 0; i < beDividor.length; i++) {\n if (beDividor[i] == 0) { // 无法整除任何其他元素的数\n chain.add(sorted[i]);\n if (max < 1) {\n max = 1;\n longest = new ArrayList<Integer>(chain);\n } \n backtracking(i, 1, chain, edges);\n chain.remove(chain.size() - 1);\n }\n }\n return longest;\n }",
"public static void main(String[] args){\n int n;int k;\n Scanner sc=new Scanner(System.in);\n n=sc.nextInt();\n k=sc.nextInt();\n int[] a=new int[n];\n int[] reMain=new int[k];\n int num=0;\n for(int i=0;i<k;i++){\n reMain[i]=0;\n }\n for(int i=0;i<n;i++){\n int d=sc.nextInt()%k;\n reMain[d]++;\n }\n int p=0;\n if(k%2==0)\n p=k/2;\n else p=(k+1)/2;\n for(int i=1;i<p;i++){\n if(reMain[i]>reMain[k-i])\n num+=reMain[i];\n else\n num+=reMain[k-i];\n \n }\n if(reMain[p]%2==1 && k%2==0)\n num++;\n if(k==2)\n num=reMain[1];\n \n \n System.out.println(num);\n\t}",
"static boolean isProduct(int arr[], int x) {\r\n\t\tint n = arr.length;\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (arr[i] == 0 && x == 0)\r\n\t\t\t\treturn true;\r\n\t\t\tif (x % arr[i] == 0) {\r\n\t\t\t\tif (tmpList.contains(x / arr[i])) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\ttmpList.add(x / arr[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public int mctFromLeafValues(int[] arr) {\n int ans = 0;\n Stack<Integer> stack = new Stack<>();\n stack.push(Integer.MAX_VALUE);\n for (int i : arr) {\n while (i >= stack.peek()) {\n int mid = stack.pop();\n ans += mid * Math.min(i, stack.peek());\n }\n stack.push(i);\n }\n while (stack.size() > 2) {\n ans += stack.pop() * stack.peek();\n }\n return ans;\n }",
"public int sumSubarrayMins2(int[] nums) \n {\n if (nums == null || nums.length == 0)\n {\n return 0;\n }\n \n int size = nums.length;\n int result = 0;\n int mod = 1_000_000_000 + 7;\n \n for (int i = 0; i < size; i++)\n {\n int min = Integer.MAX_VALUE;\n \n for (int j = i; j < size; j++)\n {\n min = Math.min(min, nums[j]);\n result = (result + min) % mod;\n result %= mod;\n }\n }\n \n return result;\n }",
"private static int[] getSquersArray(int[] nums) {\n\t\tint[] seqNums = new int[nums.length];\n\t\tint i = 0;\n\t\tfor (int num : nums) {\n\t\t\tseqNums[i] = num * num;\n\t\t\ti++;\n\t\t}\n\t\treturn seqNums;\n\t}",
"public static void main(String[] args) {\n\t\tint array[] = { 5, 2, 3, 6, 1 };\n\t\tint total = ((array.length + 1) * (array.length + 2)) / 2;\n\t\tSystem.out.println(total);\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\ttotal -= array[i];\n\t\t}\n\t\tSystem.out.println(\"Missing number=\" + total);\n\t}",
"public static List<Integer> productOfElementsWithDivision(List<Integer> inputs) {\n Integer productOfAll = inputs.stream()\n .filter(input -> input != 0)\n .reduce(1, (current, nextValue) -> current * nextValue);\n if (inputs.contains(0)) {\n return inputs.parallelStream().map(input -> input != 0 ? 0 : productOfAll).collect(Collectors.toList());\n }\n return inputs.parallelStream().map(input -> productOfAll / input).collect(Collectors.toList());\n }",
"private void calcProduct() {\n String numberVal = number.getText().toString();\n if (numberVal.isEmpty()) {\n numberVal = \"0\";\n }\n\n // divide the number by 2 w/o remainder\n int count = Integer.parseInt(numberVal) >> 1;\n\n // empirically calculated maximum number for even elements\n if (count > 30) {\n Toast.makeText(\n this,\n \"The given number is too large for product of even items!\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // array initialization\n int[] arr = new int[count];\n for (int i = 0; i < count; i++) {\n arr[i] = (i + 1) << 1;\n }\n\n // calculate product\n long product = 1;\n for (int i = 0; i < count; i++) {\n product *= arr[i];\n }\n\n result.setText(String.format(\"The product of even numbers is %d\", product)); ;\n }",
"public static void calculate(int[] array) {\n\tfor (int i = 0; i > array.length - 1; i++) {\n\t\t// i will be second number\n\t\tfor (int j = i + 1; j < array.length; j++) {\n\n\t\t\t// take a number from array\n\t\t\t// add it to the next\n\t\t\tint sum = array[i] + array[j];\n\n\t\t\tif (sum == 100) {\n\t\t\t\t// i will print those two numbers\n\t\t\t\tSystem.out.println(array[i] + \", \" + array[j]);\n\t\t\t}\n\t\t}\n\n\t}\n}",
"static int[] Summe(int[] a, int[] b){\n int index = 0, i = a.length - 1;\n int[] c = new int [a.length + 1];\n Arrays.fill(c, 0);\n while (i >= 0){\n c[i+1] = (a[i] + b[i] + index) % 10;\n if ((a[i] + b[i] + index) > 9) index = 1;\n else index = 0;\n i -= 1;\n }\n if (index == 1) c[0] = 1;\n return c;\n }",
"static int workbook(int n, int k, int[] arr) {\n int specialProblems = 0;\n int page = 1;\n for (int i = 0; i < n; i++) {\n for (int j = 1; j <= arr[i]; j++) {\n if (j == page)\n specialProblems++;\n if (j % k == 0)\n page++;\n }\n if (arr[i] % k != 0) page++;\n }\n return specialProblems;\n }",
"public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}",
"public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}",
"private double selectDivisor( double v[], double param[] ) {\n\n\t\tdouble maxValue = 0;\n\t\tint maxIndex = 0;\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tif (Math.abs(v[i]) > maxValue) {\n\t\t\t\tmaxValue = Math.abs(v[i]);\n\t\t\t\tmaxIndex = i;\n\t\t\t}\n\t\t}\n\n\t\tdouble divisor = v[maxIndex];\n\n\t\tint index = 0;\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i] /= divisor;\n\n\t\t\tif (i != maxIndex) {\n\t\t\t\t// save first 5 parameters\n\t\t\t\tparam[index] = v[i];\n\t\t\t\t// save indexes in the matrix\n\t\t\t\tint col = i < 3 ? col0 : col1;\n\t\t\t\tindexes[index++] = 3*(i%3) + col;\n\t\t\t}\n\t\t}\n\n\t\t// index of 1\n\t\tint col = maxIndex >= 3 ? col1 : col0;\n\t\tindexes[5] = 3*(maxIndex%3) + col;\n\n\t\treturn divisor;\n\t}",
"static public int evenCalc (int[] a){\n int counter = 0;\n for (int i = 0; i < a.length; i++){\n if(a[i] % 2 == 0)\n counter ++;\n }\n return counter;\n }",
"public ArrayList<Integer> repeatedNumber(final List<Integer> a) {\n long sum = 0, ssum = 0;\n for(int i = 0 ; i < a.size(); i++){\n long curi = i+1; // importnt to prevent overflow.\n long curn = a.get(i); // importnt to prevent overflow.\n sum += curn - curi;\n ssum +=curn*curn - curi*curi ;\n }\n ssum /= sum; // A + B \n long first = (sum + ssum)/2;\n long second = (ssum - first); \n ArrayList<Integer> result = new ArrayList<>();\n result.add((int)first);\n result.add((int)second);\n return result;\n }",
"public List<Integer> majorityElementBruteForce(int[] nums) {\n List<Integer> result=new ArrayList<Integer>();\n int num=0,count=0;\n for(int i=0;i<nums.length;i++){\n num=nums[i];\n count=0;\n for(int j=0;j<nums.length;j++){\n if(nums[j]==num)count++;\n }\n if(count>nums.length/3 && !result.contains(num)){\n result.add(num);\n }\n }\n return result;\n \n }",
"public int find(List<Integer> numbers) {\n int count = 0;\n for (Integer n : numbers) {\n int x = 1;\n do {\n if (x * (x + 1) == n) {\n count++;\n }\n x++;\n } while (x < Math.sqrt(n));\n }\n return count;\n }",
"public static List<Integer> productOfElementsWithoutDivision(List<Integer> inputs) {\n // Put inputs to a linked hash map with key == index\n Map<Integer, Integer> mapInputs = inputs.stream()\n .collect(LinkedHashMap::new, (map, ch) -> map.put(map.size(), ch) , Map::putAll);\n Set<Map.Entry<Integer, Integer>> setEntries = mapInputs.entrySet();\n return setEntries.stream().map(entry ->\n setEntries.stream()\n // Filter the map to exclude current value and multiple other inputs\n .filter(calculatedEntry -> !calculatedEntry.getKey().equals(entry.getKey()))\n .map(Map.Entry::getValue)\n .reduce(1, (currentProduct, nextValue) -> currentProduct * nextValue)\n ).collect(Collectors.toList());\n }",
"@org.junit.Test\n public void testDiviseurs() {\n //given\n long n = 9;\n Parfait instance = new Parfait();\n long[] expResult = {1, 9, 3};\n\n //when\n long[] result = instance.diviseurs(n);\n\n //then\n assertArrayEquals(expResult, result);\n }",
"static int[] modifiedArrayWithDivision(int[] original) {\n\t\tint[] newArr = new int[original.length];\n\t\tint totalProduct = 1;\n\t\t\n\t\t// Get the product of all numbers in array\n\t\tfor (int i = 0; i < original.length; i++) {\n\t\t\ttotalProduct *= original[i];\n\t\t}\n\t\t\n\t\t// Divide product by int at index to determine final array\n\t\tfor (int i = 0; i < newArr.length; i++) {\n\t\t\tnewArr[i] = totalProduct / original[i];\n\t\t}\n\t\t\n\t\treturn newArr;\n\t}",
"static long countInversions(int[] arr) {\n long ans = 0;\n int n = Arrays.stream(arr).max().getAsInt();\n BIT bit = new BIT(n);\n for (int i = 0; i < arr.length; i++) {\n ans += bit.sum(n) - bit.sum(arr[i]);\n bit.add(arr[i], 1);\n }\n return ans;\n }",
"public int getSumOfMultiples(int i, int[] set) {\n\t\t/*\n\t\t * Variables:\t\n\t\t * \t\tsum is the sum of all unique multiples. sum is returned at the end\n\t\t * \t\tmax is the number we want to stay under with the multiples\n\t\t * \t\tmultiple is the value of the multiple we have at any given time as an element of the array is added to itself\n\t\t * \t\tduplicates is an array that will store each multiple. This is to ensure we are not adding duplicates to the\n\t\t * \t\t\toverall sum.\n\t\t */\n\t\tint sum = 0;\n\t\tint max = i;\n\t\tint multiple;\t\n\t\tList<Integer> duplicates = new ArrayList<>();\n\n\t\t/*\n\t\t * for each value in the array, add its multiples to the sum as long as it's both unique per our duplicates array\n\t\t * \t\tand less than the max\n\t\t */\n\t\tfor (int j = 0; j < set.length; j++) { \n\t\t\tmultiple = set[j];\n\t\t\twhile (multiple < max) {\n\t\t\t\t\n\t\t\t\tif (!duplicates.contains(multiple)){\n\t\t\t\t\tduplicates.add(multiple);\n\t\t\t\t\t//System.out.println(multiple);\n\t\t\t\t\tsum = sum + multiple;\t\n\t\t\t\t}\n\t\t\t\tmultiple += set[j];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = 1, lcm = 1;\n int temp = a;\n int temp2 = b;\n // int fact = 1;\n if (a > b) {\n\n for (int i = a; i < a * b;i+=a) {\n if ( i % b == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n } else {\n for (int i = b; i < a * b; i+=b) {\n if ( i%a == 0) {\n lcm = i;\n break;\n // System.out.println(lcm);\n } \n }\n\n }\n gcd = (a * b) / lcm;\n System.out.println(gcd);\n System.out.println(lcm);\n }",
"static long countTriplets(List<Long> arr, long r) {\n Map<Long, Integer> map=new HashMap<Long, Integer>();\n int l = arr.size();\n long triplets = 0;\n //Create a map with unique numbers in arr as key and its frequency as value\n for(int i = 0; i < l; i++) {\n if (map.containsKey(arr.get(i))) {\n map.put(arr.get(i), map.get(arr.get(i)) + 1);\n } else {\n map.put(arr.get(i), 1);\n }\n }\n \n /*\n If ratio is 1, arr is {2,2,2,2,2,2,2,2,2,2}.. 2 is 10 times than map will be \n {(2, 10)}, where 2 is key and 10 is value than answer will be Nc3 (10c3), using permutations and combinations.. select '2' three times from 10 items which can be done in 10c3 ways\n */\n if (r == 1) {\n for (Map.Entry<Long, Integer> entry : map.entrySet()) {\n long key = entry.getKey();\n long val = entry.getValue();\n System.out.println(\"Key is: \" + key);\n System.out.println(\"Value is: \" + val);\n if (val > 2) {\n //here applying formula for Nc3\n triplets = triplets + (val * (val - 1) * (val - 2))/6;\n }\n } \n } else {\n /*\n eg. 2,4,4,8,8,16,24,24,24 and r is 2\n map will be {(2,1), (4,2), (8,2), (16,1), (24,3)}\n iterate for every key,value pair in the map\n first time (2,1), key is 2.. now check for 2*r(4) and 2*r*r(8) in map\n if present means triplet found.. now we need to calculate how many triplets can be formed with these 3 values.. that will be multiplication of values of these 3 keys in map... 2 is 1 time, 4 is 2 times, 8 is 2 times... no. of triplets = 1*2*2=4\n */\n for (Map.Entry<Long, Integer> entry : map.entrySet()) {\n long key1 = entry.getKey();\n long val = entry.getValue();\n long key2 = key1 * r;\n long key3 = key2 * r;\n\n if(map.containsKey(key2) && map.containsKey(key3)) {\n triplets = triplets + (val * map.get(key2) * map.get(key3));\n }\n } \n }\n return triplets;\n }",
"public int getMirrorCount(int[] numbers){\n \tint currMax = 0;\r\n \tfor(int beg = 0; beg < numbers.length; beg++) {\r\n \t\tfor(int end = beg; end < numbers.length; end++) {\r\n \t\t\t// Subarray method: http://www.techiedelight.com/get-subarray-array-specified-indexes-java/\r\n \t\t\tint[] subarray = new int[end - beg + 1];\r\n \t\t\t//System.out.println(\"F\");\r\n \t\t\tSystem.arraycopy(numbers, beg, subarray, 0, subarray.length);\r\n \t\t\t//System.out.println(Arrays.toString(subarray));\r\n \t\t\t// Mirror: http://www.java67.com/2016/10/3-ways-to-reverse-array-in-java-coding-interview-question.html\r\n \t\t\tfor(int i = 0; i<subarray.length/2; i++) {\r\n \t\t\t\tint temp = subarray[i];\r\n \t\t\t\tsubarray[i] = subarray[subarray.length - i -1];\r\n \t\t\t\tsubarray[subarray.length - i -1] = temp;\r\n \t\t\t}\r\n \t\t\tif(findArray(numbers, subarray) != -1) {\r\n \t\t\t\tif(subarray.length > currMax)\r\n \t\t\t\t\tcurrMax = subarray.length;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\t\treturn currMax;\r\n\t}",
"@Test\n public void sumOddLengthSubarrays3() {\n SumOddLengthSubarrays sol = new SumOddLengthSubarrays();\n int actual, expected;\n int[] nums;\n\n nums = new int[]{1,4,2,5,3};\n expected = 58;\n actual = sol.sumOddLengthSubarrays3(nums);\n Assert.assertEquals(expected, actual);\n\n\n nums = new int[]{10,11,12};\n expected = 66;\n actual = sol.sumOddLengthSubarrays3(nums);\n Assert.assertEquals(expected, actual);\n\n }",
"public int subarraysDivByK(int[] nums, int k) {\n\t \n int n = nums.length;\n\t\tint [] cumulativeMods = new int[n]; //store cumulative modulus\n int count =0; //count subarrays\n\t\tHashMap <Integer,Integer> repeatedMonitor = new HashMap<>();\n\t\t\n repeatedMonitor.put(0,1); \n\t\t//magic hidden zero :P, next appearing of 0 in cumulative will be the second to the monitor, \n\t\t//if you love to know why, do search xD\n\t\t\n cumulativeMods[0]= nums[0]%k<0? (nums[0]%k)+k : nums[0]%k;\n \n\t\t//Fill cumulativeMods array\n for(int i=1; i<n; i++){\n cumulativeMods[i] = cumulativeMods[i-1]+nums[i];\n cumulativeMods[i] = cumulativeMods[i]%k <0? (cumulativeMods[i]%k)+k: cumulativeMods[i]%k;\n } \n \n\t\t//count contiguous subarrays by monitoring the repeated items in cumulativeMods\n int toAdd=0;\n for(int i=0; i<n; i++){\n toAdd = repeatedMonitor.getOrDefault(cumulativeMods[i],0); \n count+= toAdd;\n repeatedMonitor.put(cumulativeMods[i], toAdd+1);\n }\n return count; \n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t int a = 0;\n\t\t a=scan.nextInt();\n\t\t int [] arr=new int[a+1];\n\t\t arr[1]=arr[2]=1;\n\t\t for(int i=3;i<arr.length;i++){\n\t\t arr[i]=(arr[i-1]+arr[i-2])%10007;//对每一个斐波那契数列进行取余数\n\t\t }\n\t\t System.out.println(arr[a]);\n\t\t }",
"public BigDecimal divideNumbers(List<Integer> numbers) throws Exception;",
"public ArrayList<ArrayList<Integer>> permuteUnique(int[] num) {\n HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();\n for(int i = 0; i < num.length; i++) {\n \tif(!count.containsKey(num[i])) count.put(num[i], 1);\n \telse count.put(num[i], count.get(num[i])+1); \t\n }\n \n ArrayList<Integer> numUni = new ArrayList<Integer>(count.size());\n ArrayList<Integer> numCount = new ArrayList<Integer>(count.size());\n for(int e: count.keySet()) {\n \tnumUni.add(e);\n \tnumCount.add(count.get(e)); \t\n }\n \n ArrayList<ArrayList<Integer>> results = new ArrayList<ArrayList<Integer>>();\n ArrayList<Integer> result = new ArrayList<Integer>(num.length);\n permuteUnique(numUni, numCount, result, results);\n return results;\n }",
"private static void div(int[] numbers) {\n\t\tint sum=-1;\n\t\ttry {\n\t\t\tsum = numbers[0] / numbers[1];\n\t\t\tSystem.out.println(sum);\n\t\t} catch (ArithmeticException ex) {\n\t\t\tSystem.out.println(\"Sie dürfen um gottes Willen nicht durch NULL dividieren!\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}",
"static ArrayList<Integer> maxOdd(int[] a) {\n\n\t\tHashMap<Integer,Integer> b=new HashMap<Integer,Integer>();\n\t\tArrayList<Integer> x=new ArrayList<Integer>();\n\n\t\t\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tif(b.get(a[i])==null)\n\t\t\t\tb.put(a[i],1);\n\t\t\telse\n\t\t\t\tb.put(a[i],b.get(a[i])+1);\n\t\t}\n\t\tint max=0,j=0;\n\n\t\tfor(int i: b.keySet())\n\t\t{\n\t\t\tif(b.get(i)%2==1) {\n\t\t\t\tx.add(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn x;\n\t}",
"private BigInteger squareToomCook3() {\n int len = mag.length;\n\n // k is the size (in ints) of the lower-order slices.\n int k = (len+2)/3; // Equal to ceil(largest/3)\n\n // r is the size (in ints) of the highest-order slice.\n int r = len - 2*k;\n\n // Obtain slices of the numbers. a2 is the most significant\n // bits of the number, and a0 the least significant.\n BigInteger a0, a1, a2;\n a2 = getToomSlice(k, r, 0, len);\n a1 = getToomSlice(k, r, 1, len);\n a0 = getToomSlice(k, r, 2, len);\n BigInteger v0, v1, v2, vm1, vinf, t1, t2, tm1, da1;\n\n v0 = a0.square();\n da1 = a2.add(a0);\n vm1 = da1.subtract(a1).square();\n da1 = da1.add(a1);\n v1 = da1.square();\n vinf = a2.square();\n v2 = da1.add(a2).shiftLeft(1).subtract(a0).square();\n\n // The algorithm requires two divisions by 2 and one by 3.\n // All divisions are known to be exact, that is, they do not produce\n // remainders, and all results are positive. The divisions by 2 are\n // implemented as right shifts which are relatively efficient, leaving\n // only a division by 3.\n // The division by 3 is done by an optimized algorithm for this case.\n t2 = v2.subtract(vm1).exactDivideBy3();\n tm1 = v1.subtract(vm1).shiftRight(1);\n t1 = v1.subtract(v0);\n t2 = t2.subtract(t1).shiftRight(1);\n t1 = t1.subtract(tm1).subtract(vinf);\n t2 = t2.subtract(vinf.shiftLeft(1));\n tm1 = tm1.subtract(t2);\n\n // Number of bits to shift left.\n int ss = k*32;\n\n return vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);\n }",
"public String multiply(String num1, String num2) {\n int[] n1 = new int[num1.length()];\r\n for(int i = 0; i < num1.length(); i++) {\r\n \tn1[i] = num1.charAt(i) - '0';\r\n }\r\n int[] n2 = new int[num2.length()];\r\n for(int i = 0; i < num2.length(); i++) {\r\n \tn2[i] = num2.charAt(i) - '0';\r\n }\r\n //the result\r\n int[] result = new int[num1.length() + num2.length()];\r\n \r\n //multiple two large numbers\r\n for(int i = n2.length - 1; i >=0; i--) {\r\n \t//the starting point in the result array\r\n \tint v2 = n2[i];\r\n \tint startPoint = result.length - 1 - (n2.length - 1 - i);\r\n \tint carrier = 0;\r\n \tfor(int j = n1.length - 1; j >= 0; j--) {\r\n \t\tint index = startPoint - (n1.length - 1 - j);\r\n \t\tint v1 = n1[j];\r\n \t\t\r\n// \t\tSystem.out.println(\"i: \" + i + \": \" + v2 + \", j: \" + j + \": \" + v1 + \", carrier: \" + carrier);\r\n \t\t\r\n \t\tint finalValue = v1*v2 + carrier + result[index];\r\n \t\tcarrier = finalValue/10;\r\n \t\tresult[index] = finalValue % 10;\r\n \t\t//update the last\r\n \t\tif(j == 0) {\r\n \t\t\tif(carrier > 0) {\r\n \t\t\t\tresult[index - 1] = carrier; //XXX note, need to write to the array cell\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n// \tthis.printArray(result);\r\n }\r\n \r\n //convert to the result\r\n StringBuilder sb = new StringBuilder();\r\n boolean zero = true;\r\n for(int i : result) {\r\n \tif(i != 0 && zero) {\r\n \t\tzero = false;\r\n \t}\r\n \tif(!zero) {\r\n \t sb.append(i);\r\n \t}\r\n }\r\n if(sb.length() == 0) {\r\n \tsb.append(\"0\"); //all ZERO\r\n }\r\n return sb.toString();\r\n }",
"public int findNumbers(int[] nums) {\n int res = 0;\n for (int num : nums) {\n if (String.valueOf(num).length() % 2 == 0) {\n res ++;\n }\n }\n return res;\n }",
"public static void main(String[] args) {\n\t\tint[] a = { -2, -3, 4, -1, -2, 1, 5, -3 }; \n\t\t int size = a.length; \n\t int max_so_far = Integer.MIN_VALUE, max_ending_here=0;\n\t for (int i = 0; i < size; i++) { \n\t max_ending_here = max_ending_here + a[i]; \n\t if (max_so_far < max_ending_here) \n\t max_so_far = max_ending_here; \n\t if (max_ending_here < 0) \n\t max_ending_here = 0; \n\t } \n\t // System.out.println(max_so_far);\n\t int product=1,max=0;\n\t for (int i = 0; i < size; i++) {\n\t \t\n\t \tproduct=product*a[i];\n\t \tif(product>max)\n\t \t\tmax=product;\n\t \t if (product < 0) \n\t \t\t product = 1; \n\t \t\n\t }\n\t // System.out.println(max);\n\t \n\t Arrays.sort(a);\n\t int i=0,j=a.length-1;\n\t while(i<a.length &&j<a.length)\n\t {\n\t \t if(a[i]+a[j]==3)\n\t \t {\n\t \t\t System.out.println(a[i]+\" \"+a[j]);\n\t \t\t i++;j--;\n\t \t }\n\t \t else if(a[i]+a[j]>3)\n\t \t\t j--;\n\t \t else if(a[i]+a[j]<3)\n\t \t\t i++;\n\t }\n\t \n\t \n\t }",
"public double[] test() {\r\n BigInteger a = generator.getA();\r\n BigInteger m = generator.getM();\r\n BigInteger h, hPrime, p, pPrime;\r\n BigInteger r, s;\r\n BigInteger q;\r\n BigInteger U[][], V[][];\r\n int t;\r\n\r\n //Step 1: Initialization\r\n h = a;\r\n hPrime = m;\r\n p = BigInteger.ONE;\r\n pPrime = BigInteger.ZERO;\r\n r = a;\r\n s = a.multiply(a).add(BigInteger.ONE);\r\n t = 1;\r\n //End of Step 1: Initialization\r\n\r\n //Step 2: Euclidean step to handle the case when t=2.\r\n U = new BigInteger[t][t];\r\n V = new BigInteger[t][t];\r\n //In this step, U & V have only one element\r\n do {\r\n q = hPrime.divide(h);\r\n U[0][0] = hPrime.subtract(q.multiply(h)); //Same as hPrime % h?\r\n V[0][0] = pPrime.subtract(q.multiply(p));\r\n BigInteger temp = U[0][0].multiply(U[0][0]).add(V[0][0].multiply(V[0][0]));\r\n if (temp.compareTo(s) >= 0) { //if temp>=s\r\n break;\r\n }\r\n //else if u2+v2<s do the following and loop back\r\n s = temp;\r\n hPrime = h;\r\n h = U[0][0];\r\n pPrime = p;\r\n p = V[0][0];\r\n } while (true);\r\n //End of Step 2: Euclidean step for t=2\r\n\r\n //Step 3: Compute nu2\r\n U[0][0] = U[0][0].subtract(h);\r\n V[0][0] = V[0][0].subtract(p);\r\n if (U[0][0].multiply(U[0][0]).add(V[0][0].multiply(V[0][0])).compareTo(s)==-1) {\r\n s = U[0][0].multiply(U[0][0]).add(V[0][0].multiply(V[0][0]));\r\n hPrime = U[0][0];\r\n pPrime = V[0][0];\r\n }\r\n t++; //t=2\r\n nu[t - 1] = s.doubleValue(); //nu2\r\n\r\n //Setting up the matrices\r\n U = new BigInteger[t][t];\r\n V = new BigInteger[t][t];\r\n\r\n //U:\r\n U[0][0] = h.negate();\r\n U[0][1] = p;\r\n U[1][0] = hPrime.negate();\r\n U[1][1] = pPrime;\r\n\r\n //V:\r\n V[0][0] = pPrime;\r\n V[0][1] = hPrime;\r\n V[1][0] = p.negate();\r\n V[1][1] = h.negate();\r\n\r\n if (pPrime.compareTo(BigInteger.ZERO) > 0) //if pPrime>0 then V = -V\r\n {\r\n for (int i = 0; i < t; i++) {\r\n for (int j = 0; j < t; j++) {\r\n V[i][j] = V[i][j].negate();\r\n }\r\n }\r\n }\r\n //End of Step 3: Compute nu2\r\n\r\n //Step 4: For values 2<t<=T\r\n while (t < T) {\r\n t++; //3, 4,..., T\r\n //System.out.println(\"t=\"+t);\r\n \r\n r = a.multiply(r).mod(m);\r\n\r\n BigInteger uIncreased[][] = new BigInteger[t][t];\r\n BigInteger vIncreased[][] = new BigInteger[t][t];\r\n\r\n for (int i = 0; i < t; i++) {\r\n for (int j = 0; j < t; j++) {\r\n uIncreased[i][j] = vIncreased[i][j] = BigInteger.ZERO;\r\n }\r\n }\r\n \r\n //setting Ut and Vt i.e. last rows of the new U and V\r\n uIncreased[t - 1][0] = r.negate();\r\n vIncreased[t - 1][0] = BigInteger.ZERO;\r\n// for (int i = 1; i < t - 1; i++) {\r\n// uIncreased[t - 1][i] = vIncreased[t - 1][i] = BigInteger.ZERO;\r\n// }\r\n uIncreased[t - 1][t - 1] = BigInteger.ONE;\r\n vIncreased[t - 1][t - 1] = m;\r\n\r\n //copy u & v to uIncreased & vIncreased\r\n for (int i = 0; i < U.length; i++) {\r\n int j;\r\n for (j = 0; j < U[i].length; j++) {\r\n uIncreased[i][j] = U[i][j];\r\n vIncreased[i][j] = V[i][j];\r\n }\r\n //Uit = 0 , Vit = Vi1*r - q*m where q = round(vi1*r/m) for 1<=i<t. Here j=t now.\r\n// uIncreased[i][j] = 0;\r\n //q = Math.round(vIncreased[i][1] * r / (double)m); //casting to prevent precision loss by division\r\n //q = vIncreased[i][1].multiply(r).divide(m);\r\n q = divideAndRound(vIncreased[i][0].multiply(r), m);\r\n vIncreased[i][j] = vIncreased[i][0].multiply(r).subtract(q.multiply(m));\r\n\r\n //Ut = Ut + q*Ui\r\n uIncreased[t - 1] = (new Vector(uIncreased[t - 1]).add(new Vector(uIncreased[i]).multiplyScalar(q))).toArray();\r\n }\r\n \r\n U = uIncreased;\r\n V = vIncreased;\r\n\r\n BigInteger utSq = new Vector(U[t - 1]).selfProduct();\r\n if (utSq.compareTo(s) < 0) {\r\n s = utSq;\r\n }\r\n\r\n int k = t - 1; //last index where the transformation shortened atleast one of the Vi\r\n int j = 0; //current row index for transformation(Knuth's algo is 1-based, arrays here are 0-based)\r\n\r\n //Step 7: Advance j. Starts elsewhere according to Knuth's algo. Modified to prevent gotos.\r\n do {\r\n //Step 5: Transform\r\n for (int i = 0; i < t; i++) {\r\n Vector vI = new Vector(V[i]);\r\n Vector vJ = new Vector(V[j]);\r\n BigInteger vIDotJ = vI.multiply(vJ);\r\n BigInteger vJDotJ = vJ.selfProduct();\r\n //System.out.println(vIDotJ.multiply(new BigInteger(\"2\"))+\" & \"+vJDotJ+\" i= \"+i+\" j= \"+j);\r\n if (i != j && vIDotJ.abs().multiply(new BigInteger(\"2\")).compareTo(vJDotJ) > -1) {\r\n q = divideAndRound(vIDotJ, vJDotJ); //casting to prevent precision loss by division\r\n //Vi = Vi - q*Vj\r\n V[i] = vI.subtract(vJ.multiplyScalar(q)).toArray();\r\n //Uj = Uj + q*Ui\r\n U[j] = new Vector(U[j]).add(new Vector(U[i]).multiplyScalar(q)).toArray();\r\n k = j;\r\n }\r\n }\r\n //End of Step 5: Transform\r\n\r\n //Step 6: Examine new bound\r\n if (k == j) {\r\n BigInteger ujSq = new Vector(U[j]).selfProduct();\r\n if (ujSq.compareTo(s) < 0) {\r\n s = ujSq;\r\n }\r\n }\r\n //End of Step 6: Examine new bound\r\n j = (j + 1) % t;\r\n } while (j != k);\r\n //System.out.println(\"Ended loop of step 7\");\r\n //End of Step 7: Advance j\r\n\r\n //Step 8: Prepare for search\r\n BigInteger X[] = new BigInteger[t];\r\n BigInteger Y[] = new BigInteger[t];\r\n BigInteger Z[] = new BigInteger[t];\r\n //extra overhead of initializing BigInteger arrays :(\r\n for (int i = 0; i < t; i++) {\r\n X[i] = Y[i] = Z[i] = BigInteger.ZERO;\r\n }\r\n \r\n k = t - 1;\r\n //Setting Z\r\n for (int i = 0; i < t; i++) {\r\n Vector vI = new Vector(V[i]);\r\n //Z[i] = (BigInteger) Math.floor(Math.sqrt(Math.floor((vI.selfProduct() * s / (double)m)/ m))); //If m is too big m^2 becomes inf, \r\n //so divide by m twice instead of dividing by m^2\r\n //Exploiting the fact that floor(a/b^2) = floor(floor(a/b)/b)\r\n //The BigIntegers are actually small enough before taking square roots hence sqrt(double) works fine enough\r\n String temp = String.valueOf(Math.floor(Math.sqrt(Math.floor(\r\n vI.selfProduct().multiply(s).divide(m).divide(m).doubleValue()))));\r\n Z[i] = new BigInteger(temp.substring(0, temp.length()-2));\r\n //----------------------------------------------------------------------------------------------------\r\n }\r\n //End of Step 8: Prepare for search\r\n\r\n //Step 9: Advance Xk\r\n do {\r\n if (X[k].compareTo(Z[k])!=0) { //X[k] != Z[k]\r\n X[k] = X[k].add(BigInteger.ONE);\r\n Y = new Vector(Y).add(new Vector(U[k])).toArray();\r\n\r\n //Step 10: Advance k\r\n do {\r\n ++k;\r\n if (k <= t - 1) {\r\n X[k] = Z[k].negate();\r\n Y = new Vector(Y).subtract(new Vector(U[k]).multiplyScalar(Z[k].multiply(new BigInteger(\"2\")))).toArray();\r\n } else {\r\n BigInteger ySq = new Vector(Y).selfProduct();\r\n if (ySq.compareTo(s) < 0) {\r\n s = ySq;\r\n }\r\n break;\r\n }\r\n } while (true);\r\n //End of Step 10: Advance k\r\n }\r\n //End of Step 9: Advance Xk\r\n //Step 11: Decrease k\r\n --k;\r\n //System.out.println(\"Stuck at k=\"+k);\r\n } while (k >= 0);\r\n nu[t - 1] = s.doubleValue();\r\n //End of Step 11: Decrease k\r\n }\r\n //End of Step 4: For values 2<t<=T\r\n \r\n //Calculating mu\r\n calculateMu();\r\n //\r\n //Show a comprehensive summary of the test results\r\n showSummary();\r\n return getNu();\r\n }",
"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 }",
"public static int[] largestMultiple(int[] arr) {\r\n\t\tif(arr==null || arr.length==0) return arr;\r\n\t\t\r\n\t\tQueue<Integer> q1 = new PriorityQueue<Integer>();\r\n\t\tQueue<Integer> q2 = new PriorityQueue<Integer>();\r\n\t\tQueue<Integer> q3 = new PriorityQueue<Integer>();\r\n\t\t\r\n\t\tArrays.sort(arr);\r\n\t\t\r\n\t\tint sum= 0;\r\n\t\tfor(int i=0;i<arr.length;i++) {\r\n\t\t\tif(arr[i]%3==0) {\r\n\t\t\t\tq1.add(arr[i]);\r\n\t\t\t}\r\n\t\t\telse if(arr[i]%3==1) {\r\n\t\t\t\tq2.add(arr[i]);\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t\tq3.add(arr[i]);\r\n\t\t\tsum += arr[i];\r\n\t\t}\r\n\t\t\r\n\t\tif(sum%3==2) {\r\n\t\t\tif(!q2.isEmpty()) {\r\n\t\t\t\tq2.remove();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!q1.isEmpty()) {\r\n\t\t\t\t\tq1.remove();\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\treturn null;\r\n\t\t\t\tif(!q1.isEmpty()) {\r\n\t\t\t\t\tq1.remove();\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(sum%3==1) {\r\n\t\t\tif(!q1.isEmpty()) {\r\n\t\t\t\tq1.remove();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!q2.isEmpty()) \r\n\t\t\t\t\tq2.remove();\r\n\t\t\t\telse \r\n\t\t\t\t\treturn null;\r\n\t\t\t\tif(!q2.isEmpty()) \r\n\t\t\t\t\tq2.remove();\r\n\t\t\t\telse\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tint top=0;\r\n\t\twhile(!q1.isEmpty()) {\r\n\t\t\tarr[top++] = (int)q1.remove();\r\n\t\t}\r\n\t\twhile(!q2.isEmpty()) {\r\n\t\t\tarr[top++] = (int) q2.remove();\r\n\t\t}\r\n\t\t\r\n\t\twhile(!q3.isEmpty()) {\r\n\t\t\tarr[top++] = (int) q3.remove();\r\n\t\t}\r\n\t\tfor(int i=top-1;i>=0;i--){\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t\treturn arr;\r\n\t}",
"public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint a[]= {2,1,6,4};\r\n\t\tint b[]= {1,5};\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<b.length;j++)\r\n\t\t\t{\r\n\t\r\n\t\t\t\tif(Math.pow(a[i],b[j])>Math.pow(b[j],a[i]))\r\n\t\t\t\t\t\r\n\t\t\t\t\tcount=count+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println(count);\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint array[]={2,3,4,6};\n\t\tint n=array.length;\n\t\tint maximum=Integer.MIN_VALUE;\n\t\tint minimum=Integer.MAX_VALUE;\n\t\tfor(int i:array)\n\t\t{\n\t\t\tif(i>maximum)\n\t\t\t\tmaximum=i;\n\t\t\tif(i<minimum)\n\t\t\t\tminimum=i;\n\t\t}\n\t\t\n\t\tint mark[]=new int[maximum+2];\n\t\tint value[]=new int[maximum+2];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tmark[array[i]]=1; // marking ki exist karta hai no need to search in the array.\n\t\t\tvalue[array[i]]=1; //har value se ek fbt to banega hi (1 node ka)\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=minimum;i<=maximum;i++){\n\t\t\tif(mark[i]==1) // element is present in the array.// we have found the first factor now find 2nd factor.\n\t\t\t{\n\t\t// find the multiples of arr[i] which are less than max value and also less than its square\n\t\t\tfor(int j=i+i ;j<=maximum && j/i<=i;j=j+i)\n\t\t\t{\n\t\t\t\tif(mark[j]==1 && mark[j/i]==1) // i is the first factor and j/i is the 2nd factor.j is the product that serves as root.\n\t\t\t\t{\n\t\t\t\t\t// value =all combination of left child with right child.\n\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t\t\n\t\t\t\t\t// if the 2 child are not same then one more orientation.\n\t\t\t\t\tif(i!=(j/i))\n\t\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tans=ans+value[i];\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"static long countTriplets(List<Long> arr, long r) {\n List<List<Long>> candidates;\n List<List<Long>> triplets = new ArrayList<>();\n for (int i = 0; i < arr.size(); i++) {\n long root = arr.get(i);\n candidates = new ArrayList<>();\n\n for (int j = i + 1; j < arr.size(); j++) {\n long value = arr.get(j);\n\n candidates.forEach(candidate -> {\n long current = candidate.get(1);\n if (value / r == current) {\n List<Long> triplet = new ArrayList<>(candidate);\n triplet.add(value);\n triplets.add(triplet);\n }\n });\n\n if (value / r == root) {\n List<Long> candidate = new ArrayList<>();\n candidate.add(root);\n candidate.add(value);\n candidates.add(candidate);\n }\n }\n\n // List<Long> sig = new ArrayList<>();\n // for (int j = 0; j < arr.size(); j++) {\n // sig.set(j, j < i ? arr.get(i) : arr.get(i) / r);\n // }\n }\n\n return triplets.size();\n }",
"public static int bigStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n int score = 0;\n\n if (noUniqVals >= 5) {\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[]{1, 2, 3, 4, 5});\n matchArrays.add(new int[]{2, 3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 4; i++) {\n resultSubArrays.add(Arrays.copyOfRange(uniqueValues, i, i + 5));\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 40;\n }\n\n }\n }\n }\n return score;\n }",
"static int nonDivisibleSubset(int k, int[] S) {\n\t\tint result = 0;\n\n\t\tArrayList < ArrayList < Integer >> solutions = new ArrayList < ArrayList < Integer >>();\n\t\tArrayList < HashSet < Integer >> minSets = new ArrayList < HashSet < Integer >>();\n\n\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( S [ 0 ])));\n\t\tminSets.add (new HashSet <Integer > ( ));\n\t\tminSets.get(0).add ( S [ 0 ] % k);\n\n\n\t\t// Go over all the numbers\n\t\tfor ( int i = 1; i < S.length; i++ ){\n\t\t\tint n = S [ i ]; \n\t\t\tint m = S [ i ] % k; // Number we will add to all the elements of all the minSets.\n\n\t\t\t// Go over all the minSets.\n\t\t\t// For each one, check that each element plus m is not divisible by k.\n\n\t\t\tboolean workedForASet = false;\n\t\t\tfor ( int j = 0; j < minSets.size(); j++){\n\t\t\t\t// For each set, check all the elements of the set.\n\n\t\t\t\tHashSet < Integer > minSet = minSets.get(j);\n\t\t\t\tIterator < Integer > iter = minSet.iterator();\n\n\t\t\t\tboolean works = true;\n\t\t\t\twhile ( iter.hasNext() && works ){\n\t\t\t\t\tint num = iter.next();\n\t\t\t\t\tif ( (num + m) % k == 0 ){\n\t\t\t\t\t\tworks = false;\n\t\t\t\t\t\tworkedForASet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( works ){\n\t\t\t\t\tsolutions.get(j).add(n);\n\t\t\t\t\tminSet.add(m);\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( !workedForASet ){\n\t\t\t\tsolutions.add(new ArrayList <Integer > ( Arrays.asList ( n )));\n\t\t\t\tminSets.add (new HashSet <Integer > ( ));\n\t\t\t\tminSets.get (minSets.size() - 1).add ( m ); \n\t\t\t} \n\t\t}\n\n\t\t// Find the solution with the most elements.\n\n\t\tfor ( ArrayList <Integer > solution : solutions ){\n\t\t\tresult = Math.max ( result, solution.size() );\n\t\t\tSystem.out.println ( solution );\n\t\t}\n\n\t\tif ( result == 1 ) result = 0;\n\t\treturn result;\n\t}",
"private static int sumOddLengthSubarrays( int[] arr ) {\n Deque<Integer> q = new LinkedList<>();\n\n int sum = 0;\n for (int i = 0; i < arr.length; i++) {\n sum += arr[i];\n //System.out.println(sum);\n\n q.offer(arr[i]);\n\n if (q.size() == 3) {\n List<Integer> list = new ArrayList<>();\n int n = q.size();\n while (n-- > 0) {\n sum += q.peek();\n\n //System.out.println(sum);\n\n list.add(q.poll());\n }\n q = new LinkedList<>(list);\n q.poll();\n }\n }\n\n while (!q.isEmpty())\n sum += q.poll();\n\n return sum;\n }",
"static int multiplesOf3And5(int n) {\n int response = 0;\n for (int i = 0; i < n; i++) {\n if (i % 3 == 0 || i % 5 == 0) {\n response += i;\n }\n }\n return response;\n }",
"public static void promedio(int [] Grado1, int NNEstudent){\nint aux=0;\nfor(int i=0;i<NNEstudent;i++){\naux=Grado1[i]+aux;}\nint promedio;\npromedio=aux/NNEstudent;\nSystem.out.println(aux);\nSystem.out.println(\"el promedio de las edades es:\");\nSystem.out.println(promedio);\n}",
"public int totalHammingDistance(int[] nums) {\n int result = 0;\n for(int i = 0; i <= 31; i++){\n int count = 0;\n for(int j = 0; j < nums.length; j++){\n count = count + ((nums[j] >> i) & 1);\n }\n //for each position, it contributes to this many number combinations.\n result += count * (nums.length - count);\n }\n return result;\n }",
"public List<Integer> largestDivisibleSubset_binarySearch(int[] nums) {\n\t\tint n = nums.length, maxIdx = 0;\n\t\tList<Integer> ans = new LinkedList<>();\n\t\tif (n == 0)\n\t\t\treturn ans;\n\t\tArrays.sort(nums);\n\t\tint[] lens = new int[n], prevs = new int[n];\n\t\tArrays.fill(prevs, -1);\n\t\tfor (int i = 0; nums[i] <= nums[n - 1] / 2; ++i) {\n\t\t\tfor (int j = i + 1, f = 2; nums[i] <= nums[n - 1] / f; f = (nums[j] + nums[i] - 1) / nums[i]) {\n\t\t\t\tint idx = Arrays.binarySearch(nums, j, n, f * nums[i]);\n\t\t\t\tif (idx > 0 && lens[idx] <= lens[i]) {\n\t\t\t\t\tprevs[idx] = i;\n\t\t\t\t\tlens[idx] = lens[i] + 1;\n\t\t\t\t\tif (lens[idx] > lens[maxIdx])\n\t\t\t\t\t\tmaxIdx = idx;\n\t\t\t\t}\n\t\t\t\tj = idx >= 0 ? idx + 1 : -(idx + 1);\n\t\t\t\tif (j >= n)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (int i = maxIdx; i >= 0; i = prevs[i])\n\t\t\tans.add(0, nums[i]);\n\t\treturn ans;\n }",
"static long countTriplets(List<Long> arr, long r) {\n\n long triplets = 0;\n\n HashMap<Long, LinkedList<Integer>> powIndexesMap = new HashMap<>();\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n LinkedList<Integer> indexes;\n if (!powIndexesMap.containsKey(pow)) {\n indexes = new LinkedList<>();\n } else {\n indexes = powIndexesMap.get(pow);\n }\n indexes.add(i);\n powIndexesMap.put(pow, indexes);\n }\n\n for (int i = 0; i < arr.size(); i++) {\n Long number = arr.get(i);\n Long pow = Long.valueOf((long) logb(number, r));\n Long pow2 = pow + 1;\n Long pow3 = pow2 + 1;\n\n if (!powIndexesMap.containsKey(pow2) || !powIndexesMap.containsKey(pow3)) {\n continue;\n }\n Integer countPow2 = powIndexesMap.get(pow2).size();\n Integer countPow3 = powIndexesMap.get(pow3).size();\n\n if (countPow2 > 0 && countPow3 > 0) {\n triplets += (countPow2 * countPow3);\n }\n }\n return triplets;\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 void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }",
"public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\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 }",
"private static int calculations(int[] tab) {\r\n int result; //result of calculations\r\n \r\n //converts array to List interface element\r\n List list = Arrays.asList(ArrayUtils.toObject(tab));\r\n\r\n //calculates min and max value for array\r\n int val1 = (int) Collections.min(list); //min value in array\r\n int val2 = (int) Collections.max(list); //max value in array\r\n \r\n int min_pow2 = (int) Math.pow(val1, 2); //squared power of minimum\r\n int max_pow2 = (int) Math.pow(val2, 2); //squared power of maximum\r\n \r\n result = Math.max(min_pow2, max_pow2); //max of squared values\r\n \r\n return result;\r\n }",
"public int singleNumberII(int[] nums) {\n int ans = 0;\n for (int i = 0; i < 32; i++) {\n int sum = 0;\n for (int j = 0; j < nums.length; j++) {\n if (((nums[j] >> i) & 1) == 1) {\n sum ++;\n sum %= 3;\n }\n }\n if (sum != 0) {\n ans |= sum << i;\n }\n }\n return ans;\n }",
"List<List<Integer>> threeSum(int[] numbers) {\n\n final List<List<Integer>> lists = threeSumSubSets(numbers);\n final List<List<Integer>> threes = lists.stream().filter(x -> x.size() == 3).distinct().collect(Collectors.toList());\n final List<List<Integer>> three = new ArrayList<>();\n if (threes.isEmpty()) return new ArrayList<>();\n for (List<Integer> list : threes\n ) {\n Collections.sort(list);\n three.add(list);\n }\n return three;\n }",
"@Test\n public void pairNumbersDivisibleBy3_passTwoListsNumbers_returnListsOfPairs() {\n List<int[]> output = Java8Streams.pairNumbersDivisibleBy3(new ArrayList<>(Arrays.asList(1, 2, 3)), new ArrayList<>(Arrays.asList(3, 4)));\n assertThat(output).containsExactly(new int[]{2, 4}, new int[]{3, 3});\n }",
"public void test(){\n\n int[] arr1 = {1};\n int[] arr2 = {1,1,2,2,3,3,4,4,5};\n int[] arr3 = {1,2,3,4,5,4,3,2,1};\n\n int[][] arrays = {arr1,arr2,arr3};\n\n Day1_SingleNumber testing = new Day1_SingleNumber();\n\n boolean pass = true;\n\n for(int[] arr : arrays){\n if(testing.singleNumber(arr) == -1)\n pass = false;\n }\n\n\n\n\n\n\n }",
"public static int singleNumber(int[] nums, int k) {\n int len = nums.length, result = 0;\n int[] countBits = new int[32];\n\n for (int i = 0; i < 32; i++) {\n for (int j = 0; j < len; j++) {\n // if the bit position at i is set, we increment countBits[i] by 1.\n if (((nums[j] >> i) & 1) == 1)\n countBits[i]++;\n }\n\n result |= ((countBits[i] % k) << i);\n }\n return result;\n }"
] | [
"0.70221794",
"0.6601193",
"0.6558644",
"0.65371335",
"0.63925546",
"0.62746894",
"0.6239301",
"0.61548054",
"0.613332",
"0.6034907",
"0.60216653",
"0.60206425",
"0.60182697",
"0.6014917",
"0.6013201",
"0.5998308",
"0.5982253",
"0.5966691",
"0.595851",
"0.5954191",
"0.59448874",
"0.5940267",
"0.5927217",
"0.591864",
"0.59086436",
"0.59083915",
"0.59070516",
"0.5905661",
"0.5896601",
"0.5895695",
"0.5885968",
"0.5877062",
"0.5875584",
"0.5850807",
"0.58450377",
"0.5842965",
"0.581848",
"0.58095586",
"0.5803927",
"0.5802885",
"0.5800703",
"0.5791644",
"0.57916063",
"0.5782394",
"0.57798016",
"0.5774937",
"0.5765971",
"0.57516295",
"0.57388484",
"0.5737098",
"0.5733272",
"0.57226795",
"0.57162845",
"0.5713572",
"0.57118225",
"0.57110345",
"0.57103735",
"0.57045764",
"0.57029665",
"0.57029074",
"0.56986403",
"0.569437",
"0.5692944",
"0.56901765",
"0.5685643",
"0.5685217",
"0.5666508",
"0.56595665",
"0.5651744",
"0.5651307",
"0.5642016",
"0.56379867",
"0.5635527",
"0.56304914",
"0.56299645",
"0.56286955",
"0.5628135",
"0.56263906",
"0.5624048",
"0.5623723",
"0.5621339",
"0.5607419",
"0.5604642",
"0.56027967",
"0.56025624",
"0.5598486",
"0.55970085",
"0.55961883",
"0.559296",
"0.55917764",
"0.55917627",
"0.55907756",
"0.5581454",
"0.5581305",
"0.55799013",
"0.55785096",
"0.55669683",
"0.55657023",
"0.55642647",
"0.55589867",
"0.55526453"
] | 0.0 | -1 |
the hypotenuse is the side across from the right angle. calculate the value of c given legA and legB | public static void main(String[] args){
Pythagorean x=new Pythagorean();
double y=x.calculateHypotenuse(3,4);
System.out.println(y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private final Point tangent2G1(Point a, Point b, Point c) {\n\t\t// horizontale volgorde: a ... b ... c\n\t\tif (a.X() < b.X() && c.X() > b.X()) {\n\t\t\tPoint temp = c.minus(a);\n\t\t\tdouble rico = temp.Y() / temp.X();\n\t\t\tdouble d1 = c.X() - b.X();\n\t\t\ttemp = new Point((int) Math.floor(d1), (int) Math.floor(rico * d1\n\t\t\t\t\t+ 0.5)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// horizontale volgorde: c ... b ... a\n\t\telse if (a.X() > b.X() && c.X() < b.X()) {\n\t\t\tPoint temp = a.minus(c);\n\t\t\tdouble rico = temp.Y() / temp.X();\n\t\t\tdouble d1 = b.X() - c.X();\n\t\t\ttemp = new Point((int) Math.floor(-d1), (int) Math.floor(-rico * d1\n\t\t\t\t\t+ 0.5)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// verticale volgorde: a ... b ... c\n\t\telse if (a.Y() > b.Y() && c.Y() < b.Y()) {\n\t\t\tPoint temp = a.minus(c);\n\t\t\tdouble ricoInv = temp.X() / temp.Y();\n\t\t\tdouble d1 = b.Y() - c.Y();\n\t\t\ttemp = new Point((int) Math.floor(-ricoInv * d1 + 0.5), (int) Math\n\t\t\t\t\t.floor(-d1)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// verticale volgorde: c ... b ... a\n\t\telse if (a.Y() < b.Y() && c.Y() > b.Y()) {\n\t\t\tPoint temp = c.minus(a);\n\t\t\tdouble ricoInv = temp.X() / temp.Y();\n\t\t\tdouble d1 = c.Y() - b.Y();\n\t\t\ttemp = new Point((int) Math.floor(ricoInv * d1 + 0.5), (int) Math\n\t\t\t\t\t.floor(d1)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// Beide tangentpunten liggen in eenzelfde kwadrant van het vlak t.o.v.\n\t\t// het punt b --> nu worden de eindpunten van de vector ac verplaatst,\n\t\t// overeenkomstig met de oorspronkelijke afstand tot b.\n\t\t//\n\t\t// Bvb.: a en c liggen onder b, a ligt verder van b dan c\n\t\t// --> het eerste eindpunt van de vector ac zal ook onder b\n\t\t// komen te liggen, het andere eindpunt zal boven b liggen.\n\t\telse {\n\t\t\t// verticale volgorde: b ... a ... c\n\t\t\tif (a.Y() > c.Y() && a.Y() <= b.Y()) {\n\t\t\t\tPoint temp = a.minus(c);\n\t\t\t\tdouble factor = 1.0 - (b.Y() - a.Y()) / (b.Y() - c.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(-temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(-temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: a ... c ... b\n\t\t\telse if (a.Y() > c.Y() && c.Y() >= b.Y()) {\n\t\t\t\tPoint temp = a.minus(c);\n\t\t\t\tdouble factor = (c.Y() - b.Y()) / (a.Y() - b.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(-temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(-temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: c ... a ... b\n\t\t\telse if (c.Y() > a.Y() && a.Y() >= b.Y()) {\n\t\t\t\tPoint temp = c.minus(a);\n\t\t\t\tdouble factor = 1.0 - (a.Y() - b.Y()) / (c.Y() - b.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: b ... c ... a\n\t\t\telse if (c.Y() > a.Y() && c.Y() <= b.Y()) {\n\t\t\t\tPoint temp = c.minus(a);\n\t\t\t\tdouble factor = (b.Y() - c.Y()) / (b.Y() - a.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}",
"private final Point tangent1G1(Point a, Point b, Point c) {\n\t\t// horizontale volgorde: a ... b ... c\n\t\tif (a.X() < b.X() && c.X() > b.X()) {\n\t\t\tPoint temp = c.minus(a);\n\t\t\tdouble rico = temp.Y() / temp.X(); // kan nooit nul zijn\n\t\t\tdouble d1 = b.X() - a.X();\n\t\t\ttemp = new Point((int) Math.floor(-d1), (int) Math.floor(-rico * d1\n\t\t\t\t\t+ 0.5)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// horizontale volgorde: c ... b ... a\n\t\telse if (a.X() > b.X() && c.X() < b.X()) {\n\t\t\tPoint temp = a.minus(c);\n\t\t\tdouble rico = temp.Y() / temp.X(); // kan nooit nul zijn\n\t\t\tdouble d1 = a.X() - b.X();\n\t\t\ttemp = new Point((int) Math.floor(d1), (int) Math.floor(rico * d1\n\t\t\t\t\t+ 0.5)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// verticale volgorde: a ... b ... c\n\t\telse if (a.Y() > b.Y() && c.Y() < b.Y()) {\n\t\t\tPoint temp = a.minus(c);\n\t\t\tdouble ricoInv = temp.X() / temp.Y(); // kan nooit nul zijn\n\t\t\tdouble d1 = a.Y() - b.Y();\n\t\t\ttemp = new Point((int) Math.floor(ricoInv * d1 + 0.5), (int) Math\n\t\t\t\t\t.floor(d1)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// verticale volgorde: c ... b ... a\n\t\telse if (a.Y() < b.Y() && c.Y() > b.Y()) {\n\t\t\tPoint temp = c.minus(a);\n\t\t\tdouble ricoInv = temp.X() / temp.Y(); // kan nooit nul zijn\n\t\t\tdouble d1 = b.Y() - a.Y();\n\t\t\ttemp = new Point((int) Math.floor(-ricoInv * d1 + 0.5), (int) Math\n\t\t\t\t\t.floor(-d1)).plus(b);\n\t\t\treturn temp;\n\t\t}\n\t\t// Beide tangentpunten liggen in eenzelfde kwadrant van het vlak t.o.v.\n\t\t// het punt b --> nu worden de eindpunten van de vector ac verplaatst,\n\t\t// overeenkomstig met de oorspronkelijke afstand tot b.\n\t\t//\n\t\t// Bvb.: a en c liggen onder b, a ligt verder van b dan c\n\t\t// --> het eerste eindpunt van de vector ac zal ook onder b\n\t\t// komen te liggen, het andere eindpunt zal boven b liggen.\n\t\telse {\n\t\t\t// verticale volgorde: b ... a ... c\n\t\t\tif (a.Y() > c.Y() && a.Y() <= b.Y()) {\n\t\t\t\tPoint temp = a.minus(c);\n\t\t\t\tdouble factor = (b.Y() - a.Y()) / (b.Y() - c.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: a ... c ... b\n\t\t\telse if (a.Y() > c.Y() && c.Y() >= b.Y()) {\n\t\t\t\tPoint temp = a.minus(c);\n\t\t\t\tdouble factor = 1.0 - (c.Y() - b.Y()) / (a.Y() - b.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: c ... a ... b\n\t\t\telse if (c.Y() > a.Y() && a.Y() >= b.Y()) {\n\t\t\t\tPoint temp = c.minus(a);\n\t\t\t\tdouble factor = (a.Y() - b.Y()) / (c.Y() - b.Y());\n\t\t\t\ttemp = new Point((int) Math.floor(-temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(-temp.Y() * factor + 0.5)).plus(b);\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t\t// verticale volgorde: b ... c ... a\n\t\t\telse if (c.Y() > a.Y() && c.Y() <= b.Y()) {\n\t\t\t\tPoint temp = c.minus(a);\n\t\t\t\tdouble factor = 1.0 - (b.Y() - c.Y()) / (b.Y() - a.Y());\n\n\t\t\t\ttemp = new Point((int) Math.floor(-temp.X() * factor + 0.5),\n\t\t\t\t\t\t(int) Math.floor(-temp.Y() * factor + 0.5)).plus(b);\n\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\t\treturn a;\n\t}",
"public static double hypot(double a, double b) {\n\t\tdouble r;\n\t\tif(Math.abs(a) > Math.abs(b)) {\n\t\t\tr = b / a;\n\t\t\tr = Math.abs(a) * Math.sqrt(1 + r * r);\n\t\t} else if(b != 0) {\n\t\t\tr = a / b;\n\t\t\tr = Math.abs(b) * Math.sqrt(1 + r * r);\n\t\t} else {\n\t\t\tr = 0.0;\n\t\t}\n\t\treturn r;\n\t}",
"@Override\n\tdouble chuVi() {\n\t\treturn (canhA + canhB) * 2;\n\t}",
"private static double hypot(double aa, double bb){\r\n \tdouble cc = 0.0D, ratio = 0.0D;\r\n \tdouble amod=Math.abs(aa);\r\n \tdouble bmod=Math.abs(bb);\r\n\r\n \tif(amod==0.0D){\r\n \t \tcc=bmod;\r\n \t}\r\n \telse{\r\n \t\tif(bmod==0.0D){\r\n \t\tcc=amod;\r\n \t\t}\r\n \t\telse{\r\n \t\tif(amod<=bmod){\r\n \t\t\tratio=amod/bmod;\r\n \t\t\tcc=bmod*Math.sqrt(1.0D+ratio*ratio);\r\n \t\t}\r\n \t\telse{\r\n \t\t\tratio=bmod/amod;\r\n \t\t\tcc=amod*Math.sqrt(1.0D+ratio*ratio);\r\n \t\t}\r\n \t\t}\r\n \t}\r\n \treturn cc;\r\n \t}",
"private int getLCD(int a, int b){\n return ( (a * b) / getGCD(a, b) ); \n }",
"private double calcSide(int x1,int y1, int x2, int y2){\n \n double distance1 = Math.sqrt(Math.pow(x2 - x1,2) + Math.pow(y2-y1,2));\n \n return distance1;\n \n \n \n }",
"public static void main (String[] args) {\n\t\tdouble x1 = 0, y1 = 0, x2 = 0, y2 = 0, perimeter = 0, hypotenuse = 0, \n\t\t\t\tside1 = 0, side2 = 0;// Declare all the variables as double and assigning an initial value to them\n\t\t// Declare Scanner input, so that user will be able to assign their own values to x1, x2, y1, and y2\n\t\tScanner inputScanner = new Scanner (System.in);\n\t\tSystem.out.println(\"Enter an integer for x1\");\n\t\tx1 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for y1\");\n\t\ty1 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for x2\");\n\t\tx2 = inputScanner.nextInt();\n\t\tSystem.out.println(\"Enter an integer for y2\");\n\t\ty2 = inputScanner.nextInt(); \n\t\tside1 = x2 - x1;// this statement states that side1 will be equal to the difference of x2 - x1\n\t\tside2 = y2 - y1;// this statement states that side2 will be equal to the difference of y2 - y1\n\t\t// This will compute a value \n\t\thypotenuse = Math.sqrt(Math.pow(side1, 2.0) + Math.pow(side2, 2.0));\n\t\tperimeter = side1 + side2 + hypotenuse; \n\t\t// This statement will output a value for the hypotenuse; then using this to find the perimeter \n\t\tSystem.out.println(\"The perimeter of the right angle triangle with sides\" + Double.toString(side1) + \",\"\n\t\t\t\t+ Double.toString(side2) + \"and hypotenuse\" + Double.toString(hypotenuse) + \"is\" + Double.toString(perimeter));\n\t\t/* The above statement will convert the values of side1, side2, hypotenuse and perimeter from double to string; then it will present\n\t\t * the the value of the hypotenuse and perimeter of the right angle triangle\n\t\t */\n\t\tinputScanner.close(); \t\t\t\n\t}",
"public double perimeter()\n\t{\n\t\t// To recognize points, their angles must be compared - middle one always represents the opposing point.\n\t\tdouble angleXAB = pointA.calculateLineAngle(pointB);\n\t\tdouble angleXAC = pointA.calculateLineAngle(pointC);\n\t\tdouble angleXAD = pointA.calculateLineAngle(pointD);\n\t\t\n\t\tdouble side1;\n\t\tdouble side2;\n\t\tdouble side3;\n\t\tdouble side4;\n\n\t\t// Creates sides based on angles comparison.\n\n\t\t// Excluding double 0 cases (vertical and horizontal)\n\t\t// opposite is XAB\n\t\tif(angleXAC == angleXAD)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // if \n\t\t// opposite is XAC\n\t\telse if(angleXAB == angleXAD)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\tside4 = pointC.getDistance(pointD);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // else if \n\t\t// opposite is XAD\n\t\telse if(angleXAB == angleXAC)\n\t\t{\n\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\treturn \tside1 + side2 + side3 + side4;\n\t\t} // else if \n\t\tif(angleXAB > angleXAC)\n\t\t{\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAC > angleXAD)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\t\tside4 = pointC.getDistance(pointD);\n\n\t\t\t} // if\n\t\t\t// opposite is XAB\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\t} // else if\t\n\t\t\t// opposite is XAD\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\t} // else\n\t\t} // if\n\t\telse\t\n\t\t{\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAD > angleXAC)\t\t\t\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointC.getDistance(pointB);\n\t\t\t\tside4 = pointC.getDistance(pointD);\n\t\t\t} // if \n\t\t\t// opposite is XAD\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointB);\n\t\t\t\tside2 = pointA.getDistance(pointC);\n\t\t\t\tside3 = pointD.getDistance(pointB);\n\t\t\t\tside4 = pointD.getDistance(pointC);\n\t\t\t} // else if \n\t\t\t// opposite is XAB\n\t\t\telse \t\n\t\t\t{\n\t\t\t\tside1 = pointA.getDistance(pointC);\n\t\t\t\tside2 = pointA.getDistance(pointD);\n\t\t\t\tside3 = pointB.getDistance(pointC);\n\t\t\t\tside4 = pointB.getDistance(pointD);\n\t\t\t} // else\n\t\t} // else\t\t\n\t\treturn \tside1 + side2 + side3 + side4;\n\t\t\n\t}",
"public static double hypot(final double a, final double b) {\r\n double r;\r\n\r\n if (Math.abs(a) > Math.abs(b)) {\r\n r = b / a;\r\n r = Math.abs(a) * Math.sqrt(1 + (r * r));\r\n } else if (b != 0) {\r\n r = a / b;\r\n r = Math.abs(b) * Math.sqrt(1 + (r * r));\r\n } else {\r\n r = 0.0;\r\n }\r\n\r\n return r;\r\n }",
"private double d(Point a, Point b){\n\t\treturn Math.sqrt(Math.pow(b.getX()-a.getX(),2) + Math.pow(a.getY() - b.getY(), 2));\r\n\t}",
"private double calculaArea(){\r\n double area;\r\n area= (double) (Math.pow((cir.getY()-cir.getX()), 2)*Math.PI);\r\n return area;\r\n \r\n }",
"private double getArea(Point2D a, Point2D b, Point2D c)\n {\n return Math.abs((c.getX() - b.getX()) * (c.getY() - a.getY())\n - (c.getX() - a.getX()) * (c.getY() - b.getY())) / 2.0;\n }",
"public static double cylinderArea(double r, double h) {\r\n return 2 * Math.PI * r * h + 2 * Math.PI * r * r;\r\n }",
"@Override\n\tdouble dienTich() {\n\t\treturn canhA * canhB;\n\t}",
"private double getWinkel(Vector a, Vector b) {\n\t\tdouble zaehler = a.multiply(b);\n\t\tdouble nenner = a.getNorm() * b.getNorm();\n\t\t// nenner += 0.0001;\n\t\tdouble returnvalue = zaehler / nenner;\n\t\treturnvalue = Math.acos(returnvalue);\n\t\treturnvalue = Math.toDegrees(returnvalue);\n\n\t\treturn returnvalue;\n\t}",
"double getCompass(double magnetic);",
"public static double side(double[] a, double[] b, double[] p)\n {\n double d = ( ( (p[0] - a[0]) * (b[1] - a[1]) ) - ( (p[1] - a[1]) * (b[0]-a[0]) ) );\n return d;\n }",
"@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}",
"public double getCylinderSurfaceArea();",
"public double LengthA(){\n\t\treturn Math.abs(x2 - x1);\n\t}",
"public static void main(String[] args) {\n Scanner keyboard = new Scanner(System.in);\n double side1, side2; //lengths of the sides of a right triangle\n double hypotenuse;\n //Get the lengths of the sides as an input\n System.out.print(\"Please enter the length of the side of a right triangle.\");\n side1 = keyboard.nextDouble();\n System.out.print(\"Please enter the length of the other side of the right triangle.\");\n side2 = keyboard.nextDouble();\n hypotenuse = Math.pow(side1, 2) + Math.pow(side2, 2);\n hypotenuse = Math.sqrt(hypotenuse);\n System.out.print(\"Length of the hypotenuse: \" + hypotenuse);\n }",
"private static double calculateSekante(double left, double right) {\n\n\t\t// if there was only a small change in angle , should be unnecessary\n\t\tif (Math.abs(newangle) < deviationAngle) {\n\t\t\tdistance = (left + right) / 2.0;\n\t\t\t// isLine = false;\n\t\t\treturn distance;\n\t\t}\n\t\t// compute radius\n\n\t\tdouble r = 0.5 * (left + right) / newangle;\n\t\tradius = r;\n\n\t\tInputHandler.stepForward(\"ra.\" + radius);\n\n\t\t// compute distance with the center pos\n\t\tdistance = 2.0 * (r) * Math.sin(newangle / 2.0);\n\n\t\treturn (distance);\n\t}",
"private double calculaDiametro(){\r\n double diametro;\r\n diametro=((cir.getY()-cir.getX())*2);\r\n return diametro;\r\n }",
"double area2(Point2D a, Point2D b, Point2D c) {\r\n return (b.x-a.x)*(c.y-a.y) - (b.y-a.y)*(c.x-a.x);\r\n }",
"public double getLength()\n {\n return Math.sqrt( Math.pow((x2-x1),2.0) + Math.pow((y2-y1),2.0) );\n }",
"public static double areaTri (double c, double d) {\n\t\tdouble area = .5 * c * d; \n\t\treturn area;\n\t}",
"public double getLength() {\r\n \tif (this.x2 >= this.x1) {\r\n \t\tif (this.y1 >= this.y2) {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x2 - this.x1), 2) + Math.pow((this.y1 - this.y2), 2));\r\n \t\t} else {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x2 - this.x1), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t}\r\n \t} else if(this.x2 < this.x1) {\r\n \t\tif (this.y1 < this.y2) {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x1 - this.x2), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t} else {\r\n \t\t\tlength = Math.sqrt(Math.pow((this.x1 - this.x2), 2) + Math.pow((this.y2 - this.y1), 2));\r\n \t\t}\r\n \t}\r\n \treturn(length);\r\n }",
"public void area()\n {\n float s= (float) (0.5 * a * b);\n double areaOfTraingle = (float)Math.sqrt((s - a) * (s - b) * (s - c));\n //using math function for square root operation\n System.out.println(\"Area of traiangle : \"+ areaOfTraingle);\n }",
"public double calcHeurestic(double x1, double y1, double x2, double y2) {\n double x = Math.abs(x1 - x2);\n double y = Math.abs(y1 - y2);\n \n if (x > y) {\n return Math.sqrt(2) * y + x - y;\n } else {\n return Math.sqrt(2) * x + y - x;\n }\n }",
"@Override\n public double getArea() {\n double s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n }",
"public double getHourAngle(Coordinates c, long time) throws AstrometryException;",
"public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);",
"static double radiusOfCircumcirle(PointDouble a, PointDouble b, PointDouble c) {\n return radiusOfCircumcirle(dist(a, b), dist(b, c), dist(c, a));\n }",
"private static double polarTriangleArea(double tan1, double lng1, double tan2, double lng2) {\n double deltaLng = lng1 - lng2;\n double t = tan1 * tan2;\n return 2 * atan2(t * sin(deltaLng), 1 + t * cos(deltaLng));\n }",
"public double getCylinderBaseArea();",
"public static double SideCalculator(float x1, float y1, float x2, float y2){\r\n double coord1 = Math.pow((x1 - x2), 2);\r\n double coord2 = Math.pow((y1 - y2), 2);\r\n double side = Math.pow((coord1 + coord2), 0.5);\r\n return side;\r\n }",
"static double perimeter(double AB, double BC, double CA) {\n return AB + BC + CA;\n }",
"static double perimeter(PointDouble a, PointDouble b, PointDouble c) {\n return dist(a, b) + dist(b, c) + dist(c, a);\n }",
"public static void areatriangle(double b, double h, int x) {\n double result =(b * h) / x;\n System.out.println(result);\n }",
"double perimeter();",
"public static double computeDistOfHeightTriangle(CPoint A, CPoint B, CPoint C){\n\t\tdouble angle = computeAngleOrient(A,B,C);\n\t\tdouble norme_AC = Math.sqrt(Math.pow(C.getX() - A.getX(), 2)+Math.pow(C.getY() - A.getY(), 2));\n\t\tdouble dist = Math.cos(angle*(Math.PI/180))*norme_AC;\n\t\t\n\t\treturn dist;\n\t}",
"private float getRadian(float x, float y) {\n float alpha = (float) Math.atan((x - mCx) / (mCy - y));\n // Quadrant\n if (x > mCx && y > mCy) {\n // 2\n alpha += Math.PI;\n } else if (x < mCx && y > mCy) {\n // 3\n alpha += Math.PI;\n } else if (x < mCx && y < mCy) {\n // 4\n alpha = (float) (2 * Math.PI + alpha);\n }\n return alpha;\n }",
"private static double angulo(Point2D.Double p2,Point2D.Double p1){\n \t\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }",
"static double angle(CvPoint a, CvPoint b, CvPoint c) {\n\t\t\n\t\tCvPoint vecAC = new CvPoint(a.x() - c.x(), a.y() - c.y());\n\t\tCvPoint vecBC = new CvPoint(b.x() - c.x(), b.y() - c.y());\n\n\t\tdouble q = (vecAC.x() * vecBC.x()) + (vecAC.y() * vecBC.y());\n\t\tdouble ac = Math.sqrt(Math.pow(vecAC.x(), 2) + Math.pow(vecAC.y(), 2));\n\t\tdouble cd = Math.sqrt(Math.pow(vecBC.x(), 2) + Math.pow(vecBC.y(), 2));\n\n\t\tdouble ang = q / Math.abs((ac * cd));\n\t\tdouble rad = Math.acos(ang);\n\t\tdouble rad2 = Math.toDegrees(rad);\n\n\t\treturn rad2;\n\t}",
"@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }",
"private static double calcHeading(double angleA, double angleB) { \n\t\t\n\t\tdouble heading;\n\t\t\n\t\tif (angleA < angleB){\n\t\t\theading = 45 - (angleA + angleB) /2 ;\n\t\t}else {\n\t\t\theading = 225 - (angleA + angleB) /2 ;\t\n\t\t}\n\t\treturn heading;\n\t}",
"public double getMagnitud(){\n return Math.sqrt(x*x+y*y);\n }",
"public double LengthB(){\n\t\treturn Math.abs(x4 - x3);\n\t}",
"static double distToLine(PointDouble p, PointDouble a, PointDouble b, PointDouble c) {\n // formula: c = a + u * ab\n Vec ap = vector(a, p), ab = vector(a, b);\n double u = dot(ap, ab) / squaredNorm(ab);\n c = translate(a, scale(ab, u)); // translate a to c\n return dist(p, c);\n }",
"public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }",
"private static double ct(double W, double Vr, double V){\n\t\t/*\n\t\t//declaring constants\n\t\tdouble A0 = 0.5766; \n\t\tdouble A1 = 1.9169;\n\t\tdouble A2 = -1.0712;\n\t\tdouble A3 = 1.6898;\n\t\t\n\t\tdouble aW = a/W;\n\t\tdouble Eqn1 = A0 + (A1*aW) + (A2*(aW*aW)) + (A3*(aW*aW*aW));\n\t\t//I don't know if they need to be able to see what the reference voltage is\n\t\tdouble Vr = initialV/Eqn1;\n\t\t*/\n\t\t//declaring constants\n\t\tdouble B0 = -0.5051;\n\t\tdouble B1 = 0.8857; \n\t\tdouble B2 = -0.1398;\n\t\tdouble B3 = 0.0002398;\n\t\t\n\t\tdouble VVr = V/Vr;\n\t\tdouble Eqn2 = B0 + (B1*VVr) + (B2*(VVr*VVr)) + (B3*(VVr*VVr*VVr));\n\t\t//crack size, A calculated for any voltage\n\t\tdouble A = Eqn2 * W;\n\t\treturn A;\n\t\t\n\t}",
"public double calculateTheta (double angleA, double angleB){\n\t\tif(LocalizationLab.fallingEdge == false){\n\t\t\tdeltaTheta = 37 - (0.5)*(angleA+angleB);\n\t\t}\n\t\telse{\n\t\t\tdeltaTheta = 220 - (0.5)*(angleA+angleB);\n\t\t}\n\t\treturn deltaTheta;\n\t}",
"@Override\n\tpublic double calPerimeter() {\n\t\treturn a+b+c;\n\t}",
"public static double computeHeightOfTriangle(CPoint A, CPoint B, CPoint C){\n\t\tdouble angle = computeAngleOrient(A,B,C);\n\t\tdouble norme_AC = Math.sqrt(Math.pow(C.getX() - A.getX(), 2)+Math.pow(C.getY() - A.getY(), 2));\n\t\tdouble height = Math.sin(angle*(Math.PI/180))*norme_AC;\n\t\treturn height;\n\t}",
"public double berechneFlaeche()\n {\n return (2 * p1.getX()) * (2 * p1.getX());\n }",
"int getCoorY();",
"public double calcAngle(double[] AB, Solution A, Solution B, double[][] extreme){\n\t\tint size = AB.length;\n\t\tdouble lena = 0.0, lenb = 0.0, lenc = 0.0;\n\t\tdouble theta = 0.0;\n\t\t\n\t\tfor(int i=0;i<size;i++) {\n\t\t\tlena += AB[i]*AB[i]; \n\t\t\tlenb += (A.getObjective(i)-extreme[0][i])*(A.getObjective(i)-extreme[0][i]);\n\t\t\tlenc += (B.getObjective(i)-extreme[0][i])*(B.getObjective(i)-extreme[0][i]);\n\t\t}\n\t\tlena = Math.sqrt(lena); //AB\n\t\tlenb = Math.sqrt(lenb); //idea-A\n\t\tlenc = Math.sqrt(lenc); //idea-B\n\t\t\n\t\t\n\t\ttheta =Math.PI-Math.acos((lena*lena+lenb*lenb-lenc*lenc)/(2*lenb*lena));\n\t\t\n\t\treturn theta;\t\n\t}",
"double getHeadingDiff(double init_h) {\n double curr_h = getHeading();\n double diff_h = init_h - curr_h;\n if( diff_h>=360.0 ) diff_h -= 360.0;\n else if( diff_h<=-360.0 ) diff_h += 360.0;\n return diff_h ;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tt=checkEmpty(a);\n\t\t\t\tf=checkEmpty(b);\n\t\t\t\tif(t&&f){\n\t\t\t\tj= new BigDecimal(a.getText().toString());\n\t\t\t\tk= new BigDecimal(b.getText().toString());\n\t\t\t\t\n\t\t\t\t//usually angle\n\t\t\t\tdouble s=j.doubleValue();\n\t\t\t\t//usually side\n\t\t\t\tdouble t=k.doubleValue();\n\t\t\t\tdouble z=0, y=0;\n\t\t\t\t//z is top y is bottom\n\t\t\t\tif (po==0){\n\t\t\t\t\t\n\t\t\t\t\tz=s*Math.sin(t*Math.PI/180);\n\t\t\t\t\ty=s*Math.cos(t*Math.PI/180);\n\t\t\t\t\t\n\t\t\t\t\tString ab=Double.toString(y);\n\t\t\t\t\tString abb=Double.toString(z);\n\t\t\t\t\tresu.setText(ab.toString());\n\t\t\t\t\tres.setText(abb.toString());\n\t\t\t\t\t\n\t\t\t\t\tworks[0]=\"Adjacent leg of angle(al)= Hypotenuse (H) * cos(Angle (a)) (in degrees)\";\n\t\t\t\t\tworks[1]=\"ol= H * cos(a) = \"+ s + \" * cos(\" +t+\")\";\n\t\t\t\t\tworks[2]=\"ol= \"+z;\n\t\t\t\t\tworks[3]=\" \";\n\t\t\t\t\tworks[4]=\"Opposite leg of angle(ol)= Hypotenuse (H) * sin(Angle (a)) (in degrees)\";\n\t\t\t\t\tworks[5]=\"ol= H * sin(a) = \"+ s + \" * sin(\" +t+\")\";\n\t\t\t\t\tworks[6]=\"ol= \"+y;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (po==1){\n\t\t\t\t\t\n\t\t\t\t\tz=t/Math.tan(s*Math.PI/180);\n\t\t\t\t\ty=Math.sqrt((t*t)+(z*z));\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tString ab=Double.toString(y);\n\t\t\t\t\tString abb=Double.toString(z);\n\t\t\t\t\tresu.setText(abb.toString());\n\t\t\t\t\tres.setText(ab.toString());\n\t\t\t\t\t\n\t\t\t\t\tworks[0]=\"Adjacent leg (al)= Opposite side (os) / tan(Angle(a))\";\n\t\t\t\t\tworks[1]=\"al= os / tan(a)= \"+t+\" / tan(\"+s+\")\";\n\t\t\t\t\tworks[2]=\"al= \"+z;\n\t\t\t\t\tworks[3]=\" \";\n\t\t\t\t\tworks[4]=\"Hypotenuse (H)\\u00B2= Opposite side (os)\\u00B2 + Adjacent side (as)\\u00B2\";\n\t\t\t\t\tworks[5]=\"H\\u00B2= os\\u00B2 + as\\u00B2= \"+t+\"\\u00B2 + \"+z+\"\\u00B2\";\n\t\t\t\t\tworks[6]=\"\\u221AH\\u00B2= \"+y;\n\t\t\t\t}\n\t\t\t\tif (po==2){\n\t\t\t\t\t\n\t\t\t\t\tz=t*Math.tan(s*Math.PI/180);\n\t\t\t\t\ty=Math.sqrt((t*t)+(z*z));\n\t\t\t\t\t\n\t\t\t\t\tString ab=Double.toString(y);\n\t\t\t\t\tString abb=Double.toString(z);\n\t\t\t\t\tresu.setText(abb.toString());\n\t\t\t\t\tres.setText(ab.toString());\n\t\t\t\t\t\n\t\t\t\t\tworks[0]=\"Opposite leg (al)= Adjacent side (os) * tan(Angle(a))\";\n\t\t\t\t\tworks[1]=\"al= os / tan(a)= \"+t+\" * tan(\"+s+\")\";\n\t\t\t\t\tworks[2]=\"al= \"+z;\n\t\t\t\t\tworks[3]=\" \";\n\t\t\t\t\tworks[4]=\"Hypotenuse (H)\\u00B2= Opposite side (os)\\u00B2 + Adjacent side (as)\\u00B2\";\n\t\t\t\t\tworks[5]=\"H\\u00B2= os\\u00B2 + as\\u00B2= \"+z+\"\\u00B2 + \"+t+\"\\u00B2\";\n\t\t\t\t\tworks[6]=\"\\u221AH\\u00B2= \"+y;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tString err=\"NO INPUT\";\n\t\t\t\t\tres.setText(err.toString());\n\t\t\t\t\tresu.setText(err.toString());\n\t\t\t\t}\n\t\t\t}",
"double getCalibratedLevelAngle();",
"public double altezza(){\r\n\t\treturn Math.abs(this.vad.getY()-this.vbs.getY());\r\n\t}",
"public float getX2() {\r\n return (c + 2*b + 3*a)/3;\r\n }",
"public double betweenAngle(Coordinates vectorA, Coordinates vectorB);",
"public static double lado2(Pixel a, Pixel b, Pixel c) {\r\n\t\tPixel a2 = a.clonar();\r\n\t\ta2.setY(a2.maxY - a2.y);\r\n\t\tPixel b2 = b.clonar();\r\n\t\tb2.setY(b2.maxY - b2.y);\r\n\t\tPixel c2 = c.clonar();\r\n\t\tc2.setY(c2.maxY - c2.y);\r\n\t\tPixel ab = b2.clonar();\r\n\t\tab.restar(a2);\r\n\t\tPixel ac = c2.clonar();\r\n\t\tac.restar(a2);\r\n\t\tdouble pv = ac.productoVectorial2(ab);\r\n\t\treturn pv;\r\n\t}",
"private Point downTriangleBorder(Point p1, Point p2, int r) {\n\n double xb;\n double yb;\n double x1;\n double y1;\n double x2;\n double y2;\n\n double gamma = 0.0;\n\n double l;\n\n double pi = Math.PI;\n double pi2 = Math.PI / 2.0;\n double pi6 = Math.PI / 6.0;\n\n x1 = p1.x;\n y1 = p1.y;\n x2 = p2.x;\n y2 = p2.y;\n\n double s = p1.distance(p2);\n\n /* theta in range -PI < theta <= PI */\n double theta = Math.atan2(y2 - y1, x2 - x1);\n\n if ((-pi6 < theta) && (theta <= pi2)) {\n gamma = theta - pi6;\n } else if ((pi2 < theta) && (theta <= pi)) {\n gamma = theta - 5.0 * pi6;\n } else if ((-pi < theta) && (theta <= -5.0 * pi6)) {\n gamma = 7.0 * pi6 + theta;\n } else if ((-5.0 * pi6 < theta) && (theta <= -pi6)) {\n gamma = theta + pi2;\n }\n\n l = (r) / (2.0 * Math.cos(gamma));\n\n xb = x1 + (x2 - x1) * l / s;\n yb = y1 + (y2 - y1) * l / s;\n\n return new Point((int) xb, (int) yb);\n\n }",
"public double obtenerAreaCua(){\n areaCua = Math.pow(lado,2);\n return areaCua;\n }",
"public double r() { return Math.sqrt(x*x + y*y); }",
"@Override\n\tpublic double getArea(){\n\t\tdouble ab_ac_area = get_triangle_area(getVector_AB(),getVector_AC());\n\t\t\n\t\t//area of vector ac and ad\n\t\tdouble ac_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector ab and ad\n\t\tdouble ab_ad_area = get_triangle_area(getVector_AC(),getVector_AD());\n\t\t\n\t\t//area of vector bc and bd\n\t\tdouble bc_ad_area = get_triangle_area(getVector_BC(),getVector_BD());\n\t\t\n\t\t//sum \n\t\treturn ab_ac_area + ac_ad_area + ab_ad_area + bc_ad_area;\n\t}",
"AngleResource inclination();",
"public double perimeter ()\r\n {\r\n return v1.distanceTo(v2)+v2.distanceTo(v3)+v3.distanceTo(v1);\r\n }",
"private BigInteger squareKaratsuba() {\n int half = (mag.length+1) / 2;\n\n BigInteger xl = getLower(half);\n BigInteger xh = getUpper(half);\n\n BigInteger xhs = xh.square(); // xhs = xh^2\n BigInteger xls = xl.square(); // xls = xl^2\n\n // xh^2 << 64 + (((xl+xh)^2 - (xh^2 + xl^2)) << 32) + xl^2\n return xhs.shiftLeft(half*32).add(xl.add(xh).square().subtract(xhs.add(xls))).shiftLeft(half*32).add(xls);\n }",
"public double area()\n\t{\n\t\t// To recognize points, their angles must be compared - middle one always represents the opposing point.\n\t\tdouble angleXAB = pointA.calculateLineAngle(pointB);\n\t\tdouble angleXAC = pointA.calculateLineAngle(pointC);\n\t\tdouble angleXAD = pointA.calculateLineAngle(pointD);\n\t\t\n\t\tTriangle first;\n\t\tTriangle second;\n\n\t\t// Creates triangles based on angles comparison.\n\t\t// opposite is XAD\n\t\tif(angleXAB > angleXAC)\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAC > angleXAD)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // if\n\t\t\t// opposite is XAB\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else if\t\n\t\t\t// opposite is XAD\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointC);\n\t\t\t\tsecond = new Triangle (pointD, pointB, pointC);\n\t\t\t} // else\n\n\t\telse\t\n\t\t\t// opposite is XAC\n\t\t\tif(angleXAD > angleXAC)\t\t\t\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointB, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // if \n\t\t\t// opposite is XAD\n\t\t\telse if (angleXAD > angleXAB)\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else if \n\t\t\t// opposite is XAB\n\t\t\telse \t\n\t\t\t{\n\t\t\t\tfirst = new Triangle (pointA, pointC, pointD);\n\t\t\t\tsecond = new Triangle (pointB, pointD, pointC);\n\t\t\t} // else\t\n\t\t\t\t\t\n\t\treturn \tfirst.area() + second.area();\n\t}",
"private double findRadiusFromChordAndPt(Point2D.Double ptA, Point2D.Double ptB, Point2D.Double ptC) {\n\t\tdouble chordLength = ptA.distance(ptB);\n\t\tdouble avgX = (ptB.getX() - ptA.getX()) / 2;\n\t\tdouble avgY = (ptB.getY() - ptA.getY()) / 2;\n\t\tPoint2D.Double midPt = new Point2D.Double(avgX, avgY);\n\n\t\t// finding radius using a manipulated form of pythagorean theorem\n\t\t// r^2 = base^2 + (r - distance between ptC and midPt)^2 ==> r = (base^2 +\n\t\t// (distance between ptC and midPt)^2) / 2(distance between ptC and midPt)\n\t\tdouble base = chordLength / 2; // base of triangle with vertices: ptA, midPt, center of circle\n\t\tdouble height = ptC.distance(midPt); // height of triangle with vertices: ptA, ptC, midPt\n\t\tdouble radius = (Math.pow(base, 2) + Math.pow(height, 2)) / (2 * height);\n\t\treturn radius;\n\t}",
"public double lineLenght() {\n\t\tdouble xdif = p1.getX() - p2.getX();\n\t\tdouble ydif = p1.getY() - p2.getY();\n\t\treturn Math.sqrt(xdif*xdif+ydif*ydif);\t\n\t\t\t\n\t}",
"public double calculateArea(){\r\n\t\treturn this.getSide()*this.getSide();\r\n}",
"public double calcHypo(double x,double y){\n\t\tdouble h = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n\t\treturn h;\n\t}",
"private double eculidean(double x, double x1, double y, double y1) {\n\t\treturn Math.sqrt(Math.pow((x - x1), 2) + Math.pow((y - y1), 2));\n\t}",
"private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }",
"static int triage(S2Point ab, S2Point c) {\n // maxDetError is the maximum error in computing (AxB).C where all vectors are unit length.\n // Using standard inequalities, it can be shown that\n //\n // fl(AxB) = AxB + D where |D| <= (|AxB| + (2/sqrt(3))*|A|*|B|) * e\n //\n // where \"fl()\" denotes a calculation done in floating-point arithmetic, |x| denotes either\n // absolute value or the L2-norm as appropriate, and e = 0.5*DBL_EPSILON. Similarly,\n //\n // fl(B.C) = B.C + d where |d| <= (1.5*|B.C| + 1.5*|B|*|C|) * e .\n //\n // Applying these bounds to the unit-length vectors A,B,C and neglecting relative error (which\n // does not affect the sign of the result), we get\n //\n // fl((AxB).C) = (AxB).C + d where |d| <= (2.5 + 2/sqrt(3)) * e\n //\n // which is about 3.6548 * e, or 1.8274 * DBL_EPSILON.\n final double maxDetError = 1.8274 * S2.DBL_EPSILON;\n // assert S2.isUnitLength(c);\n\n double det = ab.dotProd(c);\n\n // Double-check borderline cases in debug mode.\n // assert Math.abs(det) <= maxDetError\n // || Math.abs(det) >= 100 * maxDetError\n // || det * expensiveSign(a, b, c) > 0;\n\n if (det >= maxDetError) {\n return 1;\n }\n if (det <= -maxDetError) {\n return -1;\n }\n return 0;\n }",
"double area() {\nSystem.out.println(\"Inside Area for Triangle.\");\nreturn dim1 * dim2 / 2;\n}",
"public double getPerimeter(){\n return side1 + side2 + side3;\n }",
"double getside2(){\n\t\treturn side2;\n\t}",
"public double calculateHeadingRadians(){\r\n if(coordinateHistory.size() > 2){\r\n GPSCoordinate firstPoint = coordinateHistory.get(coordinateHistory.size() - 2);\r\n GPSCoordinate secondPoint = coordinateHistory.get(coordinateHistory.size() - 1);\r\n \r\n if(!firstPoint.compareTo(secondPoint)){\r\n double latA = firstPoint.getLatitude();\r\n double longA = firstPoint.getLongitude();\r\n double latB = secondPoint.getLatitude();\r\n double longB = secondPoint.getLongitude();\r\n\r\n double X = Math.cos(latB) * Math.sin(longB - longA);\r\n double Y = (Math.cos(latA) * Math.sin(latB)) - (Math.sin(latA) * Math.cos(latB) * Math.cos(longB - longA));\r\n\r\n headingRadians = - Math.atan2(X, Y);\r\n return headingRadians;\r\n }else{\r\n return headingRadians;\r\n }\r\n }else{\r\n return headingRadians;\r\n }\r\n }",
"AngleSmaller createAngleSmaller();",
"@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}",
"public double absolute() {\r\n return Math.hypot(real_part, imaginary_part);\r\n }",
"private static double getA(Point p_p1, Point p_p2, Point q_p1, Point q_p2){\n\t\tdouble a1, a2;\n\t\ta1 = q_p2.coordinate[0] - q_p1.coordinate[0] - \n\t\t\t p_p2.coordinate[0] + p_p1.coordinate[0];\t\t\n\t\ta2 = q_p2.coordinate[1] - q_p1.coordinate[1] - \n\t\t\t p_p2.coordinate[1] + p_p1.coordinate[1];\n\t\t\t\t\n\t\tdouble a = Math.pow(a1,2) + Math.pow(a2,2);\n\t\t\n\t\treturn a;\n\t}",
"private double angleBP(int cx, int cy, int ex, int ey){\n\t return Math.atan2(((float)ey-cy),((float)ex-cx));\r\n\t }",
"private double calculaPerimetro(){\r\n double perimetro;\r\n perimetro=(float) ((2*(cir.getY()-cir.getX()))*Math.PI);\r\n return perimetro;\r\n }",
"@Override\n\tdouble chuVi() {\n\t\treturn canhA + canhB + canhC;\n\t}",
"private double getPolarAngle(double refX, double refY, double px, double py) {\n\t\tdouble tethaRadian = -1;\n\t\tif ((px - refX) > 0 && (refY - py) >= 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX));\n\t\t} else if ((px - refX) > 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + 2 * Math.PI;\n\t\t} else if ((px - refX) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + Math.PI;\n\t\t} else if ((px - refX) == 0 && (refY - py) > 0) {\n\t\t\ttethaRadian = Math.PI / 2;\n\t\t} else if ((px - refX) == 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = 3 * Math.PI / 2;\n\t\t}\n\t\treturn tethaRadian;\n\t}",
"public double getR(){\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }",
"protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }",
"double getPerimeter();",
"double getPerimeter();",
"double getPerimeter();",
"double getPerimeter();",
"@Override\n public double getPerimeter() {\n return a + b + c;\n }",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter two sides of a right angle triangle seperated by spaces\");\n\t\tdouble sideA = in.nextDouble();\n\t\tdouble sideB = in.nextDouble();\n\t\t\n\t\tSystem.out.println(\"Hypotenus is: \" + hypotenus(sideA, sideB));\n\t\tin.close();\n\n\t}",
"private static int sign(S2Point a, S2Point b, S2Point c, S2Point aCrossB) {\n // assert (isUnitLength(a) && isUnitLength(b) && isUnitLength(c));\n int ccw = triage(aCrossB, c);\n if (ccw == 0) {\n ccw = S2Predicates.Sign.expensive(a, b, c, true);\n }\n return ccw;\n }"
] | [
"0.6133746",
"0.5989298",
"0.5920655",
"0.5905336",
"0.5894575",
"0.58647317",
"0.58283466",
"0.58241165",
"0.58208036",
"0.5770422",
"0.5764666",
"0.5725655",
"0.57251143",
"0.5685992",
"0.56700736",
"0.56488186",
"0.562973",
"0.56069124",
"0.5603795",
"0.5597323",
"0.55786395",
"0.555139",
"0.5550368",
"0.5535745",
"0.5534174",
"0.55244386",
"0.5503438",
"0.55007863",
"0.55007005",
"0.549171",
"0.5484343",
"0.5469692",
"0.54653865",
"0.54634273",
"0.54538006",
"0.5406405",
"0.5406122",
"0.5399806",
"0.53960043",
"0.53891",
"0.53798515",
"0.53788054",
"0.5348258",
"0.5331856",
"0.5322038",
"0.5321252",
"0.53211266",
"0.5319858",
"0.5313414",
"0.53058904",
"0.52967995",
"0.52917385",
"0.52827126",
"0.52812946",
"0.5269883",
"0.52665114",
"0.5258059",
"0.5242088",
"0.52393764",
"0.52294743",
"0.52292377",
"0.5218108",
"0.52153933",
"0.52105415",
"0.5199332",
"0.51900965",
"0.5181869",
"0.51759714",
"0.51686186",
"0.51607037",
"0.51595515",
"0.5154718",
"0.515248",
"0.51466244",
"0.5133029",
"0.51284313",
"0.5126759",
"0.512079",
"0.5119998",
"0.51178515",
"0.5116898",
"0.5114481",
"0.5112249",
"0.5109963",
"0.5106327",
"0.5105969",
"0.51042926",
"0.5098752",
"0.5094498",
"0.509383",
"0.50931275",
"0.5088065",
"0.5086868",
"0.50786084",
"0.5076391",
"0.5076391",
"0.5076391",
"0.5076391",
"0.5073894",
"0.5073008",
"0.50727654"
] | 0.0 | -1 |
have to make a check from ifpresent index | private static void fun2(List<String> ac1, List<List<String>> result, int index) {
String key = ac1.get(0);
for(int i=index;i<result.size();i++){
List<String> res=result.get(i);
if(res.get(0).equals(key)){
//check if any one of the value is repeated
boolean check=fun3(res,ac1);
if(check){
for(int j=1;j<ac1.size();j++){
res.add(ac1.get(i));
}
break;
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }",
"private boolean validateIndex(int index)\n {\n return index >= 0;\n }",
"private boolean isElementIndex(final long index) {\r\n\t\treturn index >= 0 && index < size;\r\n\t}",
"private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }",
"boolean isIndex();",
"private boolean isValid(int index) {\r\n return index >= 0 && index < dimension;\r\n }",
"@Contract(pure = true)\n default boolean isDefinedAt(int index) {\n return index >= 0 && sizeGreaterThan(index);\n }",
"private boolean validIndex(int index)\n {\n if(index >= 0 && index < songs.size())\n return true;\n else\n {\n System.out.println(\"not valid number as index\");\n return false;\n }\n }",
"boolean hasItemIndex();",
"boolean hasItemIndex();",
"boolean hasItemIndex();",
"boolean validateOffset() {\n\t\t\tint num = entriesByIndex.size() + 1; // assuming 0, plus 1-N)\n\t\t\tfor (int index : entriesByIndex.keySet()) {\n\t\t\t\tif (index > num || index < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"private boolean isPositionIndex(final long index) {\r\n\t\treturn index >= 0 && index <= size;\r\n\t}",
"boolean getIsIndexOnValues();",
"public boolean containsKey(Object index) {\n int i;\n return (i = ((Number) index).intValue()) >= 0 && i + start < size;\n }",
"public abstract boolean isMissing(int columnIndex);",
"protected int findIndex(A val) {\n int index = 0;\n boolean found = false;\n \n \n if (elems[0] == null || elems[0] == val){\n return index;\n }\n else{\n \n }\n \n \n\n return index; \n }",
"private boolean indexIsValid(int index) {\n\t\tif (index > -1 && index < text.length())\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"boolean isIndexed();",
"boolean isIndexed();",
"private boolean checkHaveThisNode(int index) {\n\t\treturn this.array[index] == null;\n\t}",
"public boolean has(int index) {\n\t\treturn index >= 0 && index < values.size();\n\t}",
"public boolean validIndex(int idx) {\n return idx >= 0 && idx < len;\n }",
"@Override\n public boolean isUsableIndex(int idx) {\n if ( idx < 0 )\n return false;\n if ( idx >= numDataCols )\n return false;\n return Boolean.TRUE.equals(standardized[idx]);\n }",
"private boolean checkIndexBounds(int idx) {\n return (idx >= 0) && (idx <= this.length);\n }",
"private boolean isKeyAtIndex(String key, int index) {\n return index >= 0 && index < size() && mDataSnapshots.get(index).getKey().equals(key);\n }",
"private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }",
"public static boolean isSet(ArrayList<?> list, Integer index) {\r\n\t\t return index != null && index >=0 && index < list.size() && list.get(index) != null;\r\n\t}",
"@Override\n\tpublic boolean isUsableIndex(int idx) {\n\t\tif ( idx < 0 )\n\t\t\treturn false;\n\t\tif ( idx >= numDataCols )\n\t\t\treturn false;\n\t\treturn Boolean.TRUE.equals(standardized[idx]);\n\t}",
"private boolean hasRoom(int index) {\r\n\t\t\tfor (int i = index; i < data.length; i++) {\r\n\t\t\t\tif (data[i] == null)\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}",
"@Test\n public void validateArrayIndexIsNull(){\n String[] a = new String[2];\n Validate.validIndex(a,20);\n }",
"@Test\r\n\tpublic void testIndexOf() {\r\n\t\tAssert.assertTrue(list.indexOf(null) == -1);\r\n\t\tAssert.assertEquals(2, list.indexOf(new Munitions(2, 3, \"iron\")));\r\n\t}",
"while (!found && index < valid.length)\n {\n if (valid[index] == number)\n found = true;\n else\n index++;\n }",
"public boolean searchOK(int i){\n if(counts.size() > 0 && counts.get(i) != null &&\n queryKeys.size() > 0 && queryKeys.get(i) != null &&\n webEnvs.size() > 0 && webEnvs.get(i) != null)\n return true;\n else\n return false;\n }",
"private boolean isOutOfBounds(int index) {\n return index < 0 || index >= this.size();\n }",
"public void verifyPIF(List<Pair<Integer, Integer>> pif) {\n pif = pif.stream().filter(t->t.getKey()!=null).collect(Collectors.toList());\n for (int i = 0; i < pif.size() - 1; ++i) {\n// if(pif.get(i).getValue()!=0 && pif.get(i+1).getValue()!=0)\n// throw new RuntimeException(String.format(\"There is inconsistency in the file line %d at %d\",lineNumbers.get(i)+1,begPositions.get(i)+1));\n\n }\n }",
"public boolean indexCheck(int index) {\n return (index >= 0 && index <= size) ? true : false;\n }",
"boolean hasAuvLoc();",
"private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}",
"public ArrayList<String> store_present_element(ArrayList<String> oblist){\n\t\tArrayList<String> obj_list = new ArrayList<String>();\n\t\tint result = 0;\n\t\tint obj_index = 1;\n\t\tfor(int i=0; i<oblist.size(); i++){\n\t\t\tString xpathobj = oblist.get(i);\n\t\t\tList<WebElement> list = returnWebelements(xpathobj);\n\t\t\tif(list.size()>0){\n\t\t\t\tresult = 1;\n\t\t\t\tSystem.out.println(xpathobj+\" element is present!! \"+obj_index);\n\t\t\t\tobj_list.add(xpathobj);\n\t\t\t}\n\t\t\tobj_index++;\n\t\t}\n\t\tif(result!=1){\n\t\t\tprintlist(oblist);\n\t\t\tthrow new ObjectNotFoundException(\"none of the element is found from above pattern..\");\n\t\t}\n\t\tcheck_multiple_pattern(obj_list);\n\t\treturn obj_list;\n\t}",
"protected int findNonEmptyPosition() {\n\t\t\twhile (!set.bv[++indice]) {\n\t\t\t}\n\t\t\treturn indice;\n\t\t}",
"boolean contains(int idx);",
"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 }",
"protected void checkSlice(int slice) {\n\tif (slice < 0 || slice >= slices) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at slice=\"+slice);\n}",
"private static void validListCheck(final List list) {\n final boolean[] testIndexSlots=new boolean[list.size()];\n Arrays.fill(testIndexSlots, false);\n int i=-1;\n try {\n\t for (i=0; i<list.size(); i++) {\n\t final ExerciseDetail exDetail=(ExerciseDetail)list.get(i);\n\t final int index=exDetail.getIndex();\n\t if (index<0) {\n\t throw new RuntimeException(\"The list of ExerciseDetails was not valid; negative index found.\");\n\t }\n\t if (testIndexSlots[index]) {\n\t throw new RuntimeException(\"The list of ExerciseDetails was not valid; two instances of the index '\"+index+\"' found.\");\n\t }\n\t testIndexSlots[index]=true;\n\t }\n }\n catch (final ArrayIndexOutOfBoundsException e) {\n throw new RuntimeException(\"The list of ExerciseDetails was not valid; the index '\"+i+\"' is out of range.\");\n }\n }",
"private boolean positionExists(int row, int column) {\n\t\treturn row >= 0 && row < rows && column >= 0 && column < columns;\n\t}",
"@Override\n\tpublic boolean isValidIndex(long index) {\n\t\ttry {\n\t\t\tif (isEmtpy || Long.compareUnsigned(index, maxOffset) > 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn memory.contains(getAddress(index));\n\t\t}\n\t\tcatch (IOException | AddressOutOfBoundsException e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean checkIfEqual(final Object element, final int index) {\n\n return element == this.data[index]\n || this.data[index] != null && data[index].equals(element);\n\n }",
"public boolean checkValidIndex(int index) {\n return index >= 0 && index <= lines.getList().size();\n }",
"protected void checkColumn(int column) {\n\tif (column < 0 || column >= columns) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at column=\"+column);\n}",
"private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }",
"private int existPointV(String nomAgence) { //retourner le rang de l'elemnt s'il existe -1 sinon\n\t\tfor (int i=0;i<pointV.size();i++) {if (pointV.get(i).getNomAgence().equals(nomAgence)) return i;} //point de vente existe\n\t\treturn -1;\n\t\t}",
"private boolean checkPosition(int position) {\r\n\t\treturn position>size||position < 0;\r\n\t}",
"private boolean checkPriceIndex(QuotationDetailsDTO[] details) {\n\t\tif (quotationDTO.getPriceIndex() != Float.parseFloat(txtPriceIndex.getText())) {\n\t\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\t\tdetails[i].setBft(null);\n\t\t\t}\n\t\t\t//System.out.println(\"Price Index Changed\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// round digit changed\n\t\tif (quotationDTO.getRoundOffDigits() != Integer.parseInt(txtRoundOffDigits.getText())) {\n\t\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\t\tdetails[i].setBft(null);\n\t\t\t}\n\t\t\t//System.out.println(\"Price Index Changed\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"boolean _non_existent();",
"private int indexOf(SeqItem el)\n\t{\n\t\treturn indexOf((short)el.getIndex());\n\t}",
"boolean getIsIndexOnKeys();",
"private boolean checkCurrentIterator(Iterator<Integer> iter) {\n return iter != null;\n }",
"private boolean exists(byte cijfer) {\r\n\t\tbyte i = 0;\r\n\t\tCell[] cells = getCellArray();\r\n\t\twhile (i < cells.length && cells[i] != null) {\r\n\t\t\tif (cells[i].getValue() == cijfer)\r\n\t\t\t\treturn true;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean hasTrainIdx();",
"protected void checkRow(int row) {\n\tif (row < 0 || row >= rows) throw new IndexOutOfBoundsException(\"Attempted to access \"+toStringShort()+\" at row=\"+row);\n}",
"public boolean get(long index);",
"public boolean isPresent(int element) {\n\t\treturn location.containsKey(element);\n\t}",
"@Override\n public boolean inputCheck(ArrayList<Integer> arr, int input,int index){\n if(arr.get(index) == input){return true;}\n return false;\n }",
"protected abstract boolean isMarkerPositionInternal(int index);",
"public boolean isSetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(STARTINDEX$10) != null;\n }\n }",
"private static boolean checkForEmpty(Pair<ForStmt, ForStmt> pair) {\n return checkEmptyLists(retrieveForInitialization(pair.getKey()), retrieveForInitialization(pair.getValue())) &&\n checkNotExistenceForCompare(pair.getKey(), pair.getValue()) &&\n checkEmptyLists(retrieveForUpdate(pair.getKey()), retrieveForUpdate(pair.getValue()));\n }",
"boolean hasField0();",
"@Override\r\n public ParaMap index(ParaMap inMap) throws Exception {\n return null;\r\n }",
"boolean hasMonsterIndex();",
"boolean hasMonsterIndex();",
"private void RangeCheck(int index) {\r\n if (index >= size || index < 0)\r\n throw new IndexOutOfBoundsException(\"Index: \"+index+\", Size: \"+size);\r\n }",
"public boolean has(int i)\n {\n return colValues[i] != null;\n }",
"public boolean getInterFlag(int index){\r\n\t\tif (index < 0 || index >= this.interVec.length)\r\n\t\t\treturn false; \r\n\t\telse\r\n\t\t\treturn this.interVec[index];\r\n\t}",
"@Test\r\n\tpublic void testIndexOf() {\r\n\t\ttestArray = new ArrayBasedList<String>();\r\n\t\ttestArray.add(\"math\");\r\n\t\ttestArray.add(\"reading\");\r\n\t\ttestArray.add(\"science\");\r\n\t\ttestArray.add(\"social studies\");\r\n\t\tassertEquals(0, testArray.indexOf(\"math\"));\r\n\t\tassertEquals(1, testArray.indexOf(\"reading\"));\r\n\t\tassertEquals(2, testArray.indexOf(\"science\"));\r\n\t\tassertEquals(3, testArray.indexOf(\"social studies\"));\r\n\t\tassertEquals(-1, testArray.indexOf(\"invalid\"));\r\n\t}",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();",
"private void checkRange(int index) {\n\t\tif (index < 0 || index >= array.length()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index \" + index + \" is out of bouds [0, \" + array.length() + \"]\");\n\t\t}\n\t}",
"private void validateIndexForKeys(CompactRangeIndex ri) {\n assertEquals(6, ri.getIndexStorage().size());\n CloseableIterator<IndexStoreEntry> itr = null;\n try {\n itr = ri.getIndexStorage().iterator(null);\n while (itr.hasNext()) {\n IndexStoreEntry reEntry = itr.next();\n Object obj = reEntry.getDeserializedRegionKey();\n assertTrue(obj instanceof String);\n assertTrue(idSet.contains(obj));\n }\n } finally {\n if (itr != null) {\n itr.close();\n }\n }\n }",
"private void checkRange(int index) {\n if ((index < 0 || index >= curSize))\n throw new IndexOutOfBoundsException(\"Index: \" + index + \" is out of bounds. Size = \" + size());\n }",
"private void rangeCheck(int index) {\n if (index >= this.values.length) {\n throw new ArrayIndexOutOfBoundsException(\"Index of out bounds!\");\n }\n }",
"private void checkValidIndex(int index)\r\n {\r\n if (index < 0 || index >= this.size())\r\n {\r\n throw new IndexOutOfBoundsException(\r\n \"Index \" + index + \" should be in [0...\" + (size() - 1) + \"]\");\r\n }\r\n }",
"@Override\n\tpublic void visit(ExistsExpression arg0) {\n\t\t\n\t}",
"@Test\n public void getIndex(){\n List <Double> list = new ArrayList<>();\n list.add(1.0);\n list.add(2.0);\n list.add(3.0);\n list.add(4.0);\n\n assertEquals(0,list.indexOf(1.0));\n }",
"protected abstract boolean isCrcPositionInternal(int index);",
"private boolean hasParent(int index) {\n return index > 1;\n }",
"boolean verifLigne(int i,int val) { \r\n for (int j = 0; j<N; j++) \r\n if (tab[i][j] == val) \r\n return false; \r\n return true; \r\n }",
"boolean hasUnknown1();",
"boolean hasUnknown1();",
"boolean hasUnknown1();",
"boolean hasUnknown1();",
"boolean hasUnknown1();",
"boolean hasUnknown1();"
] | [
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.64587075",
"0.63861084",
"0.63716495",
"0.6302915",
"0.61443377",
"0.59978783",
"0.5915434",
"0.5904636",
"0.5843986",
"0.5672349",
"0.5672349",
"0.5672349",
"0.5661562",
"0.56499326",
"0.5628023",
"0.5575712",
"0.5568709",
"0.55477166",
"0.5546351",
"0.5542084",
"0.5542084",
"0.55286217",
"0.5507883",
"0.5493871",
"0.548809",
"0.5483762",
"0.5480246",
"0.5464469",
"0.5431722",
"0.5427294",
"0.5382596",
"0.53218883",
"0.5320311",
"0.53094184",
"0.53071856",
"0.52977675",
"0.52896225",
"0.5272691",
"0.52711564",
"0.52403957",
"0.5236359",
"0.5223234",
"0.52150524",
"0.52111447",
"0.52010095",
"0.51802063",
"0.5169945",
"0.51535743",
"0.5143748",
"0.5127785",
"0.51204985",
"0.51202065",
"0.51173645",
"0.51126903",
"0.5080956",
"0.5079938",
"0.5064659",
"0.50641423",
"0.5058785",
"0.50461274",
"0.50299597",
"0.50281596",
"0.5023565",
"0.5015967",
"0.5004809",
"0.5000968",
"0.49970236",
"0.49874964",
"0.4982677",
"0.49547452",
"0.49482068",
"0.49482068",
"0.49445462",
"0.49399906",
"0.49374732",
"0.49362388",
"0.49264044",
"0.49264044",
"0.49264044",
"0.49264044",
"0.49255443",
"0.49191013",
"0.49186844",
"0.49119994",
"0.4905121",
"0.49006215",
"0.4900569",
"0.48994106",
"0.48963422",
"0.48937583",
"0.48889062",
"0.48889062",
"0.48889062",
"0.48889062",
"0.48889062",
"0.48889062"
] | 0.0 | -1 |
TODO Autogenerated method stub | private static boolean fun3(List<String> res, List<String> ac1) {
HashSet<String> hs=new HashSet<String>();
for(int i=0;i<res.size();i++){
hs.add(res.get(i));
}
for(int i=0;i<ac1.size();i++){
if(hs.contains(ac1.get(i)))
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | private static int fun(String key, List<List<String>> result) {
for(int i=0;i<result.size();i++){
List<String> ac=result.get(i);
if(ac.get(0).equals(key)){
return i;
}
}
return -1;
} | {
"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 |
super.insertString(offset, str.replaceAll(teclas, ""), attr); | public void replace(int offset, String str, AttributeSet attr)
throws BadLocationException{
String strFinal=str;
if (notRepeat != null){
String txt= super.getText(0, super.getLength());
JOptionPane.showMessageDialog(null, txt);
if ((txt.contains(notRepeat)) && (str.contains(notRepeat))){
strFinal= str.replaceAll("["+notRepeat+"]", "");
}
}
super.insertString(offset, strFinal.replaceAll(teclas, ""), attr);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n\t\tsuper.insertString(offs, str.replaceAll(\"[^0-9]\", \"\"), a);\n\t}",
"public void insertString(int offset, String str, AttributeSet attr)\n throws BadLocationException {\n\n if (iMaxLength <= 0) // aceitara qualquer no. de caracteres \n {\n super.insertString(offset, str, attr);\n return;\n }\n\n int ilen = (getLength() + str.length());\n if (ilen <= iMaxLength) // se o comprimento final for menor... \n {\n super.insertString(offset, str, attr); // ...aceita str \n }\n }",
"@Override\r\n\tpublic void insertString(int offs, String str, AttributeSet a)\r\n\t\t\tthrows BadLocationException {\n\t\tStyleConstants.setForeground((MutableAttributeSet) a, Color.BLACK);\r\n\t\tStyleConstants.setItalic((MutableAttributeSet) a, false);\r\n\t\t\r\n\t\t// trim line breaks, spaces and tab characters from inserted string\r\n\t\tString line = str.trim();\r\n\t\t// check for keywords\r\n\t\t// TODO: maybe move context detection to separate method\r\n\t\tif (line.startsWith(\"[BEFORE_HEX]\")) {\r\n\t\t\tthis.branchContext = BranchContext.BEFORE_HEX;\r\n\t\t} else if (line.startsWith(\"[AFTER_HEX]\")) {\r\n\t\t\tthis.branchContext = BranchContext.AFTER_HEX;\r\n\t\t} else if (line.startsWith(\"[HEADER]\")) {\r\n\t\t\tthis.branchContext = BranchContext.HEX_HEADER;\r\n\t\t} else if (line.startsWith(\"[CODE]\")) {\r\n\t\t\tthis.branchContext = BranchContext.HEX_CODE;\r\n\t\t} else if (line.startsWith(\"//\")) {\r\n\t\t\t// TODO: get style data from context enum\r\n\t\t\tStyleConstants.setForeground((MutableAttributeSet) a, new Color(63, 127, 95));\r\n\t\t}\r\n\t\t\r\n\t\tif (this.leafContext == LeafContext.ATTRIBUTE_VALUE) {\r\n\t\t\tStyleConstants.setForeground((MutableAttributeSet) a, new Color(0, 0, 192));\r\n\t\t\tStyleConstants.setItalic((MutableAttributeSet) a, true);\r\n\t\t}\r\n\t\tthis.leafContext = LeafContext.OTHER;\r\n\t\t\r\n\t\t// check for comments\r\n\t\tint commentOffset = line.indexOf(\"//\");\r\n\t\tif (commentOffset > 0) {\r\n\t\t\t// split at '//' if comment is after other content\r\n\t\t\tString pre = str.substring(0, commentOffset + 1);\r\n\t\t\tString post = str.substring(commentOffset + 1);\r\n\t\t\t\r\n\t\t\tthis.insertString(offs, pre, a);\r\n\t\t\tthis.insertString(offs + pre.length(), post, a);\r\n\t\t} else {\r\n\t\t\t// check for attribute values\r\n\t\t\tint equalsOffset = str.indexOf(\"=\");\r\n\t\t\tif ((equalsOffset > 0) && (commentOffset < 0)) {\r\n\t\t\t\t// split at '=' if attribute/value pair is outside of comment\r\n\t\t\t\tString pre = str.substring(0, equalsOffset);\r\n\t\t\t\tString post = str.substring(equalsOffset + 1);\r\n\t\t\t\t\r\n\t\t\t\tthis.leafContext = LeafContext.ATTRIBUTE_NAME;\r\n\t\t\t\tthis.insertString(offs, pre, a);\r\n\t\t\t\tthis.leafContext = LeafContext.OTHER;\r\n\t\t\t\tthis.insertString(offs + pre.length(), \"=\", a);\r\n\t\t\t\tthis.leafContext = LeafContext.ATTRIBUTE_VALUE;\r\n\t\t\t\tthis.insertString(offs + pre.length() + 1, post, a);\r\n\t\t\t} else {\r\n\t\t\t\t// fall-back for default behavior\r\n\t\t\t\tsuper.insertString(offs, str, a);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void insertString(int offset, String str, AttributeSet a)\n throws BadLocationException\n {\n super.insertString(offset, str, a);\n\t\t//System.out.println(\"STRING: \"+str+\" \"+str.length()+\" \"+\n\t\t//\toffset);\n\t\t//variables\n int locationChange = offset - _currentLocation;\n\t\tint strLength = str.length();\n\t\tint prevSize;\t\t//stores the size of the item prev when insert begins.\n\t\tint reducedOffset;\n\t\tModelList<ReducedToken>.Iterator mark;\n\t\tVector<StateBlock> newStates = new Vector<StateBlock>();\n\n\t\t//1)adjust location\n _reduced.move(locationChange);\n\t\treducedOffset = _reduced._offset;\n\t\t//2)set mark to the previous item.\n\t\tmark = _reduced.makeCopyCursor();\n\t\tif (!mark.atStart()) //if not at start then get the previous item.\n\t\t\tmark.prev();\n\t\tif (mark.atStart()) //if now at start then size of current == 0\n\t\t\tprevSize = 0;\n\t\telse\n\t\t\tprevSize = mark.current().getSize(); //else size == size of current\n\t\t\n\t\t\n\t\t//3)loop through string inserting characters\n for (int i = 0; i < str.length(); i++)\n\t\t\t{\n\t\t\t\tchar curChar = str.charAt(i);\n\t\t\t\t_addCharToReducedView(curChar);\n\t\t\t}\n\t\t\n\t\t//get highlight information from mark onward\n\t\t//numbers are off by prevSize + strLength + reducedOffset\n\t\t//the adjustment is the absolute position that newStates started at\n\n\t\tint adjustment = offset - prevSize - reducedOffset;\n\t\tnewStates = SBVectorFactory.generate(mark,0,adjustment);\n\t\t\n\t\tupdateCurrentHighlights(newStates,adjustment);\n\t\t\n\t\t_currentLocation = offset + strLength;\n\t\t_modifiedSinceSave = true;\n\n\t\tupdateStyles();\n\n }",
"void insert(int pos, String s);",
"public void insertString(int offs, String str, AttributeSet a)\n throws BadLocationException\n {\n String currentText = getText( 0, getLength() ) + \"0\";\n\n String beforeOffset = currentText.substring(0, offs);\n String afterOffset = currentText.substring(offs, currentText.length());\n String proposedResult = beforeOffset + str + afterOffset;\n try {\n format.parseObject( proposedResult );\n super.insertString( offs, str, a );\n } catch (ParseException e) {\n Toolkit.getDefaultToolkit().beep();\n }\n }",
"@Override\r\n public void insertString(int offs, String str, AttributeSet a)\r\n throws BadLocationException {\n\r\n if (getLength() + str.length() > max) {\r\n // If it does, then truncate it\r\n\r\n str = str.substring(0, max - getLength());\r\n }\r\n super.insertString(offs, str, a);\r\n }",
"public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\r\r\r\r\r\r\n String currentText = getText(0, getLength());\r\r\r\r\r\r\n String beforeOffset = currentText.substring(0, offs);\r\r\r\r\r\r\n String afterOffset = currentText.substring(offs, currentText.length());\r\r\r\r\r\r\n System.out.println(\"[*********]INSERTSTRING\");\r\r\r\r\r\r\n\r\r\r\r\r\r\n // boolean validate = false;\r\r\r\r\r\r\n boolean check=false;\r\r\r\r\r\r\n // regardons si il s'agit d'une action de validation\r\r\r\r\r\r\n // if (str.equals(DefaultMask.VALIDATE)) \r\r\r\r\r\r\n // validate = true;\r\r\r\r\r\r\n //str = validate ? \"\" : str;\r\r\r\r\r\r\n String proposedResult = beforeOffset + str + afterOffset;\r\r\r\r\r\r\n if(proposedResult.length()<m_longeur_saisie || validate==true){ \r\r\r\r\r\r\n super.insertString(offs,str, a);\r\r\r\r\r\r\n validate=false;\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n if(charger==false){\r\r\r\r\r\r\n m_model.loadData(null,proposedResult);\r\r\r\r\r\r\n m_model.sortByColonne(0,m_parent.getGrp_Table_table());\r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n charger=true;\r\r\r\r\r\r\n if(!m_model.isM_sortAsc())\r\r\r\r\r\r\n m_model.sortByColonne(0,m_parent.getGrp_Table_table());\r\r\r\r\r\r\n if(m_model.getArray()!=null){\r\r\r\r\r\r\n check=search(proposedResult); \r\r\r\r\r\r\n if (check){\r\r\r\r\r\r\n super.insertString(offs,str, a);\r\r\r\r\r\r\n affichePopup(true);\r\r\r\r\r\r\n m_parent.setGoodIcon(true); \r\r\r\r\r\r\n }\r\r\r\r\r\r\n \r\r\r\r\r\r\n else{ \r\r\r\r\r\r\n java.awt.Toolkit.getDefaultToolkit().beep();\r\r\r\r\r\r\n JToolTip toolTip=new JToolTip();\r\r\r\r\r\r\n toolTip.setToolTipText(\"test\");\r\r\r\r\r\r\n toolTip.setComponent(m_parent.getGrp_Table_table());\r\r\r\r\r\r\n toolTip.setVisible(true);\r\r\r\r\r\r\n System.out.println(\"showtooltip\");\r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n \r\r\r\r\r\r\n \r\r\r\r\r\r\n }\r\r\r\r\r\r\n } \r\r\r\r\r\r\n }",
"@Override\n\tpublic void editorInsert(String substring)\n\t{\n\t stringBuffer.replace(selectionStart,selectionEnd,substring);\n\t selectionEnd=selectionStart+substring.length();\n\t selectionStart=selectionEnd;\n\t\tSystem.out.println(\"DEBUG: inserting text [\" + substring + \"]\");\n\t}",
"@Override\n public void insertString(int offs, String str, AttributeSet a) throws NumberFormatException {\n int help;\n\n\n if (Character.isDigit(str.charAt(0))) {\n help = Character.digit(str.charAt(0),10);\n if (help < 10) {\n if (super.getLength() + str.length() > maxWert) {\n str = str.substring(0, maxWert - super.getLength());\n }\n try {\n super.insertString(offs, str, a);\n\n String text = super.getText(0, super.getLength());\n if(text != null && !text.equals(\"\")){\n edge.setWeight(Integer.parseInt(text));\n\n }\n\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"public abstract String insert(Object obj) ;",
"private void insert(String text, AttributeSet style) {\r\n\t\ttry {\r\n\t\t\tdocument.insertString(getCaretPosition(), text, style);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void insertString(FilterBypass fb, int offset, String string, AttributeSet attr)\n\t\t\tthrows BadLocationException {\n\t\tif((fb.getDocument().getLength() + string.length()) <= MAX_NUMBER_DIGITS && string.matches(REGEX)) {\n\t\t\t//replace in string to append only characters that are digits \n\t\t\tfb.insertString(offset, string, attr);\n\t\t}else {\n\t\t\tToolkit.getDefaultToolkit().beep();\n\t\t}\n\t}",
"public MyStringBuilder2 insert(int offset, String str)\n\t{\n\t\tif(offset > length || offset < 0) {\n\t\t\t//do nothing\n\t\t} else if(offset == length) {\n\t\t\t//append if at the end\n\t\t\tthis.append(str);\n\t\t} else {\n\t\t\tif (offset == 0) {\n\t\t\t\t//add new nodes from the front\n\t\t\t\tCNode newNode = new CNode(str.charAt(0));\n\t\t\t\tnewNode.next = firstC;\n\t\t\t\tfirstC = newNode;\n\t\t\t\toffset++;\n\t\t\t\tlength++;\n\t\t\t\trecursiveInsert(offset, 1, str);\n\t\t\t} else {\n\t\t\t\toffset -= 1;\n\t\t\t\tCNode nodeBefore = getCNodeAt(offset, firstC);\n\t\t\t\tCNode nodeAfter = nodeBefore.next;\n\t\t\t\trecursiveInsertMiddle(0, str, nodeBefore, nodeAfter);\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn this;\n\t}",
"public\n void insertString(int offset, String str, AttributeSet a) throws BadLocationException {\n if (str == null) {\n return;\n }\n\n /* Insert the string if it is formatted properly. */\n try {\n double d = Double.parseDouble(str);\n } catch (NumberFormatException e) {\n\n /* Handle decimal points the first time they appear. */\n if (!str.equals(\".\")) {\n return;\n } else if (str.equals(\".\") && !firstDecimal) {\n return;\n } else {\n firstDecimal = false;\n }\n }\n\n\n /* If the string was successfully parsed but had a decimal point\n in it (as could happen when this class is instantiated with\n a given value), the firstDecimal flag must be set. */\n if (str.indexOf(\".\") != -1) {\n firstDecimal = false;\n }\n\n /* Insert the string into the field. */\n super.insertString(offset, str, a);\n }",
"public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {\n\t\tboolean allow = true;\n\t\tfor (int i = 0; i < str.length(); i++)\n\t\t\tif (allowChars.indexOf(str.charAt(i)) < 0) {\n\t\t\t\t// Check each character (better way?)\n\t\t\t\tallow = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\tif (allow)\n\t\t\tsuper.insertString(offs, str, a);\n\t}",
"public void insertString(final DocumentFilter.FilterBypass fb, final int offset, final String text,\n final AttributeSet attr) throws BadLocationException {\n // fb.insertString(offset, text.toUpperCase(), attr);\n fb.insertString(offset, text, attr);\n }",
"private static String insert(String input, int index, String toInsert) {\n return input.substring(0, index) + toInsert + input.substring(index);\n }",
"public static void insert(String s)\n {\n }",
"public void insertString (int pos, String str, AttributeSet attr) \r\n\t\tthrows BadLocationException {\r\n\r\n\t\tif (str == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint len = str.length();\r\n\t\tif (len == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint curLength = getLength();\r\n\t\tif (maxLength > 0) {\r\n\t\t\tif (curLength + len > maxLength) {\r\n\t\t\t\tbeep();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif (len > 1) {\r\n\r\n\t\t\tdontValidate = true;\r\n\t\t\tint j = 0;\r\n\t\t\tfor (int i = pos; i < len; i++, j++) {\r\n\r\n\t\t\t\tif (i == len - 1) {\r\n\t\t\t\t\tdontValidate = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString s = str.substring(j, j + 1);\t\r\n\t\t\t\tinsertString(i, s, attr);\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\r\n\t\t/*\r\n\t\t * If it's a digit character then go on, otherwise enter the \r\n\t\t * special checking mode\r\n\t\t */\r\n\t\tchar digit_char = str.charAt(0);\r\n\t\tif (!Character.isDigit(digit_char) && digit_char != '-'\r\n\t\t\t&& digit_char != '+' && digit_char != '.'\r\n\t\t\t&& digit_char != 'E' && digit_char != 'e') {\r\n\r\n\t\t\t/*\r\n\t\t\t * Invalid data - don't modify\r\n\t\t\t */\t\t\t\r\n\t\t\tbeep();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tString buf = getText(0, curLength).toLowerCase();\r\n\t\tif (digit_char == '-' || digit_char == '+') {\r\n\r\n\t\t\tif (pos == 0 && buf.length() > 0\r\n\t\t\t\t\t&& (buf.charAt(0) == '-' || buf.charAt(0) == '+')) {\r\n\t\t\t\t/*\r\n\t\t\t\t * don't let user begin line with 2 sign characters\r\n\t\t\t\t */\r\n\t\t\t\tbeep();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * other than the first character, only allow a +/- to\r\n\t\t\t * sign the exponent (i.e. -5.09e-3)\r\n\t\t\t */\r\n\t\t\tboolean sign_okay = \r\n\t\t\t\t(pos == 0) || (pos > 1 && buf.charAt(pos - 1) == 'e');\r\n\t\t\tif (!sign_okay) {\r\n\t\t\t\tbeep();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (digit_char == '.' && buf.indexOf(\".\") > -1) {\r\n\t\t\tbeep();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ((digit_char == 'e' || digit_char == 'E') && buf.indexOf(\"e\") > -1) {\r\n\t\t\tbeep();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\r\n\t\tif (dontValidate || (minValue == null && maxValue == null)) {\r\n\t\t\tsuper.insertString(pos, str, attr);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\r\n\t\t/*\r\n\t\t * Build up the string and validate it's numeric value \r\n\t\t */\r\n\t\tString s = getText(0, curLength);\r\n\t\tStringBuffer number = new StringBuffer();;\r\n\t\tif (pos > 0) {\r\n\r\n\t\r\n\t\t\tif (pos <= curLength) {\r\n\t\t\t\tnumber.append(s.substring(0, pos));\r\n\t\t\t}\r\n\r\n\t\t\tnumber.append(str);\r\n\t\t\r\n\t\t\tif (pos < curLength) {\r\n\t\t\t\tnumber.append(s.substring(pos));\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\tnumber.append(str);\r\n\t\t\tif (s != null) {\r\n\t\t\t\tnumber.append(s);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\ttry {\r\n\r\n\t\t\tDouble val = new Double(number.toString());\r\n\t\t\tif (validateMin && minValue != null &&\r\n\t\t\t\t\tminValue.compareTo(val) > 0) {\r\n\r\n\t\t\t\tbeep();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (maxValue != null && maxValue.compareTo(val) < 0) {\r\n\r\n\t\t\t\tbeep();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t} catch (NumberFormatException e) {\r\n\r\n\t\t\tbeep();\r\n\t\t\treturn;\r\n\t\t}\t\t\t\r\n\r\n\r\n\t\tsuper.insertString(pos, str, attr);\r\n\t}",
"public void insertString(int offset, String s, AttributeSet attributeSet)\n {\n \tfor (int i=0; i< s.length(); i++)\n \t{\n \t\tif (!s.valueOf(s.charAt(i)).equals(\"0\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"1\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"2\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"3\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"4\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"5\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"6\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"7\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"8\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"9\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"-\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"E\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\"e\") &&\n \t\t\t\t!s.valueOf(s.charAt(i)).equals(\".\") \n \t\t\t\t)\n \t\t{\n \t\t\tToolkit.getDefaultToolkit().beep();\n \t\t\treturn;\n \t\t}\n \t}\n \ttry\n \t{\n \t\tsuper.insertString( offset,s,attributeSet);\n \t}\n \tcatch (BadLocationException ble)\n \t{\n \t\treturn;\n \t}\n }",
"@Override\n\tpublic String strreplace(String str, int start, int end, String with) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void insertAttributeAt(final int position) {\n\n\t}",
"int insert(AttributeExtend record);",
"private static void stringBuff() {\n StringBuffer s1 = new StringBuffer(\"Shubham Dhage\");\n StringBuffer newString = s1.append(\"!!!\");\n StringBuffer insertString = s1.insert(0, 'B');\n\n System.out.println(newString);\n System.out.println(insertString);\n }",
"public void insert(int pos, MConstText srcText) {\r\n replace(pos, pos, srcText, 0, srcText.length());\r\n }",
"public void insert(String s){\n\t\tinsertHelper(root, s);\n\t}",
"@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }",
"public void replace(int start, int end, String toInsert) {\n String s = toString();\n\n // Build a new buffer in pieces (will throw exceptions).\n stringArray = new String[] {\n s.substring(0, start), toInsert, s.substring(end)};\n arrayLen = 3;\n\n // Calculate the new string length.\n stringLength += toInsert.length() - (end - start);\n }",
"public static String insert(String str, String substr, String newstr) {\n if (str == null || substr == null || newstr == null) return \"\";\n String rt = left(str, substr) + newstr + substr + right(str, substr);\n return rt;\n }",
"int insertSelective(AttributeExtend record);",
"public void insert(char i);",
"void replace(int offset, int length, String text) throws BadLocationException;",
"public MyStringBuilder2 insert(int offset, char [] c)\n\t{\n\t\tString str = new String(c);\n\t\tif(offset > length || offset < 0) {\n\t\t\t//do nothing\n\t\t} else if(offset == length) {\n\t\t\t//append if at the end\n\t\t\tthis.append(str);\n\t\t} else {\n\t\t\tif (offset == 0) {\n\t\t\t\t//add new nodes from the front\n\t\t\t\tCNode newNode = new CNode(str.charAt(0));\n\t\t\t\tnewNode.next = firstC;\n\t\t\t\tfirstC = newNode;\n\t\t\t\toffset++;\n\t\t\t\tlength++;\n\t\t\t\trecursiveInsert(offset, 1, str);\n\t\t\t} else {\n\t\t\t\toffset -= 1;\n\t\t\t\tCNode nodeBefore = getCNodeAt(offset, firstC);\n\t\t\t\tCNode nodeAfter = nodeBefore.next;\n\t\t\t\trecursiveInsertMiddle(0, str, nodeBefore, nodeAfter);\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn this;\n\t\t\n\t}",
"public void insertPreservingSelection(String newText, int offset) {\n getLock().getWriteLock();\n try {\n SelectionSetter noChange = new SelectionSetter(SelectionSetter.DO_NOT_CHANGE);\n PTextBuffer buffer = getTextBuffer();\n buffer.replace(noChange, offset, 0, newText, noChange);\n } finally {\n getLock().relinquishWriteLock();\n }\n }",
"String getReplaced();",
"public void insert(String word) { \n char[] w = word.toCharArray(); \n insert(root, w, 0); \n }",
"private HTMLElement newtd(String contenido) {\n/* 375 */ HTMLElement td = (HTMLElement)this.pagHTML.createElement(\"td\");\n/* 376 */ td.appendChild(this.pagHTML.createTextNode(contenido));\n/* 377 */ td.setAttributeNode(newAttr(\"class\", \"ctd\"));\n/* 378 */ return td;\n/* */ }",
"@Override\n\tpublic String strreplace(String str, String oldstr, String newstr) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void insert() {\n\t\t\n\t}",
"@Override\n public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs)\n throws BadLocationException {\n if (text.equals(last) && last.equals(\"^\")) {\n text = \"\";\n }\n last = text;\n super.replace(fb, offset, length, text, attrs);\n }",
"public void insert(String s, int caretOffset) {\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tinsert(c, caretOffset);\n\t\t}\n\t}",
"public void insert(String newitem) {\n\t\t// TODO Write me!\n\t\t\n\t}",
"private static void encodeStringForAuditFieldReplaceString(StringBuilder sb, String oldString, String newString) {\n\n\t\tint index = sb.indexOf(oldString);\n\t\twhile (index >= 0) {\n\t\t\tsb.delete(index, index + oldString.length());\n\t\t\tsb.insert(index, newString);\n\t\t\tindex = sb.indexOf(oldString, index + newString.length());\n\t\t}\n\n\t}",
"private Attr newAttr(String tipo, String valor) {\n/* 341 */ Attr atrib = this.pagHTML.createAttribute(tipo);\n/* 342 */ atrib.setValue(valor);\n/* 343 */ return atrib;\n/* */ }",
"@Override\r\n\tpublic Buffer setString(int pos, String str) {\n\t\treturn null;\r\n\t}",
"void insert(String mappedNumber, String word);",
"private int Insert(String[] p){\n\n\n int count = Integer.parseInt(p[1]);\n for(int o =0;o<count+3;o++){\n p[o] = p[o].replace(\"\\\"\",\"\");\n }\n\n String classname = p[2];\n Object[] tuple_ = new Object[count];\n\n int classid = 0;\n\n for(ClassTableItem item:classt.classTable)\n {\n if(item.classname.equals(classname)){\n classid = item.classid;\n }\n }\n\n for(int j = 0;j<count;j++){\n tuple_[j] = p[j+3];\n }\n\n Tuple tuple = new Tuple(tuple_);\n tuple.tupleHeader=count;\n\n int[] a = InsertTuple(tuple);\n topt.maxTupleId++;\n int tupleid = topt.maxTupleId;\n topt.objectTable.add(new ObjectTableItem(classid,tupleid,a[0],a[1]));\n\n //向代理类加元组\n\n for(DeputyTableItem item:deputyt.deputyTable){\n if(classid == item.originid){\n //判断代理规则\n\n String attrtype=null;\n int attrid=0;\n for(ClassTableItem item1:classt.classTable){\n if(item1.classid == classid&&item1.attrname.equals(item.deputyrule[0])) {\n attrtype = item1.attrtype;\n attrid = item1.attrid;\n break;\n }\n }\n\n if(Condition(attrtype,tuple,attrid,item.deputyrule[2])){\n String[] ss= p.clone();\n String s1 = null;\n\n for(ClassTableItem item2:classt.classTable){\n if(item2.classid == item.deputyid) {\n s1 = item2.classname;\n break;\n }\n }\n //是否要插switch的值\n //收集源类属性名\n String[] attrname1 = new String[count];\n int[] attrid1 = new int[count];\n int k=0;\n for(ClassTableItem item3 : classt.classTable){\n if(item3.classid == classid){\n attrname1[k] = item3.attrname;\n attrid1[k] = item3.attrid;\n k++;\n\n if (k ==count)\n break;\n }\n }\n for (int l = 0;l<count;l++) {\n for (SwitchingTableItem item4 : switchingT.switchingTable) {\n if (item4.attr.equals(attrname1[l])){\n //判断被置换的属性是否是代理类的\n\n for(ClassTableItem item8: classt.classTable){\n if(item8.attrname.equals(item4.deputy)&&Integer.parseInt(item4.rule)!=0){\n if(item8.classid==item.deputyid){\n int sw = Integer.parseInt(p[3+attrid1[l]]);\n ss[3+attrid1[l]] = new Integer(sw+Integer.parseInt(item4.rule)).toString();\n break;\n }\n }\n }\n\n\n }\n }\n }\n\n ss[2] = s1;\n int deojid=Insert(ss);\n //插入Bi\n biPointerT.biPointerTable.add(new BiPointerTableItem(classid,tupleid,item.deputyid,deojid));\n\n\n\n }\n }\n }\n return tupleid;\n\n\n\n }",
"public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }",
"public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}",
"public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWord = true;\n\t}",
"public static String addModifierToAll(String text,String toReplace,String modifier,AttributeType attrType){\r\n\t\tString newText=text;\r\n\t\ttry {\r\n\t\t\tswitch (attrType){\r\n\t\t\t\tcase STRING:\r\n\t\t\t\t\tnewText = text.replaceAll(\"((?ui)\"+toReplace+\")\", toReplace+modifier);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase NUMBER:\r\n\t\t\t\t\tnewText = addModifierToAllForNumericRanges(text, toReplace, modifier);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (UnexpectedArgumentException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn newText;\r\n\t}",
"public void addPos(String word, IPosition pos);",
"public void insert(String word) {\n insert(root, word, new Object(), 0);\n }",
"String makeInsertedText(String base)\r\n {\r\n inserted++;\r\n\r\n return base + \":\" + Integer.toString(inserted);\r\n }",
"public static String insertback(String str, String substr, String newstr) {\n if (str == null || substr == null || newstr == null) return \"\";\n String rt = leftback(str, substr) + newstr + substr + rightback(str, substr);\n return rt;\n }",
"int insertSelective(WdWordDict record);",
"@Override\n\tpublic void af(String t) {\n\n\t}",
"void onItemInsert(View v, int position, String str);",
"String getReplacementString();",
"abstract public void selfReplace(Command replacement);",
"@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}",
"public IDnaStrand append(String dna);",
"public void insert(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"public void insert(char location, Node toInsert)\n {\n if (location >= 'a' && location <= 'z')\n {\n nexts[location - 97] = toInsert;\n }\n if (location >= 'A' && location <= 'Z')\n {\n nexts[location - 10] = toInsert;\n }\n }",
"@Override\n\tpublic void insert(Unidade obj) {\n\n\t}",
"public void insert(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n subNode = new Node(c);\n curr.subNodes[c - 'a'] = subNode;\n }\n if (i == word.length() - 1) {\n subNode.isWord = true;\n }\n curr = subNode;\n }\n }",
"private static void write(String s, Style style) {\r\n\t\ttry {\r\n\t\t\tdoc.insertString(doc.getLength(), s, style);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public native String insertItemBefore(String newItem, Number index);",
"public abstract void insertAttributes(int start, Point pt, int semantics,\r\n int validSize);",
"void insertTagContent(TemplateTag tag){\r\n \t\tif(tag.found){\r\n \t\t\ttemplateParts.set(tag.templatePosition,tag.getContent());\r\n \t\t}\r\n \t}",
"int insert(CfgPrintTemplateAttr record);",
"int insertSelective(Clazz record);",
"@Override\n\tpublic void addAtBeginning(String data) {\n\t}",
"public void insert(String word) {\n Node curr = root;\n\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n\n if(curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new Node(c);\n }\n\n curr = curr.children[c - 'a'];\n }\n\n curr.isWord = true;\n }",
"void insert(String delta) {\n \n if (!acceptInsert(delta)) {\n clear();\n } \n \n int cursor = mDisplay.getSelectionStart();\n mDisplay.getText().insert(cursor, delta);\n \n }",
"@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}",
"public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }",
"public MyStringBuilder2 replace(int start, int end, String str)\n\t{\n\t\tif (start < 0 || end <= start || start > length) {\n\t\t\treturn this;\n\t\t} else if (end > length) {\n\t\t\tCNode curr = getCNodeAt(start, firstC);\n\t\t\trecursiveReplace((length - start), curr, str, 0);\n\t\t\tappend(str.substring(length-start, str.length()));\n\t\t\treturn this;\n\t\t} else {\n\t\t\tCNode curr = getCNodeAt(start, firstC);\n\t\t\trecursiveReplace((end-start), curr, str, 0); //replace characters\n\t\t\tinsert(end, str.substring((end-start), str.length()));\n\t\t\treturn this;\n\t\t}\n\t}",
"public void insert(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\tp.children[c-'a'] = new TrieNode(c);\n\t \tp = p.children[c-'a'];\n\t }\n\t p.mark = true;\n\t }",
"void insertToNode(String text, Node n) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tint pos = 0, end;\n\t\t//Method finds all text part between spaces, but ignores the last text since there is no space, just newline\n\t\twhile ((end = text.indexOf(\" \", pos)) >= 0) {\n\t\t\tlist.add(text.substring(pos, end));\n\t\t\tpos = end + 1;\n\t\t}\n\t\t//Adds the last text since it else wise is ignored\n\t\tlist.add(2, text.substring(pos, text.length() - 1));\n\t\t\n\t\tn.setNum(Integer.parseInt(list.get(0).trim()));\n\t\tn.setLatitude(Double.parseDouble(list.get(1).trim()));\n\t\tn.setLongitude(Double.parseDouble(list.get(2).trim()));\n\t\tn.setPrev(new Last());\n\t}",
"public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }",
"private String swapFour(int i,char insert,char[]word){\n StringBuilder ste=new StringBuilder(new String(word));\n if(i != word.length)\n ste.insert(i, insert);\n else\n ste.append(insert);\n return new String(ste);\n }",
"public void insert(String word){\n //initially curr is root\n TrieNode curr = root;\n for(int i=0; i<word.length(); i++){\n char c = word.charAt(i);\n //if char doesnot exist, add new trienode\n if(curr.children[c-'a'] == null){\n curr.children[c-'a'] = new TrieNode();\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //set curr.word to the word\n curr.word = word;\n }",
"public void insert(String word, Point point)\r\n\t{\r\n\t\t//call insert\r\n\t\troot.insert(new Data(word, point));\r\n\t}",
"public void insert(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (node.ch[c - 'a'] == null) {\n node.ch[c - 'a'] = new TrieNode();\n }\n node = node.ch[c - 'a'];\n }\n node.word = word;\n }",
"org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType insertNewGeneralName(int i);",
"public void insert(String word) {\n \tTrieNode cur=root;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\t\tint ch=word.charAt(i)-'a';\n \t\t\tif(cur.next[ch]==null) {\n \t\t\t\tcur.next[ch]=new TrieNode();\n \t\t\t}\n \t\t\tcur=cur.next[ch];\n \t\t}\n \tcur.val=word;\n \tcur.isEnd=true;\n }",
"void insertTypeToNode(String text) {\n\t\tList<String> list = new ArrayList<String>();\n\t\tint pos = 0, end;\n\t\twhile ((end = text.indexOf(\"\\t\", pos)) >= 0) {\n\t\t\tlist.add(text.substring(pos, end));\n\t\t\tpos = end + 1;\n\t\t}\n\t\tlist.add(2, text.substring(pos, text.length() - 1));\n\t\tint nodeNum = Integer.parseInt(list.get(0).trim());\n\t\tNode n = this.nodes.get(nodeNum);\n\t\tn.setType(Integer.parseInt(list.get(1)));\n\t\tn.setName(list.get(2));\n\t}",
"public MyStringBuilder2 insert(int offset, char c)\n\t{\n\t\tif(offset > length || offset < 0) {\n\t\t\t//do nothing\n\t\t} else if(offset == length) {\n\t\t\t//appends if the end\n\t\t\tthis.append(c);\n\t\t} else {\n\t\t\tif (offset == 0) {\n\t\t\t\t//if front append to the front\n\t\t\t\tCNode newNode = new CNode(c);\n\t\t\t\tnewNode.next = firstC;\n\t\t\t\tfirstC = newNode;\n\t\t\t\toffset++;\n\t\t\t\tlength++;\n\t\t\t} else {\n\t\t\t\t//append to the middle\n\t\t\t\toffset -= 1;\n\t\t\t\tCNode inserted = new CNode(c);\n\t\t\t\tCNode nodeBefore = getCNodeAt(offset + 0, firstC);\n\t\t\t\tCNode nodeAfter = nodeBefore.next;\n\t\t\t\tinserted.next = nodeAfter;\n\t\t\t\tnodeBefore.next = inserted;\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn this;\n\t}",
"private void insertStringValue(String field, String value) {\n mapFieldsStrings.put(field, value);\n }",
"public void insert(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n ptr.child[c - 'a'] = new TrieNode();\n }\n ptr = ptr.child[c - 'a'];\n }\n ptr.is_end = true;\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insertAtBegin(String v) {\n\tElementDPtr e = new ElementDPtr(v,null,head);\n\thead = e;\n\tlength ++;\n\tSystem.out.println(tail.getPrev().getValue() + \" insertB \" + length);\n}",
"@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"private void addCustomWords() {\r\n\r\n }",
"protected void setAttribs(String str, int start, int end) {\n clearAttributes();\n //FIXME increasing below by one(default) might be tricky, need more analysis\n // after lucene upgrade to 3.5 below is most probably not even needed \n this.posIncrAtt.setPositionIncrement(1);\n this.termAtt.setEmpty();\n this.termAtt.append(str);\n this.offsetAtt.setOffset(start, end);\n }",
"public void oldPartita(String partita) {\n\r\n }",
"public void insert(String word) {\n char[] chars = word.toCharArray();\n int length = chars.length;\n\n Map<Character,Node> map = this.root.map;\n for(int i = 0;i < length;i++){\n if(map.containsKey(chars[i])){\n Node node = map.get(chars[i]);\n }else{\n map.put(chars[i],new Node(chars[i]));\n }\n\n if(i == length - 1){\n map.get(chars[i]).isWordEnd = true;\n }\n map = map.get(chars[i]).map;\n }\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }"
] | [
"0.6765159",
"0.6682299",
"0.64529353",
"0.6426337",
"0.64239025",
"0.6266561",
"0.62535524",
"0.62475705",
"0.61312324",
"0.61267537",
"0.610506",
"0.59991586",
"0.5973234",
"0.5943664",
"0.59115213",
"0.58577085",
"0.5842501",
"0.57357544",
"0.57216895",
"0.57002085",
"0.5693534",
"0.56912",
"0.5561086",
"0.5560061",
"0.5544898",
"0.5490431",
"0.54471767",
"0.5441171",
"0.5430536",
"0.54277503",
"0.54145783",
"0.54078007",
"0.5397358",
"0.5329749",
"0.5324853",
"0.53153473",
"0.5311748",
"0.5292361",
"0.52873415",
"0.52815074",
"0.5267836",
"0.52540886",
"0.5237908",
"0.5222093",
"0.52102876",
"0.5203882",
"0.5202535",
"0.51811",
"0.5173821",
"0.51678455",
"0.516295",
"0.5160355",
"0.51594627",
"0.51568997",
"0.513107",
"0.51292276",
"0.5122648",
"0.51037097",
"0.50912565",
"0.5056282",
"0.5050167",
"0.5048261",
"0.5047727",
"0.5040458",
"0.50345623",
"0.50271493",
"0.50249213",
"0.5023246",
"0.5020152",
"0.50046724",
"0.5003008",
"0.4999257",
"0.49977264",
"0.49974272",
"0.4994201",
"0.49913687",
"0.49885145",
"0.49827722",
"0.49770147",
"0.49760726",
"0.4970122",
"0.49677294",
"0.49631533",
"0.49571997",
"0.49501583",
"0.49462357",
"0.4946042",
"0.49435738",
"0.49427065",
"0.4938465",
"0.49371573",
"0.4933901",
"0.49303007",
"0.49274442",
"0.49272278",
"0.49269232",
"0.49250162",
"0.49232262",
"0.4923153",
"0.4918876"
] | 0.73009306 | 0 |
rend le int maximum | public int getMax(){
return tab[rangMax()];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getRight(double max);",
"int getMax( int max );",
"int getMaximum();",
"int getMaxInt();",
"int getMax();",
"public abstract int getMaximumValue();",
"public int getMaxIntValue();",
"double getMax();",
"double getMax();",
"private long getAbsMax() {\n return Math.max(Math.abs(Visualizer.getLowerBound().get()),\n Visualizer.getUpperBound().get());\n }",
"int max();",
"protected final int getMax() {\n\treturn(this.max);\n }",
"E maxVal();",
"public int getMaxAdvance() {\n return -1;\n }",
"public int getMax()\n {\n return 0;\n }",
"public int getMaximumInteger() {\n/* 244 */ return (int)this.max;\n/* */ }",
"public int getMaxFloor();",
"private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}",
"public double getRight(double max) {\n return this.size + max;\n }",
"Integer getMaximumResults();",
"org.apache.xmlbeans.XmlDecimal xgetMaximum();",
"String getMax_res();",
"public double getRight(double max) {\n return Math.max(max, Math.max(Math.max(this.left.getRight(max), this.right.getRight(max)),\n Math.max(this.right.getRight(max), this.right.getRight(max))));\n }",
"public int rob(int[] nums) {\r\n if (nums.length == 1) return nums[0];\r\n return Math.max(rob(nums, 0, nums.length - 2), rob(nums, 1, nums.length - 1));\r\n}",
"public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }",
"public double maxDifference()\n {\n double maxD = 0.0;\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD > maxD)\n {\n maxD = testD;\n }\n }\n \n return maxD;\n }",
"public int getMax() {\n\t\treturn getMax(0.0f);\n\t}",
"Double getMaximumValue();",
"public int getMaximum() {\r\n return max;\r\n }",
"int maxNoteValue();",
"public int getMax()\n\t{\n\t\treturn max;\n\t}",
"public long maxValue() {\n return 0;\n }",
"public int getResult() {\n return this.max;\n }",
"public int getMax() {\n return max;\n }",
"public int getMax() {\n return max;\n }",
"public int getMax() {\n return max;\n }",
"public int findMaxValue(Node root) {\n if(root == null) {\n return Integer.MIN_VALUE;\n }\n int output = (int)root.getData();\n int leftOutput = findMaxValue(root.getLeftChildNode());\n int rightOutput = findMaxValue(root.getRightChildNode());\n if(leftOutput > output){\n output = leftOutput;\n }\n if(rightOutput > output) {\n output = rightOutput;\n }\n return output;\n\n }",
"private static int max(int lhs, int rhs) {\r\n return lhs > rhs ? lhs : rhs;\r\n }",
"public int rob1(int[] nums) {\n int n = nums.length;\n if(n == 0) return 0;\n if(n == 1) return nums[0];\n int max = nums[0];\n for(int i = 1; i < n; i++){\n int local = Math.max(nums[i - 1], nums[i] + (i > 1 ? nums[i - 2] : 0));\n nums[i] = local;\n max = Math.max(local, max);\n }\n return max;\n }",
"public int getMax() {\n\t\treturn max;\n\t}",
"public int getMax() {\n\t\treturn max;\n\t}",
"@In Integer max();",
"@In Integer max();",
"int max(int a, int b);",
"private int max(int lhs, int rhs){\n if(lhs > rhs){\n return lhs;\n } else {\n return rhs;\n }\n }",
"@Test\n\tpublic void testNegMaxNegMinNegMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -min, -max) );\n\t}",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}",
"public long getMaxRIT() {\n return localMaxRIT;\n }",
"org.apache.xmlbeans.XmlDecimal xgetWBMaximum();",
"public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }",
"public int rob(int[] nums) {\n if (nums.length == 1) {\n return nums[0];\n }\n int len = nums.length;\n return Math.max(helper(nums, 0, len - 2), helper(nums, 1, len - 1));\n}",
"public int getMaxValue() {\n return maxValue;\n }",
"public Factura getMaxNumeroFactura();",
"public int getMaxRange() {\n\t\treturn max_range;\n\t}",
"@Test\n\tpublic void testNegMaxNegMaxNegMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-max, -max, -min) );\n\t}",
"public int max() {\n\t\treturn 0;\n\t}",
"public int GetMaxVal();",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"public int getMaximumPoints();",
"public int getMaxValue(){\n\t\treturn maxValue;\n\t}",
"private static int maxDifference(int[] arr) {\n\t\tint maxDiff = arr[1] - arr[0];\n\t\tint minElement = arr[0];\n\t\t\n\t\tfor(int i = 1 ; i < arr.length; i++)\n\t\t{\n\t\t\tif(arr[i] - minElement > maxDiff)\n\t\t\t{\n\t\t\t\tmaxDiff = arr[i] - minElement;\n\t\t\t}\n\t\t\tif(arr[i] < minElement)\n\t\t\t{\n\t\t\t\tminElement = arr[i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn maxDiff;\n\t}",
"public int getMaximum() {\n return this.iMaximum;\n }",
"public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }",
"@Test\n\tpublic void testNegMinNegMaxNegMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( -min, MaxDiTre.max(-min, -max, -min) );\n\t}",
"public static int rob(int[] nums) {\n /*int n=nums.length;\n int[] dp = new int[n];\n if(nums.length==1)\n return nums[0];\n dp[0]=nums[0];\n dp[1]=Math.max(nums[0],nums[1]);\n for(int i=2;i<n;i++)\n dp[i]=Math.max(dp[i-1],dp[i-2]+nums[i]);\n System.out.println(Arrays.toString(dp));\n return dp[n-1];*/\n int n= nums.length;\n int[] dp = new int[n+1];\n dp[0]=0;\n dp[1]=nums[0];\n for(int i=2;i<=n;i++){\n dp[i]=Math.max(dp[i-2]+nums[i-1],dp[i-1]);\n }\n\n return dp[n];\n }",
"public int getChromNum()\r\n {\r\n return max;\r\n }",
"private int max(int profondeur)\n\t{\n\t\tif(profondeur == 0 || grille.fin())\n\t\t{\n\t\t\treturn eval();\n\t\t}\n\t\tint max_val = -1000;\n\t\tfor(int y = 0; y < grille.getTaille(); y++)\n\t\t{\n\t\t\tfor(int x = 0; x < grille.getTaille(); x++)\n\t\t\t{\n\t\t\t\tCoordonnee test = new Coordonnee(x, y);\n\t\t\t\tif(grille.getCase(test).getContenu() == grille.getCaseVide())\n\t\t\t\t{\n\t\t\t\t\tgrille.jouer(test, getPion());\n\t\t\t\t\tint val = min(profondeur-1);\n\t\t\t\t\t//System.out.println(x + \" \" + y + \" : \" + val);\n\t\t\t\t\t//grille.afficher();\n\t\t\t\t\tif(val > max_val)\n\t\t\t\t\t{\n\t\t\t\t\t\tmax_val = val;\n\t\t\t\t\t}\n\t\t\t\t\tannuler(test);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max_val;\n\t}",
"public int getMaxNum(int[] arr) {\n int left = 0, right = arr.length - 1, mid;\n while (left < right) {\n mid = left + (right - left) / 2;\n if (arr[mid] > arr[mid + 1]) right = mid; // in the right half\n else if (arr[mid] < arr[mid + 1]) left = mid + 1; // in the left half\n }\n return arr[left]; // left == right\n }",
"protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }",
"public double getRight(double max) {\n return Math.max(max, max - (this.length * Math.cos(Math.toRadians(this.theta)))); \n }",
"public int upperBound() {\n\t\tif(step > 0)\n\t\t\treturn last;\n\t\telse\n\t\t\treturn first;\n\t}",
"public double getMaxVal() {\n return maxVal;\n }",
"public static int max(int a, int b) {\n return a - ((a - b) & ((a - b) >> 31));\n }",
"public int findMax(int[] arr) {\n return 0;\n }",
"private int getMax(TreeNode root) {\n\t\twhile(root.right!=null)\n\t\t\troot=root.right;\n\t\treturn root.val;\n\t}",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"public int getSumaMax() {\r\n\t\treturn sumaMax;\r\n\t}",
"@Test\n\tpublic void testMaxMaxMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(max, max, max) );\n\t}",
"public double getMaximum() {\n return (max);\n }",
"java.math.BigDecimal getWBMaximum();",
"public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}",
"int getMaxScale();",
"public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}",
"public int rob(int[] nums) {\n\t\tif(nums == null || nums.length == 0){\n\t\t\treturn 0;\n\t\t}\n\t\tif(nums.length == 1){\n\t\t\treturn nums[0];\n\t\t}\n\t\treturn Math.max(helper(nums, 0, nums.length - 2),\n\t\t\thelper(nums, 1, nums.length - 1));\n\t}",
"private int findMaxValue( XTreeNode<E> rootNode ) {\n\t\tif( rootNode == null ) {\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}\n\n\t\tint rootValue = (Integer) rootNode.getData();\n\t\tint maxValue = rootValue;\n\n\t\tint leftValue = findMaxValue( rootNode.getLeftChild() );\n\t\tint rightValue = findMaxValue( rootNode.getRightChild() );\n\n\t\t// not using if else if, as need to compare three values - root, left, right\n\t\tif( leftValue > rootValue ) {\n\t\t\tmaxValue = leftValue;\n\t\t}\n\t\tif( rightValue > maxValue ) {\n\t\t\tmaxValue = rightValue;\n\t\t}\n\t\treturn maxValue;\n\t}",
"Expression getMax();",
"float xMax();",
"public int rob(TreeNode root) {\n if(root == null)\n return 0;\n \n int[] result = helper(root);\n return Math.max(result[0], result[1]);\n}",
"public static void main(String[] args) {\n\t\tint arr[] = {2,4,11,5,8,1,9};\r\n\t\tint res = arr[1] - arr[0];\r\n\t\tfor(int i = 0; i < arr.length; i++) {\r\n\t\t\tfor(int j = i + 1; j < arr.length; j++) {\r\n\t\t\t\tres = Math.max(res, arr[j] - arr[i]);\r\n\t\t\t}\r\n\t\t}\r\n//\t\tSystem.out.println(first + \" : \" + last + \" : \" + max);\r\n\t\tSystem.out.println(res);\r\n\t}",
"double getMax() {\n\t\t\treturn value_max;\n\t\t}",
"public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }",
"public int getYMax(){\n\t\tDouble max = Collections.max(byteIncrements);\n\t\tyMax = max.intValue();\n\t\treturn yMax;\n\t}",
"static int max(int ropeLen) {\n\t\tint[] dp = new int[ropeLen + 1];\n\t\tdp[0] = 1;\n\t\tfor (int i = 1; i <= ropeLen; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tmax = Math.max(max, dp[j] * (i - j));\n\t\t\t}\n\t\t\tdp[i] = max;\n\t\t}\n\t\treturn dp[ropeLen];\n\t}",
"public static void main(String[] args) {\n int min=100;\n int max=999;\n int random = (int) (min + Math.random() * (max - min));\n int a=random%10;\n int a1=(random/10)%10;\n int a2=(random/100)%10;\n System.out.println(\"Число = \" +random +\" наибольшее число = \" +Math.max(a, Math.max(a1,a2)));\n}",
"private int controll(int max){\n int nr = 0;\n boolean numberOK = true;\n \n do{\n \tSystem.out.println(\"välj alternativ 0-\" + max + \" för att fortsätta, tack:\");\n \tString in = scanna.nextLine();\n \t\n \ttry{\n \t\tnr = Integer.parseInt(in);\n \t\tnumberOK = true;\n \t\tif(0<=nr && nr<=max){\n \t\t\treturn nr;\n \t\t}else{\n \t\t\tSystem.out.println(in + \" är inget alternativ, ju!\");\n \t\t\tnumberOK = false;\n \t\t}\n \t\t}catch (NumberFormatException e){\n \t\tSystem.out.println(in + \" är i nget alternativ, ju!\");\n \t\tnumberOK = false; \n \t}\n }while(!numberOK);\n\n return nr;\n }",
"public int getMaximumNumber() {\n\t\treturn 99999;\n\t}",
"int max(int a, int b) \n { \n return (a > b) ? a : b; \n }"
] | [
"0.6990071",
"0.6945375",
"0.6851092",
"0.6837595",
"0.6803061",
"0.6607219",
"0.6510389",
"0.6504634",
"0.6504634",
"0.6481736",
"0.64492214",
"0.6421779",
"0.6311708",
"0.62616354",
"0.6223969",
"0.62073976",
"0.619563",
"0.61874455",
"0.6160926",
"0.61581963",
"0.61464125",
"0.6145654",
"0.61444634",
"0.6126418",
"0.6108707",
"0.6106643",
"0.610592",
"0.6077072",
"0.6074427",
"0.60707575",
"0.6070126",
"0.6064946",
"0.60594726",
"0.6056595",
"0.6056595",
"0.6056595",
"0.6054475",
"0.60458016",
"0.6028646",
"0.60140115",
"0.60140115",
"0.60137486",
"0.60137486",
"0.5995664",
"0.59895897",
"0.5985386",
"0.59826946",
"0.59794563",
"0.5976823",
"0.5972893",
"0.5957513",
"0.59551686",
"0.5944433",
"0.59363407",
"0.5930377",
"0.5924954",
"0.5924595",
"0.59197605",
"0.5916593",
"0.59107596",
"0.5910505",
"0.59096205",
"0.59076995",
"0.5904427",
"0.59035695",
"0.58986056",
"0.58935237",
"0.5883282",
"0.5874591",
"0.58715475",
"0.58655965",
"0.5849189",
"0.5843551",
"0.5838486",
"0.5836109",
"0.5834508",
"0.58238935",
"0.58226776",
"0.5811912",
"0.5808331",
"0.58082986",
"0.5808019",
"0.58063954",
"0.5803772",
"0.57973635",
"0.57910985",
"0.5786909",
"0.57846355",
"0.5784017",
"0.57812226",
"0.5778094",
"0.5773778",
"0.57716197",
"0.5770322",
"0.5767845",
"0.57652587",
"0.57634926",
"0.5756368",
"0.57542944",
"0.57536626"
] | 0.6242031 | 14 |
check code whether exist authority table , not exist create sql | public void checkCode(Set<String> codeOnlyOne, Writer w, String e) {
boolean exist = codeOnlyOne.contains(e);
if (!exist) {
try {
w.write(String.format("insert into authority (code) values ('%s' );", e));
w.write("\r\n");
} catch (IOException e1) {
e1.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createRolePermissionsTableIfNotExist() {\n Connection conn = null;\n PreparedStatement ps = null;\n String query = null;\n try {\n conn = getConnection();\n conn.setAutoCommit(false);\n query = queryManager.getQuery(conn, QueryManager.CREATE_ROLE_PERMISSIONS_TABLE_QUERY);\n ps = conn.prepareStatement(query);\n ps.executeUpdate();\n conn.commit();\n } catch (SQLException e) {\n log.debug(\"Failed to execute SQL query {}\", query);\n throw new PermissionException(\"Unable to create the '\" + QueryManager.ROLE_PERMISSIONS_TABLE +\n \"' table.\", e);\n } finally {\n closeConnection(conn, ps, null);\n }\n }",
"abstract boolean tableExist() throws SQLException;",
"private boolean checkTableExists(String plate){\n //there is no need to close or start connection\n //function is only used in the context of an already created connection\n \n try {\n rs = stmt.executeQuery(\"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PUBLIC'\");\n \n while(rs.next()){\n if(plate.equalsIgnoreCase(rs.getString(\"TABLE_NAME\"))){\n return true;\n }\n }\n \n rs.close();\n \n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return false;\n }",
"void create(Authority authority) throws ExTrackDAOException;",
"private void CreatTable() {\n String sql = \"CREATE TABLE IF NOT EXISTS \" + TABLE_NAME\n + \" (name varchar(30) primary key,password varchar(30));\";\n try{\n db.execSQL(sql);\n }catch(SQLException ex){}\n }",
"public void checkAuthority() {\n }",
"boolean createTable();",
"private boolean distBeltExists(){ \n String table = \"DISTBELT\";\n \n try {\n stmt = conn.createStatement();\n rs = stmt.executeQuery(\"SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'PUBLIC'\");\n \n while(rs.next()){\n if(table.equalsIgnoreCase(rs.getString(\"TABLE_NAME\"))){\n return true;\n }\n }\n \n stmt.close();\n rs.close();\n \n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return false; \n }",
"private boolean tableAlreadyExists(SQLException e) {\r\n boolean exists;\r\n if(e.getSQLState().equals(\"X0Y32\")) {\r\n exists = true;\r\n } else {\r\n exists = false;\r\n }\r\n return exists;\r\n }",
"public static boolean checkOrCreateTable(jsqlite.Database db, String tableName){\n\t\t\n\t\tif (db != null){\n\t\t\t\n\t String query = \"SELECT name FROM sqlite_master WHERE type='table' AND name='\"+tableName+\"'\";\n\n\t boolean found = false;\n\t try {\n\t Stmt stmt = db.prepare(query);\n\t if( stmt.step() ) {\n\t String nomeStr = stmt.column_string(0);\n\t found = true;\n\t Log.v(\"SPATIALITE_UTILS\", \"Found table: \"+nomeStr);\n\t }\n\t stmt.close();\n\t } catch (Exception e) {\n\t Log.e(\"SPATIALITE_UTILS\", Log.getStackTraceString(e));\n\t return false;\n\t }\n\n\t\t\tif(found){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t// Table not found creating\n Log.v(\"SPATIALITE_UTILS\", \"Table \"+tableName+\" not found, creating..\");\n\t\t\t\t\n if(tableName.equalsIgnoreCase(\"punti_accumulo_data\")){\n\n \tString create_stmt = \"CREATE TABLE 'punti_accumulo_data' (\" +\n \t\t\t\"'PK_UID' INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n \t\t\t\"'ORIGIN_ID' TEXT, \" +\n \t\t\t\"'DATA_SCHEDA' TEXT, \" +\n \t\t\t\"'DATA_AGG' TEXT, \" +\n \t\t\t\"'NOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'COGNOME_RILEVATORE' TEXT, \" +\n \t\t\t\"'ENTE_RILEVATORE' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'PROVENIENZA_SEGNALAZIONE' TEXT, \" +\n \t\t\t\"'CODICE_DISCARICA' TEXT, \" +\n \t\t\t\"'TIPOLOGIA_RIFIUTO' TEXT, \" +\n \t\t\t\"'COMUNE' TEXT, \" +\n \t\t\t\"'LOCALITA' TEXT, \" +\n \t\t\t\"'INDIRIZZO' TEXT, \" +\n \t\t\t\"'CIVICO' TEXT, \" +\n \t\t\t\"'PRESA_IN_CARICO' TEXT, \" +\n \t\t\t\"'EMAIL' TEXT, \" +\n \t\t\t\"'RIMOZIONE' TEXT, \" +\n \t\t\t\"'SEQUESTRO' TEXT, \" +\n \t\t\t\"'RESPONSABILE_ABBANDONO' TEXT, \" +\n \t\t\t\"'QUANTITA_PRESUNTA' NUMERIC);\";\n\n \tString add_geom_stmt = \"SELECT AddGeometryColumn('punti_accumulo_data', 'GEOMETRY', 4326, 'POINT', 'XY');\";\n \tString create_idx_stmt = \"SELECT CreateSpatialIndex('punti_accumulo_data', 'GEOMETRY');\";\n \n \t// TODO: check if all statements are complete\n \t\n \ttry { \t\n \t\tStmt stmt01 = db.prepare(create_stmt);\n\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t\t//TODO This will never happen, CREATE statements return empty results\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Table Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// TODO: Check if created, fail otherwise\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(add_geom_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Geometry Column Added \"+stmt01.column_string(0));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01 = db.prepare(create_idx_stmt);\n\t\t\t\t\t\tif (stmt01.step()) {\n\t\t\t\t\t\t Log.v(\"UTILS\", \"Index Created\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tstmt01.close();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (jsqlite.Exception e) {\n\t\t\t\t\t\tLog.e(\"UTILS\", Log.getStackTraceString(e));\n\t\t\t\t\t}\n \treturn true;\n }\n\t\t\t}\n\t\t}else{\n\t\t\tLog.w(\"UTILS\", \"No valid database received, aborting..\");\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private boolean init() {\n\t\tString sql = \"SELECT v FROM user WHERE k='version'\";\t// TODO right now we are care only about is table exists of not\n //init_required = true;\n\t\tif (!this.r(sql)) {\n\t\t\tsql= \"CREATE TABLE user ( k CHAR(50), v TEXT );\";\n\t\t\tthis.r(sql);\n\t\t\tsql= \"CREATE UNIQUE INDEX kindex on user (k);\";\n\t\t\tthis.r(sql);\n\t\t\tsql= \"INSERT INTO user (k,v) VALUES ('version','1'), ('login',''), ('password',''), ('remember','1');\";\n\t\t\treturn this.r(sql);\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean initializeRolesTable() {\n try {\n UserHelper.insertRole(\"STUDENT\");\n UserHelper.insertRole(\"PROFESSOR\");\n return true;\n } catch (RoleAlreadyExistsException e) {\n return false;\n }\n }",
"OrTable createOrTable();",
"public void createTableRoles() {\n try (Statement statement = connection.createStatement()) {\n statement.executeUpdate(\"CREATE TABLE roles ( \" +\n \"id INT NOT NULL PRIMARY KEY,\"\n + \"roleName VARCHAR(256) NOT NULL)\");\n statement.executeUpdate(\"DROP TABLE IF EXISTS role \");\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n }\n }",
"private void checkUserAuthorities() {\n\t\tAuthority auth = authorityRepository.findTop1ByName(AuthorityType.ROLE_ADMIN);\n\t\tif (null == auth) {\n\t\t\tauth = Authority.createAdmin();\n\t\t\tauthorityRepository.save(auth);\n\t\t}\n\t\tAuthority authUser = authorityRepository.findTop1ByName(AuthorityType.ROLE_USER);\n\t\tif (null == authUser) {\n\t\t\tauthUser = Authority.createUser();\n\t\t\tauthorityRepository.save(authUser);\n\t\t}\n\t}",
"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 ifTable(String table) {\n\t\treturn \"select 1 from user_tables where table_name ='\"+table+\"'\";\n\t}",
"public void testExistsSyn() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName \" + \"FROM AD_Table t \" + \"WHERE EXISTS (SELECT * FROM AD_Column c WHERE t.AD_Table_ID=c.AD_Table_ID)\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column=c|AD_Table=t|1]\", fixture.toString());\n }",
"private boolean studentTableExists() throws SQLException{\n\n String checkTablePresentQuery = \"SHOW TABLES LIKE '\" + STUDENT_TABLE_NAME + \"'\"; //Can query the database schema\n ResultSet tablesRS = ConnectDB.statement.executeQuery(checkTablePresentQuery);\n return (tablesRS.next());\n }",
"DataCfgTableInfo createTableIfNotExists(String dataCfgOid);",
"@Test\n public void testCaja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[4];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, \"org.databene.commons.condition.CompositeCondition\", true, stringArray0);\n // Undeclared exception!\n try { \n DBUtil.containsMandatoryColumn(dBUniqueConstraint0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Column 'null' not found in table 'null'\n //\n verifyException(\"org.databene.jdbacl.model.DefaultDBTable\", e);\n }\n }",
"String getObjectCheckSql(String name);",
"public static void checkTableForReg(Connection con, String tableName, String createTableQuery)\n throws SQLException\n {\n \tSystem.out.println(\"Checking for table \"+tableName);\n if(con.isValid(0))\n {\n Statement stmt = con.createStatement();\n DatabaseMetaData md = con.getMetaData();\n ResultSet rs = md.getTables(null, null, \"%\", null);\n if( !rs.next() )\n {\n \tSystem.out.println(\"Creating Table --> +\"+tableName);\n stmt.executeUpdate(createTableQuery);\n }\n else\n {\n do\n {\n if( tableName.equals(rs.getString(3)) )\n {\n \tSystem.out.println(\"Table \"+tableName+\" already present\");\n stmt.close();\n return;\n }\n }while (rs.next());\n System.out.println(\"Creating Table --> +\"+tableName);\n stmt.executeUpdate(createTableQuery);\n }\n stmt.close();\n System.out.println(\"Checking \"+tableName+\" done!!\");\n }\n }",
"protected synchronized boolean createTable(Database db){\n\t\ttry {\n\t\t\treturn db.executeUpdate (\n\t\t\t\t\"CREATE TABLE \"+db.getDbSchema()+\".\" + DataTablePostalCode.Id + \" ( \" +\n\t\t\t\t\tfieldChar(\"postalId\", \"12\", \"0\", \"Key postalId\") +\n\t\t\t\t\tfieldChar(\"countryId\", \"12\", \"1\", \"CountryId\") +\n\t\t\t\t\tfieldChar(\"stateId\", \"12\", \"2\", \"StateId\") + \n\t\t\t\t\tfieldChar(\"cityId\", \"12\", \"3\", \"CityId\") +\n\t\t\t\t\tfieldChar(\"postalCode\", \"128\", \"4\", \"CountryId\") +\n\t\t\t\t\ttableAdditions(\"5\") + \n\t\t\t\t\t\"PRIMARY KEY (postalId)\" +\n\t\t\t\t\t\")\" + tableDriver(\"TABLE of Internal Postal Codes \"));\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogger.log(DataTablePostalCode.class, e);\n\n\t\t} /* catch */\n\t\t\n\t\treturn false;\n\t}",
"private void fillRoleTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n PreparedStatement ps = connection.prepareStatement(INIT.FILL_ROLES.toString())) {\n ResultSet rs = statement.executeQuery(INIT.GET_ALL_ROLES.toString());\n if(!rs.next()) {\n connection.setAutoCommit(false);\n ps.setString(1, \"user\");\n ps.setString(2, \"No permissions\");\n ps.addBatch();\n ps.setString(1, \"moderator\");\n ps.setString(2, \"Some permissions\");\n ps.addBatch();\n ps.setString(1, \"admin\");\n ps.setString(2, \"All permissions\");\n ps.addBatch();\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"public static void existOrCreateTable(Class classz){\n String tname = classz.getSimpleName();\n NLog.i(\"sqlo table name:%s\", tname);\n if( tables.get(tname) == null )\n createTable(classz);\n }",
"protected boolean createTable() {\n\t\t// --- 1. Dichiarazione della variabile per il risultato ---\n\t\tboolean result = false;\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\t// n.d.\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tstmt.execute(getCreate());\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\t// n.d. Qui devo solo dire al chiamante che è andato tutto liscio\n\t\t\tresult = true;\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\t// n.d.\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tstmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().debug(\"failed to create publisher table\",e);\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}",
"public static boolean tableIsExist(String name) throws Exception {\n init();\n TableName tableName = TableName.valueOf(name);\n boolean flag = admin.tableExists(tableName);\n close();\n return flag;\n }",
"private static boolean checkTables(final SQLParser parser, final Map<String, TableData> catalog)\n\t{\n\t\tfinal Map<String, String> tables = parser.getFROM();\n\n\t\tfor(final String table : tables.values())\n\t\t{\n\t\t\tif(!catalog.containsKey(table))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Table \\\"\" + table + \"\\\" does not exist.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public void createAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\t// Prüfung, ob Tabelle bereits besteht\r\n\t\tResultSet resultSet = connection.getMetaData().getTables(\"%\", \"%\", \"%\", new String[] { \"TABLE\" });\r\n\t\tboolean shouldCreateTable = true;\r\n\t\twhile (resultSet.next() && shouldCreateTable) {\r\n\t\t\tif (resultSet.getString(\"TABLE_NAME\").equalsIgnoreCase(\"ACCOUNT\")) {\r\n\t\t\t\tshouldCreateTable = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresultSet.close();\r\n\r\n\t\tif (shouldCreateTable) {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tString sql = \"CREATE table account (id int not null primary key, owner varchar(\"\r\n\t\t\t\t\t+ DatabaseAdministration.ownerLength + \") not null, number varchar(4) not null)\";\r\n\t\t\t// Tabelle wird erstellt\r\n\t\t\tstatement.execute(sql);\r\n\t\t\tstatement.close();\r\n\t\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\t\tlogger.info(\"Tabelle \\\"Account\\\" wurde erstellt.\");\r\n\t\t\tbankAccountExists = false;\r\n\t\t\t// Das Bank-Konto wird angelegt\r\n\t\t\taddAccount(\"0000\", \"BANK\", BigDecimal.ZERO);\r\n\t\t\tbankAccountExists = true;\r\n\t\t}\r\n\t\tconnection.close();\r\n\t}",
"public void testExists() {\n\n String\tsql\t= \"SELECT AD_Table.AD_Table_ID, AD_Table.TableName \" + \"FROM AD_Table \" + \"WHERE EXISTS (SELECT * FROM AD_Column c WHERE AD_Table.AD_Table_ID=c.AD_Table_ID)\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Column=c|AD_Table|1]\", fixture.toString());\n }",
"private boolean basemapExists(String basemap) {\r\n ArrayList args = new ArrayList();\r\n args.add(basemap);\r\n int nbase = magicDataTpl.queryForObject(\r\n \"SELECT count(id) FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE name=? AND \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_usage\", \"owner_name\", args, \"read\"), \r\n Integer.class, \r\n args.toArray()\r\n );\r\n return(nbase > 0);\r\n }",
"private static boolean tableExists(Connection con, String table)\n {\n int numRows = 0;\n try\n {\n DatabaseMetaData dbmd = con.getMetaData();\n ResultSet rs = dbmd.getTables(null, null, table.toUpperCase(), null);\n while (rs.next())\n {\n ++numRows;\n }\n }\n catch (SQLException e)\n {\n String theError = e.getSQLState();\n System.out.println(\"Can't query DB metadata: \" + theError);\n System.exit(1);\n }\n return numRows > 0;\n }",
"public boolean onCreate() {\n ActiveAndroid.initialize(getConfiguration());\n sAuthority = getAuthority();\n\n final List<TableInfo> tableInfos = new ArrayList<TableInfo>(Cache.getTableInfos());\n final int size = tableInfos.size();\n for (int i = 0; i < size; i++) {\n final TableInfo tableInfo = tableInfos.get(i);\n final int tableKey = (i * 2) + 1;\n final int itemKey = (i * 2) + 2;\n\n // content://<authority>/<table>\n URI_MATCHER.addPath(sAuthority, tableKey);\n TYPE_CODES.put(tableKey, tableInfo.getType());\n\n // content://<authority>/<table>/<id>\n URI_MATCHER.addPath(sAuthority, itemKey);\n TYPE_CODES.put(itemKey, tableInfo.getType());\n }\n\n return true;\n }",
"public void initDb() {\n String createVac = \"create table if not exists vacancies(id serial primary key,\"\n + \"name varchar(1500) NOT NULL UNIQUE, url varchar (1500), description text, dateVac timestamp);\";\n try (Statement st = connection.createStatement()) {\n st.execute(createVac);\n } catch (SQLException e) {\n LOG.error(e.getMessage());\n }\n }",
"public void executeConstantAction(Activation activation) throws StandardException {\n \tSpliceLogUtils.trace(LOG, \"executeConstantAction with activation {%s}\",activation);\n LanguageConnectionContext lcc = activation.getLanguageConnectionContext();\n DataDictionary dd = lcc.getDataDictionary();\n TransactionController tc = lcc.getTransactionExecute();\n DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();\n if (roleName.equals(Authorizer.PUBLIC_AUTHORIZATION_ID)) {\n throw StandardException.newException(SQLState.AUTH_PUBLIC_ILLEGAL_AUTHORIZATION_ID);\n }\n\n // currentAuthId is currently always the database owner since\n // role definition is a database owner power. This may change\n // in the future since this SQL is more liberal.\n //\n final String currentAuthId = lcc.getCurrentUserId(activation);\n\n /*\n * We don't need to set the ddl mode here, because we don't need to do 2-phase commit\n * for create role statements\n */\n dd.startWriting(lcc,false);\n\n //\n // Check if this role already exists. If it does, throw.\n //\n RoleGrantDescriptor rdDef = dd.getRoleDefinitionDescriptor(roleName);\n\n if (rdDef != null) {\n throw StandardException.\n newException(SQLState.LANG_OBJECT_ALREADY_EXISTS,\n rdDef.getDescriptorType(), roleName);\n }\n\n // Check if the proposed role id exists as a user id in\n // a privilege grant or as a built-in user (\"best effort\"; we\n // can't guarantee against collision if users are externally\n // defined or added later).\n if (knownUser(roleName, currentAuthId, lcc, dd, tc)) {\n throw StandardException.\n newException(SQLState.LANG_OBJECT_ALREADY_EXISTS,\n \"User\", roleName);\n }\n\n rdDef = ddg.newRoleGrantDescriptor(\n dd.getUUIDFactory().createUUID(),\n roleName,\n currentAuthId,// grantee\n Authorizer.SYSTEM_AUTHORIZATION_ID,// grantor\n true, // with admin option\n true); // is definition\n\n dd.addDescriptor(rdDef,\n null, // parent\n DataDictionary.SYSROLES_CATALOG_NUM,\n false, // duplicatesAllowed\n tc);\n }",
"private void createTable() throws Exception{\n Statement stm = this.con.createStatement();\n\n String query = \"CREATE TABLE IF NOT EXISTS \" + tableName +\n \"(name VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL ,\" +\n \" city VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL ,\" +\n \" phone VARCHAR( 15 ) NOT NULL, \" +\n \"PRIMARY KEY (phone) )\";\n stm.execute(query);\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n NameSpec nameSpec0 = NameSpec.NEVER;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"NestedRawReadOnlyUserTransaction\");\n // Undeclared exception!\n try { \n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, (PrintWriter) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"@Override\n\tpublic boolean isdbConfigured(SystemAdmin sysadmin) {\n\n\t\treadPropertiesfileForDB(sysadmin);\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\tString sql = \"CREATE DATABASE \" + sysadmin.getDatabasename();\n\t\tint result = jdbcTemplate.update(sql);\n\t\tif (result > 0) {\n\t\t\t// read database properties file and set user given database\n\t\t\t// detailes\n\t\t\treadPropertiesfileForcrud(sysadmin);\n\t\t\t// set datasources to connect to database\n\t\t\tdatasource = getDataSource();\n\t\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t\t// read sql file to dump tables into databae\n\t\t\tString path = context.getRealPath(\"/\");\n\t\t\tString SQLPATH = path + Utility.SQL_PATH;\n\t\t\tString s = new String();\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\ttry {\n\t\t\t\t// read sql file from path\n\t\t\t\tFileReader fr = new FileReader(new File(SQLPATH));\n\n\t\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\t\tsb.append(s);\n\t\t\t\t}\n\t\t\t\tbr.close();\n\n\t\t\t\t// here is our splitter | We use \";\" as a delimiter for each\n\t\t\t\t// request\n\t\t\t\t// then we are sure to have well formed statements\n\t\t\t\tString[] inst = sb.toString().split(\";\");\n\t\t\t\tfor (int i = 0; i < inst.length; i++) {\n\t\t\t\t\t// we ensure that there is no spaces before or after the\n\t\t\t\t\t// request string\n\t\t\t\t\t// in order to not execute empty statements\n\t\t\t\t\tif (!inst[i].trim().equals(\"\")) {\n\t\t\t\t\t\tjdbcTemplate.update(inst[i]);\n\t\t\t\t\t\tlogger.info(\">>\" + inst[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(\"*** Error : \" + e.toString());\n\t\t\t\tlogger.error(\" *** \");\n\t\t\t\tlogger.error(\" *** Error : \");\n\t\t\t\tlogger.error(\"################################################\");\n\t\t\t\tlogger.error(sb.toString());\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}",
"public static void main(String args[]) throws IOException {\n\t\tboolean bool = HBaseUtil.getAdmin().tableExists(\n\t\t\t\tTableName.valueOf(HBaseUtil.TABLE_NAME));\n\t\tSystem.out.println(bool);\n\t}",
"@Test\n public void testCorte_de_caja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM corte_caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table corte_caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'corte_caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"public static void createDatabase() throws ArcException {\n\t\tcreateDatabase(userWithRestrictedRights);\t\t\n\t}",
"public boolean createAllTables (){\n try {\n this.execute(CREATE_PEOPLE);\n this.execute(CREATE_AUTHOR);\n this.execute(CREATE_EMPLOYEE);\n this.execute(CREATE_MEETING);\n this.execute(CREATE_COVERPRICE);\n this.execute(CREATE_PRICEPARAMETERS);\n this.execute(CREATE_ORDER);\n this.execute(CREATE_CORRECTIONS);\n this.execute(CREATE_BOOK);\n this.execute(CREATE_COVERLINK);\n return true;\n } catch (SQLException | IOException | ClassNotFoundException e) {\n log.error(e);\n return false;\n }\n }",
"private boolean isTableExists(SQLiteDatabase db, String tableName) {\n boolean ret = false;\n String query = new StringBuilder(\"SELECT name FROM sqlite_master WHERE type='table' AND name='\")\n .append(tableName)\n .append(\"';\")\n .toString();\n JSArray resQuery = this.selectSQL(db, query, new ArrayList<String>());\n if (resQuery.length() > 0) ret = true;\n return ret;\n }",
"private void createCatalogsTableIfNotExist() throws TranslationException\n {\n\tif(log.isDebugEnabled())\n\t log.debug(\"Checking/Creating catalogs table\");\n\n\tString sql = \"CREATE TABLE IF NOT EXISTS \" + PropertyLookup.getCatalogsTableName() + \" (\"\n\t\t + \"id int(10) unsigned NOT NULL AUTO_INCREMENT,\" + \"name varchar(255) NOT NULL,\"\n\t\t + \"release_date date NOT NULL,\" + \"version varchar(45) NOT NULL,\" + \"description text NOT NULL,\"\n\t\t + \"PRIMARY KEY (id),\" + \"KEY IDX_catalogs_name (name) USING HASH,\"\n\t\t + \"CONSTRAINT IDX_catalogs_name_release_date UNIQUE KEY (name,version,release_date)) \"\n\t\t + \"ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='Catalogs of entities.'\";\n\ttry\n\t{\n\t sqlConnector.closeConnection();\n\t sqlConnector.executeUpdate(sql);\n\t}\n\tcatch(SQLException e)\n\t{\n\t throw new TranslationException(\"Error accessing the catalogs table: \" + sql, e);\n\t}\n\tfinally\n\t{\n\t sqlConnector.closeConnection();\n\t}\n }",
"private boolean tableExists(String table) throws SQLException {\n if (HAVE_DB) {\n Connection con = DriverManager.getConnection(dbConnection, dbUser, dbPass);\n Statement stmt = con.createStatement();\n ResultSet rs;\n \n if (dbType.equals(\"mysql\")) {\n rs = stmt.executeQuery(\"SHOW TABLES\");\n }\n else {\n rs = stmt.executeQuery(\"select * from pg_tables\");\n }\n while(rs.next()) {\n String result = rs.getString(1);\n if (result.equals(table)) {\n return true;\n }\n }\n rs.close();\n stmt.close();\n con.close();\n return false;\n }\n else {\n return true;\n }\n }",
"private void createReferentialIntegrityConstraints() {\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_BOOK_FK) REFERENCES \" + IDaoBooks.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_AUTHOR_FK) REFERENCES \" + IDaoPersons.TABLE + \" (ID) ON UPDATE SET NULL\");\n\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_KIND_FK) REFERENCES \" + SimpleData.DataType.KIND.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LANGUAGE_FK) REFERENCES \" + SimpleData.DataType.LANGUAGE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LENDING_FK) REFERENCES \" + IDaoLendings.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_SAGA_FK) REFERENCES \" + SimpleData.DataType.SAGA.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_TYPE_FK) REFERENCES \" + SimpleData.DataType.TYPE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_EDITOR_FK) REFERENCES \" + IDaoEditors.TABLE + \" (ID) ON UPDATE SET NULL\");\n }",
"public boolean existe(Atendente atendente) throws Execption {\r\n\r\n String sql = \"SELECT * FROM tb_atendente WHERE nome = ? \"\r\n + \"AND senha = ?\";\r\n\r\n try {\r\n // conexao = new ConexaoDB ();\r\n Connection conn = ConexaoDB.obtemConexao();\r\n\r\n PreparedStatement pst = conn.prepareStatement(sql);\r\n\r\n pst.setString(1, atendente.getNome());\r\n pst.setString(2, atendente.getSenha());\r\n\r\n // executando o comando 'select'\r\n // e recebendo o retorno\r\n ResultSet resultado = pst.executeQuery();\r\n\r\n if (resultado.next()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return false;\r\n }\r\n\r\n }",
"private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}",
"@Given(\"^an owner exists within the database$\")\n\tpublic void an_owner_exists_within_the_database() throws Throwable {\n\t throw new PendingException();\n\t}",
"public boolean table_exists(String table_name);",
"private boolean tableExistsAndIsOK() throws SQLException {\n trace(\"tableExistsAndIsOK\");\n boolean result;\n Statement stmt = _connection.createStatement();\n try {\n stmt.setMaxRows(1);\n String command = \"SELECT \" + LONG_VALUE + \" FROM \" + _tableName;\n ResultSet rs = stmt.executeQuery(command);\n rs.close();\n result = true;\n } catch (SQLException e) {\n result = false;\n }\n stmt.close();\n return result;\n }",
"private boolean checkInputTableName(AccessInputMeta meta){\n if (meta.getTableName()==null || meta.getTableName().length()<1)\n {\n MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR );\n mb.setMessage(BaseMessages.getString(PKG, \"AccessInputDialog.TableMissing.DialogMessage\"));\n mb.setText(BaseMessages.getString(PKG, \"System.Dialog.Error.Title\"));\n mb.open(); \n\n return false;\n }\n else\n {\n \treturn true;\n }\n\t}",
"public boolean readByRutJPQLCreate(String rut) throws SecurityException{ \n String sql=\"Select a from Alumno a Where a.rut = :rut\";\n\n Query q=em.createQuery(sql);\n q.setParameter(\"rut\", rut); \n \n if (q.getResultList().size()>0) {\n return true;\n }\n else{\n return false;\n }\n }",
"boolean tableExists(ObjectPath tablePath) throws CatalogException;",
"public boolean checkMasterdataTables(){\n boolean cat = tableExists(\"select c from Category c\");\n boolean quest = tableExists(\"select t from Question t\");\n\n if (!cat){\n System.out.println(\"Tabelle 'Category' exisitiert nicht!\");\n }\n\n if (!quest){\n System.out.println(\"Tabelle 'Question' exisitiert nicht!\");\n }\n\n if (cat && quest){\n // all tables exist\n return true;\n\n } else {\n // one or more tables dont exist\n return false;\n }\n }",
"@Test(timeout = 4000)\n public void test059() throws Throwable {\n DBUtil.assertAllDbResourcesClosed(false);\n DBCatalog dBCatalog0 = new DBCatalog();\n // Undeclared exception!\n try { \n dBCatalog0.getTable(\"uJr'z\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Table 'uJr'z'\n //\n verifyException(\"org.databene.jdbacl.model.DBCatalog\", e);\n }\n }",
"private boolean tableExists(String tableName) {\n Connection conn = null;\n PreparedStatement stmt = null;\n String query = null;\n ResultSet rs = null;\n try {\n conn = getConnection();\n query = queryManager.getQuery(conn, QueryManager.TABLE_CHECK_QUERY);\n stmt = conn.prepareStatement(query.replace(QueryManager.TABLE_NAME_PLACEHOLDER, tableName));\n rs = stmt.executeQuery();\n return true;\n } catch (SQLException e) {\n log.debug(\"Table '{}' assumed to not exist since its existence check query {} resulted \"\n + \"in exception {}.\", tableName, query, e.getMessage());\n return false;\n } finally {\n closeConnection(conn, stmt, rs);\n }\n }",
"private void setupDb(){\n try {\n openConnection();\n s.executeUpdate(\"CREATE TABLE IF NOT EXISTS LIB (NAME text UNIQUE , TYPE text, LANGUAGE text, INTRUSIVE text, OPENSOURCE text)\");\n }catch (SQLException e) {\n System.err.println(e.getMessage());\n }finally {\n if (c != null){\n close(c);\n }\n }\n }",
"public static void createTable() {\n\n // Create statement\n Statement statement = null;\n try {\n statement = Database.getDatabase().getConnection().createStatement();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n // Attempt to create table\n try {\n statement.execute(\n \"CREATE TABLE \" + Constants.SANITATION_TABLE + \"(\" +\n \"requestID INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\" +\n \"nodeID VARCHAR(100) References \" + Constants.LOCATION_TABLE + \" (nodeID), \" +\n \"priority VARCHAR(10), \" +\n \"status VARCHAR(100), \" +\n \"description VARCHAR(100), \" +\n \"requesterID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"requestTime TIMESTAMP, \" +\n \"servicerID INT REFERENCES \" + Constants.USERS_TABLE + \"(userID), \" +\n \"claimedTime TIMESTAMP, \" +\n \"completedTime TIMESTAMP, \" +\n \"CONSTRAINT priority_enum CHECK (priority in ('LOW', 'MEDIUM', 'HIGH')), \" +\n \"CONSTRAINT status_enum CHECK (status in ('INCOMPLETE', 'COMPLETE')))\"\n );\n } catch (SQLException | NullPointerException e) {\n e.printStackTrace();\n }\n }",
"@Test(timeout = 4000)\n public void test45() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/home/ubuntu/evosuite_readability_gen/projects/13_jdbacl\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"z}yVJPxVp_\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n mockPrintWriter0.print(false);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"selectwp.pr\");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }",
"@Test\n public void testUsuarios() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM usuarios\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table usuarios exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'usuarios' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"boolean authorExists(UUID uuid) throws PersistenceException, IllegalArgumentException;",
"boolean isSQL();",
"public boolean createTable(String input) throws IOException{\n\t\tString orgQuery = input;\n\t\torgQuery = orgQuery.trim();\n\t\tString query = input.toLowerCase().trim();\n\t\tboolean queryFailed = false;\n\t\t//Schema Instance \n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\n\t\t//TableSchemaManager Instance\n\t\tTableSchemaManager currentTableSchemaManager = TableSchemaManager.getTableSchemaManagerInstance();\n\n\t\t//Extracting Table name\n\t\ttableName = orgQuery.substring(query.indexOf(\"table \")+6,query.indexOf(\"(\")).trim();\n\n\t\t//Updating SCHEMA.TABLE.TBL\n\t\tif(updateInformationSchemaTable()){\n\t\t\tqueryFailed = true;\n\t\t\treturn queryFailed;\n\t\t}\n\n\t\t//Extracting Table contents\n\t\tString tableContentsWithQuotes = orgQuery.substring(orgQuery.indexOf(\"(\")+1,orgQuery.length());\n\t\tString tableContents = tableContentsWithQuotes.replace(\"))\", \")\");\n\t\ttableContents = tableContents.trim();\n\n\t\tTableSchemaManager.ordinalMap = new TreeMap<Integer,List<String>>();\n\t\tTableSchemaManager.tableMap = new TreeMap<String,TreeMap<Integer,List<String>>>();\n\t\t\n\t\t//Creating n instances of Table helper\n\t\tString[] createTableContents = tableContents.split(\"\\\\,\"); \n\t\tnoOfColumns = createTableContents.length;\n\t\tCreateTableHelper[] th = new CreateTableHelper[noOfColumns];\n\n\t\t\n\t\t//Handles single row of Create Table \n\t\tfor(int item = 0; item < noOfColumns ; item++){\n\t\t\tth[item] = new CreateTableHelper(); \n\t\t\t//To remove any leading or trailing spaces\n\t\t\tcreateTableContents[item] = createTableContents[item].trim();\n\t\t\tString columnName = createTableContents[item].substring(0, createTableContents[item].indexOf(\" \"));\n\t\t\tth[item].setColumnName(columnName);\n\n\t\t\t//Setting Primary Key\n\t\t\tString primaryKeyExp = \"(.*)[pP][rR][iI][mM][aA][rR][yY](.*)\";\n\t\t\tif (createTableContents[item].matches(primaryKeyExp))\n\t\t\t\tth[item].setPrimaryKey(true);\n\t\t\telse\n\t\t\t\tth[item].setPrimaryKey(false);\n\n\t\t\t//Setting Null Value\t\n\t\t\tString notNullExp = \"(.*)[nN][uU][lL][lL](.*)\";\n\t\t\tif (createTableContents[item].matches(notNullExp))\n\t\t\t\tth[item].setNull(true);\n\t\t\telse\n\t\t\t\tth[item].setNull(false);\n\n\t\t\t//Extracting data types \n\t\t\t//BYTE\n\t\t\tString byteExp = \"(.*)[bB][yY][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(byteExp)){\n\t\t\t\tth[item].setDataType(\"BYTE\");\n\t\t\t}\n\t\t\t//SHORT\n\t\t\tString shortExp = \"(.*)[sS][hH][oO][rR][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(shortExp)){\n\t\t\t\tth[item].setDataType(\"SHORT\");\n\t\t\t}\n\t\t\t//INT\n\t\t\tString intExp = \"(.*)[iI][nN][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(intExp)){\n\t\t\t\tth[item].setDataType(\"INT\");\n\t\t\t}\n\t\t\t//LONG\n\t\t\tString longExp = \"(.*)[lL][oO][nN][gG](.*)\";\n\t\t\tif (createTableContents[item].matches(longExp)){\n\t\t\t\tth[item].setDataType(\"LONG\");\n\t\t\t}\n\t\t\t//CHAR\n\t\t\tString charExp = \"(.*)[cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(charExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"CHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//VARCHAR\n\t\t\tString varcharExp = \"(.*)[vV][aA][rR][cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(varcharExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"VARCHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//FLOAT\n\t\t\tString floatExp = \"(.*)[fF][lL][oO][aA][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(floatExp)){\n\t\t\t\tth[item].setDataType(\"FLOAT\");\t\t\t\t\n\t\t\t}\n\t\t\t//DOUBLE\n\t\t\tString doubleExp = \"(.*)[dD][oO][uU][bB][lL][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(doubleExp)){\n\t\t\t\tth[item].setDataType(\"DOUBLE\");\n\t\t\t}\n\t\t\t//DATETIME\n\t\t\tString dateTimeExp = \"(.*)[dD][aA][tT][eE][tT][iI][mM][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateTimeExp)){\n\t\t\t\tth[item].setDataType(\"DATETIME\");\n\t\t\t}\n\t\t\t//DATE\n\t\t\tString dateExp = \"(.*)[dD][aA][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateExp)){\n\t\t\t\tth[item].setDataType(\"DATE\");\n\t\t\t}\n\n\t\t\tcurrentTableSchemaManager.newTableSchema(\n\t\t\t\t\ttableName,\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\n\t\t\t//Updating SCHEMA.COLUMNS.TBL\n\t\t\tupdateInformationSchemaColumn(\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\t\t\t//Create tables to insert index\n\t\t\tString newTableIndexName = currentSchemaName + \".\" + tableName + \".\" +th[item].getColumnName()+ \".tbl.ndx\";\n\t\t\tRandomAccessFile newTableIndexFile = new RandomAccessFile(newTableIndexName, \"rw\");\n\t\t\tnewTableIndexFile.close();\n\n\t\t}\n\n\t\tTableSchemaManager.tableMap.put(tableName, TableSchemaManager.ordinalMap);\n\t\tcurrentTableSchemaManager.updateTableSchema(currentSchemaName,tableName);\n\t\t\n\t\t//Create tables to insert data \n\t\tString newTableDataName = currentSchemaName + \".\" + tableName + \".tbl\";\n\t\tRandomAccessFile newTableDataFile = new RandomAccessFile(newTableDataName, \"rw\");\n\t\tnewTableDataFile.close();\n\t\treturn queryFailed;\n\t}",
"boolean hasStatement();",
"int insert(RoleSystemauthority record);",
"@Test(timeout = 4000)\n public void test041() throws Throwable {\n // Undeclared exception!\n try { \n SQLUtil.isDDL((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"private void createLoginTable() {\r\n jdbcExecutor.executeQuery(new Work() {\r\n @Override\r\n public void execute(Connection connection) throws SQLException {\r\n connection.createStatement().executeUpdate(\"CREATE TABLE login ( id numeric(19,0), user_id numeric(19,0), timestamp TIMESTAMP )\");\r\n }\r\n });\r\n }",
"public static final String getAuthKWRelTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authkw_\" +shortname +\r\n\t\t\"(author varchar(70) NOT NULL, \" +\r\n\t\t\" keyword varchar(255) NOT NULL, \" + \r\n\t\t\" PRIMARY KEY (keyword,author)) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}",
"public boolean isAuthorityIndex() {\n return \"metadataAuthority\".equals(displayType);\n }",
"TableOrAlias createTableOrAlias();",
"Authorizor createAuthorizor();",
"@Test(enabled = false)\n public void testCreateExternalTable() throws Exception {\n String tableName = tableName();\n String colName = columnName();\n String pFile = createTestDFSPath(\"parentPath\");\n String query = String.format(\"create EXTERNAL table %s.%s(%s, %s) location '%s'\", DEFAULT_DB , tableName , colName + \" int\", \"name string\", pFile);\n\n runCommand(query);\n\n String tblId = assertTableIsRegistered(DEFAULT_DB, tableName, null, true);\n AtlasEntity tblEnity = atlasClientV2.getEntityByGuid(tblId).getEntity();\n List ddlList = (List) tblEnity.getRelationshipAttribute(ATTRIBUTE_DDL_QUERIES);\n\n assertNotNull(ddlList);\n assertEquals(ddlList.size(), 1);\n\n String processId = assertEntityIsRegistered(HiveDataTypes.HIVE_PROCESS.getName(), ATTRIBUTE_QUALIFIED_NAME, getTableProcessQualifiedName(DEFAULT_DB, tableName), null);\n\n AtlasEntity processsEntity = atlasClientV2.getEntityByGuid(processId).getEntity();\n\n assertEquals(processsEntity.getAttribute(\"userName\"), UserGroupInformation.getCurrentUser().getShortUserName());\n\n verifyTimestamps(processsEntity, \"startTime\");\n verifyTimestamps(processsEntity, \"endTime\");\n\n validateHDFSPaths(processsEntity, INPUTS, pFile);\n }",
"public boolean checkTable(int layerId)\n\n {\n boolean isAvailable = false;\n try {\n\n //This statement will fetch all tables available in database.\n\n ResultSet rs1 = conn.getMetaData().getTables(null, null, null, null);\n while (rs1.next()) {\n\n String ld = rs1.getString(\"TABLE_NAME\");\n\n //This statement will extract digits from table names.\n if(!(ld.equals(\"PurgeTable\")||ld.equals(\"UserToCertMap\"))){\n String intValue = ld.replaceAll(\"[^0-9]\", \"\");\n int v;\n if (intValue != null) {\n v = Integer.parseInt(intValue);\n if (v == layerId) {\n isAvailable = true;\n }\n }\n }\n /* String intValue = ld.replaceAll(\"[^0-9]\", \"\");\n int v;\n if (intValue != null) {\n v = Integer.parseInt(intValue);\n if (v == layerId) {\n isAvailable = true;\n }\n }\n //This statement will compare layerid with digits of table names.*/\n\n }\n rs1.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return isAvailable;\n }",
"@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tString middleQueryCode = \"\";\n\n\t\tIncidentKey[] keys = IncidentKey.values();\n\t\tfor (int i = 0; i < keys.length; i++) {\n\t\t\tmiddleQueryCode += keys[i].getColumnName() + \" \"\n\t\t\t\t\t+ keys[i].getType();\n\t\t\tif (i + 1 < keys.length)\n\t\t\t\tmiddleQueryCode += \", \";\n\t\t\telse\n\t\t\t\tmiddleQueryCode += \" )\";\n\t\t}\n\t\tfor (String tableName : INCIDENT_TABLES) {\n\t\t\tString queryCode = \"CREATE TABLE \" + tableName + \" ( \"\n\t\t\t\t\t+ middleQueryCode;\n\t\t\tLog.d(\"DB QUERY\", queryCode);\n\t\t\tdb.execSQL(queryCode);\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test039() throws Throwable {\n boolean boolean0 = SQLUtil.isDDL(\"alter materKalized viewjcsh%4%|@v9\");\n assertFalse(boolean0);\n }",
"@Test(timeout = 4000)\n public void test053() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter table\", false, \"Pg`v\", \"select\");\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBCheckConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }",
"int insertSelective(RoleSystemauthority record);",
"private void checkAdminInDB(DB db) {\n\t\tMap<Long, UtenteBase> users = db.getTreeMap(\"users\");\n\t\tlong hashCode = (long) \"admin\".hashCode();\n\t\tif(!users.containsKey(hashCode))\n\t\t\tusers.put(hashCode, new Admin(\"admin\", \"admin\"));\n\t}",
"public static void createAuthKey() {\n\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n\n String sql = \"CREATE TABLE IF NOT EXISTS authenticatedkeys (\\n\" + \" id integer PRIMARY KEY AUTOINCREMENT,\\n\"\n + \" id_user integer NOT NULL,\\n\"\n + \" ipaddr text NOT NULL,\\n\"\n + \" publickey text NOT NULL,\\n\"\n + \" FOREIGN KEY(id_user) REFERENCES users(id)\" + \");\";\n\n try (Connection conn = DriverManager.getConnection(url); Statement stmt = conn.createStatement()) {\n stmt.execute(sql);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"boolean hasDatabase();",
"private boolean isTableExist(String tableName){\n\t\tboolean isExist = false;\n\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = dbReadable.rawQuery(\"select count(*) from \"+ tableName, null);\n\t\t\tisExist = true;\n\t\t} catch (Exception e) {\n\t\t\tisExist = false;\n\t\t} finally {\n\t\t\tif(cursor != null)\n\t\t\t\tcursor.close();\n\t\t}\n\t\t\n\t\treturn isExist;\n\t}",
"@Test(timeout = 4000)\n public void test46() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader();\n Boolean boolean0 = Boolean.FALSE;\n SQLUtil.isQuery(\"selectntowrong c|ck\");\n Boolean.valueOf(true);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"selectntowrong c|ck\");\n // Undeclared exception!\n try { \n defaultDBTable0.getUniqueConstraint(\"^h=wZ>:9%}Pj6(#%M\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DefaultDBTable\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionCntext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"mX7CQGqPX\", true, stringArray0);\n // Undeclared exception!\n try { \n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.SQLUtil\", e);\n }\n }",
"private void createDataTable() {\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoEditors.TABLE + \" (ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(150) NOT NULL UNIQUE)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.TABLE + \" (ID INT IDENTITY PRIMARY KEY, TITLE VARCHAR(150) NOT NULL UNIQUE, YEAR INT, ISBN10 VARCHAR(20), ISBN13 VARCHAR(13), NOTE INT, PAGES_NUMBER INT, RESUME VARCHAR(2000), THE_EDITOR_FK INT, THE_KIND_FK INT, THE_LANGUAGE_FK INT, THE_LENDING_FK INT, THE_SAGA_FK INT, THE_TYPE_FK INT)\");\n jdbcTemplate.update(\"CREATE TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" (THE_BOOK_FK INT NOT NULL, THE_AUTHOR_FK INT NOT NULL)\");\n\n jdbcTemplate.update(\"CREATE INDEX BOOK_EDITOR_IDX ON \" + IDaoEditors.TABLE + \"(ID)\");\n jdbcTemplate.update(\"CREATE INDEX BOOKS_IDX ON \" + IDaoBooks.TABLE + \"(ID)\");\n }",
"@Test(timeout = 4000)\n public void test055() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"alter table\");\n assertFalse(boolean0);\n }",
"@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}",
"private void checkIfIsAValidClass(IDatabaseClass annotationClass){\n if (annotationClass == null || annotationClass.tableName() == \"\") {\n throw new CustomException(\"No table name found in your class declaration!\");\n }\n }",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"4-s<.5+Q6\");\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"alter materialized viewdelete\");\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter materialized viewdelete\", true, defaultDBTable0, \"alte\");\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n SQLUtil.renderCreateTable(defaultDBTable0, false, nameSpec0, mockPrintWriter0);\n assertEquals(\"table\", defaultDBTable0.getObjectType());\n }",
"@Override\n protected void execute2() {\n sql = \"CREATE TABLE origin (_id INTEGER PRIMARY KEY AUTOINCREMENT,origin_type_id INTEGER NOT NULL,origin_name TEXT NOT NULL,origin_url TEXT NOT NULL,ssl BOOLEAN NOT NULL DEFAULT 1,ssl_mode INTEGER NOT NULL DEFAULT 1,allow_html BOOLEAN NOT NULL DEFAULT 1,text_limit INTEGER NOT NULL,short_url_length INTEGER NOT NULL DEFAULT 0,mention_as_webfinger_id INTEGER NOT NULL DEFAULT 3,use_legacy_http INTEGER NOT NULL DEFAULT 3,in_combined_global_search BOOLEAN NOT NULL DEFAULT 1,in_combined_public_reload BOOLEAN NOT NULL DEFAULT 1)\";\n sql = \"CREATE TABLE note (_id INTEGER PRIMARY KEY AUTOINCREMENT,origin_id INTEGER NOT NULL,note_oid TEXT NOT NULL,note_status INTEGER NOT NULL DEFAULT 0,conversation_id INTEGER NOT NULL DEFAULT 0,conversation_oid TEXT,url TEXT,note_name TEXT,content TEXT,content_to_search TEXT,via TEXT,note_author_id INTEGER NOT NULL DEFAULT 0,in_reply_to_note_id INTEGER,in_reply_to_actor_id INTEGER,public INTEGER NOT NULL DEFAULT 0,favorited INTEGER NOT NULL DEFAULT 0,reblogged INTEGER NOT NULL DEFAULT 0,favorite_count INTEGER NOT NULL DEFAULT 0,reblog_count INTEGER NOT NULL DEFAULT 0,reply_count INTEGER NOT NULL DEFAULT 0,attachments_count INTEGER NOT NULL DEFAULT 0,note_ins_date INTEGER NOT NULL,note_updated_date INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE UNIQUE INDEX idx_note_origin ON note (origin_id, note_oid)\";\n sql = \"CREATE INDEX idx_note_in_reply_to_note_id ON note (in_reply_to_note_id)\";\n sql = \"CREATE INDEX idx_note_conversation_id ON note (conversation_id)\";\n sql = \"CREATE INDEX idx_conversation_oid ON note (origin_id, conversation_oid)\";\n sql = \"CREATE TABLE user (_id INTEGER PRIMARY KEY AUTOINCREMENT,user_known_as TEXT NOT NULL DEFAULT '',is_my_user INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE INDEX idx_my_user ON user (is_my_user)\";\n sql = \"CREATE TABLE actor (_id INTEGER PRIMARY KEY AUTOINCREMENT,user_id INTEGER NOT NULL,origin_id INTEGER NOT NULL,actor_oid TEXT NOT NULL,username TEXT NOT NULL,webfinger_id TEXT NOT NULL,real_name TEXT,actor_description TEXT,location TEXT,profile_url TEXT,homepage TEXT,avatar_url TEXT,banner_url TEXT,notes_count INTEGER NOT NULL DEFAULT 0,favorited_count INTEGER NOT NULL DEFAULT 0,following_count INTEGER NOT NULL DEFAULT 0,followers_count INTEGER NOT NULL DEFAULT 0,actor_created_date INTEGER NOT NULL DEFAULT 0,actor_updated_date INTEGER NOT NULL DEFAULT 0,actor_ins_date INTEGER NOT NULL,actor_activity_id INTEGER NOT NULL DEFAULT 0,actor_activity_date INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE UNIQUE INDEX idx_actor_origin ON actor (origin_id, actor_oid)\";\n sql = \"CREATE INDEX idx_actor_user ON actor (user_id)\";\n sql = \"CREATE INDEX idx_actor_webfinger ON actor (webfinger_id)\";\n sql = \"CREATE TABLE audience (actor_id INTEGER NOT NULL,note_id INTEGER NOT NULL, CONSTRAINT pk_audience PRIMARY KEY (note_id ASC, actor_id ASC))\";\n sql = \"CREATE INDEX idx_audience_actor ON audience (actor_id)\";\n sql = \"CREATE INDEX idx_audience_note ON audience (note_id)\";\n sql = \"CREATE TABLE friendship (actor_id INTEGER NOT NULL,friend_id INTEGER NOT NULL,followed BOOLEAN NOT NULL, CONSTRAINT pk_friendship PRIMARY KEY (actor_id, friend_id))\";\n sql = \"CREATE INDEX idx_followers ON friendship (friend_id, actor_id)\";\n sql = \"CREATE TABLE download (_id INTEGER PRIMARY KEY AUTOINCREMENT,download_type INTEGER NOT NULL,download_number INTEGER NOT NULL DEFAULT 0,actor_id INTEGER NOT NULL DEFAULT 0,note_id INTEGER NOT NULL DEFAULT 0,media_type TEXT NOT NULL,url TEXT NOT NULL,download_status INTEGER NOT NULL DEFAULT 0,width INTEGER NOT NULL DEFAULT 0,height INTEGER NOT NULL DEFAULT 0,duration INTEGER NOT NULL DEFAULT 0,file_name TEXT,file_size INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE INDEX idx_download_actor ON download (actor_id, download_status)\";\n sql = \"CREATE INDEX idx_download_note ON download (note_id, download_number)\";\n sql = \"CREATE TABLE timeline (_id INTEGER PRIMARY KEY AUTOINCREMENT,timeline_type TEXT NOT NULL,actor_id INTEGER NOT NULL DEFAULT 0,actor_in_timeline TEXT,origin_id INTEGER NOT NULL DEFAULT 0,search_query TEXT,is_synced_automatically BOOLEAN NOT NULL DEFAULT 0,displayed_in_selector INTEGER NOT NULL DEFAULT 0,selector_order INTEGER NOT NULL DEFAULT 0,sync_succeeded_date INTEGER NOT NULL DEFAULT 0,sync_failed_date INTEGER NOT NULL DEFAULT 0,error_message TEXT,synced_times_count INTEGER NOT NULL DEFAULT 0,sync_failed_times_count INTEGER NOT NULL DEFAULT 0,downloaded_items_count INTEGER NOT NULL DEFAULT 0,new_items_count INTEGER NOT NULL DEFAULT 0,count_since INTEGER NOT NULL DEFAULT 0,synced_times_count_total INTEGER NOT NULL DEFAULT 0,sync_failed_times_count_total INTEGER NOT NULL DEFAULT 0,downloaded_items_count_total INTEGER NOT NULL DEFAULT 0,new_items_count_total INTEGER NOT NULL DEFAULT 0,youngest_position TEXT,youngest_item_date INTEGER NOT NULL DEFAULT 0,youngest_synced_date INTEGER NOT NULL DEFAULT 0,oldest_position TEXT,oldest_item_date INTEGER NOT NULL DEFAULT 0,oldest_synced_date INTEGER NOT NULL DEFAULT 0,visible_item_id INTEGER NOT NULL DEFAULT 0,visible_y INTEGER NOT NULL DEFAULT 0,visible_oldest_date INTEGER NOT NULL DEFAULT 0,last_changed_date INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE TABLE activity (_id INTEGER PRIMARY KEY AUTOINCREMENT,activity_origin_id INTEGER NOT NULL,activity_oid TEXT NOT NULL,account_id INTEGER NOT NULL,activity_type INTEGER NOT NULL,actor_id INTEGER NOT NULL,activity_note_id INTEGER NOT NULL,activity_actor_id INTEGER NOT NULL,obj_activity_id INTEGER NOT NULL,subscribed INTEGER NOT NULL DEFAULT 0,interacted INTEGER NOT NULL DEFAULT 0,interaction_event INTEGER NOT NULL DEFAULT 0,notified INTEGER NOT NULL DEFAULT 0,notified_actor_id INTEGER NOT NULL DEFAULT 0,new_notification_event INTEGER NOT NULL DEFAULT 0,activity_ins_date INTEGER NOT NULL,activity_updated_date INTEGER NOT NULL DEFAULT 0)\";\n sql = \"CREATE UNIQUE INDEX idx_activity_origin ON activity (activity_origin_id, activity_oid)\";\n sql = \"CREATE INDEX idx_activity_message ON activity (activity_note_id)\";\n sql = \"CREATE INDEX idx_activity_actor ON activity (activity_actor_id)\";\n sql = \"CREATE INDEX idx_activity_activity ON activity (obj_activity_id)\";\n sql = \"CREATE INDEX idx_activity_timeline ON activity (activity_updated_date)\";\n sql = \"CREATE INDEX idx_activity_actor_timeline ON activity (actor_id, activity_updated_date)\";\n sql = \"CREATE INDEX idx_activity_subscribed_timeline ON activity (subscribed, activity_updated_date)\";\n sql = \"CREATE INDEX idx_activity_notified_timeline ON activity (notified, activity_updated_date)\";\n sql = \"CREATE INDEX idx_activity_notified_actor ON activity (notified, notified_actor_id)\";\n sql = \"CREATE INDEX idx_activity_new_notification ON activity (new_notification_event)\";\n sql = \"CREATE INDEX idx_activity_interacted_timeline ON activity (interacted, activity_updated_date)\";\n sql = \"CREATE INDEX idx_activity_interacted_actor ON activity (interacted, notified_actor_id)\";\n sql = \"CREATE TABLE command (_id INTEGER PRIMARY KEY NOT NULL,queue_type TEXT NOT NULL,command_code TEXT NOT NULL,command_created_date INTEGER NOT NULL,command_description TEXT,in_foreground BOOLEAN NOT NULL DEFAULT 0,manually_launched BOOLEAN NOT NULL DEFAULT 0,timeline_id INTEGER NOT NULL DEFAULT 0,timeline_type TEXT NOT NULL,account_id INTEGER NOT NULL DEFAULT 0,actor_id INTEGER NOT NULL DEFAULT 0,origin_id INTEGER NOT NULL DEFAULT 0,search_query TEXT,item_id INTEGER NOT NULL DEFAULT 0,username TEXT,last_executed_date INTEGER NOT NULL DEFAULT 0,execution_count INTEGER NOT NULL DEFAULT 0,retries_left INTEGER NOT NULL DEFAULT 0,num_auth_exceptions INTEGER NOT NULL DEFAULT 0,num_io_exceptions INTEGER NOT NULL DEFAULT 0,num_parse_exceptions INTEGER NOT NULL DEFAULT 0,error_message TEXT,downloaded_count INTEGER NOT NULL DEFAULT 0,progress_text TEXT)\";\n\n progressLogger.logProgress(stepTitle + \": Converting notes\");\n\n dropOldIndex(\"idx_note_origin\");\n dropOldIndex(\"idx_note_in_reply_to_note_id\");\n dropOldIndex(\"idx_note_conversation_id\");\n dropOldIndex(\"idx_conversation_oid\");\n\n sql = \"ALTER TABLE note RENAME TO oldnote\";\n DbUtils.execSQL(db, sql);\n\n sql = \"CREATE TABLE note (_id INTEGER PRIMARY KEY AUTOINCREMENT,origin_id INTEGER NOT NULL,note_oid TEXT NOT NULL,note_status INTEGER NOT NULL DEFAULT 0,conversation_id INTEGER NOT NULL DEFAULT 0,conversation_oid TEXT,url TEXT,note_name TEXT,content TEXT,content_to_search TEXT,via TEXT,note_author_id INTEGER NOT NULL DEFAULT 0,in_reply_to_note_id INTEGER,in_reply_to_actor_id INTEGER,public INTEGER NOT NULL DEFAULT 0,favorited INTEGER NOT NULL DEFAULT 0,reblogged INTEGER NOT NULL DEFAULT 0,favorite_count INTEGER NOT NULL DEFAULT 0,reblog_count INTEGER NOT NULL DEFAULT 0,reply_count INTEGER NOT NULL DEFAULT 0,attachments_count INTEGER NOT NULL DEFAULT 0,note_ins_date INTEGER NOT NULL,note_updated_date INTEGER NOT NULL DEFAULT 0)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE UNIQUE INDEX idx_note_origin ON note (origin_id, note_oid)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE INDEX idx_note_in_reply_to_note_id ON note (in_reply_to_note_id)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE INDEX idx_note_conversation_id ON note (conversation_id)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE INDEX idx_conversation_oid ON note (origin_id, conversation_oid)\";\n DbUtils.execSQL(db, sql);\n\n sql = \"INSERT INTO note (\" +\n \"_id,origin_id,note_oid,note_status,conversation_id,conversation_oid,url,note_name,content,content_to_search,via,note_author_id,in_reply_to_note_id,in_reply_to_actor_id,\" +\n \"public,\" +\n \"favorited,reblogged,favorite_count,reblog_count,reply_count,\" +\n \"attachments_count,\" +\n \"note_ins_date,note_updated_date\" +\n \") SELECT \" +\n \"_id,origin_id,note_oid,note_status,conversation_id,conversation_oid,url,'', body, body_to_search, via,note_author_id,in_reply_to_note_id,in_reply_to_actor_id,\" +\n \"CASE private WHEN 2 THEN 1 WHEN 1 THEN 2 ELSE private END,\" +\n \"favorited,reblogged,favorite_count,reblog_count,reply_count,\" +\n \"CASE WHEN EXISTS (\" +\n \"SELECT _ID FROM download WHERE download.note_id=oldnote._id\" +\n \") THEN 1 ELSE 0 END,\" +\n \"note_ins_date,note_updated_date\" +\n \" FROM oldnote\";\n DbUtils.execSQL(db, sql);\n\n dropOldTable(\"oldnote\");\n\n progressLogger.logProgress(stepTitle + \": Converting download\");\n\n dropOldIndex(\"idx_download_actor\");\n dropOldIndex(\"idx_download_note\");\n sql = \"ALTER TABLE download RENAME TO olddownload\";\n DbUtils.execSQL(db, sql);\n\n sql = \"CREATE TABLE download (_id INTEGER PRIMARY KEY AUTOINCREMENT,download_type INTEGER NOT NULL,download_number INTEGER NOT NULL DEFAULT 0,actor_id INTEGER NOT NULL DEFAULT 0,note_id INTEGER NOT NULL DEFAULT 0,media_type TEXT NOT NULL,url TEXT NOT NULL,download_status INTEGER NOT NULL DEFAULT 0,width INTEGER NOT NULL DEFAULT 0,height INTEGER NOT NULL DEFAULT 0,duration INTEGER NOT NULL DEFAULT 0,file_name TEXT,file_size INTEGER NOT NULL DEFAULT 0)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE INDEX idx_download_actor ON download (actor_id, download_status)\";\n DbUtils.execSQL(db, sql);\n sql = \"CREATE INDEX idx_download_note ON download (note_id, download_number)\";\n DbUtils.execSQL(db, sql);\n\n sql = \"INSERT INTO download (\" +\n \"_id,download_type,download_number,actor_id,note_id,\" +\n \"media_type,\" +\n \"url,download_status,width,height,duration,file_name,file_size\" +\n \") SELECT \" +\n \"_id,download_type,0, actor_id,note_id,\" +\n \"CASE content_type WHEN 2 THEN 'image/png' WHEN 3 THEN 'text/*' ELSE '*/*' END,\" +\n \"url,download_status,0, 0, 0, file_name,0\" +\n \" FROM olddownload\";\n DbUtils.execSQL(db, sql);\n\n dropOldTable(\"olddownload\");\n }",
"public static final String getAuthCollabOverKWTableCreationSQL(String shortname) {\r\n\t\tString crTopicTableSQL = \"CREATE TABLE IF NOT EXISTS dblp_authcollabkw_\" +shortname +\r\n\t\t\"(keyword varchar(255) NOT NULL, \" + \r\n\t\t\"author varchar(70) NOT NULL, \" + \r\n\t\t\" collabauth varchar(70) NOT NULL, \" +\r\n\t\t\"collabcnt int NOT NULL\" +\r\n\t\t\" ) \";\r\n\t\treturn crTopicTableSQL;\r\n\t}",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n boolean boolean0 = SQLUtil.isDDL(\"alter materialized viewjcsh%4%|@v9\");\n assertTrue(boolean0);\n }",
"private static void runCatalog() {\r\n\r\n\t\tSystem.out.println(sqlAL.get(0));\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tString sql = \"\";\r\n\t\tboolean tableExist = true;\r\n\t\tString tname = \"\";\r\n\t\tString cmd = \"\";\r\n\r\n\t\ttry {\r\n\t\t\t// STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(catalogDriver);\r\n\r\n\t\t\t// STEP 3: Open a connection\r\n\t\t\tif (catalogUserName.equals(\" \") && catalogPassword.equals(\" \")) {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName);\r\n\t\t\t} else {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName, catalogUserName, catalogPassword);\r\n\t\t\t}\r\n\r\n\t\t\t// STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsql = \"SELECT * FROM dtables\";\r\n\t\t\t\tstmt.executeQuery(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table already exists\");\r\n\r\n\t\t\t} catch (SQLException e) {\r\n\r\n\t\t\t\ttableExist = false;\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table does not exist\");\r\n\t\t\t}\r\n\r\n\t\t\tif (tableExist == false) {\r\n\t\t\t\tsql = \"CREATE TABLE dtables(tname char(32),\" + \"nodedriver char(64),\" + \"nodeurl char(128),\"\r\n\t\t\t\t\t\t+ \"nodeuser char(16),\" + \"nodepasswd char(16),\" + \"partmtd int,\" + \"nodeid int,\"\r\n\t\t\t\t\t\t+ \"partcol char(32),\" + \"partparam1 char(32),\" + \"partparam2 char(32))\";\r\n\r\n\t\t\t\tstmt.executeUpdate(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"SQL table created\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int x = 0; x < nodeAL.size(); x++) {\r\n\r\n\t\t\t\ttname = parseTname(sqlAL.get(x));\r\n\r\n\t\t\t\tcmd = getCmd(sqlAL.get(x));\r\n\t\t\t\t// System.out.println(cmd);\r\n\r\n\t\t\t\tif (cmd.equals(\"CREATE\")) {\r\n\r\n\t\t\t\t\tsql = \"INSERT INTO dtables VALUES \" + \"('\" + tname + \"', \" + \"'\" + (nodeAL.get(x)).getDriver()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getHostName() + \"', \" + \"'\" + (nodeAL.get(x)).getUserName()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getPassword() + \"', \" + -1 + \", \" + \"\" + x + \", \" + null\r\n\t\t\t\t\t\t\t+ \", \" + null + \", \" + null + \")\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t} else if (cmd.equals(\"DROP\")) {\r\n\t\t\t\t\tsql = \"DELETE FROM dtables WHERE \" + \"tname = '\" + tname + \"'\" + \"AND nodedriver = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getDriver() + \"' \" + \"AND nodeurl = '\" + (nodeAL.get(x)).getHostName()\r\n\t\t\t\t\t\t\t+ \"' \" + \"AND nodeuser = '\" + (nodeAL.get(x)).getUserName() + \"' \" + \"AND nodepasswd = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getPassword() + \"' \"\r\n\t\t\t\t\t\t\t// + \"AND partmtd = \" + -1 + \"'\"\r\n\t\t\t\t\t\t\t+ \"AND nodeid = \" + x + \"\"\r\n\t\t\t\t\t\t\t// + \"AND partcol = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam1 = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam2 = '\" + null\r\n\t\t\t\t\t\t\t+ \"\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// rs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: Catalog Updated\");\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle errors for JDBC\r\n\t\t\t// se.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// Handle errors for Class.forName\r\n\t\t\t// e.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} finally {\r\n\t\t\t// finally block used to close resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // nothing we can do\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 se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // end finally try\r\n\t\t} // end try\r\n\t\t\t// System.out.println(\"Goodbye!\");\r\n\r\n\t}",
"public static boolean is_Create_Table_Statement(String schemaStr)\n\t{\n\t\treturn schemaStr.toLowerCase().contains(\"create table\");\n\t}",
"boolean policyDetailExist(PolicyDetail policyDetail);",
"private boolean isTableInDb() throws SQLException\n {\n final String sqlQuery = \"SELECT name FROM sqlite_master WHERE type='table' AND name='\" + TABLE_NAME +\n \"'\";\n\n try (\n final PreparedStatement statement = database.connection().prepareStatement(sqlQuery);\n final ResultSet resultSet = statement.executeQuery();\n )\n {\n if (!resultSet.next())\n return false;\n\n // read table name\n final String tableName = resultSet.getString(1);\n if (resultSet.wasNull() || !tableName.equals(TABLE_NAME))\n return false;\n }\n\n return true;\n }",
"public boolean doesTableExist(Connection connection) throws SQLException {\n\tboolean bTableExists = false;\n \n\t// check the meta data of the connection\n\tDatabaseMetaData dmd = connection.getMetaData();\n\tResultSet rs = dmd.getTables (null, null, \"CREDIT\", null);\n\twhile (rs.next()){\n\t bTableExists = true;\n\t}\n\trs.close(); // close the result set\n\treturn bTableExists; \n }",
"private boolean accountExists(String codigoCuenta, Connection con )\n {\n ClassConnection cc = new ClassConnection();\n boolean presente = (Boolean)cc.execute( \"SELECT codigocuenta FROM cuenta WHERE codigocuenta = \" + Long.parseLong( codigoCuenta ), 2, con);\n \n return presente;\n }"
] | [
"0.61012924",
"0.598929",
"0.57923496",
"0.5630362",
"0.5597416",
"0.5584607",
"0.55739164",
"0.556999",
"0.5517309",
"0.54916495",
"0.5407553",
"0.53960603",
"0.53504485",
"0.5350113",
"0.5348258",
"0.53469604",
"0.5335947",
"0.53354913",
"0.5332317",
"0.53108835",
"0.53031605",
"0.5283832",
"0.5265946",
"0.5263195",
"0.5228959",
"0.52169776",
"0.52135146",
"0.52119285",
"0.5200749",
"0.51993835",
"0.5183591",
"0.5180543",
"0.51746017",
"0.5169873",
"0.51513886",
"0.5136849",
"0.51220775",
"0.5114829",
"0.5109785",
"0.51082",
"0.5103267",
"0.5102079",
"0.5059447",
"0.5047937",
"0.5033014",
"0.5032056",
"0.5019748",
"0.5014553",
"0.50119334",
"0.501052",
"0.5010064",
"0.5008143",
"0.5007711",
"0.4996829",
"0.49949595",
"0.4982586",
"0.4975846",
"0.4975402",
"0.49705502",
"0.4967969",
"0.4958602",
"0.49569464",
"0.495263",
"0.49475932",
"0.49429464",
"0.4938218",
"0.49280393",
"0.49269217",
"0.4922709",
"0.4916858",
"0.49165148",
"0.4914856",
"0.49142066",
"0.49034524",
"0.48973846",
"0.4893644",
"0.4893363",
"0.48876035",
"0.48866314",
"0.48769364",
"0.48521513",
"0.48513737",
"0.48494336",
"0.4849213",
"0.48489285",
"0.4847877",
"0.48440313",
"0.48439863",
"0.48384827",
"0.48374072",
"0.48364377",
"0.48312807",
"0.4830425",
"0.4828577",
"0.4826707",
"0.48186466",
"0.4812464",
"0.4811998",
"0.48116636",
"0.48108616"
] | 0.48194715 | 95 |
find the bigger string sizes | static String twoStrings(String s1, String s2) {
String bigstr = s1.length() > s2.length() ? s1 : s2;
String smallstr = s1.length() > s2.length() ? s2 : s1;
int bigstrSize = bigstr.length();
int smallstrSize = smallstr.length();
boolean string_check[] = new boolean[1000];
for (int i = 0; i < bigstrSize; i++) {
string_check[bigstr.charAt(i) - 'A'] = true;
}
// if at least one char is present in boolean array
for (int i = 0; i < smallstrSize; i++) {
if (string_check[smallstr.charAt(i) - 'A'] == true) {
return "YES";
}
}
return "NO";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n// String before1 = \"27e80000\";\n// String before1 = \"715b00000\";\n String before1 = \"715b00000\";\n\n long after1 = Long.parseLong(before1, 16);\n System.out.println(after1);\n\n// String before2 = \"28d80000\";\n// String before2 = \"7c0000000\";\n// String before2 = \"71db80000\";\n String before2 = \"720580000\";\n long after2 = Long.parseLong(before2, 16);\n System.out.println(after2);\n\n long size = (after2 - after1) / 1024 / 1024;\n System.out.println(\"Size: \" + size + \"M\");\n }",
"public static int size_estLength() {\n return (8 / 8);\n }",
"private long stringSize(Instance instance) {\n return instance.getObjectSize() + stringValueField.getValue(instance).getObjectSize();\n }",
"int getMaxStringLiteralSize();",
"public int itemsetSize(String s) {\n\t StringTokenizer st=new StringTokenizer(s);\n\t return st.countTokens();\n\t}",
"int getMaxCharSize();",
"public int getStringWidth(String text);",
"public double strLen(String str, double size) {\n return mcFont().getStringWidth(str) * size / mcFont().FONT_HEIGHT;\n }",
"static int size_of_jm(String passed){\n\t\treturn 3;\n\t}",
"String getHeight();",
"String getHeight();",
"int getLocalSize();",
"String size();",
"public static Size m97137a(String str) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(str, options);\n return new Size(options.outWidth, options.outHeight);\n }",
"int getStrLngth(String name){\r\n int l= name.length();\r\n return l;}",
"static int size_of_cm(String passed){\n\t\treturn 3;\n\t}",
"public int minBytesPerChar();",
"public String getSize() { \r\n return SIZE[size]; }",
"int calcStringLength(String str) {\n return this.lang.a(str);\n }",
"private static int lengthOfLongestSubstring2(String s) {\n int maxLength = 0;\n int currentlength = 0;\n int startIndex = -1;\n Map<Character, Integer> charMap = new HashMap<>();\n \n for(int index = 0; index < s.length(); index++){\n Character c = s.charAt(index);\n Integer currentIndex = charMap.get(c);\n if(currentIndex != null){\n \tcurrentlength = index - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n if(currentIndex > startIndex) {\n startIndex = currentIndex;\n }\n }\n charMap.put(c, index);\n }\n currentlength = s.length() - startIndex -1 ;\n if(maxLength < currentlength){\n maxLength = currentlength;\n }\n return maxLength;\n }",
"public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }",
"static int size_of_jp(String passed){\n\t\treturn 3;\n\t}",
"public static int longerThanOriginalOne(String s){\n\n\t\tint count = 1;\n\t\tchar c = s.charAt(0);\n\n\t\tint total = 0;\n\n\t\tfor (int i = 1; i < s.length(); i++){\n\t\t\tif (s.charAt(i) == c){\n\t\t\t\tcount += 1;\n\t\t\t}else{\n\t\t\t\ttotal += 1 + Integer.toString(count).length();\n\t\t\t\tc = s.charAt(i);\n\t\t\t\tcount = 1;\n\n\t\t\t}\n\t\t}\n\t\ttotal += 1 + Integer.toString(count).length();\n\t return total;\n\n\n\t}",
"public static String humanize (long size)\n {\n\n long b = 1;\n long Kb = b * 1024;\n long Mb = Kb * 1024;\n long Gb = Mb * 1024;\n long Tb = Gb * 1024;\n long Pb = Tb * 1024;\n long Eb = Pb * 1024;\n\n if (size < Kb) return format2( size ) + \" byte\";\n if (size >= Kb && size < Mb) return format2((double)size / Kb) + \" Kb\";\n if (size >= Mb && size < Gb) return format2((double)size / Mb) + \" Mb\";\n if (size >= Gb && size < Tb) return format2((double)size / Gb) + \" Gb\";\n if (size >= Tb && size < Pb) return format2((double)size / Tb) + \" Tb\";\n if (size >= Pb && size < Eb) return format2((double)size / Pb) + \" Pb\";\n if (size >= Eb) return format2((double)size / Eb) + \" Eb\";\n\n return \"???\";\n }",
"static int size_of_lhld(String passed){\n\t\treturn 3;\n\t}",
"static int size_of_sui(String passed){\n\t\treturn 2;\n\t}",
"static int size_of_jpe(String passed){\n\t\treturn 3;\n\t}",
"public int getLocalSize();",
"static int size_of_sbb(String passed){\n\t\treturn 1;\n\t}",
"private int calculateTextWidth(String[] lines, FontMetrics fm)\r\n {\r\n int numChars = 0;\r\n String maxString = \"\";\r\n // calculate the number of characters in the line\r\n for (String lineNo : lines)\r\n {\r\n if (numChars < lineNo.length())\r\n {\r\n numChars = lineNo.length();\r\n maxString = lineNo;\r\n }\r\n }\r\n // width will be the numChars * text metrics for the font\r\n int maxWidth = fm.stringWidth(maxString);\r\n return maxWidth;\r\n }",
"static int size_of_in(String passed){\n\t\treturn 2;\n\t}",
"public static int getStringLength(CharSequence s) {\r\n int n = 0;\r\n for (int i = 0; i < s.length(); i++) {\r\n int c = (int) s.charAt(i);\r\n if (c < 55296 || c > 56319) n++; // don't count high surrogates, i.e. D800 to DBFF\r\n }\r\n return n;\r\n }",
"@Override\n\tpublic int getSize() {\n\t\treturn mString.size();\n\t}",
"public native int lexiconSize(int field);",
"static int size_of_cpe(String passed){\n\t\treturn 3;\n\t}",
"public int lengthOfLSS(String s){\n HashMap<Character, Integer> m = new HashMap<>();\n int ans = 0;\n \n for(int i=0, j=0; j<s.length(); j++){\n if(m.containsKey(s.charAt(j))){\n i = Math.max(m.get(s.charAt(j)),i);\n }\n ans = Math.max(j-i+1,ans);\n m.put(s.charAt(j),j+1);\n }\n\n return ans;\n }",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"long getSize();",
"public static String getSize(long bytes, boolean si) {\n Log.i(\"Size\", bytes + \"\");\n int unit = si ? 1000 : 1024;\n if (bytes < unit) return bytes + \" B\";\n int exp = (int) (Math.log(bytes) / Math.log(unit));\n String pre = (si ? \"kMGTPE\" : \"KMGTPE\").charAt(exp - 1) + (si ? \"\" : \"i\");\n return String.format(\"%.1f %sB\", bytes / Math.pow(unit, exp), pre);\n }",
"static int size_of_rnz(String passed){\n\t\treturn 1;\n\t}",
"static int size_of_shld(String passed){\n\t\treturn 3;\n\t}",
"public static int lengthOfLongestSubstring2(String s) {\n if(s.length()==1)\n return 1;\n\n int sum = 0;\n\n Map<Character, Integer> map = new HashMap<>();\n int i=0;\n\n while(i<s.length()){\n char c = s.charAt(i);\n\n // map exists char c\n if(map.containsKey(c)){\n if(map.keySet().size() > sum) // replace sum\n sum = map.keySet().size();\n i = map.get(c);\n map = new HashMap<>(); // clear map\n }\n // map doesn't exist char c\n else\n map.put(c, i);\n i++;\n }\n\n if(map.keySet().size() > sum)\n return map.keySet().size();\n return sum;\n }",
"int getPenultimateOutputSize() {\n\t\treturn lastStrLen[0];\n\t}",
"public static int maxSubStringSizeKDistinctChars(String str, int k) {\n int start = 0;\n int maxLen = 0;\n int localSum = 0;\n HashMap<Character, Integer> hm = new HashMap<>();\n\n for(int end = 0; end < str.length(); end++) {\n\n localSum++;\n if (hm.containsKey(str.charAt(end))) {\n hm.put(str.charAt(end), hm.get(str.charAt(end)) + 1);\n } else {\n hm.put(str.charAt(end), 1);\n }\n\n while(hm.size() > k) {\n // maxLen = Math.max(maxLen, end - start);\n maxLen = Math.max(maxLen, localSum - 1);\n hm.put(str.charAt(start), hm.get(str.charAt(start)) - 1);\n if(hm.get(str.charAt(start)) == 0) {\n hm.remove(str.charAt(start));\n }\n start++;\n localSum--;\n }\n }\n\n return Math.max(maxLen, localSum);\n\n }",
"static int size_of_cmp(String passed){\n\t\treturn 1;\n\t}",
"public int thesize(long d) {\n String num = d + \"\";\n return num.length();\n }",
"static int size_of_daa(String passed){\n\t\treturn 1;\n\t}",
"public int lengthOfLongestSubstring2(String s) {\n\n int res = 0;\n int len = s.length();\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n\n for (int i = 0, j = 0; j < len; j++) {\n if (map.containsKey(s.charAt(j))) {\n i = Math.max(map.get(s.charAt(j)), i);// use Max mesas never looking back\n }\n res = Math.max(res, j - i + 1); // j not plus yet, need add 1 to get a real length ( indicate j itself)\n map.put(s.charAt(j), j + 1); // (j+1) means skip duplicate\n System.out.println(map.toString()); // will update the value of key ( union key)\n }\n\n\n return res;\n }",
"static int size_of_jz(String passed){\n\t\treturn 3;\n\t}",
"static int size_of_xthl(String passed){\n\t\treturn 1;\n\t}",
"static int size_of_pchl(String passed){\n\t\treturn 1;\n\t}",
"private int[] getWidths(ArrayList<ArrayList<String>> e){\n final int PIXEL_PER_CHAR = 75;\n\n int[][] nChar = new int[e.size()][e.get(0).size()];\n int[] lengths = new int[e.get(0).size()];\n for(int i = 0; i < e.get(0).size(); i++){\n lengths[i] = 300;\n }\n\n for(int i = 0; i < e.size(); i++){\n for (int j = 0; j < e.get(i).size(); j++){\n nChar[i][j] = e.get(i).get(j).length();\n }\n }\n\n for(int i = 0; i < e.size(); i++){\n for (int j = 0; j < e.get(i).size(); j++){\n if(lengths[j] < (nChar[i][j]*PIXEL_PER_CHAR)){\n lengths[j] = (nChar[i][j]*PIXEL_PER_CHAR);\n }\n }\n }\n\n return lengths;\n }",
"public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}",
"public int lengthOfLongestSubstring(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n int res = 0;\n boolean[] used = new boolean[128];//ASCII 表共能表示 256 个字符,但是由于键盘只能表示 128 个字符,所以用 128 也行\n int left = 0, right = 0; //维持[i, j) 滑动窗口\n while (right < s.length()) {\n if (!used[s.charAt(right)]) {\n used[s.charAt(right ++)] = true;\n } else {\n res = Math.max(res, right - left);\n while ( left < right && s.charAt(left) != s.charAt(right)) {\n used[s.charAt(left ++)] = false;\n }\n left ++;\n right ++;\n }\n }\n res = Math.max(res, right - left);\n return res;\n }",
"static int size_of_ani(String passed){\n\t\treturn 2;\n\t}",
"abstract float linkSize(String link);",
"LengthSmaller createLengthSmaller();",
"public static int estimateMemoryUsage(String s) {\n long size = s == null ? 0 : 48 + (long)s.length() * 2;\n if (size > Integer.MAX_VALUE) {\n LOG.debug(\"Estimated memory footprint larger than Integer.MAX_VALUE: {}.\", size);\n size = Integer.MAX_VALUE;\n }\n return (int) size;\n }",
"public int findLUSlength(String[] strs) { //O(n^2) time. O(1) space.\r\n\t\tif (strs.length == 0)\r\n\t\t\treturn 0;\r\n\t\tint max = -1;\r\n\t\tint i = 0;\r\n\t\t// Arrays.sort(strs, (a,b) -> b.length() - a.length());\r\n\t\tfor (int j = 0; j < strs.length; j++) {\r\n\t\t\tfor (i = 0; i < strs.length; i++) {\r\n\t\t\t\tif (j == i || !isSubsequence(strs[j], strs[i]))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (i == strs.length)\r\n\t\t\t\tmax = Math.max(strs[j].length(), max);\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"static int size_of_mvi(String passed){\n\t\treturn 2;\n\t}",
"private static String makeCorrectSize(String s, int length){\n\t\tStringBuilder sb = new StringBuilder(s); \n\t\tfor(int i = sb.length(); i<length; i++){\n sb.append(\" \");\n }\n\t\treturn sb.toString(); \n\n\t}",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"int getSize();",
"public int lengthOfLongestSubstring2(String s) {\n if (s == null || s.length() == 0) {\n return 0;\n }\n\n int start=0;\n int max = 0;\n int[] map = new int[256];\n\n for (int i = 0; i < s.length(); i++) {\n int c = (int)s.charAt(i);\n start = Math.max(map[c], start);\n map[c] = i + 1;\n max = Math.max(max, i + 1 - start);\n }\n\n return max;\n }",
"static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}",
"static int size_of_sta(String passed){\n\t\treturn 3;\n\t}",
"public static void main(String [] args){\n System.out.println(lengthOfLongestSubstring(\"1a1b1c1d1\"));\n System.out.println(lengthOfLongestSubstring1(\"1a1b1c1d1\"));\n\n System.out.println(17/10);\n }",
"public static int getSize(long d)\n\t{\n\t\tint size = (d + \"\").length();\n\t\tSystem.out.println(\"size is\" +size);\n\t\treturn size;\t\n\t}",
"static int size_of_ldax(String passed){\n\t\treturn 1;\n\t}",
"public static int getSize(long d){\r\n String numberString = \"\"+d;\r\n return numberString.length();\r\n }",
"public static int size_length() {\n return (8 / 8);\n }",
"static int size_of_sub(String passed){\n\t\treturn 1;\n\t}",
"static int size_of_jc(String passed){\n\t\treturn 3;\n\t}",
"public int lengthOfLongestSubstringE(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tSet<Character> cache = new HashSet<Character>();\n\tcache.add(s.charAt(i));\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache.contains(s.charAt(j)))\n\t\tcache.remove(s.charAt(i++));\n\t cache.add(s.charAt(j++));\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }",
"public int defaultSize(String mnemo) {\n\t\treturn 4;\n\t}",
"public static BigInteger addressSize() {\n\t\tMessageDigest md = null;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// get the digest length\n\t\tint lengde = md.getDigestLength();\n\t\t\n\t\t// compute the number of bits = digest length * 8\n\t\tint bits = lengde * 8;\n\t\t\n\t\t// compute the address size = 2 ^ number of bits\n\t\tBigInteger adrStr = BigInteger.valueOf(2).pow(bits);\n\n\t\t// return the address size\n\t\t\n\t\treturn adrStr;\n\t}",
"public int get_length();",
"static int size_of_jpo(String passed){\n\t\treturn 3;\n\t}",
"int fixedSize();",
"public int lengthOfLongestSubstring(String s) {\n if(s.length() == 0) return 0;\r\n \r\n int windowEnd = 0;\r\n int windowStart = 0;\r\n int maxLen = 0;\r\n \r\n \r\n HashMap<Character, Integer> hm = new HashMap<>();\r\n \r\n for(windowEnd = 0;windowEnd < s.length(); windowEnd++){\r\n \r\n char ch = s.charAt(windowEnd);\r\n \r\n if(hm.containsKey(ch)){\r\n windowStart = Math.max(windowStart , hm.get(ch)+1);\r\n }\r\n \r\n hm.put(ch,windowEnd);\r\n maxLen = Math.max(maxLen, windowEnd-windowStart+1);\r\n }\r\n \r\n return maxLen; \r\n }",
"public int lengthOfLongestSubstring(String s) {\n return sol2a(s); \n //return sol3_WRONG(s); //NO! D & C (unlike LC53)\n }",
"static int size_of_ral(String passed){\n\t\treturn 1;\n\t}",
"static int size_of_code(String instruction){\n\t\tint size = 0;\n\t\tString code = instruction.split(\" \")[0];\n\t\tswitch(code){\n\t\tcase \"MOV\":\n\t\t\tsize = size_of_mov(instruction);\n\t\t\tbreak;\n\t\tcase \"MVI\":\n\t\t\tsize = size_of_mvi(instruction);\n\t\t\tbreak;\n\t\tcase \"LXI\":\n\t\t\tsize = size_of_lxi(instruction);\n\t\t\tbreak;\n\t\tcase \"LDA\":\n\t\t\tsize = size_of_lda(instruction);\n\t\t\tbreak;\n\t\tcase \"STA\":\n\t\t\tsize = size_of_sta(instruction);\n\t\t\tbreak;\n\t\tcase \"LHLD\":\n\t\t\tsize = size_of_lhld(instruction);\n\t\t\tbreak;\n\t\tcase \"SHLD\":\n\t\t\tsize = size_of_shld(instruction);\n\t\t\tbreak;\n\t\tcase \"LDAX\":\n\t\t\tsize = size_of_ldax(instruction);\n\t\t\tbreak;\n\t\tcase \"STAX\": \n\t\t\tsize = size_of_stax(instruction);\n\t\t\tbreak;\n\t\tcase \"XCHG\":\n\t\t\tsize = size_of_xchg(instruction);\n\t\t\tbreak;\n\t\tcase \"ADD\":\n\t\t\tsize = size_of_add(instruction);\n\t\t\tbreak;\n\t\tcase \"ADC\":\n\t\t\tsize = size_of_adc(instruction);\n\t\t\tbreak;\n\t\tcase \"ADI\":\n\t\t\tsize = size_of_adi(instruction);\n\t\t\tbreak;\n\t\tcase \"ACI\":\n\t\t\tsize = size_of_aci(instruction);\n\t\t\tbreak;\n\t\tcase \"DAD\":\n\t\t\tsize = size_of_dad(instruction);\n\t\t\tbreak;\n\t\tcase \"SUB\":\n\t\t\tsize = size_of_sub(instruction);\n\t\t\tbreak;\n\t\tcase \"SBB\":\n\t\t\tsize = size_of_sbb(instruction);\n\t\t\tbreak;\n\t\tcase \"SUI\":\n\t\t\tsize = size_of_sui(instruction);\n\t\t\tbreak;\n\t\tcase \"INR\":\n\t\t\tsize = size_of_inr(instruction);\n\t\t\tbreak;\n\t\tcase \"DCR\":\n\t\t\tsize = size_of_dcr(instruction);\n\t\t\tbreak;\n\t\tcase \"INX\":\n\t\t\tsize = size_of_inx(instruction);\n\t\t\tbreak;\n\t\tcase \"DCX\":\n\t\t\tsize = size_of_dcx(instruction);\n\t\t\tbreak;\n\t\tcase \"DAA\":\n\t\t\tsize = size_of_daa(instruction);\n\t\tcase \"ANA\":\n\t\t\tsize = size_of_ana(instruction);\n\t\t\tbreak;\n\t\tcase \"ANI\":\n\t\t\tsize = size_of_ani(instruction);\n\t\t\tbreak;\n\t\tcase \"ORA\":\n\t\t\tsize = size_of_ora(instruction);\n\t\t\tbreak;\n\t\tcase \"ORI\":\n\t\t\tsize = size_of_ori(instruction);\n\t\t\tbreak;\n\t\tcase \"XRA\":\n\t\t\tsize = size_of_xra(instruction);\n\t\t\tbreak;\n\t\tcase \"XRI\":\n\t\t\tsize = size_of_xri(instruction);\n\t\t\tbreak;\n\t\tcase \"CMA\":\n\t\t\tsize = size_of_cma(instruction);\n\t\t\tbreak;\n\t\tcase \"CMC\":\n\t\t\tsize = size_of_cmc(instruction);\n\t\t\tbreak;\n\t\tcase \"STC\":\n\t\t\tsize = size_of_stc(instruction);\n\t\t\tbreak;\n\t\tcase \"CMP\":\n\t\t\tsize = size_of_cmp(instruction);\n\t\t\tbreak;\n\t\tcase \"CPI\":\n\t\t\tsize = size_of_cpi(instruction);\n\t\t\tbreak;\n\t\tcase \"RLC\":\n\t\t\tsize = size_of_rlc(instruction);\n\t\t\tbreak;\n\t\tcase \"RRC\":\n\t\t\tsize = size_of_rrc(instruction);\n\t\t\tbreak;\n\t\tcase \"RAL\":\n\t\t\tsize = size_of_ral(instruction);\n\t\t\tbreak;\n\t\tcase \"RAR\":\n\t\t\tsize = size_of_rar(instruction);\n\t\t\tbreak;\n\t\tcase \"JMP\":\n\t\t\tsize = size_of_jmp(instruction);\n\t\t\tbreak;\n\t\tcase \"JZ\":\n\t\t\tsize = size_of_jz(instruction);\n\t\t\tbreak;\n\t\tcase \"JNZ\":\n\t\t\tsize = size_of_jnz(instruction);\n\t\t\tbreak;\n\t\tcase \"JC\":\n\t\t\tsize = size_of_jc(instruction);\n\t\t\tbreak;\n\t\tcase \"JNC\":\n\t\t\tsize = size_of_jnc(instruction);\n\t\t\tbreak;\n\t\tcase \"JP\":\n\t\t\tsize = size_of_jp(instruction);\n\t\t\tbreak;\n\t\tcase \"JM\":\n\t\t\tsize = size_of_jm(instruction);\n\t\t\tbreak;\n\t\tcase \"JPE\":\n\t\t\tsize = size_of_jpe(instruction);\n\t\t\tbreak;\n\t\tcase \"JPO\":\n\t\t\tsize = size_of_jpo(instruction);\n\t\t\tbreak;\n\t\tcase \"CALL\":\n\t\t\tsize = size_of_call(instruction);\n\t\t\tbreak;\n\t\tcase \"CZ\":\n\t\t\tsize = size_of_cz(instruction);\n\t\t\tbreak;\n\t\tcase \"CNZ\":\n\t\t\tsize = size_of_cnz(instruction);\n\t\t\tbreak;\n\t\tcase \"CC\":\n\t\t\tsize = size_of_cc(instruction);\n\t\t\tbreak;\n\t\tcase \"CNC\":\n\t\t\tsize = size_of_cnc(instruction);\n\t\t\tbreak;\n\t\tcase \"CP\":\n\t\t\tsize = size_of_cp(instruction);\n\t\t\tbreak;\n\t\tcase \"CM\":\n\t\t\tsize = size_of_cm(instruction);\n\t\t\tbreak;\n\t\tcase \"CPE\":\n\t\t\tsize = size_of_cpe(instruction);\n\t\t\tbreak;\n\t\tcase \"CPO\":\n\t\t\tsize = size_of_cpo(instruction);\n\t\t\tbreak;\n\t\tcase \"RET\":\n\t\t\tsize = size_of_ret(instruction);\n\t\t\tbreak;\n\t\tcase \"RZ\":\n\t\t\tsize = size_of_rz(instruction);\n\t\t\tbreak;\n\t\tcase \"RNZ\":\n\t\t\tsize = size_of_rnz(instruction);\n\t\t\tbreak;\n\t\tcase \"RC\":\n\t\t\tsize = size_of_rc(instruction);\n\t\t\tbreak;\n\t\tcase \"RNC\":\n\t\t\tsize = size_of_rnc(instruction);\n\t\t\tbreak;\n\t\tcase \"RP\":\n\t\t\tsize = size_of_rp(instruction);\n\t\t\tbreak;\n\t\tcase \"RM\":\n\t\t\tsize = size_of_rm(instruction);\n\t\t\tbreak;\n\t\tcase \"RPE\":\n\t\t\tsize = size_of_rpe(instruction);\n\t\t\tbreak;\n\t\tcase \"RPO\":\n\t\t\tsize = size_of_rpo(instruction);\n\t\t\tbreak;\n\t\tcase \"PCHL\":\n\t\t\tsize = size_of_pchl(instruction);\n\t\t\tbreak;\n\t\tcase \"IN\":\n\t\t\tsize = size_of_in(instruction);\n\t\t\tbreak;\n\t\tcase \"OUT\":\n\t\t\tsize = size_of_out(instruction);\n\t\t\tbreak;\n\t\tcase \"PUSH\":\n\t\t\tsize = size_of_push(instruction);\n\t\t\tbreak;\n\t\tcase \"POP\":\n\t\t\tsize = size_of_pop(instruction);\n\t\t\tbreak;\n\t\tcase \"XTHL\":\n\t\t\tsize = size_of_xthl(instruction);\n\t\t\tbreak;\n\t\tcase \"SPHL\":\n\t\t\tsize = size_of_sphl(instruction);\n\t\t\tbreak;\n\t\t}\n\t\treturn size;\n\t}",
"static int getLength(String line)\n{\n\tString pattern = \"SVLEN=\";\n\tint idx = line.indexOf(pattern);\n\tif(idx == -1) return 0;\n\tline = line.toUpperCase();\n\tidx += pattern.length();\n\tint end = idx;\n\tint length = 0;\n\twhile(end < line.length() && line.charAt(end) >= '0' && line.charAt(end) <= '9')\n\t{\n\t length = length * 10 + (line.charAt(end) - '0');\n\t end++;\n\t}\n\treturn length;\n}",
"static int size_of_cz(String passed){\n\t\treturn 3;\n\t}",
"static int size_of_out(String passed){\n\t\treturn 2;\n\t}",
"public int lengthOfLongestSubstring(String s) {\n\n int res = 0;\n int len = s.length();\n int i = 0, j = 0;\n Set<Character> set = new HashSet<>();\n while (i < len && j < len) {\n if (!set.contains(s.charAt(j))) {\n set.add(s.charAt(j++)); // here s.set an ele then j already plus\n res = Math.max(res, j - i); // so use j-i\n } else {\n set.remove(s.charAt(i++));\n }\n }\n\n return res;\n }",
"private int calcSize(int size)\n {\n return (((size - 1) / 9) + 1) * 9;\n }",
"String getWidth();",
"String getWidth();"
] | [
"0.69153273",
"0.65342504",
"0.64890933",
"0.6442347",
"0.6427554",
"0.6388423",
"0.632903",
"0.6321123",
"0.62325484",
"0.62014854",
"0.62014854",
"0.6195878",
"0.61774725",
"0.615813",
"0.61435944",
"0.6142455",
"0.6141539",
"0.6124126",
"0.6108641",
"0.6098874",
"0.60962814",
"0.6074451",
"0.60742325",
"0.6047704",
"0.603636",
"0.6035271",
"0.60314333",
"0.60238355",
"0.601936",
"0.6015607",
"0.59982836",
"0.5990388",
"0.5986575",
"0.5981927",
"0.5980524",
"0.5970676",
"0.59643316",
"0.595384",
"0.59476817",
"0.5946468",
"0.5940236",
"0.59315187",
"0.59269327",
"0.59189606",
"0.59060055",
"0.58946925",
"0.58938307",
"0.58935374",
"0.5890281",
"0.5889656",
"0.5874731",
"0.587127",
"0.585807",
"0.5855541",
"0.58511657",
"0.58453304",
"0.5839732",
"0.58349574",
"0.5820776",
"0.5816396",
"0.5814985",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.5814418",
"0.58063734",
"0.5800095",
"0.5794339",
"0.5794271",
"0.57878846",
"0.57793564",
"0.57772505",
"0.57764715",
"0.57735455",
"0.5770025",
"0.5767961",
"0.57652044",
"0.5764225",
"0.5758709",
"0.5754011",
"0.57518727",
"0.5750529",
"0.57499874",
"0.5746936",
"0.5745763",
"0.5741077",
"0.5739632",
"0.57355565",
"0.5728682",
"0.572711",
"0.57265896",
"0.57265896"
] | 0.0 | -1 |
TODO: breakpoint command: toggle line breakpoint | public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testDeleteBreakpoint() throws Exception {\n startTest();\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debug.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n\n openFile(\"linebp.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebp.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n// if (LineDebuggerTest.inEmbeddedBrowser) { // workaround for 226022\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// }\n currentFile.select(\"console.log(\\\"start\\\");\"); // NOI18N\n new ToggleBreakpointAction().perform(currentFile.txtEditorPane());\n\n currentFile.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"debug.html\", currentFile.getName());\n cleanBreakpoints();\n endTest();\n }",
"private static void removeBreakPoint() {\n for (int i=1;i<=dvm.getSourceCodeLength();i++) {\n dvm.setBreakPoint(i-1, false);\n }\n }",
"public void testDebugNoModifications() throws Exception {\n startTest();\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debug.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n\n openFile(\"linebp.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebp.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n setLineBreakpoint(eo, \"if (action === \\\"build\\\") {\");\n setLineBreakpoint(eo, \"var d = new Date();\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n VariablesOperator vo = new VariablesOperator(\"Variables\");\n\n assertEquals(\"Unexpected file opened at breakpoint\", \"debug.html\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 14, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"1\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebp.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 4, currentFile.getLineNumber());\n assertEquals(\"Step variable is unexpected\", \"2\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n evt.waitNoEvent(500);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n assertEquals(\"Debugger stopped at wrong line\", 7, currentFile.getLineNumber());\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"3\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n assertEquals(\"Debugger stopped at wrong line\", 15, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"4\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n assertEquals(\"Debugger stopped at wrong line\", 17, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"5\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepIntoAction().performMenu();\n new StepIntoAction().performMenu();\n evt.waitNoEvent(1000);\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n if(GeneralHTMLProject.inEmbeddedBrowser){ // embedded browser stops on line with function(){\n assertEquals(\"Step variable is unexpected\", \"5\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n }else{\n assertEquals(\"Step variable is unexpected\", \"6\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value); \n }\n\n endTest();\n }",
"private static void showCurrentBreakPoints() {\n System.out.print(\"Current BreakPoints: \");\n for (int i=1;i<=dvm.getSourceCodeLength();i++)\n if (dvm.isLineABreakPoint(i)) System.out.print(i + \" \");\n System.out.print(\"\\n\");\n }",
"public void testDebugModifications() throws Exception {\n startTest();\n\n openFile(\"debugMod.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debugMod.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n openFile(\"linebpMod.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebpMod.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n currentFile.setCaretPositionToEndOfLine(3);\n currentFile.insert(\"\\nconsole.log(\\\"1js\\\");\\nconsole.log(\\\"2js\\\");\\nconsole.log(\\\"3js\\\");\");\n// if (LineDebuggerTest.inEmbeddedBrowser) { // workaround for 226022\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 7, currentFile.getLineNumber());\n currentFile.deleteLine(4);\n currentFile.deleteLine(4);\n\n// if (LineDebuggerTest.inEmbeddedBrowser) {\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 5, currentFile.getLineNumber());\n\n\n currentFile.setCaretPositionToEndOfLine(3);\n currentFile.insert(\"\\nconsole.log(\\\"1js\\\");\\nconsole.log(\\\"2js\\\");\\nconsole.log(\\\"3js\\\");\"); \n\n// if (LineDebuggerTest.inEmbeddedBrowser) {\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 8, currentFile.getLineNumber());\n currentFile.close();\n\n endTest();\n }",
"private static void waitBreakpoint(EditorOperator eo, final int line) throws Exception {\n new Waiter(new Waitable() {\n\n @Override\n public Object actionProduced(Object editorOper) {\n Object[] annotations = ((EditorOperator) editorOper).getAnnotations(line);\n for (int i = 0; i < annotations.length; i++) {\n if (\"Breakpoint\".equals(EditorOperator.getAnnotationType(annotations[i]))) { // NOI18N\n return Boolean.TRUE;\n }\n }\n return null;\n }\n\n @Override\n public String getDescription() {\n return (\"Wait breakpoint established on line \" + line); // NOI18N\n }\n }).waitAction(eo);\n }",
"@Override\n public String getCommandPrefix()\n {\n return \"break\";\n }",
"protected void setBreak() {\n shouldBreak = true;\n }",
"public void setBreak(boolean flag) {\n\tisBreaking = flag;\n}",
"public void jumpToLine(int line) {\n setSelection(line,0);\n }",
"static void debug(boolean b) {\n ProcessRunnerImpl.setGlobalDebug(b);\n }",
"@Override\n\tpublic boolean supportsBreakpoint(IBreakpoint breakpoint) {\n\t\treturn false;\n\t}",
"private void debugInConsole() {\n String command = \"\";\n do {\n try {\n command = getCommandWithPrompt();\n doDebugCommand(command);\n } catch (Error e) {\n println(e.getMessage());\n }\n } while (!command.equals(\"exit\"));\n }",
"@Override\n\tpublic void wantToGoOnBreak() {\n\t\t\n\t}",
"void markLine() {\n lineMark = cursor;\n }",
"private void displayLine()\n {\n System.out.println(\"#################################################\");\n }",
"int breakpointIndexOf(int fileId, int line)\t\t\t{ return breakpointIndexOf(fileId, line, 0, true); }",
"private void goOnBreak(){\n\tDo(\"Going on break\");\n\tstartedBreak = true;\n\tstateChanged();\n }",
"public void continueDebugStep() {\n \tthis.continueDebug = true;\n }",
"void doCondition() throws IOException\n\t{\n\t\ttry\n\t\t{\n\t\t\t// must have a breakpoint number\n\t\t\tint id = nextIntToken();\n\n\t\t\t// get the breakpoint\n\t\t\tint at = breakpointIndexOf(id);\n\t\t\tBreakAction a = breakpointAt(at);\n\n\t\t\t// no more parms means to clear it\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\t// now just pull the commands as they come while not end\n\t\t\t\tString line = restOfLine();\n\n\t\t\t\t// build an expression and attach it to the breakpoint\n\t\t\t\tValueExp exp = parseExpression(line);\n\n\t\t\t\t// warn about the assignment!\n\t\t\t\tif ( exp.containsAssignment() && !yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askExpressionContainsAssignment\")) ) //$NON-NLS-1$\n\t\t\t\t\tthrow new IllegalAccessException(\"=\"); //$NON-NLS-1$\n\n\t\t\t\ta.setCondition(exp, line);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta.clearCondition(); // clear it\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"breakpointNowUnconditional\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"breakpointNotChanged\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public void haltForBreakpoint(int address){\r\n lblStatus.setText(\"Breakpoint hit!\");\r\n btnStop.setEnabled(false);\r\n btnRun.setEnabled(true);\r\n btnStep.setEnabled(true);\r\n updateDisplay();\r\n updateDisassembly(address);\r\n }",
"@Override\n public void visitLineNumber(int line, Label start) {\n if(this.preserveDebuggability){\n super.visitLineNumber(line, start);\n }\n }",
"static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }",
"public boolean set () {\n final ToolsDebugger debugger = (ToolsDebugger) getDebugger ();\n if (debugger.synchronizer == null) return false;\n if (remoteClass != null)\n remove ();\n final String className = getClassName ();\n final int lineNumber = getLineNumber ();\n if ((className == null) || (className.length () < 1) ||\n (lineNumber < 0)) return false;\n try {\n return ((Boolean) new Protector (\"JavaDebugger.addBreakpoint\") { // NOI18N\n public Object protect () throws Exception {\n // in outerclass\n remoteClass = debugger.remoteDebugger.findClass (className);\n if (remoteClass == null) return new Boolean (false);\n remoteLineNumber = lineNumber;\n\n // PATCH for breakpoints in top-level package private classes, try to obtain Line\n CoreBreakpoint breakpoint = getBreakpoint ();\n if ((breakpoint.getLine () == null) && (!breakpoint.isHidden ())) {\n Line newLine = Utils.getLineForSource (className, remoteClass.getSourceFileName (), lineNumber);\n if (newLine != null)\n breakpoint.setLine (newLine);\n }\n // end of PATCH\n\n String s = remoteClass.setBreakpointLine (remoteLineNumber);\n if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n\n // in innerclasses\n String name = Utils.getClassName (className);\n FileObject mainFile = TopManager.getDefault().getRepository ().find (\n Utils.getPackageName (className),\n name,\n \"class\" // NOI18N\n );\n FileObject[] file = mainFile.getParent ().getChildren ();\n\n int i, k = file.length;\n for (i = 0; i < k; i++)\n if (file [i].getName ().startsWith (name) &&\n file [i].getExt ().equals (\"class\") // NOI18N\n ) {\n remoteClass = debugger.remoteDebugger.findClass (file [i].getPackageName ('.'));\n if (remoteClass == null) return new Boolean (false);\n s = remoteClass.setBreakpointLine (lineNumber);\n if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n }\n\n // if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n debugger.println (NbBundle.getBundle (ToolsDebugger.class).getString (\n \"CTL_Cannot_set_breakpoint\") + \": \" + s, // NOI18N\n ToolsDebugger.ERR_OUT\n );\n return new Boolean (false);\n }\n }.throwAndWait (debugger.synchronizer, debugger.killer)).booleanValue ();\n } catch (Exception e) {\n return false;\n }\n }",
"public void testDebugging() throws Throwable {\n // Status bar tracer\n MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n JavaNode sampleClass1Node = new JavaNode(sourcePackagesNode, SAMPLE1_PACKAGE_NAME + \"|\" + SAMPLE1_FILE_NAME);\n // flag to stop debugger in finally\n boolean debuggerStarted = false;\n try {\n // find sample file in Editor\n EditorOperator eo = new EditorOperator(SAMPLE1_FILE_NAME);\n eo.setCaretPosition(\"public static void main\", true);\n final int insertLine = eo.getLineNumber() + 2;\n\n // if file not contains brpText from previous test cases, insert it\n String brpText = \"System.out.println(\\\"Hello\\\");\"; // NOI18N\n if (!eo.contains(brpText)) {\n eo.insert(brpText + \"\\n\", insertLine, 1);\n }\n eo.select(brpText);\n\n ToggleBreakpointAction toggleBreakpointAction = new ToggleBreakpointAction();\n try {\n // toggle breakpoint via Shift+F8\n toggleBreakpointAction.performShortcut(eo);\n waitBreakpoint(eo, insertLine);\n } catch (TimeoutExpiredException e) {\n // need to be realiable test => repeat action once more to be sure it is problem in IDE\n // this time use events instead of Robot\n MainWindowOperator.getDefault().pushKey(\n toggleBreakpointAction.getKeyStrokes()[0].getKeyCode(),\n toggleBreakpointAction.getKeyStrokes()[0].getModifiers());\n waitBreakpoint(eo, insertLine);\n }\n\n // if file not contains second brpText from previous test cases, insert it\n brpText = \"System.out.println(\\\"Good bye\\\");\"; // NOI18N\n if (!eo.contains(brpText)) {\n eo.insert(brpText + \"\\n\", insertLine + 1, 1);\n }\n eo.select(brpText);\n // toggle breakpoint via pop-up menu\n // clickForPopup(0, 0) used in the past sometimes caused that menu\n // was opened outside editor area because editor roll up after \n // text was selected\n toggleBreakpointAction.perform(eo.txtEditorPane());\n // wait second breakpoint established\n waitBreakpoint(eo, insertLine + 1);\n // start to track Main Window status bar\n stt.start();\n debuggerStarted = true;\n // start debugging\n new DebugJavaFileAction().performMenu(sampleClass1Node);\n // check the first breakpoint reached\n // wait status text \"Thread main stopped at SampleClass1.java:\"\n // increase timeout to 60 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 60000);\n String labelLine = Bundle.getString(\"org.netbeans.modules.debugger.jpda.ui.Bundle\",\n \"CTL_Thread_stopped\",\n new String[]{\"main\", SAMPLE1_FILE_NAME, null, String.valueOf(insertLine)}); // NOI18N\n stt.waitText(labelLine);\n // continue debugging\n new ContinueAction().perform();\n // check the second breakpoint reached\n // wait status text \"Thread main stopped at SampleClass1.java:\"\n String labelLine1 = Bundle.getString(\"org.netbeans.modules.debugger.jpda.ui.Bundle\",\n \"CTL_Thread_stopped\",\n new String[]{\"main\", SAMPLE1_FILE_NAME, null, String.valueOf(insertLine)}); // NOI18N\n stt.waitText(labelLine1);\n // check \"Hello\" was printed out in Output\n OutputTabOperator oto = new OutputTabOperator(\"debug-single\"); // NOI18N\n // wait until text Hello is not written in to the Output\n oto.waitText(\"Hello\"); // NOI18N\n } catch (Throwable th) {\n try {\n // capture screen before cleanup in finally clause is completed\n PNGEncoder.captureScreen(getWorkDir().getAbsolutePath() + File.separator + \"screenBeforeCleanup.png\");\n } catch (Exception e1) {\n // ignore it\n }\n th.printStackTrace(getLog());\n throw th;\n } finally {\n if (debuggerStarted) {\n // finish debugging\n new FinishDebuggerAction().perform();\n // check status line\n // \"SampleProject (debug-single)\"\n String outputTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"debug-single\"}); // NOI18N\n // \"Finished building SampleProject (debug-single)\"\n String finishedMessage = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new Object[]{outputTarget});\n stt.waitText(finishedMessage);\n }\n stt.stop();\n // delete sample class\n sampleClass1Node.delete();\n String confirmTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_SafeDel_Delete\"); // NOI18N\n String confirmButton = UIManager.getDefaults().get(\"OptionPane.okButtonText\").toString(); // NOI18N\n // \"Confirm Object Deletion\"\n new JButtonOperator(new NbDialogOperator(confirmTitle), confirmButton).push();\n }\n }",
"public void toggleDebug() {\n\t\tdebug = debug ? false : true;\n\t}",
"void showNewLine(String lineNumber, String directionId);",
"boolean hasCustomBreak();",
"private void Perform_BREAK() throws RuntimeException\n {\n throw new RuntimeException(Constants.Error(Constants.BREAK_MODE));\n }",
"public void activateBreakpointView() {\n \t\tif (!this.breakpointView.getActive()) {\n \t\t\tthis.breakpointView.getAddButton().addSelectionListener(this);\n \t\t\tthis.breakpointView.setActive(true);\n \t\t}\n \t}",
"public void jumpToPreLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == 1) {\n textBuffer.setCurToHead();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo-1);\n lineJumpHelper(curX);\n }",
"public void toggleDebugMode() {\r\n DEBUG = !DEBUG;\r\n }",
"private static void OnQueryStatusEnterBreak(Object sender, CanExecuteRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n args.ContinueRouting = true; \r\n return;\r\n }\r\n\r\n if (This.Selection.IsTableCellRange || !This.AcceptsReturn) \r\n {\r\n args.ContinueRouting = true; \r\n return; \r\n }\r\n\r\n args.CanExecute = true;\r\n }",
"public DOMBreakpointCustomizer() {\n this (createBreakpoint ());\n createBreakpoint = true;\n }",
"public static void normalDebug(){\n enableVerbos = false;\n }",
"public CoreBreakpoint.Event getNewInstance () {\n return new LineBreakpoint ();\n }",
"public void testOpenJavaProgramLaunchConfigurationDialog2() {\n // warm run..depends on testOpenJavaProgramLaunchConfigurationDialog1 for cold start\n ILaunchConfiguration config = getLaunchConfiguration(\"Breakpoints\");\n IStructuredSelection selection = new StructuredSelection(config);\n openLCD(selection, fgIdentifier);\n }",
"public void setLine(int line);",
"BreakAction addBreakpoint(int fileId, int line) throws NotConnectedException, NullPointerException\n {\n\t\t// use fileId SourceFile to denote the name of file in which we wish to set a breakpoint\n SourceFile f = m_fileInfo.getFile(fileId);\n\t\tLocationCollection col = enableBreak(f, line);\n\n BreakAction b = new BreakAction(col); // throws NullPointerException if collection is null\n b.setEnabled(true);\n\t\tb.setSingleSwf(m_fileInfo.isSwfFilterOn());\n breakpointAdd(b);\n return b;\n }",
"@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"Line\");\n\t}",
"void doCommands() throws IOException\n\t{\n\t\ttry\n\t\t{\n\t\t\tint id = -1;\n\t\t\tif (hasMoreTokens())\n\t\t\t\tid = nextIntToken();\n\t\t\telse\n\t\t\t\tid = propertyGet(BPNUM);\n\n\t\t\t// get the breakpoint\n\t\t\tint at = breakpointIndexOf(id);\n\t\t\tBreakAction a = breakpointAt(at);\n\n\t\t\t// ready it\n\t\t\ta.clearCommands();\n\t\t\ta.setSilent(false);\n\n\t\t\t// now just pull the commands as they come while not end\n\t\t\tString line = null;\n\t\t\tboolean first = true;\n\t\t\tboolean isEnd = false;\n\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\tout(getLocalizationManager().getLocalizedTextString(\"typeCommandsForBreakpoint\", args)); //$NON-NLS-1$\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\tdisplayCommandPrompt();\n\t\t\t\tline = readLine().trim();\n\t\t\t isEnd = line.equalsIgnoreCase(\"end\"); //$NON-NLS-1$\n\n\t\t\t\tif (!isEnd)\n\t\t\t\t{\n\t\t\t\t\tif (first && line.equalsIgnoreCase(\"silent\")) //$NON-NLS-1$\n\t\t\t\t\t\ta.setSilent(true);\n\t\t\t\t\telse\n\t\t\t\t\t\ta.addCommand(line);\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\twhile(!isEnd);\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public void setBreakStatus(boolean state){\n\tonBreak = state;\n\tstateChanged();\n }",
"protected void lightsOut(int line) {\r\n for (int i = 0; i < 16; i++) {\r\n code.unhighlight(i);\r\n }\r\n code.highlight(line);\r\n }",
"private void cmdMultiLine() {\n fMultiLineMode = true;\n }",
"public void sendBreak() {\n\tsPort.sendBreak(1000);\n }",
"public void setRemoveLine(boolean b){\n\t\tremoveline = b;\n\t}",
"private static void setBreakPoint(String requestedBreakPoints) {\n String buffer = \"\";\n String[] TentativeBreakPointLines = requestedBreakPoints.split(\" \");\n for (int i=0;i<TentativeBreakPointLines.length;i++) {\n //Check to see if the ith line is a valid bp or not.\n if (Integer.parseInt(TentativeBreakPointLines[i]) <= dvm.getSourceCodeLength() && Integer.parseInt(TentativeBreakPointLines[i]) >= 1) {\n if (dvm.setBreakPoint(Integer.parseInt(TentativeBreakPointLines[i]) - 1, true))\n buffer += TentativeBreakPointLines[i] + \", \"; //BP was set correctly\n else\n System.out.println(\"***Error*** Line #\" + TentativeBreakPointLines[i] + \" is an invalid breakpoint location.\"); //BP failed\n } else\n System.out.println(\"***Error*** Line #\" + TentativeBreakPointLines[i] + \" does not exist.\");\n }\n //Chop off the last trailing ','\n if(buffer.length()-2>0)\n if(buffer.charAt(buffer.length()-2)==',')\n buffer = buffer.substring(0, buffer.length()-2);\n\n if (buffer.length()>=1)\n System.out.println(\"Break point set: \" + buffer);\n else \n System.out.println(\"***Error*** No breakpoints were set.\");\n }",
"boolean processBreak(boolean postStep, StringBuilder sb) throws NotConnectedException\n\t{\n\t\tLocation l = getCurrentLocation();\n\t\tif (l == null || l.getFile() == null)\n\t\t\treturn false;\n\n\t\tint fileId = l.getFile().getId();\n\t\tint line = l.getLine();\n\t\tboolean isSilent = false;\n\t\tboolean bpHit = false;\n\t\tboolean stoppedDueToBp = false;\n\n\t\tint count = breakpointCount();\n\t\tboolean[] markedForRemoval = new boolean[count];\n\t\tboolean previousResume = m_requestResume;\n\t\tfor(int i=0; i<count; i++)\n\t\t{\n\t\t\tBreakAction a = breakpointAt(i);\n\t\t\tif (a.locationMatches(fileId, line))\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Note that it appears that we stopped due to hitting a hard breakpoint\n\t\t\t\t * Now if the breakpoint is conditional it may eval to false, meaning we\n\t\t\t\t * won't stop here, otherwise we will process the breakpoint.\n\t\t\t\t */\n\t\t\t\tstoppedDueToBp = (m_session.suspendReason() == SuspendReason.Breakpoint);\n\t\t\t\tif (shouldBreak(a, fileId, line))\n\t\t\t\t{\n\t\t\t\t\t// its a hit\n\t\t\t\t\tbpHit = true;\n\t\t\t\t\ta.hit();\n\t\t\t\t\tisSilent = (isSilent) ? true : a.isSilent();\n\n\t\t\t\t\t// autodelete, autodisable\n\t\t\t\t\tif (a.isAutoDisable())\n\t\t\t\t\t\tdisableBreakpointAt(i);\n\n\t\t\t\t\tif (a.isAutoDelete())\n\t\t\t\t\t\tmarkedForRemoval[i] = true;\n\n\t\t\t\t\t// now issue any commands that are attached to the breakpoint\n\t\t\t\t\tint n = a.getCommandCount();\n\t\t\t\t\tfor(int j=0 ;j<n; j++)\n\t\t\t\t\t\tissueCommand(a.commandAt(j), sb);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// kill them backwards so our i is acurate\n\t\tfor(int i=markedForRemoval.length-1; i>-1; i--)\n\t\t\tif (markedForRemoval[i])\n\t\t\t\tremoveBreakpointAt(i);\n\n\t\t/**\n\t\t * Now we should request to resume only if it was due to\n\t\t * breakpoints that were hit.\n\t\t *\n\t\t * For the first case, we hit a conditional breakpoint that\n\t\t * eval'd to false, resulting in bpHit == false. Thus we\n\t\t * want to resume and additionally if we were stepping, we'd\n\t\t * like to do so 'softly' that is without loosing the stepping\n\t\t * information on the Player.\n\t\t *\n\t\t * For the 2nd case, we hit a breakpoint and we executed\n\t\t * commands that resulted in a m_requestResume.\n\t\t */\n\t\tif (stoppedDueToBp && !bpHit)\n\t\t{\n\t\t\tm_requestResume = true;\n\t\t\tm_stepResume = postStep; // resume without losing our stepping\n\t\t\tisSilent = true;\t\t\t// do so quietly\n\t\t}\n\t\telse if (stoppedDueToBp && bpHit && m_requestResume && !previousResume)\n\t\t{\n\t\t\tm_requestResume = true;\n\t\t\tm_stepResume = postStep; // resume as we would\n\t\t processDisplay(sb);\n\t\t}\n\n\t\t// If we aren't continuing, then show display variables\n\t\tif (!m_requestResume)\n\t\t\tprocessDisplay(sb);\n\n//\t\tSystem.out.println(\"processBreak stopDueToBp=\"+stoppedDueToBp+\",bpHit=\"+bpHit+\",postStep=\"+postStep+\",reason=\"+suspendReason());\n\n\t\treturn isSilent;\n\t}",
"public void setDebugging(boolean on)\n\t{\n\t\t_options.setDebugging(on);\n\t}",
"protected void brkt() {\n println(breakPoints.toString());\n }",
"public abstract void onLineMode ();",
"public void DoGoToLine(int spot) {\n\t\tint col = spot % 10;\n\t\txDestination = 175 + (col * 25);\n\t\tyDestination = yEnterBus;\n\t\tcommand = Command.GetInLine;\n\t}",
"public void setShowLineNumbers(boolean aValue)\n {\n if (aValue == isShowLineNumbers()) return;\n _showLineNumbers = aValue;\n\n // Adjust PrefWidth\n setPrefWidth(getSuggestedPrefWidth());\n }",
"private void skipConsoleLine(){\n\t\tSystem.out.println();\n\t}",
"Break createBreak();",
"public void breaker() \r\n\t{\n\t\t\r\n\t}",
"public boolean isShowLineNumbers() { return _showLineNumbers; }",
"private void doDebugCommand(String command) {\n Scanner comScan = new Scanner(command);\n int loc1 = 0;\n int loc2 = 0;\n int r = 0;\n int value = 0;\n String s;\n\n // Get the debugging command and execute it\n try {\n String com = comScan.next();\n if (\"exit\".equals(com)) {\n return;\n }\n // Run the program\n if (\"go\".equals(com)) {\n if (comScan.hasNext()) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n go(loc1);\n } else {\n go();\n }\n return;\n }\n\n // Step: execute one instruction\n if (\"step\".equals(com)) {\n step();\n return;\n }\n\n // Dump memory at given location\n if (\"dump\".equals(com)) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n s = comScan.next();\n loc2 = getAddress(s);\n if (loc2 == NO_LABEL) {\n loc2 = Integer.parseInt(s);\n }\n dump(loc1, loc2);\n return;\n }\n\n // Dump the registers at a given location\n if (\"dumpr\".equals(com)) {\n dumpr();\n return;\n }\n\n // Deasemble memory from given locations\n if (\"deas\".equals(com)) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n s = comScan.next();\n loc2 = getAddress(s);\n if (loc2 == NO_LABEL) {\n loc2 = Integer.parseInt(s);\n }\n deas(loc1, loc2);\n return;\n }\n\n // Print the breakpoint table\n if (\"brkt\".equals(com)) {\n brkt();\n return;\n }\n\n // Set a breakpoint\n if (\"sbrk\".equals(com)) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n sbrk(loc1);\n return;\n }\n\n // Clear a breakpoint\n if (\"cbrk\".equals(com)) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n cbrk(loc1);\n return;\n }\n\n // Clear the breakpoint table\n if (\"cbrkt\".equals(com)) {\n cbrkt();\n return;\n }\n\n // Print out the help menu\n if (\"help\".equals(com)) {\n help();\n return;\n }\n\n // Change a given register to a given value\n if (\"chngr\".equals(com)) {\n r = Integer.parseInt(comScan.next());\n value = Integer.parseInt(comScan.next());\n chngr(r, value);\n return;\n }\n\n // Change a given location in memory to a given value\n if (\"chngm\".equals(com)) {\n s = comScan.next();\n loc1 = getAddress(s);\n if (loc1 == NO_LABEL) {\n loc1 = Integer.parseInt(s);\n }\n value = Integer.parseInt(comScan.next());\n chngm(loc1, value);\n return;\n }\n println(\"Invalid debbugger input\");\n\n } catch (NoSuchElementException e) {\n\n // Occurs when user calls a command but doent give the correct locations or value\n println(\"Invalid debbugger input\");\n } catch (NumberFormatException e) {\n\n // Occurs when user call a command but provide bad input\n // Such a giving a string when asking for an int\n println(\"Number format error\");\n }\n }",
"public static void enableDebugging(){\n DEBUG = true;\n }",
"public void setDebug(boolean b) { debug = b; }",
"@Property\n public native boolean isHandledWhileDebugging ();",
"public AudioBreak(int nLineNumber){\n\t\tlineNumber = nLineNumber;\n\t\tkey = STARTKEY;\n\t}",
"public void showLine() {\n System.out.print(LINE_SEPARATOR);\n }",
"public void setLine (int Line);",
"Location breakEnableRequest(int fileId, int line) throws NotConnectedException\n\t{\n\t\tLocation l = null;\n\t\ttry\n\t\t{\n\t\t\tl = m_session.setBreakpoint(fileId, line);\n\t\t}\n\t\tcatch(NoResponseException nre)\n\t\t{\n\t\t\t/**\n\t\t\t * This could be that we have an old player which does not\n\t\t\t * respond to this request, or that we have a new player and\n\t\t\t * the location was not set.\n\t\t\t */\n\t\t}\n\t\treturn l;\n\t}",
"void setStepLineNumber(int number)\n\t{\n\t\tthis.stepLineNumber = number;\n\t}",
"void setStepLineNumber(int number)\n\t{\n\t\tthis.stepLineNumber = number;\n\t}",
"public void line(String line) {\n\t\t}",
"void doEnable() throws AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// enables all breakpoints\n\t\t\t\tint count = breakpointCount();\n\t\t\t\tint tally = 0;\n\t\t\t\tfor(int i=0; i<count; i++)\n\t\t\t\t\ttally += enableBreakpointAt(i) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t// mention that not all was good\n\t\t\t\tif (tally != count)\n\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notAllBreakpointsEnabled\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = enableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tboolean autoDelete = false;\n\t\t\t\tboolean autoDisable = false;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoEnableDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse if (cmd == CMD_DELETE)\n\t\t\t\t\t{\n\t\t\t\t\t\tautoDelete = true;\n\t\t\t\t\t\tid = nextIntToken(); // set and get next number token\n\t\t\t\t\t}\n\t\t\t\t\telse if (cmd == ENABLE_ONCE_CMD)\n\t\t\t\t\t{\n\t\t\t\t\t\tautoDisable = true;\n\t\t\t\t\t\tid = nextIntToken(); // set and get next number token\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tboolean worked = true;\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\tworked = enableBreakpointAt(at, autoDisable, autoDelete);\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( worked && id > -1 );\n\n\t\t\t\t\tif (!worked)\n\t\t\t\t\t{\n\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"breakpointLocationNoLongerExists\", args)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public void setLineMode (boolean lineMode)\r\n\t{\r\n\t\tm_lineMode = lineMode;\r\n\t}",
"void setLineNumber(int lineNumber) {}",
"BreakAction removeBreakpoint(int fileId, int line) throws ArrayIndexOutOfBoundsException, NotConnectedException\n\t{\n\t\tint at = breakpointIndexOf(fileId, line);\n\t\treturn removeBreakpointAt(at);\n\t}",
"void doDisable() throws AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// disables all breakpoints,\n\t\t\t\tint count = breakpointCount();\n\t\t\t\tfor(int i=0; i<count; i++)\n\t\t\t\t\tdisableBreakpointAt(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = disableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoDisableDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\tdisableBreakpointAt(at);\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( id > -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public void setDebugger(Debugger newDebugger) {\r\n\tdebugger = newDebugger;\r\n}",
"private void initiateBreak(){\n\tDo(\"Starting to go on break\");\n\thost.msgChangeWorkStatus(this, false);\n\tworking = false;\n\tstateChanged();\n }",
"public void testOpenJavaProgramLaunchConfigurationDialog1() {\n // cold run\n ILaunchConfiguration config = getLaunchConfiguration(\"Breakpoints\");\n IStructuredSelection selection = new StructuredSelection(config);\n for (int i = 0; i < 100; i++) {\n openLCD(selection, fgIdentifier);\n }\n commitMeasurements();\n assertPerformance();\n }",
"public void setLineNumbers(LineNumberDebugInfo[] lineNumbers);",
"public void setLine ( String value )\n {\n line = value;\n }",
"public void setStartLineNumber(int foo) { startLineNumber = foo; }",
"@Override\n\tpublic boolean isMyLine() {\n\t\treturn false;\n\t}",
"public void markBench () {\r\n\t\tif (Properties.interactDebug)\r\n\t\t\tif (bench != null)\r\n\t\t\t\tbench.mark();\r\n\t}",
"public void setMultiLine(boolean multiLine) {\n/* 1249 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"void debug() {\n this.renderer.debug = !this.renderer.debug;\n reload();\n }",
"public void testBreakpointRemoteFile() throws Exception {\n startTest();\n dummyEdit(\"debug.html\", LineDebuggerTest.current_project, \"debug.html\"); // workaround for automated tests on slow machines\n waitForRemoteFiles(LineDebuggerTest.current_project);\n openRemoteFile(\"common.js\", LineDebuggerTest.current_project);\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n EditorOperator eo = new EditorOperator(\"common.js\");\n setLineBreakpoint(eo, \"document.write(msg);\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\"); // issue 225407 workaround\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"common.js [r/o]\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 424, currentFile.getLineNumber());\n endTest();\n }",
"public boolean getNeedLineBreak() {\n\t\treturn true;\n\t}",
"void doDelete() throws IOException, AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// no args means delete all breakpoints, last chance...\n\t\t\t\tif (yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askDeleteAllBreakpoints\"))) //$NON-NLS-1$\n\t\t\t\t{\n\t\t\t\t\tint count = breakpointCount();\n\t\t\t\t\tfor(int i=count-1; i>-1; i--)\n\t\t\t\t\t\tremoveBreakpointAt(i);\n\n\t\t\t\t\tremoveAllWatchpoints();\n\t\t\t\t\tremoveAllCatchpoints();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = disableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoUnDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\t\tif(at > -1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tremoveBreakpointAt(at);\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\tat = watchpointIndexOf(id);\n\t\t\t\t\t\t\t\tif (at > -1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tremoveWatchpointAt(at);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tat = catchpointIndexOf(id);\n\t\t\t\t\t\t\t\t\tremoveCatchpointAt(at);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(IndexOutOfBoundsException iob)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( id > -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public static void setDebug(int b) {\n debug = b;\n }",
"public void jumpToNextLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == textBuffer.getMaxLine()-1) {\n textBuffer.setCurToTail();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo+1);\n lineJumpHelper(curX);\n }",
"public void debug() {\n\n }",
"public void setStrictLineBreaking(java.lang.Boolean strictLineBreaking) {\r\n this.strictLineBreaking = strictLineBreaking;\r\n }",
"public void setLine(String line) {\n this.line = line;\n //System.out.println(this.line + \" \" + line);\n }",
"public void setDebug(boolean isDebug)\n {\n this.isDebug = isDebug;\n this.repaint();\n }",
"public void setDrawLine(boolean b){\n\t\tdraw = b; \n\t}",
"public void enableDebug() {\n this.debug = true;\n }",
"public void setLineNumbering(boolean lineNumbering) {\r\n this.lineNumbering = Boolean.valueOf(lineNumbering);\r\n }",
"private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }",
"public void navigate(boolean requestFocus) {\n highlightFindingInEditor(pmdViolation);\n }",
"public void debug(String comment);",
"public void switchToDebug() {\r\n\t\tdebugPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"debugPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}"
] | [
"0.6672009",
"0.6422396",
"0.63355625",
"0.6293484",
"0.62684536",
"0.6170853",
"0.613667",
"0.6080653",
"0.60534424",
"0.59284383",
"0.5863285",
"0.5838125",
"0.5750545",
"0.5740605",
"0.5740238",
"0.57322913",
"0.5692983",
"0.5690017",
"0.5675868",
"0.5656688",
"0.5649937",
"0.56489396",
"0.5629392",
"0.560256",
"0.5593886",
"0.55739564",
"0.5537277",
"0.55277187",
"0.55125886",
"0.5501211",
"0.549888",
"0.5465133",
"0.53781414",
"0.53719175",
"0.536429",
"0.53107107",
"0.5294378",
"0.5284008",
"0.5281998",
"0.5270955",
"0.5269363",
"0.52650577",
"0.52386713",
"0.52242863",
"0.5223358",
"0.521371",
"0.52032155",
"0.520239",
"0.5201587",
"0.51995784",
"0.5197396",
"0.5172999",
"0.5166047",
"0.51622146",
"0.5156188",
"0.5152343",
"0.51508844",
"0.5149813",
"0.5140887",
"0.51405674",
"0.51397246",
"0.5133584",
"0.51271033",
"0.51204336",
"0.51159686",
"0.510374",
"0.510374",
"0.510136",
"0.50928324",
"0.50927275",
"0.5087699",
"0.5073691",
"0.507297",
"0.5060146",
"0.50594133",
"0.505917",
"0.5057766",
"0.50507766",
"0.5046662",
"0.504615",
"0.50420636",
"0.5041539",
"0.5040486",
"0.502123",
"0.5012561",
"0.5012017",
"0.5008811",
"0.50073403",
"0.49891457",
"0.4988359",
"0.498795",
"0.49804252",
"0.49789366",
"0.4971007",
"0.4968279",
"0.49651828",
"0.49592948",
"0.49427682",
"0.49392062",
"0.4933543"
] | 0.68408483 | 0 |
TODO: breakpoint command: toggle watchpoint | public void toggleWatchpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void goOnBreak(){\n\tDo(\"Going on break\");\n\tstartedBreak = true;\n\tstateChanged();\n }",
"@Override\n\tpublic boolean supportsBreakpoint(IBreakpoint breakpoint) {\n\t\treturn false;\n\t}",
"private static void removeBreakPoint() {\n for (int i=1;i<=dvm.getSourceCodeLength();i++) {\n dvm.setBreakPoint(i-1, false);\n }\n }",
"public void setBreak(boolean flag) {\n\tisBreaking = flag;\n}",
"protected void setBreak() {\n shouldBreak = true;\n }",
"@Override\n\tpublic void wantToGoOnBreak() {\n\t\t\n\t}",
"void doWatch(boolean read, boolean write) throws PlayerDebugException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (read)\n\t\t\t{\n\t\t\t\terr(\"Only break-on-write watchpoints are supported.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t/* pull the rest of the line */\n\t\t\tString s = restOfLine();\n\n\t\t\tint flags = 3;\n\t\t\tif(read && write) flags = WatchKind.READWRITE;\n\t\t\telse if(read) flags = WatchKind.READ;\n\t\t\telse if(write) flags = WatchKind.WRITE;\n\n\t\t\t// snapshot of our existing list\n\t\t\tWatch[] list = m_session.getWatchList();\n\n\t\t\t// We need to separate the front part the 'a.b' in 'a.b.c' \n\t\t\t// of the expression to resolve it into a variable \n\t\t\t// We usually get back a VariableFacade which contains\n\t\t\t// the context id (i.e the variable id) and the member name.\n\t\t\tValueExp expr = parseExpression(s);\n\t\t\tVariableFacade result = (VariableFacade)(evalExpression(expr).value);\n\n\t\t\t// extract the 2 pieces and get the raw variable.\n\t\t\tint varId = result.getContext(); // TODO fix this??? -mike\n\t\t\tString memberName = result.getName();\n\t\t\tValue v = m_session.getValue(varId);\n\n\t\t\t// attempt to set.\n\t\t\tWatch w = m_session.setWatch(v, memberName, flags);\n\t\t\tif (w == null)\n\t\t\t{\n\t\t\t\t// failed\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"watchpointCouldNotBeSet\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// if modified then lists are same length\n\t\t\t\t// otherwise 1 will be added\n\t\t\t\tWatch[] newList = m_session.getWatchList();\n\t\t\t\tif (newList.length == list.length)\n\t\t\t\t{\n\t\t\t\t\t// modified, lets locate the one that changed\n\t\t\t\t\t// and reset it\n\t\t\t\t\tint at = missingWatchpointIndexOf(newList);\n\t\t\t\t\tWatchAction a = null;\n\t\t\t\t\ttry\t\n\t\t\t\t\t{ \n\t\t\t\t\t\ta = watchpointAt(at); \n\t\t\t\t\t} \n\t\t\t\t\tcatch(ArrayIndexOutOfBoundsException aio)\n\t\t\t\t\t{\n\t\t\t\t\t\t// this is pretty bad it means the player thinks we have a watchpoint\n\t\t\t\t\t\t// but we don't have a record of it. So let's create a new one\n\t\t\t\t\t\t// and hope that we are now in sync with the player.\n\t\t\t\t\t\ta = new WatchAction(w);\n\t\t\t\t\t}\n\n\t\t\t\t\t// modify our view of the watchpoint\n\t\t\t\t\tint id = a.getId();\n\t\t\t\t\ta.resetWatch(w);\n\n\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\targs.put(\"watchpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"watchpointMode\", getWatchpointModeString(a.getKind())); //$NON-NLS-1$\n\t\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"changedWatchpointMode\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// newly added\n\t\t\t\t\tWatchAction a = new WatchAction(w);\n\t\t\t\t\twatchpointAdd(a);\n\n\t\t\t\t\tint which = a.getId();\n\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\targs.put(\"watchpointNumber\", Integer.toString(which)); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"createdWatchpoint\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\tout(sb.toString());\n\t\t\t}\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException aio)\n\t\t{\n\t\t\t// We should really do some cleanup after this exception\n\t\t\t// since it most likely means we can't find the watchpoint\n\t\t\t// that was just modified, therefore our watchlists are\n\t\t\t// out of sync with those of the API.\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badWatchpointNumber\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(ClassCastException cce)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotResolveExpression\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public DOMBreakpointCustomizer() {\n this (createBreakpoint ());\n createBreakpoint = true;\n }",
"private static void showCurrentBreakPoints() {\n System.out.print(\"Current BreakPoints: \");\n for (int i=1;i<=dvm.getSourceCodeLength();i++)\n if (dvm.isLineABreakPoint(i)) System.out.print(i + \" \");\n System.out.print(\"\\n\");\n }",
"public void haltForBreakpoint(int address){\r\n lblStatus.setText(\"Breakpoint hit!\");\r\n btnStop.setEnabled(false);\r\n btnRun.setEnabled(true);\r\n btnStep.setEnabled(true);\r\n updateDisplay();\r\n updateDisassembly(address);\r\n }",
"public void markBench () {\r\n\t\tif (Properties.interactDebug)\r\n\t\t\tif (bench != null)\r\n\t\t\t\tbench.mark();\r\n\t}",
"private static void waitBreakpoint(EditorOperator eo, final int line) throws Exception {\n new Waiter(new Waitable() {\n\n @Override\n public Object actionProduced(Object editorOper) {\n Object[] annotations = ((EditorOperator) editorOper).getAnnotations(line);\n for (int i = 0; i < annotations.length; i++) {\n if (\"Breakpoint\".equals(EditorOperator.getAnnotationType(annotations[i]))) { // NOI18N\n return Boolean.TRUE;\n }\n }\n return null;\n }\n\n @Override\n public String getDescription() {\n return (\"Wait breakpoint established on line \" + line); // NOI18N\n }\n }).waitAction(eo);\n }",
"public void setDebugger(Debugger newDebugger) {\r\n\tdebugger = newDebugger;\r\n}",
"public void testDeleteBreakpoint() throws Exception {\n startTest();\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debug.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n\n openFile(\"linebp.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebp.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n// if (LineDebuggerTest.inEmbeddedBrowser) { // workaround for 226022\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// }\n currentFile.select(\"console.log(\\\"start\\\");\"); // NOI18N\n new ToggleBreakpointAction().perform(currentFile.txtEditorPane());\n\n currentFile.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"debug.html\", currentFile.getName());\n cleanBreakpoints();\n endTest();\n }",
"public void continueDebugStep() {\n \tthis.continueDebug = true;\n }",
"public void testDebugNoModifications() throws Exception {\n startTest();\n openFile(\"debug.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debug.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n\n openFile(\"linebp.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebp.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n setLineBreakpoint(eo, \"if (action === \\\"build\\\") {\");\n setLineBreakpoint(eo, \"var d = new Date();\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debug.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n VariablesOperator vo = new VariablesOperator(\"Variables\");\n\n assertEquals(\"Unexpected file opened at breakpoint\", \"debug.html\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 14, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"1\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebp.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 4, currentFile.getLineNumber());\n assertEquals(\"Step variable is unexpected\", \"2\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n evt.waitNoEvent(500);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n assertEquals(\"Debugger stopped at wrong line\", 7, currentFile.getLineNumber());\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"3\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n assertEquals(\"Debugger stopped at wrong line\", 15, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"4\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepOverAction().performMenu();\n new StepOverAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n vo = new VariablesOperator(\"Variables\");\n assertEquals(\"Debugger stopped at wrong line\", 17, currentFile.getLineNumber());\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n assertEquals(\"Step variable is unexpected\", \"5\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n\n new StepIntoAction().performMenu();\n new StepIntoAction().performMenu();\n evt.waitNoEvent(1000);\n vo = new VariablesOperator(\"Variables\");\n evt.waitNoEvent(1000);\n waitForVariable(\"step\");\n if(GeneralHTMLProject.inEmbeddedBrowser){ // embedded browser stops on line with function(){\n assertEquals(\"Step variable is unexpected\", \"5\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value);\n }else{\n assertEquals(\"Step variable is unexpected\", \"6\", ((Map<String, Variable>) vo.getVariables()).get(\"step\").value); \n }\n\n endTest();\n }",
"private void initiateBreak(){\n\tDo(\"Starting to go on break\");\n\thost.msgChangeWorkStatus(this, false);\n\tworking = false;\n\tstateChanged();\n }",
"public void testDebugModifications() throws Exception {\n startTest();\n\n openFile(\"debugMod.html\", LineDebuggerTest.current_project);\n EditorOperator eo = new EditorOperator(\"debugMod.html\");\n setLineBreakpoint(eo, \"window.console.log(a);\");\n openFile(\"linebpMod.js\", LineDebuggerTest.current_project);\n eo = new EditorOperator(\"linebpMod.js\");\n setLineBreakpoint(eo, \"console.log(\\\"start\\\");\");\n eo.close();\n runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n EditorOperator currentFile = EditorWindowOperator.getEditor();\n currentFile.setCaretPositionToEndOfLine(3);\n currentFile.insert(\"\\nconsole.log(\\\"1js\\\");\\nconsole.log(\\\"2js\\\");\\nconsole.log(\\\"3js\\\");\");\n// if (LineDebuggerTest.inEmbeddedBrowser) { // workaround for 226022\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 7, currentFile.getLineNumber());\n currentFile.deleteLine(4);\n currentFile.deleteLine(4);\n\n// if (LineDebuggerTest.inEmbeddedBrowser) {\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 5, currentFile.getLineNumber());\n\n\n currentFile.setCaretPositionToEndOfLine(3);\n currentFile.insert(\"\\nconsole.log(\\\"1js\\\");\\nconsole.log(\\\"2js\\\");\\nconsole.log(\\\"3js\\\");\"); \n\n// if (LineDebuggerTest.inEmbeddedBrowser) {\n// (new EmbeddedBrowserOperator(\"Web Browser\")).close();\n// saveAndWait(currentFile, 1000);\n// runFile(LineDebuggerTest.current_project, \"debugMod.html\");\n// evt.waitNoEvent(GeneralHTMLProject.RUN_WAIT_TIMEOUT);\n// } else {\n saveAndWait(currentFile, 1500);\n\n new ContinueAction().performMenu();\n evt.waitNoEvent(1000);\n currentFile = EditorWindowOperator.getEditor();\n assertEquals(\"Unexpected file opened at breakpoint\", \"linebpMod.js\", currentFile.getName());\n assertEquals(\"Debugger stopped at wrong line\", 8, currentFile.getLineNumber());\n currentFile.close();\n\n endTest();\n }",
"private synchronized void update() {\r\n\t\tIAdaptable adaptable = DebugUITools.getDebugContext();\r\n\t\tfTarget = null;\r\n\t\tfGDBTarget = null;\r\n\t\tif (adaptable != null) {\r\n\t\t\tIDebugElement element = (IDebugElement) adaptable.getAdapter(IDebugElement.class);\r\n\t\t\tif (element != null) {\r\n\t\t\t\tif (element.getModelIdentifier().equals(MDTDebugCorePlugin.ID_MDT_DEBUG_MODEL)) {\r\n\t\t\t\t\tif (element.getDebugTarget() instanceof MDTDebugTarget)\r\n\t\t\t\t\t\tfTarget = (MDTDebugTarget) element.getDebugTarget();\r\n\t\t\t\t\telse if (element.getDebugTarget() instanceof GDBDebugTarget)\r\n\t\t\t\t\t\tfGDBTarget = (GDBDebugTarget) element.getDebugTarget();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (adaptable instanceof GDBStackFrame) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tGDBStackFrame gdbStackFrame = (GDBStackFrame)adaptable;\r\n\t\t\t\t\tGDBThread gdbThread = (GDBThread)gdbStackFrame.getThread();\r\n\t\t\t\t\tgdbThread.setCurrentGDBStackFrame(gdbStackFrame);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tMDTDebugCorePlugin.log(null, e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (fTarget != null) {\r\n\t\t\tObject input = null;\r\n\t\t\tif (fTarget.isSuspended()) {\r\n\t\t\t input = fTarget;\r\n\t\t\t}\r\n\t\t\tgetViewer().setInput(input);\r\n\t\t\tfPushAction.setDebugTarget(fTarget);\r\n\t\t\tgetViewer().refresh();\r\n\t\t} else if (fGDBTarget != null) {\r\n\t\t\tObject input = null;\r\n\t\t\tif (fGDBTarget.isSuspended()) {\r\n\t\t\t input = fGDBTarget;\r\n\t\t\t}\r\n\t\t\tgetViewer().setInput(input);\r\n\t\t\tfPushAction.setGDBDebugTarget(fGDBTarget);\r\n\t\t\tgetViewer().refresh();\r\n\t\t}\r\n }",
"public void setBreakStatus(boolean state){\n\tonBreak = state;\n\tstateChanged();\n }",
"public void activateBreakpointView() {\n \t\tif (!this.breakpointView.getActive()) {\n \t\t\tthis.breakpointView.getAddButton().addSelectionListener(this);\n \t\t\tthis.breakpointView.setActive(true);\n \t\t}\n \t}",
"boolean enableBreakpointAt(int at) throws NotConnectedException { return enableBreakpointAt(at, false, false); }",
"public void testOpenJavaProgramLaunchConfigurationDialog2() {\n // warm run..depends on testOpenJavaProgramLaunchConfigurationDialog1 for cold start\n ILaunchConfiguration config = getLaunchConfiguration(\"Breakpoints\");\n IStructuredSelection selection = new StructuredSelection(config);\n openLCD(selection, fgIdentifier);\n }",
"@Override\n public String getCommandPrefix()\n {\n return \"break\";\n }",
"public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}",
"public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {\n }",
"public boolean set () {\n final ToolsDebugger debugger = (ToolsDebugger) getDebugger ();\n if (debugger.synchronizer == null) return false;\n if (remoteClass != null)\n remove ();\n final String className = getClassName ();\n final int lineNumber = getLineNumber ();\n if ((className == null) || (className.length () < 1) ||\n (lineNumber < 0)) return false;\n try {\n return ((Boolean) new Protector (\"JavaDebugger.addBreakpoint\") { // NOI18N\n public Object protect () throws Exception {\n // in outerclass\n remoteClass = debugger.remoteDebugger.findClass (className);\n if (remoteClass == null) return new Boolean (false);\n remoteLineNumber = lineNumber;\n\n // PATCH for breakpoints in top-level package private classes, try to obtain Line\n CoreBreakpoint breakpoint = getBreakpoint ();\n if ((breakpoint.getLine () == null) && (!breakpoint.isHidden ())) {\n Line newLine = Utils.getLineForSource (className, remoteClass.getSourceFileName (), lineNumber);\n if (newLine != null)\n breakpoint.setLine (newLine);\n }\n // end of PATCH\n\n String s = remoteClass.setBreakpointLine (remoteLineNumber);\n if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n\n // in innerclasses\n String name = Utils.getClassName (className);\n FileObject mainFile = TopManager.getDefault().getRepository ().find (\n Utils.getPackageName (className),\n name,\n \"class\" // NOI18N\n );\n FileObject[] file = mainFile.getParent ().getChildren ();\n\n int i, k = file.length;\n for (i = 0; i < k; i++)\n if (file [i].getName ().startsWith (name) &&\n file [i].getExt ().equals (\"class\") // NOI18N\n ) {\n remoteClass = debugger.remoteDebugger.findClass (file [i].getPackageName ('.'));\n if (remoteClass == null) return new Boolean (false);\n s = remoteClass.setBreakpointLine (lineNumber);\n if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n }\n\n // if (s.trim ().equals (\"\")) return new Boolean (true); // NOI18N\n debugger.println (NbBundle.getBundle (ToolsDebugger.class).getString (\n \"CTL_Cannot_set_breakpoint\") + \": \" + s, // NOI18N\n ToolsDebugger.ERR_OUT\n );\n return new Boolean (false);\n }\n }.throwAndWait (debugger.synchronizer, debugger.killer)).booleanValue ();\n } catch (Exception e) {\n return false;\n }\n }",
"public ListConsole watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }",
"public void toggleDebugMode() {\r\n DEBUG = !DEBUG;\r\n }",
"void doDelete() throws IOException, AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// no args means delete all breakpoints, last chance...\n\t\t\t\tif (yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askDeleteAllBreakpoints\"))) //$NON-NLS-1$\n\t\t\t\t{\n\t\t\t\t\tint count = breakpointCount();\n\t\t\t\t\tfor(int i=count-1; i>-1; i--)\n\t\t\t\t\t\tremoveBreakpointAt(i);\n\n\t\t\t\t\tremoveAllWatchpoints();\n\t\t\t\t\tremoveAllCatchpoints();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = disableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoUnDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\t\tif(at > -1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tremoveBreakpointAt(at);\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\tat = watchpointIndexOf(id);\n\t\t\t\t\t\t\t\tif (at > -1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tremoveWatchpointAt(at);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tat = catchpointIndexOf(id);\n\t\t\t\t\t\t\t\t\tremoveCatchpointAt(at);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(IndexOutOfBoundsException iob)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( id > -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}",
"public void toggleDebug() {\n\t\tdebug = debug ? false : true;\n\t}",
"public void sendBreak() {\n\tsPort.sendBreak(1000);\n }",
"public void enableSmartImprovement() { this.exec = this.exec.withProperty(\"sm.improve\", true); }",
"@Property\n public native boolean isHandledWhileDebugging ();",
"public void testDebugging() throws Throwable {\n // Status bar tracer\n MainWindowOperator.StatusTextTracer stt = MainWindowOperator.getDefault().getStatusTextTracer();\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n JavaNode sampleClass1Node = new JavaNode(sourcePackagesNode, SAMPLE1_PACKAGE_NAME + \"|\" + SAMPLE1_FILE_NAME);\n // flag to stop debugger in finally\n boolean debuggerStarted = false;\n try {\n // find sample file in Editor\n EditorOperator eo = new EditorOperator(SAMPLE1_FILE_NAME);\n eo.setCaretPosition(\"public static void main\", true);\n final int insertLine = eo.getLineNumber() + 2;\n\n // if file not contains brpText from previous test cases, insert it\n String brpText = \"System.out.println(\\\"Hello\\\");\"; // NOI18N\n if (!eo.contains(brpText)) {\n eo.insert(brpText + \"\\n\", insertLine, 1);\n }\n eo.select(brpText);\n\n ToggleBreakpointAction toggleBreakpointAction = new ToggleBreakpointAction();\n try {\n // toggle breakpoint via Shift+F8\n toggleBreakpointAction.performShortcut(eo);\n waitBreakpoint(eo, insertLine);\n } catch (TimeoutExpiredException e) {\n // need to be realiable test => repeat action once more to be sure it is problem in IDE\n // this time use events instead of Robot\n MainWindowOperator.getDefault().pushKey(\n toggleBreakpointAction.getKeyStrokes()[0].getKeyCode(),\n toggleBreakpointAction.getKeyStrokes()[0].getModifiers());\n waitBreakpoint(eo, insertLine);\n }\n\n // if file not contains second brpText from previous test cases, insert it\n brpText = \"System.out.println(\\\"Good bye\\\");\"; // NOI18N\n if (!eo.contains(brpText)) {\n eo.insert(brpText + \"\\n\", insertLine + 1, 1);\n }\n eo.select(brpText);\n // toggle breakpoint via pop-up menu\n // clickForPopup(0, 0) used in the past sometimes caused that menu\n // was opened outside editor area because editor roll up after \n // text was selected\n toggleBreakpointAction.perform(eo.txtEditorPane());\n // wait second breakpoint established\n waitBreakpoint(eo, insertLine + 1);\n // start to track Main Window status bar\n stt.start();\n debuggerStarted = true;\n // start debugging\n new DebugJavaFileAction().performMenu(sampleClass1Node);\n // check the first breakpoint reached\n // wait status text \"Thread main stopped at SampleClass1.java:\"\n // increase timeout to 60 seconds\n MainWindowOperator.getDefault().getTimeouts().setTimeout(\"Waiter.WaitingTime\", 60000);\n String labelLine = Bundle.getString(\"org.netbeans.modules.debugger.jpda.ui.Bundle\",\n \"CTL_Thread_stopped\",\n new String[]{\"main\", SAMPLE1_FILE_NAME, null, String.valueOf(insertLine)}); // NOI18N\n stt.waitText(labelLine);\n // continue debugging\n new ContinueAction().perform();\n // check the second breakpoint reached\n // wait status text \"Thread main stopped at SampleClass1.java:\"\n String labelLine1 = Bundle.getString(\"org.netbeans.modules.debugger.jpda.ui.Bundle\",\n \"CTL_Thread_stopped\",\n new String[]{\"main\", SAMPLE1_FILE_NAME, null, String.valueOf(insertLine)}); // NOI18N\n stt.waitText(labelLine1);\n // check \"Hello\" was printed out in Output\n OutputTabOperator oto = new OutputTabOperator(\"debug-single\"); // NOI18N\n // wait until text Hello is not written in to the Output\n oto.waitText(\"Hello\"); // NOI18N\n } catch (Throwable th) {\n try {\n // capture screen before cleanup in finally clause is completed\n PNGEncoder.captureScreen(getWorkDir().getAbsolutePath() + File.separator + \"screenBeforeCleanup.png\");\n } catch (Exception e1) {\n // ignore it\n }\n th.printStackTrace(getLog());\n throw th;\n } finally {\n if (debuggerStarted) {\n // finish debugging\n new FinishDebuggerAction().perform();\n // check status line\n // \"SampleProject (debug-single)\"\n String outputTarget = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"TITLE_output_target\",\n new Object[]{SAMPLE_PROJECT_NAME, null, \"debug-single\"}); // NOI18N\n // \"Finished building SampleProject (debug-single)\"\n String finishedMessage = Bundle.getString(\n \"org.apache.tools.ant.module.run.Bundle\",\n \"FMT_finished_target_status\",\n new Object[]{outputTarget});\n stt.waitText(finishedMessage);\n }\n stt.stop();\n // delete sample class\n sampleClass1Node.delete();\n String confirmTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_SafeDel_Delete\"); // NOI18N\n String confirmButton = UIManager.getDefaults().get(\"OptionPane.okButtonText\").toString(); // NOI18N\n // \"Confirm Object Deletion\"\n new JButtonOperator(new NbDialogOperator(confirmTitle), confirmButton).push();\n }\n }",
"void doEnable() throws AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// enables all breakpoints\n\t\t\t\tint count = breakpointCount();\n\t\t\t\tint tally = 0;\n\t\t\t\tfor(int i=0; i<count; i++)\n\t\t\t\t\ttally += enableBreakpointAt(i) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t// mention that not all was good\n\t\t\t\tif (tally != count)\n\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notAllBreakpointsEnabled\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = enableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tboolean autoDelete = false;\n\t\t\t\tboolean autoDisable = false;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoEnableDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse if (cmd == CMD_DELETE)\n\t\t\t\t\t{\n\t\t\t\t\t\tautoDelete = true;\n\t\t\t\t\t\tid = nextIntToken(); // set and get next number token\n\t\t\t\t\t}\n\t\t\t\t\telse if (cmd == ENABLE_ONCE_CMD)\n\t\t\t\t\t{\n\t\t\t\t\t\tautoDisable = true;\n\t\t\t\t\t\tid = nextIntToken(); // set and get next number token\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tboolean worked = true;\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\tworked = enableBreakpointAt(at, autoDisable, autoDelete);\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( worked && id > -1 );\n\n\t\t\t\t\tif (!worked)\n\t\t\t\t\t{\n\t\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"breakpointLocationNoLongerExists\", args)); //$NON-NLS-1$\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"static void debug(boolean b) {\n ProcessRunnerImpl.setGlobalDebug(b);\n }",
"public static void normalDebug(){\n enableVerbos = false;\n }",
"public static void enableDebugging(){\n DEBUG = true;\n }",
"@Override\n public void breakpointReached(JPDABreakpointEvent event) {\n if (!isFiltered) {\n boolean removed = allBreakpoints.remove(breakpoint);\n if (ok == null && removed) {\n ok = Boolean.TRUE;\n message = \"O.K.\";\n } else {\n if (ok != null) {\n message += \"Hit again at \"+event.getReferenceType()+\" \";\n ok = Boolean.FALSE;\n } else if (!removed) {\n message += \"BP not in list. \";\n ok = Boolean.FALSE;\n }\n }\n } else { // Filtered, expected to hit twice (in APP_CLASS_NAME and APP2_CLASS_NAME)\n //System.err.println(\"breakpointReached(\"+event+\", isFiltered = \"+isFiltered+\"), referenceType = \"+event.getReferenceType());\n String className = event.getReferenceType().name();//event.getThread().getClassName();\n boolean removed = toBeHitIn.remove(className);\n if (ok == null && removed && toBeHitIn.isEmpty()) {\n allBreakpoints.remove(breakpoint);\n ok = Boolean.TRUE;\n message = \"O.K.\";\n } else {\n if (!removed) {\n message += \"Hit again at \"+className+\" \";\n ok = Boolean.FALSE;\n }\n }\n }\n event.resume();\n }",
"public void breaker() \r\n\t{\n\t\t\r\n\t}",
"void doCondition() throws IOException\n\t{\n\t\ttry\n\t\t{\n\t\t\t// must have a breakpoint number\n\t\t\tint id = nextIntToken();\n\n\t\t\t// get the breakpoint\n\t\t\tint at = breakpointIndexOf(id);\n\t\t\tBreakAction a = breakpointAt(at);\n\n\t\t\t// no more parms means to clear it\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\t// now just pull the commands as they come while not end\n\t\t\t\tString line = restOfLine();\n\n\t\t\t\t// build an expression and attach it to the breakpoint\n\t\t\t\tValueExp exp = parseExpression(line);\n\n\t\t\t\t// warn about the assignment!\n\t\t\t\tif ( exp.containsAssignment() && !yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askExpressionContainsAssignment\")) ) //$NON-NLS-1$\n\t\t\t\t\tthrow new IllegalAccessException(\"=\"); //$NON-NLS-1$\n\n\t\t\t\ta.setCondition(exp, line);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ta.clearCondition(); // clear it\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"breakpointNowUnconditional\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\tcatch(IllegalAccessException iae)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"breakpointNotChanged\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"public EnableEmuBreakpointActionItem planEnableEmu(TraceBreakpoint bpt) {\n\t\tEnableEmuBreakpointActionItem action = new EnableEmuBreakpointActionItem(bpt);\n\t\tadd(action);\n\t\treturn action;\n\t}",
"void reapplyBreakpoints()\n\t{\n\t\t// give us a bit of time to process the newly loaded swf\n\t\tif (propertyGet(METADATA_ATTEMPTS) > 0)\n\t\t\ttry { waitForMetaData(80); } catch(InProgressException ipe) { }\n\n\t\tint count = breakpointCount();\n\t\tfor(int i=0; i<count; i++)\n\t\t{\n\t\t\tBreakAction a = breakpointAt(i);\n\t\t\ta.clearHits();\n\t\t\ta.setStatus(BreakAction.UNRESOLVED);\n\t\t}\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tresolveBreakpoints(sb);\n\t\tout(sb.toString());\n\t}",
"static void debug() {\n ProcessRunnerImpl.setGlobalDebug(true);\n }",
"public void setDebugging(boolean on)\n\t{\n\t\t_options.setDebugging(on);\n\t}",
"public void markRunStart(){\r\n runStart = stepCount;\r\n }",
"public void testOpenJavaProgramLaunchConfigurationDialog1() {\n // cold run\n ILaunchConfiguration config = getLaunchConfiguration(\"Breakpoints\");\n IStructuredSelection selection = new StructuredSelection(config);\n for (int i = 0; i < 100; i++) {\n openLCD(selection, fgIdentifier);\n }\n commitMeasurements();\n assertPerformance();\n }",
"public BreakpointView getBreakpointView() {\n \t\treturn this.breakpointView;\n \t}",
"@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO step in using debugger\r\n\t\t\t\t\tSystem.out.println(\"Step in button pressed\");\r\n\t\t\t\t}",
"void debug() {\n this.renderer.debug = !this.renderer.debug;\n reload();\n }",
"int breakpointIndexOf(int fileId, int line)\t\t\t{ return breakpointIndexOf(fileId, line, 0, true); }",
"private StartDebuggingButton() {\r\n\t\t\tsetToolTipText(\"Start debugging the currently open tab\");\r\n\t\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\t\t\ttry {\r\n\t\t\t\tsetIcon(new ImageIcon(ImageIO.read(ClassLoader.getSystemResource(\"images/debug.png\")).getScaledInstance(FlowClient.BUTTON_ICON_SIZE, FlowClient.BUTTON_ICON_SIZE, Image.SCALE_SMOOTH)));\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\taddActionListener(new ActionListener() {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Gets the currently active code and starts the debugging process\r\n\t\t\t\t */\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO Do some stuff to start debugging\r\n\t\t\t\t\tSystem.out.println(\"Debug button pressed!\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}",
"void startTracking();",
"boolean hasCustomBreak();",
"public void _Tabstop() {\n testProperty(\"Tabstop\", new PropertyTester() {\n protected Object getNewValue(String prop, Object old) {\n return utils.isVoid(old) ? new Boolean(true) : null ;\n }\n }) ;\n }",
"private void takeABreak(){\n mIsBreak = false;\n mLytBreakLayout.setVisibility(View.VISIBLE);\n startTimer(_str_break);\n }",
"public void debug()\r\n {\n \t\treload();\r\n }",
"public void setJumping(boolean jumping) { isJumping = jumping; }",
"public void setDebug(boolean b) { debug = b; }",
"public void switchToDebug() {\r\n\t\tdebugPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"debugPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"public void doublejump(){\r\n\t\t//jump a second time.\r\n\t}",
"public void markBench (String info) {\r\n\t\tif (Properties.interactDebug)\r\n\t\t\tif (bench != null)\r\n\t\t\t\tbench.mark(info);\r\n\t}",
"void doDisable() throws AmbiguousException, NotConnectedException\n\t{\n\t\twaitTilHalted();\n\n\t\ttry\n\t\t{\n\t\t\tif (!hasMoreTokens())\n\t\t\t{\n\t\t\t\t// disables all breakpoints,\n\t\t\t\tint count = breakpointCount();\n\t\t\t\tfor(int i=0; i<count; i++)\n\t\t\t\t\tdisableBreakpointAt(i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// optionally specify 'display' or 'breakpoint'\n\t\t\t\tString arg = nextToken();\n\t\t\t\tint cmd = disableCommandFor(arg);\n\t\t\t\tint id = -1;\n\t\t\t\tif (cmd == CMD_DISPLAY)\n\t\t\t\t\tdoDisableDisplay();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (cmd == CMD_BREAK)\n\t\t\t\t\t\tid = nextIntToken(); // ignore and get next number token\n\t\t\t\t\telse\n\t\t\t\t\t\tid = Integer.parseInt(arg);\n\n\t\t\t\t\tdo\n\t\t\t\t\t{\n\t\t\t\t\t\tint at = breakpointIndexOf(id);\n\t\t\t\t\t\tdisableBreakpointAt(at);\n\n\t\t\t\t\t\tif (hasMoreTokens())\n\t\t\t\t\t\t\tid = nextIntToken();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tid = -1;\n\n\t\t\t\t\t\t// keep going till we're blue in the face; also note that we cache'd a copy of locations\n\t\t\t\t\t\t// so that breakpoint numbers are consistent.\n\t\t\t\t\t}\n\t\t\t\t\twhile( id > -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"@Override\n\tpublic boolean isDebugEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"private void debugInConsole() {\n String command = \"\";\n do {\n try {\n command = getCommandWithPrompt();\n doDebugCommand(command);\n } catch (Error e) {\n println(e.getMessage());\n }\n } while (!command.equals(\"exit\"));\n }",
"void sitOn();",
"public void enableDebug() {\n this.debug = true;\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.seekTo(mBreakPos);\r\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\r\n\t\t\t\t\t}",
"public static void possiblyWaitForDatabaseServiceDebugger() {\n if ( false ) {\n android.os.Debug.waitForDebugger();\n int len = new String(\"for setting breakpoint\").length();\n }\n }",
"public void debug() {\n\n }",
"void propagateBreakpoints() throws NotConnectedException\n {\n\t\t// get the newly added swf, which lands at the end list\n\t\tSwfInfo[] swfs = m_fileInfo.getSwfs();\n\t\tSwfInfo swf = (swfs.length > 1) ? swfs[swfs.length-1] : null;\n\n\t\t// now walk through all breakpoints propagating the \n\t\t// the break for each source and line number we\n\t\t// find in the new swf\n\t\tint size = m_breakpoints.size();\n\t\tfor (int i = 0; (swf != null) && i < size; i++)\n\t\t{\n\t\t\t// dont do this for single swf breakpoints\n\t\t\tBreakAction bp = breakpointAt(i);\n\t\t\tif (bp.isSingleSwf())\n\t\t\t\tcontinue;\n\t\t\tif (bp.getStatus() != BreakAction.RESOLVED)\n\t\t\t\tcontinue;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tLocation l = bp.getLocation();\n\t\t\t\tint line = l.getLine();\n\t\t\t\tSourceFile f = l.getFile();\n\t\t\t\tLocation newLoc = findAndEnableBreak(swf, f, line);\n\t\t\t\tif (newLoc != null)\n\t\t\t\t\tbp.addLocation(newLoc);\n\t\t\t}\n\t\t\tcatch(InProgressException ipe)\n\t\t\t{\n\t\t\t\tif (breakpointCount() > 0)\n\t\t\t\t{\n\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\targs.put(\"breakpointNumber\", Integer.toString(bp.getId())); //$NON-NLS-1$\n\t\t\t\t\tout(getLocalizationManager().getLocalizedTextString(\"breakpointNotPropagated\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }",
"boolean processBreak(boolean postStep, StringBuilder sb) throws NotConnectedException\n\t{\n\t\tLocation l = getCurrentLocation();\n\t\tif (l == null || l.getFile() == null)\n\t\t\treturn false;\n\n\t\tint fileId = l.getFile().getId();\n\t\tint line = l.getLine();\n\t\tboolean isSilent = false;\n\t\tboolean bpHit = false;\n\t\tboolean stoppedDueToBp = false;\n\n\t\tint count = breakpointCount();\n\t\tboolean[] markedForRemoval = new boolean[count];\n\t\tboolean previousResume = m_requestResume;\n\t\tfor(int i=0; i<count; i++)\n\t\t{\n\t\t\tBreakAction a = breakpointAt(i);\n\t\t\tif (a.locationMatches(fileId, line))\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Note that it appears that we stopped due to hitting a hard breakpoint\n\t\t\t\t * Now if the breakpoint is conditional it may eval to false, meaning we\n\t\t\t\t * won't stop here, otherwise we will process the breakpoint.\n\t\t\t\t */\n\t\t\t\tstoppedDueToBp = (m_session.suspendReason() == SuspendReason.Breakpoint);\n\t\t\t\tif (shouldBreak(a, fileId, line))\n\t\t\t\t{\n\t\t\t\t\t// its a hit\n\t\t\t\t\tbpHit = true;\n\t\t\t\t\ta.hit();\n\t\t\t\t\tisSilent = (isSilent) ? true : a.isSilent();\n\n\t\t\t\t\t// autodelete, autodisable\n\t\t\t\t\tif (a.isAutoDisable())\n\t\t\t\t\t\tdisableBreakpointAt(i);\n\n\t\t\t\t\tif (a.isAutoDelete())\n\t\t\t\t\t\tmarkedForRemoval[i] = true;\n\n\t\t\t\t\t// now issue any commands that are attached to the breakpoint\n\t\t\t\t\tint n = a.getCommandCount();\n\t\t\t\t\tfor(int j=0 ;j<n; j++)\n\t\t\t\t\t\tissueCommand(a.commandAt(j), sb);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// kill them backwards so our i is acurate\n\t\tfor(int i=markedForRemoval.length-1; i>-1; i--)\n\t\t\tif (markedForRemoval[i])\n\t\t\t\tremoveBreakpointAt(i);\n\n\t\t/**\n\t\t * Now we should request to resume only if it was due to\n\t\t * breakpoints that were hit.\n\t\t *\n\t\t * For the first case, we hit a conditional breakpoint that\n\t\t * eval'd to false, resulting in bpHit == false. Thus we\n\t\t * want to resume and additionally if we were stepping, we'd\n\t\t * like to do so 'softly' that is without loosing the stepping\n\t\t * information on the Player.\n\t\t *\n\t\t * For the 2nd case, we hit a breakpoint and we executed\n\t\t * commands that resulted in a m_requestResume.\n\t\t */\n\t\tif (stoppedDueToBp && !bpHit)\n\t\t{\n\t\t\tm_requestResume = true;\n\t\t\tm_stepResume = postStep; // resume without losing our stepping\n\t\t\tisSilent = true;\t\t\t// do so quietly\n\t\t}\n\t\telse if (stoppedDueToBp && bpHit && m_requestResume && !previousResume)\n\t\t{\n\t\t\tm_requestResume = true;\n\t\t\tm_stepResume = postStep; // resume as we would\n\t\t processDisplay(sb);\n\t\t}\n\n\t\t// If we aren't continuing, then show display variables\n\t\tif (!m_requestResume)\n\t\t\tprocessDisplay(sb);\n\n//\t\tSystem.out.println(\"processBreak stopDueToBp=\"+stoppedDueToBp+\",bpHit=\"+bpHit+\",postStep=\"+postStep+\",reason=\"+suspendReason());\n\n\t\treturn isSilent;\n\t}",
"private void Perform_BREAK() throws RuntimeException\n {\n throw new RuntimeException(Constants.Error(Constants.BREAK_MODE));\n }",
"public void startExecuting()\n {\n super.startExecuting();\n this.breakingTime = 0;\n }",
"public void startWatching(){\n this.listWatcher.start();\n }",
"public X10ToggleBreakpointsHandler() {\r\n final IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(HANDLER_EXTENSION_POINT_ID);\r\n if (extensionPoint != null) {\r\n for (final IConfigurationElement configElement : extensionPoint.getConfigurationElements()) {\r\n try {\r\n final String backEndType = configElement.getAttribute(BACKEND_TYPE_ATTR);\r\n if (CPP_BACKEND.equals(backEndType)) {\r\n this.fCPPNatureHandler = (IToggleBreakpointsHandler) configElement.createExecutableExtension(CLASS_ATTR);\r\n } else if (JAVA_BACKEND.equals(backEndType)) {\r\n this.fJavaNatureHandler = (IToggleBreakpointsHandler) configElement.createExecutableExtension(CLASS_ATTR);\r\n }\r\n } catch (CoreException except) {\r\n LaunchCore.log(except.getStatus());\r\n }\r\n }\r\n }\r\n }",
"@Override\n public void run() {\n setPointActions(host.getUnlockedStages());\n }",
"private static void OnQueryStatusEnterBreak(Object sender, CanExecuteRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n args.ContinueRouting = true; \r\n return;\r\n }\r\n\r\n if (This.Selection.IsTableCellRange || !This.AcceptsReturn) \r\n {\r\n args.ContinueRouting = true; \r\n return; \r\n }\r\n\r\n args.CanExecute = true;\r\n }",
"@Override\n\tpublic void swim() {\n\t\tSystem.out.println(\"Pawan started swimming\");\n\t}",
"public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}",
"private void startDebugControlThread() {\n String dbgCtrlFile = System.getProperty(\"DEBUG_CONTROL\");\n dbgCtrlThread = new DebugControlThread(this, dbgCtrlFile, 1000);\n executorService.submit(dbgCtrlThread);\n }",
"public void performRequestCurrentDump()\n {\n super.performRequestCurrentDump();\n switchScreen();\n }",
"void doCommands() throws IOException\n\t{\n\t\ttry\n\t\t{\n\t\t\tint id = -1;\n\t\t\tif (hasMoreTokens())\n\t\t\t\tid = nextIntToken();\n\t\t\telse\n\t\t\t\tid = propertyGet(BPNUM);\n\n\t\t\t// get the breakpoint\n\t\t\tint at = breakpointIndexOf(id);\n\t\t\tBreakAction a = breakpointAt(at);\n\n\t\t\t// ready it\n\t\t\ta.clearCommands();\n\t\t\ta.setSilent(false);\n\n\t\t\t// now just pull the commands as they come while not end\n\t\t\tString line = null;\n\t\t\tboolean first = true;\n\t\t\tboolean isEnd = false;\n\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\tout(getLocalizationManager().getLocalizedTextString(\"typeCommandsForBreakpoint\", args)); //$NON-NLS-1$\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\tdisplayCommandPrompt();\n\t\t\t\tline = readLine().trim();\n\t\t\t isEnd = line.equalsIgnoreCase(\"end\"); //$NON-NLS-1$\n\n\t\t\t\tif (!isEnd)\n\t\t\t\t{\n\t\t\t\t\tif (first && line.equalsIgnoreCase(\"silent\")) //$NON-NLS-1$\n\t\t\t\t\t\ta.setSilent(true);\n\t\t\t\t\telse\n\t\t\t\t\t\ta.addCommand(line);\n\t\t\t\t}\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t\twhile(!isEnd);\n\t\t}\n\t\tcatch(IndexOutOfBoundsException iob)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"breakpointNumber\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badBreakpointNumber\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandFailed\")); //$NON-NLS-1$\n\t\t}\n\t}",
"protected void execute() {\n \tRobot.debug.Update(Robot.lift.DebugMotionMagic());\n }",
"@Override\n\tpublic boolean isNotBreak() {\n\t\treturn false;\n\t}",
"public boolean isDebug();",
"private void step()\n\t\t{\n\t\tif(currentAlgo!=null && !isRunning())\n\t\t\t{\n\t\t\tthread=new SteppingThread();\n\t\t\tbStartStop.setText(\"Stepping\");\n\t\t\tthread.toStop=true;\n\t\t\tcurrentAlgo.setStopping(false);\n\t\t\tthread.start();\n//\t\t\tcurrentAlgo.setStopping(false);\n//\t\t\tcurrentAlgo.run(this);\n\t\t\t}\n\t\t}",
"protected void brkt() {\n println(breakPoints.toString());\n }",
"public interface ICDIBreakpoint extends ICDIObject {\n\t/** @deprecated use ICBreakpointTyped.REGULAR */\n\tfinal static public int REGULAR = ICBreakpointType.REGULAR;\n\t/** @deprecated use ICBreakpointTyped.TEMPORARY */\n\tfinal static public int TEMPORARY = ICBreakpointType.TEMPORARY;\n\t/** @deprecated use ICBreakpointTyped.HARDWARE */\n\tfinal static public int HARDWARE = ICBreakpointType.HARDWARE;\n\t\n\t/**\n\t * @return whether this breakpoint is temporary\n\t * @deprecated by {@link ICDIBreakpoint2#getType()} \n\t */\n\tboolean isTemporary();\n\t\n\t/**\n\t * @return whether this breakpoint is hardware-assisted\n\t * @deprecated by {@link ICDIBreakpoint2#getType()} \n\t */\n\tboolean isHardware();\n\n\t/**\n\t * Returns whether this breakpoint is enabled.\n\t * \n\t * @return whether this breakpoint is enabled\n\t * @throws CDIException if this method fails. Reasons include:\n\t */\n\tboolean isEnabled() throws CDIException;\n\t\n\t/**\n\t * Sets the enabled state of this breakpoint. This has no effect \n\t * if the current enabled state is the same as specified by \n\t * the enabled parameter.\n\t * \n\t * @param enabled - whether this breakpoint should be enabled \n\t * @throws CDIException if this method fails. Reasons include:\n\t */\n\tvoid setEnabled(boolean enabled) throws CDIException;\n\t\n\t/**\n\t * Returns the condition of this breakpoint or <code>null</code>\n\t * if the breakpoint's condition is not set.\n\t * \n\t * @return the condition of this breakpoint\n\t * @throws CDIException if this method fails. Reasons include:\n\t */\n\tICDICondition getCondition() throws CDIException;\n\t\n\t/**\n\t * Sets the condition of this breakpoint.\n\t * \n\t * @param the condition to set\n\t * @throws CDIException if this method fails. Reasons include:\n\t */\n\tvoid setCondition(ICDICondition condition) throws CDIException;\n\t\n}",
"private void jump(){\n getField().pandaJumped(this);\n }",
"void notifySpyModeToggle();",
"protected boolean canTriggerWalking() {\n/* 140 */ return false;\n/* */ }",
"public void toggleStopMark(final Object entry) {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (entry == null || entry == DownloadWatchDog.this.currentstopMark || entry == STOPMARK.NONE) {\r\n /* no stopmark OR toggle current set stopmark */\r\n DownloadWatchDog.this.setStopMark(STOPMARK.NONE);\r\n } else {\r\n /* set new stopmark */\r\n DownloadWatchDog.this.setStopMark(entry);\r\n DownloadsTableModel.getInstance().setStopSignColumnVisible(true);\r\n }\r\n }\r\n }, true);\r\n }",
"public void startDevMode(int i)\n\t{\n\t\tString filename = \"Song-keys/eyeofthetiger.txt\";\n\n\t\ttry {\n\n\t\t\tbw = new PrintWriter(new FileWriter(filename, true));\n\t\t\twhile(k <= i)\n\t\t\t{\n\t\t\t\tif(keyTime[k] != 0)\n\t\t\t\t{\n\t\t\t\t\tbw.println(side[k]);\n\t\t\t\t\tbw.println(keyTime[k]+-190);\n\t\t\t\t\tSystem.out.println(side[k] + \"\\nhi\" + keyTime[k]+-190 + \"\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbw.close();\n\n\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setWorking(boolean working) {}",
"public void switchOn();",
"public ListBuild watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }",
"@Override\n\tpublic void setEnabled(boolean enabled) throws CoreException {\n\t\tsuper.setEnabled(enabled);\n\t\tDebugManager dManager = DebugManager.getDefault();\n\t\tif (dManager.isRunning()) {\n\t\t\tIResource resource = getMarker().getResource();\n\t\t\t// KJH 20110315 s, 현재 디버깅중인 프로젝트와 다를 경우 breakpoint를 전송하지 않음\n\t\t\tIProject project = resource.getProject();\n\t\t\tif (project != null && project.equals(dManager.getCurProject())) {\n\t\t\t\tString file = resource.getFullPath().removeFirstSegments(1).toString();\n\t\t\t\tif (enabled) {\n\t\t\t\t\tdManager.registry(null, file, getInfo().getFullPath(), getLineNumber());\n\t\t\t\t} else {\n\t\t\t\t\tdManager.remove(null, file, getInfo().getFullPath(), getLineNumber());\n\t\t\t\t}\n\t\t\t}\n\t\t\t// KJH 20110315 e, 현재 디버깅중인 프로젝트와 다를 경우 breakpoint를 전송하지 않음\n\t\t}\n\t\t// KJH 20110302 e, breakpoint enable/disable\n\t}"
] | [
"0.6393164",
"0.61881274",
"0.60498434",
"0.6004676",
"0.60037696",
"0.60005635",
"0.5974698",
"0.5948547",
"0.5926701",
"0.5893888",
"0.58596385",
"0.5824956",
"0.58114016",
"0.57724166",
"0.5709336",
"0.5698146",
"0.5682995",
"0.56127065",
"0.55681884",
"0.5535616",
"0.55257195",
"0.55047834",
"0.5486212",
"0.5472749",
"0.54655164",
"0.5456667",
"0.54282486",
"0.54182315",
"0.54139966",
"0.53883594",
"0.5382901",
"0.5382502",
"0.53658104",
"0.53383255",
"0.53379184",
"0.5335781",
"0.5328888",
"0.5322353",
"0.53153175",
"0.5302708",
"0.5294246",
"0.5288969",
"0.5280205",
"0.52778333",
"0.5237977",
"0.52018917",
"0.5187499",
"0.51848936",
"0.51642907",
"0.513573",
"0.51208866",
"0.5116374",
"0.5114475",
"0.5112933",
"0.510325",
"0.50954485",
"0.5089929",
"0.50774986",
"0.505981",
"0.50551486",
"0.505502",
"0.50505424",
"0.50354767",
"0.5035065",
"0.503073",
"0.5023605",
"0.5016097",
"0.50131977",
"0.50124836",
"0.5011123",
"0.5006575",
"0.50020564",
"0.49989116",
"0.49920738",
"0.4991625",
"0.49905056",
"0.4989386",
"0.498363",
"0.498343",
"0.49823064",
"0.4977506",
"0.4977054",
"0.49710122",
"0.4955454",
"0.4951948",
"0.49510586",
"0.49450663",
"0.49436915",
"0.49378568",
"0.49344227",
"0.49325785",
"0.49316546",
"0.4931134",
"0.49308732",
"0.4925094",
"0.49229386",
"0.49133268",
"0.48948082",
"0.4894179",
"0.4893267"
] | 0.59171736 | 9 |
Starting with a root class, get the entire tree of mapped objects including collections and references. Cycles are correctly handled. | public static Collection<String> getMappedTree(String rootClass, Collection<DescriptorRepository> descriptorRepositories) {
final Set<String> processed = new HashSet<String>();
getMappedTree(rootClass, descriptorRepositories, processed);
return processed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MappingRoot getRoot() { return _root; }",
"public ResultMap<BaseNode> listChildren();",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"public Iterator<String> listRootClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listHierarchyRootClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\t\t\r\n\t}",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"@SuppressWarnings(\"deprecation\")\n\tpublic static ClassNode createRootNode(Ontology o,\n\t\t\tMappingDefinition mapping, Map<String, ClassNode> nameVsNode) {\n\t\tif (null == o || null == nameVsNode || null == mapping)\n\t\t\tthrow new NullPointerException(\n\t\t\t\t\t\"mapping, nameVsNode or ontology-o is null.\");\n\t\tClassNode root = new ClassNode(o);\n\t\tIterator<OClass> itops = o.getOClasses(true).iterator();\n\t\tVector<ClassNode> kids = new Vector<ClassNode>();\n\t\twhile (itops.hasNext()) {\n\t\t\tClassNode node = new ClassNode(itops.next());\n\t\t\tnameVsNode.put(node.toString(), node);\n\t\t\tkids.add(node);\n\t\t} // while\n\n\t\troot.source = o;\n\t\troot.setChildren(kids);\n\t\tVector<ClassNode> parents = kids;\n\t\tVector<ClassNode> allKids;\n\t\tdo {\n\t\t\tallKids = new Vector<ClassNode>();\n\t\t\tfor (int i = 0; i < parents.size(); i++) {\n\t\t\t\tClassNode parent = parents.get(i);\n\n\t\t\t\tOClass ocl = (OClass) parent.getSource();\n\t\t\t\tif (0 == ocl.getSubClasses(OConstants.Closure.DIRECT_CLOSURE)\n\t\t\t\t\t\t.size()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} // if 0 children\n\n\t\t\t\tIterator<OClass> kidsi = ocl.getSubClasses(\n\t\t\t\t\t\tOConstants.Closure.DIRECT_CLOSURE).iterator();\n\n\t\t\t\tkids = new Vector<ClassNode>();\n\t\t\t\twhile (kidsi.hasNext()) {\n\t\t\t\t\tClassNode cn = new ClassNode(kidsi.next());\n\t\t\t\t\tkids.add(cn);\n\t\t\t\t\tnameVsNode.put(cn.toString(), cn);\n\t\t\t\t} // while kidsi\n\t\t\t\tparent.setChildren(kids);\n\t\t\t\tallKids.addAll(kids);\n\n\t\t\t} // for i\n\t\t\tparents = allKids;\n\t\t} while (0 < allKids.size());\n\n\t\t// display mapping\n\t\tIterator<MappingNode> inodes = mapping.iterator();\n\t\tMappingNode mn;\n\t\twhile (inodes.hasNext()) {\n\t\t\tmn = inodes.next();\n\t\t\tURL turl = null;\n\t\t\ttry {\n\t\t\t\tturl = new URL(mn.getOntologyID());\n\t\t\t} catch (java.net.MalformedURLException x) {\n\t\t\t}\n\t\t\tif (null != turl) {\n\t\t\t\tOntology o2 = null;\n\t\t\t\ttry {\n\t\t\t\t\to2 = gate.creole.ontology.OntologyUtilities.getOntology(turl);\n\t\t\t\t} catch (gate.creole.ResourceInstantiationException x) {\n\t\t\t\t}\n\t\t\t\tif (o2 != null && o2.equals(o)) {\n\t\t\t\t\tClassNode cmn = new ClassNode(mn);\n\t\t\t\t\tClassNode cn = nameVsNode.get(mn.getClassID());\n\t\t\t\t\tif (null != cn) {\n\t\t\t\t\t\tcn.children.add(cn.children.size(), cmn);\n\t\t\t\t\t}\n\t\t\t\t}// if from the same ontology\n\t\t\t} // turl != null\n\t\t}// while inodes\n\n\t\treturn root;\n\t}",
"public ResultMap<BaseNode> listChildren(Pagination pagination);",
"public DocumentRootImpl getRootObject(MappingType mapping) {\t\n\t\tDocumentRootImpl rootObject = createInitialModel();\n\t\trootObject.setMapping(mapping);\n\t\treturn rootObject;\n\t}",
"@Override\n public Object root() {\n return root;\n }",
"@Override\n public Object root() {\n return root;\n }",
"public Object getRoot(){\r\n\t\treturn _root;\r\n\t}",
"ILitePackCollection getRoot();",
"public static KDNode[] RootBuff() {\n\n\t\t int offset = 0;\n\t\t KDNode[] buff = new KDNode[root_map.size()];\n\t\t for(KDNode k : root_map) {\n\t\t\t buff[offset++] = k;\n\t\t }\n\t\t \n\t\t return buff;\n\t}",
"protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }",
"public void buildClassTree() {\n\t\twriter.writeClassTree();\n\t}",
"public final Map<String, DodlesActor> getAllDescendants(DodlesActor root) {\n HashMap<String, DodlesActor> result = new HashMap<String, DodlesActor>();\n getAllDescendants(root, result);\n return result;\n }",
"NodeSet<F> getRoots(OWLClassExpression c, P p, R start, boolean direct);",
"@Override\n\tpublic Collection<Tkfl> getTkflRoot() {\n\t\tString sql = \"select ID_,PARENT_ID,TKMC,MS from tkfl where parent_id = 0 order by id_ desc\";\n\t\tList<Tkfl> list = this.jdbcTemplate.query(sql, new RowMapper<Tkfl>() {\n\n\t\t\t@Override\n\t\t\tpublic Tkfl mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\treturn tkfl;\n\t\t\t}\n\n\t\t});\n\t\treturn list;\n\t}",
"private DocumentRootImpl createInitialModel() {\n\t\tEClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(mappingPackage);\n\t\tEStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(ROOT_ELEMENT);\n\t\tEObject rootObject = mappingFactory.create(eClass);\n\t\trootObject.eSet(eStructuralFeature, EcoreUtil.create((EClass)eStructuralFeature.getEType()));\n\t\treturn ((DocumentRootImpl)rootObject);\n\t}",
"private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}",
"private Set<Class<?>> describeClassTree(Class<?> inputClass) {\r\n if (inputClass == null) {\r\n return Collections.emptySet();\r\n }\r\n\r\n // create result collector\r\n Set<Class<?>> classes = Sets.newLinkedHashSet();\r\n\r\n // describe tree\r\n describeClassTree(inputClass, classes);\r\n\r\n return classes;\r\n }",
"public BSTMap() {\n root = null;\n size = 0;\n }",
"private void getAllDescendants(DodlesActor root, HashMap<String, DodlesActor> result) {\n result.put(root.getName(), root);\n\n if (root instanceof BaseDodlesViewGroup) {\n BaseDodlesViewGroup group = (BaseDodlesViewGroup) root;\n\n for (Actor child : (SnapshotArray<Actor>) group.getChildren()) {\n getAllDescendants((DodlesActor) child, result);\n }\n }\n }",
"public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }",
"public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}",
"Collection<Tree<V, E>> getTrees();",
"private Set getRootSet(Class paramClass, NodeImpl paramNodeImpl, Graph paramGraph) {\n/* 198 */ Set set = null;\n/* */ \n/* 200 */ if (paramClass.isInterface()) {\n/* 201 */ paramGraph.add(paramNodeImpl);\n/* 202 */ set = paramGraph.getRoots();\n/* */ } else {\n/* */ \n/* 205 */ Class clazz = paramClass;\n/* 206 */ HashSet<NodeImpl> hashSet = new HashSet();\n/* 207 */ while (clazz != null && !clazz.equals(Object.class)) {\n/* 208 */ NodeImpl nodeImpl = new NodeImpl(clazz);\n/* 209 */ paramGraph.add(nodeImpl);\n/* 210 */ hashSet.add(nodeImpl);\n/* 211 */ clazz = clazz.getSuperclass();\n/* */ } \n/* */ \n/* */ \n/* 215 */ paramGraph.getRoots();\n/* */ \n/* */ \n/* 218 */ paramGraph.removeAll(hashSet);\n/* 219 */ set = paramGraph.getRoots();\n/* */ } \n/* */ \n/* 222 */ return set;\n/* */ }",
"@SuppressWarnings(\"ReferenceEquality\") // cannot use equals() for check whether tree is the same\n private PersistentSortedMap<K, V> mapFromTree(@Var @Nullable Node<K, V> newRoot) {\n if (newRoot == root) {\n return this;\n } else if (newRoot == null) {\n return of();\n } else {\n // Root is always black.\n newRoot = newRoot.withColor(Node.BLACK);\n return new PathCopyingPersistentTreeMap<>(newRoot);\n }\n }",
"public NestedObjects getNestedObjects(Class<?> aClass) {\n\t\treturn new NestedObjects(aClass);\n\t}",
"public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }",
"public IMapping getClassMapping(String name) {\n\n // check for class mapping defined at this level\n IMapping def = getMappingAtLevel(name);\n if (def == null && m_context != null) {\n\n // try finding definition at higher level\n def = m_context.getClassMapping(name);\n \n }\n return def;\n }",
"protected abstract void traverse();",
"IClassDefinition[] resolveAncestry(ICompilerProject project);",
"public abstract AbstractObjectIterator<LocalAbstractObject> getAllObjects();",
"protected void readOntology() {\r\n\t\ttry \r\n\t\t{\r\n\t\t\troot.removeAllChildren();\r\n\t\t\tIterator<String> rc = ob.listRootClasses();\r\n\t\t\twhile(rc.hasNext())\r\n\t\t\t{\r\n\t\t\t\tDefaultMutableTreeNode node = createNode(rc.next(), ob, 0);\r\n\t\t\t\troot.add(node);\r\n\t\t\t}\r\n\t\t\tontologyTree.setModel(new DefaultTreeModel(root));\r\n\t ontologyTree.expandRow(0);\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t}",
"@Test\n public void testDefaultRoot() {\n assertEquals(ClassModel.getObjectClass(), node.getModel());\n assertEquals(1, node.size());\n assertEquals(0, treeHash.size());\n }",
"public BSTMap() {\n this.clear();\n }",
"public BSTMap() {\n clear();\n }",
"public Object getRoot() {\n\t\treturn null;\n\t}",
"@Override\n public Iterator<T> iterator() {\n return new IteratorTree(this.root, this.modCount);\n }",
"@NotNull\n public abstract JBIterable<T> children(@NotNull T root);",
"@Override\r\n\tpublic Iterator<T> iteratorLevelOrder() {\r\n\t\tLinkedList<T> list = new LinkedList<T>();\r\n\t\tQueue<BSTNode<T>> work = new ArrayDeque<BSTNode<T>>();\r\n\t\twork.add(this.root);//start at the root\r\n\r\n\t\twhile(!work.isEmpty()) {\r\n\t\t\tBSTNode<T> node = work.remove();//pop the first\r\n\t\t\tlist.add(node.data);\r\n\t\t\t\r\n\t\t\tif(node.left!= null) {\r\n\t\t\t\twork.add(node.left);\r\n\t\t\t}\r\n\t\t\tif(node.right!= null) {\r\n\t\t\t\twork.add(node.right);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list.iterator();\r\n\t}",
"private void split () {\n\n if (firstClassList != null && firstClassList.size() > MAX_OBJECTS && depth < MAX_DEPTH) {\n\n // Set new bounds along each axis\n double[] xBounds = new double[] {bounds.getMinX(), bounds.getCenterX(), bounds.getMaxX()};\n double[] yBounds = new double[] {bounds.getMinY(), bounds.getCenterY(), bounds.getMaxY()};\n double[] zBounds = new double[] {bounds.getMinZ(), bounds.getCenterZ(), bounds.getMaxZ()};\n\n // Create each child\n children = new SceneOctTree[8];\n for (int x = 0; x <= 1; x++) {\n for (int y = 0; y <= 1; y++) {\n for (int z = 0; z <= 1; z++) {\n Bounds childBounds = new BoundingBox (\n xBounds[x], yBounds[y], zBounds[z],\n xBounds[x+1] - xBounds[x], yBounds[y+1] - yBounds[y], zBounds[z+1] - zBounds[z]\n );\n int index = x + y*2 + z*4;\n children[index] = new SceneOctTree (childBounds, this.depth+1);\n } // for\n } // for\n } // for\n\n // Insert first class objects into children. Note that we don't know\n // if the object will be first or second class in the child so we have\n // to perform a full insert.\n for (Node object : firstClassList) {\n Bounds objectBounds = object.getBoundsInLocal();\n for (SceneOctTree child : children) {\n if (objectBounds.intersects (child.bounds))\n child.insert (object);\n } // for\n } // for\n firstClassList = null;\n\n // Insert second class objects into children (if any exist). We know\n // that the object will be second class in the child, so we just\n // perform a second class insert.\n if (secondClassList != null) {\n for (Node object : secondClassList) {\n Bounds objectBounds = object.getBoundsInLocal();\n for (SceneOctTree child : children) {\n if (objectBounds.intersects (child.bounds))\n child.insertSecondClass (object, objectBounds);\n } // for\n } // for\n } // if\n secondClassList = null;\n\n // Perform a split on the children, just in case all the first class\n // objects that we just inserted all went into one child.\n for (SceneOctTree child : children) child.split();\n\n } // if\n\n }",
"public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllGeneralEncapsulatedObject_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT);\r\n\t}",
"public static void Reset() {\n\t\t\n\t\tArrayList<KDNode> root_buff = new ArrayList<KDNode>();\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\troot_buff.add(k);\n\t\t}\n\t\t\n\t\troot_map.clear();\n\t\t\n\t\tfor(int i=0; i<root_buff.size(); i++) {\n\t\t\tKDNode ptr = root_buff.get(i);\n\t\t\t\n\t\t\tKDNode prev_ptr = ptr;\n\t\t\twhile(ptr != null) {\n\t\t\t\tptr.is_node_set = false;\n\t\t\t\tptr.space.sample_buff.clear();\n\t\t\t\tprev_ptr = ptr;\n\t\t\t\tptr = ptr.parent_ptr;\n\t\t\t}\n\t\t\t\n\t\t\troot_map.add(prev_ptr);\n\t\t}\n\t\t\n\t}",
"public void preTraverse() {\n // ensure not an empty tree\n while (root != null) {\n \n }\n }",
"public LG(){\n\t\tchildren = new LinkedHashMap<Loop, LinkedHashSet<Loop>>();\n\t\tparent = new LinkedHashMap<Loop, Loop>();\n\t\tloops = new LinkedHashSet<Loop>();\n\t\tloopCounter = new LinkedHashMap<Loop, Integer>();\n\t}",
"public BinarySearchTree(Object root){\r\n\t\tthis.root = (KeyedItem)root;\r\n\t\tleftChild = null;\r\n\t\trightChild = null;\r\n\t}",
"public MutableMatrixTreeNode<E> buildTree() {\n\t\t// use parental relations to build the tree by directly inserting each child into it's parents\n\t\tfor (MutableMatrixTreeNode<E> node : nodeMap.values()) {\n\t\t\tPathMatrix key = node.getPathMatrix();\n\n\t\t\tif (!key.isRoot()) {\n\t\t\t\tPathMatrix parentKey = key.computeParentMatrix();\n\n\t\t\t\tMutableMatrixTreeNode<E> parentNode = nodeMap.get(parentKey);\n\t\t\t\tparentNode.insert(node);\n\t\t\t}\n\t\t}\n\n\t\t// get root\n\t\tPathMatrix firstKey = nodeMap.keySet().iterator().next();\n\t\treturn (MutableMatrixTreeNode<E>) nodeMap.get(firstKey).visitTopNode();\n\t}",
"T getRoot();",
"public List<Component> getAllTree() {\n\t\tList<Component> ret = new ArrayList<>();\n\t\tret.add(this);\n\t\tfor (Component c : getChilds()) {\n\t\t\tList<Component> childs = c.getAllTree();\n\t\t\t// retire les doublons\n\t\t\tfor (Component c1 : childs) {\n\t\t\t\tif (!ret.contains(c1)) {\n\t\t\t\t\tret.add(c1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public void buildNestedClassInfo() {\n\t\twriter.writeNestedClassInfo();\n\t}",
"public ObjectTreeNode getRoot() {\n return root;\n }",
"public interface ITreeObject {\r\n\r\n\tpublic static final Object[] EMPTY_OBJECT_ARRAY = new Object[0]; \r\n\t/**\r\n\t * Returns immediate parent of this item\r\n\t * @return immediate parent item or null if this item has no parent or parent is unknown \r\n\t */\r\n\tObject getParent();\r\n\r\n\t/**\r\n\t * Tells if item has children \r\n\t * @return true if this item has children \r\n\t */\r\n\tboolean hasChildren();\r\n\t\r\n\t/**\r\n\t * Returns number of children \r\n\t * @return child count \r\n\t */\r\n\tint getChildCount();\r\n\t\r\n\t/**\r\n\t * Returns array of child items as generic Objects\r\n\t * @return array of child items or empty array if item has no children \r\n\t */\r\n\tObject[] getChildArray();\r\n}",
"private <X extends Jgxx> X buildTree(X root) {\n\t\tList<X> list = this.extendedModelProvider.find(EXTEND_MODEL_XTGL_ZHGL_JGXX_CODE, Jgxx.class, SELECT_PRE_SQL + \" WHERE J.LFT BETWEEN ? AND ? AND J.DELETED = 0 ORDER BY J.LFT\",\n\t\t\t\troot.getLft(), root.getRgt());\n\t\tStack<X> rightStack = new Stack<X>();\n\t\tfor (X node : list) {\n\t\t\tif (!rightStack.isEmpty()) {\n\t\t\t\twhile (rightStack.lastElement().getRgt() < node.getRgt()) {\n\t\t\t\t\trightStack.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!rightStack.isEmpty()) {\n\t\t\t\trightStack.lastElement().addChild(node);\n\t\t\t}\n\t\t\trightStack.push(node);\n\t\t}\n\t\treturn rightStack.firstElement();\n\t}",
"public ObjectMappers() {\n\t\tthis.objectMappers = ImmutableList.of();\n\t}",
"@Override\n\tpublic List<Resource> queryForTree() throws Exception {\n\t\treturn sResourceJDao.tree(null);\n\t}",
"public static HashSet<KDNode> RootSet() {\n\t\treturn root_map;\n\t}",
"public BSearchTree() {\n\t\tthis.overallRoot = null;\n\t}",
"public List<Object> traverse() {\n return traverse(new PreorderTraversal());\n }",
"public Map<AbstractBastNode, AbstractBastNode> getMapOfParentRelationships(\n final AbstractBastNode root) {\n parentsMap = new HashMap<>();\n parentStack.clear();\n if (root == null) {\n assert (false);\n }\n root.accept(this);\n\n return parentsMap;\n }",
"public Object\tgetRoot() {\n \treturn root;\n }",
"private ObjectClassWrapper findObjectClassWrapperInTree( ObjectClassImpl oc )\n {\n SchemaWrapper schemaWrapper = findSchemaWrapperInTree( oc.getSchema() );\n if ( schemaWrapper == null )\n {\n return null;\n }\n \n // Finding the correct node\n int group = Activator.getDefault().getPreferenceStore().getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );\n List<TreeNode> children = schemaWrapper.getChildren();\n if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )\n {\n for ( TreeNode child : children )\n {\n Folder folder = ( Folder ) child;\n if ( folder.getType() == FolderType.OBJECT_CLASS )\n {\n for ( TreeNode folderChild : folder.getChildren() )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) folderChild;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n }\n else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )\n {\n for ( Object child : children )\n {\n if ( child instanceof ObjectClassWrapper )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) child;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n \n return null;\n }",
"public EntryTree tree() {\n return tree;\n }",
"public void testEntireObjectNestedSearch4() throws ApplicationException\r\n\t{\r\n\t\tWheel searchObject = new Wheel();\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Wheel\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(3,results.size());\r\n\t\t\r\n\t\tfor(Iterator i = results.iterator();i.hasNext();)\r\n\t\t{\r\n\t\t\tWheel result = (Wheel)i.next();\r\n\t\t\tassertNotNull(result);\r\n\t\t\tassertNotNull(result.getId());\r\n\t\t\tassertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE);\r\n\t\t\tassertNotNull(result.getRadius());\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// caused by instanceof simulation\n\tprivate <T extends EObject> List<T> allSubobjectsOfKind(EObject rootObject,\n\t\t\tClass<T> type) {\n\t\tList<T> result = new LinkedList<T>();\n\t\tTreeIterator<EObject> iterator = rootObject.eAllContents();\n\t\twhile (iterator.hasNext()) {\n\t\t\tEObject eObj = iterator.next();\n\t\t\tif (eObj.getClass() == type) { // simulates instanceof\n\t\t\t\tresult.add((T) eObj);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private void processTypes(Node root) {\n\t\tfinal boolean newContext =\n\t\t\t(root instanceof Block || root instanceof ForLoop);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps\n\t\t\t\t.push(new VariableTypeMap(this.variableMaps.peek()));\n\t\t}\n\n\t\tif (!root.getChildren().isEmpty()) {\n\t\t\tfor (int i = 0; i < root.getChildren().size(); ++i) {\n\t\t\t\tNode child = root.getChildren().get(i);\n\t\t\t\tif (root instanceof Call call && (!call.isPrimary() && i == 0\n\t\t\t\t\t|| call.isPrimary() && i == 1)) {\n\t\t\t\t\t// Skip the method name lookup\n\t\t\t\t\tchild.setType(Type.unknownType());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.processTypes(child);\n\t\t\t}\n\t\t}\n\t\troot.process(this);\n\n\t\tif (newContext) {\n\t\t\tthis.variableMaps.pop();\n\t\t}\n\t}",
"public GenealogyTree(T root) {\r\n tree = (T[]) new Object[SIZE];\r\n tree[0] = root;\r\n }",
"NavigableMap<K, Collection<V>> rL() {\n return (NavigableMap) super.rL();\n }",
"NavigableMap<K, Collection<V>> rL() {\n return (NavigableMap) super.rL();\n }",
"public Iterator<Object> iterator()\r\n {\r\n return new MyTreeSetIterator(root);\r\n }",
"@Override\n public OctreeIterator iterator()\n {\n Stack<CelestialBody> stack = new Stack<>();\n stack = this.root.iterate(stack);\n\n OctreeIterator iterator = new OctreeIterator(stack);\n return iterator;\n }",
"public static <T> Root<T> findRoot(CriteriaQuery<?> query, Class<T> clazz) {\n\n\tfor (Root<?> r : query.getRoots()) {\n\t if (clazz.equals(r.getJavaType())) {\n\t\treturn (Root<T>) r.as(clazz);\n\t }\n\t}\n\treturn null;\n }",
"public abstract Type treeCopy();",
"public void writeObjectRecurse(ZObjectOutputStream out) throws IOException {\n }",
"public void populateTreeTable() {\n root = new DefaultTreeNode(\"root\", null);\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String sqlMenu = \"SELECT o from Tblobjeto o WHERE o.tipoObjeto LIKE 'menu' ORDER BY o.idObjeto\";\n menus = session.createQuery(sqlMenu).list();\n\n for (Tblobjeto mnu : menus) {\n TreeNode nodeMenu = new DefaultTreeNode(mnu, root);\n nodes.add(nodeMenu);\n\n Criteria cMenu = session.createCriteria(Tblobjeto.class);\n cMenu.add(Restrictions.eq(\"tblobjeto\", mnu));\n subMenus = (List<Tblobjeto>) cMenu.list();\n\n for (Tblobjeto smnu : subMenus) {\n TreeNode nodeSubMenu = new DefaultTreeNode(smnu, nodeMenu);\n nodes.add(nodeSubMenu);\n\n Criteria cSubMenu = session.createCriteria(Tblobjeto.class);\n cSubMenu.add(Restrictions.eq(\"tblobjeto\", smnu));\n acciones = (List<Tblobjeto>) cSubMenu.list();\n\n for (Tblobjeto ac : acciones) {\n nodes.add(new DefaultTreeNode(ac, nodeSubMenu));\n }\n }\n }\n } catch (HibernateException e) {\n logger.throwing(getClass().getName(), \"ObjetosBean\", e);\n } finally {\n session.close();\n }\n }",
"public ObjRef getRootObjRef() {\n return rootRef;\n }",
"@Override\r\n\tpublic Collection<CacheTreeNode> getRootList() {\n\t\tCacheTreeNode node = (CacheTreeNode)this.getCacheData(SUPER_ROOT_KEY);\r\n\t\tif(node != null){\r\n\t\t\treturn node.getChildren();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private void buildRoot() {\n this.root = new GPRootTreeNode(this.tree);\n }",
"public JsonPointer root() {\n\t\tpathFragments.clear();\n\t\treturn this;\n\t}",
"public abstract Entry getRoot() throws IOException;",
"public abstract T queryRootNode();",
"private void process(TreeNode root){\n while(root!=null){\n dq.push(root);\n root= root.left;\n }\n }",
"public Object visit(Class_ node){\n currentClass = node.getName();\n ClassTreeNode treeNode = classMap.get(currentClass);\n\n treeNode.getMethodSymbolTable().enterScope();\n treeNode.getVarSymbolTable().enterScope();\n\n super.visit(node);\n //treeNode.getMethodSymbolTable().exitScope();\n treeNode.getVarSymbolTable().exitScope();\n return null;\n }",
"private void preOrdertraverse(Node root){\n System.out.println(root.value);\n for(var child : root.getChildren())\n preOrdertraverse(child); //recursively travels other childrens in current child\n }",
"public MyTreeSet()\r\n {\r\n root = null;\r\n }",
"public Object getRootItem();",
"protected void recursivelyGetInnerTypes(Set<Type> allInnerTypes) {\n Collection<Type> currentInnerTypes = getInnerTypes().values();\n allInnerTypes.addAll(currentInnerTypes);\n for (Type type : currentInnerTypes) {\n type.recursivelyGetInnerTypes(allInnerTypes);\n }\n }",
"@Override\r\n\tpublic Node<T> getRoot() {\r\n\t\treturn raiz;\r\n\t}",
"public TreeIterator<?> treeIterator(Object object)\n {\n return new DomainTreeIterator<Object>(this, object);\n }",
"public Map<String, Node> getSubTreeNodeInMOMap() {\n\t\treturn subTreeNodeInMOMap;\n\t}",
"protected Class<? extends DeciTree<S>> getTreeClassHook() {\n\t\treturn null;\r\n\t}",
"public void traverseLevelOrder() {\n\t\tif (root == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLinkedList<Node> ls = new LinkedList<>();\n\t\tls.add(root);\n\t\twhile (!ls.isEmpty()) {\n\t\t\tNode node = ls.remove();\n\t\t\tSystem.out.print(\" \" + node.value);\n\t\t\tif (node.left != null) {\n\t\t\t\tls.add(node.left);\n\t\t\t}\n\t\t\tif (node.right != null) {\n\t\t\t\tls.add(node.right);\n\t\t\t}\n\t\t}\n\t}",
"private void initDepthToClass(OWLOntologyManager manager, OWLOntology ont, int depth) {\n\n\t\t// Are there lower \"level\"\n\t\tboolean areThereLower = true;\n\n\t\t// Save the current top classes (subclasses of top)\n\t\tSet<OWLClass> classes = reasoner.getSubClasses(df.getOWLThing(), true).entities().collect(Collectors.toSet());\n\n\t\t// as long as there are lower level\n\t\twhile (areThereLower) {\n\n\t\t\t// Save this new subclasses as the classes for this depth\n\t\t\tdepthToClasses.put(depth, classes);\n\n\t\t\t// Create a List for the next level\n\t\t\tSet<OWLClass> newClasses = new HashSet<>();\n\n\t\t\t// For all classes of the current level\n\t\t\tfor (OWLClass cls : classes) {\n\n\t\t\t\t// Get all subclasses\n\t\t\t\tList<OWLClass> subForCls = reasoner.getSubClasses(cls, true).entities().collect(Collectors.toList());\n\n\t\t\t\t// Add them to the next level\n\t\t\t\tnewClasses.addAll(subForCls);\n\n\t\t\t\t// save parent structure\n\t\t\t\tsubForCls.stream().forEach(subCls -> {\n\t\t\t\t\tclassToParent.put(subCls, cls);\n\t\t\t\t\tclassToParentString.put(OntologyDescriptor.getCleanNameOWLObj(subCls),\n\t\t\t\t\t\t\tOntologyDescriptor.getCleanNameOWLObj(cls));\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// Set the new level as the current level\n\t\t\tclasses = newClasses;\n\n\t\t\t// Next level index\n\t\t\tdepth++;\n\n\t\t\t// If there are less than 1 new class stop this loop\n\t\t\tif (newClasses.size() < 1) {\n\t\t\t\tareThereLower = false;\n\t\t\t}\n\n\t\t}\n\t}",
"<T> T getRoot();",
"@Override\n public JsonParser traverse(ObjectReadContext readCtxt) {\n return new TreeTraversingParser(this, readCtxt);\n }",
"public void printStructure() {\n printStructure(mRoot);\n }"
] | [
"0.6347875",
"0.60059",
"0.5981514",
"0.5981514",
"0.5981514",
"0.5925064",
"0.58882344",
"0.58882344",
"0.57694286",
"0.5519001",
"0.54629475",
"0.5450833",
"0.5450833",
"0.54314315",
"0.54072714",
"0.5336271",
"0.53321564",
"0.5299163",
"0.5297501",
"0.5295649",
"0.5272841",
"0.52460706",
"0.52435535",
"0.5235765",
"0.520262",
"0.51955074",
"0.51818424",
"0.51811814",
"0.5169703",
"0.51469684",
"0.5122727",
"0.5109695",
"0.5088345",
"0.5075338",
"0.5074815",
"0.5053414",
"0.5053086",
"0.5043072",
"0.50406307",
"0.50399613",
"0.5039759",
"0.5038075",
"0.5036712",
"0.50282747",
"0.50104463",
"0.5002714",
"0.49880877",
"0.49853748",
"0.49839777",
"0.49820995",
"0.49407086",
"0.49393106",
"0.49323314",
"0.49305847",
"0.49211186",
"0.4920719",
"0.48967788",
"0.48913413",
"0.489105",
"0.48866507",
"0.48812225",
"0.48800665",
"0.4876557",
"0.48721537",
"0.4868431",
"0.48613223",
"0.48455086",
"0.48447725",
"0.4837573",
"0.48356184",
"0.4834003",
"0.48294866",
"0.48294866",
"0.48279077",
"0.4826285",
"0.4816342",
"0.4816058",
"0.48154488",
"0.4805619",
"0.48016268",
"0.4798609",
"0.47955284",
"0.47919327",
"0.4784848",
"0.4773593",
"0.47709382",
"0.4769217",
"0.476167",
"0.47613704",
"0.47609556",
"0.4758957",
"0.4753437",
"0.47511768",
"0.4750754",
"0.474765",
"0.47426903",
"0.4742643",
"0.47393978",
"0.47377673",
"0.47368222"
] | 0.59149003 | 6 |
Parses a repository file and populates an ojb datastructure representing the file. | public static DescriptorRepository readDescriptorRepository(String filename) {
LOG.info( "Processing Repository: " + filename);
try {
return (DescriptorRepository) buildRepository(filename, DescriptorRepository.class);
} catch (Exception e) {
LOG.error("Unable to process descriptor repository: " + filename);
LOG.error( e.getMessage() );
// Explicitly not logging the exception - it has already been dumped by earlier logging
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Repository fromXml(String file) {\n File xmlFile = new File(file);\n Repository repository = new Repository();\n Contracts contracts = null;\n JAXBContext jaxbContext;\n try {\n jaxbContext = JAXBContext.newInstance(Contracts.class);\n Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();\n if (!xmlFile.exists()) System.out.println(\"File does not exist\");\n assert jaxbUnmarshaller != null;\n contracts = (Contracts) jaxbUnmarshaller.unmarshal(xmlFile);\n } catch (JAXBException e) {\n e.printStackTrace();\n }\n assert contracts != null;\n repository.setArrayList((ArrayList<Contract>) contracts.getContractList());\n\n return repository;\n\n }",
"public static List<Repository> unmarshal(File importFile) throws JAXBException {\n\t\tRepositories repositories = new Repositories();\n\t\t\n\t\tJAXBContext context = JAXBContext.newInstance(Repositories.class);\n\t\tUnmarshaller um = context.createUnmarshaller();\n\t\trepositories = (Repositories) um.unmarshal(importFile);\n\t\t\n\t\treturn repositories.getRepositories();\n\t}",
"private static List<OBREntry> parseOBRRepository(final ConnectionFactory connectionFactory, URL obrBaseUrl, String repositoryName) throws XPathExpressionException, IOException {\n FixedIndexedRepo fixedIndexedRepo = new FixedIndexedRepo();\n \n AceUrlConnector aceUrlConnector = new AceUrlConnector(connectionFactory);\n Registry registry = new RegistryImpl(aceUrlConnector);\n fixedIndexedRepo.setRegistry(registry);\n \n Map<String, String> properties = new HashMap<>();\n properties.put(FixedIndexedRepo.PROP_LOCATIONS, new URL(obrBaseUrl, repositoryName).toString());\n fixedIndexedRepo.setProperties(properties);\n \n Requirement requirement = new CapReqBuilder(\"osgi.identity\")\n .addDirective(\"filter\", \"(&(osgi.identity=*)(version=*)(type=*))\")\n .buildSyntheticRequirement();\n \n Map<Requirement, Collection<Capability>> sourceResources = fixedIndexedRepo.findProviders(Collections.singleton(requirement));\n if (sourceResources.isEmpty() || sourceResources.get(requirement).isEmpty()) {\n return Collections.emptyList();\n }\n List<OBREntry> obrList = new ArrayList<>();\n Iterator<Capability> capabilities = sourceResources.get(requirement).iterator();\n while (capabilities.hasNext()) {\n Capability capability = capabilities.next();\n \n Resource resource = capability.getResource();\n List<Capability> identities = resource.getCapabilities(IdentityNamespace.IDENTITY_NAMESPACE);\n String bsn = null;\n Version version = null;\n if (identities != null && identities.size() == 1){\n Capability id = identities.get(0);\n bsn = (String) id.getAttributes().get(IdentityNamespace.IDENTITY_NAMESPACE);\n version = (Version) id.getAttributes().get(IdentityNamespace.CAPABILITY_VERSION_ATTRIBUTE);\n }\n \n URI uri = null;\n List<Capability> contentCapabilities = resource.getCapabilities(ContentNamespace.CONTENT_NAMESPACE);\n if (contentCapabilities != null && contentCapabilities.size() == 1) {\n Capability content = contentCapabilities.get(0);\n uri = (URI) content.getAttributes().get(ContentNamespace.CAPABILITY_URL_ATTRIBUTE);\n }\n \n if (bsn != null && uri != null) {\n obrList.add(new OBREntry(bsn, bsn, version.toString(), uri.toString().substring(obrBaseUrl.toString().length())));\n } else {\n throw new IllegalStateException(\"No Identity or multiple identities\");\n }\n }\n\n return obrList;\n }",
"ReleaseFile parse( InputStream is ) throws IOException;",
"public File getRepo() {\n return _repo;\n }",
"private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }",
"static Repository load(String repositoryPath){\n\n Settings.setNewRepository(repositoryPath);\n\n List<String> contentByLines = FSUtils.getFileLines(Settings.activeBranchFilePath);\n String activeBranchName = contentByLines.get(0);\n\n Branch activeBranch = Branch.load(activeBranchName, false);\n return new Repository(Settings.repositoryFullPath, activeBranch);\n }",
"public interface FileRepository {\n /**\n * Create a file and write the object in the given format (json or xml)\n * @param data The data that will be written to the file\n * @param fileName The name of the file without any path or extension\n * @param fileFormat The file format enum (json or xml)\n * @return The file's absolute path\n */\n String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;\n\n /**\n * Retrieve a file from its absolute path\n * @param absolutePath The file's location (absolute path returned by the saveToFile method)\n * @return The actual file\n */\n File retrieveFile(String absolutePath);\n}",
"@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }",
"private List<Organizations.Organization> readProtobuf(String filename) throws IOException {\n ServletContext sc = this.getServletContext();\n InputStream is = sc.getResourceAsStream(\"/WEB-INF/\" + filename);\n Organizations orgs = Organizations.parseFrom(is);\n return orgs.getOrgsList();\n }",
"public RepositoryFinder(String storedir, String repname) throws InvalidStoreException {\n int slash = repname.indexOf('/', 0);\n if (slash != -1) {\n this.repository_dir = repname.substring(0, slash);\n this.repository_name = repname.substring(slash + 1, repname.length());\n } else {\n this.repository_dir = \"\";\n this.repository_name = repname;\n }\n this.store_dir = storedir;\n this.rl = new ResourceLister();\n this.containers = new Hashtable();\n serializer = new org.w3c.tools.resources.serialization.xml.XMLSerializer();\n File file = new File(store_dir + \"/\" + repository_dir, repository_name);\n try {\n this.reader = new BufferedReader(new FileReader(file));\n this.holders = serializer.readAttributeHolders(reader);\n edu.hkust.clap.monitor.Monitor.loopBegin(14);\nfor (int i = 0; i < holders.length; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(14);\n{\n if (rl.getKeyFromHolder(holders[i]) != null) {\n containers.put(rl.getKeyFromHolder(holders[i]), holders[i]);\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(14);\n\n } catch (IOException ex) {\n System.out.println(\"Unable to read repository\");\n throw new InvalidStoreException(\"inexistent repository\");\n }\n }",
"public static void initRepository() {\n deserialize();\n if (flightRepository == null) {\n flightRepository = new FlightRepository();\n }\n }",
"private void initialize() throws IOException {\n\n\t\tlog.info(\"Known Repositories:\");\n\t\tString[] names = getRepositoryNames(rootDirFile);\n\t\tfor (String name : names) {\n\t\t\tlog.info(\" \" + name);\n\t\t}\n\t\tif (names.length == 0) {\n\t\t\tlog.info(\" <none>\");\n\t\t}\n\t\tfor (String name : names) {\n\t\t\tFile f = new File(rootDirFile, NamingUtilities.mangle(name));\n\t\t\tif (!f.isDirectory()) {\n\t\t\t\tlog.error(\"Error while processing repository \" + name +\n\t\t\t\t\t\", directory not found: \" + f);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!f.canWrite()) {\n\t\t\t\tthrow new IOException(f.getAbsolutePath() + \" can not be written to\");\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tRepository rep = new Repository(this, null, f, name);\n\t\t\t\trepositoryMap.put(name, rep);\n\t\t\t}\n\t\t\tcatch (UserAccessException e) {\n\t\t\t\t// ignore\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tlog.error(\"Error while processing repository \" + name + \", \" + e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t// Start command queue watcher\n\t\tcommandWatcher = new CommandWatcher(this);\n\t\tThread t = new Thread(commandWatcher, \"Server Command Watcher\");\n\t\tt.start();\n\n\t\tprocessCommandQueue(); // process any old commands\n\t}",
"@Override\n\t\tpublic Repository loadRepository()\n\t\t{\n\t\t\tNativeStore store = ReadDataManagerImpl.getNativeStore(IWBFileUtil.getFileInDataFolder(repositoryName));\n\n\t\t\t// create a lucenesail to wrap the store\n\t\t\tLuceneSail luceneSail = new LuceneSail();\n\t\t\t// store the lucene index on disk\n\t\t\tluceneSail.setParameter(LuceneSail.LUCENE_DIR_KEY, IWBFileUtil.getLuceneIndexFolder().getAbsolutePath());\n\t\t\t// wrap store in a lucenesail\n\t\t\tluceneSail.setBaseSail(store);\n\n\t\t\t// create a Repository to access the sail\n\t\t\treturn new SailRepository(luceneSail);\n\t\t}",
"public static RepoInfo repoInfo(String fileName, Project project) {\n String fileRel = \"\";\n String remoteURL = \"\";\n String branch = \"\";\n try{\n // Determine repository root directory.\n String fileDir = fileName.substring(0, fileName.lastIndexOf(\"/\"));\n String repoRoot = gitRootDir(fileDir);\n\n // Determine file path, relative to repository root.\n fileRel = fileName.substring(repoRoot.length()+1);\n remoteURL = configuredGitRemoteURL(repoRoot);\n branch = SourcegraphUtil.setDefaultBranch(project)!=null ? SourcegraphUtil.setDefaultBranch(project) : gitBranch(repoRoot);\n\n // If on a branch that does not exist on the remote and no defaultBranch is configured\n // use \"master\" instead.\n // This allows users to check out a branch that does not exist in origin remote by setting defaultBranch\n if (!isRemoteBranch(branch, repoRoot) && SourcegraphUtil.setDefaultBranch(project)==null) {\n branch = \"master\";\n }\n\n // replace remoteURL if config option is not null\n String r = SourcegraphUtil.setRemoteUrlReplacements(project);\n if(r!=null) {\n String[] replacements = r.trim().split(\"\\\\s*,\\\\s*\");\n // Check if the entered values are pairs\n for (int i = 0; i < replacements.length && replacements.length % 2 == 0; i += 2) {\n remoteURL = remoteURL.replace(replacements[i], replacements[i+1]);\n }\n }\n } catch (Exception err) {\n Logger.getInstance(SourcegraphUtil.class).info(err);\n err.printStackTrace();\n }\n return new RepoInfo(fileRel, remoteURL, branch);\n }",
"private static Object readMetadataFromXML(InputSource source, Class target) throws ParserConfigurationException, SAXException, IOException {\n SAXParserFactory factory = SAXParserFactory.newInstance();\n LOG.debug(\"RepositoryPersistor using SAXParserFactory : \" + factory.getClass().getName());\n\n SAXParser p = factory.newSAXParser();\n XMLReader reader = p.getXMLReader();\n\n Object result;\n if (DescriptorRepository.class.equals(target)) {\n // create an empty repository:\n DescriptorRepository repository = new DescriptorRepository();\n // create handler for building the repository structure\n org.xml.sax.ContentHandler handler = new RepositoryXmlHandler(repository);\n // tell parser to use our handler:\n reader.setContentHandler(handler);\n reader.parse(source);\n result = repository;\n } else if (ConnectionRepository.class.equals(target)) {\n // create an empty repository:\n ConnectionRepository repository = new ConnectionRepository();\n // create handler for building the repository structure\n org.xml.sax.ContentHandler handler = new ConnectionDescriptorXmlHandler(repository);\n // tell parser to use our handler:\n reader.setContentHandler(handler);\n reader.parse(source);\n //LoggerFactory.getBootLogger().info(\"loading XML took \" + (stop - start) + \" msecs\");\n result = repository;\n } else\n throw new MetadataException(\"Could not build a repository instance for '\" + target +\n \"', using source \" + source);\n return result;\n }",
"protected abstract List<O> parseFileForObservations(Scanner scn);",
"public void parseJson() {\n\n try {\n JSONParser parser = new JSONParser();\n jsonReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/resources/bangor-library.json\")));\n JSONObject jsonObj = (JSONObject) parser.parse(jsonReader);\n \n String name = (String) jsonObj.get(\"name\");\n libraryName = name;\n JSONArray extractedBooks = (JSONArray) jsonObj.get(\"books\");\n\n Iterator i = extractedBooks.iterator();\n while (i.hasNext()) {\n rec = new LibraryRecord();\n rec.setLib_name(libraryName);\n JSONObject innerObj = (JSONObject) i.next();\n rec.setBook_name(innerObj.get(\"name\").toString());\n rec.setAuth_name(innerObj.get(\"author\").toString());\n rec.setCat_name(innerObj.get(\"category\").toString());\n\n if (!LibraryAccess.bookShelves.isEmpty()) {\n for (LibraryRecord bookSaved : LibraryAccess.bookShelves) {\n if (this.rec.getHashOfContent() == bookSaved.getHashOfContent()) {\n duplicate = true;\n rec = null;\n }\n }\n if (!duplicate) {\n LibraryAccess.addRecord(rec);\n }\n duplicate = false;\n\n } else {\n System.out.println(\"Library empty : Adding records...\");\n LibraryAccess.addRecord(this.rec);\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ParseException ex) {\n Logger.getLogger(JsnParser.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public DataRepository() throws IOException {\n\t\tthis.init();\n\t}",
"public void load() throws FileNotFoundException {\n loadConfig();\n initRepos();\n }",
"private static void loadObjectRepository() {\n\n\t\ttry {\n\n\t\t\tObjectRepositoryReader reader = new ObjectRepositoryReader(GlobalContext.getAppDir(), Constants.FILENAME_OBJECT_REPO);\n\t\t\tMap<String, ObjectRepositoryRow> objectRepository = new HashMap<>();\n\t\t\twhile (reader.hasNextRow()) {\n\n\t\t\t\tObjectRepositoryRow row = (ObjectRepositoryRow) reader.nextRow();\n\t\t\t\tobjectRepository.put(row.getName(), row);\n\t\t\t}\n\n\t\t\t//sets to global context.\n\t\t\tGlobalContext.setObjectRepository(objectRepository);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public Server(FileRepository fileRepository) {\r\n\t\tthis.repository = fileRepository;\r\n\t}",
"public void loadRepository(String url) throws MalformedURLException, URISyntaxException {\r\n\t\t\r\n\t\t//-- Elimiate empty strings\r\n\t\tif (url.length()==0)\r\n\t\t\treturn;\r\n\t\t\r\n\t\t//-- Try to open the URL\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//-- all \\ from windows like path must be converted to /\r\n\t\t\turl = url.replace(\"\\\\\", \"/\");\r\n\t\t\t\r\n\t\t\t//-- Get input stream: All URLss have to point to an xml file\r\n\t\t\tURI repositoryURI = new URI(url);\r\n\t\t\t\r\n\t\t\t//-- If not an XML file, add a default name\r\n\t\t\tif (!repositoryURI.toString().endsWith(\".xml\") \r\n\t\t\t\t\t&& (repositoryURI.getScheme()==null || repositoryURI.getScheme().length()==1)) {\r\n\t\t\t\t\r\n\t\t\t\t// (add file scheme also)\r\n\t\t\t\trepositoryURI = new URI(repositoryURI.toString()+\"/\"+\"stylesheets.xml\");\r\n\t\t\t\t\r\n\t\t\t} else if (!repositoryURI.toString().endsWith(\".xml\")) {\r\n\t\t\t\t\r\n\t\t\t\trepositoryURI = new URI(repositoryURI.toString()+\"/stylesheets.xml\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//-- Add file scheme if a normal file path is provided\r\n\t\t\t// (scheme length will be 1 under windows because Drive letter is taken as such)\r\n\t\t\tif (repositoryURI.getScheme()==null || repositoryURI.getScheme().length()==1) {\r\n\t\t\t\trepositoryURI = new URI(\"file://\"+repositoryURI.toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//-- Open\r\n\t\t\tInputStream repositoryDescriptorStream = null;\r\n\t\t\ttry {\r\n\t\t\t\trepositoryDescriptorStream = repositoryURI.toURL().openStream();\r\n\t\t\t} catch (IOException ioex) {\r\n\t\t\t\tthrow new MalformedURLException(\"Provided Stylesheet URI: \"+repositoryURI.toString()+\"(original: \"+url+\") could not be opened: \"+ioex.getMessage());\r\n\t\t\t}\r\n\t\t\t//System.err.println();\r\n\t\t\t\r\n\t\t\t//-- Try to unoox\r\n\t\t\t/*if (repositoryURI.getScheme().equals(\"file\") && new File(repositoryURI.toURL().getFile()).isDirectory()) {\r\n\t\t\t\trepositoryURI = TeaFileUtils.buildPathAsFile(new File(repositoryURI.toURL().getFile()),\"stylesheets.xml\").toURI();\r\n\t\t\t}\r\n\t\t\tInputStream repositoryDescriptorStream = (repositoryURI.getScheme()==null || repositoryURI.getScheme().equals(\"file\")) ? new FileInputStream(new File(repositoryURI.getPath())):repositoryURI.toURL().openStream();\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t//-- Unwrap and read\r\n\t\t\tWrappingContext ctx = new WrappingContext();\r\n\t\t\tctx.getReplacementBuffersClassMap().put(Stylesheets.class, StylesheetRepository.class);\r\n\t\t\t\r\n\t\t\tStylesheetRepository stylesheets = new StylesheetRepository(repositoryURI);\r\n\t\t\tstylesheets.setNextBuffer(new DOMXMLIO(XMLUtils.buildDocument(repositoryDescriptorStream,null)));\r\n\t\t\tstylesheets.unwrap(ctx);\r\n\t\t\t\r\n\t\t\t//-- Add to map\r\n\t\t\tthis.repositories.put(stylesheets.getId().getValue(),stylesheets);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (UnwrapException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SAXException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParserConfigurationException 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}",
"public void init() throws IOException {\n setPersistance();\n Commit newCommit = new Commit(\"initial commit\", null);\n String newCommitCode = newCommit.getShaCode();\n File lol = new File(Main.ALL_COMMITS, newCommitCode);\n lol.createNewFile();\n if (lol.exists()) {\n Utils.writeObject(lol, newCommit);\n }\n Utils.writeObject(MASTERBRANCH, newCommitCode);\n Utils.writeObject(HEADFILE, newCommitCode);\n Utils.writeObject(HEADNAME, MASTERBRANCH.getName());\n }",
"public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }",
"public BrickStructure loadStructureFromBinaryFile(File file) {\n\t\tthrow new NullPointerException();\n\t}",
"private static List<PackageDTO> preparePackages(String filePath) throws APIException{\n List<PackageDTO> packageDTOS = null;\n try {\n File input = fileService.openFile(filePath);\n packageDTOS = parseService.parseFile(input);\n }catch (APIException e) {\n throw new APIException(\"File not found\", e);\n }\n return packageDTOS;\n }",
"static Repository getRepositoryFromArguments(String[] args)\n {\n File dataDir = new File(args[args.length - 2]);\n \n Repository rep = new SailRepository(new NativeStore(dataDir));\n \n try\n {\n rep.initialize();\n }\n catch (RepositoryException e)\n {\n System.err.println(\"Repository could not be initialized!\");\n System.exit(1);\n }\n \n return rep;\n }",
"public RepositoryParser() {\n pageElementsMap = new HashMap<String, Map<String, PageElement>>();\n }",
"@Override\n\t\tpublic Repository loadRepository()\n\t\t{\n\t\t\tMemoryStore store = new MemoryStore(IWBFileUtil.getFileInDataFolder(Config.getConfig().getRepositoryName()));\n\t\t\t\n\t\t\t// create a lucenesail to wrap the memorystore\n\t\t\tLuceneSail luceneSail = new LuceneSail();\n\t\t\t// let the lucene index store its data in ram\n\t\t\tluceneSail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t\t// wrap memorystore in a lucenesail\n\t\t\tluceneSail.setBaseSail(store);\n\t\t\t\n\t\t\t// create a Repository to access the sails\n\t\t\treturn new SailRepository(luceneSail);\n\t\t}",
"public void parse(String filename);",
"private StupidContainer populateFileList() throws Exception {\n\n\t\tString root = getCodeRepo();\n\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArrayList<String> files = new ArrayList<String>();\n\t\tsearchDFS(new File(root).listFiles(), files);\n\n\t\tString dir = System.getProperty(\"user.dir\");\n\n\t\tif (gitDir == null)\n\t\t\treturn new StupidContainer(files, root);\n\n\t\tcommitCounts = new Hashtable<String, Integer>();\n\t\tProcess p = null;\n\n\t\tif (isOSWindows) {\n\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitlog.sh \" + gitDir);\n\t\t} else {\n\t\t\tp = Runtime.getRuntime().exec(\"./scripts/gitlog.sh \" + gitDir);\n\t\t}\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tp.getInputStream()));\n\n\t\tString line = null, name;\n\t\tInteger count;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.contains(\".java\")) {\n\t\t\t\tname = extractName(line);\n\t\t\t\tcount = commitCounts.get(name);\n\t\t\t\tif (count == null)\n\t\t\t\t\tcount = new Integer(0);\n\t\t\t\tcommitCounts.put(name, count + 1);\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\t\treturn new StupidContainer(files, root, folderName, commitCounts);\n\t}",
"public void load() {\r\n\t\t\r\n\t\t//-- Clean\r\n\t\tthis.repositories.clear();\r\n\t\t\r\n\t\tloadInternal();\r\n\t\tloadExternalRepositories();\r\n\t\t\r\n\t}",
"public TagManager(String filePath) throws ClassNotFoundException, IOException {\n\t\ttagList = new HashMap<String, Integer>();\n\t\tselectedTags = new ArrayList<String>();\n\t\t// Reads serializable objects from file.\n\t\t// Populates the record list using stored data, if it exists.\n\t\tFile file = new File(filePath);\n\t\tif (file.exists()) {\n\t\t\treadFromFile(filePath);\n\t\t} else {\n\t\t\tfile.createNewFile();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n Validator<ClothingItem> itemValidator = new ClothingItemValidator();\n Validator<Client> clientValidator = new ClientValidator();\n Validator<Transaction> transactionValidator = new TransactionValidator();\n\n //in-memory\n\n //Repository<Long, ClothingItem> itemsRepository = new inMemoryRepository<>(itemValidator);\n //Repository<Long, Client> clientRepository = new inMemoryRepository<>(clientValidator);\n //Repository<Long, Transaction> transactions = new inMemoryRepository<>(transactionValidator);\n\n //file repo\n\n //Repository<Long, ClothingItem> items = new itemFileRepo<>(itemValidator, \"/Users/Ale/Documents/Facultate/An2/Semestrul2/MPP/Lab2-4/lab2-4final/src/main/java/ui/items.txt\");\n //Repository<Long, Client> clients = new clientFileRepo<>(clientValidator, \"/Users/Ale/Documents/Facultate/An2/Semestrul2/MPP/Lab2-4/lab2-4final/src/main/java/ui/clients.txt\");\n //Repository<Long, Transaction> transactions = new transactionFileRepo<>(transactionValidator, \"/Users/Ale/Documents/Facultate/An2/Semestrul2/MPP/Lab2-4/lab2-4final/src/main/java/ui/transactions.txt\");\n\n// try {\n// ((itemFileRepo<Long, ClothingItem>) items).readFromFile();\n// ((clientFileRepo<Long, Client>) clients).readFromFile();\n// ((transactionFileRepo<Long, Transaction>) transactions).readFromFile();\n// }\n// catch(IOException e){\n// e.printStackTrace();\n// }\n\n //xml repo\n\n //Repository<Long, ClothingItem> itemsXML = new itemXmlRepo(itemValidator, \"itemsX.xml\");\n //Repository<Long, Client> clientsXML = new clientXmlRepo(clientValidator, \"clientsX.xml\");\n //Repository<Long, Transaction> transactionsXML = new transactionXmlRepo(transactionValidator, \"transactionsX.xml\");\n\n// try {\n// ((itemXmlRepo) itemsXML).readFromFile();\n// ((clientXmlRepo) clientsXML).readFromFile();\n// ((transactionXmlRepo) transactionsXML).readFromFile();\n// }\n// catch(Exception ex){\n// ex.printStackTrace();\n// }\n\n //db repo\n\n Repository<Long, Client> dbRepoClients = new clientDBRepo(clientValidator);\n Repository<Long, ClothingItem> dbRepoItems = new itemDBRepo(itemValidator);\n Repository<Long, Transaction> dbRepoTrans = new transactionDBRepo(transactionValidator);\n\n\n\n Controller ctrl = new Controller(dbRepoItems, dbRepoClients, dbRepoTrans);\n Console console = new Console(ctrl);\n\n try {\n console.runConsole();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }",
"private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }",
"public Repository (FileSystem def) {\n this.system = def;\n java.net.URL.setURLStreamHandlerFactory(\n new org.openide.execution.NbfsStreamHandlerFactory());\n init ();\n }",
"protected abstract void parseFile(File f) throws IOException;",
"private OSPARRecords parseExcelFile(String excelFilePath) {\n\n\t\ttry {\n\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tbuilder.setPrettyPrinting();\n\t\t\tGson gson = builder.create();\n\t\t\t\n\t\t\t\n\t\t\tOSPARRecords or = new OSPARRecords();\n\n\t\t\tFile file = new File(excelFilePath);\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n\n\t\t\tWorkbook workbook = new HSSFWorkbook(inputStream);\n\t\t\tSheet firstSheet = workbook.getSheetAt(0);\n\n\t\t\tint row = 0;\n\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\t\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tRow nextRow = firstSheet.getRow(row);\n\n\t\t\t\tif (nextRow == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString value=nextRow.getCell(0)+\"\";\n\t\t\t\t\n\t\t\t\tif (value.equals(\"\")) {\n\t\t\t\t\t\n\t\t\t\t\tString v3=nextRow.getCell(3)+\"\";\n\t\t\t\t\t\n\t\t\t\t\tif (!v3.equals(\"Source/Reference\")) {\n\t\t\t\t\t\tSystem.out.println(excelFilePath+\"\\t\"+or.CasNo+\"\\t\"+v3+\"\\t\"+value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.equals(\"null\")) break;\n\t\t\t\t\n\t\t\t\tfloat fvalue=Float.parseFloat(value);\n\t\t\t\tDecimalFormat decform=new DecimalFormat(\"0.0\");\n\t\t\t\tString svalue=decform.format(fvalue);\n\t\t\t\t\n//\t\t\t\tSystem.out.println(or.CasNo+\"\\t\"+svalue);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata_field df = createDataField(nextRow);\n\t\t\t\t\n\t\t\t\tif (df.Value.equals(\"\") && df.Source_Reference.equals(\"\")) {\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (svalue.equals(\"0.0\")) \n\t\t\t\t\tor.Name=df.Value;\n\t\t\t\tif (svalue.equals(\"1.1\"))\n\t\t\t\t\tor.CasNo=convertCAS(df.Value);\n\t\t\t\tif (svalue.equals(\"1.2\"))\n\t\t\t\t\tor.EINECS=df.Value;\n\t\t\t\tif (svalue.equals(\"1.3\"))\n\t\t\t\t\tor.Synonym=df.Value;\n\t\t\t\tif (svalue.equals(\"1.4\"))\n\t\t\t\t\tor.Group_Function=df.Value;\n\t\t\t\tif (svalue.equals(\"1.5\"))\n\t\t\t\t\tor.Initial_Selection=df.Value;\n\t\t\t\tif (svalue.equals(\"1.6\"))\n\t\t\t\t\tor.Prioritized_For_Action=df.Value;\n\n\t\t\t\tif (svalue.equals(\"2.1\"))\n\t\t\t\t\tor.Molecular_weight.add(df);\n\t\t\t\tif (svalue.equals(\"2.2\"))\n\t\t\t\t\tor.Water_Solubility.add(df);\n\t\t\t\tif (svalue.equals(\"2.3\"))\n\t\t\t\t\tor.Vapor_Pressure.add(df);\n\n\t\t\t\tif (svalue.equals(\"3.1\"))\n\t\t\t\t\tor.Abiotic_OH_Oxidation_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.2\"))\n\t\t\t\t\tor.Photolysis_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.3\"))\n\t\t\t\t\tor.Ready_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.4\"))\n\t\t\t\t\tor.Halflife.add(df);\n\t\t\t\tif (svalue.equals(\"3.5\"))\n\t\t\t\t\tor.Inherent_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.6\"))\n\t\t\t\t\tor.Biodeg_QSAR.add(df);\n\t\t\t\t\n\t\t\t\tif (svalue.equals(\"4.1\"))\n\t\t\t\t\tor.logKow.add(df);\n\t\t\t\tif (svalue.equals(\"4.2\"))\n\t\t\t\t\tor.Bcf.add(df);\n\n\t\t\t\tif (svalue.equals(\"5.1\"))\n\t\t\t\t\tor.Acute_toxicity_algae.add(df);\n\t\t\t\tif (svalue.equals(\"5.2\"))\n\t\t\t\t\tor.Acute_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.3\"))\n\t\t\t\t\tor.Acute_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.4\"))\n\t\t\t\t\tor.Chronic_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.5\"))\n\t\t\t\t\tor.Chronic_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.6\"))\n\t\t\t\t\tor.Aquatox_QSAR.add(df);\n\t\t\t\tif (svalue.equals(\"5.7\"))\n\t\t\t\t\tor.Aquatic_toxicity_Other.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"6.1\"))\n\t\t\t\t\tor.Acute_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.2\"))\n\t\t\t\t\tor.Carcinogenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.3\"))\n\t\t\t\t\tor.Chronic_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.4\"))\n\t\t\t\t\tor.Mutagenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.5\"))\n\t\t\t\t\tor.Reprotoxicity.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"7.1\"))\n\t\t\t\t\tor.Production_Volume.add(df);\n\t\t\t\tif (svalue.equals(\"7.2\"))\n\t\t\t\t\tor.Use_Industry_Category.add(df);\n\t\t\t\tif (svalue.equals(\"7.3\"))\n\t\t\t\t\tor.Use_in_articles.add(df);\n\t\t\t\tif (svalue.equals(\"7.4\"))\n\t\t\t\t\tor.Environm_Occur_Measured.add(df);\n\t\t\t\tif (svalue.equals(\"7.5\"))\n\t\t\t\t\tor.Environm_Occur_Modelled.add(df);\n\n\t\t\t\tif (svalue.equals(\"8.1\"))\n\t\t\t\t\tor.Dir_67_548_EEC_Classification.add(df);\n\t\t\t\tif (svalue.equals(\"8.2\"))\n\t\t\t\t\tor.Reg_793_93_EEC_Existing_substances.add(df);\n\t\t\t\tif (svalue.equals(\"8.3\"))\n\t\t\t\t\tor.Dir_2000_60_EEC_WFD.add(df);\n\t\t\t\tif (svalue.equals(\"8.4\"))\n\t\t\t\t\tor.Dir_76_769_EEC_M_U.add(df);\n\t\t\t\tif (svalue.equals(\"8.5\"))\n\t\t\t\t\tor.Dir_76_464_EEC_water.add(df);\n\t\t\t\tif (svalue.equals(\"8.6\"))\n\t\t\t\t\tor.Dir_91_414_EEC_ppp.add(df);\n\t\t\t\tif (svalue.equals(\"8.7\"))\n\t\t\t\t\tor.Dir_98_8_EEC_biocid.add(df);\n\n\t\t\t\tif (svalue.equals(\"9.1\"))\n\t\t\t\t\tor.Hazard_assessment_OECD.add(df);\n\t\t\t\tif (svalue.equals(\"9.2\"))\n\t\t\t\t\tor.Other_risk_assessments.add(df);\n\n\t\t\t\trow++;\n\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\treturn or;\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"Object importAggregate(String filePath, Settings settings) throws IOException;",
"public static Document parse(String filename) throws ParserException {\n\t\tif (filename == null) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile file = new File(filename);\n\t\tif (!file.exists() || !file.isFile()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\tFile subDir = file.getParentFile();\n\t\tif (!subDir.exists() || !subDir.isDirectory()) {\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t// Document should be valid by here\n\t\tDocument doc = new Document();\n\t\tFieldNames field = FieldNames.TITLE;\n\t\tList<String> authors = new LinkedList<String>();\n\t\tString content = new String();\n\t\tboolean startContent = false;\n\n\t\tdoc.setField(FieldNames.FILEID, file.getName());\n\t\tdoc.setField(FieldNames.CATEGORY, subDir.getName());\n\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\t\tString line = reader.readLine();\n\n\t\t\twhile (line != null) {\n\t\t\t\tif (!line.isEmpty()) {\n\t\t\t\t\tswitch (field) {\n\t\t\t\t\tcase TITLE:\n\t\t\t\t\t\tdoc.setField(field, line);\n\t\t\t\t\t\tfield = FieldNames.AUTHOR;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase AUTHOR:\n\t\t\t\t\tcase AUTHORORG:\n\t\t\t\t\t\tif (line.startsWith(\"<AUTHOR>\") || !authors.isEmpty()) {\n\t\t\t\t\t\t\tString[] seg = null;\n\t\t\t\t\t\t\tString[] author = null;\n\n\t\t\t\t\t\t\tline = line.replace(\"<AUTHOR>\", \"\");\n\t\t\t\t\t\t\tseg = line.split(\",\");\n\t\t\t\t\t\t\tauthor = seg[0].split(\"and\");\n\t\t\t\t\t\t\tauthor[0] = author[0].replaceAll(\"BY|By|by\", \"\");\n\t\t\t\t\t\t\t// Refines author names\n\t\t\t\t\t\t\tfor (int i = 0; i < author.length; ++i) {\n\t\t\t\t\t\t\t\tauthor[i] = author[i].trim();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tauthor[author.length - 1] = author[author.length - 1]\n\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim();\n\t\t\t\t\t\t\tauthors.addAll(Arrays.asList(author));\n\n\t\t\t\t\t\t\t// Saves author organization\n\t\t\t\t\t\t\tif (seg.length > 1) {\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHORORG, seg[1]\n\t\t\t\t\t\t\t\t\t\t.replace(\"</AUTHOR>\", \"\").trim());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (line.endsWith(\"</AUTHOR>\")) {\n\t\t\t\t\t\t\t\t// Saves author\n\t\t\t\t\t\t\t\tdoc.setField(FieldNames.AUTHOR, authors\n\t\t\t\t\t\t\t\t\t\t.toArray(new String[authors.size()]));\n\t\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// This should be a PLACE\n\t\t\t\t\t\t\tfield = FieldNames.PLACE;\n\t\t\t\t\t\t}\n\t\t\t\t\tcase PLACE:\n\t\t\t\t\t\tif (!line.contains(\"-\")) {\n\t\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString[] seg = line.split(\"-\");\n\t\t\t\t\t\t\tString[] meta = seg[0].split(\",\");\n\t\t\t\t\t\t\tif (seg.length != 0 && !seg[0].isEmpty()) {\n\n\t\t\t\t\t\t\t\tif (meta.length > 1) {\n\t\t\t\t\t\t\t\t\tdoc.setField(\n\t\t\t\t\t\t\t\t\t\t\tFieldNames.PLACE,\n\t\t\t\t\t\t\t\t\t\t\tseg[0].substring(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\tseg[0].lastIndexOf(\",\"))\n\t\t\t\t\t\t\t\t\t\t\t\t\t.trim());\n\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\tmeta[meta.length - 1].trim());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmeta[0] = meta[0].trim();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tnew SimpleDateFormat(\"MMM d\",\n\t\t\t\t\t\t\t\t\t\t\t\tLocale.ENGLISH).parse(meta[0]);\n\t\t\t\t\t\t\t\t\t\t// This is a news date\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.NEWSDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tmeta[0]);\n\t\t\t\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\t\t\t\t// This is a place\n\t\t\t\t\t\t\t\t\t\tdoc.setField(FieldNames.PLACE, meta[0]);\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\t\t\t\t\t\tfield = FieldNames.CONTENT;\n\t\t\t\t\tcase CONTENT:\n\t\t\t\t\t\tif (!startContent) {\n\t\t\t\t\t\t\t// First line of content\n\t\t\t\t\t\t\tString[] cont = line.split(\"-\");\n\t\t\t\t\t\t\tif (cont.length > 1) {\n\t\t\t\t\t\t\t\tfor (int i = 1; i < cont.length; ++i) {\n\t\t\t\t\t\t\t\t\tcontent += cont[i];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstartContent = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontent += \" \" + line;\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t\tdoc.setField(FieldNames.CONTENT, content);\n\t\t\tdoc.setField(FieldNames.LENGTH, Integer.toString(content.trim().split(\"\\\\s+\").length));\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ParserException();\n\t\t}\n\n\t\treturn doc;\n\t}",
"private void deserializeFile(File file) {\n\t\ttry {\n\t\t\tFileInputStream fileinputStream = new FileInputStream(file); // stream to read file from\n\t\t\tObjectInputStream in = new ObjectInputStream(fileinputStream); // stream to read objects from, converted from file stream\n\n\t\t\t@SuppressWarnings(\"unchecked\") // not known for sure the type of the deserialized object\n\t\t\tList<Project> projects = (List<Project>) in.readObject();\n\t\t\tmyProjects = projects;\n\t\t\tpcs.firePropertyChange(\"Import All\", null, projects);\n\t\t\t\n\t\t\tin.close(); \n\t\t\tfileinputStream.close(); \n\t\t} catch (IOException | ClassNotFoundException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: file could not be read.\");\n\t\t}\n\t}",
"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}",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void buildListGems(String filename) throws ServiceException {\n\t\ttry {\n\t\t\treader.parse(filename);\n\t\t} catch (IOException e) {\n\t\t\tLOG.debug(\"can't find file on path \" + filename);\n\t\t\tthrow new ServiceException(\"wrong_file\");\n\t\t} catch (SAXException e) {\n\t\t\tLOG.debug(\"error in XML file\");\n\t\t\tthrow new ServiceException(\"wrong_xml\");\n\t\t}\n\t\tgems = handler.getGems();\n\t}",
"public Object readObject(File file, int format) throws IOException, FileNotFoundException;",
"public static Repository openRepository() throws IOException {\n\t\treturn new FileRepositoryBuilder().setGitDir(new File(\"C:\\\\Users\\\\ukrolmi\\\\eclipse-workspace\\\\testing\\\\.git\")).build();\n\t}",
"public void pageElementsLoader(String fileName) {\n InputStream inpStream = RepositoryParser.class.getClassLoader().getResourceAsStream(fileName);\n JSONObject locatorRepository = null;\n try {\n locatorRepository = new JSONObject(IOUtils.toString(inpStream, \"UTF-8\"));\n } catch (JSONException e) {\n Log.error(\"Error in parsing JSOn file \" + e.getMessage());\n } catch (IOException e) {\n Log.error(\"IO Exception encounred \" + e.getMessage());\n } finally {\n CustomAssert.assertTrue(locatorRepository != null, \"Error in reading locator repository \"\n + fileName);\n }\n\n JSONArray pageArray = locatorRepository.optJSONArray(\"pages\");\n CustomAssert.assertTrue(pageArray != null, \"Error in parsing locator repository pages \"\n + fileName);\n\n putObjectFromPages(pageArray);\n }",
"SourceBuilder createRepository();",
"public void parse(String fileName) throws Exception;",
"private void loadFromFile(){\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Countbook>>() {}.getType();\n countbookList = gson.fromJson(in, listType);\n } catch (FileNotFoundException e) {\n countbookList = new ArrayList<Countbook>();\n }\n }",
"public DaoFileImpl(String path) {\r\n\t\tgson = new Gson();\r\n\t\tthis.path = path;\r\n\t\tthis.daoMap = new HashMap<>();\r\n\t\treadMapFromFile();\r\n\t}",
"private void initGitRepository() throws IOException, GitAPIException {\n \t\tif (gitDir == null) {\n \t\t\tSystem.err.println(\"Warning: no output directory \"\n \t\t\t\t+ \"given for git repository; simulating result\");\n \t\t\treturn;\n \t\t}\n \n \t\tif (!gitDir.exists()) {\n \t\t\tfinal boolean success = gitDir.mkdirs();\n \t\t\tif (!success) {\n \t\t\t\tthrow new IOException(\"Could not create Git output directory: \" +\n \t\t\t\t\tgitDir);\n \t\t\t}\n \t\t}\n \n \t\tfinal InitCommand init = Git.init();\n \t\tinit.setDirectory(gitDir);\n \t\tinit.call();\n \n \t\tgit = Git.open(gitDir);\n \n \t\tauthor = new PersonIdent(git.getRepository());\n \n \t\tasciiImageFile = new File(gitDir, ASCII_IMAGE_FILE);\n \t\tcalendarDataFile = new File(gitDir, CALENDAR_DATA_FILE);\n \t}",
"public OwlimRepositoryFactory() {\n\t\t\tthis(IWBFileUtil.getFileInDataFolder(Config.getConfig()\n\t\t\t\t\t\t\t.getRepositoryName()).getAbsolutePath()); \n\t\t}",
"public void stockLoad() {\n try {\n File file = new File(stockPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()) {\n String data = scanner.nextLine();\n String[] userData = data.split(separator);\n Stock stock = new Stock();\n stock.setProductName(userData[0]);\n int stockCountToInt = Integer.parseInt(userData[1]);\n stock.setStockCount(stockCountToInt);\n float priceToFloat = Float.parseFloat(userData[2]);\n stock.setPrice(priceToFloat);\n stock.setBarcode(userData[3]);\n\n stocks.add(stock);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"private void fileToPoSTags(String filePath,int version){\n Log.log(\"Reading TreeBank file <\" + filePath +\">\");\n\n FileReader fr = null;\n BufferedReader br = null;\n\n try{\n fr = new FileReader(filePath);\n br = new BufferedReader(fr);\n\n String currentLine;\n String[] columns;\n\n Tag tag1 = null;\n Tag tag2;\n String word;\n\n Integer numRow;\n while((currentLine = br.readLine()) != null){\n columns = currentLine.split(\"\\t\");\n numRow = getIntegerString(columns[0]);\n if(numRow != null && numRow >= 1){\n if(numRow == 1) {\n tag1 = Tag.valueOf(\"START\");\n saveTag(tag1);\n }\n try{\n tag2 = Tag.valueOf(columns[3]);\n saveTag(tag2);\n word = columns[1];\n switch (version){\n case 1:\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n break;\n case 2:\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n else if(Character.isUpperCase(word.charAt(0)))\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 3:\n\n if(tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n else{\n if(Character.isUpperCase(word.charAt(0))){\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n }else{\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(\n word.substring(0,1).toUpperCase()\n +word.substring(1),tag2));\n }\n\n }\n\n break;\n case 4:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word,tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n case 5:\n\n if(!tag2.equals(Tag.PROPN))\n savePoSTag(new PoSTag(word.toLowerCase(),tag2));\n savePoSTag(new PoSTag(word,tag2));\n break;\n\n }\n saveBigram(new BiGram(tag1,tag2));\n tag1 = tag2;\n }catch (IllegalArgumentException e){\n e.printStackTrace();\n }\n }\n }\n\n }catch (IOException e){\n e.printStackTrace();\n }finally {\n UtilitiesIO.closeFile(fr,br);\n }\n }",
"private static void indexFromJarFile(InputStream in) throws IOException {\n\n\t\tZipInputStream zis = new ZipInputStream(in);\n\t\tZipEntry e;\n\n\t\twhile((e = zis.getNextEntry()) != null) {\n\n\t\t\tString name = e.getName();\n\t\t\tzis.closeEntry();\n\n\t\t\tif(name.contains(relationRepositoryPath) && name.endsWith(classExtension)) {\n\n\t\t\t\taddToIndex(name.replace(jarFileRelationRepositoryPath, \"\"));\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t}",
"private void parse() throws IOException {\r\n\t\tClassLoader cl = getClass().getClassLoader();\r\n\t\tFile file = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t\tFile file2 = new File(cl.getResource(\"./OBOfiles/go.obo\").getFile());\r\n\t FileReader fr = new FileReader(file);\r\n\t FileReader fr2 = new FileReader(file2);\r\n\t\tin=new BufferedReader(fr);\r\n\t\tin2=new BufferedReader(fr2);\r\n\t\tString line;\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) parseTerm();\r\n\t\t}\r\n\t\tin.close();\r\n\t\tfr.close();\r\n\t\t\r\n\t\t//terms.printTerms();\r\n\t\tbuffer=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.equals(\"[Term]\")) createEdges();\r\n\t\t}\r\n\t\tin2.close();\r\n\t\tfr2.close();\r\n\t\tLOGGER.info(\"Finished Building DAGs!\");\r\n\t\t\r\n\t}",
"public void readFile()\n {\n try {\n fileName = JOptionPane.showInputDialog(null,\n \"Please enter the file you'd like to access.\"\n + \"\\nHint: You want to access 'catalog.txt'!\");\n \n File aFile = new File(fileName);\n Scanner myFile = new Scanner(aFile);\n \n String artist, albumName; \n while(myFile.hasNext())\n { //first we scan the document\n String line = myFile.nextLine(); //for the next line. then we\n Scanner myLine = new Scanner(line); //scan that line for our info.\n \n artist = myLine.next();\n albumName = myLine.next();\n ArrayList<Track> tracks = new ArrayList<>();\n \n while(myLine.hasNext()) //to make sure we get all the tracks\n { //that are on the line.\n Track song = new Track(myLine.next());\n tracks.add(song);\n }\n myLine.close();\n Collections.sort(tracks); //sort the list of tracks as soon as we\n //get all of them included in the album.\n Album anAlbum = new Album(artist, albumName, tracks);\n catalog.add(anAlbum);\n }\n myFile.close();\n }\n catch (NullPointerException e) {\n System.err.println(\"You failed to enter a file name!\");\n System.exit(1);\n }\n catch (FileNotFoundException e) {\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n }",
"public static void create(File collectionsFile) throws IOException\n\t{\t\t\n\t\tHashMap books = null;\n\t\t\n\t\t// If updateOnly is true then we are only updating the existing\n\t\t// JAD/JAR files and won't be parsing the source text\n\t\tif (!updateOnly)\n\t\t{\n\t\t\t// Extract xml file from the collectionsFile property: Source-Text\n\t\t\tString sourceTextPath = extractSourceTextPath(collectionsFile);\n\n // Extract the source file type from the collectionsFile property: SourceFormat\n sourceFormatType = extractSourceFormatType(collectionsFile);\n if (sourceFormatType.equals(SourceFormatType.unknown))\n {\n //do extra testing on the file to see if the format can be determined\n //this is for backward compatibility for GBC 2.2.6 version and prior\n //which did not specify the Source-Format property\n sourceFormatType = SourceFormatTypeRetry(baseSourceDirectory, sourceTextPath);\n }\n\n\t\t\t// Base source directory can be overridden with the -d argument\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t\t/*if (baseSourceDirectory == null)\n\t\t\t{\n\t\t\t\t// By default the sourceTextPath is relative to the collectionsFile\n\t\t\t\t//baseSourceDirectory = \"\" + collectionsFile.getParent();\n baseSourceDirectory = collectionsFile.getAbsolutePath();\n baseSourceDirectory = baseSourceDirectory.substring(0, baseSourceDirectory.length() - collectionsFile.getName().length());\n\t\t\t}*/\n\t\t\tif (sourceFormatType == SourceFormatType.osis\n || sourceFormatType == SourceFormatType.thml)\n {\n File xmlFile = new File(baseSourceDirectory, sourceTextPath);\n books = parseXml(xmlFile);\n }\n else if (sourceFormatType == SourceFormatType.usfm)\n {\n extractCommonFields(collectionsFile);\n //make sure that the file extension is retrieved\n extractUSFMfields(collectionsFile);\n books = parseUSFM(collectionsFile, baseSourceDirectory, sourceTextPath, sTitleTag);\n }\n else\n {\n //dump out message saying that it cannot determine the file format type\n System.out.println(\"Error: Could not determine Bible format type, \" + sourceFormatType + \". Please use the 'Source-Format'\");\n System.out.println(\"property in your collections file.\");\n return;\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Allow the relative path in the collections file to work for updateing\n\t\t\t// the icon as well.\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t}\n\t\t\n\t\tif (books != null || updateOnly)\n\t\t{\n\t\t\tparseUiProperties();\n\t\t\t\n\t\t\t// Parse the collections file\n\t\t\tVector collections = parseCollectionsFile(collectionsFile, books);\n\t\t\t\n\t\t\tif (customFontString != null)\n\t\t\t{\n\t\t\t\tgenerateCustomFont(customFontString, collectionsFile, books);\n\t\t\t}\n\t\t\t\n\t\t\t// Open GoBibleCore based on MIDP version \n\t\t\tString goBibleJarFileName = \"GoBibleCore/GoBibleCore2.jar\";\n\t\t\t\n\t\t\t// Set some fields based on the MIDP version\n\t\t\t// Version 2.4.0 has removed MIDP-1.0 as an option\n//\t\t\tif (midpVersion.equals(\"MIDP-1.0\"))\n//\t\t\t{\n//\t\t\t\tversionString = \"1.\" + SUB_VERSION;\n//\t\t\t\tgoBibleJarFileName = \"GoBibleCore/GoBibleCore1.jar\";\n//\t\t\t}\n\t\t\t\n\t\t\t// Work out the current directory of the GoBibleCreator.jar\n\t\t\tFile jarDirectory = getJarDirectory();\n\t\t\tFile jarFile = new File(jarDirectory, goBibleJarFileName);\n\t\t\t\n\t\t\tJarFile goBibleJar = new JarFile(jarFile);\n\t\t\t\n\t\t\t// Write out the Go Bible data files into the same directory as the collections file\n\t\t\twriteCollections(collectionsFile.getParentFile(), collections, books, goBibleJar);\n\t\t}\n\t}",
"public Payroll(String fileName, EmployeeRepository employee, Company company) throws IOException, ClassNotFoundException {\r\n super(fileName);\r\n this.historic = new Repository(\"Historico de folhas .dat\") {} ;\r\n \r\n this.employee = employee;\r\n this.company = company;\r\n \r\n }",
"public void load(String filename) {\n\t\tsetup();\n\t\tparseOBJ(getBufferedReader(filename));\n\t}",
"private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }",
"public void Parse()\n {\n String prepend = \"urn:cerner:mid:core.personnel:c232:\";\n try{\n\n BufferedReader br = new BufferedReader(new FileReader(new File(path)));\n\n String line;\n\n while ((line = br.readLine()) != null)\n {\n line = line.trim();\n String[] lines = line.split(\",\");\n for (String entry : lines)\n {\n entry = entry.trim();\n entry = entry.replace(prepend, replace);\n System.out.println(entry+\",\");\n }\n\n }\n \n br.close();\n }catch(IOException IO)\n {\n System.out.println(IO.getStackTrace());\n } \n \n }",
"public MavenDataObject createMavenDataObject(String line) {\n\n System.out.println(\"Processing Line: \" + line);\n\n line = line.substring(1);//Remove first slash.\n\n String[] pathLayouts = line.split(\"/\");\n String jarName = pathLayouts[pathLayouts.length - 1];\n String version = pathLayouts[pathLayouts.length - 2];\n String artifactID = pathLayouts[pathLayouts.length - 3];\n\n String groupID = \"\";\n for (int i = 0; i < pathLayouts.length - 3; i++) {\n groupID += pathLayouts[i] + \".\";\n }\n\n groupID = groupID.substring(0, groupID.length() - 1);\n\n System.out.println(\"jarName: \" + jarName);\n System.out.println(\"version: \" + version);\n System.out.println(\"artifactID: \" + artifactID);\n System.out.println(\"groupID: \" + groupID);\n\n return new MavenDataObject(groupID, artifactID, jarName, version, new ArrayList());\n }",
"private void parse() {\n if (workingDirectory != null) {\n Parser.initConstants(this, workingDirectory, remainderFile);\n Parser.parseIt();\n workingDirectory = null;\n remainderFile = null;\n jbParse.setEnabled(false);\n }\n }",
"TRepo createRepo();",
"public Song parseSongs(Path path, String extension){\n\t\tJSONParser parser = new JSONParser();\n\t\ttry (BufferedReader reader = Files.newBufferedReader(path, Charset.forName(\"UTF-8\"))){\n\n\t\t\tJSONObject contents = (JSONObject) parser.parse(reader);\n\t\t\tSong song = new Song(contents);\n\t\t\t\n\t\t\treturn song;\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"public void readFile(File inputFile) throws FileNotFoundException, IOException, ClassNotFoundException {\n\n ArrayList<Student> studentList = null;\n int noOfStudents = 1; int noOfProjects = 0;\n int count = 1;\n String title; String school; String supervisor; Project project = null; \n ArrayList<Project> projectList = new ArrayList<>();\n\n Scanner scan = new Scanner(new FileReader(inputFile));\n String line = null;\n\n while (scan.hasNextLine()) {\n studentList = new ArrayList<>();\n \n if (count == 1) {\n line = scan.nextLine();\n noOfProjects = Integer.parseInt(line);\n System.out.println(line);\n }\n\n line = scan.nextLine();\n String[] projectInfo = line.split(\",\", 5);\n noOfStudents = Integer.parseInt(projectInfo[3]);\n String[] studentInfo = projectInfo[4].split(\",\");\n\n Student student = null;\n \n for (int k = 0; k < studentInfo.length; k+=4) {\n //new Student(AdminNo, Name, Course, Gender)\n student = new Student(studentInfo[k], studentInfo[k+1], studentInfo[k+2], studentInfo[k+3]);\n studentList.add(student); //Add new Student to List\n }\n\n title = projectInfo[0];\n school = projectInfo[1];\n supervisor = projectInfo[2];\n project = new Project(title, school, supervisor, noOfStudents, studentList);\n \n System.out.println(line);\n count++;\n \n projectList.add(project);\n }\n\n for (Student stud: studentList) {\n System.out.println(stud.getAdminNo() + stud.getCourse() + stud.getGender() + stud.getName());\n }\n \n writeToFile(project);\n \n scan.close();\n }",
"public static FileStateRepository fileStateRepository(File fileStore) {\n return fileStateRepository(fileStore, new HashMap<>());\n }",
"public ArrayList<Operation> parse(String filename) {\n\tint ref, op, arg;\n\tArrayList<Operation> retVal;\n\tBufferedReader br;\n\tString line;\n\tString[] lineContent;\n\tFile file = new File(filename);\n\tretVal = new ArrayList<Operation>();\n\ttry {\n\t br = new BufferedReader(new FileReader(file));\n\t while ((line = br.readLine()) != null) {\n\t\tlineContent = line.split(\" \");\n\t\tref = Integer.parseInt(lineContent[0]);\n\t\top = Integer.parseInt(lineContent[1]);\n\t\targ = Integer.parseInt(lineContent[2]);\n\n\t\tretVal.add(new Operation(ref, op, arg));\n\t }\n\t br.close();\n\t return retVal;\n\t} catch (Exception e) {\n\t return null;\n\t}\n }",
"public BpmnModelReader(String filePath) {\n\t\tloadedFile = new File(filePath);\n\t}",
"public ObjReader(String filename){\n file = filename;\n }",
"static public Map<String, Library> generateLibrariesFromRepo(String repoDir) {\r\n try {\r\n\r\n HashMap<String, Library> libraries = new HashMap<String, Library>();\r\n\r\n // get all third party libraries\r\n // give me all the first level directories of the repo\r\n // this CAN BE DONE REMOTELY TOO !!! - using v3 githup json api !!!\r\n List<File> dirs = FindFile.find(repoDir, \"^[^.].*[^-_.]$\", false, true);\r\n log.info(\"found {} files\", dirs.size());\r\n for (int i = 0; i < dirs.size(); ++i) {\r\n File f = dirs.get(i);\r\n if (f.isDirectory()) {\r\n try {\r\n // log.info(\"looking in {}\", f.getAbsolutePath());\r\n List<File> subDirsList = FindFile.find(f.getAbsolutePath(), \".*\", false, true);\r\n ArrayList<File> filtered = new ArrayList<File>();\r\n for (int z = 0; z < subDirsList.size(); ++z) {\r\n File dir = subDirsList.get(z);\r\n if (dir.isDirectory()) {\r\n filtered.add(dir);\r\n }\r\n }\r\n\r\n File[] subDirs = filtered.toArray(new File[filtered.size()]);\r\n Arrays.sort(subDirs);\r\n // get latest version\r\n File ver = subDirs[subDirs.length - 1];\r\n log.info(\"adding third party library {} {}\", f.getName(), ver.getName());\r\n libraries.put(getKey(f.getName(), ver.getName()), new Library(getKey(f.getName(), ver.getName())));\r\n } catch (Exception e) {\r\n log.error(\"folder {} is hosed !\", f.getName());\r\n Logging.logError(e);\r\n }\r\n\r\n } else {\r\n log.info(\"skipping file {}\", f.getName());\r\n }\r\n }\r\n return libraries;\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n return null;\r\n }",
"public void parse() {\n File sourceFile = new File(DEFAULT_DS_FILE_PATH);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory\n .newInstance();\n documentBuilderFactory.setNamespaceAware(true);\n DocumentBuilder builder = null;\n try {\n builder = documentBuilderFactory.newDocumentBuilder();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n Document document = null;\n try {\n document = builder.parse(sourceFile);\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n XPathFactory xpathFactory = XPathFactory.newInstance();\n XPath xpath = xpathFactory.newXPath();\n\n //read the database properties and assign to local variables.\n XPathExpression expression = null;\n Node result = null;\n try {\n expression = xpath.compile(DRIVER_CLASS_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n driverClassName = result.getTextContent();\n expression = xpath.compile(CONNECTION_URL_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n connectionUrl = result.getTextContent();\n expression = xpath.compile(USER_NAME_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n userName = result.getTextContent();\n expression = xpath.compile(PASSWORD_XPATH);\n result = (Node) expression.evaluate(document, XPathConstants.NODE);\n password = result.getTextContent();\n\n } catch (XPathExpressionException e) {\n e.printStackTrace();\n }\n System.out.println(driverClassName);\n System.out.println(connectionUrl);\n try {\n\t\t\tSystem.out.println(userName.getBytes(\"EUC-JP\"));\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n System.out.println(password);\n }",
"protected void readProperties() throws RepositoryException {\n try {\n log.debug(\"Reading meta file: \" + this.metaFile);\n this.properties = new HashMap();\n BufferedReader reader = new BufferedReader(new FileReader(this.metaFile));\n String line;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n String name;\n String typeName;\n String value;\n try {\n name = line.substring(0, line.indexOf(\"<\")).trim();\n typeName = line.substring(line.indexOf(\"<\")+1, line.indexOf(\">\")).trim();\n value = line.substring(line.indexOf(\":\")+1).trim();\n } catch (StringIndexOutOfBoundsException e) {\n throw new RepositoryException(\"Error while parsing meta file: \" + this.metaFile \n + \" at line \" + line);\n }\n Property property = new DefaultProperty(name, PropertyType.getType(typeName), this);\n property.setValueFromString(value);\n this.properties.put(name, property);\n }\n reader.close();\n } catch (IOException e) {\n throw new RepositoryException(\"Error while reading meta file: \" + metaFile + \": \" \n + e.getMessage());\n }\n }",
"public String parse(File file);",
"abstract public Entity[] getWorkDataFromFile(String filename)\n \tthrows IOException, InvalidStatusException;",
"public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }",
"public HPOParser() throws PhenoteFxException {\n File dir = Platform.getPhenoteFXDir();\n String basename=\"hp.obo\";\n this.hpoPath = new File(dir + File.separator + basename);\n this.hpoMap=new HashMap<>();\n hpoName2IDmap=new HashMap<>();\n this.hpoSynonym2PreferredLabelMap=new HashMap<>();\n inputFile();\n }",
"void process(Document document, Repository repository) throws Exception;",
"public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }",
"public HPOParser(String hpoPath) throws PhenoteFxException {\n this.hpoPath = new File(hpoPath);\n this.hpoMap=new HashMap<>();\n hpoName2IDmap=new HashMap<>();\n this.hpoSynonym2PreferredLabelMap=new HashMap<>();\n inputFile();\n }",
"public void load (IFile file) throws Exception;",
"public Account load() throws IOException {\n Account account = new Account();\n try {\n FileReader fileReader = new FileReader(fileName);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n //if (line.contains(\"#\")) { continue; }\n String[] info = line.split(\" @ \");\n\n switch (info[0]) {\n case \"INIT\":\n account.setToInitialize(Boolean.parseBoolean(info[1]));\n break;\n case \"BS\":\n account.setBaseSavings(Float.parseFloat((info[1])));\n break;\n case \"INC\":\n parseIncome(info, account);\n break;\n case \"EXP\":\n parseExpenditure(info, account);\n break;\n case \"G\":\n parseGoal(info, account);\n break;\n case \"INS\":\n parseInstalment(info, account);\n break;\n case \"LOA\":\n parseLoan(info, account);\n break;\n case \"BAN\":\n parseBankAccount(info, account);\n break;\n default:\n throw new DukeException(\"OOPS!! Your file has been corrupted/ input file is invalid!\");\n }\n }\n bufferedReader.close();\n } catch (FileNotFoundException err) {\n final File parentDir = new File(\"dataFG\");\n parentDir.mkdir();\n final String hash = \"moneyAccount\";\n final String fileName = hash + \".txt\";\n final File file = new File(parentDir, fileName);\n file.createNewFile();\n } catch (IOException | DateTimeParseException | DukeException e) {\n e.printStackTrace();\n }\n return account;\n }",
"public MessagesFileRepository(String fileName, Validator<Message> validator,\n Repository<Long, User> repository) {\n super(fileName, validator, repository);\n }",
"public void setRepository(String repository) {\n this.repository = repository;\n }",
"public void setRepository(String repository) {\n this.repository = repository;\n }",
"public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(fileName);\n\n Node root = document.getDocumentElement();\n NodeList nodeList = root.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE){\n Element element = (Element) node;\n Department department = createDepartmentFromElement(element);\n try{\n super.save(department);\n } catch (RepositoryException | ValidatorException e) {\n e.printStackTrace();\n }\n }\n }\n } catch (SAXException | ParserConfigurationException | IOException e) {\n e.printStackTrace();\n }\n }",
"public static ArrayList readJStorFile(String filename) {\n ArrayList bibitems = new ArrayList();\n File f = new File(filename);\n if (!f.exists() || !f.canRead() || !f.isFile()) {\n System.err.println(\"Error: \" + filename + \" is not a valid file and|or is not readable.\");\n return null;\n }\n \n String s = \"\";\n try {\n BufferedReader in = new BufferedReader(new FileReader(filename));\n \n while (!s.startsWith(\"Item Type\"))\n s = in.readLine();\n \n mainloop: while ((s = in.readLine()) != null) {\n if (s.equals(\"\"))\n continue;\n if (s.startsWith(\"-----------------------------\"))\n break mainloop;\n String[] fields = s.split(\"\\t\");\n BibtexEntry be = new BibtexEntry(Util.createNeutralId());\n try {\n if (fields[0].equals(\"FLA\"))\n be.setType(BibtexEntryType.getType(\"article\"));\n setIfNecessary(be, \"title\", fields[2]);\n setIfNecessary(be, \"author\", fields[4].replaceAll(\"; \", \" and \"));\n setIfNecessary(be, \"journal\", fields[7]);\n setIfNecessary(be, \"volume\", fields[9]);\n setIfNecessary(be, \"number\", fields[10]);\n String[] datefield = fields[12].split(\" \");\n setIfNecessary(be, \"year\", datefield[datefield.length-1]);\n //for (int i=0; i<fields.length; i++)\n // Util.pr(i+\": \"+fields[i]);\n setIfNecessary(be, \"pages\", fields[13].replaceAll(\"-\", \"--\"));\n setIfNecessary(be, \"url\", fields[14]);\n setIfNecessary(be, \"issn\", fields[15]);\n setIfNecessary(be, \"abstract\", fields[16]);\n setIfNecessary(be, \"keywords\", fields[17]);\n setIfNecessary(be, \"copyright\", fields[21]);\n } catch (ArrayIndexOutOfBoundsException ex) {}\n bibitems.add(be);\n }\n \n } catch (IOException ex) {\n Util.pr(\"Err: \"+s);\n }\n return bibitems;\n }",
"public static void store(Repository repository, File file,\n RDFFormat format) throws Exception {\n try (FileOutputStream outputStream = new FileOutputStream(file)) {\n final RDFWriter writer = Rio.createWriter(format, outputStream);\n Repositories.consume(repository, (connection) -> {\n connection.export(writer);\n });\n }\n }",
"private void setBasketRepository() {\n ObjectMapper mapper = new ObjectMapper();\n TypeReference<List<Basket>> typeReference = new TypeReference<>() {\n };\n InputStream inputStream = TypeReference.class.getResourceAsStream(\"/json/data_demo.json\");\n try {\n List<Basket> invoices = mapper.readValue(inputStream, typeReference);\n basketRepository.saveAll(invoices);\n log.info(\"Saved in database successfully!\");\n } catch (IOException e) {\n log.error(\"Unable to save in database: {}\", e.getMessage());\n }\n }",
"private void setUp(String file) {\n unorderedList = new LinkedList<>();\n orderedList = new SortedLinkedList<>();\n\n try {\n input = new Scanner(new BufferedReader(new FileReader(file)));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public interface Repository {\n public void addPrg(PrgState prg);\n public List<PrgState> getAll();\n public void setAll(List<PrgState> _newPrgs);\n public void removeCurrent();\n public void logPrgStateExec() throws FileNotFoundException, UnsupportedEncodingException;\n public void logPrgStateExec(PrgState p) throws FileNotFoundException;\n public void serialize(PrgState prgState,String fname);\n public PrgState deserialize(String fname);\n PrgState getCurrent();\n}",
"public void readFromFile() {\n\n\t}",
"public static void populateDB(String fileName) {\n String dataString = Util.readStringFromFile(new File(fileName));\n ParseState parseState = new ParseState(dataString);\n while (parseState.hasMoreLines()) {\n String line = parseState.getNextLine();\n LineParser lineParser = null;\n if (line.matches(\"^objects\\\\s*\\\\{$\")) {\n lineParser = new ObjectLineParser();\n } else if (line.matches(\"^links\\\\s*\\\\{$\")) {\n lineParser = new LinkLineParser();\n } else if (line.matches(\"^attributes\\\\s*\\\\{$\")) {\n lineParser = new AttributeDefLineParser();\n } else if (line.matches(\"^containers\\\\s*\\\\{$\")) {\n lineParser = new ContainerLineParser();\n } else {\n throw new IllegalArgumentException(\"Unknown top-level category: \" + line);\n }\n parseBlock(parseState, lineParser);\n }\n }",
"public interface ReaderFromFile {\n\t\n\tpublic List<Data> readDataFromFile (String filename);\n}",
"public JsonParser createParser(File f)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 755 */ IOContext ctxt = _createContext(f, true);\n/* 756 */ InputStream in = new FileInputStream(f);\n/* 757 */ return _createParser(_decorate(in, ctxt), ctxt);\n/* */ }",
"static void constructUnionFindDataStructure() {\n\n\t\t// construct a scanner for an input file\n\t\tScanner scanner = null;\n\t\ttry {\n\n\t\t\tscanner = new Scanner(new File(\"tinyUF.txt\"));\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// read the number of objects from the standard input\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\n\t\t// initialise a union-find data structure\n\t\tUnionFind unionFind = new UnionFind(n);\n\n\t\t/* Repeatedly read in pairs of integers (object identifiers). If they are not yet connected, connect them\n\t\t * and print out the pair */\n\n\t\twhile (scanner.hasNextLine()) {\n\n\t\t\t// read integers\n\t\t\tString pair = scanner.nextLine();\n\t\t\tString[] objects = pair.split(\" \");\n\t\t\tint p = Integer.parseInt(objects[0]);\n\t\t\tint q = Integer.parseInt(objects[1]);\n\n\t\t\t// connect them if not already\n\t\t\tif (!unionFind.connected(p, q)) {\n\n\t\t\t\tunionFind.union(p, q);\n\t\t\t\tSystem.out.println(p + \" \" + q);\n\t\t\t}\n\t\t}\n\t}",
"public void setRepositoryFileName(String repositoryFileName) {\n this.repositoryFileName = repositoryFileName;\n }"
] | [
"0.5894255",
"0.5870675",
"0.5762605",
"0.5573224",
"0.54574233",
"0.53946483",
"0.53750676",
"0.53331983",
"0.53329766",
"0.5332889",
"0.5324538",
"0.53158563",
"0.53109",
"0.52934057",
"0.52804023",
"0.52112824",
"0.5144936",
"0.5081205",
"0.5077783",
"0.5065217",
"0.5059346",
"0.50446504",
"0.50403184",
"0.5021532",
"0.5020538",
"0.5006467",
"0.4994377",
"0.4986249",
"0.4984532",
"0.496854",
"0.49324453",
"0.49216145",
"0.4919015",
"0.49172592",
"0.49023452",
"0.4901892",
"0.4887042",
"0.48730087",
"0.48728952",
"0.48719013",
"0.48696667",
"0.486693",
"0.48577216",
"0.4846931",
"0.4843092",
"0.48243687",
"0.4821701",
"0.48215386",
"0.48182344",
"0.48169032",
"0.48112538",
"0.48073462",
"0.4800949",
"0.48000675",
"0.4784521",
"0.47829434",
"0.47666234",
"0.4764961",
"0.47645673",
"0.47588673",
"0.47501954",
"0.4738097",
"0.4736926",
"0.47303706",
"0.4723676",
"0.47236732",
"0.47165707",
"0.47153005",
"0.47136065",
"0.47132555",
"0.47072226",
"0.47058058",
"0.4696531",
"0.469336",
"0.46932507",
"0.46928662",
"0.46861827",
"0.46858215",
"0.46843892",
"0.46768618",
"0.4674786",
"0.46743843",
"0.46737948",
"0.46734712",
"0.46690536",
"0.46579656",
"0.46552786",
"0.46552786",
"0.4652473",
"0.46363342",
"0.46352774",
"0.4632397",
"0.46225888",
"0.46177405",
"0.4613494",
"0.46114814",
"0.46058935",
"0.46045098",
"0.46028253",
"0.46011233"
] | 0.55822533 | 3 |
Gets all the mapped classes | public static Set<String> mappedClasses(Collection<DescriptorRepository> descriptors) throws Exception {
final Set<String> mappedClasses = new HashSet<String>();
for (DescriptorRepository dr : descriptors) {
for (Map.Entry<String, ClassDescriptor> entry : ((Map<String, ClassDescriptor>) dr.getDescriptorTable()).entrySet()) {
final Collection<String> extents = entry.getValue().getExtentClassNames();
if (extents != null && !extents.isEmpty()) {
mappedClasses.addAll(extents);
} else {
mappedClasses.add(entry.getKey());
}
}
}
return mappedClasses;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Class<?>> getManagedClasses();",
"@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepository.findAll();\n\t}",
"@Override\n\tpublic List<Classe> getClasses() {\n\t\treturn classeRepo.findAll();\n\t}",
"@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}",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"public List<Class<?>> getKnownClasses();",
"public final ClassMap getUsedClassMap()\n {\n return useClassMap;\n }",
"public abstract List<String> scanAllClassNames();",
"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 Set<Class<?>> getScanClasses();",
"public Iterator<String> listAllandAnonClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses());\r\n\t}",
"public abstract Class<?>[] getCoClasses();",
"public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}",
"Class<?>[] getHandledClasses();",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\n }",
"protected java.util.Map get_ChildClasses()\n {\n return __mapChildren;\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 }",
"public static synchronized Set<Class<?>> keySet() {\n\t\treturn ClassRegistry.dictionary.keySet();\n\t}",
"private static ImmutableList<Class<?>> applicationEntities() {\n List<String> paths = new ArrayList<>(List.of(PREFIX_STRING));\n if (additionalPaths != null) {\n paths.addAll(additionalPaths);\n }\n\n final List<Class<?>> collect = paths\n .stream()\n .map(path -> {\n logger.info(\"Scanning {} for Hibernate entities\", path);\n final Reflections reflections = new Reflections(path);\n final Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class);\n logger.info(\"Found {} Hibernate entities\", entities.getClass());\n if (logger.isDebugEnabled()) {\n entities.forEach((entity) -> logger.debug(\"Registered {}.\", entity.getName()));\n }\n return entities;\n })\n .flatMap(Collection::stream)\n .collect(Collectors.toList());\n\n return ImmutableList.copyOf(collect);\n }",
"public ClassInfo[] getClasses() {\r\n return classes.toArray(new ClassInfo[classes.size()]);\r\n }",
"@Override\r\n\tpublic List<T> findAll() {\n\t\treturn getSession().createQuery(\r\n\t\t\t\t\"FROM \"+clazz.getSimpleName())\r\n\t\t\t\t.list();\r\n\t}",
"private void scanClassMap() {\n Set<Class<?>> classSet = reflections.getTypesAnnotatedWith(Redis.class);\n for (Class cl : classSet) {\n RedisInfo redisInfo = new RedisInfo();\n Redis redis = (Redis) cl.getAnnotation(Redis.class);\n redisInfo.setCls(cl);\n redisInfo.setTableName(redis.name());\n redisInfo.setIncrName(redis.IncrName());\n redisInfo.setDbName(redis.dbName());\n redisInfo.setImmediately(redis.immediately());\n redisInfo.setIncr(redis.incrId());\n redisInfo.setDelete(redis.delete());\n try {\n classMap.put(redis.name(), redisInfo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n\tpublic List<TClassInfo> getClazzs(String hql) {\n\t\tSession session=HibernateSessionFactory.getSession();\n\t\tTransaction transaction=session.beginTransaction();\n\t\tQuery query=session.createQuery(hql);\n\t\tList<TClassInfo> clazzs=new ArrayList<TClassInfo>();\n\t\tclazzs=query.list();\n\t\ttransaction.commit();\n\t\tsession.close();\n\t\treturn clazzs;\n\t}",
"public List findAll() {\n return findAll(ClassItem.class);\n }",
"public List<Classinfo> list() {\n\t\treturn null;\r\n\t}",
"@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<DeviceClass> getAllDeviceClasses() {\n return this.serviceClient.getAllDeviceClasses();\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic List getAll(Class className) {\r\n\t\tQuery q = em.createNativeQuery(\r\n\t\t\t\t\"select * from \" + className.getSimpleName(), className);\r\n\t\treturn q.getResultList();\r\n\t}",
"@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }",
"public List<IclassItem> getClasses() {\n if(projectData!=null){\n return projectData.getClasses();\n }\n return new ArrayList<IclassItem>();\n }",
"private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }",
"Set<CompiledClass> getCompiledClasses() {\n if (!isCompiled()) {\n return null;\n }\n if (exposedCompiledClasses == null) {\n FindTypesInCud typeFinder = new FindTypesInCud();\n cud.traverse(typeFinder, cud.scope);\n Set<CompiledClass> compiledClasses = typeFinder.getClasses();\n exposedCompiledClasses = Sets.normalizeUnmodifiable(compiledClasses);\n }\n return exposedCompiledClasses;\n }",
"@RequestMapping( value = \"/\", method = RequestMethod.GET )\n public Iterable<ClassesDTO> list(){\n return classService.list();\n }",
"public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}",
"@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}",
"public Set<String> getClassKeys();",
"private String[] getReferencedJavaClasses() {\n\t\tclass ClassNameVisitor extends JVisitor {\n\t\t\tList<String> classNames = new ArrayList<String>();\n\n\t\t\t@Override\n\t\t\tpublic boolean visit(JClassType x, Context ctx) {\n\t\t\t\tclassNames.add(x.getName());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tClassNameVisitor v = new ClassNameVisitor();\n\t\tv.accept(jprogram);\n\t\treturn v.classNames.toArray(new String[v.classNames.size()]);\n\t}",
"@OneToMany(mappedBy=\"classRoom\")\n @OrderBy(\"className ASC\")\n public Collection<Class> getClasses() {\n return classes;\n }",
"@Programmatic\n public List<Class<?>> allServiceClasses() {\n List<Class<?>> serviceClasses = Lists\n .transform(this.servicesInjector.getRegisteredServices(), new Function<Object, Class<?>>(){\n public Class<?> apply(Object o) {\n return o.getClass();\n }\n });\n // take a copy, to allow eg I18nFacetFactory to add in default implementations of missing services.\n return Collections.unmodifiableList(Lists.newArrayList(serviceClasses));\n }",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"public Collection getAllAuxClasss();",
"public Map<EntityMode,String> getTuplizerClassMap();",
"@Override\n\tpublic List<String> getMappings() {\n\t\treturn mappings;\n\t}",
"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 }",
"public List<String> getClassList() {\n return classlist;\n }",
"public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\n\t}",
"public Iterator<String> listRootClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listHierarchyRootClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\t\t\r\n\t}",
"ISet<Class<?>> collectAllTypeWiredServices();",
"public HashMap<Integer,Category_components> get_classes(){\n return game_classes;\n }",
"public static Set<String> getMazeJavaClasses() {\r\n\t\treturn Collections.unmodifiableSet(mazeJavaClasses);\r\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 }",
"@Override\n\tpublic Map<String, Object> getClazzes(int firstResult, int maxResults) {\n\t\treturn null;\n\t}",
"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 }",
"ClassMapping_1_0 getClassMapping(\n String qualifiedClassName\n ) throws ServiceException;",
"public static synchronized Set<Map.Entry<Class<?>, String>> entrySet() {\n\t\treturn ClassRegistry.dictionary.entrySet();\n\t}",
"@Override\r\n\tpublic List<Classified> getAllClassified() {\n\t\treturn null;\r\n\t}",
"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 }",
"public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }",
"@Override\n public Set<Class<?>> getClasses() {\n HashSet h = new HashSet<Class<?>>();\n h.add(AffirmationService.class );\n return h;\n }",
"Collection<String> getRequiredClasses( String id );",
"public Map<String, byte[]> classesBySeparator() {\n return classesBySeparator;\n }",
"private MappingClassElement getMappingClass (String className)\n\t{\n\t\treturn getModel().getMappingClass(className, getClassLoader());\n\t}",
"public static Set<Class<? extends Entity>> getEntityBeans() {\r\n\t\tfinal Set<Class<? extends Entity>> entityClasses=new HashSet<>();\r\n\t\tfinal ClassLoader cl=Thread.currentThread().getContextClassLoader();\r\n\t\tfinal URL packageURL=cl.getResource(\r\n\t\t\t\tENTITY_BEANS_PACKAGE.replace(\".\", \"/\")+\"package-info.class\");\r\n\t\ttry {\r\n\t\t\tfinal File[] entityFiles=new File(packageURL.toURI()).getParentFile().listFiles(new FilenameFilter() {\r\n\t\t\t\t@Override public boolean accept(final File dir, final String name) {\r\n\t\t\t\t\treturn name.endsWith(\".class\"); \r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tfor(final File f:entityFiles) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfinal Class<?> cls=cl.loadClass(getPackageClass(f));\r\n\t\t\t\t\tif(Entity.class.isAssignableFrom(cls)) entityClasses.add((Class<? extends Entity>) cls);\r\n\t\t\t\t} catch (ClassNotFoundException e) {//skip class if search failed\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t}\r\n\t\t\r\n\t\treturn entityClasses;\r\n\t}",
"@NotNull\n List<PriorityClass> getAllPriorityClasses();",
"@Test\n public void testGetDecalredClasses() {\n for (Class clazz : TestClass.class.getDeclaredClasses()) {\n System.out.println(clazz.getName());\n }\n }",
"public Map getStandardClasses() {\n return standardClasses;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.class;\n }",
"public List<String> getAllClassIds() throws ServiceException {\n\t\ttry {\n\t\t\treturn classQueries.getAllClassIds();\n\t\t}\n\t\tcatch(DataAccessException e) {\n\t\t\tthrow new ServiceException(e);\n\t\t}\n\t}",
"public ClassDoc[] classes() {\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // return the set of classes in specClasses that are \"included\"\n // according to the access modifier filter\n if (includedClasses != null) {\n // System.out.println(\"RootDoc.classes() called.\");\n return includedClasses;\n }\n int size = 0;\n Collection<X10ClassDoc> classes = specClasses.values();\n for (ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n size++;\n }\n }\n includedClasses = new X10ClassDoc[size];\n int i = 0;\n for (X10ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n includedClasses[i++] = cd;\n }\n }\n Comparator<X10ClassDoc> cmp = new Comparator<X10ClassDoc>() {\n public int compare(X10ClassDoc first, X10ClassDoc second) {\n return first.name().compareTo(second.name());\n }\n\n public boolean equals(Object other) {\n return false;\n }\n };\n Arrays.sort(includedClasses, cmp);\n // System.out.println(\"RootDoc.classes() called. result = \" +\n // Arrays.toString(includedClasses));\n return includedClasses;\n }",
"public String[] readClasses();",
"public ClassDoc[] specifiedClasses() {\n // System.out.println(\"RootDoc.specifiedClasses() called.\");\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // index.html lists classes returned from specifiedClasses; return the\n // set of classes in specClasses that are\n // included as per access mod filter\n return classes();\n }",
"@NonNull\n public static Map<String, Set<ClassObj>> allClasses(@NonNull Snapshot snapshot) {\n return classes(snapshot, null);\n }",
"public final ClassMap getBaseClassMap()\n {\n return baseClassMap;\n }",
"@Override\n\tpublic Classes findClasses(String cls_id) {\n\t\tString sql = \"select * from classes where cls_id='\" + cls_id + \"'\";\n\t\tJdbcQuery querys = JdbcUtils.createNativeQuery(sql, Classes.class);\n\t\tClasses classes = querys.getBean();\n\t\treturn classes;\n\t}",
"public Collection<CartridgeClasspathData> getAllCartridgeClassPaths() {\n\t\tif (this.cartridgeClassPaths == null) {\n\t\t\tthis.cartridgeClassPaths = this.setupCartridgeClassPaths();\n\t\t}\n\t\treturn this.cartridgeClassPaths.values();\n\t}",
"public static Set<Class<?>> getClassSetFromAnnotation(Class clazz) {\n Set<Class<?>> classSet = new HashSet<>();\n for (Class<?> cls : CLASS_SET) {\n if (cls.isAnnotationPresent(clazz)) {\n classSet.add(cls);\n }\n }\n return classSet;\n }",
"public Collection<ClassTranslator> getInterfaces();",
"public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.Iterator.class;\n }",
"@Override\n\t@Transactional\n\tpublic List<T> getAll() {\n\t\tList<?> result = hibernateTemplate.getSessionFactory().getCurrentSession()\n\t\t\t\t.createCriteria(getGenericClass())\n\t\t\t\t.list();\n\t\treturn result.stream()\n\t\t\t\t.map(e -> initialize(checkType(e)))\n\t\t\t\t.filter(e -> e != null)\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"@Test\n public void testGetClasses() throws Exception {\n for (Class clazz : TestClass.class.getClasses()) {\n System.out.println(clazz.getName());\n }\n }",
"@Override\r\n\tpublic Set<Class<?>> getClasses() {\r\n\t\treturn BazaarApplicationImpl.CLASSES;\r\n\t}",
"final Class<?>[] classes() {\n if (classes instanceof Class[]) {\n return (Class[]) classes;\n } else {\n return new Class[] { (Class) classes };\n }\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.class;\n }",
"@Override\n public Set<Class<?>> getClasses() {\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(api.Auth.class);\n resources.add(api.UserApi.class);\n resources.add(api.TicketApi.class);\n resources.add(api.DepartmentApi.class);\n resources.add(api.MessageApi.class);\n resources.add(api.MilestoneApi.class);\n resources.add(api.InvitationApi.class);\n return resources;\n }",
"@Override\n\tpublic List<Class> bestClass() {\n\t\treturn mainDao.bestClass();\n\t}",
"Set<Class<?>> getClassSet(String packageName);",
"@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<DeviceClass> getAllDeviceClasses(Context context) {\n return this.serviceClient.getAllDeviceClasses(context);\n }",
"Collection<Class<?>> registerEntities();",
"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}",
"Map getAll();",
"public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }",
"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}",
"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 }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"@Override\n\tpublic List<TBasUnitClass> findAll() {\n\t\treturn tBasUnitClassRepository.findAll();\n\t}",
"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 }"
] | [
"0.70623314",
"0.70590377",
"0.7051123",
"0.6973965",
"0.68602693",
"0.6840855",
"0.6781583",
"0.6727318",
"0.6547823",
"0.65158933",
"0.65063274",
"0.6468416",
"0.6442242",
"0.64001197",
"0.6393223",
"0.62836903",
"0.62641406",
"0.62641406",
"0.62641406",
"0.62592703",
"0.62592703",
"0.62233496",
"0.62224585",
"0.62195224",
"0.62141556",
"0.6169398",
"0.6163195",
"0.6110985",
"0.611034",
"0.60983783",
"0.60804486",
"0.6065255",
"0.60536337",
"0.6045188",
"0.60406387",
"0.60227513",
"0.6022285",
"0.5994975",
"0.5969511",
"0.5958671",
"0.59408116",
"0.5936749",
"0.59335715",
"0.5930572",
"0.5917189",
"0.59035623",
"0.5869152",
"0.5860626",
"0.58562875",
"0.5852616",
"0.584115",
"0.5837832",
"0.581937",
"0.5812008",
"0.5811654",
"0.5802294",
"0.57970697",
"0.5794932",
"0.5790516",
"0.57898945",
"0.57883763",
"0.5765262",
"0.57590437",
"0.57581735",
"0.57445",
"0.5737253",
"0.57361424",
"0.57333124",
"0.5726808",
"0.5718951",
"0.5713399",
"0.5711723",
"0.57080656",
"0.57060224",
"0.57016647",
"0.5700976",
"0.5697859",
"0.5692812",
"0.5691194",
"0.56698745",
"0.56639177",
"0.5650823",
"0.56317073",
"0.5629373",
"0.56257796",
"0.56236947",
"0.56195164",
"0.56193066",
"0.56040883",
"0.55984634",
"0.5584095",
"0.5573216",
"0.55676925",
"0.55670244",
"0.55659175",
"0.55638605",
"0.55632144",
"0.55626106",
"0.556004",
"0.55447006"
] | 0.6019778 | 37 |
Gets all the super classes & stopping when the super class matches a package prefix | public static Set<String> getSuperClasses(String clazzName, String packagePrefixToStop) throws Exception {
final Set<String> superClasses = new HashSet<String>();
Class<?> clazz = Class.forName(clazzName);
for (Class<?> sc = clazz.getSuperclass(); sc != null && sc != Object.class && !sc.getName().startsWith(packagePrefixToStop);) {
superClasses.add(sc.getName());
sc = sc.getSuperclass();
}
return superClasses;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);",
"java.util.List<org.jetbrains.r.classes.S4ClassInfo.S4SuperClass> \n getSuperClassesList();",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClass getSuperClasses(int index);",
"java.util.List<? extends org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder> \n getSuperClassesOrBuilderList();",
"HashMap<String, Set<URI>> getExternalSuperClasses();",
"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}",
"org.jetbrains.r.classes.S4ClassInfo.S4SuperClassOrBuilder getSuperClassesOrBuilder(\n int index);",
"int getSuperClassesCount();",
"public List findClassesThatExtend(Class[] superClasses,\r\n\t\t\tList<String> paths) throws IOException, ClassNotFoundException {\r\n\t\tlog.error(\"looking for classes: \" + superClasses[0] + \" on paths: \" + paths);\r\n\t\treturn findClassesThatExtend(superClasses, paths, false);\r\n\t}",
"public abstract List<String> scanAllClassNames();",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"public List<Class<?>> getSuperClasses(Class<?> aClass) {\n\t\treturn ModelClasses.getAllSuperClasses(aClass);\n\t}",
"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 }",
"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 }",
"private ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses, boolean innerClasses) {\r\n\t\tIterator iterClasses = null;\r\n\t\tArrayList listSubClasses = null;\r\n\t\tString strClassName = null;\r\n\t\tClass tempClass = null;\r\n\t\tlistSubClasses = new ArrayList();\r\n\t\titerClasses = listSuperClasses.iterator();\r\n\t\twhile (iterClasses.hasNext()) {\r\n\t\t\tstrClassName = (String) iterClasses.next();\r\n\t\t\t// only check classes if they are not inner classes\r\n\t\t\t// or we intend to check for inner classes\r\n\t\t\tif ((strClassName.indexOf(\"$\") == -1) || innerClasses) {\r\n\t\t\t\t// might throw an exception, assume this is ignorable\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttempClass = Class.forName(strClassName, false, Thread\r\n\t\t\t\t\t\t\t.currentThread().getContextClassLoader());\r\n\t\t\t\t\tfindAllSubclassesOneClass(tempClass, listAllClasses,\r\n\t\t\t\t\t\t\tlistSubClasses, innerClasses);\r\n\t\t\t\t\t// call by reference - recursive\r\n\t\t\t\t} catch (Throwable ignored) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listSubClasses;\r\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 ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses) {\r\n\t\treturn findAllSubclasses(listSuperClasses, listAllClasses, false);\r\n\t}",
"public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;",
"public ClassTranslator getSuperclass();",
"Set<Class<?>> getClassSet(String packageName);",
"public static Map<String, List<String>> filterSuperTypes(final String packageName,\n final Imports imports,\n final Map<String, List<String>> projectSuperTypes) {\n final Map<String, List<String>> scopedSuperTypes = new HashMap<String, List<String>>();\n for (Map.Entry<String, List<String>> e : projectSuperTypes.entrySet()) {\n final String typeQualifiedType = e.getKey();\n final String typePackageName = getPackageName(typeQualifiedType);\n final String typeTypeName = getTypeName(typeQualifiedType);\n\n final List<String> superTypeQualifiedTypes = e.getValue();\n\n if (superTypeQualifiedTypes == null) {\n //Doesn't have a Super Type\n if (typePackageName.equals(packageName) || isImported(typeQualifiedType,\n imports)) {\n scopedSuperTypes.put(typeTypeName,\n superTypeQualifiedTypes);\n }\n } else {\n //Has a Super Type\n if (typePackageName.equals(packageName) || isImported(typeQualifiedType,\n imports)) {\n ArrayList<String> result = new ArrayList<String>();\n\n for (String superTypeQualifiedType : superTypeQualifiedTypes) {\n final String superTypePackageName = getPackageName(superTypeQualifiedType);\n final String superTypeTypeName = getTypeName(superTypeQualifiedType);\n\n if (superTypePackageName.equals(packageName) || isImported(superTypeQualifiedType,\n imports)) {\n result.add(superTypeTypeName);\n } else {\n result.add(superTypeQualifiedType);\n }\n }\n\n scopedSuperTypes.put(typeTypeName,\n result);\n }\n }\n }\n return scopedSuperTypes;\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}",
"char[] getSuperclassName();",
"XClass getSuperclass();",
"private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }",
"@SuppressWarnings(\"unchecked\")\n public static Stream<String> supers(ClassNode node) {\n if (node.superName == null) { // Object, no interfaces or superclass\n return Stream.empty();\n }\n return Stream.concat(\n Stream.of(node.superName),\n ((List<String>) node.interfaces).stream()\n );\n }",
"public String getSuperClass(){\n\t\treturn targetClass.superName;\n\t}",
"public static OntClass getFirstNamedSuperClass(OntClass c)\n\t{\n\t\tfor (BreadthFirstIterator<OntClass> i = new BreadthFirstIterator<OntClass>(new SuperClassSearchNode(c)); i.hasNext(); ) {\n\t\t\tOntClass superClass = i.next();\n\t\t\tif (superClass.isURIResource() && !superClass.equals(c))\n\t\t\t\treturn superClass;\n\t\t}\n\t\treturn c.getOntModel().getOntClass(OWL.Thing.getURI());\n\t}",
"public List<Class<?>> getAllSuperTypes(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\n\t\tthis.getAllSuperTypes(aClass, result);\n\t\tthis.getAllInterfaces(aClass, result);\n\n\t\treturn result;\n\t}",
"public Iterator<String> listSuperClasses(String ontClass, boolean direct)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tOntClass ontC = obtainOntClass(ontClass);\r\n\t\t\treturn new ToStringIterator<String>(ontC.listSuperClasses(direct));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\treturn new ArrayList<String>().iterator();\r\n\t\t}\r\n\t}",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"@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 default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private static List<Class<?>>\n getClassNameFromFile(String path, String packageName, boolean isRecursion, String postfix) {\n List<Class<?>> lct = new ArrayList<>();\n\n try {\n path = java.net.URLDecoder.decode(\n new String(path.getBytes(\"ISO-8859-1\"),\"UTF-8\"),\"UTF-8\");\n\n File file =new File(path);\n File[] files = file.listFiles();\n\n for (File childFile : files) {\n if (childFile.isDirectory()) {\n if (isRecursion) {\n lct.addAll(getClassNameFromFile(childFile.getPath(),\n packageName + \".\" +childFile.getName(), isRecursion, postfix));\n }\n } else {\n String fileName = childFile.getName();\n if (fileName.endsWith(postfix) && !fileName.contains(\"$\")) {\n System.out.println(fileName);\n lct.add(Class.forName(packageName + \".\" + fileName.replace(\".class\", \"\")));\n }\n }\n }\n }catch (UnsupportedEncodingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n return lct;\n }",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"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 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 }",
"private void findAllSubclassesOneClass(Class theClass,\r\n\t\t\tList listAllClasses, List listSubClasses, boolean innerClasses) {\r\n\t\tIterator iterClasses = null;\r\n\t\tString strClassName = null;\r\n\t\tString strSuperClassName = null;\r\n\t\tClass c = null;\r\n\t\tClass cParent = null;\r\n\t\tboolean bIsSubclass = false;\r\n\t\tstrSuperClassName = theClass.getName();\r\n\t\titerClasses = listAllClasses.iterator();\r\n\t\twhile (iterClasses.hasNext()) {\r\n\t\t\tstrClassName = (String) iterClasses.next();\r\n\t\t\t// only check classes if they are not inner classes\r\n\t\t\t// or we intend to check for inner classes\r\n\t\t\tif ((strClassName.indexOf(\"$\") == -1) || innerClasses) {\r\n\t\t\t\t// might throw an exception, assume this is ignorable\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Class.forName() doesn't like nulls\r\n\t\t\t\t\tif (strClassName == null)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (strClassName.endsWith(\".groovy\")) {\r\n\t\t\t\t\t\tGroovyClassLoader loader = new GroovyClassLoader(Thread.currentThread()\r\n\t\t\t\t\t\t\t\t.getContextClassLoader());\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tc = loader.parseClass(loader.getResourceAsStream(strClassName));\r\n\t\t\t\t\t\t} catch (Throwable e) {\r\n\t\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tFile gFile = new File(strClassName);\r\n\t\t\t\t\t\t\t\tc = loader.parseClass(new FileInputStream(gFile));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch(Throwable e1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"file load failed: \" + e1);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tc = Class.forName(strClassName, false, Thread\r\n\t\t\t\t\t\t\t\t.currentThread().getContextClassLoader());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!c.isInterface()\r\n\t\t\t\t\t\t\t&& !Modifier.isAbstract(c.getModifiers())) {\r\n\t\t\t\t\t\tbIsSubclass = theClass.isAssignableFrom(c);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbIsSubclass = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bIsSubclass) {\r\n\t\t\t\t\t\tlistSubClasses.add(c);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Throwable ignored) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public Object visitClassDecl(ClassDecl decl) {\n //look up the superclass name int he GST\n if (decl.superName == null || decl.superName.equals(\"\")) {\n return null;\n }\n //throw an error if there is no super name\n\n if (!globalSymTab.containsKey(decl.superName)) {\n errorMsg.error(decl.pos, \"Undefined class declaration.\");\n }\n //add the class to the list of subclasses from the GST\n else {\n decl.superLink = globalSymTab.get(decl.superName);\n decl.superLink.subclasses.addElement(decl);\n }\n return null;\n }",
"protected abstract void registerSuperTypes();",
"EPREFIX_TYPE getSuperType();",
"public Iterator<String> listRootClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listHierarchyRootClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\t\t\r\n\t}",
"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 }",
"public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}",
"public static Set<String> getParentPackages()\n {\n Set<String> result = new HashSet<String>();\n result.add(Test.class.getPackage().getName());\n result.add(TestSetup.class.getPackage().getName());\n result.add(AbstractTestCaseWithSetup.class.getPackage().getName());\n result.add(Logger.class.getPackage().getName());\n result.add(LoggingPlugin.class.getPackage().getName());\n result.add(PolicyPlugin.class.getPackage().getName());\n result.add(ClassLoaderSystem.class.getPackage().getName());\n result.add(IsolatedClassLoaderTest.class.getPackage().getName());\n \n String pkgString = AccessController.doPrivileged(new PrivilegedAction<String>() \n {\n public String run() \n {\n return System.getProperty(\"jboss.test.parent.pkgs\");\n }}\n );\n\n if (pkgString != null)\n {\n StringTokenizer tok = new StringTokenizer(pkgString, \",\");\n while(tok.hasMoreTokens())\n {\n String pkg = tok.nextToken();\n result.add(pkg.trim());\n }\n }\n \n return result;\n }",
"public boolean checkSuperClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class1)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class2.getIRI())) {\n return true;\n }\n }\n return false;\n }",
"private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static Collection<Class> getClassesForPackage(String packageName)\n throws Exception {\n String packagePath = packageName.replace(\".\", \"/\");\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Set<URL> jarUrls = new HashSet<URL>();\n\n while (classLoader != null) {\n if (classLoader instanceof URLClassLoader) {\n for (URL url : ((URLClassLoader) classLoader).getURLs()) {\n if (url.getFile().endsWith(\".jar\")) // may want better way to detect jar files\n {\n jarUrls.add(url);\n } // if\n } // for\n } // if\n\n classLoader = classLoader.getParent();\n } // while\n\n Set<Class> classes = new HashSet<Class>();\n\n for (URL url : jarUrls) {\n JarInputStream stream = new JarInputStream(url.openStream()); // may want better way to open url connections\n JarEntry entry = stream.getNextJarEntry();\n\n while (entry != null) {\n String name = entry.getName();\n\n if (name.endsWith(\".class\") && name.substring(0,\n packagePath.length()).equals(packagePath)) {\n classes.add(Class.forName(name.substring(0,\n name.length() - 6).replace(\"/\", \".\")));\n } // if\n\n entry = stream.getNextJarEntry();\n } // while\n\n stream.close();\n } // for\n\n return classes;\n }",
"public BCClass getSuperClass() {\n\t\tif (superClass != null) {\n\t\t\treturn superClass;\n\t\t}\n\t\tsuperClass = JavaApplication.Application.getClass(superClassName);\n\t\treturn superClass;\n\t}",
"public Set<Class<?>> getScanClasses();",
"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 static void getClassHierarchyRecurs(Class clazz, boolean flag) {\n Class classFirst = null;\n if (flag) {\n classFirst = clazz;\n }\n if (clazz != null) {\n clazz = clazz.getSuperclass();\n getClassHierarchyRecurs(clazz, false);\n }\n if (clazz != null) {\n System.out.println(clazz.getName());\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\n if (classFirst != null) {\n System.out.println(classFirst.getName());\n }\n }",
"public static List<String> getallSupertype(\n String forClass\n ) throws ServiceException {\n ModelElement modelElement = modelTypeNames.get(forClass);\n if(modelElement == null) {\n return null;\n } else {\n final List allSupertype = modelElement.allSupertypes;\n return allSupertype;\n }\n }",
"public String getSuperClassName() {\n if (m_superClass == null) {\n return m_superName;\n } else {\n return m_superClass.getFullName();\n }\n }",
"private AttributeNode findSuper(String className, String attributeName) {\n \n // find the superclass by searching the OCR's for a generalization \n \n List<ObjectClassRelationship> ocrs = \n elements.getElements(DomainObjectFactory.newObjectClassRelationship());\n \n String superClassName = null;\n for(ObjectClassRelationship ocr : ocrs) {\n if (ocr.getType() == ObjectClassRelationship.TYPE_IS && \n ocr.getSource().getLongName().equals(className)) {\n superClassName = ocr.getTarget().getLongName();\n break;\n }\n }\n \n if (superClassName == null) {\n System.err.println(\"Superclass not found for \"+className);\n return null;\n }\n \n // find the super class in the tree\n \n int div = superClassName.lastIndexOf(\".\");\n String sPackage = superClassName.substring(0, div);\n String sName = superClassName.substring(div+1);\n \n for(Object pchild : rootNode.getChildren()) {\n PackageNode pnode = (PackageNode)pchild;\n if (pnode.getFullPath().equals(sPackage)) {\n for(Object cchild : pnode.getChildren()) {\n ClassNode cnode = (ClassNode)cchild;\n if (cnode.getDisplay().equals(sName)) {\n PackageNode inherited = null;\n for(Object achild : cnode.getChildren()) {\n if (\"Inherited Attributes\".equals(\n ((UMLNode)achild).getDisplay())) {\n // remember the inheritance subtree for later\n inherited = (PackageNode)achild;\n }\n else if (achild instanceof AttributeNode) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return anode;\n }\n }\n }\n // attribute wasn't found, check inheritance subtree\n if (inherited != null) {\n for(Object achild : inherited.getChildren()) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return findSuper(cnode.getFullPath(), attributeName);\n }\n }\n \n }\n }\n } \n }\n }\n \n return null;\n }",
"public Collection getAllAuxClasss();",
"Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);",
"private static Stream<Class<?>> superTypes(Class<?> type) {\n Class<?>[] interfaces = type.getInterfaces();\n return Stream.concat(\n Arrays.stream(interfaces).flatMap(SqlObjectFactory::superTypes),\n Arrays.stream(interfaces));\n }",
"public Set<JmiClassVertex> getAllSuperclassVertices(JmiClassVertex vertex)\n {\n return getClassAttributes(vertex).allSuperclassVertices;\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 }",
"public EList<GenClass> getAllStartSymbols() {\n \t\tEList<GenClass> symbols = new BasicEList<GenClass>();\n \t\tsymbols.addAll(getStartSymbols());\n \t\t\n \t\tEList<Import> imports = getImports();\n \t\tfor (Import importedElement : imports) {\n \t\t\tfinal ConcreteSyntax importedSyntax = importedElement.getConcreteSyntax();\n \t\t\tif (importedSyntax != null) {\n \t\t\t\tsymbols.addAll(importedSyntax.getAllStartSymbols());\n \t\t\t}\n \t\t}\n \t\treturn symbols;\n \t}",
"public static Set<AnnotatedDeclaredType> getSuperTypes(AnnotatedDeclaredType type) {\n\n Set<AnnotatedDeclaredType> supertypes = new LinkedHashSet<>();\n if (type == null) {\n return supertypes;\n }\n\n // Set up a stack containing the type mirror of subtype, which\n // is our starting point.\n Deque<AnnotatedDeclaredType> stack = new ArrayDeque<>();\n stack.push(type);\n\n while (!stack.isEmpty()) {\n AnnotatedDeclaredType current = stack.pop();\n\n // For each direct supertype of the current type, if it\n // hasn't already been visited, push it onto the stack and\n // add it to our supertypes set.\n for (AnnotatedDeclaredType supertype : current.directSuperTypes()) {\n if (!supertypes.contains(supertype)) {\n stack.push(supertype);\n supertypes.add(supertype);\n }\n }\n }\n\n return Collections.<AnnotatedDeclaredType>unmodifiableSet(supertypes);\n }",
"public List<BaseClass> baseClasses() {\r\n\t\treturn this.baseClasses;\r\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 }",
"public String getSuperClass() {\n\t\treturn superField.getText();\n\t}",
"public ITool getSuperClass();",
"private void findAllSubclassesOneClass(Class theClass,\r\n\t\t\tList listAllClasses, List listSubClasses) {\r\n\t\tfindAllSubclassesOneClass(theClass, listAllClasses, listSubClasses,\r\n\t\t\t\tfalse);\r\n\t}",
"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 }",
"@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }",
"public TypeData getSuperClass() {\n return m_superClass;\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 List getParents()\n {\n \tList result = new ArrayList();\n \tModelFacade instance = ModelFacade.getInstance(this.refOutermostPackage().refMofId());\n\n \tif (instance != null)\n \t{\n \t if (instance.isRepresentative(this.refMofId())&&\n \t instance.hasRefObject(this.refMofId()))\n \t {\n \t if (getGeneralization().isEmpty() && !(this instanceof Interface) && !(this instanceof Enumeration))\n \t {\n \t \tresult.add(OclLibraryHelper.getInstance(this).\n \t\t\t\t\t\t\t\t\t\t\tgetAny());\n \t return result;\n \t \t }\n \t } \t \n \t \n\t \tif (equals(OclLibraryHelper.getInstance(this).getVoid()))\n\t \t{\n\t \t\tModel topPackage = ModelHelper.\n\t \t\t\t\t\t\t \t\tgetInstance(\n\t \t\t\t\t\t\t \t\t\t\t(Uml15Package) this.refOutermostPackage()).\n\t \t\t\t\t\t\t \t\t\t\t\t\tgetTopPackage();\n\t \t\tresult.addAll(((NamespaceImpl)topPackage).getAllClassesWithoutSpez());\n\t \t\treturn result;\n\t \t}\n \t} \n \tIterator it = getGeneralization().iterator();\n\n \twhile(it.hasNext())\n \t{\n \t Generalization g = (Generalization)it.next(); \n \t result.add(g.getParent());\n \t}\n \treturn result;\n }",
"private Stream<Element> superTypeForInheritDoc(JavacTask task, Element type) {\n TypeElement clazz = (TypeElement) type;\n Stream<Element> result = interfaces(clazz);\n result = Stream.concat(result, interfaces(clazz).flatMap(el -> superTypeForInheritDoc(task, el)));\n\n if (clazz.getSuperclass().getKind() == TypeKind.DECLARED) {\n Element superClass = ((DeclaredType) clazz.getSuperclass()).asElement();\n result = Stream.concat(result, Stream.of(superClass));\n result = Stream.concat(result, superTypeForInheritDoc(task, superClass));\n }\n\n return result;\n }",
"public void setSuperClass(TypeData sclas) {\n m_superClass = sclas;\n if (sclas != null) {\n boolean imported = m_importsTracker.addImport(sclas.getFullName(), false);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"Set superclass of \" + getFullName() + \" to \" + sclas.getFullName() +\n (imported ? \" (imported)\" : \"\"));\n }\n }\n }",
"public interface XPackage {\n\t\n\t/**\n\t * \n\t * @return\n\t * @throws IOException\n\t * @throws FileNotFoundException\n\t */\n\tpublic XCollection<XClass> getClasses();\n\n\t/**\n\t * \n\t * @param recursively\n\t * @return\n\t */\n\tpublic XCollection<XClass> getClasses(boolean recursively);\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XPackage getParentPackage();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XCollection<XPackage> getChildPackages();\n\n\t/**\n\t * \n\t * @return\n\t */\n\tpublic XCollection<XPackage> getChildPackages(boolean recursively);\n\n\t/**\n\t * \n\t * @param packageName\n\t * @return\n\t */\n\tpublic XPackage find(String packageName);\n\n}",
"Class<?>[] getHandledClasses();",
"public List<? extends IType> getSubtypes()\n {\n if( _subtypes == null )\n {\n _subtypes = new ArrayList<IGosuClassInternal>();\n Set<? extends CharSequence> typeNames = getTypeLoader().getAllTypeNames();\n for( CharSequence typeName : typeNames )\n {\n IType type = TypeSystem.getByFullNameIfValid(typeName.toString());\n if (type instanceof IGosuClassInternal) {\n IGosuClassInternal gosuClass = (IGosuClassInternal) type;\n if( getOrCreateTypeReference() != gosuClass && isAssignableFrom( gosuClass ) )\n {\n _subtypes.add( gosuClass );\n }\n }\n }\n }\n\n return _subtypes;\n }",
"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}",
"public Collection<URI> getDirectSuperClasses(\n final String repositoryName,\n final URI term) {\n //Preconditions\n assert \"OpenCyc\".equals(repositoryName) : \"repositoryName must be OpenCyc\";\n assert term != null : \"term must not be null\";\n\n final Collection<URI> superClassTerms = new ArrayList<>();\n final Integer id = uriToIdDictionary.get(RDFUtility.formatResource(term));\n if (id != null) {\n final List<Integer> superClasses = superClassDictionary.get(id);\n if (superClasses != null) {\n for (final Integer superClass : superClasses) {\n superClassTerms.add(RDFUtility.makeURIFromAlias(uris.get(superClass)));\n }\n }\n }\n return superClassTerms;\n }",
"protected Set<NewType> getNewSubTypes() {\r\n\t\tfinal Set<NewType> subTypes = new HashSet<NewType>();\r\n\r\n\t\tfinal GeneratorContext context = this.getGeneratorContext();\r\n\t\tfinal Iterator<NewType> newTypesIterator = context.getNewTypes().iterator();\r\n\r\n\t\twhile (newTypesIterator.hasNext()) {\r\n\t\t\tfinal NewType newType = newTypesIterator.next();\r\n\t\t\tif (newType.getSuperType() == this) {\r\n\t\t\t\tsubTypes.add(newType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn subTypes;\r\n\t}",
"public void onScanClasses(Set<Class<?>> parentClasses, Class<?> clazz, Object instance);",
"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}",
"private void checkInheritedClasses(Class<?> beanClass) {\n Class<?> superclass = beanClass.getSuperclass();\n if (Object.class.equals(superclass) || Model.class.equals(superclass) || JAVA_LANG_RECORD.equals(superclass.getName())) {\n // we got to the top of the inheritance\n return;\n }\n if (!EntityBean.class.isAssignableFrom(superclass)) {\n if (isMappedSuperWithNoProperties(superclass)) {\n // ok to stop and treat just the same as Object.class\n return;\n }\n throw new BeanNotEnhancedException(\"Super type \" + superclass + \" is not enhanced? Check the packages specified in ebean.mf See https://ebean.io/docs/trouble-shooting#not-enhanced\");\n }\n\n // recursively continue up the inheritance hierarchy\n checkInheritedClasses(superclass);\n }",
"private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }",
"@NotNull\n List<? extends ClassInfo> getClasses();",
"java.util.List<org.mojolang.mojo.lang.NominalType> \n getInheritsList();",
"private static void getClassHierarchy(Class clazz) {\n List<String> classNames = new ArrayList<>();\n while (clazz != null) {\n classNames.add(clazz.getName());\n clazz = clazz.getSuperclass();\n }\n for (int i = classNames.size() - 1; i >= 0; i--) {\n System.out.println(classNames.get(i));\n if (i > 0) {\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\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<PriorityClass> getAllPriorityClasses();",
"public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\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 }",
"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}",
"public List<String> getSubClasses(String className, boolean direct) {\n IRI clsIRI = IRI.create(ontologyNamespace + className);\n System.out.println(\"Searching for IRI: \" + clsIRI);\n if (!ontology.containsClassInSignature(clsIRI)) {\n \tSystem.out.println(\"Tag is not present in ontology:\" + className);\n \treturn Collections.EMPTY_LIST;\n }\n // Létrehozzuk az osztály egy példányát és lekérdezzük a leszármazottait.\n OWLClass cls = factory.getOWLClass(clsIRI);\n NodeSet<OWLClass> subClss;\n\t\ttry {\n\t\t\tsubClss = reasoner.getSubClasses(cls, direct);\n\t\t} catch (OWLReasonerRuntimeException e) {\n\t\t\tSystem.err.println(\"Hiba az alosztályok következtetése közben: \" + e.getMessage());\n\t\t\treturn Collections.EMPTY_LIST;\n\t\t}\n List<String> result = new ArrayList<>();\n for(OWLClass i : subClss.getFlattened()) {\n \tif(!i.isBuiltIn())\n \t\tresult.add(i.getIRI().getFragment());\n }\n return result;\n }",
"public String getSuperclass() {\n\t\treturn null;\n\t}",
"@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.423 -0500\", hash_original_method = \"D02303EBFA8DB4A97AF291339C2FB52B\", hash_generated_method = \"D02303EBFA8DB4A97AF291339C2FB52B\")\n \nEnumeration getPrefixes ()\n {\n if (prefixTable == null) {\n return EMPTY_ENUMERATION;\n } else {\n return prefixTable.keys();\n }\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 }",
"private void addSuperClasses(Integer directSuperClass,\n\t\t\tClassRecord subClassRecord) {\n\t\tif (subClassRecord.superClasses.contains(directSuperClass)) {\n\t\t\treturn;\n\t\t}\n\t\tsubClassRecord.superClasses.add(directSuperClass);\n\t\tClassRecord superClassRecord = getClassRecord(directSuperClass);\n\t\tif (superClassRecord == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (Integer superClass : superClassRecord.directSuperClasses) {\n\t\t\taddSuperClasses(superClass, subClassRecord);\n\t\t}\n\t}",
"Set<Concept> getSuperclasses(Concept concept);",
"public ClassDoc[] classes() {\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // return the set of classes in specClasses that are \"included\"\n // according to the access modifier filter\n if (includedClasses != null) {\n // System.out.println(\"RootDoc.classes() called.\");\n return includedClasses;\n }\n int size = 0;\n Collection<X10ClassDoc> classes = specClasses.values();\n for (ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n size++;\n }\n }\n includedClasses = new X10ClassDoc[size];\n int i = 0;\n for (X10ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n includedClasses[i++] = cd;\n }\n }\n Comparator<X10ClassDoc> cmp = new Comparator<X10ClassDoc>() {\n public int compare(X10ClassDoc first, X10ClassDoc second) {\n return first.name().compareTo(second.name());\n }\n\n public boolean equals(Object other) {\n return false;\n }\n };\n Arrays.sort(includedClasses, cmp);\n // System.out.println(\"RootDoc.classes() called. result = \" +\n // Arrays.toString(includedClasses));\n return includedClasses;\n }",
"@Override\r\n\tpublic TypeWrapper getSuperClass() {\n\t\treturn null;\r\n\t}"
] | [
"0.72849804",
"0.7212612",
"0.71914697",
"0.6493243",
"0.64917415",
"0.6360271",
"0.6314707",
"0.6206713",
"0.61490583",
"0.61488426",
"0.61482537",
"0.60955584",
"0.60662913",
"0.59664613",
"0.5948271",
"0.59382534",
"0.5937354",
"0.590416",
"0.5854536",
"0.58233905",
"0.58152485",
"0.5813125",
"0.5800039",
"0.57761943",
"0.56976104",
"0.56896466",
"0.568953",
"0.56832117",
"0.56814396",
"0.5584187",
"0.55297965",
"0.54871935",
"0.54792273",
"0.5473347",
"0.5471725",
"0.5461539",
"0.54557145",
"0.54539174",
"0.5434576",
"0.54260707",
"0.5393614",
"0.5388919",
"0.5357545",
"0.5355919",
"0.53511953",
"0.5331703",
"0.53290844",
"0.5320384",
"0.5317034",
"0.5316834",
"0.53138053",
"0.531032",
"0.5308799",
"0.5297693",
"0.5286773",
"0.5271188",
"0.5256853",
"0.5254116",
"0.52503836",
"0.5246422",
"0.5243236",
"0.52393365",
"0.5232184",
"0.5207204",
"0.5197892",
"0.5193692",
"0.51823837",
"0.5178864",
"0.5178712",
"0.51776475",
"0.5170033",
"0.51687336",
"0.51408684",
"0.51403344",
"0.5120929",
"0.51200926",
"0.51200527",
"0.5108495",
"0.51000047",
"0.5098077",
"0.5096241",
"0.5087431",
"0.50837207",
"0.50759345",
"0.50721955",
"0.50713193",
"0.5060292",
"0.5051965",
"0.5043268",
"0.5029788",
"0.5028941",
"0.50218254",
"0.5019605",
"0.50162333",
"0.5010299",
"0.50088453",
"0.50015014",
"0.4992306",
"0.4988666",
"0.49830976"
] | 0.78118145 | 0 |
get a xml reader instance: | private static Object readMetadataFromXML(InputSource source, Class target) throws ParserConfigurationException, SAXException, IOException {
SAXParserFactory factory = SAXParserFactory.newInstance();
LOG.debug("RepositoryPersistor using SAXParserFactory : " + factory.getClass().getName());
SAXParser p = factory.newSAXParser();
XMLReader reader = p.getXMLReader();
Object result;
if (DescriptorRepository.class.equals(target)) {
// create an empty repository:
DescriptorRepository repository = new DescriptorRepository();
// create handler for building the repository structure
org.xml.sax.ContentHandler handler = new RepositoryXmlHandler(repository);
// tell parser to use our handler:
reader.setContentHandler(handler);
reader.parse(source);
result = repository;
} else if (ConnectionRepository.class.equals(target)) {
// create an empty repository:
ConnectionRepository repository = new ConnectionRepository();
// create handler for building the repository structure
org.xml.sax.ContentHandler handler = new ConnectionDescriptorXmlHandler(repository);
// tell parser to use our handler:
reader.setContentHandler(handler);
reader.parse(source);
//LoggerFactory.getBootLogger().info("loading XML took " + (stop - start) + " msecs");
result = repository;
} else
throw new MetadataException("Could not build a repository instance for '" + target +
"', using source " + source);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static final XMLReader getXMLReaderInstance(Element config)\n throws ClassNotFoundException, NoSuchMethodException, InstantiationException,\n IllegalAccessException, java.lang.reflect.InvocationTargetException {\n String className = null;\n try {\n className = DOMUtils.getAttribute(config, CLASS_NAME_ATTR, true);\n config = DOMUtils.getElement(config, XML_READER_ELEMENT, true);\n } catch (IllegalArgumentException e) {\n return null;\n }\n\n Class[] c = { Element.class };\n Object[] o = { config };\n return (XMLReader) Class.forName(className).getConstructor(c).newInstance(o);\n }",
"final public static org.xml.sax.XMLReader makeXMLReader()\n throws Exception\n{ final javax.xml.parsers.SAXParserFactory saxParserFactory =\n javax.xml.parsers.SAXParserFactory.newInstance();\n final javax.xml.parsers.SAXParser saxParser = saxParserFactory.newSAXParser();\n final org.xml.sax.XMLReader parser = saxParser.getXMLReader();\n return parser; }",
"public JodaBeanXmlReader xmlReader() {\n return new JodaBeanXmlReader(this);\n }",
"XMLStreamReader createXMLStreamReader(DataObject sdo);",
"XMLDocument load(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;",
"XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException;",
"Object create(Reader reader) throws IOException, SAXException, ParserConfigurationException;",
"public abstract XMLReader getParent ();",
"public Reader getReader()\n {\n return reader;\n }",
"protected final Reader getReader()\n {\n return _reader;\n }",
"public Object fromXML(Reader input) throws XMLUtilityException {\r\n\t\tObject beanObject;\r\n\t\tbeanObject = unmarshaller.fromXML(input);\r\n\t\treturn beanObject;\r\n\t}",
"private static <T> T readObjectAsXmlFrom(Reader reader, Class<T> c) throws Exception\n {\n JAXBContext jaxb = JAXBContext.newInstance(c);\n \n XMLStreamReader xmlReader =\n XMLInputFactory.newInstance().createXMLStreamReader(reader);\n \n Unmarshaller xmlInterpreter = jaxb.createUnmarshaller();\n \n return xmlInterpreter.unmarshal(xmlReader, c).getValue();\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n \r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public Reader getReader() {\r\n return reader;\r\n }",
"public java.io.Reader getReader (URL url) throws java.io.IOException;",
"@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"requestXml\"));\n \n \n elementList.add(localRequestXml==null?null:\n localRequestXml);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"protected abstract Reader getReader() throws IOException;",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"@Test\n public void testRead_Reader() {\n //System.out.println(\"read\");\n Reader source = new StringReader(testXMLDoc);\n LemonSerializerImpl instance = new LemonSerializerImpl(null);\n instance.read(source);\n //System.out.println(\"XML read OK\");\n source = new StringReader(testTurtleDoc);\n instance.read(source);\n //System.out.println(\"Turtle read OK\");\n }",
"public abstract T readFromXml(XmlPullParser parser, int version, Context context)\n throws IOException, XmlPullParserException;",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localAttributesTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"attributes\"));\r\n\r\n\r\n elementList.add(localAttributes == null ? null :\r\n localAttributes);\r\n }\r\n if (localIdentifierTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"identifier\"));\r\n\r\n\r\n elementList.add(localIdentifier == null ? null :\r\n localIdentifier);\r\n }\r\n if (localNameTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"name\"));\r\n\r\n elementList.add(localName == null ? null :\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n }\r\n if (localSourceTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"source\"));\r\n\r\n elementList.add(localSource == null ? null :\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSource));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n elementList.add(local_return==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n elementList.add(local_return==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n elementList.add(local_return==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n elementList.add(local_return==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localUserTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"user\"));\r\n \r\n elementList.add(localUser==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localUser));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"return\"));\r\n\r\n\r\n elementList.add(local_return == null ? null :\r\n local_return);\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"return\"));\r\n\r\n\r\n elementList.add(local_return == null ? null :\r\n local_return);\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localVersionTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.platform.blackboard/xsd\",\n \"version\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localVersion));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public ResolvingXMLReader(CatalogManager manager) {\n/* 86 */ super(manager);\n/* 87 */ SAXParserFactory spf = JdkXmlUtils.getSAXFactory(this.catalogManager.overrideDefaultParser());\n/* 88 */ spf.setValidating(validating);\n/* */ try {\n/* 90 */ SAXParser parser = spf.newSAXParser();\n/* 91 */ setParent(parser.getXMLReader());\n/* 92 */ } catch (Exception ex) {\n/* 93 */ ex.printStackTrace();\n/* */ } \n/* */ }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://ws.sample\",\n \"return\"));\n \n elementList.add(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"DataObject loadObject(XMLStreamReader reader) throws XMLStreamException, IllegalStateException;",
"public static XMLEventReader getXMLEventReader(InputStream is) {\n XMLInputFactory xmlInputFactory;\n XMLEventReader xmlEventReader = null;\n try {\n xmlInputFactory = XML_INPUT_FACTORY.get();\n xmlEventReader = xmlInputFactory.createXMLEventReader(is);\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n return xmlEventReader;\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (localRequestXmlTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"requestXml\"));\n \n elementList.add(localRequestXml==null?null:\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRequestXml));\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null) {\r\n for (int i = 0;i < local_return.length;i++){\r\n\r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return[i]);\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(local_return);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public XmlReader(String xml, boolean keepXML)\n throws UnsupportedEncodingException {\n _reader = new InputStreamReader(\n new ByteArrayInputStream(xml.getBytes()), \"UTF-8\");\n _keepXML = keepXML;\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"OrderID\"));\n \n if (localOrderID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrderID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"OrderID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"Date\"));\n \n if (localDate != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localDate));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"Date cannot be null!!\");\n }\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n if (local_returnTracker){\n elementList.add(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"return\"));\n \n \n elementList.add(local_return==null?null:\n local_return);\n }\n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n \n //We can safely assume an element has only one type associated with it\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(MY_QNAME,\n new java.lang.Object[]{\n org.apache.axis2.databinding.utils.reader.ADBXMLStreamReader.ELEMENT_TEXT,\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRadiologyOrderID)\n },\n null);\n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localNameTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"name\"));\r\n \r\n elementList.add(localName==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));\r\n } if (localIpTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"ip\"));\r\n \r\n elementList.add(localIp==null?null:\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localIp));\r\n } if (localPortTracker){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"port\"));\r\n \r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPort));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n \n //We can safely assume an element has only one type associated with it\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(MY_QNAME,\n new java.lang.Object[]{\n org.apache.axis2.databinding.utils.reader.ADBXMLStreamReader.ELEMENT_TEXT,\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localRadiologyOrderIDForPayment)\n },\n null);\n\n }",
"private SAXParser getSAXParser() {\n\t SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();\n\t if (saxParserFactory == null) {\n\t return null;\n\t }\n\t SAXParser saxParser = null;\n\t try {\n\t saxParser = saxParserFactory.newSAXParser();\n\t } catch (Exception e) {\n\t }\n\t return saxParser;\n\t }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n \n //We can safely assume an element has only one type associated with it\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(MY_QNAME,\n new java.lang.Object[]{\n org.apache.axis2.databinding.utils.reader.ADBXMLStreamReader.ELEMENT_TEXT,\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localExaminationType_type0)\n },\n null);\n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n \n //We can safely assume an element has only one type associated with it\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(MY_QNAME,\n new java.lang.Object[]{\n org.apache.axis2.databinding.utils.reader.ADBXMLStreamReader.ELEMENT_TEXT,\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localExaminationType_type0)\n },\n null);\n\n }",
"public static Element parse(Reader xml)\n {\n Element ret = null;\n DocumentBuilder builder = getDocumentBuilder();\n try\n {\n ret = builder.parse(new InputSource(xml)).getDocumentElement();\n releaseBuilder(builder);\n return ret;\n }\n catch(Exception e)\n {\n LOGGER.error(\"could not parse given xml\", e);\n }\n finally\n {\n releaseBuilder(builder);\n }\n return ret;\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"directChargeReturn\"));\n \n \n elementList.add(localDirectChargeReturn==null?null:\n localDirectChargeReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException{\r\n\r\n\r\n \r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker){\r\n if (local_return!=null){\r\n for (int i = 0;i < local_return.length;i++){\r\n \r\n if (local_return[i] != null){\r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return[i]));\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n \r\n\r\n }\r\n } else {\r\n \r\n elementList.add(new javax.xml.namespace.QName(\"http://registry\",\r\n \"return\"));\r\n elementList.add(null);\r\n \r\n }\r\n\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n \r\n \r\n\r\n }",
"public XMLReader(Reader r) {\n\t\t_tokenizer = new XMLTokenizer(r);\n\t}",
"public Reader getReader() {\n return in;\n }",
"public JournalReader read() {\n return new JournalReader(this);\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (local_returnTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"return\"));\r\n\r\n elementList.add(\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local_return));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"private static XMLReaders\n\treaders(final Function<? super String, Length> lengthParser) {\n\t\treturn new XMLReaders()\n\t\t\t.v00(XMLReader.elem(\"name\"))\n\t\t\t.v00(XMLReader.elem(\"cmt\"))\n\t\t\t.v00(XMLReader.elem(\"desc\"))\n\t\t\t.v00(XMLReader.elem(\"src\"))\n\t\t\t.v11(XMLReader.elems(Link.READER))\n\t\t\t.v10(XMLReader.elem(\"url\").map(Format::parseURI))\n\t\t\t.v10(XMLReader.elem(\"urlname\"))\n\t\t\t.v00(XMLReader.elem(\"number\").map(UInt::parse))\n\t\t\t.v00(XMLReader.elem(\"type\"))\n\t\t\t.v00(XMLReader.doc(\"extensions\"))\n\t\t\t.v10(XMLReader.elems(TrackSegment.xmlReader(Version.V10, lengthParser)))\n\t\t\t.v11(XMLReader.elems(TrackSegment.xmlReader(Version.V11, lengthParser)));\n\t}",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"PatientID\"));\n \n if (localPatientID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPatientID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"PatientID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CaseID\"));\n \n if (localCaseID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCaseID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"CaseID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"ExaminationType\"));\n \n \n if (localExaminationType==null){\n throw new org.apache.axis2.databinding.ADBException(\"ExaminationType cannot be null!!\");\n }\n elementList.add(localExaminationType);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDownLoadCardReturn\"));\n \n \n elementList.add(localGetDownLoadCardReturn==null?null:\n localGetDownLoadCardReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localAttributeKeyTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"attributeKey\"));\r\n\r\n elementList.add(localAttributeKey == null ? null :\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttributeKey));\r\n }\r\n if (localAttributeValueTracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"attributeValue\"));\r\n\r\n elementList.add(localAttributeValue == null ? null :\r\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localAttributeValue));\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public XMLReader()\r\n {\r\n \r\n String filePathHead = \"\";\r\n\r\n Path inputPath = Paths.get(\"src\\\\dataFiles\");\r\n\r\n try\r\n {\r\n filePathHead = inputPath.toRealPath().toString();\r\n System.out.println(\"PATH: \" + inputPath.toRealPath().toString());\r\n }\r\n catch (NoSuchFileException x)\r\n {\r\n System.err.format(\"%s: no such\" + \" file or directory%n\", filePathHead);\r\n // Logic for case when file doesn't exist.\r\n }\r\n catch (IOException x)\r\n {\r\n System.err.format(\"%s%n\", x);\r\n // Logic for other sort of file error.\r\n }\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getDirectAreaInfoReturn\"));\n \n \n elementList.add(localGetDirectAreaInfoReturn==null?null:\n localGetDirectAreaInfoReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"OrderID\"));\n \n if (localOrderID != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrderID));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"OrderID cannot be null!!\");\n }\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"OrderStatus\"));\n \n if (localOrderStatus != null){\n elementList.add(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOrderStatus));\n } else {\n throw new org.apache.axis2.databinding.ADBException(\"OrderStatus cannot be null!!\");\n }\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CSPID\"));\n \n \n elementList.add(localCSPID==null?null:\n localCSPID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"LSPID\"));\n \n \n elementList.add(localLSPID==null?null:\n localLSPID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CorrelateID\"));\n \n \n elementList.add(localCorrelateID==null?null:\n localCorrelateID);\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"CmdFileURL\"));\n \n \n elementList.add(localCmdFileURL==null?null:\n localCmdFileURL);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public InputStreamReader getStreamReader() {\n return streamReader;\n }",
"public static XmlStream stream(XMLStreamReader reader) throws Exception {\n return XmlStreamSpec.with(reader).stream();\n }",
"public abstract UIReader getReaderByName(String readerName);",
"public void readXML(Reader inReader)\n\t{\n\t\tXmlUtil util = new XmlUtil();\n\t\tElement root = util.getXml(inReader, \"UTF-8\");\n\t\tpopulate(root);\n\t}",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"qqChargeReturn\"));\n \n \n elementList.add(localQqChargeReturn==null?null:\n localQqChargeReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"private static StAXManager getStAXManager() throws XMLStreamException {\n if(staxManager == null) {\n staxManager = new StAXManager(StAXManager.CONTEXT_READER);\n }\n return staxManager;\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localArgs0Tracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"args0\"));\r\n\r\n\r\n elementList.add(localArgs0 == null ? null :\r\n localArgs0);\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\r\n throws org.apache.axis2.databinding.ADBException {\r\n\r\n\r\n java.util.ArrayList elementList = new java.util.ArrayList();\r\n java.util.ArrayList attribList = new java.util.ArrayList();\r\n\r\n if (localArgs0Tracker) {\r\n elementList.add(new javax.xml.namespace.QName(\"\",\r\n \"args0\"));\r\n\r\n\r\n elementList.add(localArgs0 == null ? null :\r\n localArgs0);\r\n }\r\n\r\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\r\n\r\n\r\n }",
"public RayTracerXMLSceneParser() {\n\t\ttry {\n\t\t\treader = XMLReaderFactory.createXMLReader();\n\t\t\treader.setContentHandler(this);\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"StreamReader underlyingReader();",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"directQueryReturn\"));\n \n \n elementList.add(localDirectQueryReturn==null?null:\n localDirectQueryReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }",
"public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)\n throws org.apache.axis2.databinding.ADBException{\n\n\n \n java.util.ArrayList elementList = new java.util.ArrayList();\n java.util.ArrayList attribList = new java.util.ArrayList();\n\n \n elementList.add(new javax.xml.namespace.QName(\"\",\n \"getTerminalCardTypeReturn\"));\n \n \n elementList.add(localGetTerminalCardTypeReturn==null?null:\n localGetTerminalCardTypeReturn);\n \n\n return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());\n \n \n\n }"
] | [
"0.72765034",
"0.72378093",
"0.7013392",
"0.67191696",
"0.65229076",
"0.6422814",
"0.6358376",
"0.62755007",
"0.62647253",
"0.6190638",
"0.61857975",
"0.61152816",
"0.6105634",
"0.6100399",
"0.60741675",
"0.6049782",
"0.6048438",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60398287",
"0.60387623",
"0.6038255",
"0.60375565",
"0.60273844",
"0.60187393",
"0.6001122",
"0.5992678",
"0.5992678",
"0.5992678",
"0.5992678",
"0.5987766",
"0.59739023",
"0.59739023",
"0.59731424",
"0.5972096",
"0.596631",
"0.5964365",
"0.59499234",
"0.59420437",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5935577",
"0.5924042",
"0.5920593",
"0.59168226",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.58628017",
"0.5860862",
"0.5857476",
"0.58562857",
"0.58550847",
"0.5849628",
"0.5849628",
"0.584937",
"0.5842683",
"0.58371854",
"0.5833727",
"0.58304244",
"0.5826596",
"0.58215445",
"0.5816965",
"0.581664",
"0.5813996",
"0.5804245",
"0.5800765",
"0.5799965",
"0.57938343",
"0.5791228",
"0.57707417",
"0.5770563",
"0.576186",
"0.57549155",
"0.5746842",
"0.5738077",
"0.57325774",
"0.57325774",
"0.57201403",
"0.57188743",
"0.5709706",
"0.570892"
] | 0.0 | -1 |
j2ee compliant lookup of resources | private static URL buildURL(String repositoryFileName) throws MalformedURLException {
URL url = ClassHelper.getResource(repositoryFileName);
// don't be too strict: if resource is not on the classpath, try ordinary file lookup
if (url == null) {
try {
url = new File(repositoryFileName).toURL();
}
catch (MalformedURLException ignore) {
}
}
if (url != null) {
LOG.info("OJB Descriptor Repository: " + url);
} else {
throw new MalformedURLException("did not find resource " + repositoryFileName);
}
return url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ICodeBaseEntry lookupResource(String resourceName) throws ResourceNotFoundException;",
"protected URL convertedFindResource(String name) {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);\n try {\n List<URL> resources = findResources(packageAdmin, bundle, name, false);\n if (resources.isEmpty() && isMetaInfResource(name)) {\n LinkedHashSet<Bundle> wiredBundles = getWiredBundles();\n Iterator<Bundle> iterator = wiredBundles.iterator();\n while (iterator.hasNext() && resources.isEmpty()) { \n Bundle wiredBundle = iterator.next();\n resources = findResources(packageAdmin, wiredBundle, name, false);\n }\n }\n return (resources.isEmpty()) ? null : resources.get(0);\n } catch (Exception e) {\n return null;\n } finally {\n bundle.getBundleContext().ungetService(reference);\n }\n }",
"@Override\n protected URL\n findResource\n (\n String rname\n )\n {\n LogMgr.getInstance().log\n (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n \"Resource name (\" + rname + \")\");\n\n if(pResources != null) {\n if(pResources.containsKey(rname)) {\n\tPath resourcePath = new Path(pResourceRootPath, rname);\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource path (\" + resourcePath + \")\");\n\n\tFile resourceFile = resourcePath.toFile();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource file (\" + resourceFile + \") exists (\" + resourceFile.exists() + \")\");\n\n\tif(!resourceFile.exists())\n\t return null;\n\n\tURI resourceURI = resourceFile.toURI();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URI (\" + resourceURI + \")\");\n\n\ttry {\n\t URL resourceURL = resourceURI.toURL();\n\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URL (\" + resourceURL + \")\");\n\n\t return resourceURL;\n\t}\n\tcatch(MalformedURLException ex) {\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Warning, \n\t \"Error constructing URL from (\" + rname + \")!\");\n\t}\n }\n }\n\n return null;\n }",
"protected Enumeration<URL> convertedFindResources(String name) throws IOException {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);\n try {\n List<URL> resources = findResources(packageAdmin, bundle, name, true);\n if (isMetaInfResource(name)) {\n LinkedHashSet<Bundle> wiredBundles = getWiredBundles();\n for (Bundle wiredBundle : wiredBundles) {\n resources.addAll(findResources(packageAdmin, wiredBundle, name, true));\n }\n }\n return Collections.enumeration(resources);\n } catch (Exception e) {\n throw (IOException) new IOException(\"Error discovering resources: \" + e).initCause(e);\n } finally {\n bundle.getBundleContext().ungetService(reference);\n }\n }",
"E find(final ID identifier) throws ResourceNotFoundException;",
"public interface IResourceSource\n{\n /**\n * Get resource location based on resource name.\n *\n * @param name Name of resource to be searched\n * @return URL of resource\n */\n public URL getResourceLocation( String name );\n\n /**\n * Get resource locations based on resource name.\n *\n * @param name Name of resources to be searched\n * @return Enumeration of URLs of resources\n */\n public Enumeration getResourceLocations( String name );\n\n /**\n * Get resource path this resource source references. Each entry including the last must be\n * terminated with a semicolon.\n *\n * @return Resource path this resource source references\n */\n public String getResourcePath();\n}",
"ResourceLocation resolve(String path);",
"@SuppressWarnings(\"unchecked\")\n\tpublic Enumeration<URL> findResources(String name) throws IOException\n\t{\n\t\tList<URL> urlList = null;\n\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not found locally, attempting remote lookup\");\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tList<String> locationsList = cache.getResourcesLocations(name);\n\t\t\tif (locationsList == null)\n\t\t\t{\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"name\", name);\n\t\t\t\tmap.put(\"multiple\", \"true\");\n\t\t\t\tJPPFResourceWrapper resource = loadResourceData(map, true);\n\t\t\t\tList<byte[]> dataList = (List<byte[]>)resource.getData(\"resource_list\");\n\t\t\t\tboolean found = (dataList != null) && !dataList.isEmpty();\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] \" + (found ? \"\" : \"not \") + \"found remotely\");\n\t\t\t\tif (found)\n\t\t\t\t{\n\t\t\t\t\tcache.registerResources(name, dataList);\n\t\t\t\t\turlList = new ArrayList<URL>();\n\t\t\t\t\tlocationsList = cache.getResourcesLocations(name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (locationsList != null)\n\t\t\t{\n\t\t\t\tfor (String path: locationsList)\n\t\t\t\t{\n\t\t\t\t\tFile file = new File(path);\n\t\t\t\t\tif (urlList == null) urlList = new ArrayList<URL>();\n\t\t\t\t\turlList.add(file.toURI().toURL());\n\t\t\t\t}\n\t\t\t\tif (debugEnabled) log.debug(\"found the following URLs for resource [\" + name + \"] : \" + urlList);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not found remotely\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t\treturn urlList == null ? null : new IteratorEnumeration<URL>(urlList.iterator());\n\t}",
"public Resource getResource(Request request);",
"public abstract Map<AbstractResource, ResourceResolution> findApplicableResources(\n TreeLogger logger, PathPrefixSet pathPrefixSet);",
"protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;",
"List<Resource> resources();",
"protected URL findResource(String name)\n\t{\n\t\tObject entryImg = m_entries.get(name);\n\t\t\n\t\t/* Return null when not found */\n\t\tif (entryImg == null)\n\t\t\treturn null;\n\n\t\ttry \n\t\t{\n\t\t\tURL url = new URL(\"jar\",\n\t\t\t\t\t\t\t m_url.getHost(),\n\t\t\t\t\t\t\t \"file:\" + m_url.getPath() + \"!/\" + name);\n\t\t\treturn url;\n\t\t}\n\t\tcatch (MalformedURLException e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"Resource getResource();",
"protected ICUResourceBundle findResource(String key, String resPath, int _resource, HashMap<String, String> table, UResourceBundle requested)\n/* */ {\n/* 1150 */ ClassLoader loaderToUse = this.loader;\n/* 1151 */ String locale = null;String keyPath = null;\n/* */ \n/* 1153 */ String rpath = getAliasValue(_resource);\n/* 1154 */ if (table == null) {\n/* 1155 */ table = new HashMap();\n/* */ }\n/* 1157 */ if (table.get(rpath) != null) {\n/* 1158 */ throw new IllegalArgumentException(\"Circular references in the resource bundles\");\n/* */ }\n/* */ \n/* 1161 */ table.put(rpath, \"\");\n/* 1162 */ String bundleName; if (rpath.indexOf('/') == 0) {\n/* 1163 */ int i = rpath.indexOf('/', 1);\n/* 1164 */ int j = rpath.indexOf('/', i + 1);\n/* 1165 */ String bundleName = rpath.substring(1, i);\n/* 1166 */ if (j < 0) {\n/* 1167 */ locale = rpath.substring(i + 1);\n/* */ \n/* */ \n/* 1170 */ keyPath = resPath;\n/* */ } else {\n/* 1172 */ locale = rpath.substring(i + 1, j);\n/* 1173 */ keyPath = rpath.substring(j + 1, rpath.length());\n/* */ }\n/* */ \n/* 1176 */ if (bundleName.equals(\"ICUDATA\")) {\n/* 1177 */ bundleName = \"com/ibm/icu/impl/data/icudt48b\";\n/* 1178 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* 1179 */ } else if (bundleName.indexOf(\"ICUDATA\") > -1) {\n/* 1180 */ int idx = bundleName.indexOf('-');\n/* 1181 */ if (idx > -1) {\n/* 1182 */ bundleName = \"com/ibm/icu/impl/data/icudt48b/\" + bundleName.substring(idx + 1, bundleName.length());\n/* 1183 */ loaderToUse = ICU_DATA_CLASS_LOADER;\n/* */ }\n/* */ }\n/* */ }\n/* */ else {\n/* 1188 */ int i = rpath.indexOf('/');\n/* 1189 */ if (i != -1) {\n/* 1190 */ locale = rpath.substring(0, i);\n/* 1191 */ keyPath = rpath.substring(i + 1);\n/* */ } else {\n/* 1193 */ locale = rpath;\n/* */ \n/* */ \n/* 1196 */ keyPath = resPath;\n/* */ }\n/* 1198 */ bundleName = this.baseName;\n/* */ }\n/* 1200 */ ICUResourceBundle bundle = null;\n/* 1201 */ ICUResourceBundle sub = null;\n/* 1202 */ if (bundleName.equals(\"LOCALE\")) {\n/* 1203 */ bundleName = this.baseName;\n/* 1204 */ keyPath = rpath.substring(\"LOCALE\".length() + 2, rpath.length());\n/* 1205 */ locale = ((ICUResourceBundle)requested).getLocaleID();\n/* */ \n/* */ \n/* 1208 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* 1209 */ if (bundle != null) {\n/* 1210 */ sub = findResourceWithFallback(keyPath, bundle, null);\n/* */ \n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* */ \n/* */ \n/* 1223 */ if (locale == null)\n/* */ {\n/* 1225 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, \"\", loaderToUse, false);\n/* */ }\n/* */ else {\n/* 1228 */ bundle = (ICUResourceBundle)getBundleInstance(bundleName, locale, loaderToUse, false);\n/* */ }\n/* */ \n/* */ \n/* 1232 */ StringTokenizer st = new StringTokenizer(keyPath, \"/\");\n/* 1233 */ ICUResourceBundle current = bundle;\n/* 1234 */ while (st.hasMoreTokens()) {\n/* 1235 */ String subKey = st.nextToken();\n/* 1236 */ sub = (ICUResourceBundle)current.get(subKey, table, requested);\n/* 1237 */ if (sub == null) {\n/* */ break;\n/* */ }\n/* 1240 */ current = sub;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1248 */ if (sub == null) {\n/* 1249 */ throw new MissingResourceException(this.localeID, this.baseName, key);\n/* */ }\n/* 1251 */ return sub;\n/* */ }",
"public abstract IResource getResource();",
"public Resource getTargetResource();",
"@Override\n public Enumeration<URL> getResources(String name) throws IOException {\n if (\"META-INF/services/org.neo4j.ogm.spi.CypherModificationProvider\".equals(name)) {\n return Collections.enumeration(Arrays.asList(\n super.getResource(\"spi/cypher_modification1\"),\n super.getResource(\"spi/cypher_modification2\")));\n } else {\n return super.getResources(name);\n }\n }",
"public interface ResourceManager extends RemoteService{\n\n /**\n * This method returns a list of the resources.\n *\n * @return This list of resources.\n * @throws ResourcesException\n */\n public List<ResourceBase> listTypes() throws ResourceException;\n}",
"public URL getResourceLocation( String name );",
"@Override\n\tpublic synchronized <K extends Resource> K getResource(String uri, Class<K> resourceType) {\n\t\tif (hasServerUrl(uri, resourceType) && c != null) {\n\t\t\tif (uri.startsWith(\"repo:\")) {\n\t\t\t\t// it's possible to have a resource with id=repo:something (from\n\t\t\t\t// practice)\n\t\t\t\tK r = doGetResource(uri.startsWith(\"repo:\") ? uri : \"repo:\" + uri, resourceType);\n\t\t\t\tif (r != null)\n\t\t\t\t\treturn r;\n\t\t\t}\n\t\t\treturn doGetResource(uri, resourceType);\n\t\t}\n\t\tif (c == null && uri.startsWith(\"repo:\")) {\n\t\t\tK r = doGetResource(uri.startsWith(\"repo:\") ? uri : \"repo:\" + uri, resourceType);\n\t\t\tif (r != null)\n\t\t\t\treturn r;\n\t\t}\n\t\treturn repService != null ? repService.getResource(uri, resourceType) : null;\n\t}",
"ResourceType getResource();",
"public IResource getResource();",
"Collection<? extends Resource> getResources();",
"String getResourceName();",
"public interface ResourceLocation\n{\n\t/**\n\t * Create a new location that represents this resource but with a\n\t * different extension.\n\t *\n\t * @param newExtension\n\t * @return\n\t */\n\tResourceLocation withExtension(String newExtension);\n\n\t/**\n\t * Resolve a path relative to this location.\n\t *\n\t * @param path\n\t * @return\n\t */\n\tResourceLocation resolve(String path);\n\n\t/**\n\t * Get the name of this resource.\n\t *\n\t * @return\n\t */\n\tString getName();\n}",
"public interface NamingResources {\r\n\r\n void addEnvironment(ContextEnvironment ce);\r\n void removeEnvironment(String name);\r\n\r\n void addResource(ContextResource cr);\r\n void removeResource(String name);\r\n\r\n void addResourceLink(ContextResourceLink crl);\r\n void removeResourceLink(String name);\r\n\r\n Object getContainer();\r\n}",
"public Enumeration getResourceLocations( String name );",
"@Override\r\n\tpublic Resources getById(Integer id) {\n\t\treturn null;\r\n\t}",
"public CwmResourceLocator createCwmResourceLocator();",
"Optional<Resource> find(Session session, IRI identifier);",
"protected <K extends Resource> K doGetResource(String uri, Class<K> resourceType) {\n\t\tif (negCache.containsKey(uri)) {\n\t\t\t// System.out.println(\"in negative cache \" + uri);\n\t\t\treturn null;\n\t\t}\n\t\tString objectUri = uri;\n\t\tif (uri.startsWith(\"repo:\")) { //$NON-NLS-1$\n\t\t\tobjectUri = uri.substring(5);\n\t\t\tK r = getFromParent(objectUri, resourceType);\n\t\t\tif (r != null)\n\t\t\t\treturn addToCache(r, uri);\n\t\t}\n\t\tif (c != null)\n\t\t\ttry {\n\t\t\t\tIProgressMonitor monitor = new NullProgressMonitor();\n\t\t\t\t// System.out.println(\"get from server \" + uri);\n\t\t\t\tif (objectUri.contains(\"/\")) { //$NON-NLS-1$\n\t\t\t\t\t// Locate the resource inside the repository...\n\t\t\t\t\tResourceDescriptor r = new ResourceDescriptor();\n\t\t\t\t\tr.setUriString(objectUri);\n\t\t\t\t\tr = c.get(monitor, r, null);\n\t\t\t\t\tif (r.getIsReference())\n\t\t\t\t\t\tr = ReferenceResolver.resolveReference(c, r, null);\n\t\t\t\t\tif (rpath == null)\n\t\t\t\t\t\tinitRPath();\n\t\t\t\t\tString fpath = Misc.nvl(rpath);\n\t\t\t\t\tif (!objectUri.startsWith(\"/\")) //$NON-NLS-1$\n\t\t\t\t\t\tfpath += \"/\"; //$NON-NLS-1$\n\t\t\t\t\tfpath += objectUri;\n\t\t\t\t\tFile f = new File(fpath);\n\t\t\t\t\tif (f.getParentFile() != null)\n\t\t\t\t\t\tf.getParentFile().mkdirs();\n\t\t\t\t\tif (f.createNewFile()) {\n\t\t\t\t\t\tif (!r.getIsReference() && r.getHasData() && r.getData() != null) {\n\t\t\t\t\t\t\torg.apache.commons.io.FileUtils.writeByteArrayToFile(f, r.getData());\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tc.get(monitor, r, f);\n\t\t\t\t\t}\n\t\t\t\t\tfileTypes.put(f, r.getWsType());\n\t\t\t\t} else if (runitUri != null) {\n\t\t\t\t\t// Locate the resource inside the report unit, if any...\n\t\t\t\t\tif (reportUnitResources == null) {\n\t\t\t\t\t\tResourceDescriptor rd = new ResourceDescriptor();\n\t\t\t\t\t\trd.setWsType(ResourceDescriptor.TYPE_REPORTUNIT);\n\t\t\t\t\t\trd.setUriString(runitUri);\n\t\t\t\t\t\trd = c.get(monitor, rd, null);\n\t\t\t\t\t\treportUnitResources = c.list(monitor, rd);\n\t\t\t\t\t\tif (reportUnitResources == null)\n\t\t\t\t\t\t\treportUnitResources = new ArrayList<ResourceDescriptor>();\n\t\t\t\t\t}\n\n\t\t\t\t\t// find the resource...\n\t\t\t\t\tfor (ResourceDescriptor r : reportUnitResources) {\n\t\t\t\t\t\tif (r.getName() == null || !r.getName().equals(objectUri))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (r.getIsReference())\n\t\t\t\t\t\t\tr = ReferenceResolver.resolveReference(c, r, monitor);\n\t\t\t\t\t\tif (ResourceFactory.isFileResourceType(r)) {\n\t\t\t\t\t\t\tIFile file = (IFile) jConfig.get(FileUtils.KEY_FILE);\n\n\t\t\t\t\t\t\tFile fp = null;\n\t\t\t\t\t\t\tIContainer pf = file.getParent();\n\t\t\t\t\t\t\tif (pf.getRawLocation() != null)\n\t\t\t\t\t\t\t\tfp = pf.getRawLocation().toFile();\n\t\t\t\t\t\t\telse if (pf.getLocationURI() != null)\n\t\t\t\t\t\t\t\tfp = new File(pf.getLocationURI());\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn addToCache(null, uri);\n\n\t\t\t\t\t\t\tFile f = new File(fp, objectUri);\n\t\t\t\t\t\t\tif (f.getParentFile() != null && !f.getParentFile().mkdirs() && f.createNewFile())\n\t\t\t\t\t\t\t\tc.get(monitor, r, f);\n\t\t\t\t\t\t\tfileTypes.put(f, r.getWsType());\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\trefresh();\n\t\t\t\tString u = uri;\n\t\t\t\tif (u.startsWith(\"repo:\"))\n\t\t\t\t\tu = u.substring(5);\n\t\t\t\treturn addToCache(getFromParent(u, resourceType), uri);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\treturn addToCache(null, uri);\n\t}",
"public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }",
"protected <K extends Resource> K getFromParent(String uri, Class<K> resourceType) {\n\t\tfor (RepositoryService rs : parent.getRepositoryServices()) {\n\t\t\tif (rs == this)\n\t\t\t\tcontinue;\n\t\t\ttry {\n\t\t\t\tK r = parent.doGetResource(uri, resourceType, rs);\n\t\t\t\tif (r != null)\n\t\t\t\t\treturn r;\n\t\t\t} catch (JRRuntimeException e) {\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"get from server not found \" + uri);\n\t\treturn null;\n\t}",
"java.lang.String getResourceUri();",
"private void loadRegistratedResources() {\n \t\tFile kbPluginLocation = KbPlugin.getDefault().getLocation();\r\n \t\tif(kbPluginLocation!=null) {\r\n \t IExtensionRegistry registry = Platform.getExtensionRegistry();\r\n \t\t\tIExtensionPoint extensionPoint = registry.getExtensionPoint(\"org.jboss.tools.common.kb.tldResource\");\r\n \t\t\tIExtension[] extensions = extensionPoint.getExtensions();\r\n \t\t\tfor (int i=0; i<extensions.length; i++) {\r\n \t\t\t\tIExtension extension = extensions[i];\r\n \t\t\t\tIConfigurationElement[] elements = extension.getConfigurationElements();\r\n \t\t\t\tfor(int j=0; j<elements.length; j++) {\r\n \t\t\t\t\tString uri = elements[j].getAttribute(\"uri\");\r\n \t\t\t\t\tString location = elements[j].getAttribute(\"schema-location\");\r\n \t\t\t\t\tString version = elements[j].getAttribute(\"version\");\r\n \t\t\t\t\tString jsf = elements[j].getAttribute(\"jsf\");\r\n \t\t\t\t\tif(uri==null || uri.length()==0 || location==null || location.length()==0) {\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tFile shemaLocation = new File(kbPluginLocation, location);\r\n \t\t\t\t\tif(shemaLocation.isFile()) {\r\n \t\t\t\t\t\tKbTldResource resource = new KbTldResource(uri, null, null, null);\r\n \t\t\t\t\t\tresource.setSchemaLocation(shemaLocation);\r\n \t\t\t\t\t\tif(version!=null && version.length()>0) {\r\n \t\t\t\t\t\t\tresource.setVersion(version);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tresource.setCustomTld(false);\r\n \t\t\t\t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\t\t\t\tregistratedResources.put(resource, resource);\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tString message = \"Can't load KB schema: \" + shemaLocation;\r\n \t\t\t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));\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\t// Get custom schemas.\r\n \t\tFile schemaFolder = new File(schemaLocation); \r\n \t\tif(!schemaFolder.exists()) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tFile[] schemas = schemaFolder.listFiles(new FileFilter(){\r\n \t\t\tpublic boolean accept(File file) {\r\n \t\t\t\tif(file.isFile()) {\r\n \t\t\t\t\treturn true;\r\n \t\t\t\t}\r\n \t\t\t\treturn false;\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tfor(int i=0; i<schemas.length; i++) {\r\n \t\t\tDocument document = null;\r\n \t\t\ttry {\r\n \t\t\t\tdocument = KbDocumentBuilderFactory.createDocumentBuilder(false).parse(schemas[i]);\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tKbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, \"Can't parse Schema (location: \" + schemas[i] + \")\", e));\r\n \t\t\t\tcontinue;\r\n \t\t\t}\r\n //\t\t\tString tldLocation = schemas[i].getAbsolutePath();\r\n \t\t\tString tldLocation = document.getDocumentElement().getAttribute(SchemaNodeFactory.LOCATION_ATTRIBUTE);\r\n \t\t\tString tldUri = document.getDocumentElement().getAttribute(SchemaNodeFactory.URI_ATTRIBUTE);\r\n \t\t\tString tldVersion = document.getDocumentElement().getAttribute(SchemaNodeFactory.VERSION_ATTRIBUTE);\r\n \t\t\tString jsf = document.getDocumentElement().getAttribute(SchemaNodeFactory.JSF_ATTRIBUTE);\r\n \t\t\tString tldContent = null; \r\n \t\t\tNodeList children = document.getDocumentElement().getChildNodes();\r\n \t\t\tfor(int j=0; j<children.getLength(); j++) {\r\n \t\t\t\tNode node = children.item(j);\r\n \t\t\t\tif(node.getNodeName().equals(SchemaNodeFactory.TLD_CONTENT_NODE)) {\r\n \t\t\t\t\tNode child = node.getFirstChild();\r\n \t\t\t\t\tif(child instanceof CDATASection) {\r\n \t\t\t\t\t\ttldContent = ((CDATASection)child).getData();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tKbTldResource resource = new KbTldResource(tldUri, tldLocation, null, tldVersion);\r\n \t\t\tresource.setTldContent(tldContent);\r\n \t\t\tresource.setSchemaLocation(schemas[i]);\r\n \t\t\tresource.setCustomTld(true);\r\n \t\t\tresource.setJsfResource(\"true\".equals(jsf));\r\n \t\t\tregistratedResources.put(resource, resource);\r\n \t\t}\r\n \t}",
"@Override\n \tpublic Representation getResource() throws Exception {\n \t\tJsonRepresentation result = null;\n \t\t// Rcupre l'identifiant unique de la ressource demande.\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\tSystem.out.println(srcId);\n \t\t// Rcupration des sources de l'intervention\n \t\tList<Source> sources = Interventions.getInstance().getIntervention(interId).getSources();\n \n \t\tSource source = null;\n \t\t\n \t\t// Si on demande un source prcis\n \t\tif (srcId != null) {\n \t\t\t// Recherche du source demand\n \t\t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\t\tsource = sources.get(i);\n \t\t\t\t}\n \t\t\t}\n \t\t\t// Si le source n'est pas trouv\n \t\t\tif (source == null) {\n \t\t\t\tresult = null;\n \t\t\t\tgetResponse().setStatus(Status.CLIENT_ERROR_NOT_ACCEPTABLE);\n \t\t\t} else {\n \t\t\t\tresult = new JsonRepresentation(source.toJSON());\n \t\t\t}\n \t\t// Si on veut tous les sources\n \t\t} else if (srcId == null) {\n \t\t\t\n \t\t\tJSONArray jsonAr = new JSONArray(); //Cration d'une liste Json\n \t\t\tfor(int i=0; i< sources.size();i++){\n\t\t\t\tjsonAr.put(sources.get(i).toJSON()); // On ajoute un jsonObject contenant le source dans le jsonArray\n \t\t\t}\n \t\t\t\n \t\t\tresult = new JsonRepresentation(jsonAr); // On cre la reprsentation de la liste\n \t\t}\n \n \t\t// Retourne la reprsentation, le code status indique au client si elle est valide\n \t\treturn result;\n \t}",
"public String getResourceName();",
"public List<IResource> getResources();",
"public interface ResourceService {\n /**\n * 按主键查找\n **/\n Resource findResourceById(Long id);\n\n /**\n * 按参数分页查找\n **/\n Page<Resource> findResourcePage(PageContext pageContext);\n\n /**\n * 按参数查找对象\n **/\n List<Resource> findResourceByParams(Map<String, Object> params);\n\n /**\n * 保存对象,新增或修改由主键是否为空确定\n **/\n void saveResource(Resource resource);\n\n /**\n * 按主键删除\n **/\n int deleteResourceById(Long id);\n\n List<Resource> findFunctionByUser(String username);\n\n Set<String> findFunctionCodeByUser(String username);\n\n List<Resource> findAllResources();\n\n List<Resource> buildFunctionTree(List<Resource> functions);\n}",
"@SuppressWarnings(\"unchecked\")\t\r\n\tpublic S[] getResourceByName(String name) {\r\n\t\tList<S> returnResourcesList = new LinkedList<S>();\r\n\t\tfor (S resource : this.resourcesList) {\r\n\t\t\tif (resource.getName().equals(name)) {\r\n\t\t\t\treturnResourcesList.add(resource);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn (S[])returnResourcesList.toArray(new Resource[0]);\t\t\t\t\r\n\t}",
"private JnlpResource locateResource( DownloadRequest dreq )\n throws IOException, ErrorResponseException\n {\n if ( dreq.getVersion() == null )\n {\n return handleBasicDownload( dreq );\n }\n else\n {\n return handleVersionRequest( dreq );\n }\n }",
"public void testGetResource2() throws Exception {\n if(DEBUG_FLAG) System.out.println(\"entered testGetResource2\"); \n Ivorn ivorn = new Ivorn(\"ivo://org.test/org.astrogrid.registry.RegistryService\");\n Document doc = rs.getResourceByIdentifier(ivorn);\n assertNotNull(doc);\n if(DEBUG_FLAG) System.out.println(\"received in junit test = \" + XMLUtils.DocumentToString(doc));\n System.out.println(\"exiting testGetResource2\");\n }",
"@Override\n\tpublic Collection<ResourceLocation> getResources(ResourcePackType p_225637_1_, String p_225637_2_,\n\t\t\tString p_225637_3_, int p_225637_4_, Predicate<String> p_225637_5_) {\n\t\treturn null;\n\t}",
"public abstract ServiceLocator find(String name);",
"public interface ResourceDefinition\n{\n\n\t/**\n\t * Get the native path in the repository for the resource\n\t * \n\t * @return\n\t */\n\tString getRepositoryPath();\n\n\t/**\n\t * Get the external path of the passed in path releative to this resource\n\t * \n\t * @param path\n\t * @return\n\t */\n\tString getExternalPath(String path);\n\n\t/**\n\t * Get the repository path, relative to this resource\n\t * \n\t * @param name\n\t * @return\n\t */\n\tString getRepositoryPath(String name);\n\n\t/**\n\t * Does the path represent a resource that is private for the current\n\t * request This may relate to a logged in user or context. This will control\n\t * the caching headers in the http response.\n\t * \n\t * @return\n\t */\n\tboolean isPrivate();\n\n\t/**\n\t * @return\n\t */\n\tString getFunctionDefinition();\n\n\t/**\n\t * @return\n\t */\n\tint getDepth();\n\n}",
"public void testResourceURI() throws Exception {\n testResourceURI(\"RELS-EXT\");\n testResourceURI(\"RELS-INT\");\n }",
"String getRetrieveResourceQuery();",
"@Override\r\n\tpublic List<Resource> findResource() {\n\t\tConnection conn=this.getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps=conn.prepareStatement(\"select * from resource order by resource_id desc\");\r\n\t\t\tResultSet rs=ps.executeQuery();\r\n\t\t\tList<Resource> list=new ArrayList<Resource>();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tResource d=new Resource();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\td.setResourceid(rs.getInt(1));\r\n\t\t\t\td.setStyleid(rs.getInt(2));\r\n\t\t\t\td.setTitle(rs.getString(3));\r\n\t\t\t\td.setSize(rs.getString(4));\r\n\t\t\t\td.setLanguage(rs.getString(5));\r\n\t\t\t\td.setBanben(rs.getString(6));\r\n\t\t\t\td.setText(rs.getString(7));\r\n\t\t\t\td.setPoint(rs.getInt(8));\r\n\t\t\t\td.setInputtime(rs.getTimestamp(9));\r\n\t\t\t\td.setResadd(rs.getString(10));\r\n\t\t\t\td.setImageadd(rs.getString(11));\r\n\t\t\t\tlist.add(d);\r\n\t\t\t}\r\n\t\t\treturn list;\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}finally{\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\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}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Resource getConsoleResource(BeanContext context) {\n SlingHttpServletRequest request = context.getRequest();\n ResourceResolver resolver = request.getResourceResolver();\n String path = null;\n // use the resource set by a probably executed 'defineObjects' tag (supports including components)\n Resource resource = context.getAttribute(\"resource\", Resource.class);\n if (resource == null) {\n resource = request.getResource();\n }\n if (resource != null) {\n path = resource.getPath();\n }\n // use the suffix as the resource path if the resource is not defined or references a servlet\n if (StringUtils.isBlank(path) || path.startsWith(\"/bin/\")) {\n RequestPathInfo requestPathInfo = request.getRequestPathInfo();\n path = XSS.filter(requestPathInfo.getSuffix());\n resource = null;\n }\n if (resource == null && StringUtils.isNotBlank(path)) {\n resource = resolver.getResource(path);\n }\n if (resource == null) {\n // fallback to the root node if the servlet request has no suffix\n resource = resolver.getResource(\"/\");\n }\n return resource;\n }",
"protected abstract Object doLocalLookup( Name name )\n throws NamingException;",
"public void processClassResourceAnnotations ()\n throws Exception\n {\n List<Class<?>> classes = _finder.getClassesForAnnotation(Resource.class);\n for (Class<?> clazz:classes)\n {\n if (!isServletType(clazz))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type class \"+clazz.getName());\n continue;\n }\n //Handle Resource annotation - add namespace entries\n Resource resource = (Resource)clazz.getAnnotation(Resource.class);\n if (resource != null)\n {\n String name = resource.name();\n String mappedName = resource.mappedName();\n Resource.AuthenticationType auth = resource.authenticationType();\n Class type = resource.type();\n boolean shareable = resource.shareable();\n \n if (name==null || name.trim().equals(\"\"))\n throw new IllegalStateException (\"Class level Resource annotations must contain a name (Common Annotations Spec Section 2.3)\");\n \n try\n {\n //TODO don't ignore the shareable, auth etc etc\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name,mappedName))\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name,mappedName))\n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n catch (NamingException e)\n {\n throw new IllegalStateException(e);\n }\n }\n }\n }",
"private ResourceInputStream findResource(String resName, HttpServletRequest request) throws IOException {\n\t\tFile resFile = this.findFile(resName);\n\t\tif (resFile != null)\n\t\t\treturn new ResourceInputStream(resFile);\n\t\t\n\t\t//\ttry resource providers (copy for thread safety, as we don't want concurrent modification exceptions)\n\t\tLinkedList rpList = new LinkedList(this.resourceProviders);\n\t\twhile (rpList.size() != 0) {\n\t\t\tResourceProvider rp = ((ResourceProvider) rpList.removeFirst());\n\t\t\tResourceInputStream ris = rp.getResource(resName, request);\n\t\t\tif (ris != null)\n\t\t\t\treturn ris;\n\t\t}\n\t\t\n\t\t//\tnothing we can do about this one\n\t\treturn null;\n\t}",
"@Override\n public String getName() {\n return FetchingIdlingResource.class.getSimpleName();\n }",
"protected Resource getResource(HttpServletRequest request) {\n String path = request.getPathInfo();\n /*\n * we want to extract everything after /spa/spaServlet from the path info.\n * This should cater for sub-directories\n */\n return getResourceLoaderBean().getResource(constructRemoteUrl(path));\n }",
"public <T> T lookup(String jndiName);",
"public String lookup( String lfn, String handle ) {\n String result = null;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n\n if( (result = catalog.lookup( lfn, handle )) != null ){\n return result;\n }\n }\n return result;\n\n }",
"public synchronized Object getResource(String resource, Object object)\r\n throws IllegalArgumentException\r\n {\r\n Object result = null;\r\n\r\n String prefix = retrieveAbsoluteName(object);\r\n if (prefix != null)\r\n {\r\n result = getResource(prefix+TIGHT_BINDING+resource);\r\n }\r\n else\r\n {\r\n // the object has not been registered, so we perform a tricky manouver\r\n // here, by registering the object, performing the search then\r\n // unregistering the object\r\n\r\n if (object != null) {\r\n // store this mapping\r\n storeObject(UNIQUE_NAME, object);\r\n result = getResource(UNIQUE_NAME+TIGHT_BINDING+resource);\r\n removeObjectFromMaps(object);\r\n }\r\n }\r\n\r\n return result;\r\n }",
"private static Lookup getUserCatalogsLookup() {\n if (userCatalogLookup == null) {\n userCatalogLookup = Lookups.forPath(REGISTRATIONS);\n }\n return userCatalogLookup;\n }",
"private InputSource urlLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative url for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url;\n\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n url = null;\n }\n\n InputSource source = null;\n if (url != null) {\n try {\n InputStream is = null;\n URLConnection conn = url.openConnection();\n if (conn != null) {\n conn.setUseCaches(false);\n is = conn.getInputStream();\n }\n if (is != null) {\n source = new InputSource(is);\n String sysid = url.toExternalForm();\n source.setSystemId(sysid);\n log(\"catalog entry matched as a URL: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n }\n } catch (IOException ex) {\n // ignore\n }\n }\n\n return source;\n\n }",
"public interface IResource {\n\n\t/**\n\t * An optional attribute that identifies the Resource-element.\n\t */\n\tpublic URI getId();\n\n\tpublic boolean setId(URI id);\n\n\t/**\n\t * An optional attribute. If present, it provides a relative URI template for the identifier of the resource. The\n\t * resource's base URI is given by the Resource-element's parent Resource- or Resources-element. The value of the\n\t * path-attribute may be static or may contain embedded template parameters.\n\t */\n\tpublic String getPath();\n\n\tpublic boolean setPath(String path);\n\n\t/**\n\t * An optional attribute whose type is a space-separated list of URIs. Each value in the list identifies a\n\t * ResourceType-element that defines a set of methods supported by the resource.\n\t */\n\tpublic List<URI> getType();\n\n\tpublic boolean setType(List<URI> type);\n\n\tpublic boolean addType(URI type);\n\n\t/**\n\t * Defines the media type for the query component of the resourve URI. Defaults to\n\t * 'application/x-www-form-urlencoded' if not specified which results in query strings being formatted as specified.\n\t */\n\tpublic String getQueryType();\n\n\tpublic boolean setQueryType(String queryType);\n\n\t/**\n\t * A Resource-element contains zero or more Doc-elements.\n\t */\n\tpublic List<IDoc> getDocs();\n\n\tpublic boolean addDoc(IDoc doc);\n\n\t/**\n\t * A Resource-element contains zero or more Param-elements with one of the following values for its style-attriute:\n\t * template, matrix, query, header.\n\t */\n\tpublic List<IParam> getParams();\n\n\tpublic boolean addParam(IParam param);\n\n\t/**\n\t * A Resource-element contains zero or more Method-elements, each of which describes the input to and output from an\n\t * HTTP protocol method that can be applied to the resource. Such locally-defined methods are added to any methods\n\t * included in ResourceType-elements referred to using the type-attribute.\n\t */\n\tpublic List<IMethod> getMethods();\n\n\tpublic boolean addMethod(IMethod method);\n\n\t/**\n\t * A Resource-element contains zero or more Resource-elements that describe sub-resources. Such sub-resources\n\t * inherit matrix and template parameters from the parent resource since their URI is relative to that of the parent\n\t * resource but they do not inherit query or header parameters specified globally for the parent resource.\n\t */\n\tpublic List<IResource> getResources();\n\n\tpublic boolean addResource(IResource resource);\n\n\tpublic String toString();\n\n}",
"protected abstract URL resolve(String resource) throws IOException;",
"private AdvertServiceEntryResource getResource() throws RemoteException\n {\n\tObject resource = null;\n\ttry\n\t {\n\t\tresource = ResourceContext.getResourceContext().getResource();\n\t }\n\tcatch(NoSuchResourceException e)\n\t {\n\t\tthrow new RemoteException(\"Specified resource does not exist\", e);\n\t }\n\tcatch(ResourceContextException e)\n\t {\n\t\tthrow new RemoteException(\"Error during resource lookup\", e);\n\t }\n\tcatch(Exception e)\n\t {\n\t\tthrow new RemoteException(\"\", e);\n\t }\n\t\n\tAdvertServiceEntryResource entryResource = (AdvertServiceEntryResource) resource;\n\treturn entryResource;\n }",
"public String findResources() {\n\t\tFacesMessage msg = new FacesMessage();\n\t\ttry {\n\t\t\t\n\t\t\tList<RefFileConfigDto> result = refParametrageServiceImpl.findResourcesConfig(strToInt(idDomain), strToInt(idConfig));\n\t\t\t\t\t\n\t\t\tif (result == null || result.isEmpty()) {\n\t\t\t\tflash.put(\"listRefFileConfigDto\", null);\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundle.getString(\"warn_info\") + \": \"\n\t\t\t\t\t\t+ bundle.getString(\"warn_info_aucun_result\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\tflash.setKeepMessages(true);\n\t\t\t} else {\n\t\t\t\tflash.put(\"listRefFileConfigDto\", result);\n\t\t\t\tflash.keep(\"listRefFileConfigDto\");\n\t\t\t\tpullValuesFromFlash(null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tflash.put(\"listRefFileConfigDto\", null);\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundle.getString(\"error_echec\") + \": \"\n\t\t\t\t\t+ bundle.getString(\"error_echec_inconnue\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\tflash.setKeepMessages(true);\n\t\t}\n\t\treturn \"paramConfigSearch?faces-redirect=true\";\n\t}",
"public void locateResources() {\n\t\t\n\t\t// Locate resource for tips.txt\n\t\ttipsLocation = Facts.class.getResource(\"tips.txt\");\n\t\t\n\t\t// Throw IllegalArgumentException if resource could not be located\n\t\tif (tipsLocation == null) throw new IllegalArgumentException(\"tipsLocation is null.\"\n\t\t\t\t+ \"Could not locate resource for tips.txt\");\n\t\t\n\t\t\n\t\t// Locate resource for facts.txt\n\t\tfactsLocation = Facts.class.getResource(\"facts.txt\");\n\t\t\n\t\t// Throw IllegalArgumentException if resource could not be located\n\t\tif (factsLocation == null) throw new IllegalArgumentException(\"factsLocation is null.\"\n\t\t\t\t+ \"Could not locate resource for facts.txt\");\n\t\t\n\t}",
"private static void lookupJNDIMethodResource(javax.naming.Context context, Object instance, Method method, String name) throws NamingException,\n\t\t\tIllegalAccessException, InvocationTargetException {\n\n\t\tif (!method.getName().startsWith(\"set\") || method.getParameterTypes().length != 1 || !method.getReturnType().getName().equals(\"void\")) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid method resource injection annotation\");\n\t\t}\n\n\t\tObject lookedupResource = null;\n\t\tboolean accessibility = false;\n\n\t\tif ((name != null) && (name.length() > 0)) {\n\t\t\tlookedupResource = context.lookup(name);\n\t\t} else {\n\t\t\tlookedupResource = findByClass(context, method.getParameterTypes()[0]);\n\t\t}\n\n\t\taccessibility = method.isAccessible();\n\t\tmethod.setAccessible(true);\n\t\tmethod.invoke(instance, lookedupResource);\n\t\tmethod.setAccessible(accessibility);\n\t}",
"public List<ScheduleResource> neededSpecificResources();",
"interface ResourceClassIntrospector {\n \n /**\n * Initializes the recipient introspector.\n * @param reflectionService reflection service\n */\n void init(ReflectionService reflectionService);\n \n /**\n * Produces a set of resource method descriptors for the given resource\n * class.\n * <p>\n * An implementation of this method must traverse classes identified by\n * subresource locators to produce the complete set of resource methods \n * reachable from the given resource class.\n * \n * @param path path of the resource specified by {@code resourceClass}\n * @param resourceClass the subject resource class\n * @return set of resource method descriptors\n */\n Set<ResourceDescriptor> describe(String path, Class<?> resourceClass);\n \n}",
"Set<String> getConstraintMappingResourcePaths();",
"public void handleSearchResponse(NamedResource namedResource)\n {\n }",
"private static Hashtable<? super String, Object> getProviderResource(Object obj) throws NamingException {\n if (obj == null) {\n return (new Hashtable<>(1));\n }\n synchronized (propertiesCache) {\n Class<?> c = obj.getClass();\n\n Hashtable<? super String, Object> props = propertiesCache.get(c);\n if (props != null) {\n return props;\n }\n props = new Properties();\n\n InputStream istream = helper.getResourceAsStream(c, PROVIDER_RESOURCE_FILE_NAME);\n\n if (istream != null) {\n try {\n ((Properties) props).load(istream);\n } catch (IOException e) {\n NamingException ne = new ConfigurationException(\n \"Error reading provider resource file for \" + c);\n ne.setRootCause(e);\n throw ne;\n }\n }\n propertiesCache.put(c, props);\n return props;\n }\n }",
"public interface IResource {\n\t// TODO: Have priorities for resources either here or implemented in IResourceView\n\n\n\tpublic String getName();\n\t\n\tpublic IUniformLocation getLocation(); // public IStorageLocation getLocation() ?\n\t\n\tpublic IResourceType getType();\n}",
"public abstract ResourceInputStream getResource(String resName, HttpServletRequest request);",
"public interface ResourceService {\n public List<ResourceItemBean> getResourceItems();\n}",
"public interface Resource { \n /**\n * @return the time, in <code>millis</code>, at which this resource was\n * last modified.\n */\n public long lastModified();\n\n /**\n * @return the URI that this resource corresponds to.\n */\n public String getURI();\n\n /**\n * @return the <code>InputStream</code> corresponding to this resource.\n * @throws IOException\n */\n public InputStream getInputStream() throws IOException;\n \n \n /**\n * @return the <code>Resource</code> corresponding to the given relative URI.\n * @param uri a URI.\n * @throws IOException\n */ \n public Resource getRelative(String uri) throws IOException;\n \n}",
"@Override\n public URL getEntry(final String name) {\n return getClass().getResource(name);\n }",
"List<String> externalResources();",
"@Override\r\n public List<Object> getMatchedResources() {\n return null;\r\n }",
"public JsonLdResource getResource(String subject) {\n return resourceMap.get(subject);\n }",
"public interface INamedResource {\n String getShortName();\n}",
"public int getResource() throws java.rmi.RemoteException;",
"public URL getResource(String name)\n {\n Object sm = System.getSecurityManager();\n\n if (sm != null)\n {\n try\n {\n ((SecurityManager) sm).checkPermission(\n new AdminPermission(this, AdminPermission.RESOURCE));\n }\n catch (Exception e)\n {\n return null; // No permission\n }\n }\n\n return getFramework().getBundleResource(this, name);\n }",
"public Object getResource(String id) {\n\t\tint idx = rks.indexOf(id);\n\t\tif (idx < 0) throw new NoSuchElementException(id);\n\t\telse return rvs.get(idx);\n\t}",
"public void processMethodResourceAnnotations ()\n throws Exception\n {\n //Get all methods that have a Resource annotation\n List<Method> methods = _finder.getMethodsForAnnotation(javax.annotation.Resource.class);\n \n for (Method m: methods)\n {\n if (!isServletType(m.getDeclaringClass()))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type method \"+m.getName());\n continue;\n }\n /*\n * Commons Annotations Spec 2.3\n * \" The Resource annotation is used to declare a reference to a resource.\n * It can be specified on a class, methods or on fields. When the \n * annotation is applied on a field or method, the container will \n * inject an instance of the requested resource into the application \n * when the application is initialized... Even though this annotation \n * is not marked Inherited, if used all superclasses MUST be examined \n * to discover all uses of this annotation. All such annotation instances \n * specify resources that are needed by the application. Note that this \n * annotation may appear on private fields and methods of the superclasses. \n * Injection of the declared resources needs to happen in these cases as \n * well, even if a method with such an annotation is overridden by a subclass.\"\n * \n * Which IMHO, put more succinctly means \"If you find a @Resource on any method\n * or field, inject it!\".\n */\n Resource resource = (Resource)m.getAnnotation(Resource.class);\n if (resource == null)\n continue;\n \n //JavaEE Spec 5.2.3: Method cannot be static\n if (Modifier.isStatic(m.getModifiers()))\n throw new IllegalStateException(m+\" cannot be static\");\n \n \n // Check it is a valid javabean \n if (!IntrospectionUtil.isJavaBeanCompliantSetter(m))\n throw new IllegalStateException(m+\" is not a java bean compliant setter method\");\n \n //default name is the javabean property name\n String name = m.getName().substring(3);\n name = name.substring(0,1).toLowerCase()+name.substring(1);\n name = m.getDeclaringClass().getCanonicalName()+\"/\"+name;\n //allow default name to be overridden\n name = (resource.name()!=null && !resource.name().trim().equals(\"\")? resource.name(): name);\n //get the mappedName if there is one\n String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals(\"\")?resource.mappedName():null);\n \n Class type = m.getParameterTypes()[0];\n \n //get other parts that can be specified in @Resource\n Resource.AuthenticationType auth = resource.authenticationType();\n boolean shareable = resource.shareable();\n \n //if @Resource specifies a type, check it is compatible with setter param\n if ((resource.type() != null) \n && \n !resource.type().equals(Object.class)\n &&\n (!IntrospectionUtil.isTypeCompatible(type, resource.type(), false)))\n throw new IllegalStateException(\"@Resource incompatible type=\"+resource.type()+ \" with method param=\"+type+ \" for \"+m);\n \n //check if an injection has already been setup for this target by web.xml\n Injection webXmlInjection = _injections.getInjection(m.getDeclaringClass(), m);\n if (webXmlInjection == null)\n {\n try\n {\n //try binding name to environment\n //try the webapp's environment first\n boolean bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name, mappedName);\n \n //try the server's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name, mappedName);\n \n //try the jvm's environment\n if (!bound)\n bound = org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(null, name, mappedName);\n \n //TODO if it is an env-entry from web.xml it can be injected, in which case there will be no\n //NamingEntry, just a value bound in java:comp/env\n if (!bound)\n {\n try\n {\n InitialContext ic = new InitialContext();\n String nameInEnvironment = (mappedName!=null?mappedName:name);\n ic.lookup(\"java:comp/env/\"+nameInEnvironment); \n bound = true;\n }\n catch (NameNotFoundException e)\n {\n bound = false;\n }\n }\n \n if (bound)\n {\n Log.debug(\"Bound \"+(mappedName==null?name:mappedName) + \" as \"+ name);\n // Make the Injection for it\n Injection injection = new Injection();\n injection.setTargetClass(m.getDeclaringClass());\n injection.setJndiName(name);\n injection.setMappingName(mappedName);\n injection.setTarget(m);\n _injections.add(injection);\n } \n else if (!isEnvEntryType(type))\n {\n \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3 \n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n }\n catch (NamingException e)\n { \n //if this is an env-entry type resource and there is no value bound for it, it isn't\n //an error, it just means that perhaps the code will use a default value instead\n // JavaEE Spec. sec 5.4.1.3\n if (!isEnvEntryType(type))\n throw new IllegalStateException(e);\n }\n }\n else\n {\n //if an injection is already set up for this name, then the types must be compatible\n //JavaEE spec sec 5.2.4\n \n Object value = webXmlInjection.lookupInjectedValue();\n if (!IntrospectionUtil.isTypeCompatible(type, value.getClass(), false))\n throw new IllegalStateException(\"Type of field=\"+type+\" is not compatible with Resource type=\"+value.getClass());\n }\n }\n }",
"@Override\n\tpublic Resource loadAsResource(String keyName) {\n\t\treturn null;\n\t}",
"ResourceAPI createResourceAPI();",
"protected ValidatorResources loadResources(ServletContext ctx)\n throws IOException, ServletException {\n if ((pathnames == null) || (pathnames.length() <= 0)) {\n return null;\n }\n\n StringTokenizer st = new StringTokenizer(pathnames, RESOURCE_DELIM);\n\n List urlList = new ArrayList();\n ValidatorResources resources = null;\n try {\n while (st.hasMoreTokens()) {\n String validatorRules = st.nextToken().trim();\n\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Loading validation rules file from '\"\n + validatorRules + \"'\");\n }\n\n URL input =\n ctx.getResource(validatorRules);\n\n // If the config isn't in the servlet context, try the class\n // loader which allows the config files to be stored in a jar\n if (input == null) {\n input = getClass().getResource(validatorRules);\n }\n\n if (input != null) {\n urlList.add(input);\n } else {\n throw new ServletException(\n \"Skipping validation rules file from '\"\n + validatorRules + \"'. No url could be located.\");\n }\n }\n\n int urlSize = urlList.size();\n String[] urlArray = new String[urlSize];\n\n for (int urlIndex = 0; urlIndex < urlSize; urlIndex++) {\n URL url = (URL) urlList.get(urlIndex);\n\n urlArray[urlIndex] = url.toExternalForm();\n }\n\n resources = new ValidatorResources(urlArray);\n } catch (SAXException sex) {\n LOG.error(\"Skipping all validation\", sex);\n throw new StrutsException(\"Skipping all validation because the validation files cannot be loaded\", sex);\n }\n return resources;\n }",
"@GET\n @Path(\"{id}\")\n @Produces({ \"application/json\" })\n public abstract Response find(@PathParam(\"id\") Long id);",
"public Collection lookup( String lfn ) {\n Collection result = new LinkedList();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n Collection l = catalog.lookup( lfn );\n if ( l != null ){\n result.addAll( l );\n }\n }\n return result;\n\n }",
"@Override\n public Set<Datasource> getDatasources() throws ConfigurationException {\n Context context = getContext();\n Set<Datasource> result = new HashSet<>();\n int length = context.getResource().length;\n if (tomcatVersion.isAtLeast(TomcatVersion.TOMCAT_55)) {\n // Tomcat 5.5.x or Tomcat 6.0.x\n for (int i = 0; i < length; i++) {\n String type = context.getResourceType(i);\n if (\"javax.sql.DataSource\".equals(type)) { // NOI18N\n String name = context.getResourceName(i);\n String username = context.getResourceUsername(i);\n String url = context.getResourceUrl(i);\n String password = context.getResourcePassword(i);\n String driverClassName = context.getResourceDriverClassName(i);\n if (name != null && username != null && url != null && driverClassName != null) {\n // return the datasource only if all the needed params are non-null except the password param\n result.add(new TomcatDatasource(username, url, password, name, driverClassName));\n }\n }\n }\n if (tomeeVersion != null) {\n TomeeResources actualResources = getResources(false);\n if (actualResources != null) {\n result.addAll(getTomeeDatasources(actualResources));\n }\n }\n } else {\n // Tomcat 5.0.x\n ResourceParams[] resourceParams = context.getResourceParams();\n for (int i = 0; i < length; i++) {\n String type = context.getResourceType(i);\n if (\"javax.sql.DataSource\".equals(type)) { // NOI18N\n String name = context.getResourceName(i);\n // find the resource params for the selected resource\n for (int j = 0; j < resourceParams.length; j++) {\n if (name.equals(resourceParams[j].getName())) {\n Parameter[] params = resourceParams[j].getParameter();\n HashMap paramNameValueMap = new HashMap(params.length);\n for (Parameter parameter : params) {\n paramNameValueMap.put(parameter.getName(), parameter.getValue());\n }\n String username = (String) paramNameValueMap.get(\"username\"); // NOI18N\n String url = (String) paramNameValueMap.get(\"url\"); // NOI18N\n String password = (String) paramNameValueMap.get(\"password\"); // NOI18N\n String driverClassName = (String) paramNameValueMap.get(\"driverClassName\"); // NOI18N\n if (username != null && url != null && driverClassName != null) {\n // return the datasource only if all the needed params are non-null except the password param\n result.add(new TomcatDatasource(username, url, password, name, driverClassName));\n }\n }\n }\n }\n }\n }\n return result;\n }",
"public IPath[] getAdditionalResources();",
"private JPPFResourceWrapper loadResourceData0(Map<String, Object> map, boolean asResource) throws Exception\n\t{\n\t\tif (debugEnabled) log.debug(\"loading remote definition for resource [\" + map.get(\"name\") + \"], requestUuid = \" + requestUuid);\n\t\tJPPFResourceWrapper resource = loadRemoteData(map, false);\n\t\tif (debugEnabled) log.debug(\"remote definition for resource [\" + map.get(\"name\") + \"] \"+ (resource.getDefinition()==null ? \"not \" : \"\") + \"found\");\n\t\treturn resource;\n\t}",
"public interface ResourceLoader {\n\n\t/** Pseudo URL prefix for loading from the class path: \"classpath:\" */\n\tpublic static final String CLASSPATH_URL_PREFIX = \"classpath:\";\n\n\t/** URL prefix for loading from the file system: \"file:\" */\n\tpublic static final String FILE_URL_PREFIX = \"file:\";\n\n\tResource getResource(String location);\n\n}",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"@Override\n public void initialize(URL location, ResourceBundle resources) {}",
"public static synchronized Resource getResource(String xmlFileName, ResourceSet rs) {\r\n\t\tURI uri = URI.createFileURI(xmlFileName);\r\n\t\tResource resource = null;\r\n\t\ttry {\r\n\t\t\tresource = rs.getResource(uri, true);\r\n\t\t} catch (Throwable fileNotFoundException) {\r\n\t\t\tresource = rs.createResource(uri);\r\n\t\t}\r\n\t\treturn resource;\r\n\t}",
"PrivateResource resolve(Uri encryptedPath, Uri decryptedPath);",
"String getResourceID();",
"public interface WebResource {\n public String getName();\n\n public URL getBaseURL() throws MalformedURLException;\n\n public WebPageIterator getIterator();\n}",
"@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tsearch_sup();\n\t\tsearch_unit();\n\t}",
"@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }"
] | [
"0.6812382",
"0.65274274",
"0.641979",
"0.6348425",
"0.62689006",
"0.62072575",
"0.6192945",
"0.60888726",
"0.6069127",
"0.6025231",
"0.59732825",
"0.5896422",
"0.5888548",
"0.5882013",
"0.58715487",
"0.57987094",
"0.57842726",
"0.577802",
"0.5752816",
"0.575029",
"0.575014",
"0.57271177",
"0.5726732",
"0.5697029",
"0.56917685",
"0.56571454",
"0.56329143",
"0.5624101",
"0.56153166",
"0.56152374",
"0.5614377",
"0.5606221",
"0.56042",
"0.5586922",
"0.556235",
"0.554471",
"0.5533756",
"0.55151486",
"0.5513414",
"0.55088764",
"0.55009794",
"0.54855",
"0.5484557",
"0.54455155",
"0.5444752",
"0.54347825",
"0.54303026",
"0.5424626",
"0.5411954",
"0.5392873",
"0.5384966",
"0.5359309",
"0.53545463",
"0.5350363",
"0.534827",
"0.5327127",
"0.53221214",
"0.5319413",
"0.53186977",
"0.5313556",
"0.5309328",
"0.53088117",
"0.53020877",
"0.5296844",
"0.52962595",
"0.5295112",
"0.52798",
"0.52794844",
"0.52741426",
"0.52698475",
"0.525591",
"0.5247572",
"0.52466774",
"0.5244344",
"0.5237831",
"0.5230505",
"0.52161527",
"0.52160734",
"0.52124107",
"0.52117133",
"0.5211247",
"0.51930135",
"0.5192903",
"0.5187991",
"0.51805127",
"0.51745975",
"0.51733",
"0.51729864",
"0.51715744",
"0.51708746",
"0.51706296",
"0.51671034",
"0.5157254",
"0.51470023",
"0.5144469",
"0.5142069",
"0.51412123",
"0.5136843",
"0.51280475",
"0.5128042",
"0.5123879"
] | 0.0 | -1 |
Ensure that the collection contains the specified element. | boolean add(T element); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean contains(E element);",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"public void contains(@Nullable Object element) {\n if (!Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should have contained <%s>\", getDisplaySubject(), element);\n }\n }",
"public boolean contains(E element) {\r\n return items.contains(element);\r\n }",
"public boolean contains(T element);",
"public boolean contains(Object elem);",
"@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }",
"public abstract boolean contains(E e);",
"public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}",
"public void doesNotContain(@Nullable Object element) {\n if (Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should not have contained <%s>\", getDisplaySubject(), element);\n }\n }",
"public boolean contains(E elem) {\n return indexOf(elem) != -1;\n }",
"public boolean contains(E element) {\n // TODO: YOUR CODE HERE\n return backwards.containsKey(element);\n }",
"public static <E> boolean addNotNull(Collection<E> collection, E element) {\n\t\tif (element == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn collection.add(element);\n\t}",
"boolean contains(T element);",
"@Test\r\n public void testContains() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test element does not exist case\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test element exists case\r\n assertTrue(instance.contains(entry1));\r\n }",
"public boolean contains(ElementType element){\n for(ElementType e:this){\n if(e.equals(element)){\n return true;\n }\n }\n return false;\n }",
"public boolean contains(T elem) {\n return list.contains(elem);\n }",
"public abstract boolean contains(Object item);",
"public boolean contains(E value);",
"public boolean add(Object element);",
"QueryElement addOrNotEmpty(String collectionProperty);",
"@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }",
"@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, root);\n\t}",
"public static boolean checkElement(Element element) \n\t{\n\t\treturn LIST_OF_ELEMENT.containsValue(element);\n\t}",
"public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}",
"public boolean hasElement(String name) {\n return elements.has(name);\n }",
"@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}",
"public boolean add(E element){\n Object result = map.put(element, \"\");\n return (result == null);\n }",
"QueryElement addNotEmpty(String collectionProperty);",
"@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }",
"public static boolean haveDuplicated(Solution[] Collection, Solution element) {\n // Go through All the Collection\n for (Solution item: Collection) {\n // Prevent NullElementException\n if (item == null) {\n return false;\n }\n if(item.equals(element)) {\n return true;\n }\n }\n return false;\n }",
"boolean hasElement();",
"public boolean contains(E e) {\n\t /*\n\t * Add code here\n\t */\n\t\t for(int c=0;c<num_elements;c++){\n\t\t\t if(elements[c]==e){\n\t\t\t\t return true;\n\t\t\t }\n\t\t }\n\t return false;\n\t }",
"@Test\r\n\tpublic void testContains() {\r\n\t\tassertFalse(ll.contains(t1));\r\n\t\tll.add(0, t1);\r\n\t\tassertTrue(ll.contains(t1));\r\n\t}",
"@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\treturn value == null;\r\n\t\t}",
"boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}",
"public boolean contains(SVGElement element) {\n \t\treturn elementToModel.containsKey(element);\n \t}",
"@SuppressWarnings( {\"raw\", \"unchecked\"} )\n public static <T> ContainsSpecification<T> contains( Property<? extends Collection<T>> collectionProperty,\n Variable variable )\n {\n NullArgumentException.validateNotNull( \"Variable\", variable );\n return new ContainsSpecification( property( collectionProperty ), variable );\n }",
"@Test\r\n public void testFind() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test empty collection exception\r\n try {\r\n instance.find(0);\r\n fail(\"Should throw ECE - testFind\");\r\n } catch (EmptyCollectionException | IndexOutOfBoundsException e) {\r\n assertTrue(e instanceof EmptyCollectionException);\r\n }\r\n\r\n instance.add(entry1);\r\n\r\n // Test element not found exception\r\n try {\r\n instance.find(1);\r\n fail(\"Should throw IOOBE - testFind\");\r\n } catch (EmptyCollectionException | IndexOutOfBoundsException e) {\r\n assertTrue(e instanceof IndexOutOfBoundsException);\r\n }\r\n\r\n // Test element exists case\r\n assertTrue(instance.contains(entry1));\r\n try {\r\n assertEquals(entry1, instance.find(0));\r\n\r\n } catch (EmptyCollectionException | IndexOutOfBoundsException e) {\r\n fail(\"Should not throw exception - testFind\");\r\n }\r\n }",
"public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}",
"public boolean contains(E elem) {\n Iterator<E> inorder = getInorderIterator();\n\n while (inorder.hasNext()) {\n if (inorder.next().equals(elem)) {\n return true;\n }\n }\n return false;\n }",
"public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }",
"@Test\n public void testContains_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n instance.add(3);\n\n boolean expResult = true;\n boolean result = instance.contains(1);\n assertEquals(expResult, result);\n }",
"public abstract boolean doesElementExist(final String key, final String element);",
"public boolean containsElement(int i, T obj);",
"@Test\n public void testContains_Contain_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(3, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n boolean expResult = true;\n boolean result = instance.contains(4);\n assertEquals(expResult, result);\n }",
"public static <T> ContainsSpecification<T> contains( Property<? extends Collection<T>> collectionProperty,\n T value )\n {\n NullArgumentException.validateNotNull( \"Value\", value );\n return new ContainsSpecification<>( property( collectionProperty ), value );\n }",
"public boolean contains(int elem){\n return itemArray[count-1] == elem;\n }",
"@Override\r\n public boolean contains(E target) {\r\n if(find(target) != null) return true;\r\n return false;\r\n }",
"@Test\r\n\tvoid testContains() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tlist.insert(toDoItem1);\r\n\t\tlist.insert(toDoItem2);\r\n\t\tlist.insert(toDoItem3);\r\n\t\tlist.insert(toDoItem4);\r\n\r\n\t\tif (list.contains(\"Item 1\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 1\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 2\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 2\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 3\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 3\\\"\");\r\n\t\t}\r\n\t\tif (list.contains(\"Item 4\") != true) {\r\n\t\t\tfail(\"Failed to find \\\"Item 4\\\"\");\r\n\t\t}\r\n\t}",
"public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean contains(String element) {\n Node currNode = this.head;\n if(currNode == null){\n }\n while(currNode.getNextNode() != null){\n if(currNode.getItem().equals(element)){\n return true;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }",
"public boolean contains(int element) {\n for(Integer i:data) {\n if(i!=null && i==element) {\n return true;\n }\n }\n return false;\n /*for(int i=0;i<data.length;i++) {\n if(data[i]==element) {\n return true;\n }\n }\n return false;*/\n }",
"public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }",
"@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n Organizador o =new Organizador(new Utilizador(\"teste\", \"[email protected]\", \"teste\", \"teste\", true, 5));\r\n instance.addElement(o);\r\n boolean expResult = true;\r\n boolean result = instance.contains(o);\r\n assertEquals(expResult, result);\r\n \r\n }",
"@Test\r\n public void test_containNull_True() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING, null});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertTrue(\"'containNull' should be correct.\", res);\r\n }",
"protected boolean isElementPresent(By element) {\n\t\t \n if (driver.findElements(element).isEmpty()) {\n \treturn false;\n } else {\n \treturn true;\n }\n }",
"public static <OUT> void checkCollection(Collection<OUT> elements, Class<OUT> viewedAs) {\n checkIterable(elements, viewedAs);\n }",
"public void insert(E element) {\n // TODO: YOUR CODE HERE\n if (contains(element)) {\n throw new IllegalArgumentException();\n } else {\n setElement(size() + 1, element);\n size += 1;\n bubbleUp(size());\n }\n }",
"public boolean contains(Object o);",
"public boolean contains(Object o);",
"public boolean containsAll(Collection<?> arg0) {\n\t\treturn false;\n\t}",
"public boolean contains(T entry) {\n return false;\n }",
"@Test\n public void testContains_Contain_Overflow_Boundary() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n boolean expResult = true;\n boolean result = instance.contains(6);\n assertEquals(expResult, result);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public boolean contains(Object o) {\n return search((E) o) != null;\n }",
"public boolean contains(T element) {\n\t\tif (head == null)\n\t\t\treturn false;\n\t\tNode<T> curNode = head;\n\t\twhile (curNode != null) {\n\t\t\tif (curNode.value.equals(element))\n\t\t\t\treturn true;\n\t\t\tcurNode = curNode.next;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}",
"public boolean contains(E item) {\n\n return bstContains(item, root);\n }",
"boolean offer(E newElement);",
"public boolean isPresent(int element) {\n\t\treturn location.containsKey(element);\n\t}",
"public boolean contains(Object o) {\n\n Object value = elements.get(o);\n return value != null;\n }",
"public boolean test(E element);",
"@Override\n public boolean containsAll(final Collection<?> collection) {\n this.checkCollectionNotNull(collection);\n final Iterator<?> iterator = collection.iterator();\n\n while (iterator.hasNext()) {\n if (!this.contains(iterator.next())) {\n return false;\n }\n }\n\n return true;\n }",
"@Override\n\tpublic boolean contains(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) { // if current value is same\n\t\t\t\treturn true;\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].contains(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].contains(elem);\n\t\t}\n\t\treturn false;\n\t}",
"public abstract boolean add(Comparable element) throws IllegalArgumentException;",
"boolean hasContains();",
"@Override\n public boolean contains(Object item) {\n if (item == null)\n return false;\n return map.containsKey(item);\n }",
"boolean contains(String element);",
"@Test\r\n\tpublic void testContains() {\r\n\t\tAssert.assertTrue(list.contains(new Munitions(2, 3, \"iron\")));\r\n\t\tAssert.assertFalse(list.contains(new Munitions(2, 5, \"ferrum\")));\r\n\t}",
"public boolean contains(T x) {\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif(t != null && t.element == x) {\n\t\t\tsplay(t);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }",
"@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }",
"public boolean contains(Type item);",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Test\n public void existsItem(){\n List <Character> list = new ArrayList<>();\n list.add('a');\n list.add('b');\n list.add('c');\n\n assertTrue(list.contains('b'));\n }",
"public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}",
"@Test\n\tpublic void testContains() {\n\t\tHeap heap = new Heap(testArrayList.length);\n\t\theap.build(testArrayList);\n\t\tassertTrue(heap.contains(33));\n\t\tassertFalse(heap.contains(1));\n\t}",
"@Override\n\tpublic boolean contains(Object entity) {\n\t\treturn false;\n\t}",
"Boolean contains(X x);",
"public boolean has(String itemName);",
"@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}",
"public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }",
"boolean contains();",
"public TreeIter<T> contains(T element) {\n\t\tIter<Boolean> iter = search(element);\n\t\tNode n;\n\n\t\tif (iter != null) {\n\t\t\tn = this.root;\n\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\t// left sub-tree\n\t\t\t\tif (iter.next() == false)\n\t\t\t\t\tn = n.left;\n\t\t\t\t// right sub-tree\n\t\t\t\telse\n\t\t\t\t\tn = n.right;\n\t\t\t}\n\t\t} else\n\t\t\treturn null;\n\n\t\tthis.child = new List<Node>();\n\n\t\tinorderTraverse(n);\n\n\t\treturn new TreeIterImp();\n\t}",
"public boolean add(Element element) {\n if (addNoNotify(element)) {\n setChanged();\n Message message = Message.makeAdded(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }"
] | [
"0.708101",
"0.7078828",
"0.7042143",
"0.6874107",
"0.66104937",
"0.65751845",
"0.65084577",
"0.6367538",
"0.6344534",
"0.63153434",
"0.63132805",
"0.6276149",
"0.6270169",
"0.62570655",
"0.6240116",
"0.6195575",
"0.61828405",
"0.613923",
"0.6057675",
"0.6035815",
"0.59720874",
"0.5960756",
"0.59385777",
"0.59086055",
"0.58820546",
"0.58566225",
"0.5851413",
"0.58487386",
"0.5839214",
"0.58278704",
"0.58220273",
"0.5801901",
"0.5799243",
"0.5775046",
"0.57731247",
"0.57636225",
"0.573659",
"0.5729358",
"0.5726296",
"0.57137644",
"0.5709328",
"0.56933933",
"0.5689221",
"0.5684949",
"0.56738454",
"0.56568384",
"0.5632118",
"0.5620886",
"0.557148",
"0.55633473",
"0.55563396",
"0.55506635",
"0.55496645",
"0.55404294",
"0.5540221",
"0.55394",
"0.55308926",
"0.55287486",
"0.5525219",
"0.55143654",
"0.550955",
"0.55026615",
"0.55026615",
"0.54932845",
"0.5491718",
"0.54913425",
"0.54864436",
"0.54819894",
"0.5480676",
"0.54787105",
"0.54767495",
"0.54744893",
"0.54740417",
"0.54673046",
"0.5462552",
"0.5459289",
"0.5457008",
"0.54519427",
"0.545183",
"0.5449293",
"0.5444771",
"0.5434387",
"0.5433161",
"0.5430236",
"0.5430151",
"0.5428768",
"0.5428768",
"0.5428768",
"0.54225034",
"0.541198",
"0.5410217",
"0.54084384",
"0.53880274",
"0.5385021",
"0.5381462",
"0.5370649",
"0.53679925",
"0.53662556",
"0.5365756"
] | 0.5428181 | 89 |
Removes all of the elements from this collection. | void clear(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void clear() {\n for (E e : this) {\n remove(e);\n }\n }",
"public void clear() {\n \tIterator<E> iterateSet = this.iterator();\n \t\n \twhile(iterateSet.hasNext()) {\n \t\t// iterate through and remove all elements\n \t\titerateSet.next();\n \t\titerateSet.remove();\n \t}\n }",
"public void removeAllElements();",
"@Override\n public void clear() {\n elements.clear();\n indexByElement.clear();\n }",
"public void clear() {\n\t\tcollection.clear();\n\t}",
"public void clear() {\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\titerator.next();\n\t\t\titerator.remove();\n\t\t}\n\t}",
"@Override\n\tpublic void clear() {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\telements[i] = null;\n\t\t}\n\n\t\tsize = 0;\n\t}",
"public void clear() {\n this.collection.clear();\n }",
"public void clear() {collection.clear();}",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void removeAll();",
"public void clear() {\n\t\tthis.size = 0;\n\t\tthis.elements = new Object[capacity];\n\t}",
"public final void clear() {\r\n\t\t// Let gc do its work\r\n\t\tfor (int i = this.size - 1; i >= 0; --i) {\r\n\t\t\tthis.elementData[i] = null;\r\n\t\t}\r\n\t\tthis.size = 0;\r\n\t}",
"public void removeAllItems() {\n contents.clear();\n }",
"public void removeAll()\n {\n if (elemsListLayout != null)\n {\n elemsListLayout.clear();\n }\n }",
"public void removeAll() {\n this.arrayList = null;\n this.arrayList = new ArrayList<>();\n }",
"@DeleteMapping(\"ElementWebService/removeAll\")\n\tpublic void removeAll() {\n\t\telementService.removeAll();\n\t}",
"@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }",
"public void clear() {\n\t\tthis.set.clear();\n\t\tthis.size = 0;\n\t}",
"public void supprimerCollection(){\r\n collection.clear();\r\n }",
"public void removeAll() {\n start = null;\n _size = 0;\n }",
"@Override\n\tpublic void removeAll() {\n\t\tfor (Paper paper : findAll()) {\n\t\t\tremove(paper);\n\t\t}\n\t}",
"public void clear() {\n this.first = null;\n this.last = null;\n this.nrOfElements = 0;\n }",
"@Override\n\tpublic void removeAll() {\n\t\tif(isEmpty())\n\t\t\treturn;\n\t\t// Remove until the frontier is empty\n\t\twhile(!isEmpty())\n\t\t\tfrontier.removeFirst();\n\t}",
"@Override\n public void Clear() {\n for (int i = 0; i < array.size(); i++) {\n array.remove(i);\n\n }//Fin del for\n }",
"public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}",
"public synchronized void clear() {\n collected.clear();\n }",
"public void removeAllElements() {\n for (int i = 0; i < OLast; i++) O[i] = null;\n ON = OLast = 0;\n Gap = -1;\n }",
"void removeAll();",
"void removeAll();",
"public void clear() {\n duplicates.clear();\n }",
"@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}",
"public void clear() {\n\t\tvector.clear();\n\t}",
"@Override\n\tpublic void removeAll() {\n\t\tfor (Campus campus : findAll()) {\n\t\t\tremove(campus);\n\t\t}\n\t}",
"public void clear() {\n context = null;\n nestedElements.clear();\n }",
"public void clear() {\n for (int i = 0; i < size; i++) genericArrayList[i] = null;\n size = 0;\n }",
"@Override\n\tpublic void removeAll() {\n\t\tfor (Answer answer : findAll()) {\n\t\t\tremove(answer);\n\t\t}\n\t}",
"@Override\n public void clear() {\n size = 0;\n first = null;\n last = null;\n }",
"@Override\r\n\tpublic void clear() {\n\t\tset.clear();\r\n\t}",
"public void clearAll();",
"public void clearAll();",
"@Override\n\tpublic void clear() {\n\t\tthis.vector.clear();\n\t}",
"public void removeAll(Object element);",
"public void clear() {\r\n\t\tthis.document = null;\r\n\t\tthis.elements.clear();\r\n\t}",
"public void clear() {\n\t\tentries.clear();\n\t}",
"public void removeAll()\n {\n this.front = null;\n this.rear = null;\n }",
"public void clear()\n {\n for (SelectableGraphElement element : elements) {\n element.setSelected(false);\n }\n elements.clear();\n }",
"@Override\n public void clear() {\n for (int i = 0; i < this.size; i++) {\n this.data[i] = null;\n }\n\n this.size = 0;\n }",
"@Override\n\tpublic void clearAll() {\n\t\t\n\t}",
"public void clear() {\n\t\telements = 0;\n\t\tfor (int ix = 0; ix < keys.length; ix++) {\n\t\t\tkeys[ix] = null;\n\t\t\tvalues[ix] = null;\n\t\t}\n\t\tfreecells = values.length;\n\t\tmodCount++;\n\t}",
"public void clear() {\n this.entries = new Empty<>();\n }",
"public void clear()\n {\n int llSize = ll.getSize();\n for(int i=0; i<llSize; i++){\n ll.remove(0);\n }\n }",
"public void clear() {\r\n items.clear();\r\n keys.clear();\r\n }",
"public void clear() {\n items.clear();\n update();\n }",
"public void removeAllItems ();",
"public void clear() {\r\n\t\tbitset.clear();\r\n\t\tnumberOfAddedElements = 0;\r\n\t}",
"public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }",
"public void clear() {\n\t\tfor (int i = 0; i < table.size(); i++) {\n\t\t\ttable.get(i).clear();\n\t\t}\n\t}",
"protected abstract void clearAll();",
"public void clear() {\n doClear();\n }",
"public void clear() {\r\n\t\titems.clear();\r\n\t}",
"abstract public void removeAll();",
"public void clearContainerElements() {\n nestedElements.clear();\n }",
"public void\t\tremoveAll();",
"public void clear() {\n\n\t\thead = null;\n\t\ttail = null;\n\t\telements = 0;\n\t}",
"public Builder clearCollection() {\n copyOnWrite();\n instance.clearCollection();\n return this;\n }",
"public void clearAll() {\r\n\t\tfor (EnTablero et : listaElementos) et.setTablero( null ); // Anula tablero de todos los elementos previos\r\n\t\tlistaElementos.clear();\r\n\t\tfor (int f=0; f<numFilas; f++) {\r\n\t\t\tfor (int c=0; c<numColumnas; c++) {\r\n\t\t\t\telementosTablero[f][c] = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void clear() {\n\t\tfor (int list = getFirstList(); list != -1;) {\n\t\t\tlist = deleteList(list);\n\t\t}\n\t}",
"public void clear() {\n\t\t//Kill all entities\n\t\tentities.parallelStream().forEach(e -> e.kill());\n\n\t\t//Clear the lists\n\t\tentities.clear();\n\t\tdrawables.clear();\n\t\tcollidables.clear();\n\t}",
"public void clear() {\n this.data().clear();\n }",
"public void clear() {\n doClear( false );\n }",
"private void clearCollection() {\n \n collection_ = getDefaultInstance().getCollection();\n }",
"public void clear() {\n this.layers.clear();\n list.clear();\n }",
"public void clear(){\n this.items.clear();\n }",
"@Override\n\tpublic void removeAll() {\n\t\tfor (PhatVay phatVay : findAll()) {\n\t\t\tremove(phatVay);\n\t\t}\n\t}",
"public void clear() {\r\n for (Edge edge : edges)\r\n edge.disconnect();\r\n for (Vertex vertex : vertices)\r\n vertex.disconnect();\r\n edges.clear();\r\n vertices.clear();\r\n getChildren().remove(1, getChildren().size());\r\n }",
"public void clear() {\n values.clear();\n }",
"public void remove() {\n elements[index] = null;\n size--;\n next();\n }",
"public final void clear() {\n clear(true);\n }",
"public synchronized void clear()\n {\n clear(false);\n }",
"@Override\n\tpublic void clear() {\n\t\t\n\t\tsuperset.removeRange(lower, upper, fromInclusive, toInclusive);\n\t\t\n\t\t//Alternative direct implementation:\n\t\t//while (pollFirst() != null) {\n\t\t//}\n\t\t\n\t}",
"private void clear() {\n\t\t\tkeySet.clear();\n\t\t\tvalueSet.clear();\n\t\t\tsize = 0;\n\t\t}",
"public void removeAllPartOfSet() {\r\n\t\tBase.removeAll(this.model, this.getResource(), PARTOFSET);\r\n\t}",
"@Override\n\tpublic void clear() {\n\t\tthis.first=null;\n\t\tthis.last=null;\n\t\tthis.size=0;\n\t\tthis.modificationCount++;\n\t}",
"protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}",
"public void removeAll() {\n _hash = new Hashtable();\n _first = null;\n _last = null;\n }",
"public void clear() {\n synchronized (unchecked) {\n unchecked.clear();\n }\n }",
"public void clear(){\n this.collected.clear();\n }",
"@SuppressWarnings(\"unchecked\")\n public void clear() {\n list = (E[])new Object[capacity];\n size = 0;\n }",
"public void removeAll() {\n\t\tsynchronized (mNpcs) {\n\t\t\tmNpcs = Collections.synchronizedList(new ArrayList<Npc>());\n\t\t\tmDemonCount = 0;\n\t\t\tmHumanCount = 0;\n\t\t}\n\t}"
] | [
"0.81618583",
"0.80908865",
"0.78253204",
"0.7683906",
"0.76545054",
"0.7624773",
"0.759086",
"0.7581562",
"0.75649905",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74246514",
"0.74061376",
"0.7399398",
"0.7338022",
"0.7319874",
"0.73062074",
"0.72402126",
"0.7219336",
"0.71914124",
"0.71796834",
"0.7160463",
"0.71512043",
"0.71473575",
"0.70934135",
"0.7075961",
"0.703379",
"0.6961977",
"0.693997",
"0.6934896",
"0.6934896",
"0.68964565",
"0.68960977",
"0.68960977",
"0.688727",
"0.6886557",
"0.6878826",
"0.68662053",
"0.68623036",
"0.68605036",
"0.68555164",
"0.6850362",
"0.6850362",
"0.6810175",
"0.6808664",
"0.6805856",
"0.6803817",
"0.67922515",
"0.67895186",
"0.67854524",
"0.67852825",
"0.6782202",
"0.6778029",
"0.6771916",
"0.67698175",
"0.6762066",
"0.6761475",
"0.675693",
"0.67537326",
"0.67499125",
"0.6741956",
"0.674172",
"0.6738911",
"0.67362547",
"0.67195904",
"0.6715941",
"0.67084444",
"0.67008615",
"0.6691449",
"0.66896224",
"0.66861236",
"0.6675648",
"0.6669187",
"0.66476864",
"0.663656",
"0.6630907",
"0.6624195",
"0.66241676",
"0.66233736",
"0.66188383",
"0.6618484",
"0.66168934",
"0.6603554",
"0.659912",
"0.6589101",
"0.65844107",
"0.6576127",
"0.65745413",
"0.6566963",
"0.6560924",
"0.6552786",
"0.65486014"
] | 0.0 | -1 |
Returns true if the collection contains the specified element. | boolean contains(T o); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean contains(E element);",
"public boolean contains(E element) {\r\n return items.contains(element);\r\n }",
"public boolean contains(T element);",
"public boolean contains(Object elem);",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"boolean contains(T element);",
"public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(T elem) {\n return list.contains(elem);\n }",
"@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }",
"public boolean contains(E elem) {\n return indexOf(elem) != -1;\n }",
"public boolean contains(ElementType element){\n for(ElementType e:this){\n if(e.equals(element)){\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E value);",
"public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}",
"public abstract boolean contains(E e);",
"public boolean contains(T element) {\n\t\tif (head == null)\n\t\t\treturn false;\n\t\tNode<T> curNode = head;\n\t\twhile (curNode != null) {\n\t\t\tif (curNode.value.equals(element))\n\t\t\t\treturn true;\n\t\t\tcurNode = curNode.next;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}",
"public boolean contains(E e) {\n\t /*\n\t * Add code here\n\t */\n\t\t for(int c=0;c<num_elements;c++){\n\t\t\t if(elements[c]==e){\n\t\t\t\t return true;\n\t\t\t }\n\t\t }\n\t return false;\n\t }",
"boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}",
"public boolean contains(E elem) {\n Iterator<E> inorder = getInorderIterator();\n\n while (inorder.hasNext()) {\n if (inorder.next().equals(elem)) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E element) {\n // TODO: YOUR CODE HERE\n return backwards.containsKey(element);\n }",
"boolean contains();",
"@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}",
"public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(SVGElement element) {\n \t\treturn elementToModel.containsKey(element);\n \t}",
"boolean contains(String element);",
"public boolean contains(Object o);",
"public boolean contains(Object o);",
"public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }",
"public abstract boolean contains(Object item);",
"public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}",
"@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}",
"public boolean contains(Object o) {\n\n Object value = elements.get(o);\n return value != null;\n }",
"public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }",
"@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, root);\n\t}",
"public boolean contains(T val);",
"public boolean contains(int elem){\n return itemArray[count-1] == elem;\n }",
"public boolean containsElement(int i, T obj);",
"public boolean contains(final Object value) {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}",
"public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }",
"public boolean hasElement(String name) {\n return elements.has(name);\n }",
"public boolean contains(T e){\n return indexOf(e) != -1;\n }",
"Boolean contains(X x);",
"public boolean contains(int element) {\n for(Integer i:data) {\n if(i!=null && i==element) {\n return true;\n }\n }\n return false;\n /*for(int i=0;i<data.length;i++) {\n if(data[i]==element) {\n return true;\n }\n }\n return false;*/\n }",
"public Boolean searchElement(E element){\n HeapIterator<E> it = heapIterator();\n \n while(it.hasNext()){\n if(it.next().equals(element)) return true;\n }\n\n return false;\n }",
"@Override\n public boolean contains(String element) {\n Node currNode = this.head;\n if(currNode == null){\n }\n while(currNode.getNextNode() != null){\n if(currNode.getItem().equals(element)){\n return true;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }",
"boolean contains(Object o);",
"boolean contains(Object o);",
"boolean contains(Object o);",
"public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }",
"public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) { // if current value is same\n\t\t\t\treturn true;\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].contains(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].contains(elem);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}",
"public boolean contains(E item) {\n\n return bstContains(item, root);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public boolean contains(Object o) {\n return search((E) o) != null;\n }",
"public boolean contains(int elemToBeSearched)\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tif(nextNode.getData() == elemToBeSearched)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = prevNode.getNext();\n\t\t\t\tif(nextNode == null)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasElement();",
"boolean hasContains();",
"public boolean contains(T target);",
"public boolean contains(String searchVal) {\n return collection.contains(searchVal);\n }",
"public boolean contains(T x) {\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif(t != null && t.element == x) {\n\t\t\tsplay(t);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean contains(T entry) {\n return false;\n }",
"public boolean contains (E val) {\n return containsRecursive(root, val);\n }",
"public boolean contains (T target);",
"public boolean contains (T target);",
"public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}",
"public boolean contains(T instance);",
"@Override\n public boolean contains(T item) {\n //iterate through the array and look for the item\n for(int i = 0; i < numItems; i++){\n //if it is found, return true\n if(item.equals(arr[i]))\n return true;\n }\n return false;\n }",
"public final boolean contains(final E entity) {\n return getJpaTemplate().contains(entity);\n }",
"public boolean doesContain(T t) {\n if (Arrays.asList(a).contains(t)) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\r\n public boolean contains(E target) {\r\n if(find(target) != null) return true;\r\n return false;\r\n }",
"public static boolean containsElement(Object[] array, Object element) {\r\n if (array == null) {\r\n return false;\r\n }\r\n for (Object arrayEle : array) {\r\n if (nullSafeEquals(arrayEle, element)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"public Boolean contains(T node) {\n\t\treturn nodes.contains(node);\n\t}",
"public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }",
"boolean\tcontains(Object o);",
"public void contains(@Nullable Object element) {\n if (!Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should have contained <%s>\", getDisplaySubject(), element);\n }\n }",
"public boolean contains(E item) {\n \tDblListnode<E> n = items.getNext();\n \tfor (int k = 0; k < numItems; k++) {\n n = n.getNext();\n if (n.getData() == item) {\n \treturn true;\n }\n }\n \treturn false;\n }",
"@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }",
"@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }",
"public boolean contains(Object value) {\n\t\treturn false;\n\t}",
"public boolean contains(T item)\n\t{\n\t\treturn searchRecursive(item, root);\n\t}",
"@Override\n public boolean contains(T object) {\n for (int i = 0; i < this.size; i++) {\n if (array[i].equals(object)) {\n return true;\n }\n }\n return false;\n }",
"@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\treturn value == null;\r\n\t\t}",
"public boolean search(T element);",
"public boolean contains( AnyType x )\r\n\t{\r\n\t\treturn contains( x, root );\r\n\t}",
"public boolean contains(E e) {\n for (int i = startPos; i < queue.length; i++) {\n E value = (E) queue[i];\n if (value.equals(e)) return true;\n }\n\n return false;\n }",
"boolean containsInstance(EObject modelElement);",
"public boolean contains(E e){\n int target = e.hashCode() % this.buckets;\n return data[target].contains(e);\n }",
"public boolean contains(Object o) {\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) return true;\n }\n return false;\n }",
"@Override\n public final boolean contains(final Object o) {\n return Collections.exists(getComponents(),\n new Assertion<PriorityList<? extends _PriorityElement_>>() {\n public boolean isTrueFor(PriorityList<? extends _PriorityElement_> s) {\n return s.contains(o);\n }\n });\n }",
"public boolean contains(T value) { return root == null ? false : root.contains(value); }",
"public boolean contains(Type item);",
"public boolean contains(BSTMapNode element) \n\t{\n\t\tthis.compare(element);\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.contains(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.contains(element);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean contains(Object value)\r\n {\r\n return contains(root, value);\r\n }",
"public boolean contains(SeqItemset set)\n\t{\n\t\tif (m_size<set.m_size) return false;\n\t\tint ind = 0;\n\t\tint i = 0;\n\t\twhile ((i<set.m_size) && (-1!=ind))\n\t\t{\n\t\t\tind = indexOf(set.elementIdAt(i));\n\t\t\ti++;\n\t\t}\n\t\tif (-1==ind) return false;\n\t\telse return true;\n\t}",
"public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }",
"public boolean contains(String element) {\n if (element == null) {\n throw new IllegalArgumentException(\"Null string!\");\n }\n\n Node candidateNode = getNodeByString(element, false);\n\n if (candidateNode == null) {\n return false;\n }\n\n return candidateNode.isTerminal();\n }",
"public boolean contains(T target) throws EmptyCollectionException{\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n LinearNode<T> trav = front;\n while (trav != null){\n if (trav.getElement().equals(target)){\n return true;\n }\n trav = trav.getNext();\n }\n return false;\n }",
"public boolean containsObject(T obj);",
"public boolean containsObject(T obj);"
] | [
"0.85872495",
"0.84302515",
"0.82469547",
"0.8096384",
"0.8004843",
"0.7909234",
"0.7890757",
"0.7812812",
"0.77004045",
"0.76992214",
"0.7604147",
"0.742124",
"0.7366658",
"0.73138434",
"0.7285779",
"0.7220307",
"0.7206529",
"0.7189345",
"0.7183099",
"0.71375984",
"0.7069103",
"0.7067518",
"0.70589",
"0.7032389",
"0.6982818",
"0.6977277",
"0.6977277",
"0.69598114",
"0.694056",
"0.691406",
"0.68824416",
"0.6872805",
"0.6861833",
"0.6852227",
"0.68264747",
"0.67962676",
"0.6793372",
"0.6784597",
"0.6776165",
"0.6771427",
"0.67622465",
"0.67619795",
"0.6761609",
"0.6761206",
"0.6744237",
"0.67207134",
"0.67141104",
"0.67141104",
"0.67141104",
"0.67055434",
"0.670404",
"0.66935223",
"0.66908133",
"0.6685993",
"0.6670619",
"0.66529363",
"0.6648827",
"0.6626128",
"0.6610893",
"0.66022795",
"0.6601955",
"0.6573511",
"0.65695345",
"0.65669394",
"0.65669394",
"0.6554356",
"0.6551364",
"0.6544184",
"0.65342927",
"0.6516519",
"0.650712",
"0.6501581",
"0.6487788",
"0.6483279",
"0.64718896",
"0.6461275",
"0.645922",
"0.64540374",
"0.64403605",
"0.6430794",
"0.6429",
"0.6422386",
"0.64175117",
"0.64143336",
"0.64124066",
"0.63988984",
"0.63910866",
"0.63882565",
"0.6382579",
"0.63824844",
"0.6376989",
"0.6367194",
"0.6352837",
"0.63502103",
"0.63227826",
"0.6322538",
"0.6318104",
"0.6317097",
"0.6315179",
"0.6315179"
] | 0.6668688 | 55 |
Returns true if this collection contains no elements. | boolean isEmpty(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isEmpty() {\n return collection.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\treturn objectCollection.isEmpty();\r\n\t}",
"public boolean isEmpty() {\n\t\treturn elements.isEmpty();\n\t}",
"public boolean isEmpty()\n\t{\n\t\treturn m_elements.isEmpty();\n\t}",
"public boolean containsNoItems() {\n\t\treturn (this.items.size() == 0);\n\t}",
"public boolean isEmpty() {\n\n return elements.isEmpty();\n }",
"public boolean isEmpty() {\n return elements.isEmpty();\n }",
"public boolean isEmpty()\n {\n return elements.isEmpty();\n }",
"public boolean isEmpty() {\n return (this.count == 0);\n }",
"public boolean isEmpty() {\n\t\treturn elements == 0;\n\t}",
"public boolean isEmpty() {\n return this.size == 0;\n }",
"public boolean isEmpty() {\n return this.size == 0;\n }",
"public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n return CollectionUtils.isEmpty(this.getData());\n }",
"public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}",
"@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n return (this.size == 0);\n }",
"public boolean isEmpty() {\n\t\tif (this.size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isEmpty() {\n return (size() == 0);\n }",
"public boolean isEmpty() {\n return elements == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }",
"public boolean isEmpty()\n {\n return ((elements == null) || elements.isEmpty());\n }",
"public boolean isEmpty()\n {\n return this.size == 0;\n }",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\r\n\t\tif (this.size == 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n\t return size() == 0;\n\t }",
"public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}",
"public boolean isEmpty() {\n\t\treturn numElements == 0; // Dummy return\n\t}",
"public boolean isEmpty()\r\n {\r\n return (size() == 0);\r\n }",
"public boolean empty() {\n\t\treturn (size() <= 0);\n\t}",
"public boolean isEmpty() {\n\t\treturn numElements==0;\n\t}",
"public boolean isEmpty() {\n return (count == 0);\n }",
"public boolean isEmpty() {\n\t\treturn vector.isEmpty();\n\t}",
"public boolean isEmpty() \r\n\t{\r\n\t\treturn size() == 0;\r\n\t}",
"public boolean isEmpty(){\r\n\t\treturn size() == 0;\r\n\t}",
"public boolean isEmpty()\r\n {\r\n if (count > 0) return false;\r\n else return true;\r\n }",
"@Override\n public boolean isEmpty() {\n return this.size == 0;\n }",
"public boolean isEmpty() {\n\t\treturn allItems.size() == 0;\n\t}",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn (count == 0);\r\n\t}",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn count == 0;\r\n\t}",
"public boolean isEmpty() {\n return doIsEmpty();\n }",
"public boolean isEmpty()\n {\n if(size() > 0 )\n {\n return false;\n }\n return true;\n }",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n\n\t\tif (numItems == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t}",
"public boolean isEmpty() {\n\t\treturn count == 0? true : false;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn (_items.size() == 0);\n\t}",
"public boolean isEmpty() {\r\n return NumItems == 0;\r\n }",
"@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}",
"public Boolean isEmpty() {\n \n return ( size == 0 ) ? true : false;\n \n }",
"public boolean isEmpty() {\n return (size == 0);\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}",
"public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"@Override\n\tpublic boolean isEmpty() {\n\t\tif(size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n\n\t\treturn size == 0;\n\n\t}",
"public boolean isEmpty() {\r\n return (size == 0);\r\n }",
"public boolean isEmpty() {\r\n return size == 0;\r\n }",
"public boolean isEmpty() {\r\n return size == 0;\r\n }",
"public static boolean isEmpty() \r\n\t{\r\n\t\treturn m_count == 0;\r\n }",
"private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn count==0;\n\t}",
"@Override\n\tpublic boolean isEmpty() {\n\t\tif(this.vector.isEmpty()) return true;\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}",
"public boolean isEmpty() {\r\n\t\tif (size > 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return size == 0;\n }"
] | [
"0.8591195",
"0.8336152",
"0.8313589",
"0.8298996",
"0.82628155",
"0.825473",
"0.82018393",
"0.8178353",
"0.8165435",
"0.81583506",
"0.815382",
"0.815382",
"0.81492275",
"0.81447953",
"0.8142044",
"0.8141508",
"0.8134206",
"0.8127273",
"0.8103136",
"0.8100414",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8098371",
"0.8088546",
"0.8084066",
"0.8072597",
"0.80665225",
"0.80665225",
"0.80665225",
"0.80665225",
"0.8054342",
"0.8053933",
"0.805386",
"0.8052306",
"0.8049563",
"0.80300164",
"0.8020664",
"0.80119044",
"0.8003125",
"0.79821646",
"0.7981525",
"0.7965082",
"0.7963492",
"0.79501987",
"0.7946135",
"0.7943229",
"0.7941658",
"0.79284143",
"0.7922881",
"0.79132384",
"0.79132384",
"0.79132384",
"0.79130113",
"0.7906089",
"0.7905266",
"0.7899686",
"0.78983945",
"0.7880303",
"0.78781635",
"0.78730756",
"0.7871461",
"0.7871461",
"0.7871461",
"0.7869957",
"0.78681487",
"0.78676045",
"0.7857317",
"0.78403807",
"0.7834799",
"0.78333366",
"0.78333366",
"0.78318685",
"0.78314835",
"0.7830018",
"0.78282106",
"0.78267515",
"0.7826341",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845",
"0.78260845"
] | 0.0 | -1 |
Removes a single instance of the specified element from this collection, if it is present. | boolean remove(T o); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;",
"public T remove (T element);",
"public void remove(T element);",
"@Override\r\n\tpublic boolean remove(T element) {\n\t\treturn this._list.remove(element);\r\n\t}",
"public boolean remove(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\"ArrayList cannot contain null.\");\n\t\t}\n\t\tint index = -1;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (index == -1) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = index + 1; i < this.size; i++) {\n\t\t\tthis.storedObjects[i - 1] = this.storedObjects[i];\n\t\t}\n\t\tthis.size--;\n\t\tthis.storedObjects[this.size] = null;\n\t\treturn true;\n\t}",
"E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"public boolean removeElement(Object obj);",
"boolean remove(T element);",
"public boolean remove(E element){\n // TO BE IMPLEMENTED\n Object result = map.remove(element);\n if(result != null){\n return true;\n }else{\n return false;\n } \n }",
"@Override\r\n\tpublic boolean remove(Object o) {\n\t\treturn set.remove(o);\r\n\t}",
"public E remove();",
"public E remove();",
"public boolean remove(ElementType element){\n if(this.find(element)==-1){\n return false;\n }\n elements[this.find(element)]=elements[size-1];\n size--;\n return true;\n }",
"public Object remove();",
"Object removeFirst();",
"public boolean remove(T element, Point2D pos);",
"public E removeFirst();",
"public T removeFirst() throws EmptyCollectionException;",
"@Override\n public void remove() {\n if(elementToRemove != null){\n if(elementToRemove == lastInternalIteratorGivenElement){\n iterator.remove();\n }\n else{\n list.remove(elementToRemove);\n }\n }\n }",
"boolean remove(String elementId);",
"@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}",
"public T removeFirst();",
"Object remove();",
"public /*@ non_null @*/ JMLObjectSet<E> remove(E elem) {\n if (!has(elem)) {\n return this;\n } else {\n //@ assume the_list != null;\n JMLListObjectNode<E> new_list = the_list.remove(elem);\n //@ assume (new_list == null) == (size == 1);\n return new JMLObjectSet<E>(new_list, size - 1);\n }\n }",
"@Override\n public boolean remove(final Object element) {\n for (int i = 0; i < size; i++) {\n if (this.checkIfEqual(element, i)) {\n this.shiftRemove(i);\n return true;\n }\n }\n\n return false;\n }",
"@Override\r\n\tpublic E remove() {\n\t\treturn null;\r\n\t}",
"E remove(Id id);",
"public boolean removeElement(Element element) {\n if (removeNoNotify(element)) {\n setChanged();\n Message message = Message.makeRemoved(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }",
"public void removeElement(ThingNode element)\n\t{\n\t\tsuper.removeElement(element);\n\t\telements.remove(element);\n\t}",
"public <T extends IDBEntities> void delete(T element) {\n\t\tif (element == null)\n\t\t\treturn;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\t// Entity must be attached\n\t\t\tif (!em.contains(element))\n\t\t\t\telement = em.merge(element);\n\t\t\tem.remove(element);\n\t\t\tem.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tem.getTransaction().rollback();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}",
"@Override\n\tpublic E remove() {\n\t\treturn null;\n\t}",
"public void delete(T element);",
"@Override\n public boolean remove(Object o) {\n return gameCollection.remove(o);\n }",
"public boolean remove(Object o);",
"public int remove(T element) {\n\n int index = -1;\n\n for (int i = 0; i < myList.length; i++) {\n if (myList[i].equals(element)) {\n index = i;\n break;\n }\n }\n\n if (index >= 0) {\n this.remove(index);\n }\n\n return index;\n }",
"boolean remove(E e);",
"public void remove(E e) {\n Position<Item<E>> p = findPosition(e);\n if (p != null) // element's position is found\n list.remove(p);\n }",
"public Long remove(E elem) {\n Long expiryTime = elemMap.remove(elem);\n if (expiryTime != null) {\n Set<E> set = expiryMap.get(expiryTime);\n if (set != null) {\n set.remove(elem);\n // We don't need to worry about removing empty sets,\n // they'll eventually be removed when they expire.\n }\n }\n return expiryTime;\n }",
"public boolean remove(Object obj);",
"public abstract boolean remove(E e);",
"void remove(T instance);",
"@Override\n public boolean remove(Object o) {\n if (elements.remove(o)) {\n ordered.remove(o);\n return true;\n } else {\n return false;\n }\n\n }",
"public E remove () throws NoSuchElementException;",
"@Override\n\tpublic void remove(E x) {\n\t\t\n\t}",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void removeAll(Object element);",
"private static void deleteElement(RubyProjectElement element) {\r\n \t\tRubyProject projectInternal = element.getRubyProjectInternal();\r\n \t\tprojectInternal.getRubyElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \t}",
"public T remove(Object entry) {\n return null;\n }",
"public E remove() {\n\t\t// your code here\n\t\treturn null;\n\t}",
"public void remove () {}",
"@Override\n\tpublic E remove(int idx) {\n\t\tif (idx < 0 || idx >= size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tE element = null;\n\t\telement = list[idx];\n\t\tif (idx == size - 1) {\n\t\t\tlist[idx] = null;\n\t\t} else {\n\t\t\tfor (int i = idx; i < size - 1; i++) {\n\t\t\t\tlist[i] = list[i + 1];\n\t\t\t}\n\t\t\tlist[size - 1] = null;\n\t\t}\n\t\tsize--;\n\t\treturn element;\n\t}",
"public void remove(Element e) {\n\t\tlistLiving.remove(e);\n\t\tmapContains.put(e.getPosition(), null);\n\t}",
"public void remove(int element) {\r\n\t\tint i = find(element);\r\n\t\tlist[i] = -1;\r\n\t\tinsertionSort(list);\r\n\t\tcurrentPosition = i;\r\n\t}",
"public T removeFirst( ){\r\n\t\t//calls remove onfirst\r\n\t\tT toRemove = getFirst();\r\n\t\treturn remove(toRemove);\r\n\t}",
"public boolean remove(E elem) {\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (indices.get(i).data == elem) {\r\n\t\t\t\tremoveAt(i);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public E remove(int index) {\n\t\t// Code from Project 3\n\t\tE removed;\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t// Last element of list or list contain only 1 element\n\t\tif (index == size - 1) {\n\t\t\tremoved = elements[size - 1];\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t} else {\n\t\t\t// remove mid or first element\n\t\t\tremoved = elements[index];\n\t\t\tfor (int i = index; i < size; i++) {\n\t\t\t\telements[i] = elements[i + 1];\n\t\t\t}\n\t\t\telements[size - 1] = null;\n\t\t\tsize--;\n\t\t\treturn (E) removed;\n\t\t}\n\t}",
"Object remove(int index) {\n return index >= 0 && index < this.length() ? this.myArrayList.remove(index) : null;\n }",
"public boolean delete(T element) {\n boolean isDelete = false;\n int index = this.getIndex(element);\n if (index != -1) {\n this.deleteElement(index);\n isDelete = true;\n }\n return isDelete;\n }",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}",
"public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}",
"@Override\n\tpublic boolean delete(Eleve o) {\n\t\tmap.remove(o.getId(), o);\n\t\treturn true;\n\t}",
"@Override\r\n\tpublic void removeElement(K key) {\n\t\tque.remove(key);\r\n\t\thashMap.remove(key);\r\n\t}",
"public boolean remove(T item) {\n\t\treturn list.remove(item);\n\t}",
"@Override\n\tpublic E remove(int index) {\n\t\treturn null;\n\t}",
"public boolean remove(E item){\n\t\treturn (delete(item) != null) ? true : false;\n\t}",
"public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }",
"@Override\n public boolean remove(Object o) {\n if (contains(o)) {\n root = root.removeElement(o);\n size--;\n return true;\n }\n return false;\n }",
"@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }",
"@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }",
"public void removeElement() throws IndexOutOfBoundsException, UnsupportedOperationException {\n\t\tlist.remove(0);\n\t}",
"boolean remove(Object o);",
"public void remove(Level level, T originalElement) {\n if (this.internalRegistry.containsKey(level)) {\n Vector<T> elements = this.internalRegistry.get(level);\n\n // Make sure to check for null in-case the key was removed between the contains check and the get.\n if (elements != null) {\n // Try to find this element in the collection.\n for (int i = 0; i < elements.size(); i++) {\n T element = elements.get(i);\n\n if (element.hashCode() == originalElement.hashCode()) {\n // remove the element from the collection to ensure that another player/thread doesn't try to remove the same item.\n elements.remove(element);\n\n // Let the implementor know that this element was removed to do any custom processing.\n this.onElementRemoved(level, element);\n break;\n }\n }\n\n if (elements.size() == 0) {\n // No more elements, remove the level from the array.\n this.internalRegistry.remove(level);\n }\n }\n }\n }",
"public T remove (T element) throws EmptyCollectionException,\n NoSuchElementException{\n if(isEmpty()){\n throw new EmptyCollectionException(\"list\");\n }\n\n // does it exist?\n if(!contains(element)){\n throw new NoSuchElementException();\n }\n\n // is it front node?\n if(front.getElement().equals(element)){\n // remove front node\n return removeFirst();\n }\n\n // it must be in the list after the front node\n // invariables:\n // 1. we will find the node\n // 2. it must be after the front node\n // current points the node to remove\n // previous points to the node before it\n LinearNode<T> previous = front;\n LinearNode<T> current = front.getNext();\n while(current != null &&\n !current.getElement().equals(element)){\n previous = current;\n current = current.getNext();\n }\n previous.setNext(current.getNext());\n // is it the last node?\n if(rear == current){\n // update rear when removing the last node\n rear = previous;\n }\n count--;\n return current.getElement();\n }",
"public void removeByObject()\r\n\t{\n\t}",
"@Override\r\n\tpublic void delete(T element) {\n\r\n\t}",
"public boolean Remove(TreeNode<T> element) {\n\t\treturn false;\n\t}",
"@Override\n public T remove(Object object) {\n T removed = null;\n for (int i = 0; i < array.length; i++) {\n while (!array[i].equals(object)) {\n\n }\n removed = array[i];\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }",
"public void remove(E e) {\n\t\tentities.remove(e);\n\t}",
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"boolean removeObject(String id);",
"private static void deleteElement(ProjectElement element) {\r\n \t\tProject projectInternal = element.getProjectInternal();\r\n projectInternal.getElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \r\n projectInternal.eResource().setModified(true);\r\n \t}",
"public void remove(SelectableGraphElement element)\n {\n if (element != null) {\n element.setSelected(false);\n elements.remove(element);\n }\n }",
"@Override\n public T remove(int position) {\n if (!validate(position)) {\n throw new NoSuchElementException(\"Element with given position not exist at the list!\");\n }\n T removed = (T) this.values[position];\n this.values[position] = null;\n this.cursor--;\n return removed;\n }",
"public E removeFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}",
"boolean remove(Object obj);",
"boolean remove(Object obj);",
"public ContentObject remove(\n )\n {\n ContentObject removedObject = objects.remove(index);\n refresh();\n\n return removedObject;\n }",
"public boolean remove(New object);",
"public T remove(int index) {\n chk();\n return list.remove(index);\n }",
"public T remove(int index) {\n return null;\n }",
"public static void borrarElement(Element element) throws Exception {\n\t\tEntityManager em = JPA.em();\n\t\tElementPK pk = new ElementPK();\n\t\tpk.setCodi(element.codi);\n\t\tpk.setComunitat(element.comunitat.nif);\n\t\tElement actorToBeRemoved = em.find(Element.class, pk);\n\n\t\ttry {\n\t\t\tem.remove(actorToBeRemoved);\n\t\t\tem.flush();\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}",
"@Override\n\tpublic void remove(Element e) {\n\t\t\n\t}",
"public T removeLast()throws EmptyCollectionException;",
"public void remove(T element) throws Exception {\r\n\tif(isEmpty()) throw new Exception(\"Remove attempted on empty list\");\r\n\tif(trailer.getInfo() == element) removeLast();\r\n\tboolean found = false;\r\n\tDLLNode<T> temp = header;\r\n\twhile(temp != null) {\r\n\t\tif (temp.getInfo().equals(element)) {\r\n\t\t\ttemp.getBack().setLink(temp.getLink());\r\n\t\t\t((DLLNode<T>) temp.getLink()).setBack(temp.getBack());\r\n\t\t\tfound = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\ttemp = temp.getBack();\r\n\t}\r\n\tif (!found) throw new Exception(\"Could not find element\");\r\n}",
"@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }",
"public AvlTree<E> remove(Comparable<E> element){\n root = remove(element, root);\n return this;\n }"
] | [
"0.757023",
"0.7315093",
"0.72026765",
"0.719113",
"0.6931258",
"0.6784871",
"0.6775838",
"0.67482483",
"0.6597251",
"0.6546017",
"0.6514391",
"0.6514391",
"0.6507571",
"0.6485189",
"0.64393187",
"0.6439168",
"0.64306575",
"0.64135003",
"0.63896185",
"0.6387849",
"0.63831115",
"0.6354439",
"0.63311034",
"0.6310857",
"0.6288831",
"0.6283872",
"0.6269518",
"0.6257956",
"0.62453705",
"0.62397724",
"0.6216813",
"0.61589855",
"0.61180204",
"0.6110504",
"0.61052287",
"0.6102076",
"0.6077606",
"0.6072216",
"0.6055414",
"0.6048577",
"0.6039538",
"0.6029917",
"0.6021964",
"0.6018563",
"0.60090804",
"0.60090804",
"0.60090804",
"0.60090804",
"0.60090804",
"0.60076016",
"0.6000701",
"0.599438",
"0.5983659",
"0.59714794",
"0.59591365",
"0.5934809",
"0.59225476",
"0.5902644",
"0.59005976",
"0.58933634",
"0.58900833",
"0.58881474",
"0.58879507",
"0.58858407",
"0.5872125",
"0.5871756",
"0.58701336",
"0.5864422",
"0.5860619",
"0.5846646",
"0.58436507",
"0.5843342",
"0.5834013",
"0.5831544",
"0.5827977",
"0.5826972",
"0.5818455",
"0.5817033",
"0.5811414",
"0.5810467",
"0.5808983",
"0.5805934",
"0.58026755",
"0.58012146",
"0.5797076",
"0.5790458",
"0.57879186",
"0.5786842",
"0.57850844",
"0.57850844",
"0.57810843",
"0.5778036",
"0.5773637",
"0.5772829",
"0.57721984",
"0.5772013",
"0.576613",
"0.57623076",
"0.575939",
"0.5749389"
] | 0.5922165 | 57 |
Return the number of elements in this collection. | int size(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int size() {\n\t\treturn collection.size();\n\t}",
"public int size() {\n return collection.size();\n }",
"public int size() {\n return this.collection.size();\n }",
"public int getLength() {\n return collection.size();\n }",
"public int size() {\n\n return elements.size();\n }",
"public int size() {\n\t\treturn this.elements.size();\n\t}",
"public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}",
"public int size() {\n maintain();\n return collection.size();\n }",
"public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}",
"public int size() {\n\t\treturn elements.size();\n\t}",
"public int size() {\r\n\t\treturn elements.size();\r\n\t}",
"public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }",
"public int size() {\n return numOfElements;\n }",
"public int size() {\n return elements.size();\n }",
"public int size()\n\t{\n\t\treturn m_elements.size();\n\t}",
"public int getNumOfElements() {\n return numOfElements;\n }",
"public int getNrOfElements() {\n return this.nrOfElements;\n }",
"public int size() {\n\t\treturn elements;\n\t}",
"public int size() {\r\n\t\treturn elements;\r\n\t}",
"public int getSize() {\n\t\treturn collection.size();\n\t\t\n\t}",
"public static int numElements() {\n return values().length;\n }",
"public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}",
"@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}",
"public int getNumberOfElements();",
"public int getNumElements()\n {\n return numElements;\n }",
"public int size() {return collection.size();}",
"public int size() {\n return elements;\n }",
"public int getNumElements() {\n return numElements;\n }",
"public int getNumElements() {\n return numElements;\n }",
"public int getNumElements() {\n\t\treturn numElements;\n\t}",
"public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }",
"Long getNumberOfElement();",
"@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }",
"@Override\n\tpublic int size() {\n\t\treturn this.numberOfElements;\n\t}",
"public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }",
"public int getNumElements() {\n return theMap.size();\n }",
"public final int size()\n {\n return m_count;\n }",
"public abstract Integer getNumberOfElements();",
"public int getSize() {\n\t\treturn numElements;\n\t}",
"@Override\r\n\tpublic int getCollectionCount() {\n\t\treturn data != null && data.list != null ? data.list.size() : 0;\r\n\t}",
"public int count() {\n return Query.count(iterable);\n }",
"public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}",
"public int size()\r\n {\r\n return count;\r\n }",
"public int size() {\n return count;\n }",
"public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}",
"public int size() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] != null) {\r\n temp++;\r\n }\r\n }\r\n return temp;\r\n }",
"public Long getElementCount();",
"public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }",
"@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}",
"public int size() {\n return numItems;\n }",
"public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}",
"public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }",
"public int size()\n {\n return count;\n }",
"public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }",
"public int getUnitCount() {\n return _elements.length;\n }",
"public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}",
"public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }",
"public int size() {\n return this.container.length;\n }",
"public int size() {\n\t\treturn root.count();\n\t}",
"public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }",
"public int size() {\n // DO NOT MODIFY!\n return size;\n }",
"public int length() {\n\n\t\treturn numItems;\n\n\t}",
"@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}",
"public int size() {\r\n // TODO\r\n return 0;\r\n }",
"public int size() {\n return doSize();\n }",
"public int size()\r\n {\r\n return nItems;\r\n }",
"public int size()\n {\n if(_list!=null)\n return _list.size();\n return 0;\n }",
"public int size() {\n return nItems;\n }",
"@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}",
"public int size() {\n\t\treturn this.elts.length;\n\t}",
"public int size() {\n return list.size();\n }",
"@Override\r\n\tpublic int size() {\r\n\t\treturn count;\r\n\t}",
"public int size() {\n\t\treturn list.size();\n\t}",
"public final int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\n return list.size();\n }",
"@Override\r\n\tpublic int getCollectionTotalCount() {\n\t\treturn data != null ? data.recordCount : 0;\r\n\t}",
"public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}",
"public synchronized int size() {\n return count;\n }",
"public int size() {\n return items.size();\n }",
"public int size() {\r\n return items.size();\r\n }",
"public int size() {\r\n return items.size();\r\n }",
"public int size() { return count; }",
"public int size() {\n \treturn numItems;\n }",
"public int size()\n\t{\n\t\tint count = 0;\n\t\tif(this.isEmpty())\n\t\t\treturn count;\n\t\telse\n\t\t{\n\t\t\t// Loop through and count the number of nodes.\n\t\t\tNode<T> curr = head;\t\n\t\t\twhile(curr != null)\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tcurr = curr.getNext();\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\n\t\tint count = 0;\n\t\tfor (int i = 0;i < contains.length;i++) {\n\t\t\tif (contains[i]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn this.size;\n\t}",
"public int size() {\n\t\treturn this.size;\n\t}",
"public int size() {\n // TODO: Implement this method\n return size;\n }",
"public int size() {\r\n int count = 0;\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] != null) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }",
"public int size()\n\t{\n\t\treturn list.size();\n\t}",
"public int size()\n\t{\n\t\treturn list.size();\n\t}"
] | [
"0.83613634",
"0.83342963",
"0.8329733",
"0.81541604",
"0.81238216",
"0.8111901",
"0.8079235",
"0.80555505",
"0.80424064",
"0.8035467",
"0.80260897",
"0.8021569",
"0.7990283",
"0.7946151",
"0.7934801",
"0.7928729",
"0.79152304",
"0.7899844",
"0.789746",
"0.78927225",
"0.78644484",
"0.7861645",
"0.78553814",
"0.78436404",
"0.783345",
"0.78305936",
"0.78225625",
"0.781885",
"0.781885",
"0.77912205",
"0.77841055",
"0.77494854",
"0.7719481",
"0.7705353",
"0.7692288",
"0.7640761",
"0.7605296",
"0.76000446",
"0.7584428",
"0.75825965",
"0.7554353",
"0.7553555",
"0.75371635",
"0.75371635",
"0.75371635",
"0.75296116",
"0.7507233",
"0.75072014",
"0.7505567",
"0.7499727",
"0.7493602",
"0.7482136",
"0.7459057",
"0.7454223",
"0.74490017",
"0.74423903",
"0.74260294",
"0.74190384",
"0.74119467",
"0.7410651",
"0.7398137",
"0.73956007",
"0.73802406",
"0.7362249",
"0.736136",
"0.73599875",
"0.73302126",
"0.7326002",
"0.73257977",
"0.73255426",
"0.7322773",
"0.73215955",
"0.7308037",
"0.730665",
"0.7295945",
"0.72857517",
"0.7284097",
"0.72728044",
"0.7264498",
"0.7261073",
"0.7253516",
"0.7252617",
"0.7248756",
"0.7247962",
"0.7236287",
"0.7236069",
"0.7220469",
"0.7220469",
"0.72142464",
"0.7191836",
"0.7178629",
"0.717228",
"0.717228",
"0.717228",
"0.7171844",
"0.71701205",
"0.71701205",
"0.7164295",
"0.7162353",
"0.71599436",
"0.71599436"
] | 0.0 | -1 |
Returns an array containing all of the elements in this collection. | Object[] toArray(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object[] elements() {\n return elements.toArray();\n }",
"@Override\n public Object[] toArray() {\n Object[] result = new Object[size];\n int i = 0;\n for (E e : this) {\n result[i++] = e;\n }\n return result;\n }",
"public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}",
"public Object[] getElements() {\r\n\t\treturn elements.clone();\r\n\t}",
"public WebElement[] toArray() {\n\t\treturn ToArrayFunction.toArray(this, elements);\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\tObject[] result = copyArray(elements, size);\n\n\t\treturn result;\n\t}",
"public Object[] toArray() {\n Object[] arr = new Object[size];\n for(int i = 0; i < this.size; i++) {\n arr[i] = this.get(i);\n }\n return arr;\n }",
"public default T[] toArray() {\n Object[] array = new Object[size()];\n int i = 0;\n for (T t : this) {\n array[i++] = t;\n }\n return (T[]) array;\n }",
"@Override\r\n\tpublic Object[] toArray() {\n\t\treturn set.toArray();\r\n\t}",
"public Object[] toArray() {\n Object[] tmp = new Object[this.container.length];\n System.arraycopy(this.container, 0, tmp, 0, tmp.length);\n return tmp;\n }",
"Collection<V> getAllElements();",
"public Object[] toArray() {\n\n return toArray(new Object[size()]);\n }",
"@Override\n public Object[] toArray() {\n Object[] result = new Object[currentSize];\n System.arraycopy(container, 0, result, 0, currentSize);\n return result;\n }",
"public Object[] getList() {\n Object[] list = new Object[size()];\n copyInto(list);\n return list;\n }",
"public Object[] toArray() {\n\t\treturn null;\n\t}",
"public Polynomial[] getAsArray() {\n Polynomial[] list = new Polynomial[collection.size()];\n\n for (int i = 0; i < collection.size(); i++) {\n list[i] = collection.get(i);\n }\n return list;\n }",
"@Override\n public T[] toArray() {\n return this.copyArray(this.data, this.size);\n }",
"public E[] values(){\n\t\tE[] output = (E[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; i < elem.length; i++)\n\t\t\tif (elem[i] != null){\n\t\t\t\toutput[j] = elem[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}",
"@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn snapshot().toArray();\n\t\t}",
"public E[] toArray() {\n return (E[]) Arrays.copyOfRange(queue, startPos, queue.length);\n }",
"@Override\n public T[] toArray() {\n T[] result = (T[])new Object[numItems];\n for(int i = 0; i < numItems; i++)\n result[i] = arr[i];\n return result;\n }",
"public T[] toArray() {\n return null;\n }",
"public Object[] toArray() {\r\n\t\treturn this.records.toArray();\r\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\treturn snapshot().toArray();\n\t}",
"public double[][] getCompleteElements() {\n double[][] values = new double[getRowDimension()][getColumnDimension()];\n for (int rowIndex = 0; rowIndex < getRowDimension(); rowIndex++) {\n for (int columnIndex = 0; columnIndex < getColumnDimension(); columnIndex++) {\n values[rowIndex][columnIndex] = getElement(rowIndex, columnIndex);\n }\n }\n return values;\n }",
"public Object[] toArray() {\n return Arrays.copyOf(this.values, this.index);\n }",
"public Object[] getArray() {\n compress();\n return O;\n }",
"@Override\n public T[] toArray() {\n //create the return array\n T[] result = (T[])new Object[this.getSize()];\n //make a count variable to move through the array and a reference\n //to the first node\n int index = 0;\n Node n = first;\n //copy the node data to the array\n while(n != null){\n result[index++] = n.value;\n n = n.next;\n }\n return result;\n }",
"public double[] toArray() {\n\t\treturn acc.toArray();\n\t}",
"public String[] getAll() {\n return toList().toArray(new String[0]);\n }",
"public ArrayList<Integer> getElements()\n {\n return this.elements;\n }",
"public int[] toArray() {\n return Arrays.copyOf(buffer, elementsCount);\n }",
"@Override\n public int[] toArray() {\n int[] result = new int[size];\n Entry tmp = first;\n for (int i = 0; i < size; i++) {\n result[i] = tmp.value;\n tmp = tmp.next;\n }\n return result;\n }",
"public HashSet getElements() {\n\treturn elements;\n }",
"public Collection<V> getAllElements() {\n\t\treturn cacheMap.values();\n\t}",
"public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}",
"@Override\n public byte [] toArray()\n \n {\n final int size = size();\n final byte [] array = \n new byte [size]; \n \n\n int i = 0;\n for (ByteCursor c : this)\n {\n array[i++] = c.value;\n }\n return array;\n }",
"public Object[] getItems()\n {\n return items.toArray();\n }",
"public Object[] toArray() {\r\n Object[] arr = new Object[size];\r\n Node<T> current = head.next();\r\n for (int i = 0; i < size; i++) {\r\n arr[i] = current.getData();\r\n current = current.next();\r\n }\r\n return arr;\r\n }",
"E[] toArray();",
"public Object[] toArray() {\n Object[] arr = new Object[size];\n Node<E> cur = head;\n for(int i = 0; i < size; i++) {\n arr[i] = cur.item;\n cur = cur.next;\n }\n return arr;\n }",
"default Object[] toArray() {\n return toArray(new Object[0]);\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic E[] toArray() {\r\n\t\tE[] array = null;\r\n\t\tif (!heap.isEmpty()) {\r\n\t\t\tarray = (E[]) Array.newInstance(heap.get(0).getClass(), heap.size());\r\n\t\t\tint i = 0;\r\n\t\t\tfor (E e : heap) {\r\n\t\t\t\tarray[i++] = e;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}",
"@Override\n public Object[] toArray() {\n Object[] tempArray = new Object[size];\n Node n = this.head;\n int i = 0;\n while (i<size) {\n tempArray[i] = n.getData();\n i++;\n n = n.next;\n }\n return tempArray;\n }",
"public List allElements() {\r\n\t\tArrayList elems = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\telems.addAll(params[n].allElements());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\telems.addAll(exp_list[n].allElements());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\telems.add(ob);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\telems.add(ob);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elems;\r\n\t}",
"public Object[] toArray() {\n\t\tint k;\n\t\tNode p;\n\n\t\tObject[] retArray = new Object[mSize];\n\t\tfor (k = 0, p = mHead.next; k < mSize; k++, p = p.next)\n\t\t\tretArray[k] = p.data;\n\t\treturn retArray;\n\t}",
"public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }",
"T[] getObjects() {\n\t\treturn this.array;\n\t}",
"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 }",
"E[] getAll();",
"protected Object[] getArray(){\r\n\t \treturn array;\r\n\t }",
"@Override\n\t\tpublic Object[] toArray() {\n\t\t\treturn null;\n\t\t}",
"public List<Expression> getElements() {\n\t\treturn elements;\n\t}",
"public final Object[] getArray() {\n return array;\n }",
"public COSArray toList() \n {\n return array;\n }",
"public Product[] getAll() {\n Product[] list = new Product[3];\n try {\n list[0] = products[0].clone();\n list[1] = products[1].clone();\n list[2] = products[2].clone();\n } catch (CloneNotSupportedException ignored) {}\n\n return list;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic T[] asArray() {\n\t\t// have to use explicit cast because we cannot use the alternative signature of toArray(T[]), as you cannot instantiate an array of a\n\t\t// type parameter (not even an empty array)\n\t\treturn (T[]) this.itemList.toArray();\n\t}",
"public synchronized Collection getElementos() {\n return elemento.values();\n }",
"private Vector<ResourceLocation> getElements() {\n return getRef().elements;\n }",
"public double[] toArray() {\n\t\treturn new double[] {x, y, z};\n\t}",
"public E[] getArray() {\n return this.array;\n }",
"@Override\n\tpublic double[][] toArray() {\n\t\tint m = this.getRowsCount();\n\t\tint n = this.getColsCount();\n\t\tdouble[][] arr = new double[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tarr[i][j] = this.get(i, j);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}",
"public Collection<T> values(){\n\t\treturn null;\r\n\t\t//TODO\r\n\t}",
"public Object getArray() {\n\t\treturn array;\n\t}",
"@Override\n public List<IExpression> getElements() {\n return elements;\n }",
"public List<T> getAll() {\n return Arrays.asList(buffer);\n }",
"public Object[] toArray() {\n\t\tObject[] ret = new Object[currentSize];\n\t\tfor (int i = 0; i < currentSize; i++)\n\t\t\tret[i] = array[i];\n\t\treturn ret;\n\t}",
"public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }",
"public Collection<T> dump() {\n\t\treturn internalElements();\n\t}",
"public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}",
"public String[] getArray(){\n return (String[])this.items.toArray();\n }",
"public User[] toArray() {\n return this.base.values().toArray(new User[0]);\n }",
"public ArrayList getAll() {\r\n\t\tArrayList list = new ArrayList();\r\n\t\tlist.addAll(getParticles());\r\n\t\tlist.addAll(getConstraints());\r\n\t\tlist.addAll(getComposites());\r\n\t\treturn list;\r\n\t}",
"public int[] getInnerArray() {\n\t\treturn data;\n\t}",
"@Override\n\tpublic Object[] toArray() {\n\t\treturn null;\n\t}",
"public Column[] toArray() {\n return toArray(new Column[subColumnSize()]);\n }",
"public ArrayList<T> getAll() {\n\t\treturn new ArrayList<T>(this.data.values());\n\t}",
"public Expression getArray()\n {\n return getExpression();\n }",
"public Object[] toArray() {\n\t\tObject[] arg = new Object[size];\r\n\t\t\r\n\t\tNode<E> current = head;\r\n\t\tint i = 0;\r\n\t\twhile(current != null) {\r\n\t\t\targ[i] = current.getData();\r\n\t\t\ti++;\r\n\t\t\tcurrent = current.getNext();;\r\n\t\t}\r\n\t\treturn arg;\r\n\t}",
"@Override\n public Object[] toArray() {\n return Arrays.copyOf(data, size);\n }",
"public SubMenuItem[] getArray() {\n return this.toArray(new SubMenuItem[this.size()]);\n }",
"ArrayList<String> returnArray() {\n\t\treturn stringArray; // Return just the array and not the Set object\n\t}",
"public V[] values() {\n MyStack<V> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current.getValue());\n current = current.getNext();\n }\n result.push(current.getValue());\n }\n }\n return result.toArray();\n }",
"public Collection<V> values() {\n\t\treturn new ValueCollection();\n\t}",
"public java.util.List[] getPointArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(POINT$0, targetList);\n java.util.List[] result = new java.util.List[targetList.size()];\n for (int i = 0, len = targetList.size() ; i < len ; i++)\n result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getListValue();\n return result;\n }\n }",
"public synchronized Object[] toArray() {\r\n ProjectFilePart[] array = toArray(new ProjectFilePart[0]);\r\n return array;\r\n }",
"public java.lang.Object[] getArbolesAsArray()\r\n {\r\n return (arboles == null) ? null : arboles.toArray();\r\n }",
"Object[] getElements() {\n\tif (this.results == null) {\n\t\tinitResults();\n\t\tif (this.filterAdvancedScenarios != null) {\n\t\t\tthis.results.setFingerprints(this.filterAdvancedScenarios.isChecked());\n\t\t}\n\t}\n\treturn this.results.getElements();\n}",
"public PackageElement<?>[] getPackageElements() {\n\t\t\treturn (this.PackageElements.size() == 0)\n\t\t\t\t\t?EmptyPackageElements\n\t\t\t\t\t:this.PackageElements.values().toArray(EmptyPackageElements);\n\t\t}",
"public Object[] toArray() {\n Object[] myarray = new Object[size];\n DoublyLinkedListNode<T> pointer = head;\n for (int i = 0; i < size; i++) {\n myarray[i] = pointer.getData();\n pointer = pointer.getNext();\n }\n return myarray;\n\n\n }",
"public org.landxml.schema.landXML11.CurbDocument.Curb[] getCurbArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(CURB$10, targetList);\r\n org.landxml.schema.landXML11.CurbDocument.Curb[] result = new org.landxml.schema.landXML11.CurbDocument.Curb[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }",
"public WFJFilterMap[] asArray() {\n synchronized (lock) {\n return array;\n }\n }",
"public double[] element() {\n\t\treturn _coordinates;\n\t}",
"public Collection<Object> values()\n {\n return data.values();\n }",
"public double[] getAsArray() {\n return position.getAsArray();\n }",
"public ArrayList<String[]> getArr() {\r\n\t\treturn arr;\r\n\t}",
"public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }",
"@Override\n\tpublic int[] toArray() {\n\t\treturn null;\n\t}",
"public double[] asArray() {\n final double[] result = new double[COMPONENTS];\n asArray(result);\n return result;\n }"
] | [
"0.8187129",
"0.77107036",
"0.7686494",
"0.76073545",
"0.75347203",
"0.75344783",
"0.73327345",
"0.7251997",
"0.7214663",
"0.7196702",
"0.7159534",
"0.71417856",
"0.7127532",
"0.6997813",
"0.69710106",
"0.69336665",
"0.6933287",
"0.692959",
"0.68993104",
"0.6874461",
"0.68581903",
"0.68572193",
"0.68504477",
"0.6844704",
"0.68266016",
"0.68113554",
"0.6796519",
"0.67949206",
"0.67842275",
"0.67621005",
"0.6754119",
"0.6750284",
"0.6747372",
"0.6739155",
"0.6733632",
"0.669385",
"0.6682011",
"0.6668865",
"0.66681814",
"0.6666241",
"0.6664672",
"0.66559166",
"0.6647995",
"0.6628625",
"0.6621079",
"0.66093063",
"0.6601062",
"0.65910304",
"0.6589503",
"0.6563976",
"0.655575",
"0.65472287",
"0.65418017",
"0.65303016",
"0.652673",
"0.6524192",
"0.64955497",
"0.6487558",
"0.6476213",
"0.6470937",
"0.6470788",
"0.64686936",
"0.6468503",
"0.64650595",
"0.6455822",
"0.6434876",
"0.6421194",
"0.64189535",
"0.6415024",
"0.6405151",
"0.63925695",
"0.6389612",
"0.63879037",
"0.63855803",
"0.6379704",
"0.63736147",
"0.637112",
"0.6369129",
"0.63481313",
"0.63342327",
"0.6332838",
"0.6331433",
"0.63242525",
"0.63194686",
"0.63143253",
"0.6310697",
"0.63074845",
"0.63062954",
"0.62880135",
"0.62749195",
"0.6270325",
"0.62673044",
"0.6261053",
"0.6250919",
"0.6244845",
"0.62397224",
"0.6235447",
"0.6230182",
"0.622625"
] | 0.622044 | 100 |
onCreate() Is called on creation of activity. Override original implementation to add in Bluetooth scanning related initialization. | @Override
protected void onCreate(Bundle savedInstanceState) {
/**
* Load previously saved state and set the view for the
* activity. Set the title of the activity using the action
* bar and create a handlers to schedule messages and
* runnables/actions.
*/
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_device_scan);
//getActionBar().setTitle(R.string.title_devices);
mHandler = new Handler();
mListView = findViewById(R.id.list);
mListView.setOnItemClickListener(devicesClickListener);
/**
* Check whether BLE is supported on the device. You can then
* selectively disable BLE_related features. Display non-intrusive
* pop up message to indicate this and end activity.
*/
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
finish();
}
/**
* Request access to dangerous permissions: ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION.
* These permissions have to be declared in the manifest file and explicitly requested
* (prompting the user for access).
*/
ActivityCompat.requestPermissions(this, mPermissions, REQUEST_APP_PERMISSIONS);
/**
* Initializes a Bluetooth adapter to handle BLE requests/tasks such as scanning,
* pairing, etc. Get the system level Bluetooth Service and acquire its bluetooth
* adapter.
*/
final BluetoothManager bluetoothManager =
(BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
mBluetoothAdapter = bluetoothManager.getAdapter();
/**
* Check if Bluetooth is supported on this device, i.e. no bluetooth adapter.
* If it isn't, display a short message and end activity.
*/
if (mBluetoothAdapter == null) {
Toast.makeText(this, R.string.bluetooth_not_supported,
Toast.LENGTH_SHORT).show();
finish();
return;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tbtAdapt = BluetoothAdapter.getDefaultAdapter(); //初始化藍牙\n\t\t// 用BroadcastReceiver來取得搜尋結果\n\t\tIntentFilter intent = new IntentFilter();\n\t\tintent.addAction(BluetoothDevice.ACTION_FOUND);\n\t\tintent.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);\n\t\tintent.addAction(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);\n\t\tintent.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n\t\tregisterReceiver(searchDevices, intent); //註冊廣播接收器\n\t\tsm = (SensorManager) getSystemService(SENSOR_SERVICE);\n\t\tsm.registerListener(BluetoothService.this, \n sm.getDefaultSensor(Sensor.TYPE_ORIENTATION), \n SensorManager.SENSOR_DELAY_FASTEST); \n\t}",
"public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n final ActionBar actionBar = getActionBar();\n \n mHandler = new UiHandler(this);\n\n if(actionBar == null){Log.e(TAG, \"There is no ACTIONBAR\");}\n actionBar.setDisplayShowTitleEnabled(false);\n\n // Get local Bluetooth adapter\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // If the adapter is null, then Bluetooth is not supported\n if (mBluetoothAdapter == null) {\n Toast.makeText(this, \"Bluetooth is not available\", Toast.LENGTH_LONG).show();\n finish(); //destroy activity\n }\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // Prevent screen rotation.\n// this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n// this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);\n // Add animated progress indicator in top right corner.\n requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);\n\n mResoruces = this.getResources();\n\n setContentView(R.layout.activity_scan_results);\n mScanListView = (ListView) this.findViewById(R.id.scanListView);\n mScanResultsAdapter = new ScanResultsAdapter(this, mScanResults);\n mScanListView.setAdapter(mScanResultsAdapter);\n mScanListView.setOnItemClickListener(this);\n //重新搜索按钮觸發\n mScanButton = (Button) findViewById(R.id.buttonScan);\n mScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n scanLeDevice(true);\n }\n });\n\n final BluetoothManager btManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBtAdapter = btManager.getAdapter();\n\n // Register for broadcasts on BluetoothAdapter state change so that we can tell if it has been turned off.\n IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);\n this.registerReceiver(mReceiver, filter);\n checkEnableBt();\n\n if (mBtAdapter.isEnabled()) {\n Log.i(TAG, \"是否打开蓝牙适配器 :\" + mBtAdapter.isEnabled());\n scanLeDevice(true);\n }\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n handler = new Handler();\n scanInfoView = findViewById(R.id.scanInfo);\n\n communicationAdapter = new BluetoothAdapterBlindSwimmers();\n communicationDevice = new BluetoothImp();\n devices = new ArrayList<>();\n\n Button startScanButton = findViewById(R.id.startScanButton);\n startScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n devices.clear();\n scanForDevices(true);\n }\n });\n ListView scanListView = findViewById(R.id.scanListView);\n\n arrayAdapter = new DeviceArrayAdapter(this, devices);\n scanListView.setAdapter(arrayAdapter);\n scanListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { onDeviceSelected(position); }\n });\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_search_bluetooth);\n\t\tinitView();\n\t}",
"private void setupApp() {\n Log.d(TAG, \"setupApp()\");\n\n // Initialize the BluetoothService to perform bluetooth connections\n mBTService = new BTService(getActivity(), mHandler);\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // Get the view from activity_main.xml\n setContentView(R.layout.activity_main);\n\n // Locate the viewpager in activity_main.xml\n ViewPager viewPager = (ViewPager) findViewById(R.id.pager);\n // Set the ViewPagerAdapter into ViewPager\n viewPager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager()));\n viewPager.setOffscreenPageLimit(3); // zo blijven er 3 fragments in het werkgeheugen\n\n final ActionBar actionBar = getActionBar();\n actionBar.setSubtitle(\"not connected\");\n\n BT = BluetoothAdapter.getDefaultAdapter();\n if (BluetoothAvailable()) {\n if (BTEnabled()) { // Is toestemming gegeven de BT aan te zetten?\n BTKies();\t// Kies een BT en zet hem aan\n } else {\n // DisplayToast(\"Stop dan maar\");\n }\n } else\n {\n DisplayToast(\"Dit apparaat heeft geen Bluetooth. Stop maar.\");\n }\n\n }",
"private void initBluetooth() {\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n this.registerReceiver(mReceiver, filter);\n\n // Register for broadcasts when discovery has finished\n filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n this.registerReceiver(mReceiver, filter);\n\n // Get the local Bluetooth adapter\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n // Get a set of currently paired devices\n Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();\n\n // Initialize the BluetoothChatService to perform bluetooth connections\n mChatService = new BluetoothChatService(this, mHandler);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n }\n\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n BluetoothDevice mmDevice = null;\n\n List<String> mArray = new ArrayList<String>();\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n if(device.getName().equals(deviceName))\n mmDevice = device;\n mArray.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n\n //Creating the socket.\n BluetoothSocket mmSocket;\n BluetoothSocket tmp = null;\n\n UUID myUUID = UUID.fromString(mUUID);\n try {\n // MY_UUID is the app's UUID string, also used by the server code\n tmp = mmDevice.createRfcommSocketToServiceRecord(myUUID);\n } catch (IOException e) { }\n mmSocket = tmp;\n\n //socket created, try to connect\n\n try {\n mmSocket.connect();\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n // Run the example\n JArduino arduino = new BlinkAndAnalog(mmSocket);\n arduino.runArduinoProcess();\n\n Log.i(TAG, \"onCreate\");\n setContentView(R.layout.main);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (bluetoothAdapter == null) {\n //Display a toast notifying the user that their device doesn’t support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device doesn’t support Bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n //If BluetoothAdapter doesn’t return null, then the device does support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device does support Bluetooth\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(BLUE_CHANGE_DEVICES);\n\t\tgetActivity().registerReceiver(mMatchStateReceiver, filter);\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinitReceiver();\n\t\tdb = DbHelper.getInstance(this);//初始化数据库对象\n\t\tregisterReceiver(sucarBroadcast, filter);//注册刷卡数据处理广播\n\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n receiver = new PDAReceiver() {\n\n @Override\n public void dispathCode(String code) {\n handleCode(code);\n\n }\n };\n\n scanDataIntentFilter = new IntentFilter();\n //scanDataIntentFilter.addAction(\"com.android.scancontext\"); //前台输出\n scanDataIntentFilter.addAction(\"com.android.scanservice.scancontext\"); //后台输出\n registerReceiver(receiver, scanDataIntentFilter);\n }",
"protected void onCreate() {\n }",
"private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\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\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t/* BINDER LAB: Create a new instance of the Binder service */\n\t}",
"public boolean initialize() {\n // For API level 18 and above, get a reference to BluetoothAdapter through\n // BluetoothManager.\n if (mBluetoothManager == null) {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n if (mBluetoothManager == null) {\n Log.e(TAG, \"Unable to initialize BluetoothManager.\");\n return false;\n }\n }\n\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n if (mBluetoothAdapter == null) {\n Log.e(TAG, \"Unable to obtain a BluetoothAdapter.\");\n return false;\n }\n\n return true;\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n super.setNeedAutoReConnect(NEED_AUTO_RECONNECT);\n super.setNeedConnectStatusBroadcast(NEED_CONNECT_STATUS_BROADCAST);\n Log.e(TAG, \"oncreat\");\n mCommunciation = new CommunciationImp(this);\n mProtocol = new ProtocolConfig(this);\n }",
"@Override\n public void onScanFailed() {\n Log.d(TAG, \"Scan Failed\");\n BluetoothManipulator.startScan();\n }",
"protected BeaconScanner() {\n Log.i(TAG, \"Initialising beacon scanner.\");\n scanning = false;\n beaconEmitters = new LinkedList<>();\n beaconStream = Observable.create(new ObservableOnSubscribe<Beacon>() {\n @Override\n public void subscribe(ObservableEmitter<Beacon> emitter) throws Exception {\n beaconEmitters.push(emitter);\n }\n });\n adapter = BluetoothAdapter.getDefaultAdapter();\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //Set up UI components\n setContentView(R.layout.activity_main);\n logButton = (Button) findViewById(R.id.logButton);\n sendLogButton = (Button) findViewById(R.id.sendLogButton);\n XSpinner = (Spinner) findViewById(R.id.XSpinner);\n XSpinner.setOnItemSelectedListener(this);\n YSpinner = (Spinner) findViewById(R.id.YSpinner);\n YSpinner.setOnItemSelectedListener(this);\n progressBar = (ProgressBar) findViewById(R.id.progressBar);\n\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setIcon(R.mipmap.ic_launcher);\n\n //init Bluetooth objects and permissions\n initBLESetup();\n\n mHandler = new Handler();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n ACRA.init(this);\n }",
"@Override\n protected void onStart() {\n super.onStart();\n IntentFilter filter = new IntentFilter();\n filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);\n filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);\n filter.addAction(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);\n registerReceiver(mStateReceiver, filter);\n }",
"@Override\n public void onCreate (Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_data_sync_step_1);\n\n\n //등장애니..\n overridePendingTransition(R.anim.push_left_in_fast, R.anim.push_left_out_half);\n\n MAC = getIntent().getStringExtra(EXTRA_KEY_MACADDRESS);\n DATA = new BeaconItemDto ();\n DATA.sticker = JobProcessController.getInstance(mActivity, this).getStickerForService(MAC);\n DATA.MAC = MAC;\n DATA.min_temperature_limit = 0;\n DATA.max_temperature_limit = 0;\n\n mLogger = new LoggerData();\n mLoggerNew = new LoggerDataNew();\n\n initBluetoothAdapter ();\n setLayout ();\n initData ();\n }",
"@Override\n public void onScanStarted() {\n Log.d(TAG, \"Scan Started\");\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n mDeviceList = findViewById(R.id.listView);\n\n Button locationPermissionButton = findViewById(R.id.main_location_permission_button);\n locationPermissionButton.setOnClickListener( view -> {\n if(!haveLocationPermissions()){\n requestLocationPermission(MainActivity.this, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }\n );\n\n mLocationPermissionWarningLinearLayout = findViewById(R.id.main_linear_layout_location_permission_information_id);\n mTopTextLinearLayout = findViewById(R.id.main_linear_layout_top_text);\n\n InitializeDeviceListAdapter();\n\n //if device does not have BT capabilities, abort the app\n if(BluetoothAdapter.getDefaultAdapter() == null) {\n Toast.makeText(getApplicationContext(), \"Failed to access the phone's Bluetooth device.\", Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n checkLocationAndBluetoothPermissions();\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n BusProvider.register(this);\n findViews();\n init();\n getData();\n //customizeActionBar();\n\n loadContact();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_visit_multiplayer_game);\n\t\tbt = new Bluetooth();\n\t\tstatus = (TextView) findViewById(R.id.visit_game_status);\n\t\t\n\t\tint btState = bt.blutoothOK();\n\t\t\n\t\tif(btState == 1){\n\t\t\t/*\n\t\t\t * Geraet unterstuetzt kein Bluetooth\n\t\t\t * Meldung ausgeben und zum vorheriger Activity wechseln\n\t\t\t */\n\t\t\tToast t = Toast.makeText(getApplicationContext(), getString(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG);\n\t\t\tt.show();\n\t\t\tfinish();\n\t\t}\n\t\telse if(btState == 2){\n\t\t\t//Bluetooth ist nicht enabled\n\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t startActivityForResult(enableBtIntent, Bluetooth.REQUEST_ENABLE_BT);\n\t\t}\n\t\telse{\n\t\t\tcreateAct();\n\t\t}\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main_register);\n\t\thttpUtils = new HttpUtils();\n\t\tcontext = this;\n\t\ttypeChange = new TypeChange();\n\t\tmyApplication = (MyApplication) getApplication();\n\t\tmyMD5Util = new MyMD5Util();\n\t\tgetCodeInfo = new GetCodeInfo();\n\t\tuserId = myApplication.getUserId();\n\t\tinputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinitFristView();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tlistMusic = MusicList.getMusicData(getApplicationContext());\n\t\t//在程序中注册广播\n\t\tSeekBarBroadcastReceiver receiver = new SeekBarBroadcastReceiver();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tthis.registerReceiver(receiver, filter);\n\t\tnew Thread(this).start();\n\t\tsuper.onCreate();\n\t}",
"@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tbinder = new CaroBinder();\r\n\t\tbinder.service = this;\t\t\r\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tregisterBaseActivityReceiver();\r\n\t\tAppLoginUser = new LoginUser(this);\r\n\r\n\t\t//AppPermission = new PermissionGlobal(this);\r\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n adapter = new ArrayAdapter<>(this, R.layout.network, arraylist);\n\t\t((ListView)findViewById(R.id.wifilist)).setAdapter(this.adapter);\n\n\t\twifi = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);\n if (wifi.isWifiEnabled() == false)\n {\n Toast.makeText(getApplicationContext(), \"wifi is disabled..making it enabled\", Toast.LENGTH_LONG).show();\n wifi.setWifiEnabled(true);\n }\n\t\tregisterReceiver(wifiReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));\n\t\tnew Timer().scheduleAtFixedRate(new TimerTask(){\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tif (current != -1)\n\t\t\t\t\t\twifi.startScan();\n\t\t\t\t}\n\t\t\t}, 0, 5000);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }",
"private void initScanner() {\n /*\n * since barcodeReaderFragment is the child fragment in the ScannerFragment therefore\n * it is get using getChildFragmentManager\n * setting up the custom bar code listener\n */\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_monitoring);\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n Bundle bundle = getIntent().getExtras();\n filename = bundle.getString(\"fn\");\n\n mBtAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (mBtAdapter == null)\n {\n Toast.makeText(Monitoring.this, \"Bluetooth is not available\", Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n parameters = new float[11];\n\n rate = (TextView) findViewById(R.id.heartrate);\n rate.setText(\"Heart Rate: -\");\n\n level = (TextView) findViewById(R.id.stresslevel);\n level.setText(\"Stress Level: -\");\n\n connectButtonListener(); //Connect/Disconnect button listener\n startButtonListener(); //Start/Stop button listener\n shareButtonListener(); //Share button listener\n infoButtonListener(); //Info button listener\n\n service_init();\n initPPG();\n initGSR();\n }",
"@Override\r\n public void onStart() {\n super.onStart();\r\n Carteasy cs = new Carteasy();\r\n Map<String, String> data = cs.ViewData(String.valueOf(1), getApplicationContext());\r\n for (Map.Entry<String, String> entry : data.entrySet()) {\r\n //get the Id\r\n Log.d(\"Key: \",entry.getKey());\r\n Log.d(\"Value: \",entry.getValue());\r\n }\r\n if (!BTAdapter.isEnabled()) {\r\n // IT NEEDS BLUETOOTH PERMISSION\r\n // Intent to enable bluetooth, it will show the enable bluetooth\r\n // dialog\r\n Intent enableIntent = new Intent(\r\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n // this is to get a result if bluetooth was enabled or not\r\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\r\n // It will call onActivityResult method to determine if Bluetooth\r\n // was enabled or not\r\n } else {\r\n // Bluetooth is enabled\r\n }\r\n }",
"@Override\n\tpublic void onCreate() {\n\t\tnotifyServiceReceiver = new NotifyServiceReceiver();\n\t\tsuper.onCreate();\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\tprotected void onCreate (Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAndroidApplicationConfiguration config = new AndroidApplicationConfiguration();\n\t\tinitialize(new MainClass(), config);\n\t\tstartService(new Intent(getBaseContext(),MyServices.class));\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.filterscreen);\r\n\t\tinit();\r\n\t}",
"@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}",
"@Override\n public void onCreate() {\n super.onCreate();\n setUSDK();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\n public void onResume() {\n super.onResume();\n mAbleBLEService = AbleDeviceScanActivity.getmBluetoothLeService();\n setScanButton();\n }",
"@Override\n public void onCreate()\n {\n\n super.onCreate();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmContext = this;\n\t\tLogUtils.i(\"tr069Service onCreate is in >>>>>\");\n\t\tLogUtils.writeSystemLog(\"tr069Service\", \"onCreate\", \"tr069\");\n\t\tinitService();\n\t\tinitData();\n\t\tregisterReceiver();\n\t\t\t\t\n\t\tif(JNILOAD){\n\t\t\tTr069ServiceInit();\n\t\t}\n\t}",
"private void initializeActivity() {\n initializeActionbar();\n initializeActionDrawerToggle();\n setUpNavigationDrawer();\n setStartFragment();\n setFloatingButtonListener();\n setUpShareAppListener();\n hideWindowSoftKeyboard();\n }",
"@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }",
"@Override\n protected void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n setContentView(R.layout.activity_scan);\n back = (ImageView) findViewById(R.id.back);\n back.setOnClickListener(backClickListener);\n btScan = (Button) findViewById(R.id.btScan);\n btScan.setOnClickListener(this);\n btScanEnd = (Button) findViewById(R.id.btScanEnd);\n btScanEnd.setOnClickListener(this);\n\n scanAnimation = (ScanAnimation) findViewById(R.id.scan_animation_view);\n scanAnimation.setWillNotDraw(false);\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n if (isServicesOK()) {\n init();\n }\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tStrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build();\n\t\tStrictMode.setThreadPolicy(policy);\n\t\tsetContentView(R.layout.activity_for_search);\n\n\t\tsearchController = new SearchController();\n\t\tconnection = new InternetConnection(this);\n\n\t\tsearchButton_addListener();\n\n\t\tif (connection.checkInternetConnection()) {\n\t\t\tsearchController.setConnection(true);\n\t\t}\n\t\telse {\n\t\t\t// Need to implement a new persistence or define what will be done if the cellphone is offline.\n\t\t}\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n if (DEBUG) {\n Log.d(TAG, \"start\");\n }\n super.onCreate();\n init();\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.activity_mycard_list);\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t\tinitListener();\r\n\t\tinitUI();\r\n\t\tsetUI();\r\n\t\tinitUI_logon();\r\n\t\tinputUtil = new InputUtil(iv_sign, layout_footer_scan, layout_footer);\r\n\t\tinitData();\r\n\t}",
"public void onCreate() {\n super.onCreate();\n\n //TODO: enable fabric if API key is known\n // register and create fabric/crashlytics\n //Fabric.with(this, new Crashlytics.Builder()\n // .core(new CrashlyticsCore.Builder().build())\n // .build(), new Crashlytics());\n \n _BaseApplication.context = getApplicationContext();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"protected void onInit() {\n\t}",
"public void onCreate() {\n super.onCreate();\n isConnected = false;\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n // Get an instance of the SensorManager\n mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n \n String state = Environment.getExternalStorageState();\n\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n // We can read and write the media\n mExternalStorageAvailable = mExternalStorageWriteable = true;\n } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n // We can only read the media\n mExternalStorageAvailable = true;\n mExternalStorageWriteable = false;\n } else {\n // Something else is wrong. It may be one of many other states, but all we need\n // to know is we can neither read nor write\n mExternalStorageAvailable = mExternalStorageWriteable = false;\n }\n \n // Check if there is a Bluetooth adapter\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n } else {\n \tif (!mBluetoothAdapter.isEnabled()){\n \t\tmBluetoothAdapter.enable();\n \t}\n }\n \n setContentView(R.layout.main);\n \n }",
"@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n \n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_main);\n \n initPagers();\n \n // initTab();\n initViewPager();\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.cansettings);\r\n\t\t\r\n\t\tinit();\r\n\t\tthis.CANSettings.setOnClickListener(this.OnCANSettings);\r\n\t\tthis.m_SpyOnOff.setOnClickListener(OnSpyOnOff); \r\n\t\tthis.m_Manager = Fac_Manager.getManager();\r\n \r\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n mMainViewModel = new MainViewModel(this);\n mMenuViewModel = new MenuViewModel(this);\n inflateAndBind(R.xml.mainactivity_metadata, mMainViewModel);\n bindOptionsMenu(mMenuViewModel);\n if (!mMainViewModel.isBleSupported()) {\n new AlertDialog.Builder(this)\n .setTitle(\"Warning\")\n .setMessage(\"Your device does not support BLE\")\n .setPositiveButton(\"OK\", null)\n .show();\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n //TAREFA \n //- Recuperar instância de ConnectivityManager \n //- A partir da instância, recuperar informações da interface de rede ativa\n //- Mostrar nome da interface e se está conectada ou não\n //- Recuperar informações da rede Wifi e móvel e mostrar se estão conectadas ou não\n }",
"private Bluetooth() {}",
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_bluetooth_handler);\n final Button back=(Button) findViewById(R.id.button_back);\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n checkBTState();\n\n try {\n serverSocket=bluetoothAdapter.listenUsingInsecureRfcommWithServiceRecord(label, MY_UUID);\n } catch (IOException e){}\n\n try{\n bluetoothSocket=serverSocket.accept();\n }catch (IOException e) {}\n\n try{\n outputStream=MainActivity1.bluetoothSocket.getOutputStream();\n }catch (IOException e){\n Log.d(MainActivity1.label,\"Output stream connection failed.\");\n }\n\n receiver=new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent)\n {\n String a=intent.getAction();\n\n if(BluetoothDevice.ACTION_FOUND.equals(a))\n {\n BluetoothDevice device=intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n\n bluetoothItems.add(device.getName());\n }\n }\n };\n IntentFilter filter=new IntentFilter(BluetoothDevice.ACTION_FOUND);\n registerReceiver(receiver, filter);\n\n //searching();\n\n ListView bluetoothList=(ListView) findViewById(R.id.listView_bluetoothItems);\n\n bluetoothList.setAdapter(new ArrayAdapter<String>(this,R.layout.abc_list_menu_item_layout));\n\n back.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), ControllerHomeScreen.class));\n }\n });\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\tif (D)\n\t\t\tLog.e(TAG, \"+++ ON CREATE +++\");\n\n\t\tmSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n\n\t\t// Can Register other sensors in here then read values in\n\t\t// onSensorChanged above\n\t\tmSensorManager.registerListener(mSensorListener,\n\t\t\t\tmSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n\t\t\t\tSensorManager.SENSOR_DELAY_FASTEST);\n\n\t\t// get reference to SensorManager\n\t\tsm = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n\t\t// ---change to portrait mode---\n\t\tsetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n\t\tStatusBox = (TextView) findViewById(R.id.TextViewStatus);\n\t\tRetryConnBox = (CheckBox) findViewById(R.id.CheckBoxRetryConn);\n\t\tScreenOnOffCheckBox = (CheckBox) findViewById(R.id.CheckBoxScreen);\n\n\t\t// don't do anything bluetooth if debugging the user interface\n\t\tif (BTconnect) {\n\n\t\t\tmBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n\t\t\tif (mBluetoothAdapter == null) {\n\t\t\t\tToast.makeText(this, \"Bluetooth is not available.\",\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\tfinish();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!mBluetoothAdapter.isEnabled()) {\n\n\t\t\t\t// technically should ask user if its ok to enable bluetooth but\n\t\t\t\t// since i'm the user I say its ok\n\t\t\t\tmBluetoothAdapter.enable();\n\t\t\t\t//\n\t\t\t\t// Toast.makeText(this,\n\t\t\t\t// \"Please enable your BT and re-run this program.\",\n\t\t\t\t// Toast.LENGTH_LONG).show();\n\t\t\t\t// finish();\n\t\t\t\t// return;\n\t\t\t}\n\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"+++ GOT LOCAL BT ADAPTER +++\");\n\n\t\t}\n\n\t\tEnterMacIdButton = (Button) findViewById(R.id.buttonEnterMacId);\n\t\tEnterMacIdButton.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tshowDialog(1); // can set different dialogs in the oncreate\n\t\t\t\t\t\t\t\t// dialog and pass an int to call each one\n\t\t\t}\n\t\t});\n\n\t\tOpenCloseButton = (Button) findViewById(R.id.ButtonOpenClose);\n\t\tOpenCloseButton.setText(\"OPEN\");\n\n\t\t// green shade for button to start 0xFF00FF00\n\t\tOpenCloseButton.getBackground().setColorFilter(0xFF00FF00,\n\t\t\t\tPorterDuff.Mode.MULTIPLY);\n\n\t\tOpenCloseButton.setOnClickListener(new OnClickListener() {\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCharSequence tempC;\n\n\t\t\t\tdisableAccel = true;\n\t\t\t\t// Get instance of Vibrator from current Context\n\t\t\t\tVibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n\t\t\t\tvib.vibrate(50); // Vibrate for 50 milliseconds\n\n\t\t\t\ttempC = OpenCloseButton.getText();\n\n\t\t\t\tif (tempC.toString() == \"OPEN\") {\n\t\t\t\t\tOpenCloseButton.setText(\"CLOSE\");\n\t\t\t\t\tOpenCloseButton.getBackground().setColorFilter(0xFFFF0000,\n\t\t\t\t\t\t\tPorterDuff.Mode.MULTIPLY);\n\n\t\t\t\t\t// OpenCloseButton.setBackgroundColor(Color.RED);\n\t\t\t\t} else {\n\t\t\t\t\tOpenCloseButton.setText(\"OPEN\");\n\t\t\t\t\tOpenCloseButton.getBackground().setColorFilter(0xFF00FF00,\n\t\t\t\t\t\t\tPorterDuff.Mode.MULTIPLY);\n\t\t\t\t\t// OpenCloseButton.setBackgroundColor(Color.GREEN);\n\t\t\t\t}\n\n\t\t\t\t// don't do anything bluetooth if debugging the user interface\n\t\t\t\tif (BTconnect) {\n\t\t\t\t\t// flip LED/door on and off\n\t\t\t\t\tflipSwitch();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}); // end listener\n\n\t\tRetryConnBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t\tpersistantConn = true;\n\t\t\t\telse {\n\t\t\t\t\tpersistantConn = false;\n\n\t\t\t\t\t// if (!myBT.BTconnStatus)\n\t\t\t\t\t// StatusBox.setText(\"NOT Connected\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tScreenOnOffCheckBox.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t\tScreenOnOffEnable = true;\n\t\t\t\telse {\n\t\t\t\t\tScreenOnOffEnable = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t\n\t\t// *****Restore preferences******\n\t\tboolean temp = true;\n\t\tSharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\n\t\tScreenOnOffEnable = settings.getBoolean(\"ScreenOnOffEnable\", false);\n\t\ttemp = settings.getBoolean(\"RetryConnEnable\", true); // if there is nopref saved default to true to retry connection continuously\n\t\tScreenOnOffCheckBox.setChecked(ScreenOnOffEnable);\n\t\tRetryConnBox.setChecked(temp); // set the checkbox state on startup\n\t\tpersistantConn = temp; // set the persistent connection variable based on checkbox, persistantConn is modified after connection\n\t\tString savedMAC_ADDRESS = settings.getString(\"MacAddress\", \"\");\n\t\t\n\t\t//if it is the first run of the program it will load a blank MAC_address causing problems on new installations\n\t\tif(savedMAC_ADDRESS != \"\")\n\t\t\tMAC_ADDRESS = savedMAC_ADDRESS;\n\t\t\n\t\tLog.e(TAG,\"LOADED --> MACID \" + MAC_ADDRESS);\n\t\t\n\t\t\n\t\t// pitter for retrying connection every 2 seconds if enabled\n\t\tinitBTpitter();\n\n\t\t\n\t}",
"protected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\ttry{ \r\n\t\t\tif (Build.VERSION.SDK_INT < 12) {\r\n\t\t\t\t/* No USB host mode before sdk 12 */\r\n\t\t\t\tfinish();\r\n\t\t\t\treturn;\r\n\t\t\t} \r\n\t\t\t/* If we're not running, launch */\r\n\t\t\tIntent intent = new Intent(this, DrumCloud.class);\r\n\t\t intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\tstartActivity(intent);\r\n\t\t} catch (Exception e){ e.printStackTrace(); }\r\n\t\t\r\n\t\ttry{\r\n\t\t\t/* Trigger an interface scan in nmj */\r\n\t\t\tPendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(\"de.humatic.nmj.USB_DEVICE_ATTACHED\"), 0);\r\n\t\t\tpi.send();\r\n\t\t} catch (Exception ex){ex.printStackTrace();}\r\n\t\t\t\r\n\t\t\r\n\t\tfinish();\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_find_pay_password);\n\t\tImmersedStatusbarUtils.initAfterSetContentView(this, null);\n\t\tWDApplication.getInstance().addActivity(this);\n\t\tinit();\n\t\tinitView();\n\t\trefresh();\n\t}",
"public void onCreate() {\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 }",
"@Override\n public void onCreate() {\n super.onCreate();\n // Initialize the SDK before executing any other operations,\n FacebookSdk.sdkInitialize(getApplicationContext());\n AppEventsLogger.activateApp(this);\n }",
"@Override\r\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\r\n\t\tdoBindService();\r\n\t\tinitImageLoaderConfig();\r\n\t}",
"@Override\n public void onCreate() {\n\n createApplicationFolders();\n\n m_logger = LogManager.getLogger();\n\n m_logger.verbose(\"in onCreate\");\n\n s_instance = this;\n\n if (BuildConfig.DEBUG) {\n ButterKnife.setDebug(true);\n m_logger.debug(\"Butter Knife initialized in debug mode.\");\n }\n\n initConfigurationFile();\n\n super.onCreate();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = this;\n\t\tfloatViewUtils.setOnFloatViewClickListener(this);\n\t\tinitScanner();\n\t}",
"@Override\n\t protected void onCreate(Bundle savedInstanceState) {\n\t\t\tsuper.onCreate(savedInstanceState);\n\t //setContentView(R.layout.main);\n\n\t \tcheckNetworks();\n\t }",
"@Override\n public void onCreate() {\n super.onCreate();\n\n Log.d(LOGTAG, \"NotificationInterceptor.onCreate() called\");\n mNotificationsSeen = new ArrayList<NotificationBundle>();\n mIsReady = true;\n mOnCreates++;\n\n // We'll need the broadcast receiver to communicate with the main activity/app.\n // The main app will also need one to receive messages from us.\n// mReceiver = new NotificationInterceptorReceiver();\n// IntentFilter filter = new IntentFilter();\n// filter.addAction(\"com.glasstowerstudios.stainedglass.notifications.NOTIFY_LED_BLINK\");\n// registerReceiver(mReceiver, filter);\n }",
"public void startScan()\n {\n Toolbox.toast(getContext(), \"Starting scan...\");\n //------------------------------------------------------------\n // Clear the list of devices and make sure user has Bluetooth\n // turned on\n clearDeviceLists();\n if ( !Toolbox.checkBLEAdapter(bleAdapter) )\n {\n Toolbox.requestUserBluetooth(mainActivity);\n }\n else\n {\n scanLeDevice(true);\n }\n }",
"public void onCreate() {\r\n\r\n\t\tLog.d(TAG, \"Called onCreate\");\r\n\r\n\t\tsuper.onCreate();\r\n\r\n\t\tmeter = Pedometer.getInstance();\r\n\r\n\t\tinitializeSensors();\r\n\r\n\t\tIntentFilter filter = new IntentFilter(Application.SENSORSWITCHID);\r\n\t\tsensorSwitch = new SensorSwitchReceiver();\r\n\t\tregisterReceiver(sensorSwitch, filter);\r\n\r\n\t\tsensorUpdateIntent = new Intent(Application.SENSORSUPDATEID);\r\n\r\n\t}",
"@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 onCreate() {\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\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 ResultDevice(ArrayList<BluetoothDevice> deviceList) {\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 ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"@Override\n protected void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n mTAG = this.getClass().getSimpleName();\n initConfigure();\n //PushAgent.getInstance(mContext).onAppStart();\n\n }",
"@Override\n public void onCreate() {\n\n Log.v(TAG, \"called onCreate\");\n IntentFilter intentf = new IntentFilter();\n setClientID();\n intentf.addAction(ConnectivityManager.CONNECTIVITY_ACTION);\n registerReceiver(new MQTTBroadcastReceiver(), new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));\n mConnMan = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\thandleIntent(getIntent());\r\n\t}",
"public void startBluetooth(){\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (!mBluetoothAdapter.isEnabled()) {\n Intent btIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n //btIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(btIntent);\n }\n mBluetoothAdapter.startDiscovery();\n System.out.println(\"@ start\");\n IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n getActivity().registerReceiver(mReceiver, filter);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);\n ArrayAdapter<CharSequence> list = ArrayAdapter.createFromResource(this, R.array.locations, R.layout.abs__simple_spinner_item);\n list.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n getSupportActionBar().setListNavigationCallbacks(list, this);\n \n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n getSupportActionBar().hide();\n setContentView(R.layout.activity_my_donation_history);\n context = this;\n shared = new Shared(context);\n userList = new ArrayList<>();\n reference();\n init();\n getAPiCall();\n }",
"public void onCreate() {\n super.onCreate();\n // An Android handler thread internally operates on a looper.\n mHandlerThread = new HandlerThread(\"HandlerThreadService.HandlerThread\", Process.THREAD_PRIORITY_BACKGROUND);\n mHandlerThread.start();\n // An Android service handler is a handler running on a specific background thread.\n mServiceHandler = new ServiceHandler(mHandlerThread.getLooper());\n\n // Get access to local broadcast manager\n mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.auth_weibo);\n\n\t\tgetWindow().setBackgroundDrawableResource(R.color.list_bg_color);\n\n\t\tmSettingManager = (SettingManager) SettingManagerFactory.getComponent(getApplicationContext());\n\t\tmSettingManager.setSinaAccessToken(null);\n\t\tmSettingManager.setSinaExpireIn(null);\n\t\tmSettingManager.setSinaUid(null);\n\n\t\tmUrl = getIntent().getStringExtra(KEY_URL);\n\t\tmWeibo = Weibo.getInstance();\n\t\tmListener = mWeibo.getAuthListener();\n\t\tif(mWeibo == null || mListener == null || StringUtil.isEmpty(mUrl))\n\t\t{\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\n\t\tsetupViews();\n\t\tmAuthWeiboController = new AuthWeiboController(getApplicationContext(), mHandler);\n\t\tmIsFirstLoading = true;\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}"
] | [
"0.7497008",
"0.7486211",
"0.723636",
"0.7224438",
"0.7205965",
"0.7199507",
"0.7173138",
"0.7015871",
"0.6979992",
"0.689895",
"0.68545556",
"0.6800616",
"0.676376",
"0.6750995",
"0.6724579",
"0.6708958",
"0.66873485",
"0.66632587",
"0.6632216",
"0.66092694",
"0.6586237",
"0.65565085",
"0.6514745",
"0.65070814",
"0.65028965",
"0.64957666",
"0.64623797",
"0.64516205",
"0.644137",
"0.6439477",
"0.64139444",
"0.6395134",
"0.63885415",
"0.63875866",
"0.63841075",
"0.6381742",
"0.63717526",
"0.63601995",
"0.6350648",
"0.6340748",
"0.63363296",
"0.6325967",
"0.63233393",
"0.6318477",
"0.630607",
"0.63059187",
"0.6302395",
"0.63016933",
"0.6238992",
"0.623888",
"0.6238259",
"0.6233748",
"0.62317276",
"0.6230561",
"0.62246",
"0.6218165",
"0.6217407",
"0.6215715",
"0.6215715",
"0.6215331",
"0.62038594",
"0.6200355",
"0.61909866",
"0.61909866",
"0.6190983",
"0.6190024",
"0.61899364",
"0.61769027",
"0.6175722",
"0.6169113",
"0.6169086",
"0.61681527",
"0.6157693",
"0.6152789",
"0.61510724",
"0.61490285",
"0.6143853",
"0.6140967",
"0.6129024",
"0.61283517",
"0.61277175",
"0.6126329",
"0.61252534",
"0.61197025",
"0.61195934",
"0.61178076",
"0.6117301",
"0.6117301",
"0.61104846",
"0.61066383",
"0.610641",
"0.61062276",
"0.61033386",
"0.6099",
"0.60956746",
"0.60946536",
"0.60848767",
"0.60843694",
"0.6076224",
"0.60746366"
] | 0.71238464 | 7 |
onCreateOptionsMenu() Is called when the user tries to display the options menu for the first time or when the menu has been changed with (if invalidateOptionsMenu() has been called. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
/**
* Instantiate the menu with an xml layout file. Display items from the menu
* depending on the scanning state of the scanner.
*/
getMenuInflater().inflate(R.menu.main, menu);
if (!mScanning) {
menu.findItem(R.id.menu_stop).setVisible(false);
menu.findItem(R.id.menu_scan).setVisible(true);
menu.findItem(R.id.menu_refresh).setActionView(null);
} else {
menu.findItem(R.id.menu_stop).setVisible(true);
menu.findItem(R.id.menu_scan).setVisible(false);
// menu.findItem(R.id.menu_refresh).setActionView(
// R.layout.actionbar_indeterminate_progress);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@Override\n // This method initialize the contents of the Activity's options menu.\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflate = getMenuInflater();\n \tinflate.inflate(R.menu.options, menu);\n \t\n \t\n \treturn true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@SuppressLint({ \"NewApi\", \"InlinedApi\" })\n\t@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->actionbar:\" + actionbar);\n\t\tboolean prepareOptionsMenu = true;\n\t\tif ((isICSOrHigher) && (actionbar != null)) {\n\t\t\tmenu.clear();\n\t\t\t// Need to add menu options only once and need to update menu\n\t\t\t// items\n\t\t\t// only\n\t\t\t// when a notification 'APP_NOTIFY_CREATE_MENU' has been\n\t\t\t// received\n\t\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->menuInformation:\" + menuInformation);\n\t\t\tif (menuInformation != null && menuInformation.length() > 0) {\n\t\t\t\tprepareOptionsMenu = addMenuItemsToScreen(menu, menuInformation);\n\t\t\t}\n\t\t\t// ----------------------------------------\n\t\t}\n\n\t\treturn prepareOptionsMenu;\n\t}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetHasOptionsMenu(true);\t\t // MUST BE CALLED HERE so we can handle menu events for Options Menu\n\t}",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu appMenu)\n\t{\n\t\tsuper.onCreateOptionsMenu(appMenu);\n\t\treturn visitor.populateMenu(appMenu);\n\t}",
"@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n setHasOptionsMenu(true);\n super.onCreate(savedInstanceState);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater=getMenuInflater();\n inflater.inflate(R.menu.my_options_menu, menu);\n return true;\n }",
"@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n setHasOptionsMenu(true); // Options menu in the fragment\n super.onCreate(savedInstanceState);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.options_menu, menu);\n\t\treturn true;\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n //return true;\n }",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n if (getUserVisibleHint()) {\n menu.findItem(R.id.menuSort).setVisible(true);\n if (adapter != null)\n set_menu_items(menu, adapter_order, adapter_reverse);\n }\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.item_options, menu);\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate( R.menu.options, menu );\n\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n // This method initialize the contents of the Activity's options main.\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the Options Menu we specified in XML\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n //populate option menu\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\treturn true;\n \t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetHasOptionsMenu(true);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) \n\t{\n\t\treturn true;\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setHasOptionsMenu(true);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n\n onResume();\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(android.view.Menu menu) {\n\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\n\t\t return true;\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\r\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\r\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_log_list, menu);\r\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn true;\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\tsetListenerForMenuItems(menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(TAG, \"onCreateOptionMenu\");\n super.onCreateOptionsMenu(menu);\n return true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_schedule_creation, menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_options, menu);\n return true;\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetHasOptionsMenu(true);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.option_menu, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\t \n return true;\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\n\t}",
"@Override\n\t\tpublic boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\treturn super.onCreateOptionsMenu(menu);\n\t\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n Log.e(\"debug\", \"in bigImageSlidePageFragment, creating toolbar for position: \"+ getArguments().getInt(\"position\"));\n menu.clear();\n inflater.inflate(R.menu.manu_image_details, menu);\n inflater.inflate(R.menu.menu_app_info, menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.options, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }"
] | [
"0.79393864",
"0.7851638",
"0.77255666",
"0.77147686",
"0.77147686",
"0.77147686",
"0.7684993",
"0.76787245",
"0.76479983",
"0.7632385",
"0.75391024",
"0.753597",
"0.7508872",
"0.74993527",
"0.74946725",
"0.74701244",
"0.74692464",
"0.7448256",
"0.7437842",
"0.73957455",
"0.73923606",
"0.73856694",
"0.73783106",
"0.73767835",
"0.7356541",
"0.7353809",
"0.7348169",
"0.73384297",
"0.73382354",
"0.73345375",
"0.73226386",
"0.73198307",
"0.73088557",
"0.73088557",
"0.73088557",
"0.73038036",
"0.73037523",
"0.73018736",
"0.73018736",
"0.73018736",
"0.73018736",
"0.73018736",
"0.73018736",
"0.73000395",
"0.72991216",
"0.72960246",
"0.72910523",
"0.7289275",
"0.72861564",
"0.728158",
"0.7280957",
"0.7280379",
"0.7280379",
"0.7280379",
"0.7276162",
"0.72741604",
"0.7271583",
"0.72704875",
"0.72701794",
"0.72701794",
"0.72701794",
"0.72701794",
"0.72701794",
"0.72663",
"0.72663",
"0.72634363",
"0.72634363",
"0.7263033",
"0.726131",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.7249649",
"0.72481704",
"0.7247279",
"0.7240808",
"0.72402155",
"0.72396207",
"0.723811",
"0.7237266",
"0.7236271",
"0.7235912",
"0.7233433",
"0.7225272",
"0.722352",
"0.72145957",
"0.7213462",
"0.7210777"
] | 0.0 | -1 |
onPrepareOptionsMenu() Is always called right before the options menu is displayed, use this to dynamically update the contents of the options menu. | @Override
public boolean onPrepareOptionsMenu(Menu menu) {
/**
* Display items from the menu depending on the scanning state of the scanner.
*/
if (!mScanning) {
menu.findItem(R.id.menu_stop).setVisible(false);
menu.findItem(R.id.menu_scan).setVisible(true);
menu.findItem(R.id.menu_refresh).setActionView(null);
} else {
menu.findItem(R.id.menu_stop).setVisible(true);
menu.findItem(R.id.menu_scan).setVisible(false);
// menu.findItem(R.id.menu_refresh).setActionView(
// R.layout.actionbar_indeterminate_progress);
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(android.view.Menu menu) {\n\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}",
"@Override\n public void onPrepareOptionsMenu(Menu menu) {\n if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&\n isLayoutReady() && mDialpadChooser != null) {\n setupMenuItems(menu);\n }\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean prepareOptionsMenu = true;\n\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onPrepareOptionsMenu\");\n\t\tif (isGBOrLower) {\n\t\t\tmenu.clear();\n\t\t\tmenu.clear();\n\t\t\t// Need to add menu options only once and need to update menu\n\t\t\t// items\n\t\t\t// only\n\t\t\t// when a notification 'APP_NOTIFY_CREATE_MENU' has been\n\t\t\t// received\n\n\t\t\t// New implementation based on the JSON structure of the menu\n\t\t\t// information for each controller.\n\n\t\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onPrepareOptionsMenu->menuInformation:\" + menuInformation);\n\t\t\tif (menuInformation != null && menuInformation.length() > 0) {\n\t\t\t\tprepareOptionsMenu = addMenuItemsToScreen(menu, menuInformation);\n\t\t\t}\n\t\t}\n\t\treturn prepareOptionsMenu;\n\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n if (fragments[SELECTION].isVisible()) {\n if (menu.size() == 0) {\n settings = menu.add(R.string.settings);\n }\n return true;\n } else {\n menu.clear();\n settings = null;\n }\n return false;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n Log.i(\"Menus\", \"onPrepareOptionsMenu\");\n //Get MenuItem for 'show archived', change the text if its already visible\n MenuItem showArchivedMenu = menu.findItem(R.id.show_archived);\n if (mArchivedItemsList.getVisibility() == View.VISIBLE)\n showArchivedMenu.setTitle(\"Hide Archived\");\n else\n showArchivedMenu.setTitle(\"Show Archived\");\n\n return true;\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }",
"@SuppressLint({ \"NewApi\", \"InlinedApi\" })\n\t@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->actionbar:\" + actionbar);\n\t\tboolean prepareOptionsMenu = true;\n\t\tif ((isICSOrHigher) && (actionbar != null)) {\n\t\t\tmenu.clear();\n\t\t\t// Need to add menu options only once and need to update menu\n\t\t\t// items\n\t\t\t// only\n\t\t\t// when a notification 'APP_NOTIFY_CREATE_MENU' has been\n\t\t\t// received\n\t\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->onCreateOptionsMenu->menuInformation:\" + menuInformation);\n\t\t\tif (menuInformation != null && menuInformation.length() > 0) {\n\t\t\t\tprepareOptionsMenu = addMenuItemsToScreen(menu, menuInformation);\n\t\t\t}\n\t\t\t// ----------------------------------------\n\t\t}\n\n\t\treturn prepareOptionsMenu;\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tmenu.clear();\r\n\t\tSharedPreferences SP_service = this.getSharedPreferences(SE_PREFS, 0);\r\n\t\tif(!SP_service.getBoolean(SE_TAG, false))\r\n\t\t\tmenu.add(0, Menu.FIRST, 0, \"开始记录\");\r\n\t\telse\r\n\t\t\tmenu.add(0, Menu.FIRST, 0, \"停止记录\");\r\n\t\tmenu.add(0, Menu.FIRST + 1, 0, \"设置\");\r\n\t\treturn super.onPrepareOptionsMenu(menu);\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu appMenu)\n\t{\n\t\tsuper.onCreateOptionsMenu(appMenu);\n\t\treturn visitor.populateMenu(appMenu);\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n menu.removeItem(R.id.action_settings);\n return super.onPrepareOptionsMenu(menu);\n }",
"protected abstract void addMenuOptions();",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n if (getUserVisibleHint()) {\n menu.findItem(R.id.menuSort).setVisible(true);\n if (adapter != null)\n set_menu_items(menu, adapter_order, adapter_reverse);\n }\n }",
"public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }",
"@Override\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\n \t\tmenu.clear();\n \t\tswitch (mViewFlipper.getDisplayedChild()) {\n \t\tcase 0:\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 4, 4, getString(R.string.omenuitem_reglogin)).setIcon(R.drawable.ic_menu_login);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 5, 5, getString(R.string.omenuitem_quit)).setIcon(android.R.drawable.ic_menu_close_clear_cancel);\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\tif (mBrowPage.isDooming()) {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_browse).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t} else {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_zoom).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t}\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 2, 1, R.string.label_reset).setIcon(android.R.drawable.ic_menu_revert);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 3, 1, R.string.label_refresh).setIcon(R.drawable.ic_menu_refresh);\n \t\t\tbreak;\n \t\tcase 2:\n \t\t\tbreak;\n \t\t}\n \t\tmenu.add(Menu.NONE, Menu.FIRST + 6, 6, getString(R.string.omenuitem_about)).setIcon(android.R.drawable.ic_menu_help);\n \n \t\treturn super.onPrepareOptionsMenu(menu);\n \t}",
"@Override\r\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\r\n\t\tmenu.clear();\r\n\t\tinflater.inflate(R.menu.browsecourse, menu);\r\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n //return true;\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// If the nav drawer is open, hide action items related to the content\n\t\t// view\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mLinearLayout);\n\t\tmenu.findItem(R.id.action_search).setVisible(drawerOpen);\n\t\tmenu.findItem(R.id.action_settings).setVisible(drawerOpen);\n//\t\tactionBar.setDisplayShowTitleEnabled(drawerOpen);\n\t\t\n\t\tif (mItemPosition == 0 || mItemPosition == 2 || mItemPosition == 4) {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(false);\n\t\t\t\n\t\t\tif (drawerOpen) {\n\n\t\t\t\tif (OverviewFragment.item != null) {\n\t\t\t\t\tOverviewFragment.item.setVisible(false);\n\t\t\t\t}\n\n\t\t\t\tif (OverViewFragmentMonth.item != null) {\n\t\t\t\t\tOverViewFragmentMonth.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CategorysReportFragment.item != null) {\n\t\t\t\t\tCategorysReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (CashReportFragment.item != null) {\n\t\t\t\t\tCashReportFragment.item.setVisible(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tmenu.findItem(R.id.action_add).setVisible(!drawerOpen);\n\t\t}\n\n\t\tif (mItemPosition == 1 && drawerOpen == false) {\n\n\t\t\tif (AccountsFragment.item0 != null\n\t\t\t\t\t&& AccountsFragment.sortCheck == 1) {\n\t\t\t\tAccountsFragment.item1.setVisible(false);\n\t\t\t\tAccountsFragment.item0.setVisible(true);\n\t\t\t}\n\t\t}\n\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n Log.e(\"debug\", \"in bigImageSlidePageFragment, creating toolbar for position: \"+ getArguments().getInt(\"position\"));\n menu.clear();\n inflater.inflate(R.menu.manu_image_details, menu);\n inflater.inflate(R.menu.menu_app_info, menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu)\n {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n //populate option menu\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return true;\n }",
"public boolean onPrepareOptionsMenu(Menu menu) {\n try {\n super.onPrepareOptionsMenu (menu);\n int maxLength = 11;\n int numOfItemsToRemove = maxLength - GlobalVariables.namesCity.length;\n while (numOfItemsToRemove > 0) {\n menu.getItem (maxLength - 1).setVisible (false);\n numOfItemsToRemove--;\n maxLength--;\n }\n } catch (Exception e) {\n Log.e (e.toString (), \"On Prepare Method Exception\");\n }\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\r\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.uptionsmenu, menu);\r\n\t\treturn true;\r\n\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.alinone_arrange_order, menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n miActionProgressItem = menu.findItem(R.id.miActionProgress);\n // Extract the action-view from the menu item\n // ProgressBar v = (ProgressBar) MenuItemCompat.getActionView(miActionProgressItem);\n // Return to finish\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\t\tsuper.onPrepareOptionsMenu(menu);\n\t\t\n\t\tif(reloadMenu) {\n\t\t\tmenu.clear();\n\t\t\tJSONArray jsonArray;\n\n\t\t\ttry {\n\t\t\t\t// TODO correct to consider transport types\n\t\t\t\t/**if (transportTypeFilterJSON.length() > 0 ) {\n\t\t\t\t\tSubMenu transportType = menu.addSubMenu(0, 1, 0, \"Transport types\");\n\n\t\t\t\t\tjsonArray = new JSONArray(transportTypeFilterJSON);\n\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\t\t JSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\t\t\t transportType.add(0, jsonObject.getInt(\"id\"), i, jsonObject.getString(\"description\"));\n\t\t\t\t\t}\n\t\t\t\t\ttransportType.setGroupCheckable(0, true, true);\n\t\t\t\t}**/\n\t\t\t\tif (transportRouteFilterJSON.length() > 0 ) {\n\t\t\t\t\tSubMenu transportRoute = menu.addSubMenu(0, MENU_ROUTES, 1, \"Routes\");\n\t\t\t\t\t\n\t\t\t\t\tjsonArray = new JSONArray(transportRouteFilterJSON);\n\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\t\t JSONObject jsonObject = jsonArray.getJSONObject(i);\n\t\t\t\t\t\t transportRoute.add(MENU_ROUTES, jsonObject.getInt(\"id\"), i, jsonObject.getString(\"description\"));\n\t\t\t\t\t}\n\t\t\t\t\ttransportRoute.setGroupCheckable(MENU_ROUTES, true, true);\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t}\n\t\t\treloadMenu = false;\n\t\t}\n\t\t\n\t\treturn true;\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_course, menu);\n\n }",
"@Override\r\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\r\n \t\tmenu.removeGroup(0);\r\n \t\tmenu.removeGroup(1);\r\n \t\tResources res = getResources();\r\n \t\tif(keyValue == 1)\r\n \t\t{\r\n \t\t\tmenu.add(0, R.id.selectAll, 0, res.getString(R.string.select_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_on_background);\r\n \t\t\tmenu.add(1, R.id.deSelect, 1, res.getString(R.string.deselect_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_off_background);\r\n \t\t}\r\n \t\treturn true;\r\n \r\n \t}",
"@Override\n // This method initialize the contents of the Activity's options menu.\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \tsuper.onCreateOptionsMenu(menu);\r\n\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.title_menu, menu);\r\n \r\n\t\treturn true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpened = drawerLayout.isDrawerOpen(drawerList);\r\n\r\n\t\tmenu.findItem(R.id.settingsMenuItem).setVisible(!drawerOpened);\r\n\r\n\t\tif (drawerOpened)\r\n\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\telse {\r\n\t\t\tif (selectedItem == 0)\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(true);\r\n\t\t\telse\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\t}\r\n\r\n\t\treturn super.onPrepareOptionsMenu(menu);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n Log.d(LOG_TAG, \"onPrepareOptionsMenu()\");\n // Check the corresponding menu item depending on the selected sort order.\n switch (sortOrderCurrent){\n case SORT_ORDER_MOST_POPULAR:\n // Check the menu item \"Most Popular\"\n menu.findItem(R.id.action_sort_most_popular).setChecked(true);\n break;\n case SORT_ORDER_TOP_RATED:\n // Check the menu item \"Top Rated\"\n menu.findItem(R.id.action_sort_top_rated).setChecked(true);\n break;\n default:\n Log.e(LOG_TAG, \"onPrepareOptionsMenu(): No case matched.\");\n break;\n }\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// if nav drawer is opened, hide the action items\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n\t\t// menu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n super.onPrepareOptionsMenu(menu);\n //If this is a new item, hide the \"Delete\" menu item.\n if(mCurrentItemUri == null){\n MenuItem menuItem = menu.findItem(R.id.action_delete);\n menuItem.setVisible(true);\n }\n return true;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n// menu.add(0, 0, 0, \"++Results\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n// menu.add(0, 1, 0, \"++Reload\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n return true;\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\t// if nav drawer is opened, hide the action items\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerView);\n\t\tmenu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n /*boolean drawerOpen = myDrawerLayout.isDrawerOpen(myDrawerList);\n menu.findItem(R.string.action_websearch).setVisible(!drawerOpen);*/\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\n\t\t \n return true;\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n return true;\r\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // if nav drawer is opened, hide the action items\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n menu.findItem(R.id.action_settings).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(<MENU_ITEMS>).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n boolean showCheckAll = isShowCheckAllInMenu();\n menu.getItem(MENU_CHECK_ALL - 1).setVisible(showCheckAll);\n menu.getItem(MENU_UNCHECK_ALL - 1).setVisible(showCheckAll);\n\n boolean showReport = isShowReportInMenu();\n menu.getItem(MENU_CHECK_REPORT - 1).setVisible(showReport);\n\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflate = getMenuInflater();\n \tinflate.inflate(R.menu.options, menu);\n \t\n \t\n \treturn true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater=getMenuInflater();\n inflater.inflate(R.menu.my_options_menu, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(TAG, \"onCreateOptionMenu\");\n super.onCreateOptionsMenu(menu);\n return true;\n }",
"private void initOptionsMenu() {\n final Function<Float, Void> changeAlpha = new Function<Float, Void>() {\n @Override\n public Void apply(Float input) {\n skyAlpha = Math.round(input);\n return null;\n }\n };\n\n final Function<Float, Void> changeMaxConfidence = new Function<Float, Void>() {\n @Override\n public Void apply(Float input) {\n options.confidenceThreshold = input;\n return null;\n }\n };\n\n bottomSheet = findViewById(R.id.option_menu);\n bottomSheet.setVisibility(View.VISIBLE);\n bottomSheet\n .withSlider(\"Alpha\", ALPHA_MAX, skyAlpha, changeAlpha, 1f)\n .withSlider(\"Confidence Threshold\", 1, options.confidenceThreshold, changeMaxConfidence);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu_main, menu);\n\t\tinitManageRecordingMenuItem(menu, R.id.sort_ascending);\n\t\tinitManageRecordingMenuItem(menu, R.id.shortening_names);\n\t\treturn true;\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n// boolean drawerOpen = mDrawerLayout.isDrawerOpen();\n //menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.enter_update_info, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, 0, 0, \"Refresh\");\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = myDrawerLayout.isDrawerOpen(myDrawerList);\n // Þetta getur falið icon þegar drawer er opin\n // menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.editor_options_menu, menu);\n\n\n return super.onCreateOptionsMenu(menu);\n }"
] | [
"0.78450644",
"0.779044",
"0.7734155",
"0.77249295",
"0.7700511",
"0.7700511",
"0.7679651",
"0.7674952",
"0.7487134",
"0.7290362",
"0.71573097",
"0.69928557",
"0.6975467",
"0.6781549",
"0.676724",
"0.6748984",
"0.6740636",
"0.67154646",
"0.6688017",
"0.664587",
"0.66369593",
"0.6633991",
"0.66309536",
"0.66267216",
"0.66267216",
"0.66267216",
"0.6595026",
"0.65900314",
"0.6584831",
"0.658401",
"0.6562465",
"0.65572786",
"0.655386",
"0.65416616",
"0.64886636",
"0.6479764",
"0.6479481",
"0.6478785",
"0.6471867",
"0.6463628",
"0.64595926",
"0.6459485",
"0.6450269",
"0.64499944",
"0.6449654",
"0.6437288",
"0.6434011",
"0.6432795",
"0.6415564",
"0.641448",
"0.64057684",
"0.64057684",
"0.64057684",
"0.64057684",
"0.64057684",
"0.6396357",
"0.6389824",
"0.6389824",
"0.63897496",
"0.63864714",
"0.63839775",
"0.6383639",
"0.6382607",
"0.6381138",
"0.637982",
"0.6377483",
"0.63716525",
"0.6371135",
"0.6371135",
"0.6371135",
"0.6371135",
"0.6371135",
"0.6371135",
"0.6367582",
"0.63581264",
"0.6354595",
"0.63480574",
"0.6346429",
"0.634558",
"0.634558",
"0.634558",
"0.6344893",
"0.6344893",
"0.6344893",
"0.63442653",
"0.63370866",
"0.6330814",
"0.6329801",
"0.63287044",
"0.6328255",
"0.63280934",
"0.6327622",
"0.6326395",
"0.63261753",
"0.6318911",
"0.6316887",
"0.6314145",
"0.6310613",
"0.6310144",
"0.63079745"
] | 0.6506524 | 34 |
onOptionsItemSelected() Is called whenever an item from the options menu is selected/clicked. By default it will return false and handle events normally (either call the item's Runnable or send a message to its Handler). If true is returned those default events will not happen (will end events here). | @Override
public boolean onOptionsItemSelected(MenuItem item) {
/**
* Clear currently found BLE devices and rescan again or stop the scan.
*/
switch (item.getItemId()) {
case R.id.menu_scan:
mLeDeviceListAdapter.clear();
scanLeDevice(true);
break;
case R.id.menu_stop:
scanLeDevice(false);
break;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (!menuMgr.handleMenuEvent(item))\n return super.onOptionsItemSelected(item);\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if(mToggle.onOptionsItemSelected(item)){\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if(t.onOptionsItemSelected(item))\n return true;\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\t// --Llamamos al metodo que sabe que itema fue seleccionado\r\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn MenuSelecciona(item);\r\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return (this.displayState != null &&\n this.displayState.properties.usesMenu() &&\n this.displayState.fragment.onOptionsItemSelected(item))\n || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n Runnable onOptionsItemSelected = settingsController.getOnOptionsItemSelected(item.getItemId());\n try {\n onOptionsItemSelected.run();\n return false;\n }catch(NullPointerException e) {\n Utilities.stampaToast(SettingsActivity.this, \"Si è verificato un errore.\\nRiprova tra qualche minuto\");\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item){\n super.onOptionsItemSelected(item);\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item)\n\t{\n\t\tsuper.onOptionsItemSelected(item);\n\t\treturn visitor.handleMenuItemSelection(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent intent;\n isOptionSelected = true;\n switch (item.getItemId()) {\n case R.id.about:\n intent = new Intent(this, AboutActivity.class);\n break;\n case R.id.dawson_website:\n intent = new Intent(Intent.ACTION_VIEW,\n Uri.parse(this.getString(R.string.urlToDawson)));\n break;\n case R.id.settings:\n intent = new Intent(this, SettingsActivity.class);\n break;\n default:\n isOptionSelected = super.onOptionsItemSelected(item);\n return isOptionSelected;\n }\n //will only reach here is isOptionsSelected = true;\n if (checkIfChanged()) {\n showDialog(intent);\n return true;\n } else {\n launchActivity(intent);\n finish();\n return true;\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return ApplicationData.contextMenu(this, item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n //get item id to handle item clicks\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Log.e(\"RemoteClient\", \"onOptionsItemSelected\");\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n // displays the SettingsActivity when running on a phone\n startMySettingsActivity();\n // consume the menu event\n return true;\n\n case R.id.add_book:\n startAddBookFragment();\n // consume the menu event\n return true;\n\n default:\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (mDrawerToggle.onOptionsItemSelected(item))\n {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n switch (item.getItemId())\n {\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t if (mDrawerToggle.onOptionsItemSelected(item)) {\n\t return true;\n\t }\n\t else{\n\t return super.onOptionsItemSelected(item);\n\t }\n\t }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_quit:\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item)\n\t{\n\t\tswitch (item.getItemId())\n\t\t{\n\t\tcase R.id.action_settings:\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (true) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu_options:\n startActivity(new Intent(this, GamePreferencesActivity.class));\n return true;\n default : break;\n }\n\n\n return MenuView.onOptionsItemSelected(this, item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.send_result) {\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.search:\n\t\t\tonSearchRequested();\n\t\t\treturn true;\n\t\tcase R.id.action_selCourses:\n\t\t\tselectCourses();\n\t\t\treturn true;\n\t\tcase R.id.action_settings:\n\t\t\tsettings();\n\t\t\treturn true;\n\t\tcase R.id.action_refreshXML:\n\t\t\trefreshXML();\n\t\t\treturn true;\n\t\tcase R.id.action_swapSem:\n\t\t\tswapSemester();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"public boolean onOptionsItemSelected(android.view.MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings)\n return true;\n\n switch (id) {\n case R.id.action_sendShift:\n sendEvent();\n return true;\n\n\n case R.id.action_delete:\n deleteOrShowMethod();\n return true;\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Test\n case R.id.action_test:\n testSunriseAlarm();\n return true;\n // Kill\n case R.id.action_kill_light:\n killLight();\n return true;\n // Moonlight\n case R.id.action_moonlight:\n enableMoonlightMode();\n return true;\n // Settings\n case R.id.action_settings:\n viewSettings();\n return true;\n }\n\n // Don't consume the event\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\t case R.id.menu_call_search_dialpad:\n\t\t mHaptic.vibrate();\n if (mListener != null) {\n mListener.onSearchButtonPressed();\n }\n\t\t return true ;\n case R.id.menu_2s_pause:\n updateDialString(\",\");\n return true;\n case R.id.menu_add_wait:\n updateDialString(\";\");\n return true;\n default:\n return false;\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (drawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.settings:\n\n\t\t\treturn true;\n\n\t\tcase R.id.about:\n\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@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 boolean onOptionsItemSelected(MenuItem menuItem) {\n switch (menuItem.getItemId()) {\n default: {\n do {\n return true;\n break;\n } while (true);\n }\n case 16908332: \n }\n this.finish();\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (item.getItemId()) {\n case android.R.id.home:\n return false;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n }",
"public boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == R.id.action_settings) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle action bar actions click\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_settings:\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle action bar actions click\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.action_settings:\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n\n int id = item.getItemId();\n\n if(id == R.id.action_setting){\n Toast.makeText(getContext(), \"Settings Clicked\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item1_setting){\n Toast.makeText(getContext(), \"Settings: Sub item1\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item2_setting){\n Toast.makeText(getContext(), \"Settings: Sub item2\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item3_setting){\n Toast.makeText(getContext(), \"Settings: Sub item3\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item4_setting){\n Toast.makeText(getContext(), \"Settings: Sub item4\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.action_more){\n Toast.makeText(getContext(), \"More options Clicked\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.action_search){\n Toast.makeText(getContext(), \"Search Call\", Toast.LENGTH_LONG).show();\n }\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n switch (id)\n {\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected( MenuItem item )\n\t{\n\t\tToast.makeText( getActivity().getApplicationContext(), \"test\", Toast.LENGTH_SHORT ).show();\n\t\treturn super.onOptionsItemSelected( item );\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return id == R.id.action_settings || super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.home:\n home_pres();\n break;\n case R.id.back:\n back_press();\n break;\n case R.id.previous:\n previous_press();\n break;\n case R.id.next:\n next_press();\n break;\n default:\n assert false;\n }\n return true;\n }",
"public boolean onOptionsItemSelected(MenuItem item) {\n // Handles item selection\n switch (item.getItemId()) {\n case R.id.action_settings:\n Intent intent = new Intent(MainActivity.this, SettingsActivity.class);\n startActivity(intent);\n return true;\n default:\n Log.i(\"MainActivity\", \"Menu item is not implemented.\");\n return true;\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n this.finish();\r\n return true;\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n /*\n Play All\n */\n if (((String) item.getTitle()).equalsIgnoreCase(getResources().getString(R.string.play_all_action_bar_button))) {\n\n AppLogger.getLogger().Info(\"Library Presentation Fragment: play all clicked\");\n handlePlayRequest(false);\n\n /*\n Shuffle\n */\n } else if (((String) item.getTitle()).equalsIgnoreCase(getResources().getString(R.string.shuffle_action_bar_button))) {\n\n AppLogger.getLogger().Info(\"Library Presentation Fragment: shuffle all clicked\");\n handlePlayRequest(true);\n\n /*\n Filter/Sort\n */\n } else if (((String) item.getTitle()).equalsIgnoreCase(\"filter/sort\")) {\n if (mDrawerLayout.isDrawerOpen(Gravity.RIGHT)) {\n mDrawerLayout.closeDrawer(Gravity.RIGHT);\n } else {\n mDrawerLayout.openDrawer(Gravity.RIGHT);\n }\n } else {\n return super.onOptionsItemSelected(item);\n }\n\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n case R.id.action_settings:\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if(toggle.onOptionsItemSelected(item))\n return true;\n if (id == R.id.action_settings) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase R.id.menu_setting:\n\t\t\tuserInformation.onUserPicker();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n } else if (id == R.id.new_game) {\n EventBus.getDefault().post(new FourInARowNewGameEvent());\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.acercade:\n \tlanzarAcercaDe(null);\n \tbreak;\n case R.id.config:\n \tlanzarPreferencias(null);\n \tbreak;\n }\n return true;\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n return true;\n case R.id.action_search:\n return true;\n case R.id.action_user:\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\n\t\tcase R.id.listLugares: {\n\t\t\tlanzarListadoLugares();\n\t\t\tbreak;\n\t\t}\n\n\t\tcase R.id.listCategorias: {\n\t\t\tlanzarListadoCategorias();\n\t\t\tbreak;\n\t\t}\n\n\t\tcase R.id.action_settings: {\n\t\t\tlanzarPreferencias();\n\t\t\tbreak;\n\t\t}\n\n\t\tcase R.id.acerca_de: {\n\t\t\tToast.makeText(this, \"Acerca De\", Toast.LENGTH_SHORT).show();\n\t\t\t// lanzarAcercaDe();\n\t\t\tbreak;\n\t\t}\n\n\t\tcase R.id.salir: {\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t\t\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n\n return true;\n\n case R.id.action_settings:\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public boolean onOptionsItemSelected(MenuItem item){\n if(item.getItemId() == R.id.monItem2){\n Log.i(\"onOptionsItemSelected\",\"L’item \" + item.toString() +\n \" a bien ́et ́e cliqu ́e\");\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Log.d(TAG, \"onOptionsItemSelected\");\n if (id == android.R.id.home){\n Log.d(TAG, \"onOptionsItemSelected: HOME\");\n }\n return super.onOptionsItemSelected(item);\n\n }"
] | [
"0.8222727",
"0.8095893",
"0.7897877",
"0.783357",
"0.78182095",
"0.7810666",
"0.7793751",
"0.77726877",
"0.77726877",
"0.77726877",
"0.77616745",
"0.77545375",
"0.7730296",
"0.7728226",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7725072",
"0.7703425",
"0.7703425",
"0.7698973",
"0.7698973",
"0.7698973",
"0.7698973",
"0.7698973",
"0.7698973",
"0.7696589",
"0.76913816",
"0.76749396",
"0.76335275",
"0.7619804",
"0.7619804",
"0.75985026",
"0.75744766",
"0.75744766",
"0.75744766",
"0.75744766",
"0.75557554",
"0.7553877",
"0.7530059",
"0.74975127",
"0.7461082",
"0.745856",
"0.74543196",
"0.744054",
"0.7426972",
"0.74211735",
"0.7408597",
"0.74001646",
"0.7389994",
"0.73693657",
"0.7364807",
"0.734426",
"0.7344231",
"0.7335144",
"0.7334467",
"0.7328274",
"0.7317232",
"0.7310717",
"0.73074335",
"0.7306901",
"0.730236",
"0.7300534",
"0.7300534",
"0.7299283",
"0.7299283",
"0.729755",
"0.729755",
"0.729755",
"0.729755",
"0.72963166",
"0.72963166",
"0.72963166",
"0.72963166",
"0.72963166",
"0.7296121",
"0.72862506",
"0.7285193",
"0.7283904",
"0.7283904",
"0.7282392",
"0.7282392",
"0.7280981",
"0.72796834",
"0.7276497",
"0.72756606",
"0.72707486",
"0.72688836",
"0.72662234",
"0.72660995",
"0.7265906",
"0.7264533",
"0.72538185",
"0.7252263",
"0.7246344",
"0.72443724",
"0.723655"
] | 0.0 | -1 |
onResume() Is called whenever the activity will start interacting with the user. Always followed by onPause(). | @Override
protected void onResume() {
/**
* Enable Bluetooth if it is not enabled. Create a new list of devices and attach
* it to the list view so it will be shown; then start scanning for devices.
*/
super.onResume();
if(!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
}
mLeDeviceListAdapter = new LeDeviceListAdapter();
mListView.setAdapter((mLeDeviceListAdapter));
scanLeDevice(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onResume() {\n }",
"public void onResume();",
"void onResume();",
"public void onResume() {\n super.onResume();\n }",
"public void onResume() {\n super.onResume();\n }",
"protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"protected abstract void onResume();",
"@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }",
"@Override\r\n protected void onResume() {\n super.onResume();\r\n Log.i(TAG, \"onResume\");\r\n\r\n }",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, \"onResume\");\n\t}",
"@Override\n public void onResume() {\n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }",
"@Override\r\n protected void onResume() {\r\n Log.i(TAG, \"onResume()\");\r\n \r\n super.onResume();\r\n }",
"@Override\r\n\tprotected void onResume() {\n\t\t\r\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume() called\");\n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.v(TAG, \"Invoked onResume()\");\n\n }",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}",
"@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.e(TAG, \"onResume\");\n\t}",
"@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t\tToast.makeText(getApplicationContext(), \"onResume\", Toast.LENGTH_SHORT).show();\n\n\t\t\tLog.d(msg, \"The onResume() event\");\n\t\t}",
"@Override\n\tpublic void onResume() {\n\n\t}",
"@Override\n\tpublic void onResume() {\n\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\n public void onResume(Activity activity) {\n }",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t// Toast.makeText(getApplicationContext(), \"Resume\",\n\t\t// Toast.LENGTH_LONG).show();\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n\n Log.d(LOG_TAG, \"onResume()\");\n\n\n\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t}",
"@Override\n public void onResume() {\n\n super.onResume();\n }",
"@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t}",
"public void onResume() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && (session.isOpened() || session.isClosed())) {\n\t\t\tonSessionStateChange(session, session.getState(), null);\n\t\t}\n\t\tuiHelper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t \n\t}",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t\tLog.d(TAG, \"onResume\");\n \t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLogUtils.d(\"onResume() is in\");\n\t}",
"@Override\n\tprotected void onResume() \n\t{\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\t}",
"@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\t\t\t\n\t\t\t\t\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(\"tag\",\"onResume\" );\n\t}",
"@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }",
"@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }",
"@Override\n public void onResume() {\n super.onResume();\n }",
"@Override\n public void onResume() {\n super.onResume();\n }",
"@Override\n public void onResume() {\n super.onResume();\n }",
"@Override\n public void onResume() {\n super.onResume();\n }",
"@Override\n public void onResume() {\n super.onResume();\n }",
"@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n }",
"@Override\n protected void onResume() {\n Log.i(\"G53MDP\", \"Main onResume\");\n super.onResume();\n }",
"public void onActivityResume() {\n if (currentScreen != null) {\n currentScreen.onActivityResume();\n }\n }",
"@Override\n protected void onResume() {\n super.onResume();\n }",
"@Override\n protected void onResume() {\n super.onResume();\n }",
"@Override\n protected void onResume() {\n super.onResume();\n }",
"@Override\n protected void onResume() {\n super.onResume();\n }",
"@Override\r\n protected void onResume() {\n\tsuper.onResume();\r\n }"
] | [
"0.8694794",
"0.8680215",
"0.8650069",
"0.8535418",
"0.8535418",
"0.85320616",
"0.8467872",
"0.8467872",
"0.8467872",
"0.8467872",
"0.84479356",
"0.84449106",
"0.84441864",
"0.84410465",
"0.8418006",
"0.8415304",
"0.8415304",
"0.84114295",
"0.8405824",
"0.8403869",
"0.8402074",
"0.83887565",
"0.83887565",
"0.83670616",
"0.8364703",
"0.83568794",
"0.83526117",
"0.83526117",
"0.8350749",
"0.8350749",
"0.8350749",
"0.8331875",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.832143",
"0.8320654",
"0.8320654",
"0.831793",
"0.831275",
"0.8309254",
"0.83040476",
"0.8297942",
"0.82950515",
"0.82946754",
"0.82938045",
"0.82938045",
"0.82938045",
"0.8292915",
"0.8287128",
"0.8274371",
"0.8274371",
"0.8270995",
"0.8270995",
"0.8270995",
"0.8270995",
"0.8270995",
"0.8270995",
"0.8270995",
"0.8267469",
"0.82661784",
"0.8262461",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8248053",
"0.8244719",
"0.82402307",
"0.823449",
"0.8231038",
"0.8223381",
"0.8223381",
"0.82093877",
"0.82093877",
"0.82093877",
"0.82093877",
"0.82093877",
"0.820746",
"0.82034504",
"0.81753474",
"0.81749696",
"0.81749696",
"0.81749696",
"0.81749696",
"0.8173159"
] | 0.0 | -1 |
User chose not to enable Bluetooth. | @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {
finish();
return;
}
super.onActivityResult(requestCode, resultCode, data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void CheckBtIsOn() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\n if (!mBluetoothAdapter.isEnabled()) {\n Toast.makeText(getApplicationContext(), \"Bluetooth Disabled!\",\n Toast.LENGTH_SHORT).show();\n\n // Start activity to show bluetooth options\n Intent enableBtIntent = new Intent(mBluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"private void ensureBluetoothIsEnabled(){\r\n\t\t//if Bluetooth is not enabled, enable it now\r\n\t\tif (!mBtAdapter.isEnabled()) { \t\t\r\n \t enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n \t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n \t}\r\n\t}",
"private void enableBT() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else if (!bluetoothAdapter.isEnabled()) {\n bluetoothAdapter.enable();\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n mCheckBt = false;\n if (requestCode == REQUEST_ENABLE_BT && resultCode != RESULT_OK) {\n// mScanButton.setEnabled(false);\n Toast.makeText(this, getString(R.string.bluetooth_not_enabled), Toast.LENGTH_LONG).show();\n }\n }",
"private void checkBTState() {\n if(bluetoothAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not supported\");\n } else {\n if (!bluetoothAdapter.isEnabled()) {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if (btAdapter == null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getBaseContext(), \"Device does not support bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\n if(btAdapter==null) {\n Toast.makeText(getContext(), \"El dispositivo no soporta bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n if (btAdapter.isEnabled()) {\n } else {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void turnOnBT() {\n\t\tIntent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\tstartActivityForResult(intent, 1);\n\t}",
"private void promptForBT() {\n Intent enableBTIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n mcordova.getActivity().startActivity(enableBTIntent);\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n if(btAdapter==null) {\n btState.setImageResource(R.drawable.ic_action_off);\n errorExit(\"Fatal Error\", \"Bluetooth не поддерживается\");\n\n } else {\n if (btAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth включен...\");\n btState.setImageResource(R.drawable.ic_action_on);\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(btAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }\n }",
"private void checkBluetoothEnabled()\r\n {\r\n if (!mBluetoothAdapter.isEnabled())\r\n {\r\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBtIntent, BLUETOOTH_ENABLE_REQUEST_ID);\r\n } else\r\n checkNfcEnabled();\r\n }",
"public void checkBTState() {\n if(mAdapter==null) {\n errorExit(\"Fatal Error\", \"Bluetooth not support\");\n } else {\n if (mAdapter.isEnabled()) {\n Log.d(TAG, \"...Bluetooth ON...\");\n } else {\n //Prompt user to turn on Bluetooth\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n ((Activity) mContext).startActivityForResult(enableBtIntent, 1);\n }\n }\n }",
"private void checkBTState() {\n\t\tif (btAdapter == null) {\n\t\t\terrorExit(\"Fatal Error\", \"Bluetooth not support\");\n\t\t} else {\n\t\t\tif (btAdapter.isEnabled()) {\n\t\t\t\tLog.d(TAG, \"...Bluetooth ON...\");\n\t\t\t} else {\n\t\t\t\t// Prompt user to turn on Bluetooth\n\t\t\t\tIntent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableBtIntent, 1);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void askPermission() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth LE. Buy another phone.\");\n builder.setPositiveButton(android.R.string.ok, null);\n finish();\n }\n\n //Checking if the Bluetooth is on/off\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Uff\");\n builder.setMessage(\"This device does not support Bluetooth.\");\n builder.setPositiveButton(android.R.string.ok, null);\n } else {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 2);\n }\n }\n\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothAdapter.isEnabled()) {\n\n }\n }",
"private boolean BTEnabled() {\n if (!BT.isEnabled()) { // Ask user's permission to switch the Bluetooth adapter On.\n Intent enableIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n return false;\n } else {\n DisplayToast(\"Bluetooth is already on\");\n return true;\n }\n }",
"public boolean isBluetoothEnabled() {\n BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();\n if (bluetooth == null)\n return false;//\"device not BT capable\";\n return bluetooth.isEnabled();\n }",
"private void ensureBluetoothEnabled() {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(\n BluetoothAdapter.ACTION_REQUEST_ENABLE);\n main.startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n connectToBluetoothDevice(\"00:06:66:64:42:97\"); // Hard coded MAC of the BT-device.\n Log.i(tag, \"Connected to device!\");\n }\n }",
"void activateBlue(BluetoothAdapter bluetoothAdapter){\r\n if (!bluetoothAdapter.isEnabled()) {\r\n Intent enableBlueTooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n startActivityForResult(enableBlueTooth, REQUEST_CODE_ENABLE_BLUETOOTH);\r\n }\r\n }",
"public S<T> bluetooth(Boolean enable){\n\t\t \t \n\t\t\t BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n\t\t\t boolean isEnabled = bluetoothAdapter.isEnabled();\n\t\t\t if (enable && !isEnabled) {\n\t\t\t bluetoothAdapter.enable(); \n\t\t\t }\n\t\t\t else if(!enable && isEnabled) {\n\t\t\t bluetoothAdapter.disable();\n\t\t\t }\n\n\t\t return this;\n\t }",
"public void checkForBluetooth() {\n if (hasBluetoothSupport()) {\n ensureBluetoothEnabled();\n } else {\n showToast(\"Device does not support BlueTooth\");\n }\n }",
"private void checkEnableBt() {\n if (mBtAdapter == null || !mBtAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"static void toggle(Context context) {\n Log.i(TAG, \"toggle Bluetooth\");\n\n // Just toggle Bluetooth power, as long as we're not already in\n // an intermediate state.\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n int state = adapter.getState();\n if (state == BluetoothAdapter.STATE_OFF)\n adapter.enable();\n else if (state == BluetoothAdapter.STATE_ON)\n adapter.disable();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // if user chooses not to enable Bluetooth.\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n showToast(\"Bluetooth is required for this application to work\");\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }",
"public void checkBluetooth(BluetoothAdapter bluetoothAdapter){\n if(bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n }",
"@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }",
"@Override\r\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n Log.v(TAG, \"** onActivityResult **\");\r\n // determine from which activity\r\n switch (requestCode) {\r\n // if it was the request to enable Bluetooth:\r\n case REQUEST_ENABLE_BT:\r\n if (resultCode == Activity.RESULT_OK) {\r\n // Bluetooth is enabled now\r\n Log.v(TAG, \"** Bluetooth is now enabled**\");\r\n } else {\r\n // user decided not to enable Bluetooth so exit application\r\n Log.v(TAG, \"** Bluetooth is NOT enabled**\");\r\n Toast.makeText(this, \"Bluetooth not enabled\",\r\n Toast.LENGTH_LONG).show();\r\n finish();\r\n }\r\n }\r\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t if(btAdapt.isEnabled()){\n\t\t \tbtAdapt.disable();\n\t\t }else {\n\t\t\t\tIntent intent =new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}",
"private boolean isBtConnected(){\n \treturn false;\n }",
"private void validateBleSupport() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Snackbar.make(txtStatus, \"No LE Support.\", Snackbar.LENGTH_LONG).show();\n } else {\n\n /*\n * We need to enforce that Bluetooth is first enabled, and take the\n * user to settings to enable it if they have not done so.\n */\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n .getDefaultAdapter();\n\n if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"onResume: Bluetooth is disabled\");\n //Bluetooth is disabled, request enabling it\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivity(enableBtIntent);\n }\n }\n\n }",
"@Override\n public void onClick(View v) {\n if (mBluetoothConnection.isConnected()) {\n mBluetoothConnection.changeState(BluetoothConnection.STATE_IMAGE_RECEIVING);\n mBluetoothConnection.write(\"open_settings\");\n buttonSettings.setEnabled(false);\n } else {\n Toast.makeText(getBaseContext(), \"Device not connected\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n // user didn't want to turn on BT\n if (requestCode == ENABLE_BT_REQUEST_ID) {\n if(resultCode == Activity.RESULT_CANCELED) {\n btDisabled();\n return;\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"private boolean BluetoothAvailable()\n {\n if (BT == null)\n return false;\n else\n return true;\n }",
"private void getBluetoothState() {\r\n\r\n\t\t if (bluetoothAdapter == null) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth NOT supported\");\r\n\t\t } else if (!(bluetoothAdapter.isEnabled())) {\r\n\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is NOT Enabled!\");\r\n\t\t\t Intent enableBtIntent = new Intent(\r\n\t\t\t\t\t BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\r\n\t\t\t getBluetoothState();\r\n\t\t }\r\n\r\n\t\t if (bluetoothAdapter.isEnabled()) {\r\n\r\n\t\t\t if (bluetoothAdapter.isDiscovering()) {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is currently in device discovery process.\");\r\n\t\t\t } else {\r\n\t\t\t\t bluetoothStatusSetup.setText(\"Bluetooth is Enabled.\");\r\n\t\t\t }\r\n\t\t }\r\n\t }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"onActivityResult called\");\n\n if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n\n // User choose NOT to enable Bluetooth.\n mAlertBlue = null;\n showNegativeDialog(getResources().getString(R.string.blue_error_title),\n getResources().getString(R.string.blue_error_msg)\n );\n\n } else {\n\n // User choose to enable Bluetooth.\n mAlertBlue = null;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n verifyPermissions(mActivity);\n else {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n scanLeDevice(true);\n }\n }\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkBluetooth() {\n\t\tboolean flag = oTest.checkBluetooth();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"void bluetoothDeactivated();",
"@Override public void onClick(View v) {\n startActivity(new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE));\n }",
"public boolean checkBluetooth() {\n if (!mActivity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(mActivity, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n }\n\n // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to\n // BluetoothAdapter through BluetoothManager.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) mActivity.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n // Checks if Bluetooth is supported on the device.\n if (mBluetoothAdapter == null) {\n Toast.makeText(mActivity, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }",
"private boolean hasBluetoothSupport() {\n mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n return (mBluetoothAdapter != null);\n }",
"private void turnOn(View v) {\n bluetoothAdapter.enable();\n }",
"private void resetBluetooth() {\n if (mBtAdapter != null) {\n mBtAdapter.disable();\n mHandler.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n checkEnableBt();\n }\n }, 200);\n\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif(resultCode == RESULT_CANCELED) {\n\t\t\tToast.makeText(getApplicationContext(), \"Bluetooth must be enabled to continue\", Toast.LENGTH_SHORT).show();\n\t\t\tfinish();\n\t\t}\n\t}",
"public boolean mBTInit1(){\n //Initialize the bluetooth adapter\n if (oBTadapter !=null) return true ;\n oBTadapter = BluetoothAdapter.getDefaultAdapter();\n return (oBTadapter != null);\n }",
"public boolean mBT_PickDevice2(){ //Will change sRemoteDeviceName\n if (oBTadapter==null) return false;\n bDevicePickerActive=true;\n oBTadapter.startDiscovery();\n {\n Intent intent = new Intent(\"android.bluetooth.devicepicker.action.LAUNCH\");\n mContext.startActivity(intent); //startActivityForResult\n }\n mSleep(1000);\n return true;\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_ENABLE_BT:\n\t\t\tif(resultCode != RESULT_OK){\n\t\t\t\tToast.makeText(this, \"An error occured while enabling BT.\", Toast.LENGTH_LONG).show();\n\t\t\t\thasBTenabled = false;\n\t\t\t\tfinish();\n\t\t\t}else{\n\t\t\t\tsetupBTService();\n\t\t\t\tupdateBluetoothList();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase BT_SETTINGS_RESULT:\n\t\t\tupdateBluetoothList();\n\t\t\tbreak;\n\t\t\t\n case REQUEST_CONNECT_DEVICE_SECURE:\n // When DeviceListActivity returns with a device to connect\n if (resultCode == Activity.RESULT_OK) {\n connectDevice(data, true);\n }\n break;\n\t\t}\n\t}",
"private Bluetooth() {}",
"void setBluetoothService(BluetoothService bluetoothService);",
"public boolean setBluetoothEnabled(boolean enabled) {\n return isBluetoothAvailable() && (enabled ? mBluetoothAdapter.enable()\n : mBluetoothAdapter.disable());\n }",
"public void onActivityResult(int requestCode, int resultCode, Intent data){\r\n \tif(!mBtAdapter.isEnabled()){\r\n\t\t\tToast.makeText(this, \"Please ensure bluetooth is enabled!\", Toast.LENGTH_LONG).show();\r\n\r\n\t\t\tIntent finishIntent = new Intent();\r\n finishIntent.putExtra(EXTRA_DEVICE_ADDRESS, \"finish\");\r\n setResult(RESULT_BT_NOT_ENABLED, finishIntent);\r\n\t\t\tBluetoothActivity.this.finish();\r\n\t\t}\r\n }",
"private void btnFindDevicesClicked(Intent intent, int findDeviceRequest)\n {\n if (btAdapter.isEnabled()) startActivityForResult(intent, findDeviceRequest);\n // Else display error until bluetooth is enabled\n else\n {\n Toast.makeText(getApplicationContext(), \"Enable Bluetooth to continue\", Toast.LENGTH_SHORT).show();\n setUpBluetooth();\n }\n }",
"private void checkBleSupportAndInitialize() {\n Log.d(TAG, \"checkBleSupportAndInitialize: \");\n // Use this check to determine whether BLE is supported on the device.\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(TAG,\"device_ble_not_supported \");\n Toast.makeText(this, R.string.device_ble_not_supported,Toast.LENGTH_SHORT).show();\n return;\n }\n // Initializes a Blue tooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n if (mBluetoothAdapter == null) {\n // Device does not support Blue tooth\n Log.d(TAG, \"device_ble_not_supported \");\n Toast.makeText(this,R.string.device_ble_not_supported, Toast.LENGTH_SHORT).show();\n return;\n }\n\n //打开蓝牙\n if (!mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"open bluetooth \");\n bluetoothUtils.openBluetooth();\n }\n }",
"public BlueMeshServiceBuilder bluetooth( boolean enabled ){\n bluetoothEnabled = enabled;\n return this;\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n \n Log.d(TAG, \"onActivityResult \" + resultCode);\n switch (requestCode) {\n //for now, only dealiing with insecure connection\n //i don't think its possible to have secure connections with a serial profile\n case REQUEST_CONNECT_DEVICE_INSECURE:\n if(resultCode == Activity.RESULT_OK){\n setupBluetooth();//since BT is enabled, setup client service\n connectToDevice(data, false);\n }\n else\n setStatus(BluetoothClientService.STATE_NONE);\n break;\n case REQUEST_ENABLE_BT:\n // When the request to enable Bluetooth returns\n if (resultCode == Activity.RESULT_OK) {\n Toast.makeText(this, \"Bluetooth is now enabled\", Toast.LENGTH_SHORT).show();\n }\n else {\n // User did not enable Bluetooth or an error occurred\n Log.d(TAG, \"BT not enabled\");\n Toast.makeText(this, R.string.bt_not_enabled_leaving, Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n }",
"private void initPlugin() {\n if (bluetoothAdapter == null) {\n Log.e(LOG_TAG, \"Bluetooth is not supported\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is supported\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBT = true;\");\n\n //test if BLE supported\n if (!mcordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.e(LOG_TAG, \"BluetoothLE is not supported\");\n } else {\n Log.e(LOG_TAG, \"BluetoothLE is supported\");\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.hasBTLE = true;\");\n }\n \n // test if BT is connected to a headset\n \n if (bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED ) {\n Log.e(LOG_TAG, \" Bluetooth connected to headset\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.connected');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not connected to a headset \" + bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET));\n }\n\n //test if BT enabled\n if (bluetoothAdapter.isEnabled()) {\n Log.e(LOG_TAG, \"Bluetooth is enabled\");\n\n sendJS(\"javascript:cordova.plugins.BluetoothStatus.BTenabled = true;\");\n sendJS(\"javascript:cordova.fireWindowEvent('BluetoothStatus.enabled');\");\n } else {\n Log.e(LOG_TAG, \"Bluetooth is not enabled\");\n }\n }\n }",
"@Override\n public void onClick(View v)\n {\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n if (clicked) {\n registerDevicesBtn.setText(\"Register Devices\");\n clicked = false;\n mBluetoothAdapter.cancelDiscovery();\n Log.d(\"BT\", \"Cancelled task.\");\n } else {\n registerDevicesBtn.setText(\"Stop Registering Devices\");\n clicked = true;\n devices = new ArrayList<>();\n mBluetoothAdapter.startDiscovery();\n Log.d(\"BT\", \"Started task.\");\n }\n }",
"public void selectBluetoothDevice(String selectedItem) {\n String[] stringParts = selectedItem.split(\"\\n\");\n\n if (stringParts.length == 2) {\n\n // The Bluetooth ID is: stringParts[1]\n\n // Activate the Bluetooth Input/Output steams\n if (activateBluetoothStreams(stringParts[1])) {\n\n // The device was selected successfully. Start the Robot Activity\n startControlRobotActivity();\n\n }\n else{\n Toast.makeText(getApplicationContext(), \"Selected Bluetooth device was not enabled.\",\n Toast.LENGTH_LONG).show();\n }\n\n }\n else\n {\n Toast.makeText(getApplicationContext(), \"There was a problem selecting a Device.\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }",
"@Override\n public void onResume(){\n Log.i(TAG, \"-- ON RESUME --\");\n super.onResume();\n // If BT is not on, request that it be enabled.false\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n }",
"public static void checkPhoneSettings(Activity activity){\n\t\tif (mBluetoothAdapter == null) {\n\t\t //!TODO\n\t\t} else {\n\t\t\tLog.v(\"\", \"Bluetooth is supported\");\n\t\t\t//Check if bluetooth is enabled. If not, request the user to enable it.\n\t\t\tif (!mBluetoothAdapter.isEnabled()) {\n\t\t\t\tLog.v(\"\", \"Bluetooth is not turned on\");\n\t\t\t Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t activity.startActivityForResult(enableBtIntent,REQUEST_ENABLE_BT);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n //选中\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n checkBluetooth.setChecked(true);\n } else {\n checkBluetooth.setChecked(false);\n //取消选中\n mBluetoothAdapter.disable();//关闭蓝牙\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.ble_button) {\n enableDisableBT();\n return true;\n }\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n\n if (id == R.id.ble_button_startConnection) {\n //startConnection();\n return true;\n }\n\n if (id == R.id.btnDiscoverable_on_off) {\n Log.d(TAG, \"btnEnableDisable_Discoverable: Making device discoverable for 300 seconds.\");\n\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n startActivity(discoverableIntent);\n\n IntentFilter intentFilter = new IntentFilter(mBluetoothAdapter.ACTION_SCAN_MODE_CHANGED);\n registerReceiver(mBroadcastReceiver2,intentFilter);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"public static boolean getBluetoothAdapterIsEnabled() {\n\t\treturn mBluetoothAdapterIsEnabled;\n\t}",
"private void setupBluetooth() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n bluetoothAdapter = bluetoothManager.getAdapter();\n\n // Ensures Bluetooth is available on the device and it is enabled. If not,\n // displays a dialog requesting user permission to enable Bluetooth.\n if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, 1);\n }\n\n Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();\n\n if (pairedDevices.size() > 0) {\n // There are paired devices. Get the name and address of each paired device.\n for (BluetoothDevice device : pairedDevices) {\n String deviceName = device.getName();\n String deviceHardwareAddress = device.getAddress(); // MAC address\n String deviceType = device.getBluetoothClass().getDeviceClass() + \"\";\n\n Movie movie = new Movie(deviceName, deviceHardwareAddress, deviceType);\n movieList.add(movie);\n\n }\n\n mAdapter.notifyDataSetChanged();\n }\n }",
"public boolean mBTOpen1() {\n if (oBTadapter == null){ //Prepare BT\n return mBTInit1();\n }else if (oBTadapter.isEnabled()) { //BT port is ready , Running return\n return true;\n }else { //Try to open BT port\n mMsgLog(\"Turning on the Bluetooth\");\n isOpenedByMe = true;\n oBTadapter.enable(); //Turn on bluetooth if not already active\n mSleep(1000);\n if (oBTadapter.isEnabled()) {\n return true;\n }\n }\n return false;\n }",
"public void onStart(){ \r\n\t\t//ensure bluetooth is enabled \r\n\t\tensureBluetoothIsEnabled();\r\n\t\tsuper.onStart(); \t\r\n\t}",
"public void findBluetooth() {\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (mBluetoothAdapter == null) {\n // Device does not support Bluetooth\n btStatusDisplay.setText(\"Device does not support Bluetooth\");\n }\n btStatusDisplay.setText(\"Trying to connect...\");\n\n /** Pops up request to enable if found not enabled */\n if (!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n /** Get reference to scale as Bluetooth device \"mmDevice\" */\n Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n if (device.getName().equals(\"BLUE\")) {\n mmDevice = device;\n btStatusDisplay.setText(\"Bluetooth device found\");\n break;\n }\n }\n }\n }",
"@Override\n\t\tpublic void onCreateContextMenu(ContextMenu menu, View v,\n\t\t\t\tContextMenuInfo menuInfo) \n\t\t{\n\t\t\tif(!btAdapter.isEnabled())\n\t\t\t{\n\t\t\t\tbtAdapter.enable();\n\t\t\t\twhile(btAdapter.getState() != BluetoothAdapter.STATE_ON);\n\t\t\t}\n\t\t\t\n\t\t\tsuper.onCreateContextMenu(menu, v, menuInfo);\n\t\t\tString device_info = (String) ((ListView)v).getItemAtPosition(((AdapterContextMenuInfo) menuInfo).position).toString();\n\t\t\tmBtDevName = device_info.split(\"\\n\")[0];\n\t\t\tmBtDevChosen = device_info.substring(device_info.length()-17);\n\t\t\tmenu.setHeaderTitle(mBtDevName);\n\t\t\tBluetoothDevice device = btAdapter.getRemoteDevice(mBtDevChosen);\n\t\t\tmenu.clear();\n\t\t\tif(device.getBondState() == BluetoothDevice.BOND_BONDED)\n\t\t\t{\n\t\t\t\tmenu.add(\"Cancel Paired\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmenu.add(\"Pair and Connect\");\n\t\t\t}\n\t\t}",
"public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }",
"public void initBT() {\n\n\t\tStatusBox.setText(\"Connecting...\");\n\t\tLog.e(TAG, \"Connecting...\");\n\t\t\n\t\tif (D) {\n\t\t\tLog.e(TAG, \"+ ON RESUME +\");\n\t\t\tLog.e(TAG, \"+ ABOUT TO ATTEMPT CLIENT CONNECT +\");\n\t\t}\n\t\t\n\t\t//If Mac Address is null then stop this process and display message\n\t\tif(MAC_ADDRESS == \"\"){\n\t\t\tLog.e(TAG,\"No MAC Address Found...\");\n\t\t\tToast.makeText(getApplicationContext(), \"No Mac Address found. Please Enter using button.\",Toast.LENGTH_SHORT );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// When this returns, it will 'know' about the server,\n\t\t// via it's MAC address.\n\t\tBluetoothDevice device = null;\n\t\ttry {\n\t\t\tdevice = mBluetoothAdapter.getRemoteDevice(MAC_ADDRESS);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tToast.makeText(getApplicationContext(), \"NOT Valid BT MAC Address\", Toast.LENGTH_SHORT);\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\t// returns firefly e350\n\t\tLog.e(TAG, \"device name: \" + device.getName());\n\n\t\t// We need two things before we can successfully connect\n\t\t// (authentication issues aside): a MAC address, which we\n\t\t// already have, and an RFCOMM channel.\n\t\t// Because RFCOMM channels (aka ports) are limited in\n\t\t// number, Android doesn't allow you to use them directly;\n\t\t// instead you request a RFCOMM mapping based on a service\n\t\t// ID. In our case, we will use the well-known SPP Service\n\t\t// ID. This ID is in UUID (GUID to you Microsofties)\n\t\t// format. Given the UUID, Android will handle the\n\t\t// mapping for you. Generally, this will return RFCOMM 1,\n\t\t// but not always; it depends what other BlueTooth services\n\t\t// are in use on your Android device.\n\t\ttry {\n\t\t\t\n\t\t\tint currentapiVersion = android.os.Build.VERSION.SDK_INT;\n\t\t\t\n\t\t\t//RFCOMM connection varies depending on android version. Fixes bug in Gingerbread and newer where always asks for BT Pairing code.\n\t\t\tif (currentapiVersion >= android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android >= 2.3.3\n\t\t\t\tbtSocket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t} else if (currentapiVersion < android.os.Build.VERSION_CODES.GINGERBREAD_MR1){\n\t\t\t\t//used in android < 2.3.3\n\t\t\t\tbtSocket = device.createRfcommSocketToServiceRecord(MY_UUID);\n\t\t\t}\n\t\t\t\n\t\t\tLog.e(TAG, \"ON RESUME: Socket created!\");\n\t\t\n\t\t\n\t\t\t// Discovery may be going on, e.g., if you're running a\n\t\t\t// 'scan for devices' search from your handset's Bluetooth\n\t\t\t// settings, so we call cancelDiscovery(). It doesn't hurt\n\t\t\t// to call it, but it might hurt not to... discovery is a\n\t\t\t// heavyweight process; you don't want it in progress when\n\t\t\t// a connection attempt is made.\n\t\t\tmBluetoothAdapter.cancelDiscovery();\n\n\t\t\tmyBT = new ConnectedThread(btSocket);\n\t\t\t\n\t\t\t\n\t\t\t// don't write to the streams unless they are created\n\t\t\tif (myBT.BTconnStatus) {\n\t\t\t\t\n\t\t\t\tStatusBox.setText(\"CONNECTED\");\n\t\t\t\tLog.e(TAG, \"CONNECTED\");\n\t\t\t\t\n\t\t\t\t// ST,255 enables remote configuration forever...need this if\n\t\t\t\t// resetting\n\t\t\t\t// PIO4 is held high on powerup then toggled 3 times to reset\n\n\t\t\t\t// GPIO Commands to BT device page 15 of commands datasheet\n\t\t\t\tbyte[] cmdMode = { '$', '$', '$' };\n\t\t\t\tmyBT.write(cmdMode);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S@,8080 temp sets GPIO-7 to an output\n\t\t\t\tbyte[] cmd1 = { 'S', '@', ',', '8', '0', '8', '0', 13 };\n\n\t\t\t\t// S%,8080 perm sets GPIO-7 to an output on powerup. only done once\n\t\t\t\t// byte [] cmd1 = {'S','%',',','8','0','8','0',13};\n\n\t\t\t\tmyBT.write(cmd1);\n\t\t\t\tmyBT.run();\n\n\t\t\t\t// S&,8000 drives GPIO-7 low\n\t\t\t\t// byte [] cmd2 = {'S','^',',','8','0','0','0',13};\n\n\t\t\t\t// make it so cmd mode won't timeout even after factory reset\n\t\t\t\tbyte[] cmd3 = { 'S', 'T', ',', '2', '5', '5', 13 };\n\t\t\t\tmyBT.write(cmd3);\n\t\t\t\tmyBT.run();\n\n\t\t\t} else {\n\t\t\t\t//StatusBox.setText(\"NOT Connected\");\t\n\t\t\t\tLog.e(TAG, \"NOT Connected\");\n\t\t\t}\n\t\t\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\tif (D)\n\t\t\t\tLog.e(TAG, \"ON RESUME: Socket creation failed.\", e);\n\t\t}\n\n\t\t\n\t\t\n\t}",
"private void setupBluetooth() throws NullPointerException{\n if( Utils.isOS( Utils.OS.ANDROID ) ){\n \t\n // Gets bluetooth hardware from phone and makes sure that it is\n // non-null;\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n \n // If bluetooth hardware does not exist...\n if (adapter == null) {\n Log.d(TAG, \"BluetoothAdapter is is null\");\n throw new NullPointerException(\"BluetoothAdapter is null\");\n } else {\n Log.d(TAG, \"BluetoothAdapter is is non-null\");\n }\n \n bluetoothName = adapter.getName();\n \n //TODO: restart bluetooth?\n \t\n try {\n bluetoothConnectionThreads.add( new ServerThread(adapter, router, uuid) );\n } catch (NullPointerException e) {\n throw e;\n }\n if (Constants.DEBUG)\n Log.d(TAG, \"Sever Thread Created\");\n // Create a new clientThread\n bluetoothConnectionThreads.add( new ClientThread(adapter, router, uuid) );\n if (Constants.DEBUG)\n Log.d(TAG, \"Client Thread Created\");\n }\n else if( Utils.isOS( Utils.OS.WINDOWS ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.LINUX ) ){\n //TODO: implement this\n }\n else if( Utils.isOS( Utils.OS.OSX ) ){\n //TODO: implement this\n }\n else{\n //TODO: throw exception?\n }\n \n }",
"private void onEnableBluetoothResponse(int resultCode) {\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tlogger.debug(\"onEnableBluetoothResponse(): Bluetooth enabled. Starting Workout Service.\");\n\t\t\tworkoutServiceIntent = new Intent(this, WorkoutService.class);\n\t\t\tstartService(workoutServiceIntent);\n\t\t\tbindService(workoutServiceIntent, workoutServiceConn, BIND_AUTO_CREATE);\n\t\t}\n\n\t\telse {\n\t\t\tlogger.warn(\"onEnableBluetoothResponse(): User elected not to enable Bluetooth. Activity will now finish.\");\n\t\t\tfinish();\n\t\t}\n\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == REQ_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {\n finish();\n return;\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\n\t\t\tfinish();\n\t\t\treturn;\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\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 ResultDevice(ArrayList<BluetoothDevice> deviceList) {\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 ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"public void bluetooth_enable_discoverability()\r\n {\n\t\t\r\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\r\n\t\tdiscoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\r\n\t\tLoaderActivity.m_Activity.startActivity(discoverableIntent);\r\n\t\tserver_connect_thread = new Server_Connect_Thread();\r\n\t\tserver_connect_thread.start();\r\n\t\tmessages.clear();\r\n }",
"public void onToggleClicked(View view) {\n boolean on = ((ToggleButton) view).isChecked();\n if (on) {\n if (!BA.isEnabled()) {\n Intent turnOn = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(turnOn, 0);\n Toast.makeText(getApplicationContext(), \"Turned on\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Already on\", Toast.LENGTH_LONG).show();\n }\n } else {\n BA.disable();\n Toast.makeText(getApplicationContext(), \"Turned off\", Toast.LENGTH_LONG).show();\n }\n }",
"private void selectAvailableDevices() {\n\n ArrayList deviceStrs = new ArrayList();\n final ArrayList<String> devices = new ArrayList();\n\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n // checking and enabling bluetooth\n if (!btAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n } else {\n btAdapter = BluetoothAdapter.getDefaultAdapter();\n Set<BluetoothDevice> pairedDevices = btAdapter.getBondedDevices();\n if (pairedDevices.size() > 0) {\n for (BluetoothDevice device : pairedDevices) {\n deviceStrs.add(device.getName() + \"\\n\" + device.getAddress());\n devices.add(device.getAddress());\n }\n }\n\n // show a list of paired devices to connect with\n final AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.select_dialog_singlechoice,\n deviceStrs.toArray(new String[deviceStrs.size()]));\n alertDialog.setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n int position = ((AlertDialog) dialog).getListView().getCheckedItemPosition();\n String deviceAddress = devices.get(position);\n setDeviceAddress(deviceAddress);\n chosen = true;\n //notify user for ongoing connection\n launchRingDialog();\n\n }\n });\n\n alertDialog.setTitle(R.string.blueChose);\n alertDialog.show();\n }\n }",
"public void scanBleDevice(Boolean enable);",
"public boolean enableService() {\n \tlog_d( \"enabledService()\" );\n \tshowTitleNotConnected();\n\t\t// no action if debug\n if ( BT_DEBUG_SERVICE ) return false;\n // If BT is not on, request that it be enabled.\n // setupChat() will then be called during onActivityResult\n if ( !mBluetoothAdapter.isEnabled() ) {\n\t\t\t// startActivity Adapter Enable\n\t\t\treturn true;\n // Otherwise, setup the chat session\n } else {\n initService();\n }\n return false;\n }",
"private void setDiscoverableBt() {\n\t\tIntent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n\t\tdiscoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, MADN3SCamera.DISCOVERABLE_TIME);\n\t\tstartActivity(discoverableIntent);\n\t}",
"@Override\r\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == REQUEST_ENABLE_BT\r\n\t\t\t\t&& resultCode == Activity.RESULT_CANCELED) {\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\r\n\t}",
"public void connect(View v) {\n turnOn(v);\n startActivity(new Intent(Settings.ACTION_BLUETOOTH_SETTINGS));\n Toast.makeText(getApplicationContext(), \"Select device\", Toast.LENGTH_LONG).show();\n System.err.println(bluetoothAdapter.getBondedDevices());\n }",
"@Override\n public IBinder onBind(Intent intent) {\n\n AppConstants.RebootHF_reader = false;\n if (mBluetoothLeService != null) {\n final boolean result = mBluetoothLeService.connect(mDeviceAddress);\n Log.d(TAG, \"Connect request result=\" + result);\n }\n\n\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\n if (bluetoothAdapter == null) {\n //Display a toast notifying the user that their device doesn’t support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device doesn’t support Bluetooth\", Toast.LENGTH_LONG).show();\n } else {\n //If BluetoothAdapter doesn’t return null, then the device does support Bluetooth//\n Toast.makeText(getApplicationContext(), \"This device does support Bluetooth\", Toast.LENGTH_LONG).show();\n }\n }",
"public void connect_bt(String deviceAddress) {\n Intent intent = new Intent(\"OBDStatus\");\n intent.putExtra(\"message\", \"Trying to connect with device\");\n context.sendBroadcast(intent);\n disconnect();\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n btAdapter.cancelDiscovery();\n if (deviceAddress == null || deviceAddress.isEmpty()) {\n intent.putExtra(\"message\", \"Device not found\");\n context.sendBroadcast(intent);\n return;\n }\n\n if (!btAdapter.isEnabled()) {\n intent.putExtra(\"message\", \"Bluetooth is disabled\");\n context.sendBroadcast(intent);\n return;\n }\n\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n\n try {\n socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n isConnected = true;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (IOException e) {\n Log.e(\"gping2\", \"There was an error while establishing Bluetooth connection. Falling back..\", e);\n Class<?> clazz = socket.getRemoteDevice().getClass();\n Class<?>[] paramTypes = new Class<?>[]{Integer.TYPE};\n BluetoothSocket sockFallback = null;\n try {\n Method m = clazz.getMethod(\"createInsecureRfcommSocket\", paramTypes);\n Object[] params = new Object[]{Integer.valueOf(1)};\n sockFallback = (BluetoothSocket) m.invoke(socket.getRemoteDevice(), params);\n sockFallback.connect();\n isConnected = true;\n socket = sockFallback;\n intent.putExtra(\"message\", \"OBD connected\");\n context.sendBroadcast(intent);\n } catch (Exception e2) {\n intent.putExtra(\"message\", \"OBD Connection error\");\n context.sendBroadcast(intent);\n Log.e(\"gping2\", \"BT connect error\");\n }\n }\n this.deviceAddress = deviceAddress;\n saveNewAddress();\n }",
"private void connectToAdapter() {\n if (chosen) {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);\n UUID uuid = UUID.fromString(\"00001101-0000-1000-8000-00805F9B34FB\");\n // creation and connection of a bluetooth socket\n try {\n BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);\n socket.connect();\n setBluetoothSocket(socket);\n connected = true;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n connect.setText(\"Disconnect\");\n connect.setTextColor(Color.RED);\n }\n });\n } catch (IOException e) {\n Log.d(\"Exception\", \"Bluetooth IO Exception c\");\n connected = false;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(currContext, R.string.cannotConnect, Toast.LENGTH_SHORT).show();\n connect.setText(\"Connect\");\n connect.setTextColor(Color.BLACK);\n mode.setEnabled(true);\n }\n });\n }\n }\n if (bluetoothSocket.getRemoteDevice().getAddress() != null)\n Log.d(TAG, \"Bluetooth connected\");\n Log.d(TAG, \"Device address: \" + bluetoothSocket.getRemoteDevice().getAddress());\n initializeCom();\n }",
"private void searchDeviceOrOpenBluetooth() {\n if (!BtUtil.isOpen(bluetoothAdapter)) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, OPEN_BLUETOOTH_REQUEST);\n } else {\n BtUtil.searchDevices(bluetoothAdapter);\n }\n }",
"public void buttonClick_connect(View view)\n\t{\n\t\tAppSettings.showConnectionLost = false;\n\t\tLog.i(TAG, \"showConnectionLost = false\");\n\t\t\n\t\tAppSettings.bluetoothConnection = new BluetoothConnection(this.getApplicationContext(), this.btConnectionHandler);\n\t\tBluetoothAdapter btAdapter = AppSettings.bluetoothConnection.getBluetoothAdapter();\n\t\t\n\t\t// If the adapter is null, then Bluetooth is not supported\n if (btAdapter == null) {\n \tToast.makeText(getApplicationContext(), R.string.bt_not_available, Toast.LENGTH_LONG).show();\n }\n else {\n \t// If Bluetooth is not on, request that it be enabled.\n if (!btAdapter.isEnabled()) {\n Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableIntent, REQUEST_ENABLE_BT);\n }\n else {\n \t// Launch the DeviceListActivity to see devices and do scan\n Intent serverIntent = new Intent(getApplicationContext(), DeviceListActivity.class);\n startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE);\n }\n }\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Bluetooth_14_feb receiveObj = (Bluetooth_14_feb) context.getApplicationContext();\n boolean appActive = receiveObj.isActivityVisible();\n //int appActive = receiveObj.getActivityCount();\n //Log.d(TAG,\"onReceive:receiver\");\n String action = intent.getAction(); // Get intent's action string\n Bundle extras = intent.getExtras();\n\n if (extras == null) return; // All intents of interest have extras.\n\n\n switch (action) {\n case \"android.bluetooth.adapter.action.STATE_CHANGED\": {\n\n int state = extras.getInt(\"android.bluetooth.adapter.extra.STATE\", FAIL);\n switch (state) {\n case BluetoothAdapter.STATE_OFF: \n if (!appActive) {\n\n Toast.makeText(context,\"Bluetooth:OFF\",Toast.LENGTH_SHORT).show();\n\n }\n else{\n\n Intent inten = new Intent(context,ConnectivityDialog.class);\n inten.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(inten);\n //num=1;\n\n }\n\n break;\n \n case BluetoothAdapter.STATE_ON:\n\n\n if(!appActive) {\n Log.d(TAG,\"state-on-appactive\");\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n else{\n\n Intent i = new Intent(\"FINISH\");\n //i.setAction(\"FINISH\");\n context.sendBroadcast(i);\n Toast.makeText(context, \"Bluetooth:ON\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n break;\n\n }\n\n }\n }\n }",
"public boolean initialize() {\n // For API level 18 and above, get a reference to BluetoothAdapter through\n // BluetoothManager.\n if (mBluetoothManager == null) {\n mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n if (mBluetoothManager == null) {\n Log.e(TAG, \"Unable to initialize BluetoothManager.\");\n return false;\n }\n }\n\n mBluetoothAdapter = mBluetoothManager.getAdapter();\n if (mBluetoothAdapter == null) {\n Log.e(TAG, \"Unable to obtain a BluetoothAdapter.\");\n return false;\n }\n\n return true;\n }",
"private void connectBluetooth() {\n try {\n if (blueTooth == null && macSet) {\n Log.d(\"lol\", \"macSet connect bluetooootooththoth\");\n blueTooth = new BluetoothConnection(macAddress, this, listener);\n blueTooth.connect();\n }\n } catch (Exception e) {\n Log.d(\"lol\", \"Failed connection: \" + e.getMessage() + \" \" + e.getClass());\n }\n }",
"private void turnOff(View v) {\n bluetoothAdapter.disable();\n }",
"public void buzzer(boolean status){\r\n byte newSetting = 0;\r\n if (status){\r\n newSetting = 0x44;// bit 6=led, bit 2=buzzer\r\n }\r\n else { \r\n newSetting = 0; // all Off\r\n }\r\n cardReader.writeUserPort(handle,newSetting); \r\n }"
] | [
"0.7650261",
"0.7547091",
"0.7532929",
"0.75132984",
"0.74813044",
"0.7480912",
"0.74771357",
"0.7413806",
"0.74061507",
"0.73742604",
"0.73549414",
"0.7330556",
"0.72960126",
"0.7292119",
"0.7205935",
"0.7159179",
"0.7148495",
"0.7126613",
"0.70884466",
"0.7071646",
"0.70162326",
"0.70094526",
"0.6991506",
"0.6974745",
"0.6953748",
"0.6864472",
"0.68193495",
"0.67767894",
"0.6748941",
"0.6716733",
"0.67101234",
"0.668535",
"0.6679166",
"0.6673968",
"0.6669872",
"0.6630745",
"0.66027665",
"0.6602627",
"0.65899503",
"0.6586186",
"0.65335727",
"0.65014833",
"0.6498284",
"0.6495089",
"0.64819247",
"0.6464655",
"0.6371742",
"0.6297628",
"0.6293445",
"0.6287349",
"0.6263917",
"0.6263124",
"0.6257663",
"0.6257519",
"0.6248685",
"0.62478775",
"0.62417287",
"0.62305754",
"0.62131196",
"0.62064075",
"0.6192835",
"0.6185858",
"0.61478895",
"0.6120393",
"0.60864806",
"0.60810834",
"0.60810804",
"0.6054316",
"0.6042119",
"0.6025917",
"0.6013391",
"0.6008608",
"0.6002006",
"0.60005975",
"0.59926254",
"0.5988394",
"0.5985888",
"0.597961",
"0.59669673",
"0.59514517",
"0.59468234",
"0.5935035",
"0.593285",
"0.5932715",
"0.5926866",
"0.5916985",
"0.5886419",
"0.58849454",
"0.5883342",
"0.58704156",
"0.5838731",
"0.58222914",
"0.58213246",
"0.58172756",
"0.58141345",
"0.5800926"
] | 0.59774727 | 82 |
scanLeDevice() Scans for BLE devices only when scan is enabled. | private void scanLeDevice(final boolean enable) {
final ListView listView = findViewById(R.id.list);
/**
* Start scanning for a certain amount of time if scanning is enabled
* amount of time, else stop scanning.
*/
if (enable) {
// Stops scanning after a pre-defined scan period.
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
mScanning = false;
mBluetoothAdapter.stopLeScan(mLeScanCallback);
listView.setVisibility(View.VISIBLE);
}
}, SCAN_PERIOD);
mScanning = true;
listView.setVisibility(View.INVISIBLE);
mBluetoothAdapter.startLeScan(mLeScanCallback);
} else {
mScanning = false;
mBluetoothAdapter.stopLeScan(mLeScanCallback);
listView.setVisibility(View.VISIBLE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void scanLeDevice(boolean enabled) {\n\n if (enabled) {\n\n Log.v(TAG, \"SCANNING START\");\n\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n // if scanning stop previous scanning operation\n if (mScanning) {\n mScanning = false;\n mSwipeRefreshLayout.setRefreshing(false);\n mSwipeRefreshLayout.setEnabled(true);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Log.v(TAG, \"stopLeScan STOP scan is ended after SCAN_PERIOD\");\n mLeScanner.stopScan(mScanCallback);\n } else {\n mBluetoothAdapter.stopLeScan(mLeScanCallback);\n }\n\n mProgress.setVisibility(View.INVISIBLE);\n\n if (mLeDeviceListAdapter.getItemCount() == 0 && mAlertBlue == null && mAlertGps == null) {\n Log.v(TAG, \"NO DEVICES FOUND\");\n mNoDevice.setVisibility(View.VISIBLE);\n }\n }\n invalidateOptionsMenu();\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n mSwipeRefreshLayout.setRefreshing(true);\n mSwipeRefreshLayout.setEnabled(true);\n\n //setup the list of device and the adapter for the recycler view.\n bDevices = new ArrayList<>();\n mLeDeviceListAdapter = new LeDeviceAdapter(bDevices, R.layout.device_scan_row);\n mRecyclerView.setAdapter(mLeDeviceListAdapter);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Log.d(TAG, \"StartLeScan START NEW SCAN\");\n mLeScanner.startScan(null, mSettings, mScanCallback);\n } else {\n mBluetoothAdapter.startLeScan(mLeScanCallback);\n }\n\n } else {\n\n //stop the scan\n mScanning = false;\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Log.d(TAG, \"stopLeScan STOP scan is ended after SCAN_PERIOD\");\n //You can stop the scan only if the bluetooth is yet ON\n if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON)\n mLeScanner.stopScan(mScanCallback);\n } else {\n if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON)\n mBluetoothAdapter.stopLeScan(mLeScanCallback);\n }\n }\n invalidateOptionsMenu();\n }",
"public void scanBleDevice(Boolean enable);",
"private void scanLeDevice(final boolean enable)\n {\n //------------------------------------------------------------\n // If we're telling it to scan and we're not currently scanning\n // go ahead and start scan\n if ( enable && !scanning )\n {\n Toolbox.toast(getContext(), \"Starting BLE scan...\");\n\n //------------------------------------------------------------\n // Set a timer in x millis to stop the scan\n handler.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n Toolbox.toast(getContext(), \"Stopping BLE scan...\");\n scanning = false;\n bleAdapter.getBluetoothLeScanner().stopScan(myLECallback);\n Log.v(TAG, \"STOPPED SCANNING AUTOMATICALLY...\");\n }\n }, scanPeriod);\n\n //------------------------------------------------------------\n // Start scanning and attach the callback\n scanning = true;\n bleAdapter.getBluetoothLeScanner().startScan(myLECallback);\n Log.v(TAG, \"STARTED SCANNING...\");\n }\n else\n {\n scanning = false;\n bleAdapter.getBluetoothLeScanner().stopScan(myLECallback);\n Log.v(TAG, \"STOPPED SCANNING MANUALLY...\");\n }\n\n }",
"public void scan()\n {\n if (mEnable) {\n // TODO: Listener only gets new devices. Somehow callback him with already paired devices\n if(!mScanning) {\n mScanning = true;\n mBluetoothAdapter.startDiscovery();\n }\n }\n }",
"private void setupBLEScan() {\n if (Build.VERSION.SDK_INT >= 21) {//LOLLIPOP\n mLEScanner = mBluetoothAdapter.getBluetoothLeScanner();\n scanSettings = new ScanSettings.Builder()\n .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)\n .build();\n filters = new ArrayList<ScanFilter>();\n ScanFilter.Builder mBuilder = new ScanFilter.Builder();\n ByteBuffer mManufacturerData = ByteBuffer.allocate(23);\n ByteBuffer mManufacturerDataMask = ByteBuffer.allocate(24);\n byte[] uuid = getIdAsByte(UUID.fromString(\"B9407F30-F5F8-466E-AFF9-25556B575555\"));\n mManufacturerData.put(0, (byte) 0xBE);\n mManufacturerData.put(1, (byte) 0xAC);\n for (int i = 2; i <= 17; i++) {\n mManufacturerData.put(i, uuid[i - 2]);\n }\n for (int i = 0; i <= 17; i++) {\n mManufacturerDataMask.put((byte) 0x01);\n }\n mBuilder.setManufacturerData(76, mManufacturerData.array(), mManufacturerDataMask.array());\n ScanFilter mScanFilter = mBuilder.build();\n //TODO\n //filters.add(mScanFilter);\n\n }\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, bleScannerListener);\n bleScanner.startScan();\n }",
"private void scanLeDevice(final boolean enable) {\n\n if (enable) {\n // Stops scanning after a predefined scan period.\n mHandler.postDelayed(scanTimeout, mScanPeriodMillis);\n clearScanResults(); //清除搜索结果\n setProgressBarIndeterminateVisibility(true);\n mBtAdapter.startLeScan(mLeScanCallback);\n// mScanButton.setEnabled(false);\n } else {\n // Cancel the scan timeout callback if still active or else it may fire later.\n mHandler.removeCallbacks(scanTimeout);\n setProgressBarIndeterminateVisibility(false);\n mBtAdapter.stopLeScan(mLeScanCallback);\n// mScanButton.setEnabled(true);\n }\n }",
"public void startScan()\n {\n Toolbox.toast(getContext(), \"Starting scan...\");\n //------------------------------------------------------------\n // Clear the list of devices and make sure user has Bluetooth\n // turned on\n clearDeviceLists();\n if ( !Toolbox.checkBLEAdapter(bleAdapter) )\n {\n Toolbox.requestUserBluetooth(mainActivity);\n }\n else\n {\n scanLeDevice(true);\n }\n }",
"@Override\n public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {\n if(device.getName() == null)\n {\n //Not interested in these\n return;\n }\n //Log.i(TAG, \"Found \" + device.getName());\n if(device.getName().equals(TARGET_SERVICE_NAME))\n {\n Log.v(TAG, \"Connecting to parallel demo\");\n mDeviceAddress = device.getAddress();\n startBLEService();\n scanLeDevice(false);\n }\n }",
"@SuppressWarnings(value = {\"deprecation\"})\n @Override\n public void onStartBleScan(long timeoutMillis) {\n if (mBluetooth != null) {\n isScanning = mBluetooth.startLeScan(leScanCallback);\n //timeoutHandler.postDelayed(timeoutRunnable, delay);\n Log.d(TAG, \"mBluetooth.startLeScan() \" + isScanning);\n } else {\n mScanCallback.onBleScanFailed(BleScanState.BLUETOOTH_OFF);//bluetooth is off\n }\n }",
"@Override\n public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mLeDeviceListAdapter.addDevice(device);\n mLeDeviceListAdapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\n public void run() {\n scanLeDevice(false);\n }",
"private void subscribeToScanSubscription() {\n mScanSubscription = BluetoothConnection.getBleClient(this).scanBleDevices(\n new ScanSettings.Builder()\n .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)\n .build(),\n\n new ScanFilter.Builder()\n .setServiceUuid(new ParcelUuid(BLUETOOTH_SERVICE_UUID))\n .build()\n )\n .subscribe(\n scanResult -> {\n // Process scan result here.\n RxBleDevice rxBleDevice = scanResult.getBleDevice();\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(() -> {\n if(!mBtDeviceAddress.contains(rxBleDevice.getMacAddress())) {\n CustomLogger.log(\"MainActivity: mLeScanCallback: Discovered device\" + rxBleDevice.getName());\n mBtDeviceObjectList.add(new BtDeviceObject(rxBleDevice, new Date().getTime()));\n mBtDeviceAddress.add(rxBleDevice.getMacAddress());\n mDeviceListAdapter.notifyDataSetChanged();\n } else {\n int indexOfBtDevice = mBtDeviceAddress.indexOf(rxBleDevice.getMacAddress());\n if(indexOfBtDevice != -1) {\n mBtDeviceObjectList.get(indexOfBtDevice).timeSinceLastUpdate = new Date().getTime();\n }\n }\n }\n );\n\n\n },\n throwable -> {\n // Handle an error here.\n CustomLogger.log(\"MainActivity: subscribeToScanSubscription: Failed to subscribe. throwable \" + throwable.getMessage(), 'e');\n\n }\n );\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(String prefix, BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, prefix, bleScannerListener);\n bleScanner.startScan();\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(ScanSettings scanSettings, BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, bleScannerListener);\n bleScanner.startScan(scanSettings);\n }",
"@RequiresPermission(allOf = {Manifest.permission.CHANGE_WIFI_STATE, Manifest.permission.ACCESS_WIFI_STATE})\n public void searchWiFiEspDevices(WiFiScanListener wiFiDeviceScanListener) {\n\n wifiScanner = new WiFiScanner(context, wiFiDeviceScanListener);\n wifiScanner.startScan();\n }",
"public void stopScan()\n {\n //------------------------------------------------------------\n // Stop BLE Scan\n Toolbox.toast(getContext(), \"Stopping scan...\");\n scanLeDevice(false);\n }",
"@Override\n public void onScanFailed() {\n Log.d(TAG, \"Scan Failed\");\n BluetoothManipulator.startScan();\n }",
"public void listBT() {\n Log.d(\"Main Activity\", \"Listing BT elements\");\n if (searchBt) {\n //Discover bluetooth devices\n final List<String> list = new ArrayList<>();\n list.add(\"\");\n pairedDevices.addAll(mBluetoothAdapter.getBondedDevices());\n // If there are paired devices\n if (pairedDevices.size() > 0) {\n // Loop through paired devices\n for (BluetoothDevice device : pairedDevices) {\n // Add the name and address to an array adapter to show in a ListView\n list.add(device.getName() + \"\\n\" + device.getAddress());\n }\n }\n if (!h7) {\n Log.d(\"Main Activity\", \"Listing BTLE elements\");\n final BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n if (!list.contains(device.getName() + \"\\n\" + device.getAddress())) {\n Log.d(\"Main Activity\", \"Adding \" + device.getName());\n list.add(device.getName() + \"\\n\" + device.getAddress());\n pairedDevices.add(device);\n }\n }\n };\n\n\n Thread scannerBTLE = new Thread() {\n public void run() {\n Log.d(\"Main Activity\", \"Starting scanning for BTLE\");\n mBluetoothAdapter.startLeScan(leScanCallback);\n try {\n Thread.sleep(5000);\n Log.d(\"Main Activity\", \"Stoping scanning for BTLE\");\n mBluetoothAdapter.stopLeScan(leScanCallback);\n } catch (InterruptedException e) {\n Log.e(\"Main Activity\", \"ERROR: on scanning\");\n }\n }\n };\n\n scannerBTLE.start();\n }\n\n //Populate drop down\n spinner1 = (Spinner) findViewById(R.id.spinner1);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner1.setOnItemSelectedListener(this);\n spinner1.setAdapter(dataAdapter);\n\n for (int i = 0; i < dataAdapter.getCount(); i++) {\n if (dataAdapter.getItem(i).contains(\"Polar H7\")) spinner1.setSelection(i);\n }\n\n if (DataHandler.getInstance().getID() != 0 && DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n }\n }",
"@SuppressLint(\"NewApi\") \n\tprivate void stopScan() {\n\t\tif (mIsScanning) {\n\t\t\tDFUManager.log(TAG, \"stopScan\");\n\t\t\tmBluetoothAdapter.stopLeScan(mLEScanCallback);\n\t\t\tmIsScanning = false;\n\t\t}\n\t}",
"@Override\n public List<CECDevice> scanDevices() {\n sendCommand(\"scan\");\n return CECClientParser.parseScanResult(waitForOutputLine(\"===================\"));\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(List<ScanFilter> filters, BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, bleScannerListener);\n bleScanner.startScan(filters);\n }",
"public static void stopOrStartScanningBle(final BluetoothAdapter mBluetoothAdapter,\n final LeScanCallback callback,\n final ScanCallback scanCallback,\n int stopOrstartScan){\n switch(stopOrstartScan){\n case STARTSCAN:\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){\n Log.i(TAG,\"调用的是android5.0以上的启动方法\");\n final BluetoothLeScanner scanner = mBluetoothAdapter.getBluetoothLeScanner();\n scanner.startScan(scanCallback);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(SCAN_TIME);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n scanner.stopScan(scanCallback);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n }else {\n Log.i(TAG,\"调用的是android5.0以下的启动方法\");\n mBluetoothAdapter.startLeScan(callback);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(SCAN_TIME);\n mBluetoothAdapter.stopLeScan(callback);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n }\n break;\n case STOPSCAN:\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){\n Log.i(TAG,\"调用的是android5.0以上的停止方法\");\n mBluetoothAdapter.getBluetoothLeScanner().stopScan(scanCallback);\n }else {\n Log.i(TAG,\"调用的是android5.0以下的停止方法\");\n mBluetoothAdapter.stopLeScan(callback);\n }\n break;\n }\n }",
"@Override\n public void run() {\n if (mScanning) {\n mScanning = false;\n mSwipeRefreshLayout.setRefreshing(false);\n mSwipeRefreshLayout.setEnabled(true);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Log.v(TAG, \"stopLeScan STOP scan is ended after SCAN_PERIOD\");\n mLeScanner.stopScan(mScanCallback);\n } else {\n mBluetoothAdapter.stopLeScan(mLeScanCallback);\n }\n\n mProgress.setVisibility(View.INVISIBLE);\n\n if (mLeDeviceListAdapter.getItemCount() == 0 && mAlertBlue == null && mAlertGps == null) {\n Log.v(TAG, \"NO DEVICES FOUND\");\n mNoDevice.setVisibility(View.VISIBLE);\n }\n }\n invalidateOptionsMenu();\n }",
"public void discoverable()\n {\n if(mEnable) {\n Log.d(LOGTAG, \"Make discoverable\");\n if(mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n listen(false); // Stop listening if were listening\n Intent i = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n mContext.startActivity(i);\n listen(true); // Start again\n }\n }\n }",
"private void isDeviceAvailable(final ESPDevice device, String password, QRCodeScanListener qrCodeScanListener) {\n\n searchCnt = 0;\n isDeviceFound = false;\n // Check device is available in scanning.\n SearchDeviceTask searchDeviceTask = new SearchDeviceTask(device, password, qrCodeScanListener);\n handler.post(searchDeviceTask);\n }",
"void onDeviceFound(TxRxScanResult scanResult);",
"private void bleSearch(BluetoothDevice device, int rssi){\n bleSearchResponse.beaconFound(device, rssi);\n }",
"@Override\n protected void onResume() {\n /**\n * Enable Bluetooth if it is not enabled. Create a new list of devices and attach\n * it to the list view so it will be shown; then start scanning for devices.\n */\n super.onResume();\n if(!mBluetoothAdapter.isEnabled()) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);\n }\n\n mLeDeviceListAdapter = new LeDeviceListAdapter();\n mListView.setAdapter((mLeDeviceListAdapter));\n scanLeDevice(true);\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void searchBleEspDevices(List<ScanFilter> filters, ScanSettings scanSettings, BleScanListener bleScannerListener) {\n\n Log.d(TAG, \"Search for BLE devices\");\n bleScanner = new BleScanner(context, bleScannerListener);\n bleScanner.startScan(filters, scanSettings);\n }",
"private void searchDeviceOrOpenBluetooth() {\n if (!BtUtil.isOpen(bluetoothAdapter)) {\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(enableBtIntent, OPEN_BLUETOOTH_REQUEST);\n } else {\n BtUtil.searchDevices(bluetoothAdapter);\n }\n }",
"private void initBLESetup() {\n // Initializes Bluetooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n //Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app.\n //Obtaining dynamic permissions from the user\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { //23\n if (this.checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"This app needs location access.\");\n builder.setMessage(\"Please grant location access to this app.\");\n builder.setPositiveButton(android.R.string.ok, null);\n builder.setOnDismissListener(new DialogInterface.OnDismissListener() {\n public void onDismiss(DialogInterface dialog) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_REQUEST_COARSE_LOCATION);\n }\n\n });// See onRequestPermissionsResult callback method for negative behavior\n builder.show();\n }\n }\n // Create callback methods\n if (Build.VERSION.SDK_INT >= 21) //LOLLIPOP\n newerVersionScanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n BluetoothDevice btDevice = result.getDevice();\n ScanRecord mScanRecord = result.getScanRecord();\n int rssi = result.getRssi();\n// Log.i(TAG, \"Address: \"+ btDevice.getAddress());\n// Log.i(TAG, \"TX Power Level: \" + result.getScanRecord().getTxPowerLevel());\n// Log.i(TAG, \"RSSI in DBm: \" + rssi);\n// Log.i(TAG, \"Manufacturer data: \"+ mScanRecord.getManufacturerSpecificData());\n// Log.i(TAG, \"device name: \"+ mScanRecord.getDeviceName());\n// Log.i(TAG, \"Advertise flag: \"+ mScanRecord.getAdvertiseFlags());\n// Log.i(TAG, \"service uuids: \"+ mScanRecord.getServiceUuids());\n// Log.i(TAG, \"Service data: \"+ mScanRecord.getServiceData());\n byte[] recordBytes = mScanRecord.getBytes();\n\n iBeacon ib = parseBLERecord(recordBytes);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n Log.e(\"Scan Failed\", \"Error Code: \" + errorCode);\n }\n };\n else\n olderVersionScanCallback =\n new BluetoothAdapter.LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi,\n final byte[] scanRecord) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.i(\"onLeScan\", device.toString());\n\n iBeacon ib = parseBLERecord(scanRecord);\n\n if (ib != null) {\n setLog(ib.getUuid(), ib.getMajor(), ib.getMinor(), rssi);\n\n }\n }\n });\n }\n };\n }",
"@SuppressLint(\"NewApi\")\n public BleScanner() {\n this.leScanCallback = new LeScanCallback() {\n @Override\n public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) {\n bleSearch(device, rssi);\n }\n };\n this.scanCallback = new ScanCallback() {\n @Override\n public void onScanResult(int callbackType, ScanResult result) {\n super.onScanResult(callbackType, result);\n bleSearch(result.getDevice(), result.getRssi());\n }\n\n @Override\n public void onBatchScanResults(List<ScanResult> results) {\n super.onBatchScanResults(results);\n }\n\n @Override\n public void onScanFailed(int errorCode) {\n super.onScanFailed(errorCode);\n }\n };\n }",
"public void monitorFoundDevices() {\n //start a thread\n new Thread() {\n public void run() {\n //loop till mBeaconListAdapter has been skilled.\n while(mBeaconListAdapter != null) {\n try {\n //Since it will update UI, runOnUiThread is called here.\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n for (int i = 0; i < mBeaconListAdapter.getCount(); i++) {\n if (!mBleWrapper.checkDeviceConnection(mBeaconListAdapter.\n getDevice(i).getAddress()))\n mBeaconListAdapter.removeDevice(i);\n }\n }\n });\n\n Thread.sleep(MONITOR_DELAY_TIME_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }",
"@RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void stopBleScan() {\n\n if (bleScanner != null) {\n bleScanner.stopScan();\n }\n }",
"public boolean isScanning() { return scanning; }",
"@Override\r\n\tprotected void onHandleIntent(Intent intent) {\n\t\tfinal BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\r\n\t\tmBluetoothAdapter = bluetoothManager.getAdapter();\r\n\r\n\t\t// Checks if Bluetooth is supported on the device.\r\n\t\tif (mBluetoothAdapter == null) {\r\n\t\t\tLog.i(TAG, \"Bluetooth is not supported\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.i(TAG, \"mBluetoothAdapter = \" + mBluetoothAdapter);\r\n\t\t}\r\n\r\n\t\t//启用蓝牙\r\n\t\t//mBluetoothAdapter.enable();\r\n\t\t//Log.i(TAG, \"mBluetoothAdapter.enable\");\r\n\t\t\r\n\t\tmBLE = new BluetoothLeClass(this);\r\n\t\t\r\n\t\tif (!mBLE.initialize()) {\r\n\t\t\tLog.e(TAG, \"Unable to initialize Bluetooth\");\r\n\t\t}\r\n\t\tLog.i(TAG, \"mBLE = e\" + mBLE);\r\n\r\n\t\t// 发现BLE终端的Service时回调\r\n\t\tmBLE.setOnServiceDiscoverListener(mOnServiceDiscover);\r\n\r\n\t\t// 收到BLE终端数据交互的事件\r\n\t\tmBLE.setOnDataAvailableListener(mOnDataAvailable);\r\n\t\t\r\n\t\t//开始扫描\r\n\t\tmBLE.scanLeDevice(true);\r\n\t\t\r\n\t\t/*\r\n\t\tMRBluetoothManage.Init(this, new MRBluetoothEvent() {\r\n\t\t\t@Override\r\n\t\t\tpublic void ResultStatus(int result) {\r\n\t\t\t\tswitch (result) {\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_NOT_OPEN:\r\n\t\t\t\t\t//Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\r\n\t\t\t\t\t//startActivityForResult(enableBtIntent, 100);\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_NOT_OPEN\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_INIT_OK:\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_INIT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_SCAN_END:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_SCAN_END\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_START:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_START\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_OK:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_OK\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase MRBluetoothManage.MRBLUETOOTHSTATUS_CONNECT_CLOSE:\r\n\t\t\t\t\tLog.d(TAG, \"MRBLUETOOTHSTATUS_CONNECT_CLOSE\");\r\n\t\t\t\t\tMRBluetoothManage.stop();\r\n\t\t\t\t\tMRBluetoothManage.scanAndConnect();\r\n\t\t\t\t\t//MRBluetoothManage.Init(BluetoothService.this, this);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\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 ResultDevice(ArrayList<BluetoothDevice> deviceList) {\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 ResultData(byte[] data) {\r\n\t\t\t\tLog.i(TAG, data.toString());\r\n\t\t\t\tbyte[] wenDuByte = new byte[2];\r\n\t\t\t\tbyte[] shiDuByte = new byte[2];\r\n\t\t\t\tbyte[] shuiFenByte = new byte[2];\r\n\t\t\t\tbyte[] ziWaiXianByte = new byte[2];\r\n\t\t\t\tSystem.arraycopy(data, 4, wenDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 6, shiDuByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 8, shuiFenByte, 0, 2);\r\n\t\t\t\tSystem.arraycopy(data, 10, ziWaiXianByte, 0, 2);\r\n\t\t\t\tTestModel model = new TestModel();\r\n\t\t\t\tmodel.wenDu = BitConverter.toShort(wenDuByte);\r\n\t\t\t\tmodel.shiDu = BitConverter.toShort(shiDuByte);\r\n\t\t\t\tmodel.shuiFen = BitConverter.toShort(shuiFenByte);\r\n\t\t\t\tmodel.ziWaiXian = BitConverter.toShort(ziWaiXianByte);\r\n\t\t\t\t//Log.d(TAG, model.toString());\r\n\t\t\t\tsendData(model);\r\n\t\t\t}\r\n\t\t});\r\n\t\t*/\r\n\t}",
"@Override\n public void onScannedBleDeviceAdded(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceAdded enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_ADD_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_ADD_FLAG, device);\n }",
"@Override\n public void onServiceConnected(ComponentName componentName, IBinder service) {\n mNanoBLEService = ((NanoBLEService.LocalBinder) service).getService();\n\n //initialize bluetooth, if BLE is not available, then finish\n if (!mNanoBLEService.initialize()) {\n finish();\n }\n\n //Start scanning for devices that match DEVICE_NAME\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();\n if(mBluetoothLeScanner == null){\n finish();\n Toast.makeText(NewScanActivity.this, \"Please ensure Bluetooth is enabled and try again\", Toast.LENGTH_SHORT).show();\n }\n mHandler = new Handler();\n if (SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null) != null) {\n preferredDevice = SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null);\n scanPreferredLeDevice(true);\n } else {\n scanLeDevice(true);\n }\n }",
"public void discoverDevices(){\r\n \t// If we're already discovering, stop it\r\n if (mBtAdapter.isDiscovering()) {\r\n mBtAdapter.cancelDiscovery();\r\n }\r\n \r\n Toast.makeText(this, \"Listining for paired devices.\", Toast.LENGTH_LONG).show();\r\n \tmBtAdapter.startDiscovery(); \r\n }",
"@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\t\t\t\t\t\t\twait_time = -10;\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tscanLeDevice(bluetoothSwitch);\r\n\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\tsetUI();\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\treturn;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (!TrackerSharePreference.getConstant(context).isCardRegistered()) return;\n\n MyApplication.appendLog(MyApplication.getCurrentDate() + \" : BeaconReceiver OnReceive callback\\n\");\n mContext = context;\n\n Log.v(TAG, \"onReceive() \");\n\n if (intent.getAction() == null) {\n Log.e(TAG, \"ERROR: action is null\");\n } else {\n // Look whether we find our device\n if (ACTION_SCANNER_FOUND_DEVICE.equals(intent.getAction())) {\n Bundle extras = intent.getExtras();\n\n if (extras != null) {\n Object obj = extras.get(BluetoothLeScanner.EXTRA_LIST_SCAN_RESULT);\n if (obj instanceof ArrayList) {\n ArrayList<ScanResult> scanResults = (ArrayList<ScanResult>) obj;\n Log.v(TAG, \"There are \" + scanResults.size() + \" results\");\n\n for (ScanResult result : scanResults) {\n if (result.getScanRecord() == null) {\n Log.d(TAG, \"getScanRecord is null\");\n continue;\n }\n\n TrackerSharePreference trackerSharePreference = TrackerSharePreference.getConstant(context);\n trackerSharePreference.setAlreadyCreateWorkerThread(false);\n trackerSharePreference.setRanging(true);\n trackerSharePreference.setBeaconTimestamp(MyApplication.getCurrentDate());\n trackerSharePreference.setCurrentState(StateMachine.RING_NOTIFICATION_STATE.getValue());\n playSound(context.getApplicationContext());\n showRangNotification(context.getApplicationContext());\n\n Log.d(\"BleReceiver\", \"showNotification\");\n\n }\n\n } else {\n // Received something, but not a list of scan results...\n Log.d(TAG, \" no ArrayList but \" + obj);\n }\n } else {\n Log.d(TAG, \"no extras\");\n }\n }\n }\n }",
"public void stop() {\n // If we weren't scanning, or Bluetooth is not supported, we're done.\n if (!scanning || adapter == null) {\n return;\n }\n\n // If Bluetooth is not enabled, scanning will automatically have been stopped.\n if (!adapter.isEnabled()) {\n scanning = false;\n Log.i(TAG, \"Scanning stopped by adapter.\");\n return;\n }\n\n // Get the BLE scanner. If this is null, Bluetooth may not be enabled.\n BluetoothLeScanner scanner = adapter.getBluetoothLeScanner();\n if (scanner == null) {\n Log.w(TAG, \"Could not retrieve scanner to stop scanning.\");\n return;\n }\n scanner.stopScan(scanCallback);\n\n scanning = false;\n Log.i(TAG, \"Stopped scanning.\");\n }",
"public boolean isScanning() {\n return scanning;\n }",
"private void scanWifi() {\n Toast.makeText(this,getString(R.string.toast_scanning),Toast.LENGTH_SHORT).show();\n //Android 9.0 将 WiFiManager 的 startScan() 方法标为了废弃,\n // 前台应用 2 分钟内只能使用 4 次startScan(),后台应用 30 分钟内只能调用 1次 startScan(),\n // 否则会直接返回 false 并且不会触发扫描操作。\n mWifiManager.startScan();\n //Log.d(\"startscan\", String.valueOf(mWifiManager.startScan()) );\n mScanResults = mWifiManager.getScanResults();\n //Log.d(\"mScanResults\", String.valueOf(mScanResults.size()));\n mListView.setAdapter(new WifiAdapter(this,mScanResults));\n }",
"@RequiresPermission(allOf = {Manifest.permission.CHANGE_WIFI_STATE, Manifest.permission.ACCESS_WIFI_STATE})\n public void searchWiFiEspDevices(String prefix, WiFiScanListener wiFiDeviceScanListener) {\n\n wifiScanner = new WiFiScanner(context, prefix, wiFiDeviceScanListener);\n wifiScanner.startScan();\n }",
"public void start() throws BluetoothNotSupportedException {\n // If we're already scanning, we're done.\n if (scanning){\n return;\n }\n\n // If the adapter is null, Bluetooth is not supported.\n if (adapter == null) {\n Log.e(TAG, \"Default Bluetooth adapter is null.\");\n throw new BluetoothNotSupportedException();\n }\n\n // If Bluetooth is not enabled, we cannot begin scanning.\n if (!adapter.isEnabled()) {\n Log.w(TAG, \"Could not begin scanning for beacons: adapter disabled.\");\n return;\n }\n\n // Get the BLE scanner. If this is null, Bluetooth may not be enabled.\n BluetoothLeScanner scanner = adapter.getBluetoothLeScanner();\n if (scanner == null) {\n Log.w(TAG, \"Could not begin scanning for beacons: BLE scanner null.\");\n return;\n }\n scanner.startScan(scanCallback);\n\n scanning = true;\n Log.i(TAG, \"Started scanning.\");\n }",
"private void validateBleSupport() {\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Snackbar.make(txtStatus, \"No LE Support.\", Snackbar.LENGTH_LONG).show();\n } else {\n\n /*\n * We need to enforce that Bluetooth is first enabled, and take the\n * user to settings to enable it if they have not done so.\n */\n BluetoothAdapter mBluetoothAdapter = BluetoothAdapter\n .getDefaultAdapter();\n\n if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"onResume: Bluetooth is disabled\");\n //Bluetooth is disabled, request enabling it\n Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivity(enableBtIntent);\n }\n }\n\n }",
"private void checkBleSupportAndInitialize() {\n Log.d(TAG, \"checkBleSupportAndInitialize: \");\n // Use this check to determine whether BLE is supported on the device.\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Log.d(TAG,\"device_ble_not_supported \");\n Toast.makeText(this, R.string.device_ble_not_supported,Toast.LENGTH_SHORT).show();\n return;\n }\n // Initializes a Blue tooth adapter.\n final BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n if (mBluetoothAdapter == null) {\n // Device does not support Blue tooth\n Log.d(TAG, \"device_ble_not_supported \");\n Toast.makeText(this,R.string.device_ble_not_supported, Toast.LENGTH_SHORT).show();\n return;\n }\n\n //打开蓝牙\n if (!mBluetoothAdapter.isEnabled()) {\n Log.d(TAG, \"open bluetooth \");\n bluetoothUtils.openBluetooth();\n }\n }",
"private void ensureDiscoverable() {\n if (mBluetoothAdapter.getScanMode() !=\n BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n startActivity(discoverableIntent);\n }\n }",
"private void ensureDiscoverable() {\n if (mBluetoothAdapter.getScanMode() !=\n BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n startActivity(discoverableIntent);\n }\n }",
"@Override\n public void onResume() {\n super.onResume();\n mAbleBLEService = AbleDeviceScanActivity.getmBluetoothLeService();\n setScanButton();\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\twait_time = 0;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (HomeView.ble_status == 0 || HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tscanLeDevice(true);\r\n\r\n\t\t\t\t\t\t} catch (IllegalArgumentException 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\tbluetoothSwitch = true;\r\n\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twait_time++;\r\n\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t} catch (InterruptedException 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\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public interface BleInterface {\n //open ble\n public void openBle(Boolean enable);\n //scan ble,get device list\n public void scanBleDevice(Boolean enable);\n\n}",
"public void searchLights() {\n\t\n\t\t// try to limit searching\n\t\tif(ports.contains(motors)) ports.remove(motors);\n\t\tif(state.get(State.values.serialport) != null) \n\t\t\tports.remove(state.get(State.values.serialport));\n\t\t\t\n\t\tUtil.debug(\"discovery for lights starting on ports: \" + ports.size(), this);\n\t\t\n\t\tfor (int i = ports.size() - 1; i >= 0; i--) {\n\t\t\tif (state.get(State.values.lightport)!=null) { break; } // stop if find it\n\t\t\t//if (connect(ports.get(i), BAUD_RATES[0])) {\t\n\t\t\tif (connect(ports.get(i), 57600)) {\n\t\t\t\tUtil.delay(TIMEOUT*2);\n\t\t\t\tif (serialPort != null) { close(); }\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void blePeripheralFound(BluetoothDeviceWrapper device, int rssi, byte[] record) {\n if ((null != device.getgBeacon()) /*|| (null != device.getiBeacon()) || (null != device.getAltBeacon())*/) {\n if ((weakReference.get()!=null) && (weakReference.get().getDeviceQueue().size() < 350)) {\n weakReference.get().getDeviceQueue().offer(device);\n }\n }\n }",
"public abstract void startSingleScan();",
"protected BeaconScanner() {\n Log.i(TAG, \"Initialising beacon scanner.\");\n scanning = false;\n beaconEmitters = new LinkedList<>();\n beaconStream = Observable.create(new ObservableOnSubscribe<Beacon>() {\n @Override\n public void subscribe(ObservableEmitter<Beacon> emitter) throws Exception {\n beaconEmitters.push(emitter);\n }\n });\n adapter = BluetoothAdapter.getDefaultAdapter();\n }",
"@Override\n\t \t\t\t\tpublic void run() {\n\t \t\t\t\t\tString connectivity_context = Context.WIFI_SERVICE;\n\t \t\t\t\t\tfinal WifiManager wifi = (WifiManager) getSystemService(connectivity_context); \n\t \t\t\t\t\tif (wifi.isWifiEnabled()) {\n\t \t\t wifi.startScan();\n\t \t\t\t\t\t}\n\t \t\t\t\t}",
"private Boolean isDeviceYouWant(BleManager.DiscoveryListener.DiscoveryEvent event) {\n String name = event.device().getName_native();\n if (name.toLowerCase().startsWith(\"polar\")) {\n Log.v(TAG, event.device().getName_native());\n return true;\n }\n return false;\n\n// // Test with prototype BLE device, same repro.\n// byte[] b = event.device().getScanRecord();\n// if (null == b) {\n// return false;\n// }\n// if (b.length < 22) {\n// return false;\n// }\n//\n// byte[] kCompanyIdentifier = new byte[] {(byte)0x01, (byte)0x02, (byte)0x03};\n// byte[] companyIdentifier = new byte[] {b[19], b[20], b[21]};\n// if (Arrays.equals(kCompanyIdentifier, companyIdentifier)){\n// return true;\n// }\n// return false;\n }",
"boolean isPeripheralAccess();",
"public interface ScanCallBack {\n void getDevices(final BluetoothDevice bluetoothDevice, final int rssi);\n}",
"public interface TxRxScanCallback {\n\n /**\n * Callback immediately after the scan has been stopped.\n */\n void afterStopScan();\n\n /**\n * Callback when a BLE device has been found.\n *\n * @param scanResult the result of a scan operation for BLE Devices\n */\n void onDeviceFound(TxRxScanResult scanResult);\n}",
"public interface BluetoothScanListener {\n void onScanResult(int callbackType, ScanResult result);\n void onBatchScanResults(List<ScanResult> results);\n void onScanFailed(int errorCode);\n}",
"private void doDiscovery() {\n\t\t// Indicate scanning in the title\n\t\t// setProgressBarIndeterminateVisibility(true);\n\t\tsetTitle(R.string.scanning);\n\n\t\t// Turn on sub-title for new devices\n\t\tfindViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n\t\t// If we're already discovering, stop it\n\t\tif (m_BtAdapter.isDiscovering()) {\n\t\t\tm_BtAdapter.cancelDiscovery();\n\t\t}\n\n\t\t// Request discover from BluetoothAdapter\n\t\tm_BtAdapter.startDiscovery();\n\t}",
"DiscoverServicesCommand(BluetoothGatt mBluetoothGatt) {\n this.mBluetoothGatt = mBluetoothGatt;\n }",
"@Override // com.polidea.rxandroidble2.internal.SingleResponseOperation\n public boolean startOperation(BluetoothGatt bluetoothGatt) {\n return bluetoothGatt.readCharacteristic(this.bluetoothGattCharacteristic);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n /**\n * Load previously saved state and set the view for the\n * activity. Set the title of the activity using the action\n * bar and create a handlers to schedule messages and\n * runnables/actions.\n */\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_device_scan);\n //getActionBar().setTitle(R.string.title_devices);\n mHandler = new Handler();\n mListView = findViewById(R.id.list);\n mListView.setOnItemClickListener(devicesClickListener);\n\n /**\n * Check whether BLE is supported on the device. You can then\n * selectively disable BLE_related features. Display non-intrusive\n * pop up message to indicate this and end activity.\n */\n if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {\n Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();\n finish();\n }\n\n /**\n * Request access to dangerous permissions: ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION.\n * These permissions have to be declared in the manifest file and explicitly requested\n * (prompting the user for access).\n */\n ActivityCompat.requestPermissions(this, mPermissions, REQUEST_APP_PERMISSIONS);\n\n /**\n * Initializes a Bluetooth adapter to handle BLE requests/tasks such as scanning,\n * pairing, etc. Get the system level Bluetooth Service and acquire its bluetooth\n * adapter.\n */\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n\n /**\n * Check if Bluetooth is supported on this device, i.e. no bluetooth adapter.\n * If it isn't, display a short message and end activity.\n */\n if (mBluetoothAdapter == null) {\n Toast.makeText(this, R.string.bluetooth_not_supported,\n Toast.LENGTH_SHORT).show();\n finish();\n return;\n }\n }",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\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\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}",
"public void onCreate() {\n\t\tSystem.out.println(\"This service is called!\");\n\t\tmyBluetoothAdapter= BluetoothAdapter.getDefaultAdapter();\n\t\tmyBluetoothAdapter.enable();\n\t\tSystemClock.sleep(5000);\n\t\tif (myBluetoothAdapter.isEnabled()){\n\t\t\tSystem.out.println(\"BT is enabled...\");\n\t\t\tdiscover = myBluetoothAdapter.startDiscovery();\n\t\t}\n\t\tSystem.out.println(myBluetoothAdapter.getScanMode());\n\t\t\n\t\tSystem.out.println(\"Discovering: \"+myBluetoothAdapter.isDiscovering());\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));\n\t\tIntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_FOUND);\n\t\tIntentFilter filter2 = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);\n\t\tthis.registerReceiver(bReceiver, filter1);\n\t\tthis.registerReceiver(bReceiver, filter2);\n\t\t//registerReceiver(bReceiver, new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED));\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // Prevent screen rotation.\n// this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n// this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR);\n // Add animated progress indicator in top right corner.\n requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);\n\n mResoruces = this.getResources();\n\n setContentView(R.layout.activity_scan_results);\n mScanListView = (ListView) this.findViewById(R.id.scanListView);\n mScanResultsAdapter = new ScanResultsAdapter(this, mScanResults);\n mScanListView.setAdapter(mScanResultsAdapter);\n mScanListView.setOnItemClickListener(this);\n //重新搜索按钮觸發\n mScanButton = (Button) findViewById(R.id.buttonScan);\n mScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n scanLeDevice(true);\n }\n });\n\n final BluetoothManager btManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBtAdapter = btManager.getAdapter();\n\n // Register for broadcasts on BluetoothAdapter state change so that we can tell if it has been turned off.\n IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);\n this.registerReceiver(mReceiver, filter);\n checkEnableBt();\n\n if (mBtAdapter.isEnabled()) {\n Log.i(TAG, \"是否打开蓝牙适配器 :\" + mBtAdapter.isEnabled());\n scanLeDevice(true);\n }\n }",
"public void startSearchSmbDevice() {\n this.stopRun = false;\n this.deviceList.clear();\n String smbUrl = getLocalIP();\n LogUtils.i(TAG, \"startSearchSmbDevice ip:\" + smbUrl);\n if (smbUrl != null && smbUrl.length() >= MIX_IP_COUNT) {\n if (!smbUrl.contentEquals(LOCAL_HOST) && onSmbSearchListener != null && !smbUrl.contains(\":\")) {\n this.scanCompleted.set(0);\n\n for (int i = 0; i < MAX_THREAD_COUNT; ++i) {\n if (this.stopRun) {\n this.isScanning = false;\n break;\n }\n int subCount = 256 / MAX_THREAD_COUNT;\n new Thread(new PingRunnable(\n smbUrl,\n i + 1,\n i * subCount + 1,\n i * subCount + subCount,\n onSmbSearchListener)\n ).start();\n isScanning = true;\n }\n } else {\n this.isScanning = false;\n if (logEnable) {\n Log.e(TAG, \"no ip address or recv listener! \");\n }\n if (onSmbSearchListener != null) {\n onSmbSearchListener.onSearch(OnSmbSearchListener.UPDATE_DEVICE_CANCEL, null);\n }\n\n }\n } else {\n this.isScanning = false;\n if (logEnable) {\n Log.e(TAG, \"no ip address!\");\n }\n if (onSmbSearchListener != null) {\n onSmbSearchListener.onSearch(OnSmbSearchListener.UPDATE_DEVICE_CANCEL, null);\n }\n\n }\n }",
"private void ensureDiscoverable() {\n\t\tif (D)\n\t\t\tLog.d(TAG, \"ensure discoverable\");\n\t\tif (mBluetoothAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {\n\t\t\tIntent discoverableIntent = new Intent(\n\t\t\t\t\tBluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n\t\t\tdiscoverableIntent.putExtra(\n\t\t\t\t\tBluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\n\t\t\tstartActivity(discoverableIntent);\n\t\t}\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"WiFi SCAN\", \"RESULT RETURN:\"+new Date().getTime());\n synchronized (scanned) {\n scanned.notify();\n }\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"private void doDiscovery() {\n if (D) Log.d(TAG, \"doDiscovery()\");\n\n // Indicate scanning in the title\n setProgressBarIndeterminateVisibility(true);\n setTitle(R.string.scanning);\n\n // Turn on sub-title for new devices\n findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE);\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }",
"private void doDiscovery() {\n Log.d(TAG, \"doDiscovery()\");\n\n // If we're already discovering, stop it\n if (mBtAdapter.isDiscovering()) {\n mBtAdapter.cancelDiscovery();\n }\n\n // Request discover from BluetoothAdapter\n mBtAdapter.startDiscovery();\n }",
"public void scanWifiList() {\n wifiManager.startScan();\n scanResultList=wifiManager.getScanResults();\n Log.e(\"length\",\"\"+scanResultList.size());\n //wifiInfoList= (List<WifiInfo>)wifiManager .getConnectionInfo();//\n adapter = new RecyclerAdapterItems(getApplicationContext(),scanResultList,this);\n recyclerView.setAdapter(adapter);\n\n /* for (int i = 0; i < scanResultList.size(); i++){\n\n if (scanResultList.get(i).SSID.equalsIgnoreCase(\"D-Link\")){\n //Toast.makeText(this, \"found!!\", Toast.LENGTH_SHORT).show();\n Log.e(\"scanWifiList\", \"Found!!\");\n String capp = scanResultList.get(i).capabilities;\n Log.e(\"Capabilities\", \"\"+capp);\n }\n }*/\n }",
"private void handleFoundDevice(final BluetoothDevice device, final int rssi)\n {\n if (device != null) {\n int result = mBeaconListAdapter.getRegStatus(device);\n\n switch(result) {\n case UNREGISTERED:\n break;\n case REGISTERED:\n // adding to the UI have to happen in UI thread\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mBeaconListAdapter.addOrUpdateDevice(device, rssi, null, false);\n }\n });\n break;\n case NEW_FOUND:\n //call webservice to verify the found device whether was registered or not\n final Map jsonMap = new BeaconFetcher().fetchBeacon(device.getAddress());\n\n // adding to the UI have to happen in UI thread\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mBeaconListAdapter.addOrUpdateDevice(device, rssi, jsonMap, true);\n }\n });\n break;\n }\n }\n }",
"@Override\r\n\tprotected int _enableScanningOnOff(boolean onOff) throws NotOpenSerialException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SerialPortErrorException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t SendTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t RecvTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseCodeException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ProtocolParsingException {\r\n\t\treturn 0;\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n handler = new Handler();\n scanInfoView = findViewById(R.id.scanInfo);\n\n communicationAdapter = new BluetoothAdapterBlindSwimmers();\n communicationDevice = new BluetoothImp();\n devices = new ArrayList<>();\n\n Button startScanButton = findViewById(R.id.startScanButton);\n startScanButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n devices.clear();\n scanForDevices(true);\n }\n });\n ListView scanListView = findViewById(R.id.scanListView);\n\n arrayAdapter = new DeviceArrayAdapter(this, devices);\n scanListView.setAdapter(arrayAdapter);\n scanListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { onDeviceSelected(position); }\n });\n }",
"@Test\n public void sendSingleScanAndPendingScanAndListenerThenDisableWifi() {\n WifiScanner.ScanSettings requestSettings1 = createRequest(channelsToSpec(2400), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId1 = 2293;\n\n WifiScanner.ScanSettings requestSettings2 = createRequest(channelsToSpec(2450), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId2 = 2294;\n\n int listenerRequestId = 2295;\n\n startServiceAndLoadDriver();\n\n when(mWifiScannerImpl.startSingleScan(any(WifiNative.ScanSettings.class),\n any(WifiNative.ScanEventHandler.class))).thenReturn(true);\n\n Handler handler = mock(Handler.class);\n BidirectionalAsyncChannel controlChannel = connectChannel(handler);\n InOrder order = inOrder(handler, mWifiScannerImpl);\n\n // Request scan 1\n sendSingleScanRequest(controlChannel, requestId1, requestSettings1, null);\n mLooper.dispatchAll();\n verifySuccessfulResponse(order, handler, requestId1);\n\n // Request scan 2\n sendSingleScanRequest(controlChannel, requestId2, requestSettings2, null);\n mLooper.dispatchAll();\n verifySuccessfulResponse(order, handler, requestId2);\n\n // Setup scan listener\n registerScanListener(controlChannel, listenerRequestId);\n mLooper.dispatchAll();\n verifySuccessfulResponse(order, handler, listenerRequestId);\n\n // disable wifi\n TestUtil.sendWifiScanAvailable(mBroadcastReceiver, mContext,\n WifiManager.WIFI_STATE_DISABLED);\n\n // validate failed response\n mLooper.dispatchAll();\n ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);\n order.verify(handler, times(2)).handleMessage(messageCaptor.capture());\n assertFailedResponse(requestId1, WifiScanner.REASON_UNSPECIFIED,\n \"Scan was interrupted\", messageCaptor.getAllValues().get(0));\n assertFailedResponse(requestId2, WifiScanner.REASON_UNSPECIFIED,\n \"Scan was interrupted\", messageCaptor.getAllValues().get(1));\n // No additional callbacks for scan listener\n verifyNoMoreInteractions(handler);\n }",
"private void makeDeviceDiscoverable() {\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\n discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 900);\n startActivity(discoverableIntent);\n }",
"@Test\n public void sendSingleScanRequestThenDisableWifi() {\n WifiScanner.ScanSettings requestSettings = createRequest(channelsToSpec(2400), 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n int requestId = 2293;\n\n startServiceAndLoadDriver();\n\n when(mWifiScannerImpl.startSingleScan(any(WifiNative.ScanSettings.class),\n any(WifiNative.ScanEventHandler.class))).thenReturn(true);\n\n Handler handler = mock(Handler.class);\n BidirectionalAsyncChannel controlChannel = connectChannel(handler);\n InOrder order = inOrder(handler, mWifiScannerImpl);\n\n // Run scan 1\n sendSingleScanRequest(controlChannel, requestId, requestSettings, null);\n mLooper.dispatchAll();\n verifySuccessfulResponse(order, handler, requestId);\n\n // disable wifi\n TestUtil.sendWifiScanAvailable(mBroadcastReceiver, mContext,\n WifiManager.WIFI_STATE_DISABLED);\n\n // validate failed response\n mLooper.dispatchAll();\n verifyFailedResponse(order, handler, requestId, WifiScanner.REASON_UNSPECIFIED,\n \"Scan was interrupted\");\n verifyNoMoreInteractions(handler);\n }",
"@Override\n public void onScanStarted() {\n Log.d(TAG, \"Scan Started\");\n }",
"public abstract void startPeriodicallScan();",
"@Override\n public void onScanResult(int callbacktype, final ScanResult result) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mLeDeviceListAdapter.addDevice(result.getDevice());\n mLeDeviceListAdapter.notifyDataSetChanged();\n }\n });\n }",
"boolean isScanDone();",
"public LeDeviceListAdapter() {\n super();\n mLeDevices = new ArrayList<BluetoothDevice>();\n mInflater = DeviceScanActivity.this.getLayoutInflater();\n }",
"public void startScanDevice(MokoScanDeviceCallback callback) {\n MokoSupport.getInstance().startScanDevice(callback);\n }",
"public void onScanViewReady() {\n\t\tupdateGuiState();\n\n\t\tif (!mInitialised) {\n\t\t\t// Broadcast receiver\n\t\t\tregisterReceiver(mReceiver, mFilter);\n\n\t\t\tif (mBtAdapter.isEnabled()) {\n\t\t\t\t// Start straight away\n\t\t\t\tstartBluetoothLeService();\n\t\t\t} else {\n\t\t\t\t// Request BT adapter to be turned on\n\t\t\t\tIntent enableIntent = new Intent(\n\t\t\t\t\t\tBluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableIntent, REQ_ENABLE_BT);\n\t\t\t}\n\t\t\tmInitialised = true;\n\t\t} else {\n\t\t\t// mScanView.notifyDataSetChanged();\n\t\t}\n\t}",
"public interface IBleScanCallback {\n\n /**\n * Callback when a BLE advertisement has been found.\n *\n * @param result scan result\n */\n void onScanResult(final IScanResult result);\n}",
"public T scanAllDevices(DeviceType dType) {\n for (String devLabel : Globals.core().getLoadedDevicesOfType(dType)) {\n T device = getAutoInstance(devLabel);\n if (device != null) {\n return device;\n }\n }\n Globals.mm().logs().logMessage(\"Autofinder found no devices.\");\n return null; //Nothing was identified.\n }",
"@Override\n public void onConnectionStateChange(BluetoothGatt gatt, int status,\n int newState) {\n Log.i(\"onConnectionStateChange\", \"The connection status has changed. status:\" + status + \" newState:\" + newState + \"\");\n try {\n if(status == BluetoothGatt.GATT_SUCCESS) {\n switch (newState) {\n // Has been connected to the device\n case BluetoothProfile.STATE_CONNECTED:\n Log.i(\"onConnectionStateChange\", \"Has been connected to the device\");\n if(_ConnectionStatus == ConnectionStatus.Connecting) {\n _ConnectionStatus = ConnectionStatus.Connected;\n try {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnConnected();\n if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_BONDED){\n //Url : https://github.com/NordicSemiconductor/Android-DFU-Library/blob/release/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java\n Log.i(\"onConnectionStateChange\",\"Waiting 1600 ms for a possible Service Changed indication...\");\n // Connection successfully sleep 1600ms, the connection success rate will increase\n Thread.sleep(1600);\n }\n } catch (Exception e){}\n // Discover service\n gatt.discoverServices();\n }\n break;\n // The connection has been disconnected\n case BluetoothProfile.STATE_DISCONNECTED:\n Log.i(\"onConnectionStateChange\", \"The connection has been disconnected\");\n if(_ConnectionStatus == ConnectionStatus.Connected) {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n Close();\n _ConnectionStatus = ConnectionStatus.DisConnected;\n break;\n /*case BluetoothProfile.STATE_CONNECTING:\n Log.i(\"onConnectionStateChange\", \"Connecting ...\");\n _ConnectionStatus = ConnectionStatus.Connecting;\n break;\n case BluetoothProfile.STATE_DISCONNECTING:\n Log.i(\"onConnectionStateChange\", \"Disconnecting ...\");\n _ConnectionStatus = ConnectionStatus.DisConnecting;\n break;*/\n default:\n Log.e(\"onConnectionStateChange\", \"newState:\" + newState);\n break;\n }\n }else {\n Log.i(\"onConnectionStateChange\", \"GATT error\");\n Close();\n if(_ConnectionStatus == ConnectionStatus.Connecting\n && _Timeout - (new Date().getTime() - _ConnectStartTime.getTime()) > 0) {\n Log.i(\"Connect\", \"Gatt Error! Try to reconnect (\"+_ConnectIndex+\")...\");\n _ConnectionStatus = ConnectionStatus.DisConnected;\n Connect(); // Connect\n }else {\n _ConnectionStatus = ConnectionStatus.DisConnected;\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n }\n }catch (Exception ex){\n Log.e(\"onConnectionStateChange\", ex.toString());\n }\n super.onConnectionStateChange(gatt, status, newState);\n }",
"public void checkDevices() throws TNotFoundEx{\n\t\tString command = \"adb devices -l\";\n\t\tCommando commando = new Commando();\n\t\tString op = commando.executeCommand(command);\n\t\t\n\t\tOtherUtil oU = new OtherUtil();\n\t\tArrayList<String> devices = oU.getRegexFromString(op, \"(model:.*?device:.+$?)\");\n\t\tint eligDevices = devices.size();\n\t\t\n\t\tif (eligDevices>1)\n\t\t\tthrow new TNotFoundEx(\"ERROR: 2 or more Android devices are connected to the host, please connect only one Android device.\");\n\t\tif (eligDevices == 0)\n\t\t\tthrow new TNotFoundEx(\"ERROR: No Android devices detected by the host. Execute adb devices -l to check the connected devices\");\n\t\t\t\n\t}",
"@Override\n public void checkBluetoothInteface() {\n if (!isConnected) {\n checkForBluetooth();\n }\n }",
"public void bluetooth_enable_discoverability()\r\n {\n\t\t\r\n Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);\r\n\t\tdiscoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);\r\n\t\tLoaderActivity.m_Activity.startActivity(discoverableIntent);\r\n\t\tserver_connect_thread = new Server_Connect_Thread();\r\n\t\tserver_connect_thread.start();\r\n\t\tmessages.clear();\r\n }",
"private void scanSSIDs() {\n if (mRecognitionTimeoutAnimation != null) mRecognitionTimeoutAnimation.cancel();\n\n // UI Updates\n hideMatchView();\n mRescanButton.setVisibility(View.GONE);\n mTimeClockBar.setVisibility(View.GONE);\n mScannerView.setAnimated(false);\n\n mStatusTextView.setVisibility(View.VISIBLE);\n mStatusTextView.setText(R.string.status_wifi_search);\n mStatusProgressBar.setVisibility(View.VISIBLE);\n\n scanSSIDsInBackground();\n }",
"@Test\n public void registerScanListener() throws Exception {\n WifiScanner.ScanSettings requestSettings = createRequest(WifiScanner.WIFI_BAND_BOTH, 0,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n WifiNative.ScanSettings nativeSettings = computeSingleScanNativeSettings(requestSettings);\n ScanResults results = ScanResults.create(0, 2400, 5150, 5175);\n\n int requestId = 12;\n int listenerRequestId = 13;\n\n startServiceAndLoadDriver();\n\n Handler handler = mock(Handler.class);\n BidirectionalAsyncChannel controlChannel = connectChannel(handler);\n InOrder order = inOrder(handler, mWifiScannerImpl);\n\n when(mWifiScannerImpl.startSingleScan(any(WifiNative.ScanSettings.class),\n any(WifiNative.ScanEventHandler.class))).thenReturn(true);\n\n registerScanListener(controlChannel, listenerRequestId);\n mLooper.dispatchAll();\n verifySuccessfulResponse(order, handler, listenerRequestId);\n\n sendSingleScanRequest(controlChannel, requestId, requestSettings, null);\n\n mLooper.dispatchAll();\n WifiNative.ScanEventHandler eventHandler = verifyStartSingleScan(order, nativeSettings);\n verifySuccessfulResponse(order, handler, requestId);\n\n when(mWifiScannerImpl.getLatestSingleScanResults())\n .thenReturn(results.getRawScanData());\n eventHandler.onScanStatus(WifiNative.WIFI_SCAN_RESULTS_AVAILABLE);\n\n mLooper.dispatchAll();\n verifyScanResultsReceived(order, handler, requestId, results.getScanData());\n verifySingleScanCompletedReceived(order, handler, requestId);\n verifyScanResultsReceived(order, handler, listenerRequestId, results.getScanData());\n verify(mContext).sendBroadcastAsUser(any(Intent.class), eq(UserHandle.ALL));\n verifyNoMoreInteractions(handler);\n\n assertDumpContainsRequestLog(\"registerScanListener\", listenerRequestId);\n assertDumpContainsCallbackLog(\"singleScanResults\", listenerRequestId,\n \"results=\" + results.getScanData().getResults().length);\n }",
"@Override\n public void run() {\n mLocalManager.startLEScan(0);\n }"
] | [
"0.7551237",
"0.73364407",
"0.6999834",
"0.6997597",
"0.6875388",
"0.6831643",
"0.66943574",
"0.66730136",
"0.6629817",
"0.65267664",
"0.6503841",
"0.6436555",
"0.63836294",
"0.6286863",
"0.62645787",
"0.6132144",
"0.60748684",
"0.600032",
"0.5986813",
"0.59352607",
"0.59161603",
"0.58700025",
"0.58660686",
"0.5850184",
"0.5784195",
"0.5771711",
"0.5735099",
"0.57083774",
"0.56963134",
"0.56558746",
"0.5638466",
"0.56287754",
"0.55923617",
"0.5588272",
"0.5570088",
"0.55560726",
"0.55170953",
"0.549122",
"0.548943",
"0.54496247",
"0.54485744",
"0.5427879",
"0.5416829",
"0.54010576",
"0.53896105",
"0.5388674",
"0.53791064",
"0.53034675",
"0.5286154",
"0.52642566",
"0.52569264",
"0.52569264",
"0.5236597",
"0.5210017",
"0.51990885",
"0.51907337",
"0.5188093",
"0.5187334",
"0.5152986",
"0.51418835",
"0.5140086",
"0.51218104",
"0.5119633",
"0.51164764",
"0.5086579",
"0.50708586",
"0.50637484",
"0.50544745",
"0.5034548",
"0.50344163",
"0.50269586",
"0.50050116",
"0.49812505",
"0.49498674",
"0.49237996",
"0.49169925",
"0.49009454",
"0.48698452",
"0.48622242",
"0.48549455",
"0.4850137",
"0.48377225",
"0.48352668",
"0.4823302",
"0.48224023",
"0.48095378",
"0.48021704",
"0.47967353",
"0.47956893",
"0.47683662",
"0.475597",
"0.47550735",
"0.47431993",
"0.47382697",
"0.47297487",
"0.47279924",
"0.47215998",
"0.47117653",
"0.4702649",
"0.47022626"
] | 0.67469394 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.