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
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.plugin_class
public String getPluginClass() { return pluginClass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPluginClass() {\n return pluginClass;\n }", "public String getPluginClassAttr() {\n return pluginClassAttr;\n }", "public Type getPluginType()\r\n\t{\r\n\t\treturn _pluginType; \r\n\t}", "public BatchClassPluginDTO getSelectedPlugin() {\n\t\treturn selectedPlugin;\n\t}", "public void setPluginClass(String pluginClass) {\n this.pluginClass = pluginClass == null ? null : pluginClass.trim();\n }", "private Class<?> getPluginMainClass(Plugin plugin, URLClassLoader urlClassLoader)\n throws ClassNotFoundException {\n final String moduleName = plugin.getModuleName(manifestLoader);\n if (moduleName != null && moduleName.length() > 0) {\n return Class.forName(moduleName, true, urlClassLoader);\n }\n final String initializerName = plugin.getInitializerName(manifestLoader);\n if (initializerName != null && initializerName.length() > 0) {\n return Class.forName(initializerName, true, urlClassLoader);\n }\n throw new IllegalArgumentException(\"Cannot determine main class for \"\n + plugin.getName(manifestLoader) +\n \" please see http://code.google.com/p/js-test-driver/wiki/Plugins#mainclass.\");\n }", "public BatchClassPluginConfigDTO getPluginConfigDTO() {\n\t\treturn pluginConfigDTO;\n\t}", "public String getPluginClassAttrNs() {\n return pluginClassAttrNs;\n }", "public String getPlugin() {\n\t\treturn adaptee.getPlugin();\n\t}", "public Plugin getPlugin()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TrackerTableChangeLog.class;\r\n\t}", "public String getDriverClass() {\n return driverClass;\n }", "public StrColumn getClazz() {\n return delegate.getColumn(\"class\", DelegatingStrColumn::new);\n }", "@Override\n public String getPluginId() {\n return PLUGIN_ID;\n }", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TVendor.class;\r\n\t}", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "public String getJavaType() {\n return type.getJavaType(isInt52());\n }", "public BatchClassDynamicPluginConfigDTO getBatchClassDynamicPluginConfigDTO() {\n\t\treturn batchClassDynamicPluginConfigDTO;\n\t}", "public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public synchronized PluginClassLoader getPluginClassloader( Plugin plugin )\n {\n return classloaders.get( plugin );\n }", "public static Plugin getPlugin() {\n return plugin;\n }", "public Integer getPropertyClass()\r\n\t{\r\n\t\treturn propertyClass;\r\n\t}", "public String metadataClass() {\n return this.metadataClass;\n }", "public PluginComponent getPluginComponent()\n {\n return (PluginComponent) getSource();\n }", "public APlugin getPlugin() {\n return plugin;\n }", "public Optional<Class<? extends BaseType>> getClass(final String id) {\n return Optional.ofNullable(this.registeredPlugins.get(id))\n .map(meta -> meta.clazz)\n .map(clazz -> (Class<? extends BaseType>) clazz);\n }", "String getJdbcDriverClassName();", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "public Class getJavaClass() {\n return _class;\n }", "public MusterCull getPluginInstance() {\n\t\treturn pluginInstance;\n\t}", "public int getJDBCTypeId() {\r\n return typeId.getJDBCTypeId();\r\n }", "public String getDBInstanceClass() {\n return this.dBInstanceClass;\n }", "private Plugin getPluginVersionFromPluginManagement( Plugin plugin )\n {\n\n if ( !isPluginManagementDefined() )\n {\n return plugin;\n }\n\n if ( isPluginVersionDefined( plugin ) )\n {\n return plugin;\n }\n\n Map<String, Plugin> plugins = getMavenProject().getPluginManagement().getPluginsAsMap();\n\n Plugin result = plugins.get( plugin.getKey() );\n if ( result == null )\n {\n return plugin;\n }\n else\n {\n return result;\n }\n }", "Class<?> getJavaType();", "@Override\n public int getPluginId() {\n return 10202;\n }", "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "public String getNodeClass(String region, String agent, String plugin)\n {\n try\n {\n if((region != null) && (agent == null) && (plugin == null))\n {\n return \"rNode\";\n }\n else if((region != null) && (agent != null) && (plugin == null))\n {\n return \"aNode\";\n }\n else if((region != null) && (agent != null) && (plugin != null))\n {\n return \"pNode\";\n }\n }\n catch(Exception ex)\n {\n System.out.println(\"getNodeClass: Error \" + ex.toString());\n }\n return null;\n\n }", "public Class<?> getConversionClass();", "Plugin getPlugin();", "String getResultClass();", "public String getExtensionClass()\n {\n return extensionClass;\n }", "@Override\n\tpublic String getPlayerClass()\n\t{\n\t\treturn source.getPlayerClass();\n\t}", "public int getJdbcType();", "String getGeneratedClassName();", "String getGeneratedClassName();", "String getGeneratedClassName();", "@Override\n\tpublic String getPluginVersion() {\n\t\treturn null;\n\t}", "public String getClassType() {\n return classType;\n }", "public abstract Class<BE> getBukkitEntityType();", "public PlayerClass getPromotedClass() {\r\n PlayerClass[] playerClasses = PlayerClass.values();\r\n return playerClasses[getIndex() + PlayerClass.values().length / 2];\r\n }", "public PluginVersion getVersion() {\n return version;\n }", "protected abstract String getPluginId();", "@Override\n public PluginDescription getPluginDetails() {\n return new PluginDescription(this);\n }", "Plugin getPlugin( );", "@ModelNodeBinding(detypedName = \"driver-class-name\")\n\tpublic String driverClassName() {\n\t\treturn this.driverClassName;\n\t}", "public Class<?> getAdaptorClazz() {\n if (adaptorClass == null) {\n return null;\n }\n\n try {\n return Class.forName(adaptorClass);\n } catch (final ClassNotFoundException e) {\n LOGGER.warn(\"class \\\"\" + adaptorClass + \"\\\" not found: \", e);\n return null;\n }\n }", "public void addPlugin(String key, T pluginClass);", "@Accessor(qualifier = \"converterClass\", type = Accessor.Type.GETTER)\n\tpublic ExportConverterEnum getConverterClass()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CONVERTERCLASS);\n\t}", "public Class getColumnClass(int columnIdx)\r\n\t{\r\n\t\treturn columnClass[columnIdx];\r\n\t}", "@Nullable\n public abstract String getPf4jPluginId();", "public Class getTypeClass() {\r\n\t\treturn (typeClass);\r\n\t}", "public PlayerPluginWrapperType getWrapperType() {\n return wrapperType;\n }", "public int getJDBCTypeId()\n {\n return JDBCTypeId;\n }", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TeamStudent.class;\r\n\t}", "public static String getDatabaseClassName() {\n\t\tif (xml == null) return null;\n\t\treturn databaseClassName;\n\t}", "public Class<? extends StructureVillagePieces.Village> getComponentClass() {\n/* 27 */ return (Class)TekHouse6.class;\n/* */ }", "public Class<?> getJavaClass() {\n return clazz;\n }", "public APluginEntityTree getPluginEntityTree() {\r\n\t\treturn pluginEntityTree;\r\n\t}", "public Class<?> getConnectorClass() {\n\t\t\treturn connectorClass;\n\t\t}", "public Class getTableClass() {\n\t\treturn entityClass;\r\n\t}", "public abstract String toJavaType(int sqlType);", "public String getPluginIdAttr() {\n return pluginIdAttr;\n }", "public String getPluginPath() {\n return pluginPath;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "public Class<X> getJavaClass() {\n\t\treturn javaClass;\n\t}", "public Class<?> getBeanClass() {\r\n return beanClass;\r\n }", "@Override\n public Class<?> getColumnClass(int column) {\n return columnClasses[column];\n }", "@Override\n public Class<?> getColumnClass(int column) {\n return columnClasses[column];\n }", "public String getModuleTypeClass();", "public String getSqlType() {\n\t\treturn this.sqlType;\n\t}", "public PluginConsistency getPluginConsistency()\n {\n return getPluginConsistency(true, true);\n }", "public Class<? extends T> getUIBeanClass() {\r\n\t\tif (null == uiBeanClass && null == getEntityMetaModel())\r\n\t\t\treturn null;\r\n\t\treturn null == uiBeanClass ? entityMetaModel.getUIBeanClass() : uiBeanClass;\r\n\t}", "public String getBundleId() {\n\t return PLUGIN_ID;\n\t}", "public String getCapJavaType() {\n return type.getCapJavaType(isInt52());\n }", "public Class getColumnClass(int column)\n\t {\n\t return getValueAt(0, column).getClass();\n\t }", "@Override\n public PluginInformation getPluginInformation() {\n return super.getPluginInformation();\n }", "public <PLUGIN> PLUGIN as(SeleniumQueryPlugin<PLUGIN> pluginFunction) {\n\t\treturn pluginFunction.as(this);\n\t}", "@Override\n public Class getColumnClass(int columnIndex) {\n Class clase = Object.class;\n\n Object aux = getValueAt(0, columnIndex);\n if (aux != null) {\n clase = aux.getClass();\n }\n\n return clase;\n }" ]
[ "0.77800316", "0.6623292", "0.6533536", "0.6363748", "0.5885499", "0.57156295", "0.5705642", "0.56783295", "0.56732225", "0.5640782", "0.5601761", "0.5502015", "0.5479039", "0.5428915", "0.5425938", "0.54132605", "0.53975695", "0.538852", "0.53756404", "0.5360709", "0.5359699", "0.53472084", "0.53198326", "0.5319187", "0.52942365", "0.52746767", "0.52444166", "0.5178519", "0.51533276", "0.51530343", "0.5119399", "0.511855", "0.5098059", "0.508705", "0.5066609", "0.5066131", "0.50636697", "0.50430435", "0.5022936", "0.5020644", "0.5014072", "0.50114274", "0.50094354", "0.49822775", "0.49822775", "0.49822775", "0.49778974", "0.4972241", "0.49710798", "0.4966638", "0.49646166", "0.49633235", "0.49447244", "0.49306375", "0.4930331", "0.49214908", "0.4920791", "0.49205577", "0.4919191", "0.4912269", "0.49045908", "0.49034446", "0.49025062", "0.4898355", "0.48829606", "0.48818365", "0.48801744", "0.4868193", "0.48610747", "0.48577446", "0.48500547", "0.48330694", "0.48178098", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48109508", "0.48046675", "0.48046675", "0.47919804", "0.47772828", "0.47762632", "0.47762632", "0.47744182", "0.47736877", "0.4761781", "0.47572324", "0.4750424", "0.47492325", "0.4742632", "0.47397944", "0.47330248", "0.47323617" ]
0.774663
1
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.plugin_class
public void setPluginClass(String pluginClass) { this.pluginClass = pluginClass == null ? null : pluginClass.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPluginClass() {\n return pluginClass;\n }", "public String getPluginClass() {\n return pluginClass;\n }", "public void setPlugin(Plugin plugin)\r\n\t{\r\n\t\tthis.plugin = plugin;\r\n\t}", "public void setSelectedPlugin(BatchClassPluginDTO selectedPlugin) {\n\t\tthis.selectedPlugin = selectedPlugin;\n\t}", "public void setPlugin(APlugin plugin) {\n this.plugin = plugin;\n }", "public String getPluginClassAttr() {\n return pluginClassAttr;\n }", "public void addPlugin(String key, T pluginClass);", "@Override\n public boolean setPlugin(IAuthorizationPlugin plugin) {\n if (!getName().equals(plugin.getClass().getCanonicalName())\n || !getName().equals(plugin.getClass().getName())) {\n return false;\n }\n if (hasPlugin()) {\n unload();\n }\n try {\n /**\n * The exception should not happen here as we already have an\n * instance of IAuthorizationPlugin. But it is required by the\n * compiler.\n *\n * NOTE: If we were to add a throws clause here we would interrupt\n * the whole stack walk through and prevent the other authorization\n * entities to work properly.\n */\n this.plugin = plugin.getClass().getDeclaredConstructor().newInstance();\n return true;\n } catch (InstantiationException ex) {\n LOGGER.log(Level.INFO, \"Class could not be instantiated: \", ex);\n } catch (IllegalAccessException ex) {\n LOGGER.log(Level.INFO, \"Class loader threw an exception: \", ex);\n } catch (Throwable ex) {\n LOGGER.log(Level.INFO, \"Class loader threw an unknown error: \", ex);\n }\n return false;\n }", "public void setPluginVersion(String pluginVersion);", "public void setPluginClassAttribute(String namespaceUri, \n String attrName) {\n pluginClassAttrNs = namespaceUri;\n pluginClassAttr = attrName;\n }", "public void setDriverClass(String driverClass) throws PropertyVetoException {\n\t\tthis.dataSource.setDriverClass(driverClass);\n\t}", "public void setPluginInstance(MusterCull pluginInstance) {\n\t\tthis.pluginInstance = pluginInstance;\n\t}", "public Type getPluginType()\r\n\t{\r\n\t\treturn _pluginType; \r\n\t}", "public BatchClassPluginDTO getSelectedPlugin() {\n\t\treturn selectedPlugin;\n\t}", "public void setPluginConfigDTO(BatchClassPluginConfigDTO pluginConfigDTO) {\n\t\tthis.pluginConfigDTO = pluginConfigDTO;\n\t}", "public MeaFlarf(JavaPlugin plugin){\n\t\tthis.plugin = plugin;\n\t}", "public interface Plugin {\n /**\n * What is the name of this plugin?\n *\n * The framework will use this name when storing the versions\n * (code version and schema version) in the database, and, if\n * this is the Application Plugin, in the help menu, main frame\n * title bar, and other displays wherever the application name\n * is shown.\n *\n * The column used to store this in the database is 40\n * characters wide.\n *\n * @return the name of this plugin\n */\n String getName();\n\n /**\n * What is the version number of this plugin's code?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the code version of this plugin\n */\n String getVersion();\n\n /**\n * Allow a plugin to provide any plugin-specific application\n * context files.\n *\n * Can return null or an empty list if there are none.\n * The elements of the list are paths to resources inside the\n * plugin's jar, e.g. org/devzendo/myapp/app.xml\n *\n * @return a list of any application contexts that the plugin\n * needs to add to the SpringLoader, or null, or empty list.\n */\n List<String> getApplicationContextResourcePaths();\n\n /**\n * Give the SpringLoader to the plugin, after the\n * application contexts for all plugins have been loaded\n * @param springLoader the SpringLoader\n */\n void setSpringLoader(final SpringLoader springLoader);\n\n /**\n * Obtain the SpringLoader for plugin use\n * @return the SpringLoader\n */\n SpringLoader getSpringLoader();\n\n /**\n * What is the database schema version of this plugin?\n *\n * The framework will use this name when storing the versions\n * in the database.\n *\n * @return the database schema version of this plugin\n */\n String getSchemaVersion();\n\n /**\n * Shut down the plugin, freeing any resources. Called by the\n * framework upon system shutdown.\n */\n void shutdown();\n}", "@Override\n\tpublic void setPluginFile(String pluginPath) {\n\t\t\n\t\tthis.pluginsPath = pluginPath;\n\t\tSAXBuilder builder = new SAXBuilder();\n\t\ttry {\n\t\t\tdoc = builder.build(new File(this.pluginsPath));\n\t\t} catch (JDOMException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setDriverClass(String driverClass) {\n this.driverClass = driverClass;\n }", "void setPluginstate(java.lang.String pluginstate);", "public void setClass_(String newValue);", "public <PLUGIN> PLUGIN as(SeleniumQueryPlugin<PLUGIN> pluginFunction) {\n\t\treturn pluginFunction.as(this);\n\t}", "void setClassType(String classType);", "public void setPluginName(String pluginName);", "@Override\n public String getPluginId() {\n return PLUGIN_ID;\n }", "public String getPluginClassAttrNs() {\n return pluginClassAttrNs;\n }", "@Override\n\tpublic void addPlugin(ComponentPlugin plugin) throws Exception {\n\n\t}", "public void setChosenClass(String chosenClass) {\n this.chosenClass = chosenClass;\n }", "@Override\n public int getPluginId() {\n return 10202;\n }", "private Class<?> getPluginMainClass(Plugin plugin, URLClassLoader urlClassLoader)\n throws ClassNotFoundException {\n final String moduleName = plugin.getModuleName(manifestLoader);\n if (moduleName != null && moduleName.length() > 0) {\n return Class.forName(moduleName, true, urlClassLoader);\n }\n final String initializerName = plugin.getInitializerName(manifestLoader);\n if (initializerName != null && initializerName.length() > 0) {\n return Class.forName(initializerName, true, urlClassLoader);\n }\n throw new IllegalArgumentException(\"Cannot determine main class for \"\n + plugin.getName(manifestLoader) +\n \" please see http://code.google.com/p/js-test-driver/wiki/Plugins#mainclass.\");\n }", "public final void mT__275() throws RecognitionException {\r\n try {\r\n int _type = T__275;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // InternalSpringConfigDsl.g:276:8: ( 'set-class=' )\r\n // InternalSpringConfigDsl.g:276:10: 'set-class='\r\n {\r\n match(\"set-class=\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "protected void setJavaClass(Class type) {\n this._class = type;\n }", "@Override\n\tpublic void registerPrimaryTypes() {\n\t\tobjectType = registerJavaType(getBuilder().getName(), ClassType.CLASS);\n\t}", "synchronized private void tryRegisterPlugin(String name, Class<IKomorebiPlugin> pluginClass){\r\n\t\t\r\n\t\t// check status\r\n\t\tKomorebiPluginStatus pStatus = pluginClass.getAnnotation(KomorebiPluginStatus.class);\r\n\t\tif(pStatus != null){\r\n\t\t\tif(pStatus.disabled()){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Plugin '\"+pluginClass.getName()+\"' is disabled.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// check if configuration consumer is correctly implemented\r\n\t\ttry{\r\n\t\t\tConstructor<IKomorebiPlugin> c = pluginClass.getConstructor();\r\n\t\t\tIKomorebiPlugin pi = c.newInstance();\r\n\t\t\tif(pi.isConfigConsumer() && !IKomorebiConfigurationConsumer.class.isAssignableFrom(pluginClass)){\r\n\t\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (configuration consumer) and will be omitted.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}catch(NoSuchMethodException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' does not adhere to defined standards (default constructor) and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InvocationTargetException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(IllegalAccessException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}catch(InstantiationException e){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).warning(\"Plugin '\"+name+\"' caused an error (\"+e.getMessage()+\") and will be omitted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif(IKomorebiStorage.class.isAssignableFrom(pluginClass)){\r\n\t\t\tLogger.getLogger(LOGGER_NAME).info(\"Registered storage PlugIn '\"+pluginClass.getName()+\"'\");\r\n\t\t\tif(!pluginRegister.containsKey(PluginType.STORAGE)){\r\n\t\t\t\t// if submap does not already exist it has to be created\r\n\t\t\t\tpluginRegister.put(PluginType.STORAGE, new HashMap<String, Class<IKomorebiPlugin>>());\r\n\t\t\t}\r\n\t\t\tpluginRegister.get(PluginType.STORAGE).put(name, pluginClass);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public Plugin getPlugin()\r\n\t{\r\n\t\treturn plugin;\r\n\t}", "@Override\n\tpublic void addRolePlugin(ComponentPlugin plugin) throws Exception {\n\n\t}", "@Override\r\n public void store( Component component, Plugin plugin )\r\n {\r\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, plugin );\r\n\r\n daoUtil.setInt( 1, component.getId( ) );\r\n daoUtil.setString( 2, component.getGroupId( ) );\r\n daoUtil.setString( 3, component.getTitle( ) );\r\n daoUtil.setString( 4, component.getDescription( ) );\r\n daoUtil.setString( 5, component.getArtifactId( ) );\r\n daoUtil.setString( 6, component.getVersion( ) );\r\n daoUtil.setString( 7, component.getComponentType( ) );\r\n daoUtil.setInt( 8, component.getId( ) );\r\n\r\n daoUtil.executeUpdate( );\r\n daoUtil.free( );\r\n }", "@Override\n public boolean modelSetterMethodGenerated(Method method,\n TopLevelClass topLevelClass,\n IntrospectedColumn introspectedColumn,\n IntrospectedTable introspectedTable,\n ModelClassType modelClassType) {\n return false;\n }", "public void setJavaClass(java.lang.String javaClass)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(JAVACLASS$24);\r\n }\r\n target.setStringValue(javaClass);\r\n }\r\n }", "public void setBatchClassDynamicPluginConfigDTO(BatchClassDynamicPluginConfigDTO batchClassDynamicPluginConfigDTO) {\n\t\tthis.batchClassDynamicPluginConfigDTO = batchClassDynamicPluginConfigDTO;\n\t}", "@Override\n public void executeByPluginType(PluginType pluginType) {\n pluginFactory\n .getPlugin(pluginType)\n .otherOutput();\n }", "public void setClassType(String classType) {\n\t\t\t\n\t\t\tfor(E_ClassType c : E_ClassType.values())\n\t\t\t{\n\t\t\t\tif(c.toString().equals(classType))\n\t\t\t\t{\n\t\t\t\t\tthis.classType = E_ClassType.valueOf(classType);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.classType = E_ClassType.Tourists;\n\t\t\t\n\t\t}", "public String getDriverClass() {\n return driverClass;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic T driverClassName(String value) {\n\t\tthis.driverClassName = value;\n\t\treturn (T) this;\n\t}", "public APlugin getPlugin() {\n return plugin;\n }", "public static void saveToDatabase(ATPluginData pluginData) throws Exception {\n try {\n DomainAccessObject access =\n DomainAccessObjectFactory.getInstance().getDomainAccessObject(ATPluginData.class);\n access.getLongSession();\n access.updateLongSession(pluginData);\n } catch(Exception e) {\n e.printStackTrace();\n throw new Exception(\"Error Saving Plugin Data to Database ...\");\n }\n }", "public ConfigurationHandler(JavaPlugin plugin){\n this.PLUGIN = plugin;\n if(!this.PLUGIN.getDataFolder().exists()){\n this.PLUGIN.getDataFolder().mkdir();\n }\n }", "public boolean oldedPlugin(Connection conn, String businessKey)\r\n/* 61: */ throws SQLException\r\n/* 62: */ {\r\n/* 63:108 */ return this.dao.updPlugin(conn, businessKey);\r\n/* 64: */ }", "protected void setPluginCache(OwPluginStatusCachingUtility newCache)\r\n {\r\n this.pluginCache = newCache;\r\n }", "public SARLEclipsePlugin() {\n\t\tsetDefault(this);\n\t}", "public void setExtensionClass(String extensionClass)\n {\n this.extensionClass = extensionClass;\n }", "public void save(JavaPlugin plugin) {\n\t\tFile file = new File(plugin.getDataFolder(), FILE);\n\n\t\tif (!file.exists()) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tFileOutputStream fileStream = null;\n\t\tObjectOutputStream objectStream = null;\n\n\t\ttry {\n\t\t\tfileStream = new FileOutputStream(file);\n\t\t\tobjectStream = new ObjectOutputStream(fileStream);\n\t\t\tobjectStream.writeObject(this);\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} finally {\n\t\t\ttry {\n\t\t\t\tif (fileStream != null) {\n\t\t\t\t\tfileStream.close();\n\t\t\t\t}\n\n\t\t\t\tif (objectStream != null) {\n\t\t\t\t\tobjectStream.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void setPreparedStatementType(Class<? extends PreparedStatement> preparedStatementType)\r\n/* 30: */ {\r\n/* 31: 78 */ this.preparedStatementType = preparedStatementType;\r\n/* 32: */ }", "public BatchClassPluginConfigDTO getPluginConfigDTO() {\n\t\treturn pluginConfigDTO;\n\t}", "public JavaFileWriter setGeneratorClass(final Class<?> generatorClass) {\n this.generatorClass = generatorClass;\n return this;\n }", "@Override\r\n public ActiveRecordPlugin createRecordPlugin(Plugins plugin, DataSourceConfig dataSourceConfig) {\n \tDruidPlugin druidPlugin = new DruidPlugin(dataSourceConfig.getUrl(),\n \t\t\tdataSourceConfig.getUser(),dataSourceConfig.getPassword(), dataSourceConfig.getDriverClassName());\n \t// 1.统计信息插件\n \tStatFilter statFilter = new StatFilter();\n \tstatFilter.setMergeSql(dataSourceConfig.isDruidMergeSql());\n \tstatFilter.setLogSlowSql(dataSourceConfig.isDruidLogSlowSql());\n \t// 慢查询目前设置为1s,随着优化一步步进行慢慢更改\n \tstatFilter.setSlowSqlMillis(dataSourceConfig.getDruidSlowSqlMillis());\n \tdruidPlugin.addFilter(statFilter);\n \tString dbtype = dataSourceConfig.getType();\n \tif(!\"sqlite\".equals(dbtype)) {\n \t\tWallFilter wall = new WallFilter();\n \t\tProp prop = PropKit.use(\"druid_wall.properties\");\n \t\tif(prop!=null) {\n \t\t\twall.configFromProperties(prop.getProperties());\n \t\t}\n \t\twall.setDbType(dbtype);\n \t\tdruidPlugin.addFilter(wall);\n \t}\n\t\t\n\t\tdruidPlugin.setInitialSize(dataSourceConfig.getInitialSize());\n\t\tdruidPlugin.setMinIdle(dataSourceConfig.getMinIdle());\n\t\tdruidPlugin.setMaxActive(dataSourceConfig.getMaxActive());\n\t\tdruidPlugin.setMaxWait(dataSourceConfig.getMaxWait());\n\t\tif(plugin!=null) {\n\t\t\tplugin.add(druidPlugin);\n\t\t}\r\n\t\tString configName = dataSourceConfig.getName();\r\n ActiveRecordPlugin activeRecordPlugin = StringUtils.isNotBlank(configName)\r\n ? new ActiveRecordPlugin(configName, druidPlugin)\r\n : new ActiveRecordPlugin(druidPlugin);\r\n\t\treturn activeRecordPlugin;\r\n }", "@ZAttr(id=1112)\n public Map<String,Object> setGalLdapGroupHandlerClass(String zimbraGalLdapGroupHandlerClass, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalLdapGroupHandlerClass, zimbraGalLdapGroupHandlerClass);\n return attrs;\n }", "public void setCandidateType(Class cls) {\n _candidate = cls;\n }", "public static synchronized String getSetterForPreparedStatement(Class<?> cls) {\r\n\r\n String typ = cls.getCanonicalName();\r\n\r\n StringBuilder sb = new StringBuilder();\r\n\r\n sb.append(\"set\");\r\n\r\n if (null != typ) {\r\n switch (typ) {\r\n case \"java.lang.Integer\":\r\n sb.append(\"Int\");\r\n break;\r\n case \"java.util.Date\":\r\n case \"java.sql.Date\":\r\n //toto nieje potreba, ale budiz.\r\n sb.append(\"String\");\r\n break;\r\n case \"byte[]\":\r\n case \"java.lang.Byte[]\":\r\n case \"java.io.InputStream\":\r\n sb.append(\"Bytes\");\r\n\r\n break;\r\n case \"sk.stefan.enums.VoteResult\":\r\n case \"sk.stefan.enums.VoteAction\":\r\n case \"sk.stefan.enums.Stability\":\r\n case \"sk.stefan.enums.UserType\":\r\n case \"sk.stefan.enums.PublicUsefulness\":\r\n case \"sk.stefan.enums.FilterType\":\r\n case \"sk.stefan.enums.NonEditableFields\":\r\n case \"sk.stefan.enums.PublicRoleType\":\r\n\r\n sb.append(\"Int\");\r\n break;\r\n\r\n default:\r\n String fields[] = typ.split(\"\\\\.\");\r\n sb.append(fields[fields.length - 1]);\r\n break;\r\n }\r\n }\r\n\r\n String s = sb.toString();\r\n //System.out.println(\"SKACU: \" + s);\r\n // ResultSet#getTimestamp() you need java.sql.Timestamp\r\n return s;\r\n }", "public interface Plugin\n{\n\tpublic String getPluginName();\n}", "@SuppressWarnings(\"unchecked\")\n\tpublic T driverDatasourceClassName(String value) {\n\t\tthis.driverDatasourceClassName = value;\n\t\treturn (T) this;\n\t}", "public interface Plugin<T> {\n\t/**\n\t * Method returns the hashmap with loaded plugins. </p> Hashmap is inside\n\t * PluginManager class.\n\t * \n\t * @return hashmap with loaded plugins\n\t */\n\tpublic HashMap<String, T> getStorage();\n\n\t/**\n\t * Method adds the plugin specified in pluginClass param into hashmap with\n\t * param key. </p> Hashmap is inside PluginManager class.\n\t * \n\t * @param key\n\t * to hashmap with added plugin\n\t * @param pluginClass\n\t * of type class to save into hashmap\n\t */\n\tpublic void addPlugin(String key, T pluginClass);\n\n\t/**\n\t * Name of the plugin.\n\t * \n\t * @return name of plugin\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Tests if the plugin has any error\n\t * \n\t * @return true if there is any error.\n\t */\n\tpublic boolean hasError();\n}", "public CommandHandler(MCAdmin plugin) {\n\t\tthis.plugin = plugin;\n\t\t//this.conn = plugin.getConnection();\n\t\t//this.wi = plugin.getWeb();\n\t}", "@Override\r\n\tpublic void configPlugin(Plugins me) {\n\r\n\t}", "public void setObjectClass(final Class<? extends DBObject> aClass) {\n setObjectFactory(objectFactory.update(aClass));\n }", "void xsetPluginstate(org.apache.xmlbeans.XmlString pluginstate);", "public void setValueClass(Class<? extends Type> valueClass) {\n this.valueClass = valueClass;\n }", "public abstract String toJavaType(int sqlType);", "public void setPluginManager(PluginManager pluginManager);", "public void store( JasperReport report, Plugin plugin )\n {\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, plugin ) )\n \t{\n \t\tdaoUtil.setInt( 1, report.getIdReport( ) );\n daoUtil.setString( 2, report.getCode( ) );\n daoUtil.setInt( 3, report.getIdReport( ) );\n\n daoUtil.executeUpdate( ); \t \n \t}\n }", "public void setPropertyClass(Integer propertyClass)\r\n\t{\r\n\t\tthis.propertyClass = propertyClass;\r\n\t}", "protected void pluginInitialize() {}", "public void setClazz(String clazz);", "public void setClass(String sClass) {\n\t\t\tsRuleClassName = sClass;\n\t\t}", "@Accessor(qualifier = \"converterClass\", type = Accessor.Type.SETTER)\n\tpublic void setConverterClass(final ExportConverterEnum value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CONVERTERCLASS, value);\n\t}", "protected ModelType newJavaType(Class clazz) {\n\t\treturn new JavaType(clazz);\n\t}", "protected abstract void onPluginEnable();", "private static void writeClass( Writer writer, String packageName, PluginDescriptor pluginDescriptor )\n throws IOException\n {\n if ( packageName.length() > 0 )\n {\n writer.write( \"package \" + packageName + \";\" + LS );\n writer.write( LS );\n }\n \n writeImports( writer );\n writer.write( LS );\n \n writeMojoJavadoc( writer, pluginDescriptor );\n \n writer.write( \"public class HelpMojo\" + LS );\n writer.write( \" extends AbstractMojo\" + LS );\n writer.write( \"{\" + LS );\n \n writeVariables( writer );\n \n writer.write( LS );\n \n writeExecute( writer, pluginDescriptor );\n \n writer.write( LS );\n writeUtilities( writer );\n writer.write( \"}\" + LS );\n }", "Plugin getPlugin();", "public String getPluginIdAttr() {\n return pluginIdAttr;\n }", "public native void loadPlugin(final String plugin);", "public void setClass(UmlClass c) {\n\t\tlogicalClass = c;\n\t}", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TrackerTableChangeLog.class;\r\n\t}", "public Plug1CommandExecutor(Plug1 plugin) {\n\t\tthis.plugin = plugin;\n\t}", "protected void turnON(BaseNotificationPlugin plugin) {\n pluginSettingService.saveActivePlugin(UserSetting.EMAIL_CHANNEL, plugin.getId(), true);\n }", "public PluginCommand(@NotNull DropMultiplier plugin) {\n Preconditions.checkArgument(plugin != null, \"plugin cannot be null.\");\n this.plugin = plugin;\n }", "@Transient\r\n\tpublic Class<?> getClassType() {\r\n\t\treturn TVendor.class;\r\n\t}", "public Class loadClass( Plugin plugin, String className ) throws ClassNotFoundException {\n final PluginClassLoader loader;\n synchronized ( this ) {\n loader = classloaders.get( plugin );\n }\n return loader.loadClass( className );\n }", "public void setConnectionType(Class<? extends Connection> connectionType)\r\n/* 20: */ {\r\n/* 21: 64 */ this.connectionType = connectionType;\r\n/* 22: */ }", "public interface PluginConfigType {\n public static final String PLUGIN_PROPERTY_NAME_PREFIX = \"pluginProperty_\";\n\n /**\n * Render the configuration item to the given writer. This should result in some form control element.\n * The name of the form control should be \"pluginProperty_\" followed by the pluginConfig.getKey().\n *\n * @param writer The writer to render to\n * @param pluginConfig The configuration to render\n * @param value The value to render\n * @throws IOException If an error occured\n */\n void render(JspWriter writer, PluginConfig pluginConfig, String value) throws IOException;\n\n /**\n * Validate the value entered the user\n * \n * @param pluginConfig The config to validate against\n * @param value The value to validate\n * @return null if validation passed, or a error message if not\n */\n String validate(PluginConfig pluginConfig, String value);\n\n}", "public synchronized PluginClassLoader getPluginClassloader( Plugin plugin )\n {\n return classloaders.get( plugin );\n }", "public void setDriverClassName(String driverClassName) {\n this.driverClassName = driverClassName;\n }", "public static boolean loadPlugin(Class pluginClass, CytoscapeObj cytoscapeObj,\n CyWindow cyWindow) {\n if (pluginClass == null) {return false;}\n\n\n //System.out.println( \"AbstractPlugin loading: \"+pluginClass );\n\n //look for constructor with CyWindow argument\n if (cyWindow != null) {\n Constructor ctor = null;\n try {\n Class[] argClasses = new Class[1];\n argClasses[0] = CyWindow.class;//cyWindow.getClass();\n ctor = pluginClass.getConstructor(argClasses);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n\n\n// (SecurityException se) {\n// System.err.println(\"In AbstractPlugin.loadPlugin:\");\n// System.err.println(se.getMessage());\n// se.printStackTrace();\n// return false;\n// } catch (NoSuchMethodException nsme) {\n// //ignore, there are other constructors to look for\n// }\n\n \n\n if (ctor != null) {\n try {\n Object[] args = new Object[1];\n args[0] = cyWindow;\n return ctor.newInstance(args) != null;\n } catch (Exception e) {\n System.err.println(\"In AbstractPlugin.loadPlugin:\");\n System.err.println(\"Exception while constructing plugin instance:\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n return false;\n }\n }\n }\n return false;\n }", "public ClassCommentPlugin() {\n\n\t}", "Class<?> getJavaType();", "public void setLOC_class(int LOC_class) {\n\t\tthis.LOC_class = LOC_class;\n\t}", "@Override\n\tpublic Class<?> getJavaType() {\n\t\treturn null;\n\n\t}", "protected abstract String getPluginId();", "@Override\n public Object toJdbcType(Object value) {\n return value;\n }", "<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;" ]
[ "0.6558124", "0.6446492", "0.63676", "0.59974647", "0.5893295", "0.5825373", "0.5811886", "0.5538125", "0.5511451", "0.54363114", "0.5366634", "0.5355376", "0.5276677", "0.5259401", "0.5250489", "0.52369606", "0.5225608", "0.5178468", "0.5014809", "0.5012143", "0.49669528", "0.4873731", "0.48283777", "0.4818907", "0.47017083", "0.46915886", "0.4690111", "0.46614403", "0.46465224", "0.46426928", "0.46364275", "0.4632321", "0.462976", "0.46104592", "0.45786345", "0.45785686", "0.45732588", "0.45713794", "0.4566902", "0.45524135", "0.4552196", "0.4542534", "0.45368817", "0.45246497", "0.4504339", "0.4493961", "0.4491747", "0.4466815", "0.4464132", "0.4453162", "0.44530725", "0.4427991", "0.44236013", "0.44212574", "0.44191164", "0.44151732", "0.44138104", "0.44132286", "0.4411478", "0.43866396", "0.43779904", "0.43723843", "0.43715966", "0.43694726", "0.43606132", "0.4360538", "0.43515983", "0.43437803", "0.43432882", "0.43413538", "0.43343675", "0.4327317", "0.43083143", "0.43053836", "0.43021667", "0.42984614", "0.42902246", "0.42891654", "0.42610875", "0.42581242", "0.42524865", "0.42502883", "0.42423356", "0.42411783", "0.42396444", "0.42307407", "0.42210063", "0.42182094", "0.42054528", "0.42026386", "0.4195585", "0.41919488", "0.4182207", "0.4179529", "0.41727498", "0.4170245", "0.41657165", "0.41642743", "0.41523317", "0.41486153" ]
0.7260851
0
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.configuration
public String getConfiguration() { return configuration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConfigurationField() {\n return configField;\n }", "@RolesAllowed(RolesConstants.ADMIN_MANAGE_SETTINGS)\n @Override\n public Configuration getDbConfiguration() {\n return getRepository().getDbConnectionManager().getSqlSessionFactory().getConfiguration();\n }", "@Override\n public DataSourceConfiguration getConfiguration() {\n return configuration;\n }", "public String getConfiguration() {\n return this.configuration;\n }", "public String getConfiguration()\r\n\t{\r\n\t\treturn _configuration; \r\n\t}", "public String getConfiguration(){\n\t\treturn this.config;\n\t}", "public static String getDbConfig(){\n return properties.getProperty(\"dbconfig\");\n }", "public String getConfiguration() {\r\n\t\treturn configuration;\r\n\t}", "public Configuration getConfiguration() {\n return configurationParameter.getConfiguration();\n }", "public BatchClassDynamicPluginConfigDTO getBatchClassDynamicPluginConfigDTO() {\n\t\treturn batchClassDynamicPluginConfigDTO;\n\t}", "public BatchClassPluginConfigDTO getPluginConfigDTO() {\n\t\treturn pluginConfigDTO;\n\t}", "EntityConfiguration getConfiguration();", "public String getConfigurationAlias() {\n return this.configurationAlias;\n }", "public String getConfigurationID() {\n return configurationID;\n }", "public IConfigurationElement getConfigurationElement() {\n\t\treturn fConfigurationElement;\n\t}", "public ConfigurationType getConfigurationType() {\n return this.configurationType;\n }", "public ServiceCosmosDbConfigurationInfo cosmosDbConfiguration() {\n return this.cosmosDbConfiguration;\n }", "public Bmv2Configuration configuration() {\n return configuration;\n }", "public String getConfigurationName() {\n return configurationName;\n }", "public Configuration getConfiguration() {\n\t\treturn theConfiguration;\n\t}", "protected Configuration getConfiguration(){\n return configuration;\n }", "public CompositeConfiguration getConfiguration() {\n return _configuration;\n }", "public ConnectionConfiguration getConnectionConfiguration() {\n\t\treturn connectionconfig;\n\t}", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public Configuration getConfiguration() {\n return configuration;\n }", "public String getConfigurationValue() {\n return newConfigValue;\n }", "private Configuration getConfiguration() {\n return getPackageData().getConfiguration();\n }", "public String getPropertyDACConfig()\n {\n return iPropertyDACConfig.getValue();\n }", "public Configuration getConfiguration() {\n \tif (configurationRef==null)\n \t\treturn null;\n \treturn (Configuration)configurationRef.get();\n }", "protected Configuration getConfiguration() {\n return variable.getConfiguration();\n }", "public Configuration getConfiguration() {\n return config;\n }", "public Configuration getConfiguration() {\n return config;\n }", "public String getConfigurationKey() {\n return configurationKey;\n }", "public MUCLightRoomConfiguration getConfiguration() {\n return configuration;\n }", "public List<ConfigurationHopital> getListeConfigDuColis() {\r\n\t\treturn configurations;\r\n\t}", "public LocalConfiguration getConfiguration() {\n return configuration;\n }", "public ConfigurationHolder getConfiguration() {\n return this.cfg;\n }", "protected Configuration getConfiguration() {\n return configuration;\n }", "public java.util.List<Column.Builder>\n getColumnsBuilderList() {\n return getColumnsFieldBuilder().getBuilderList();\n }", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public IIndexFactoryConfig getConfig() {\n\t\treturn getConfiguration();\n\t}", "protected Map<String, Object> getConfigurationParameters(){\n\t\treturn configurationParameters;\n\t}", "public Vector getConfigurations() {\n return getConfigurations(DEFAULT_DB_CONFIG_TABLE);\n }", "@JsonProperty(\"configurationDate\")\r\n public Date getConfigurationDate() {\r\n return configurationDate;\r\n }", "public List<ConfigurationInner> configurations() {\n return this.innerProperties() == null ? null : this.innerProperties().configurations();\n }", "public java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition.Builder> \n getColumnsBuilderList() {\n return getColumnsFieldBuilder().getBuilderList();\n }", "public Configuration c() {\n return configuration;\n }", "public String getConfigType() {\n\t\treturn configType;\n\t}", "public ParquetConfiguration getParquetConfiguration() {\n return this.parquetConfiguration;\n }", "public com.google.protobuf.Any getConfiguration() {\n if (configurationBuilder_ == null) {\n return configuration_ == null ? com.google.protobuf.Any.getDefaultInstance() : configuration_;\n } else {\n return configurationBuilder_.getMessage();\n }\n }", "public Map<String, String> getColumnsMap() {\n\t\treturn columnsVsDataTypeMap;\n\t}", "public List<String> propertyColumns() {\n return this.propertyColumns;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> \n getConfigurationFieldBuilder() {\n if (configurationBuilder_ == null) {\n configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(\n getConfiguration(),\n getParentForChildren(),\n isClean());\n configuration_ = null;\n }\n return configurationBuilder_;\n }", "public ImageConfiguration getImageConfiguration() {\n return this.imageConfiguration;\n }", "Integer getDomainTemplateColumn();", "@Override\n\tpublic java.lang.String getTypeSettings() {\n\t\treturn _expandoColumn.getTypeSettings();\n\t}", "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 int getDataSourceColumn() {\n\t\treturn dataSourceColumn;\n\t}", "@Override\n public Map<String, ConfiguredVariableItem> getConfiguration() {\n return config;\n }", "@Override\n\tpublic Configuration getConf() {\n\t\treturn this.Conf;\n\t}", "public Object\tgetConfiguration();", "public String getStringConfiguration() {\n\t\treturn config;\n\t}", "public static Configuration getConfiguration() {\r\n\t\treturn config;\r\n\t}", "public QueryConfigHandler getQueryConfigHandler() {\n return config;\n }", "public DataSource getConfigDatasource() {\n return configDatasource;\n }", "public String getConfigurationValue(String name);", "public ComponentConfiguration getConfiguration();", "public String getPropertyDACConfig();", "public String getStringConfiguration()\r\n\t{\r\n\t\treturn config;\r\n\t}", "public p getConfig() {\n return c.K();\n }", "@Override\n public Configuration getConfiguration(Connection connection, Long configID) throws SQLException {\n PreparedStatement ps = null;\n try{\n String insertSQL = \"SELECT * FROM Configuration WHERE configurationID = ?;\";\n ps = connection.prepareStatement(insertSQL);\n ps.setLong(1, configID);\n ResultSet rs = ps.executeQuery();\n \n // Check if the result is empty\n if(!rs.isBeforeFirst()){\n return null;\n }\n \n Configuration configuration = new Configuration();\n rs.next();\n configuration.setConfigurationID(rs.getLong(\"configurationID\"));\n configuration.setDisplayName(rs.getString(\"displayName\"));\n configuration.setDefaultType(rs.getString(\"defaultType\"));\n configuration.setDefaultArg1(rs.getString(\"defaultArg1\"));\n configuration.setDefaultArg2(rs.getString(\"defaultArg2\"));\n \n return configuration;\n }\n catch(Exception ex){\n //ex.printStackTrace();\n System.out.println(\"Exception in ConfigurationDaoImpl.getConfiguration()\");\n if (ps != null && !ps.isClosed()){\n ps.close();\n }\n if (connection != null && !connection.isClosed()){\n connection.close();\n }\n \n return null;\n }\n }", "public List<Column> columns() {\n return this.columns;\n }", "protected final Map<String, String> getConfiguration() {\r\n\t\treturn Collections.unmodifiableMap(configuration);\r\n\t}", "public interface DatabaseConfiguration {\n\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:38): escrever javadoc\n\t *\n\t * @return\n\t */\n\tDatabaseTypes getDatabaseType();\n\t\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:40): escrever javadoc\n\t *\n\t * @return\n\t * @throws DatabaseConfigurationException {@link RuntimeException} throw when not retrieve connection.\n\t */\n\tConnection getConnection();\n\t\n}", "public static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType, Field field) throws SQLException {\n Annotation columnAnnotation = null;\n Annotation basicAnnotation = null;\n Annotation idAnnotation = null;\n Annotation generatedValueAnnotation = null;\n Annotation oneToOneAnnotation = null;\n Annotation manyToOneAnnotation = null;\n Annotation joinColumnAnnotation = null;\n Annotation enumeratedAnnotation = null;\n Annotation versionAnnotation = null;\n\n for (Annotation annotation : field.getAnnotations()) {\n Class<?> annotationClass = annotation.annotationType();\n if (annotationClass.getName().equals(\"javax.persistence.Column\")) {\n columnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Basic\")) {\n basicAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Id\")) {\n idAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.GeneratedValue\")) {\n generatedValueAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.OneToOne\")) {\n oneToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.ManyToOne\")) {\n manyToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.JoinColumn\")) {\n joinColumnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Enumerated\")) {\n enumeratedAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Version\")) {\n versionAnnotation = annotation;\n }\n }\n\n if (columnAnnotation == null && basicAnnotation == null && idAnnotation == null && oneToOneAnnotation == null\n && manyToOneAnnotation == null && enumeratedAnnotation == null && versionAnnotation == null) {\n return null;\n }\n\n DatabaseFieldConfig config = new DatabaseFieldConfig();\n String fieldName = field.getName();\n if (databaseType.isEntityNamesMustBeUpCase()) {\n fieldName = fieldName.toUpperCase();\n }\n config.setFieldName(fieldName);\n\n if (columnAnnotation != null) {\n try {\n Method method = columnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(columnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = columnAnnotation.getClass().getMethod(\"columnDefinition\");\n String columnDefinition = (String) method.invoke(columnAnnotation);\n if (columnDefinition != null && columnDefinition.length() > 0) {\n config.setColumnDefinition(columnDefinition);\n }\n method = columnAnnotation.getClass().getMethod(\"length\");\n config.setWidth((Integer) method.invoke(columnAnnotation));\n method = columnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(columnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = columnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(columnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @Column annotation for field \" + field, e);\n }\n }\n if (basicAnnotation != null) {\n try {\n Method method = basicAnnotation.getClass().getMethod(\"optional\");\n Boolean optional = (Boolean) method.invoke(basicAnnotation);\n if (optional == null) {\n config.setCanBeNull(true);\n } else {\n config.setCanBeNull(optional);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Basic annotation for field \" + field,\n e);\n }\n }\n if (idAnnotation != null) {\n if (generatedValueAnnotation == null) {\n config.setId(true);\n } else {\n // generatedValue only works if it is also an id according to {@link GeneratedValue)\n config.setGeneratedId(true);\n }\n }\n if (oneToOneAnnotation != null || manyToOneAnnotation != null) {\n // if we have a collection then make it a foreign collection\n if (Collection.class.isAssignableFrom(field.getType())\n || ForeignCollection.class.isAssignableFrom(field.getType())) {\n config.setForeignCollection(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setForeignCollectionColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"fetch\");\n Object fetchType = method.invoke(joinColumnAnnotation);\n if (fetchType != null && fetchType.toString().equals(\"EAGER\")) {\n config.setForeignCollectionEager(true);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n } else {\n // otherwise it is a foreign field\n config.setForeign(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(joinColumnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(joinColumnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n }\n }\n if (enumeratedAnnotation != null) {\n try {\n Method method = enumeratedAnnotation.getClass().getMethod(\"value\");\n Object typeValue = method.invoke(enumeratedAnnotation);\n if (typeValue != null && typeValue.toString().equals(\"STRING\")) {\n config.setDataType(DataType.ENUM_STRING);\n } else {\n config.setDataType(DataType.ENUM_INTEGER);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Enumerated annotation for field \"\n + field, e);\n }\n }\n if (versionAnnotation != null) {\n // just the presence of the version...\n config.setVersion(true);\n }\n if (config.getDataPersister() == null) {\n config.setDataPersister(DataPersisterManager.lookupForField(field));\n }\n config.setUseGetSet(DatabaseFieldConfig.findGetMethod(field, false) != null\n && DatabaseFieldConfig.findSetMethod(field, false) != null);\n return config;\n }", "public Configuration getCfg() {\n return cfg;\n }", "public io.dstore.values.BooleanValue.Builder getImportConfigurationBuilder() {\n \n onChanged();\n return getImportConfigurationFieldBuilder().getBuilder();\n }", "public String getXMLConfiguration()\n {\n return this.XMLConfiguration;\n }", "public String getConfig() {\n\t\treturn(config);\n\t}", "public String configurationInfo();", "@Updatable\n public KendraDocumentsMetadataConfiguration getDocumentsMetadataConfiguration() {\n return documentsMetadataConfiguration;\n }", "private String[] getConfiguration() {\n String[] result = new String[6];\n // Query the latest configuration file made and send it back in an array of strings\n String query = \"SELECT * FROM configuration ORDER BY configuration_id DESC LIMIT 1\";\n sendQuery(query);\n try {\n if(resultSet.next()) {\n for (int i = 1; i < 7; i++) {\n result[i-1] = resultSet.getString(i);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public com.google.protobuf.Any.Builder getConfigurationBuilder() {\n \n onChanged();\n return getConfigurationFieldBuilder().getBuilder();\n }" ]
[ "0.6447359", "0.63227236", "0.61978656", "0.6011088", "0.59847933", "0.5954222", "0.58707434", "0.5818843", "0.58089554", "0.57616806", "0.5754512", "0.5746098", "0.57335484", "0.5694626", "0.5680679", "0.56580764", "0.56247544", "0.55926937", "0.5567701", "0.55535245", "0.55345094", "0.5515835", "0.5504274", "0.5502395", "0.5502395", "0.5502395", "0.5502395", "0.5482881", "0.54612815", "0.5436755", "0.54345685", "0.54262483", "0.5418021", "0.5418021", "0.53836375", "0.5380185", "0.53581536", "0.53221864", "0.5306917", "0.5289019", "0.5280499", "0.5276497", "0.5276497", "0.5276497", "0.5276497", "0.5251356", "0.5236282", "0.5232867", "0.522122", "0.52170235", "0.52090436", "0.52080715", "0.5191277", "0.51901543", "0.5187189", "0.516364", "0.5149951", "0.51446414", "0.5144048", "0.5107877", "0.510579", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.5100647", "0.50857925", "0.5085682", "0.507534", "0.50617754", "0.50611347", "0.5054525", "0.5050432", "0.50351906", "0.5028728", "0.5028046", "0.50260925", "0.5024504", "0.50096095", "0.5008988", "0.5004072", "0.49916804", "0.49908546", "0.49898532", "0.49861437", "0.4986043", "0.49824312", "0.49789312", "0.49784255", "0.49770775", "0.49763218", "0.496957" ]
0.57678
9
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.configuration
public void setConfiguration(String configuration) { this.configuration = configuration == null ? null : configuration.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "public void setAD_Column_ID (int AD_Column_ID);", "@Override\n public void noteConfiguration() {\n preprocessBean = new KeepColumnPreProcessorBean();\n super.noteConfiguration();\n }", "SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}", "@Override\r\n\tprotected String defineColumn(ColumnDefinition columnDefinition) {\n\t\treturn null;\r\n\t}", "public final void overrideAutoResizeColumn(final boolean isAutoResize) {\n\t\toverrideAutoResizeColumn = isAutoResize;\n\t}", "@Override\n\tpublic void setColumnId(long columnId) {\n\t\t_expandoColumn.setColumnId(columnId);\n\t}", "@Override\n public DataSourceConfiguration getConfiguration() {\n return configuration;\n }", "@Override\n\t\tpublic void setValueColumn(int columnIndex) {\n\t\t\tthis.valueColumn = columnIndex;\n\t\t}", "@RolesAllowed(RolesConstants.ADMIN_MANAGE_SETTINGS)\n @Override\n public Configuration getDbConfiguration() {\n return getRepository().getDbConnectionManager().getSqlSessionFactory().getConfiguration();\n }", "@Override\n public void alterColumnByIndex(int index, XPropertySet descriptor) throws SQLException, IndexOutOfBoundsException {\n \n }", "@Override\n public void refreshConfiguration(KeepColumnPreProcessorBean preprocessBean) {\n super.refreshConfiguration(preprocessBean);\n }", "public void setColumnName (String ColumnName);", "public void setColumn(String column, boolean b)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n data.put(canonicalize(column), b ? Boolean.TRUE : Boolean.FALSE);\n }", "private void defineColumn_Dimension() {\r\n\r\n\t\tfinal ColumnDefinition colDef = TableColumnFactory.PHOTO_FILE_DIMENSION.createColumn(_columnManager, _pc);\r\n\r\n\t\tcolDef.setIsDefaultColumn();\r\n\t\tcolDef.setLabelProvider(new CellLabelProvider() {\r\n\t\t\t@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\r\n\r\n\t\t\t\tfinal Photo photo = (Photo) cell.getElement();\r\n\r\n\t\t\t\tcell.setText(photo.getDimensionText());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public ColumnConfigProvider(ColumnConfig config){\r\n\t\tthis.config = config;\r\n\t\tinit();\r\n\t}", "public void setColumnMapping(String columnName, String databaseFieldName) {\n\t\tsetColumnMapping(columnName, databaseFieldName, databaseFieldName);\n\t}", "public void setColumn(ColumnMetadata column) {\r\n m_column = column;\r\n }", "public void setConfigurationId(String configurationId) {\n\t\tthis.configurationId = configurationId;\n\t\tsetRowMapper(getInitalWorkerMapper());\n\t\tmetaData = this.exportToTextFileMetadataProvider.getMetaData(this.configurationId); \n\t\tsetSql(metaData.getSelectStatement()); \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t \n\t\t\n\t}", "public void setDataSourceColumn(int dataSourceColumn) {\n\t\tthis.dataSourceColumn = dataSourceColumn;\n\t}", "@Override\n protected void configure(Configuration configuration) {\n configuration.addPackage(\"dao.entities\");\n super.configure(configuration);\n }", "void setNeedColumnInfo(boolean needColumnInfo);", "@Override\n public Entity configuracion(Entity e) throws SQLException {\n return null;\n }", "Column(String column) {\n this.column = column;\n }", "Column(String column) {\n this.column = column;\n }", "public ScGridColumn<AcUpuTagSummaryVo> newDestinationCountryCodeColumn()\n {\n return newDestinationCountryCodeColumn(\"Destination Country Code\");\n }", "public DatabaseOptions set(String key, String value) {\n config.addDataSourceProperty(key, value);\n return this;\n }", "public void setColumnMapping(String columnName, String databaseFieldName,\n\t\t\tString resultSetColumnName) {\n\t\tsetDatabaseFieldMapping(columnName, databaseFieldName);\n\t\tsetResultSetMapping(columnName, resultSetColumnName);\n\t}", "public Builder setColumnAttributes(boolean columns) {\n this.columns = columns;\n return this;\n }", "@Override\r\n\tprotected int[] getColumnModified(ColumnDefinition columnDefinition, DatabaseMetaData dbmd) {\n\t\treturn null;\r\n\t}", "protected void setupDBColumns() \n\t{\n\t\tthis.dbColumnNames = new Vector<String>();\n\t\tthis.dbColumnNames.addElement(\"ID\");\n\t}", "public static DatabaseFieldConfig createFieldConfig(DatabaseType databaseType, Field field) throws SQLException {\n Annotation columnAnnotation = null;\n Annotation basicAnnotation = null;\n Annotation idAnnotation = null;\n Annotation generatedValueAnnotation = null;\n Annotation oneToOneAnnotation = null;\n Annotation manyToOneAnnotation = null;\n Annotation joinColumnAnnotation = null;\n Annotation enumeratedAnnotation = null;\n Annotation versionAnnotation = null;\n\n for (Annotation annotation : field.getAnnotations()) {\n Class<?> annotationClass = annotation.annotationType();\n if (annotationClass.getName().equals(\"javax.persistence.Column\")) {\n columnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Basic\")) {\n basicAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Id\")) {\n idAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.GeneratedValue\")) {\n generatedValueAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.OneToOne\")) {\n oneToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.ManyToOne\")) {\n manyToOneAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.JoinColumn\")) {\n joinColumnAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Enumerated\")) {\n enumeratedAnnotation = annotation;\n }\n if (annotationClass.getName().equals(\"javax.persistence.Version\")) {\n versionAnnotation = annotation;\n }\n }\n\n if (columnAnnotation == null && basicAnnotation == null && idAnnotation == null && oneToOneAnnotation == null\n && manyToOneAnnotation == null && enumeratedAnnotation == null && versionAnnotation == null) {\n return null;\n }\n\n DatabaseFieldConfig config = new DatabaseFieldConfig();\n String fieldName = field.getName();\n if (databaseType.isEntityNamesMustBeUpCase()) {\n fieldName = fieldName.toUpperCase();\n }\n config.setFieldName(fieldName);\n\n if (columnAnnotation != null) {\n try {\n Method method = columnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(columnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = columnAnnotation.getClass().getMethod(\"columnDefinition\");\n String columnDefinition = (String) method.invoke(columnAnnotation);\n if (columnDefinition != null && columnDefinition.length() > 0) {\n config.setColumnDefinition(columnDefinition);\n }\n method = columnAnnotation.getClass().getMethod(\"length\");\n config.setWidth((Integer) method.invoke(columnAnnotation));\n method = columnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(columnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = columnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(columnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @Column annotation for field \" + field, e);\n }\n }\n if (basicAnnotation != null) {\n try {\n Method method = basicAnnotation.getClass().getMethod(\"optional\");\n Boolean optional = (Boolean) method.invoke(basicAnnotation);\n if (optional == null) {\n config.setCanBeNull(true);\n } else {\n config.setCanBeNull(optional);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Basic annotation for field \" + field,\n e);\n }\n }\n if (idAnnotation != null) {\n if (generatedValueAnnotation == null) {\n config.setId(true);\n } else {\n // generatedValue only works if it is also an id according to {@link GeneratedValue)\n config.setGeneratedId(true);\n }\n }\n if (oneToOneAnnotation != null || manyToOneAnnotation != null) {\n // if we have a collection then make it a foreign collection\n if (Collection.class.isAssignableFrom(field.getType())\n || ForeignCollection.class.isAssignableFrom(field.getType())) {\n config.setForeignCollection(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setForeignCollectionColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"fetch\");\n Object fetchType = method.invoke(joinColumnAnnotation);\n if (fetchType != null && fetchType.toString().equals(\"EAGER\")) {\n config.setForeignCollectionEager(true);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n } else {\n // otherwise it is a foreign field\n config.setForeign(true);\n if (joinColumnAnnotation != null) {\n try {\n Method method = joinColumnAnnotation.getClass().getMethod(\"name\");\n String name = (String) method.invoke(joinColumnAnnotation);\n if (name != null && name.length() > 0) {\n config.setColumnName(name);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"nullable\");\n Boolean nullable = (Boolean) method.invoke(joinColumnAnnotation);\n if (nullable != null) {\n config.setCanBeNull(nullable);\n }\n method = joinColumnAnnotation.getClass().getMethod(\"unique\");\n Boolean unique = (Boolean) method.invoke(joinColumnAnnotation);\n if (unique != null) {\n config.setUnique(unique);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\n \"Problem accessing fields from the @JoinColumn annotation for field \" + field, e);\n }\n }\n }\n }\n if (enumeratedAnnotation != null) {\n try {\n Method method = enumeratedAnnotation.getClass().getMethod(\"value\");\n Object typeValue = method.invoke(enumeratedAnnotation);\n if (typeValue != null && typeValue.toString().equals(\"STRING\")) {\n config.setDataType(DataType.ENUM_STRING);\n } else {\n config.setDataType(DataType.ENUM_INTEGER);\n }\n } catch (Exception e) {\n throw SqlExceptionUtil.create(\"Problem accessing fields from the @Enumerated annotation for field \"\n + field, e);\n }\n }\n if (versionAnnotation != null) {\n // just the presence of the version...\n config.setVersion(true);\n }\n if (config.getDataPersister() == null) {\n config.setDataPersister(DataPersisterManager.lookupForField(field));\n }\n config.setUseGetSet(DatabaseFieldConfig.findGetMethod(field, false) != null\n && DatabaseFieldConfig.findSetMethod(field, false) != null);\n return config;\n }", "@Override\n public void alterColumnByName(String name, XPropertySet descriptor) throws SQLException, NoSuchElementException {\n \n }", "public void setColumns(Column[] newColumns) { columns = newColumns; }", "public void setPositionColumn(int value){this.positionColumn = value;}", "void setColumnValue(int colIndex, Object value);", "public void setColumnName(String columnName);", "public void setConfigurationValue(String name, String value);", "public void setOrderPropertyColumns() {\n\t\t// Clave\n\t\tColumn<BmObject, String> codeColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t@Override\n\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getBmoProperty().getCode().toString();\n\t\t\t}\n\t\t};\n\t\torderPropertyTaxGrid.addColumn(codeColumn, SafeHtmlUtils.fromSafeConstant(\"Clave\"));\n\t\torderPropertyTaxGrid.setColumnWidth(codeColumn, 150, Unit.PX);\n\n\n\t\t\t// Descripcion\n\t\t\tColumn<BmObject, String> blockColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t\t@Override\n\t\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getBmoProperty().getDescription().toString();\n\t\t\t\t}\n\t\t\t};\n\t\t\torderPropertyTaxGrid.addColumn(blockColumn, SafeHtmlUtils.fromSafeConstant(\"Descripción\"));\n\t\t\torderPropertyTaxGrid.setColumnWidth(blockColumn, 150, Unit.PX);\n\n\t\t// Calle y numero\n\t\tColumn<BmObject, String> streetColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t@Override\n\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getBmoProperty().getStreet().toString() + \" \"\n\t\t\t\t\t\t+ \" #\" + ((BmoOrderPropertyTax)bmObject).getBmoProperty().getNumber().toString();\n\t\t\t}\n\t\t};\n\t\torderPropertyTaxGrid.addColumn(streetColumn, SafeHtmlUtils.fromSafeConstant(\"Calle y Número\"));\n\t\torderPropertyTaxGrid.setColumnWidth(streetColumn, 200, Unit.PX);\n\t\t\n\t\t//Meses\n\t\tColumn<BmObject, String> monthsColumn;\n\t\tmonthsColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t@Override\n\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\t// con un asicrono obtener los meses de f.inicio y f.fin del pedido\n\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getQuantity().toString();\n//\t\t\t\treturn String.valueOf(months);\n\t\t\t}\n\t\t};\n//\t\tmonthsColumn.setFieldUpdater(new FieldUpdater<BmObject, String>() {\n//\t\t\t@Override\n//\t\t\tpublic void update(int index, BmObject bmObject, String value) {\n//\t\t\t\tchangeOrderEquipmentDays(bmObject, value);\n//\t\t\t}\n//\t\t});\n\t\t\n\t\t\n\t\tSafeHtmlHeader daysHeader = new SafeHtmlHeader(new SafeHtml() { \n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\t@Override \n\t\t\tpublic String asString() { \n\t\t\t\treturn \"<p style=\\\"text-center;\\\">Meses</p>\"; \n\t\t\t} \n\t\t}); \n\t\torderPropertyTaxGrid.addColumn(monthsColumn, daysHeader);\n\t\torderPropertyTaxGrid.setColumnWidth(monthsColumn, 50, Unit.PX);\n\t\tmonthsColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);\n//\t}\n\t\t\n\t// Precio\n\t\t\tColumn<BmObject, String> priceColumn;\n\t\t\t\tif (bmoOrder.getStatus().equals(BmoOrder.STATUS_REVISION)) {\n\t\t\t\t\tpriceColumn = new Column<BmObject, String>(new EditTextCell()) {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getPrice().toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tpriceColumn.setFieldUpdater(new FieldUpdater<BmObject, String>() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void update(int index, BmObject bmObject, String value) {\n\t\t\t\t\t\t\tchangeOrderPropertyPrice(bmObject, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpriceColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getPrice().toString();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tSafeHtmlHeader priceHeader = new SafeHtmlHeader(new SafeHtml() { \n\t\t\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\t\t\t@Override \n\t\t\t\t\tpublic String asString() { \n\t\t\t\t\t\treturn \"<p style=\\\"text-align:right;\\\">Precio</p>\"; \n\t\t\t\t\t} \n\t\t\t\t}); \n\t\t\t\torderPropertyTaxGrid.addColumn(priceColumn, priceHeader);\n\t\t\t\torderPropertyTaxGrid.setColumnWidth(priceColumn, 50, Unit.PX);\n\t\t\t\tpriceColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\n\n//\t\t\t\t@Override\n//\t\t\t\tpublic String getValue(BmObject bmObject) {\n//\t\t\t\t\tnumberFormat = NumberFormat.getCurrencyFormat()\n//\t\t\t\t\tString formatted = numberFormat.format(((BmoOrderPropertyTax)bmObject).getPrice().toDouble());\n//\t\t\t\t\treturn (formatted);\n//\t\t\t\t}\n//\t\t\t};\n//\t\t\tpriceColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\n//\t\t\torderPropertyTaxGrid.addColumn(priceColumn, SafeHtmlUtils.fromSafeConstant(\"Precio\"));\n\n\n\t\t// Total\n\t\tColumn<BmObject, String> totalColumn = new Column<BmObject, String>(new TextCell()) {\n\t\t\t@Override\n\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\tnumberFormat = NumberFormat.getCurrencyFormat();\n\t\t\t\tString formatted = numberFormat.format(((BmoOrderPropertyTax)bmObject).getAmount().toDouble());\n\t\t\t\treturn (formatted);\n\t\t\t}\n\t\t};\n\t\ttotalColumn.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\n\t\torderPropertyTaxGrid.addColumn(totalColumn, SafeHtmlUtils.fromSafeConstant(\"Total\"));\n\t}", "public void setColumnSize() {\n \t\tTableColumn column = null;\n \t\tfor (int i = 0; i < model.getColumnCount(); i++) {\n \t\t\tcolumn = getColumnModel().getColumn(i);\n \t\t\tcolumn.sizeWidthToFit();\n \t\t}\n \t}", "@Override\r\n protected ColumnModel<InternationalString> buildColumnModel() {\r\n List<ColumnConfig<InternationalString, ?>> columnsConfigs = new ArrayList<ColumnConfig<InternationalString, ?>>();\r\n\r\n languageCodeColumnConfig = new ColumnConfig<InternationalString, LanguageCode>(\r\n IS_PROPS.langCode(), 15, \"Language Code\");\r\n titleColumnConfig = new ColumnConfig<InternationalString, String>(\r\n IS_PROPS.value(), 85, \"Title\");\r\n columnsConfigs.add(languageCodeColumnConfig);\r\n columnsConfigs.add(titleColumnConfig);\r\n return new ColumnModel<InternationalString>(\r\n columnsConfigs);\r\n }", "public interface BlogColumns {\n\n /**\n * Url of the blog\n * <P>Type: TEXT</P>\n */\n String URL = \"url\";\n\n /**\n * Admin user name\n * <P>Type: TEXT</P>\n */\n String USER = \"user\";\n\n /**\n * Admin password\n * <P>Type: TEXT</P>\n */\n String PASS = \"pass\";\n }", "@Override\n\tpublic void setColumn(int x) {\n\t\tdelegate.setColumn(x);\n\t}", "public void setPluginConfigDTO(BatchClassPluginConfigDTO pluginConfigDTO) {\n\t\tthis.pluginConfigDTO = pluginConfigDTO;\n\t}", "public void setColumn(int column) {\n\t\tthis.column = column;\n\t}", "public void setBatchClassDynamicPluginConfigDTO(BatchClassDynamicPluginConfigDTO batchClassDynamicPluginConfigDTO) {\n\t\tthis.batchClassDynamicPluginConfigDTO = batchClassDynamicPluginConfigDTO;\n\t}", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "public void setTheDataSourceColumnDTCollection(Collection<Object> aTheDataSourceColumnDTCollection)\n {\n theDataSourceColumnDTCollection = aTheDataSourceColumnDTCollection;\n setItDirty(true);\n }", "public ScGridColumn<AcUpuTagSummaryVo> newDestinationLocationCodeColumn()\n {\n return newDestinationLocationCodeColumn(\"Destination Location Code\");\n }", "@Override\n public Options prepareForBulkLoad() {\n dbOptions.setMaxBackgroundFlushes(4);\n columnFamilyOptions.setDisableAutoCompactions(true);\n columnFamilyOptions.setLevel0FileNumCompactionTrigger(1 << 30);\n columnFamilyOptions.setLevel0SlowdownWritesTrigger(1 << 30);\n columnFamilyOptions.setLevel0StopWritesTrigger(1 << 30);\n return this;\n }", "public String getConfigurationField() {\n return configField;\n }", "void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);", "public void setColumnSize(int[] columnSize) {\n\t\tif(LOGGER.isDebugEnabled())\n\t\t\tthrow new UnsupportedOperationException();\n\t}", "Column createColumn(JavaTypeMapping mapping, String javaType, ColumnMetaData colmd);", "void setConfiguration();", "public void setConfiguration(CodeGeneratorConfiguration config) {\n \t\tthis.config = config;\n \t}", "public int getDataSourceColumn() {\n\t\treturn dataSourceColumn;\n\t}", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "Table setColumn(int index, String name);", "@Override\n\tpublic java.lang.String getTypeSettings() {\n\t\treturn _expandoColumn.getTypeSettings();\n\t}", "public void setInDatabase(boolean b) {\n \n }", "@Override\r\n\tpublic String getType() {\n\t\treturn \"column\";\r\n\t}", "ColumnMapping createColumnMapping(JavaTypeMapping mapping, Column column, String javaType);", "public Builder setColumn(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n column_ = value;\n onChanged();\n return this;\n }", "public ResultSetMapper() {\n registerAttributeConverters();\n this.fieldNamingStrategy = new IdentityFieldNamingStrategy();\n logger.info(\"No specific field naming strategy has been set. It will default to the {} field naming strategy.\", this.fieldNamingStrategy);\n }", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "public void setValue(String column, String value) {\n Collection<Column> cols = source.getColumn(column);\n Column col = cols.iterator().next();\n setValue(col, value);\n }", "public boolean referenceColumnInSql() {\n return false;\n }", "public void setCol(int column) {\n\t\tthis.column = column; \n\t}", "@Override\r\n\tpublic void configure(Type arg0, Properties arg1, Dialect arg2)\r\n\t\t\tthrows MappingException {\n\t\t\r\n\t}", "public static void setColumnNumber(Configuration conf, int columnNum) {\n\t\tassert columnNum > 0;\n\t\tconf.setInt(RCFile.COLUMN_NUMBER_CONF_STR, columnNum);\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic void setOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tGMCSection section = currConfig.getGmcConfig().getAnonymousSection();\n\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\tfor (int j = 0; j < optionModel.getRowCount(); j++) {\n\t\t\tvals.add(optionModel.getValueAt(j, 1));\n\t\t}\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\tObject val = vals.get(i);\n\n\t\t\tif (!currOpt.type().equals(OptionType.MAP)) {\n\t\t\t\tif (val instanceof String\n\t\t\t\t\t\t&& currOpt.type().equals(OptionType.INTEGER)) {\n\t\t\t\t\tInteger value = Integer.valueOf((String) val);\n\t\t\t\t\tsection.setScalarValue(currOpt, value);\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * else if(val == null) { section.setScalarValue(currOpt, \"\"); }\n\t\t\t\t */\n\t\t\t\telse if (true) {\n\t\t\t\t\tSystem.out.println(\"val: \" + val);\n\t\t\t\t}\n\t\t\t\tsection.setScalarValue(currOpt, val);\n\t\t\t}\n\t\t}\n\t}", "JavaTypeMapping getMappingWithColumnMapping(Class javaType, boolean serialised, boolean embedded, ClassLoaderResolver clr);", "Column createColumn(JavaTypeMapping mapping, String javaType, int datastoreFieldIndex);", "@Override\n\tpublic void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {\n\t\t\n\t}", "EntityConfiguration getConfiguration();", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public String getJdbcType() {\n return this.jdbcType;\n }", "public void setColumn(char column) {\n\t\tthis.column = column;\n\t}", "private void setSql() {\n sql = sqlData.getSql();\n }", "protected void configure() {\n bindConstant().annotatedWith(JpaUnit.class).to(\"testUnit\");\n }", "public <V> InMemoryDataTableColumnBuilder<R, V>.GetterSetter newColumn(Class<V> valueClass) {\n\n\t\treturn tableStructure.newColumn(valueClass);\n\t}" ]
[ "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.57078034", "0.54173446", "0.5310383", "0.5255199", "0.5078611", "0.49999663", "0.49752203", "0.49271446", "0.49222934", "0.49142337", "0.4850252", "0.47941995", "0.4791415", "0.47867298", "0.4748205", "0.47302327", "0.4729216", "0.4717259", "0.47072673", "0.4705438", "0.46892053", "0.46852612", "0.46848515", "0.46748778", "0.46748778", "0.46652505", "0.46635586", "0.4644416", "0.46314996", "0.46192372", "0.4590817", "0.45876405", "0.45856434", "0.4581803", "0.4576165", "0.456779", "0.45607585", "0.4542507", "0.45356765", "0.45235398", "0.45148268", "0.45080936", "0.44936383", "0.44934508", "0.44831046", "0.44691968", "0.4461948", "0.44603354", "0.4458024", "0.44562045", "0.44540665", "0.4447091", "0.4444556", "0.44320714", "0.4422309", "0.4418813", "0.44175267", "0.44092768", "0.4407734", "0.43982735", "0.43927342", "0.43911445", "0.4384061", "0.438177", "0.4375532", "0.43718198", "0.4370685", "0.43671545", "0.43592602", "0.4356713", "0.43565962", "0.4351524", "0.43466637", "0.43464088", "0.43382138", "0.4336675", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43364015", "0.43359503", "0.43345454", "0.43316004", "0.43274182" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.name
public String getName() { return name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName() {\n return columnName;\n }", "public String getName(){\n\t\t\treturn columnName;\n\t\t}", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}", "public abstract String getDatabaseColumnName(String entityName, String propertyName);", "public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }", "KijiColumnName getAttachedColumn();", "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "public String getName() { return _sqlName; }", "public String getPkColumnName() {\n return featureDao.getPkColumnName();\n }", "String getColumnName();", "String getImplicitBundlePropertyName(int columnIndex);", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }", "@Override\n\tpublic String getJdbcTypeName() {\n\t\tString text = JdbcTypesManager.getJdbcTypes().getTextForCode( getJdbcTypeCode() );\n\t\treturn text != null ? text : \"???\" ;\n\t}", "public String getColumnName();", "@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }", "public String getColumnName() {\n return columnName; \n }", "public String getColumnForPrimaryKey() {\n return null;\n }", "public String getFieldName() { return databaseFieldName; }", "protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}", "@Override\n public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "public java.lang.String getColumnName() {\r\n return columnName;\r\n }", "public String getName() {\n return ctTableColumn.getName();\n }", "public String getColumnName() {\n return this.columnName;\n }", "protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }", "public String getFieldColumn() {\n return fieldColumn;\n }", "@Override\n public String getColumnName(int column) {\n return colName[column];\n }", "public String getTypeName() {\r\n return typeId.getSQLTypeName();\r\n }", "public String getColumnName(int columnIndex){\n return COLUMN_NAMES[columnIndex];\n }", "public String getName(){\n return field.getName();\n }", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "@Override\n public String getColumnName(int column) {\n return columnNames[column];\n }", "@Override\n public String getColumnName(int column) { return columnnames[column]; }", "public String getLabelColumn()\n {\n return myLabelColumn;\n }", "public String getColumnName() {\r\n return navBinder.getColumnName();\r\n }", "public String getColumnName(int columnIndex) {\n return resource.getString(columnNames.get(columnIndex));\n }", "@Override\n\tpublic String getColumnName(int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn \"Expression\";\n\t\tcase 1:\n\t\t\treturn \"Value\";\n\t\t}\n\t\treturn null;\n\t}", "public String getColumnName(int col) { return columnNames[col]; }", "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 }", "@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}", "@Override\r\n\tpublic String getColumnName(int column) {\n\t\treturn columnName[column];\r\n\t}", "public String getColumnName(int columnIndex) {\r\n return this.table.getSchema().getColumnName(columnIndex);\r\n }", "@Override\n public String getColumnName(final int column) {\n return _columns.get(column);\n }", "public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }", "@Override public String getColumnName(int iColumnIndex)\r\n {\r\n return COLUMN_NAMES[iColumnIndex];\r\n }", "public String getColumnName(int columnIndex){\r\n\t\t\tif (Person.getFieldColumn(columnIndex) != null)\r\n\t\t\t\treturn Person.getFieldColumn(columnIndex);\r\n\t\t\treturn \"\";\r\n\t\t}", "public String getName() {\n \treturn metricMetadata.getName();\n }", "Integer getDomainTemplateColumn();", "public String getNodeNameColumnName () {\n return nodeHandler.getNodeNameColumnName();\n }", "@Override\n public String getColumnName(int column) {\n if (column == COL_ID) {\n return \"Código\";\n } else if (column == COL_NAME) {\n return \"Nome\";\n }\n return \"\";\n }", "@Override\n\tpublic String getColumnName(int arg0) throws SQLException {\n\t\treturn columns[arg0-1];\n\t}", "public String getColumnName(int column) {\n return columnNames[column];\n }", "private String getColumnName( String propertyName ) {\r\n String[] s = StringExtend.toArray( propertyName, \".\", false );\r\n return s[s.length - 1];\r\n }", "public String getColumn() {\n Object ref = column_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n column_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "public String getCustomName ( ) {\n\t\treturn extract ( handle -> handle.getCustomName ( ) );\n\t}", "public String getAttributeName(){\n if(field.getAnnotation(Column.class) != null){\n return field.getAnnotation(Column.class).column();\n }\n if( field.getAnnotation(PrimaryKey.class) !=null){\n return field.getAnnotation(PrimaryKey.class).name();\n }\n return null;\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 }", "@Override\n\tpublic String getColumnName(int column) {\n\t\treturn names[column];\n\t}", "@Override\n\tpublic String getColumnName(int column) {\n\t\treturn this.colunas[column];\n\t}", "String getJavaFieldName();", "public String getColumnName(String propertyId)\n {\n return propertyId;\n }", "public String getColumnName(int col) {\n return columns[col] ;\n }", "public String getColumnName(int col) {\r\n if (columns[col] instanceof StratmasObject) {\r\n return ((StratmasObject)columns[col]).getReference().getIdentifier().trim();\r\n }\r\n else {\r\n return (String)columns[col];\r\n }\r\n }", "String getSortColumn();", "@Override\r\n public String getColumnName(int column) {\n return (String)this.columnNames.get(column);\r\n }", "public ColumnMetadata getColumn() {\r\n return m_column;\r\n }", "public String getColName() {\r\n\t\treturn colName;\r\n\t}", "@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }", "public String getPropertyName(String column) {\r\n\t\trefineMetaData();\r\n\t\tcolumn = column.toLowerCase();\r\n\t\t// Log.debug(\"%s->%s\", column, col2prop.get(column));\r\n\t\treturn col2prop.get(column);\r\n\t}" ]
[ "0.6963588", "0.6949371", "0.6924037", "0.6605974", "0.6416941", "0.63612556", "0.6335212", "0.6276687", "0.6260334", "0.620806", "0.6193867", "0.61604476", "0.61468244", "0.6102824", "0.6102824", "0.60872966", "0.6061757", "0.60234976", "0.600996", "0.5989886", "0.5989886", "0.5982945", "0.5971054", "0.59696674", "0.59215534", "0.59044015", "0.589053", "0.588438", "0.58669764", "0.58620024", "0.58503187", "0.5838344", "0.5825761", "0.5823563", "0.58227205", "0.5797846", "0.579185", "0.579185", "0.57716626", "0.5760547", "0.57338446", "0.5720398", "0.57145476", "0.57054925", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.57045776", "0.5697225", "0.5697225", "0.56935436", "0.5656351", "0.5640271", "0.5638421", "0.56377643", "0.56285805", "0.5623093", "0.56183046", "0.5613614", "0.56110764", "0.5610775", "0.55972815", "0.5593915", "0.5572267", "0.5572267", "0.55677766", "0.5559397", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.55574745", "0.5552501", "0.5549453", "0.5545543", "0.55350304", "0.5532942", "0.5519038", "0.5511748", "0.5510709", "0.55067843", "0.5500785", "0.54917705", "0.54822403" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.name
public void setName(String name) { this.name = name == null ? null : name.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPluginName(String pluginName);", "@Override\n\tpublic void setName(java.lang.String name) {\n\t\t_expandoColumn.setName(name);\n\t}", "public void setColumnName (String ColumnName);", "public String getPluginName(){\n\t\treturn pluginName;\n\t}", "public String getName(){\n\t\t\treturn columnName;\n\t\t}", "public String getName() {\n return columnName;\n }", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "@Override\n public String getPluginName() {\n return null;\n }", "@Override\n public String getPluginName() {\n return null;\n }", "public void setColumnName(String columnName);", "public String getName() { return _sqlName; }", "@Override\n public void alterColumnByName(String name, XPropertySet descriptor) throws SQLException, NoSuchElementException {\n \n }", "private void setColumnName(ResultSetMetaData metadata) throws SQLException {\r\n if (connectedToDatabase) {\r\n for (int i = 1; i <= numberOfcolumns; i++) {\r\n columnNames.add(i - 1, metadata.getColumnName(i));\r\n }\r\n /**\r\n * create new column to handle status of row. You can hide or visible it by comment or not the line code follow.\r\n */\r\n //columnNames.add(\"RecordStatus\");\r\n }\r\n }", "@ApiModelProperty(value = \"Gets and sets the name of the column.\")\n public String getName() {\n return name;\n }", "public void setCustomName ( String name ) {\n\t\texecute ( handle -> handle.setCustomName ( name ) );\n\t}", "public DatabaseQueryColumn(String name) {\n this.formula = null;\n this.name = name;\n }", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _expandoColumn.getName();\n\t}", "SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}", "public void setName(String columnName) {\n ctTableColumn.setName(columnName);\n }", "public void setColumnName(String columnName) {\r\n dataBinder.setColumnName(columnName);\r\n }", "public abstract String getDatabaseColumnName(String entityName, String propertyName);", "KijiColumnName getAttachedColumn();", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "public String getFieldName() { return databaseFieldName; }", "public void setColumnName(String columnName) {\r\n navBinder.setColumnName(columnName);\r\n }", "public void setColumnName(String columnName) {\n this.columnName = columnName;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {\n this.column = column;\n this.javaProperty = javaProperty;\n this.jdbcType = jdbcType;\n this.isColumnNameDelimited = isColumnNameDelimited;\n }", "public void setColumnName(java.lang.String columnName) {\r\n this.columnName = columnName;\r\n }", "public void setColumnName(String columnName)\n {\n this.columnName = columnName;\n }", "public ScGridColumn<AcMobileDeviceTransmitSummaryVo> newMobileProfileNameColumn()\n {\n return newMobileProfileNameColumn(\"Mobile Profile Name\");\n }", "public StrColumn getName() {\n return (StrColumn) (isText ? textFields.computeIfAbsent(\"name\", StrColumn::new) :\n getBinaryColumn(\"name\"));\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public StrColumn getName() {\n return delegate.getColumn(\"name\", DelegatingStrColumn::new);\n }", "public void setName(final java.lang.String name) {\r\n this.name = name;\r\n this.values.put(UserInfoTable.NAME, name);\r\n }", "private static TextColumnBuilder getColumnByNameField(String nameField){ \n return drColumns.get(nameField);\n }", "Table setColumn(int index, String name);", "@Override\n public void setName(String name) {\n \n }", "public void setName(final String name) {\n\t\tGuard.ArgumentNotNullOrEmpty(name, \"name\");\n\t\t\n\t\tthis.name = name;\n\t\t\n\t\tif (bukkitPlayer != null) {\n\t\t\tbukkitPlayer.setDisplayName(name);\n\t\t\tbukkitPlayer.setCustomName(name);\n\t\t\tbukkitPlayer.setPlayerListName(name);\n\t\t}\n\t\tdb.updateField(this, \"name\", name);\n\t}", "private void setCustomName(String name) {\n this.name = ChatColorConverter.convert(name);\n this.getLivingEntity().setCustomName(this.name);\n this.hasCustomName = true;\n if (ConfigValues.defaultConfig.getBoolean(DefaultConfig.ALWAYS_SHOW_NAMETAGS))\n eliteMob.setCustomNameVisible(true);\n }", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n public void setName(String name) {\n\n }", "@Override\r\n public void setName(String name) {\n }", "public void setPluginIdentifierToNameMap(Map<String, String> pluginIdentifierToNameMap) {\n\t\tthis.pluginIdentifierToNameMap = pluginIdentifierToNameMap;\n\t}", "@Override\n public void rename(String name) throws SQLException, ElementExistException {\n \n }", "public void setName(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/name\",v);\n\t\t_Name=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public String getColumnName() {\n return columnName; \n }", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "public void setAD_Column_ID (int AD_Column_ID);", "String getColumnName();", "public void setDbName(String sDbName);", "@Override\n\tpublic String getJdbcTypeName() {\n\t\tString text = JdbcTypesManager.getJdbcTypes().getTextForCode( getJdbcTypeCode() );\n\t\treturn text != null ? text : \"???\" ;\n\t}", "@Override\n protected String getColumnNameForMetadata(String columnName) {\n return (columnName == null) ? \"%\" : super\n .getColumnNameForMetadata(columnName);\n }", "@Override\n public String propertyToColumnName(String propertyName) {\n if (Pattern.compile(\"[A-Z]+\").matcher(propertyName).find()) {\n return \"\\\"\" + propertyName + \"\\\"\";\n } else {\n return super.propertyToColumnName(propertyName);\n }\n }", "public DatabaseOptions name(String name) {\n this.name = name;\n return this;\n }", "public void setResult(String name) {\r\n DatabaseField returnField = (DatabaseField)getParameters().get(0);\r\n returnField.setName(name);\r\n }", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "public void setPluginVersion(String pluginVersion);", "public ScGridColumn<AcMobileDeviceTransmitSummaryVo> newMobileDeviceNameColumn()\n {\n return newMobileDeviceNameColumn(\"Mobile Device Name\");\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public Builder setDatabaseName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public Builder setDatabaseName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n databaseName_ = value;\n onChanged();\n return this;\n }", "public String getColumnName();", "@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\n\t}", "public String getColumnName() {\r\n return dataBinder.getColumnName();\r\n }", "String getImplicitBundlePropertyName(int columnIndex);", "public String getColumnName() {\n return this.columnName;\n }", "public void addColumn(String columnName);", "public void setName(String new_name){\n this.name=new_name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public String getColumnName(int aColumn) {\n return model.getColumnName(aColumn); \n }", "private void setCustomName(EliteMobProperties eliteMobProperties) {\n this.name = ChatColorConverter.convert(\n eliteMobProperties.getName().replace(\n \"$level\", eliteMobLevel + \"\"));\n eliteMob.setCustomName(this.name);\n if (ConfigValues.defaultConfig.getBoolean(DefaultConfig.ALWAYS_SHOW_NAMETAGS))\n eliteMob.setCustomNameVisible(true);\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "static final SettingsModelString createNewColumnNameModel() {\n return new SettingsModelString(\"new_column_name\", null);\n }", "public java.lang.String getColumnName() {\r\n return columnName;\r\n }", "public ScGridColumn<AcUpuTagSummaryVo> newDestinationCountryCodeColumn()\n {\n return newDestinationCountryCodeColumn(\"Destination Country Code\");\n }", "@Column(name = \"name\")\n public String getName() {\n return name;\n }", "public void setName(final String name) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setName(name);\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }", "@Override\n public String getPluginName() {\n return \"Unify server-exporter\";\n }", "public String getDatabaseName(){\n\treturn strDbName;\n }", "public static Element addOrModifyColumn(Element parent, String name) {\n\t\tfinal Element columnMapping = parent.element( \"column\" );\n\n\t\tif ( columnMapping == null ) {\n\t\t\treturn addColumn( parent, name, null, null, null, null, null, null );\n\t\t}\n\n\t\tif ( !StringTools.isEmpty( name ) ) {\n\t\t\taddOrModifyAttribute( columnMapping, \"name\", name );\n\t\t}\n\n\t\treturn columnMapping;\n\t}", "public void setName(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(NAME_PROP.get(), value);\n }", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }", "@Override\n\tpublic String sqlQualifiedColumn(String tablename, String columnname) {\n\t\treturn String.format(\"%s.\\\"%s\\\"\", tablename, columnname);\n\t}", "@Override\n public String getDatabaseName() {\n return mappings.getDatabaseName();\n }", "@Override\n public String getColumnName(int columnIndex) {\n return columnNames[columnIndex];\n }" ]
[ "0.64005846", "0.61483747", "0.59146726", "0.5908369", "0.5899583", "0.58210784", "0.5786313", "0.5781127", "0.5781127", "0.56731415", "0.56198996", "0.56020176", "0.5581192", "0.55801094", "0.5570108", "0.55492425", "0.55346894", "0.5524782", "0.5502314", "0.5495044", "0.5470625", "0.5406578", "0.5298172", "0.5283711", "0.526384", "0.5252935", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.52224064", "0.5195022", "0.5177075", "0.51558644", "0.51523584", "0.5150504", "0.5150504", "0.5126252", "0.51258695", "0.51119846", "0.5092977", "0.5085854", "0.508377", "0.5074542", "0.5074542", "0.50720656", "0.50652176", "0.5056865", "0.5043998", "0.5041933", "0.50407356", "0.503738", "0.5025196", "0.50181377", "0.50006986", "0.5000304", "0.49826938", "0.49819276", "0.4978984", "0.49779373", "0.4969031", "0.4967347", "0.49650475", "0.49439713", "0.49439713", "0.49432826", "0.49432826", "0.49432826", "0.49432826", "0.49289405", "0.49091914", "0.49084643", "0.49066573", "0.49012443", "0.4900187", "0.48957437", "0.4893404", "0.4893404", "0.48932424", "0.48820597", "0.4871523", "0.48712865", "0.4856058", "0.4851869", "0.48481846", "0.48419896", "0.4841543", "0.48403507", "0.48373544", "0.48363513", "0.48340872", "0.48340124", "0.4822191", "0.48219523", "0.48171076" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.public_access
public Boolean getPublicAccess() { return publicAccess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean publicAdmin() {\n try {\n return getConfig().getPublicAdmin();\n } catch (Throwable t) {\n t.printStackTrace();\n return false;\n }\n }", "public boolean isAccessLevelPublic() {\r\n String level = getOption(OPTION_ACCESS_LEVEL, ACCESS_LEVEL_PUBLIC);\r\n return ACCESS_LEVEL_PUBLIC.equals(level);\r\n }", "@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}", "public Boolean getIsPublic() {\n\t\treturn isPublic;\n\t}", "public boolean getIsPublic()\n\t{\n\t\treturn isPublic;\n\t}", "public int getAccessLevel() {\n return 0;\r\n }", "public String getAccess();", "public boolean getIsPublic()\n {\n return isPublic;\n }", "String getAccess();", "String getAccess();", "public void setPublicAccess(Boolean publicAccess) {\n this.publicAccess = publicAccess;\n }", "public int getAccess() {\n\t\treturn access;\n\t}", "public String getAccession() {\n return accession;\n }", "public AccessLevel getAccessLevel(){\n return this.accessLevel;\n }", "public String apiAccessLevel() {\n return this.apiAccessLevel;\n }", "public String getAccess()\n\t\t{\n\t\t\treturn m_access;\n\t\t}", "public String getAccesslevel() {\n\t\treturn adminLevel;\r\n\t}", "public boolean isPublic() {\r\n\t\treturn isPublic;\r\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "protected int get_AccessLevel() {\n\t\treturn accessLevel.intValue();\n\t}", "@Override\n\tpublic int getAccessible() {\n\t\treturn _userSync.getAccessible();\n\t}", "@Column(name = \"PUBLICUSER_UUID\")\n\tpublic String getPublicUserUUID()\n\t{\n\t\treturn publicUserUUID;\n\t}", "public String getPermissionAdmin() {\n return permissionAdmin;\n }", "static public int getADMIN() {\n return 1;\n }", "java.lang.String getAdmin();", "@Override\n\tpublic ProjectDTO getPublicAccessCodePublicAccessCodeEnabledForProjectId( int projectId ) throws SQLException {\n\t\t\n\t\tProjectDTO returnItem = null;\n\t\t\n\t\tfinal String querySQL = \"SELECT public_access_code, public_access_code_enabled FROM project_tbl WHERE id = ?\";\n\t\t\n\t\ttry ( Connection dbConnection = super.getDBConnection();\n\t\t\t PreparedStatement preparedStatement = dbConnection.prepareStatement( querySQL ) ) {\n\t\t\t\n\t\t\tpreparedStatement.setInt( 1, projectId );\n\t\t\ttry ( ResultSet rs = preparedStatement.executeQuery() ) {\n\t\t\t\tif( rs.next() ) {\n\t\t\t\t\treturnItem = new ProjectDTO();\n\t\t\t\t\treturnItem.setId( projectId );\n\t\t\t\t\treturnItem.setPublicAccessCode( rs.getString( \"public_access_code\" ) );\n\t\t\t\t\t{\n\t\t\t\t\t\tint publicAccessCodeEnabled_Int = rs.getInt( \"public_access_code_enabled\" );\n\t\t\t\t\t\tif ( publicAccessCodeEnabled_Int == Database_OneTrueZeroFalse_Constants.DATABASE_FIELD_TRUE ) {\n\t\t\t\t\t\t\treturnItem.setPublicAccessCodeEnabled( true );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturnItem.setPublicAccessCodeEnabled( false );\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} catch ( Exception e ) {\n\t\t\tString msg = \"Failed to select subset, projectId: \" + projectId + \", sql: \" + querySQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t\treturn returnItem;\n\t}", "public Integer getIsadmin() {\r\n return isadmin;\r\n }", "public String getIsAdmin() {\n return isAdmin;\n }", "public String getAccessionStatus() {\n\t\tString t = doc.get(\"collaccessionstatus\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public int getInPortalAccessId() {\n return inPortalAccessId;\n }", "public boolean getIsAdmin() {\n return isAdmin;\n }", "public java.lang.String getAccession()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCESSION$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public int getAccess()\n {\n ensureLoaded();\n return m_flags.getAccess();\n }", "@Override\n public String getStudyAccess() throws WdkModelException, WdkUserException {\n return \"public\";\n }", "@Override\n\tpublic boolean isPublic() {\n\t\treturn false;\n\t}", "public Expression getAccessExpression()\r\n {\r\n\treturn m_accessExpression;\r\n }", "public String getappAccess() {\n\t\treturn _appAccess;\n\t}", "public String getAdminCode(){\n return this.adminCode;\n }", "public int getAdmin() {\n return admin;\n }", "public PublicNetworkAccess publicNetworkAccess() {\n return this.publicNetworkAccess;\n }", "public PublicNetworkAccess publicNetworkAccess() {\n return this.publicNetworkAccess;\n }", "public int getAccessType() {\n return accessType;\n }", "public String getAccessNum() {\r\n return accessNum;\r\n }", "public boolean isPublic()\n {\n ensureLoaded();\n return m_flags.isPublic();\n }", "public ModbusAccess getAccess() {\r\n\t\treturn access;\r\n\t}", "public String getPluginPublicId() {\n return pluginPublicId;\n }", "public boolean isAdmin();", "public int getCod_admin() {\r\n return cod_admin;\r\n }", "public abstract List<String> getAdditionalAccessions();", "public Integer getPublicuserid() {\n return publicuserid;\n }", "public boolean isAccessLevelPrivate() {\r\n String level = getOption(OPTION_ACCESS_LEVEL, ACCESS_LEVEL_PUBLIC);\r\n return ACCESS_LEVEL_PRIVATE.equals(level);\r\n }", "public java.lang.String getDefaultOpportunityAccess() {\n return defaultOpportunityAccess;\n }", "public boolean asAdmin() {\n\t\treturn asAdmin;\n\t}", "public boolean isPublic() {\n\t\treturn Modifier.isPublic(modifier);\n\t}", "public boolean asAdmin() {\n\t\t\treturn asAdmin;\n\t\t}", "JApiModifier<AccessModifier> getAccessModifier();", "boolean isAdmin();", "public Boolean isAccessible() {\n return this.isAccessible;\n }", "@Schema(description = \"Operations the current user is able to perform on this object\")\n public Map<String, Boolean> getCan() {\n return can;\n }", "public Boolean getIgnorePublicAcls() {\n return this.ignorePublicAcls;\n }", "public boolean getAdminProject()\r\n {\r\n return (m_adminProject);\r\n }", "public Long getAccessId() {\n\t\treturn this.accessId;\n\t}", "public boolean isIsAdmin() {\r\n return isAdmin;\r\n }", "private boolean isPublic(String level, ModifierHolder mods) {\r\n\t\treturn level.equalsIgnoreCase(\"public\") && \r\n\t\t\t\tmods.isPublic();\r\n\t}", "@RequestMapping(value = \"/admin/privatePage\", method = RequestMethod.GET)\n\tpublic String privatePage() {\n\t\treturn \"privatePage\";\n\t}", "public String getAccessionNumber()\n {\n return accessionNumber;\n }", "boolean getIsAuthorized();", "public String getPublicId() {\n // TODO Auto-generated method stub\n return null;\n }", "public Boolean getHasAdminSeen() {\n return hasAdminSeen;\n }", "public void setIsPublic(boolean isPublic)\n {\n this.isPublic = isPublic;\n }", "public Boolean getRestrictPublicBuckets() {\n return this.restrictPublicBuckets;\n }", "public AccessType getAccessType() {\n return accessType;\n }", "public AccessType getAccessType() {\n return accessType;\n }", "public int getAccessFlags() {\n return access_flags;\n }", "@JsonIgnore\n public boolean isAccesible() {\n return isGateway();\n }", "@JsonIgnore\n public Boolean isPrivate()\n {\n return isPrivate;\n }", "public boolean isAccessible() {\n return accessible;\n }", "public Date getPublicDate() {\n return (Date) getAttributeInternal(PUBLICDATE);\n }", "public String getAccessionNumber() {\n return aao.getAccessionNumber();\n }", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "boolean isAdminDirect() {\n return isAdministrator;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic U accessObject()\n\t{\n\t\treturn (primaryKey == null)?(null):\n\t\t (U)bean(GetUnity.class).getUnited(primaryKey);\n\t}", "public int getPublicity() {\n\t\treturn publicity;\n\t}", "public Boolean isPrivado() {\n return privado;\n }", "public boolean isPortalEditEnabled() {\n return portalEditEnabled;\n }", "public String getPublicId()\n {\n return null; // FIXME track public IDs too\n }", "public String getPublicId() {\n\t\treturn mPublicId;\n\t}", "default T calendarAccessAuthorized() {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, true);\n }", "public String getPublicContent() {\n return this.publicContent;\n }", "public Boolean isModoAdmin() {\r\n\t\treturn this.modoAdmin;\r\n\t}", "public String getPublicIpAddress() {\n return publicIpAddress;\n }", "public AccessType getAccessType() {\n\treturn this.accessType;\n }", "public List<ChunkData> getAccess() {\n return access;\n }", "boolean isPublic()\n {\n return this.visibility.equals(Visibility.PUBLIC);\n //|| this.visibility.equals(Visibility.INHERIT_FROM_SCOPE) && getTokenRef().findToken().getEnclosingScope().isDefaultVisibilityPrivate() == false;\n }", "public boolean isAdmin()\n {\n return admin;\n }", "public boolean isAdmin()\n {\n return admin;\n }", "public boolean isAdmin() {\r\n return admin;\r\n }", "public UserSet getPublicUsers() {\n\t\t//users/public\n\t\treturn restTemplate.getForObject(this.embyUrl + \"/\" + EmbyUrlConstants.PUBLIC_USERS, UserSet.class);\n\t\t\n\t}" ]
[ "0.63928646", "0.6326209", "0.6262391", "0.62285703", "0.62097955", "0.6208694", "0.6199258", "0.61856717", "0.59568864", "0.59568864", "0.5838984", "0.5805426", "0.58009094", "0.5796195", "0.57789594", "0.57688755", "0.57658887", "0.5746489", "0.56760395", "0.56760395", "0.56760395", "0.56760395", "0.56750286", "0.5624962", "0.56236964", "0.56132334", "0.55781996", "0.5568586", "0.5546872", "0.5533258", "0.5516085", "0.5509877", "0.5509684", "0.5503883", "0.5493696", "0.54810625", "0.5479298", "0.54664934", "0.54471403", "0.54165107", "0.5400426", "0.5396337", "0.5396337", "0.5380082", "0.53775126", "0.53744555", "0.5370303", "0.53564066", "0.5312252", "0.5304754", "0.52957404", "0.52723336", "0.52563083", "0.52560216", "0.52502406", "0.5223798", "0.52007544", "0.51946527", "0.51944953", "0.5180038", "0.51594424", "0.5156176", "0.51552856", "0.5153122", "0.5147208", "0.5143272", "0.5141673", "0.51405025", "0.51334393", "0.5132263", "0.5114054", "0.511216", "0.51045567", "0.5099027", "0.5099027", "0.5097718", "0.5086047", "0.5085595", "0.50853187", "0.50812453", "0.5079297", "0.50724566", "0.5051009", "0.50358963", "0.50284976", "0.50192964", "0.50160396", "0.5014985", "0.50088096", "0.5005338", "0.49871814", "0.49863663", "0.49862638", "0.49850476", "0.4982266", "0.49821284", "0.49604297", "0.49604297", "0.49286127", "0.49282086" ]
0.68118125
0
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.public_access
public void setPublicAccess(Boolean publicAccess) { this.publicAccess = publicAccess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIsPublic(boolean isPublic)\n {\n this.isPublic = isPublic;\n }", "public void setPublic()\n {\n ensureLoaded();\n m_flags.setPublic();\n setModified(true);\n }", "public void setIsPublic( boolean isPublic )\n\t{\n\t\tthis.isPublic\t= isPublic;\n\t}", "public void setIsPublic(Boolean isPublic) {\n\t\tthis.isPublic = isPublic;\n\t}", "public Boolean getPublicAccess() {\n return publicAccess;\n }", "public boolean publicAdmin() {\n try {\n return getConfig().getPublicAdmin();\n } catch (Throwable t) {\n t.printStackTrace();\n return false;\n }\n }", "public boolean isAccessLevelPublic() {\r\n String level = getOption(OPTION_ACCESS_LEVEL, ACCESS_LEVEL_PUBLIC);\r\n return ACCESS_LEVEL_PUBLIC.equals(level);\r\n }", "public boolean getIsPublic()\n\t{\n\t\treturn isPublic;\n\t}", "public boolean getIsPublic()\n {\n return isPublic;\n }", "public Boolean getIsPublic() {\n\t\treturn isPublic;\n\t}", "public void setEditAuthUserPublicEvents(final boolean val) {\n editAuthUserType |= UserAuth.publicEventUser;\n }", "public void setAdmin(boolean value) {\r\n this.admin = value;\r\n }", "public boolean isPublic() {\r\n\t\treturn isPublic;\r\n\t}", "@Override\n\tpublic boolean isPublic() {\n\t\treturn false;\n\t}", "public void setAuthorized(boolean value) {\n this.authorized = value;\n }", "public int getAccessLevel() {\n return 0;\r\n }", "@Override\n\tpublic void setAccessible(int accessible) {\n\t\t_userSync.setAccessible(accessible);\n\t}", "public void makeItPublic(int exam_ID){\n StringBuffer sql1=new StringBuffer();\n sql1.append(\"UPDATE Exam \");\n sql1.append(\"SET isPublic=1\");\n sql1.append(\" where Exam_ID='\");\n sql1.append(exam_ID+\"';\");\n StringBuffer sql2=new StringBuffer();\n sql2.append(\"UPDATE Exam \");\n sql2.append(\"SET isPublic=0\");\n sql2.append(\" where isPublic=1;\");\n\n \n SQLHelper sQLHelper = new SQLHelper();\n sQLHelper.sqlConnect();\n \n sQLHelper.runUpdate(sql2.toString());\n sQLHelper.runUpdate(sql1.toString());\n \n }", "public void setIsAdmin(boolean isAdmin) {\r\n this.isAdmin = isAdmin;\r\n }", "void setAccessible(boolean accessible);", "public void setExposeAccessContext(boolean exposeAccessContext)\r\n/* 34: */ {\r\n/* 35: 95 */ this.exposeAccessContext = exposeAccessContext;\r\n/* 36: */ }", "public void setPrivate(Boolean isPrivate)\n {\n this.isPrivate = isPrivate;\n }", "@Override\n\tpublic ProjectDTO getPublicAccessCodePublicAccessCodeEnabledForProjectId( int projectId ) throws SQLException {\n\t\t\n\t\tProjectDTO returnItem = null;\n\t\t\n\t\tfinal String querySQL = \"SELECT public_access_code, public_access_code_enabled FROM project_tbl WHERE id = ?\";\n\t\t\n\t\ttry ( Connection dbConnection = super.getDBConnection();\n\t\t\t PreparedStatement preparedStatement = dbConnection.prepareStatement( querySQL ) ) {\n\t\t\t\n\t\t\tpreparedStatement.setInt( 1, projectId );\n\t\t\ttry ( ResultSet rs = preparedStatement.executeQuery() ) {\n\t\t\t\tif( rs.next() ) {\n\t\t\t\t\treturnItem = new ProjectDTO();\n\t\t\t\t\treturnItem.setId( projectId );\n\t\t\t\t\treturnItem.setPublicAccessCode( rs.getString( \"public_access_code\" ) );\n\t\t\t\t\t{\n\t\t\t\t\t\tint publicAccessCodeEnabled_Int = rs.getInt( \"public_access_code_enabled\" );\n\t\t\t\t\t\tif ( publicAccessCodeEnabled_Int == Database_OneTrueZeroFalse_Constants.DATABASE_FIELD_TRUE ) {\n\t\t\t\t\t\t\treturnItem.setPublicAccessCodeEnabled( true );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturnItem.setPublicAccessCodeEnabled( false );\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} catch ( Exception e ) {\n\t\t\tString msg = \"Failed to select subset, projectId: \" + projectId + \", sql: \" + querySQL;\n\t\t\tlog.error( msg, e );\n\t\t\tthrow e;\n\t\t}\n\t\treturn returnItem;\n\t}", "public void setIsadmin(Integer isadmin) {\r\n this.isadmin = isadmin;\r\n }", "private Public() {\n super(\"public\", null);\n }", "public void setappAccess(String appAccess) {\n\t\t_appAccess = appAccess;\n\t}", "default T setCalendarAccessAuthorized(boolean value) {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, value);\n }", "public void setPrivado(Boolean privado) {\n this.privado = privado;\n }", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}", "public void setPrivate( boolean newValue ) {\n privateMode = newValue;\n }", "public void setAccess(int nAccess)\n {\n ensureLoaded();\n m_flags.setAccess(nAccess);\n setModified(true);\n }", "@Column(name = \"PUBLICUSER_UUID\")\n\tpublic String getPublicUserUUID()\n\t{\n\t\treturn publicUserUUID;\n\t}", "public void setPrivate(boolean b) {\n isPrivate = b;\n }", "public void setAccess(String access)\n\t\t{\n\t\t\tm_access = access;\n\t\t}", "public void setPublicURL(URI publicURL) {\n this.publicURL = publicURL;\n }", "public boolean isPublic()\n {\n ensureLoaded();\n return m_flags.isPublic();\n }", "public void setAccession(String accession) {\n this.accession = accession;\n }", "public void setAccession(String accession) {\n this.accession = accession;\n }", "private boolean isPublic(String level, ModifierHolder mods) {\r\n\t\treturn level.equalsIgnoreCase(\"public\") && \r\n\t\t\t\tmods.isPublic();\r\n\t}", "@Override\n\tpublic void setLoggedIn(boolean arg0) {\n\t\t\n\t}", "public void setPrivate()\n {\n ensureLoaded();\n m_flags.setPrivate();\n setModified(true);\n }", "public void setAdmin(boolean admin) {\n this.admin = admin;\n }", "public void setAdmin( boolean admin )\n {\n this.admin = admin;\n }", "public void setAccession(java.lang.String accession)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ACCESSION$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ACCESSION$2);\r\n }\r\n target.setStringValue(accession);\r\n }\r\n }", "public boolean getIsAdmin() {\n return isAdmin;\n }", "void setHasLoggedIn(Boolean value);", "public void setPluginPublicId(String pluginPublicId) {\n this.pluginPublicId = pluginPublicId;\n }", "public boolean asAdmin() {\n\t\treturn asAdmin;\n\t}", "public Integer getIsadmin() {\r\n return isadmin;\r\n }", "public void setIsAdmin(String isAdmin) {\n this.isAdmin = isAdmin == null ? null : isAdmin.trim();\n }", "public void setPublicIpAddress(String publicIpAddress) {\n this.publicIpAddress = publicIpAddress;\n }", "public void checkPublic() {\n }", "@Override\n public String getStudyAccess() throws WdkModelException, WdkUserException {\n return \"public\";\n }", "public void setAdminProject(boolean adminProject)\r\n {\r\n m_adminProject = adminProject;\r\n }", "void setVisibility(ASTAccessSpecNode accessSpec)\n {\n if (accessSpec.isPublic())\n this.visibility = Visibility.PUBLIC;\n else if (accessSpec.isPrivate())\n this.visibility = Visibility.PRIVATE;\n }", "static public int getADMIN() {\n return 1;\n }", "public void setDescServicioPublico(Boolean descServicioPublico){\n this.descServicioPublico = descServicioPublico;\n }", "public boolean asAdmin() {\n\t\t\treturn asAdmin;\n\t\t}", "public void setPublicDate(Date value) {\n setAttributeInternal(PUBLICDATE, value);\n }", "public void setORM_Jefeadministracion(orm.Jefeadministracion value) {\n\t\tthis.jefeadministracion = value;\n\t}", "public boolean isPublic() {\n\t\treturn Modifier.isPublic(modifier);\n\t}", "public void updateVisible (Connection conn) throws SQLException {\r\n\r\n\t\tString query = \r\n\t\t\t\"update gene_list_analyses \"+\r\n\t\t\t\"set visible = 1 \"+\r\n\t\t\t\"where analysis_id = ?\";\r\n\r\n\t\tlog.debug(\"in updateVisible. analysis = \"+this.getDescription());\r\n \t\tPreparedStatement pstmt = conn.prepareStatement(query, \r\n\t\t\t\t\t\tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n\t\t\t\t\t\tResultSet.CONCUR_UPDATABLE);\r\n\t\tpstmt.setInt(1, this.getAnalysis_id());\t\r\n\t\tpstmt.executeUpdate();\r\n\t}", "public String getIsAdmin() {\n return isAdmin;\n }", "@External\n\tpublic void set_super_admin(Address _super_admin) {\n\t\tif (Context.getCaller().equals(Context.getOwner())) {\n\t\t\tthis.super_admin.set(_super_admin);\n\t\t\tthis.admin_list.add(_super_admin);\n\t\t}\n\t\t\n\t}", "public void setUserAdmin(boolean isUserAdmin) {\r\n this.userAdmin = isUserAdmin;\r\n }", "public UserSet getPublicUsers() {\n\t\t//users/public\n\t\treturn restTemplate.getForObject(this.embyUrl + \"/\" + EmbyUrlConstants.PUBLIC_USERS, UserSet.class);\n\t\t\n\t}", "private static void setAllowedPathAccess(HttpServletRequest request){\n\t\tString idStr = request.getParameter(PROJECTID);\n\t\tString accessPath = portalProperties.getProperty(\"curriculum_base_dir\");\n\t\t\n\t\t/* catch minify command and set access path to the vle/all */\n\t\tif(\"minify\".equals(request.getParameter(\"command\"))){\n\t\t\taccessPath = accessPath.replace(\"curriculum\", \"vle/all\");\n\t\t}\n\t\t\n\t\tif(\"studentAssetUpload\".equals(request.getParameter(\"cmd\")) || \"studentAssetCopyForReference\".equals(request.getParameter(\"command\"))) {\n\t\t\taccessPath = portalProperties.getProperty(\"studentuploads_base_dir\");\n\t\t}\n\t\t\n\t\t/* if there is a project id parameter, set access level to the project dir */\n\t\tif(idStr != null && !idStr.equals(\"\") && !idStr.equals(\"none\")){\n\t\t\ttry{\n\t\t\t\tProject project = projectService.getById(Long.parseLong(idStr));\n\t\t\t\tString projectPath = (String) project.getCurnit().accept(new CurnitGetCurnitUrlVisitor());\n\t\t\t\tif(projectPath != null){\n\t\t\t\t\tFile accessFile = new File(accessPath + projectPath);\n\t\t\t\t\taccessPath = accessFile.getParentFile().getCanonicalPath();\n\t\t\t\t}\n\t\t\t} catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ObjectNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"accessPath\", accessPath);\n\t}", "public AccessLevel getAccessLevel(){\n return this.accessLevel;\n }", "public String getAccess();", "public boolean isAdmin();", "public void setPublicContent(String publicContent) {\n this.publicContent = publicContent;\n }", "public void securityOn()\n {\n m_bSecurity = true;\n }", "@Override\r\n\t\tpublic void setReadOnly(boolean readOnly) throws SQLException {\n\t\t\t\r\n\t\t}", "public boolean isPortalEditEnabled() {\n return portalEditEnabled;\n }", "public void setPublicuserid(Integer publicuserid) {\n this.publicuserid = publicuserid;\n }", "@JsonIgnore\n public Boolean isPrivate()\n {\n return isPrivate;\n }", "public boolean isAccessLevelPrivate() {\r\n String level = getOption(OPTION_ACCESS_LEVEL, ACCESS_LEVEL_PUBLIC);\r\n return ACCESS_LEVEL_PRIVATE.equals(level);\r\n }", "public native void setEditable(boolean value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.editable = value;\n }-*/;", "public String getPermissionAdmin() {\n return permissionAdmin;\n }", "JApiModifier<AccessModifier> getAccessModifier();", "public void setEditAuthUserContentAdmin(final boolean val) {\n editAuthUserType |= UserAuth.contentAdminUser;\n }", "boolean isPublic()\n {\n return this.visibility.equals(Visibility.PUBLIC);\n //|| this.visibility.equals(Visibility.INHERIT_FROM_SCOPE) && getTokenRef().findToken().getEnclosingScope().isDefaultVisibilityPrivate() == false;\n }", "public Boolean getIgnorePublicAcls() {\n return this.ignorePublicAcls;\n }", "public Boolean isPrivado() {\n return privado;\n }", "private boolean isPublic(FieldBinding fieldBinding) {\n \t\tif (fieldBinding instanceof InterTypeFieldBinding) return true;\n \t\treturn fieldBinding.isPublic();\n \t}", "public void setInternal(boolean internal)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INTERNAL$4, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INTERNAL$4);\n }\n target.setBooleanValue(internal);\n }\n }", "public String getAccesslevel() {\n\t\treturn adminLevel;\r\n\t}", "boolean isWriteAccess();", "public void setPerishable(boolean value) {\r\n this.perishable = value;\r\n }", "public void setSuperAdmin(Boolean isSuperAdmin) {\n\t\tthis.superAdmin = isSuperAdmin;\n\t}", "private void changePlacePrivacy() {\n this.place.setPublic(!this.place.getPublic());\n this.place.saveInBackground();\n\n if(this.place.getPublic()) {\n this.binding.btnPublic.setText(R.string.make_private);\n } else {\n this.binding.btnPublic.setText(R.string.make_public);\n }\n }", "public int getInPortalAccessId() {\n return inPortalAccessId;\n }", "public void setInvulnerable ( boolean flag ) {\n\t\ttry {\n\t\t\tinvokeSafe ( \"setInvulnerable\" , flag );\n\t\t} catch ( NoSuchMethodError ex ) { // legacy\n\t\t\thandleOptional ( ).ifPresent (\n\t\t\t\t\thandle -> EntityReflection.setInvulnerable ( handle , flag ) );\n\t\t}\n\t}", "public void setAccess(Rail access) {\n\tthis.access = access;\n }", "public void setReadWriteOnMyLatestView()\n {\n \t m_acl = \tm_acl | (1<<2);\n }", "public void setFieldReadAccess() {\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\ttypeFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tobjetFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.canReadSmsPredefiniDescription())\n\t\t\tmessageFilterBox.setVisible(false);\n\n\t\tif (!AccessManager.isAdmin())\n\t\t\tdeletedEntityBoxFilterBox.setVisible(false);\n\t}", "public void setInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_info_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_info_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public String getPluginPublicId() {\n return pluginPublicId;\n }", "default T calendarAccessAuthorized() {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, true);\n }" ]
[ "0.62099016", "0.6056219", "0.603778", "0.5994516", "0.5984774", "0.58639646", "0.5799785", "0.5681528", "0.56808513", "0.56646734", "0.5560123", "0.54962516", "0.5407054", "0.5383347", "0.53353745", "0.5215951", "0.52058727", "0.5153284", "0.5122434", "0.5114714", "0.50895834", "0.50842446", "0.50432944", "0.5042441", "0.5014916", "0.5002756", "0.49858838", "0.4976286", "0.49424058", "0.4937376", "0.49365732", "0.49094334", "0.4885765", "0.48850134", "0.4878799", "0.48686504", "0.4868464", "0.48430854", "0.48430854", "0.4838436", "0.48361903", "0.48288372", "0.4824915", "0.48242524", "0.48151568", "0.47925964", "0.47898427", "0.47893515", "0.4785944", "0.4784389", "0.47708312", "0.47649992", "0.47572082", "0.47435784", "0.47298262", "0.47262922", "0.47262916", "0.4724962", "0.4719371", "0.47185975", "0.47171175", "0.47146657", "0.4700796", "0.46846336", "0.46816805", "0.46798778", "0.46762097", "0.46576327", "0.46429977", "0.46364564", "0.4630188", "0.46298826", "0.46278432", "0.462312", "0.4618348", "0.46154958", "0.4610073", "0.4605063", "0.46040368", "0.45988742", "0.45977986", "0.4597453", "0.4591644", "0.45886263", "0.45843208", "0.45818546", "0.45797235", "0.45792916", "0.45763513", "0.45653132", "0.45652375", "0.4563116", "0.4557993", "0.4556666", "0.45566067", "0.45541984", "0.45527264", "0.4550147", "0.45481423", "0.45427984" ]
0.68046063
0
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.search_text
public String getSearchText() { return searchText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "public String getSearchResultsText() {\n System.out.println(\"[step] getSearchResultsText\");\n return page.findElement(signSearch).getText();\n }", "java.lang.String getSearchValue();", "public String getSearchField() {\n return searchField.getText();\n }", "public String searchResult(){\n return getText(first_product_title);\n }", "public String getSearchHint();", "public io.dstore.values.StringValue getSearchValue() {\n if (searchValueBuilder_ == null) {\n return searchValue_ == null ? io.dstore.values.StringValue.getDefaultInstance() : searchValue_;\n } else {\n return searchValueBuilder_.getMessage();\n }\n }", "HasValue<String> getSearchString();", "public String ToSearchContent()\n\t{\n\t\treturn \"Success\";\n\t}", "public io.dstore.values.StringValue getSearchValue() {\n return searchValue_ == null ? io.dstore.values.StringValue.getDefaultInstance() : searchValue_;\n }", "@NotNull\n String getSearchExpression();", "Search getSearch();", "public String getResultCountText(){\n\n return searchResultCount.getText();\n\n }", "io.dstore.values.StringValue getSearchValue();", "@ApiModelProperty(value = \"The search string used to query the data\")\n public String getSearchString() {\n return searchString;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (searchBuilder_ == null) {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n } else {\n if (inputSourceCase_ == 10) {\n return searchBuilder_.getMessage();\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }\n }", "public io.dstore.values.StringValueOrBuilder getSearchValueOrBuilder() {\n return getSearchValue();\n }", "TextBox getSearchContent();", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }", "public String getText() throws SQLException {\n\t\tif (text != null)\n\t\t\treturn text;\n\n\t\tloadFromDB();\n\t\t\n\t\tif (rev_id == -1)\n\t\t\treturn null;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT text_content FROM text WHERE text_id = ?\");\n\t\tstmt.setInt(1, rev_text_id);\n\t\tstmt.execute();\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (rs.next())\n\t\t\ttext = rs.getString(1);\n\t\tstmt.close();\n\t\treturn text;\n\t}", "@In String search();", "public String getSearchKey() {\n return this.SearchKey;\n }", "protected String getSearchHint() {\n if (!isMessageListReady()) {\n return \"\";\n }\n Account account = getMessageListFragment().getAccount();\n Mailbox mailbox = getSearchableMailbox();\n\n if (mailbox == null) {\n return \"\";\n }\n\n if (shouldDoGlobalSearch(account, mailbox)) {\n return mActivity.getString(R.string.search_hint);\n }\n\n // Regular mailbox, or IMAP - search within that mailbox.\n String mailboxName = FolderProperties.getInstance(mActivity).getDisplayName(mailbox);\n return String.format(\n mActivity.getString(R.string.search_mailbox_hint),\n mailboxName);\n }", "public io.dstore.values.StringValueOrBuilder getSearchValueOrBuilder() {\n if (searchValueBuilder_ != null) {\n return searchValueBuilder_.getMessageOrBuilder();\n } else {\n return searchValue_ == null ?\n io.dstore.values.StringValue.getDefaultInstance() : searchValue_;\n }\n }", "@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "String getValueText();", "public String extractresult(String search) {\n\t\tfd.findElement(By.id(\"sb_form_q\")).sendKeys(search);\r\n\t\tfd.findElement(By.id(\"sb_form_go\")).click();\r\n\t\t\r\n\t\treturn fd.findElement(By.className(\"sb_count\")).getText();\t\r\n\t}", "public String getSearchKeyword() {\n return SharedPrefsUtils.getStringPreference(application.getApplicationContext(), \"KEY\");\n }", "public String getSearchType() {\r\n\t\treturn searchType;\r\n\t}", "public String getSearchType() {\r\n\t\treturn searchType;\r\n\t}", "io.dstore.values.StringValueOrBuilder getSearchValueOrBuilder();", "public final native String getFullTextQuery() /*-{\n return this.getFullTextQuery();\n }-*/;", "public String getSavedSearch() {\n\t\treturn restClient.getSavedSearch();\n\t}", "@java.lang.Override\n public com.clarifai.grpc.api.SearchOrBuilder getSearchOrBuilder() {\n if ((inputSourceCase_ == 10) && (searchBuilder_ != null)) {\n return searchBuilder_.getMessageOrBuilder();\n } else {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }\n }", "public int getSearchType()\r\n\t{\r\n\t\treturn searchType;\r\n\t}", "public String getResearchteachorresearch() {\r\n\t\treturn researchteachorresearch;\r\n\t}", "@Override\n\tString search(String text) throws Exception {\n\t\tString result = null;\n\t\tthis.text = text;\n\t\tthis.connection = this.getConnection();\n\n\t\tresult = searchRes();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tresult = searchTour();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tconnection.close();\n\t\tthrow new Exception(\"NOT FOUND\");\n\t}", "public String getSearchClass() {\r\n return searchClass;\r\n }", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}", "public String getSuggestedText() {\n return suggestedText;\n }", "@Override\r\n\tpublic int searchCount(String text) {\n\t\treturn productRawDao.searchCount(text);\r\n\t}", "@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }", "@NonNull\n public String getQuery() {\n return searchView.getQuery().toString();\n }", "String getRqText();", "@GetMapping(value = { \"/search\" })\n\tpublic String searchPage() {\n\t\treturn \"search\";\n\t}", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "String getTextValue();", "public String getContent() throws SearchResultException;", "private String getSQLText (CTextField f)\n \t{\n \t\tString s = f.getText().toUpperCase();\n \t\tif (!s.endsWith(\"%\"))\n \t\t\ts += \"%\";\n \t\tlog.fine( \"String=\" + s);\n \t\treturn s;\n \t}", "@Override\n public String getText() {\n return analyzedWord;\n }", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String popupSearch(String criteria) {\n\t\treturn null;\r\n\t}", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}", "public SearchResult search(String text, String subText);", "public String SearchString(String search) {\n\t\tStringQueryDefinition query = queryMgr.newStringDefinition();\n\t\tquery.setCriteria(search);\n\n\t\t// create a handle for the search results\n\t\tStringHandle resultsHandle = new StringHandle();\n\n\t\t// run the search\n\t\tqueryMgr.search(query, resultsHandle);\n\n\t\t// release the client\n\t\tclient.release();\n\t\t\n\t\treturn resultsHandle.toString();\n\t}", "public NsSearchResult<RecT> search() {\n Object searchRecord = toNativeQuery();\n NsSearchResult<RecT> result = clientService.search(searchRecord);\n if (!result.isSuccess()) {\n NetSuiteClientService.checkError(result.getStatus());\n }\n return result;\n }", "public String getText() {\n\t\tif (null != this.text) {\n\t\t\treturn this.text;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"text\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public interface OrgDeptMapper extends OrgDeptPOMapper {\n @Select( {\n \"<script>\",\n \"select\",\n \"id, org_id, name, tel_no, created_by, updated_by, created_at, updated_at\",\n \"FROM org_dept \",\n \"where org_id = #{orgId,jdbcType=INTEGER}\",\n \"<if test=\\\"text != null\\\">\",\n \" and LOWER(name) like LOWER(concat('%',#{text, jdbcType=VARCHAR},'%'))\",\n \"</if>\",\n \"</script>\"\n })\n @ResultMap( {\"com.inmind.automind.datalayer.mapper.OrgDeptPOMapper.BaseResultMap\"})\n List<OrgDeptPO> fuzzySearchByName(@Param(\"orgId\") Long orgId, @Param(\"text\") String text);\n}", "public abstract S getSearch();", "public static String getDeterminedSearchTerm() {\n\t\treturn determinedSearchTerm;\n\t}", "public String getText() {\r\n\r\n return field.getText();\r\n\r\n }", "com.google.protobuf.ByteString\n getSearchValueBytes();", "public String getQuery() {\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tif (null == window) {\n\t\t\treturn null;\n\t\t}\n\n\t\tIEditorPart editor = window.getActivePage().getActiveEditor();\n\t\tif (editor == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!(editor instanceof QueryEditorPart)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tQueryEditorPart queryEditorPart = (QueryEditorPart) editor;\n\t\tStyledText stext = queryEditorPart.getSqlEditorWidget();\n\t\treturn stext.getSelectionText();\n\t}", "public String getSearchPagePath() {\r\n return this.searchPagePath;\r\n }", "public String getText()\n {\n return field.getText();\n }", "@Override\r\n\tpublic int searchInCount(String text) {\n\t\treturn productRaw_InDao.searchCount(text);\r\n\t}", "public void setSearchText(String s) {\n\t\t\tthis.searchString = \".*\" + s + \".*\";\n\t\t}", "public static ArrayList<MatHang_DTO> search(String text) throws ClassNotFoundException, SQLException {\n\t\treturn MatHang_DAL.search(text);\n\t}", "public String getFindKeywords() {\n return getString(CommandProperties.FIND_KEYWORDS);\n }", "public SearchContext getSearchContext() \n {\n return mSearchContext;\n }", "public boolean getLSearch () {\r\n return l_search;\r\n }", "@RequestMapping(value = \"/search\", method = { RequestMethod.GET })\r\n\tpublic String search(Model model) {\n\t\tList<String> indexFieldNamesForMM = ecoreMetamodelService.getAllIndexTags();\r\n\t\tmodel.addAttribute(\"indexFieldNamesForMM\", indexFieldNamesForMM);\r\n\r\n\t\t// Tags for T. (statics)\r\n\t\t// Get all Transformations tags\r\n\t\tList<String> indexFieldNamesForT = atlTransformationService.getAllIndexTags();\r\n\t\tmodel.addAttribute(\"indexFieldNamesForT\", indexFieldNamesForT);\r\n\r\n\t\t// Tags for M. (dinamics)\r\n\t\t// Get all tags\r\n\t\tList<String> indexFieldNamesForM = modelService.getAllIndexTags();\r\n\r\n\t\t// Remove Metamodels and Transformations tags in order to find out only\r\n\t\t// the model tags.\r\n\t\tindexFieldNamesForM.removeAll(indexFieldNamesForMM);\r\n\t\tindexFieldNamesForM.removeAll(indexFieldNamesForT);\r\n\r\n\t\tmodel.addAttribute(\"indexFieldNamesForM\", indexFieldNamesForM);\r\n\r\n\t\treturn \"public.search\";\r\n\t}", "@Override\r\n public void searchMessage(Search<SolutionType> search, String message) {\n }", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "List<DataTerm> search(String searchTerm);", "@java.lang.Override\n public com.clarifai.grpc.api.SearchOrBuilder getSearchOrBuilder() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }", "@objid (\"97592105-6aa5-4309-9255-2224148c5b95\")\r\n public Button getSearch() {\r\n return this.searchButton;\r\n }", "public void search() throws SQLException;", "@SuppressWarnings(\"unchecked\")\n private SearchT toNativeQuery() {\n initSearch();\n\n BasicRecordType basicRecordType = BasicRecordType.getByType(searchRecordTypeDesc.getType());\n if (BasicRecordType.TRANSACTION == basicRecordType) {\n SearchFieldAdapter<?> fieldAdapter = metaDataSource.getBasicMetaData().getSearchFieldAdapter(SearchFieldType.SELECT);\n Object searchTypeField = fieldAdapter.populate(LIST_ANY_OF, Arrays.asList(recordTypeInfo.getRecordType().getType()));\n Beans.setProperty(searchBasic, NsObjectTransducer.TYPE, searchTypeField);\n\n } else if (BasicRecordType.CUSTOM_RECORD == basicRecordType) {\n CustomRecordTypeInfo customRecordTypeInfo = (CustomRecordTypeInfo) recordTypeInfo;\n NsRef customizationRef = customRecordTypeInfo.getCustomizationRef();\n\n Object recType = metaDataSource.getBasicMetaData().createInstance(RefType.CUSTOMIZATION_REF.getTypeName());\n Beans.setProperty(recType, NsObjectTransducer.SCRIPT_ID, customizationRef.getScriptId());\n // Avoid using Internal Id for custom records\n Beans.setProperty(recType, NsObjectTransducer.TYPE, Beans.getEnumAccessor(\n (Class<Enum<?>>) Beans.getBeanInfo(recType.getClass()).getProperty(NsObjectTransducer.TYPE).getWriteType())\n .getEnumValue(customizationRef.getType()));\n\n Beans.setProperty(searchBasic, NsObjectTransducer.REC_TYPE, recType);\n }\n\n // Set custom fields\n if (!customFieldList.isEmpty()) {\n Object customFieldListWrapper = metaDataSource.getBasicMetaData().createInstance(SEARCH_CUSTOM_FIELD_LIST);\n List<Object> customFields = (List<Object>) Beans.getProperty(customFieldListWrapper, NsObjectTransducer.CUSTOM_FIELD);\n for (Object customField : customFieldList) {\n customFields.add(customField);\n }\n Beans.setProperty(searchBasic, NsObjectTransducer.CUSTOM_FIELD_LIST, customFieldListWrapper);\n }\n\n SearchT searchRecord;\n if (searchRecordTypeDesc.getSearchClass() != null) {\n Beans.setProperty(search, BASIC, searchBasic);\n searchRecord = search;\n if (searchAdvanced != null) {\n Beans.setProperty(searchAdvanced, CONDITION, search);\n searchRecord = searchAdvanced;\n }\n } else {\n searchRecord = searchBasic;\n }\n\n return searchRecord;\n }", "public List<products> search(String text) {\n\t\t \n\t // get the full text entity manager\n\t FullTextEntityManager fullTextEntityManager =\n\t org.hibernate.search.jpa.Search.\n\t getFullTextEntityManager(entityManager);\n\t \n\t // create the query using Hibernate Search query DSL\n\t QueryBuilder queryBuilder = \n\t fullTextEntityManager.getSearchFactory()\n\t .buildQueryBuilder().forEntity(products.class).get();\n\t \n\t // a very basic query by keywords\n\t org.apache.lucene.search.Query query =\n\t queryBuilder\n\t .keyword()\n\t .onFields(\"title\")\n\t .matching(text)\n\t .createQuery();\n\t \n\t //System.out.println(\"query \"+query.toString());\n\t // wrap Lucene query in an Hibernate Query object\n\t org.hibernate.search.jpa.FullTextQuery jpaQuery =\n\t fullTextEntityManager.createFullTextQuery(query, products.class);\n\t jpaQuery.setMaxResults(10);\n\t //System.out.println(\"query \"+jpaQuery.toString());\n\t // execute search and return results (sorted by relevance as default)\n\t @SuppressWarnings(\"unchecked\")\n\t List<products> results = jpaQuery.getResultList();\n\t \n\t return results;\n\t }", "public SearchType getSearchType() {\n\t\treturn searchType;\n\t}", "public String getWhere()\n {\n // StringBuffer ==> String\n return this.whSelect.toString(); \n }", "public SearchHandle SearchStringHandler(String search) {\n\t\tStringQueryDefinition query = queryMgr.newStringDefinition();\n\t\tquery.setCriteria(search);\n\n\t\t// create a handle for the search results\n\t\tSearchHandle resultsHandle = new SearchHandle();\n\n\t\t// run the search\n\t\tqueryMgr.search(query, resultsHandle);\n\n\t\t// release the client\n\t\tclient.release();\n\t\t\n\t\treturn resultsHandle;\n\t}", "public String getTextFromTextField() {\r\n\t\treturn textField.getText();\r\n\t}", "public Object getSearchAttributeValue() {\n return searchAttributeValue;\n }", "@Override\n public SearchResult search_hunter(String keyword, int page, int rows ,int search_type) throws Exception{\n\n return null;\n }", "public int getSearchIndex() \n\t{\n\t\treturn itemSearchIndex;\n\t}", "public String getTextValue() {\r\n return _textValue;\r\n }", "@Override\r\n\tpublic int searchOutCount(String text) {\n\t\treturn productRaw_OutDao.searchCount(text);\r\n\t}", "@Override\n public SearchResult search_item(String keyword, int page, int rows , int search_type) throws Exception{\n return null;\n }", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "public void setSearchNameTextFieldText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_searchNameTextField_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchNameTextFieldText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public io.dstore.values.StringValue.Builder getSearchValueBuilder() {\n \n onChanged();\n return getSearchValueFieldBuilder().getBuilder();\n }", "public String getFullText() {\n\t\treturn this.fullText;\n\t}", "@Query(\"SELECT a FROM Appointment a WHERE a.description like ?1\")\n\t public List<Appointment> searchByDescription(String searchstr);", "public abstract Search defaultSearch(StringBuilder sb);", "public String getText() {\n\t\treturn new XWPFWordExtractor(document).getText();\n\t}", "public String search() {\n return \"manage\";\n }" ]
[ "0.65078616", "0.618585", "0.6180441", "0.61541057", "0.5916915", "0.5783565", "0.5770705", "0.5766602", "0.57401603", "0.57113874", "0.55733323", "0.55525404", "0.55495507", "0.55381924", "0.55270255", "0.5497954", "0.5494651", "0.54017824", "0.5376922", "0.5308748", "0.5195538", "0.5187663", "0.5182362", "0.5163463", "0.5140298", "0.51196736", "0.5109319", "0.5091526", "0.5088539", "0.5083875", "0.5083875", "0.5057374", "0.50368696", "0.50355", "0.50310284", "0.4999202", "0.49874112", "0.49536765", "0.494744", "0.49386907", "0.4936737", "0.49313688", "0.49246454", "0.49194863", "0.49134538", "0.4909574", "0.48974308", "0.48867035", "0.48836902", "0.4881127", "0.48690572", "0.48661056", "0.48661056", "0.48648876", "0.48617163", "0.48503828", "0.48433718", "0.48379847", "0.48364463", "0.4818179", "0.48139295", "0.47877765", "0.47819903", "0.477633", "0.4754426", "0.47527128", "0.47514042", "0.47501546", "0.47491097", "0.47446212", "0.4725908", "0.47194445", "0.47191784", "0.47133636", "0.47006875", "0.46998078", "0.4690779", "0.468307", "0.46825224", "0.46811745", "0.46780932", "0.46751872", "0.4674601", "0.46729183", "0.46712103", "0.46672198", "0.4667014", "0.4666451", "0.46596664", "0.46496156", "0.46479595", "0.46478486", "0.46390808", "0.46375412", "0.4637534", "0.46356982", "0.4634831", "0.46331352", "0.46328017", "0.46323028" ]
0.6440687
1
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.search_text
public void setSearchText(String searchText) { this.searchText = searchText == null ? null : searchText.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSearchText(String s) {\n\t\t\tthis.searchString = \".*\" + s + \".*\";\n\t\t}", "public void setSearchNameTextFieldText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_searchNameTextField_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchNameTextFieldText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }", "public void setSearchButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_searchButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "public String getSearchText() {\n return searchText;\n }", "public void setWordSearched(String wordSearched){\r\n this.wordSearched = wordSearched;\r\n setWordSearchedLower(wordSearched);\r\n }", "public void setSearchMode(SearchMode searchMode) {\n this.searchMode = searchMode;\n }", "public void setString(String SearchQuery) {\n this.SearchQuery = SearchQuery;\n notifyDataSetChanged();\n }", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "@ApiModelProperty(value = \"The search string used to query the data\")\n public String getSearchString() {\n return searchString;\n }", "@Override\n\tpublic void search() {\n\t}", "public void setSearchQuery(String searchQuery) {\n this.searchQuery = searchQuery;\n }", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "public void setSearchContext(SearchContext pSearchContext) \n {\n mSearchContext = pSearchContext;\n }", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public QueryResultBuilder<T> applySearch(Option<Search> search);", "@Override\n\tpublic boolean onQueryTextChange(String newText) {\n\t\tLog.v(\"query\",\"onQueryTextChange\");\n\t\tmTextView.setText(\"Searching for \" + newText);\n\t\treturn false;\n\t}", "public void setLSearch (boolean value) {\r\n l_search = value; }", "public void setSearchClass(String searchClass) {\r\n this.searchClass = searchClass;\r\n }", "private String getSearchText() {\n\t\treturn this.clientUI.getSearchField();\n\t}", "public void setTextOnSearchBar(String text) {\n elementControl.clear(searchBar);\n elementControl.setText(searchBar, text);\n }", "public Builder setSearch(com.clarifai.grpc.api.Search value) {\n if (searchBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inputSource_ = value;\n onChanged();\n } else {\n searchBuilder_.setMessage(value);\n }\n inputSourceCase_ = 10;\n return this;\n }", "public void search() {\r\n \t\r\n }", "@Override\n public void afterTextChanged(Editable s) {\n String text = edtSearch.getText().toString();\n searchForMatch(text);\n }", "public Builder setSearchValue(io.dstore.values.StringValue value) {\n if (searchValueBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n searchValue_ = value;\n onChanged();\n } else {\n searchValueBuilder_.setMessage(value);\n }\n\n return this;\n }", "public String getSearchHint();", "protected void setSearch(ArrayList<Contact> search){\n this.search = search;\n }", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "public void tableSearch(String searchKey){\n\t\tTestLog.log.info(\"verify text search\");\n\t\ttry{\n\t\t\tdriver.findElement(txtSearch).sendKeys(searchKey);\n\t\t}catch (Exception ex) {\n\t\t\tTestLog.log.info(\"Text search verification fails\" + ex);\n\t\t}\n\t\t\t\t\n\t}", "@Override\n public void onSearchTermChanged() {\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "public void setSearchKey(String SearchKey) {\n this.SearchKey = SearchKey;\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n }", "public void setSearchOptions(SearchOptions options) {\n searchOptions_ = options;\n }", "public void search() {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n String text = editsearch.getText().toString().toLowerCase(Locale.getDefault());\n adapter.filter(text);\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n String text = editsearch.getText().toString().toLowerCase(Locale.getDefault());\n adapter.filter(text);\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n if (collapsingSearchView) {\n collapsingSearchView = false;\n return true;\n }\n\n if (newText.isEmpty()) {\n Utils.removeSettingsValue(key);\n\n searchTermOrCvID = null;\n searchView.setSubmitButtonEnabled(false);\n } else {\n\n searchTermOrCvID = newText;\n searchView.setSubmitButtonEnabled(true);\n }\n\n return true;\n }", "public void setSearchQuery(String searchQuery) {\n searchQuery = searchQuery.toLowerCase();\n this.searchQuery = searchQuery;\n\n List<Media> mediaList = viewModel.getMediaList();\n List<Media> newList = new ArrayList<>();\n\n for (Media media : mediaList) {\n String title = media.getTitle().toLowerCase();\n if (title.contains(searchQuery)){\n newList.add(media);\n }\n }\n searchList.clear();\n searchList.addAll(newList);\n }", "@Override\n\t\tpublic void configure(JobConf job) {\n\t\t\twords = job.get(\"search.word\").split(\"[ \\t]+\");\n\t\t}", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n // store the search query being entered in a global object that will be used to persist data\n // note: intentionally we use another string instead of @searchQueryToRestore, as SearchView\n // query is at first set to null (at the time SearchView is initialised), before setQuery()\n // method is called\n searchQueryToListen = newText;\n return false;\n }", "public void setCustomText(String text) {\n\t\tthis.text = text;\n\t\tcustomUpdateView();\n\t}", "@Override\n public SearchResult search_hunter(String keyword, int page, int rows ,int search_type) throws Exception{\n\n return null;\n }", "@Override\r\n public boolean onQueryTextSubmit(String query) {\n searchAdapter.setSearchResults(DataCache.getInstance().getSearchResults(query));\r\n return false;\r\n }", "@Override\r\n public void searchMessage(Search<SolutionType> search, String message) {\n }", "public void setNewSearch(String query){\n isNewSearch = true;\n this.query = query;\n }", "public Search(String value) {\n this(value, false);\n }", "public abstract Search defaultSearch(StringBuilder sb);", "Search getSearch();", "@Override\n\tString search(String text) throws Exception {\n\t\tString result = null;\n\t\tthis.text = text;\n\t\tthis.connection = this.getConnection();\n\n\t\tresult = searchRes();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tresult = searchTour();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tconnection.close();\n\t\tthrow new Exception(\"NOT FOUND\");\n\t}", "public final native void setFullTextQuery(String fullTextQuery) /*-{\n this.setFullTextQuery(fullTextQuery);\n }-*/;", "public void doSearch(String searchText){\n }", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isSearching() {\n\t\treturn false;\n\t}", "public void search() throws SQLException;", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearchResults(text);\n }", "java.lang.String getSearchValue();", "@Override\r\n\tpublic int searchCount(String text) {\n\t\treturn productRawDao.searchCount(text);\r\n\t}", "public void setSearchType(final int searchType)\r\n\t{\r\n\t\tthis.searchType = searchType;\r\n\t}", "public void setBusqueda(Search s) {\n this._busqueda = s;\n }", "@Override\r\n\t\t\tpublic boolean onQueryTextChange(String newText) {\n\t\t\t\tdebugMemory(\"onQueryTextChange\");\r\n\t\t\t\treturn false;\r\n\t\t\t}", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "public void setSearchPagePath(String pagePath) {\r\n this.searchPagePath = pagePath;\r\n }", "@Override\n public void setYieldingSearchTerm(String yieldingSearchTerm) {\n this.yieldingSearchTerm = yieldingSearchTerm;\n }", "public SearchResult search(String text, String subText);", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "@Override\n\tpublic void search() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 조회를 하다.\");\n\t}", "public FindCommand(String searchTerms) {\n super(false);\n this.searchTerms = searchTerms;\n }", "private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(text);\n searchField.sendKeys(Keys.RETURN);\n }", "public void performSearch() {\n OASelect<QueryInfo> sel = getQueryInfoSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "@In String search();", "@Override\n\t\tpublic boolean onQueryTextChange(String newText) {\n\t\t\treturn false;\n\t\t}", "public void setAsText(String text)\n {\n setValue(getAsDocument(text));\n }", "public String ToSearchContent()\n\t{\n\t\treturn \"Success\";\n\t}", "@Override\n public SearchResult search_item(String keyword, int page, int rows , int search_type) throws Exception{\n return null;\n }", "@Override\n public void onSearchTermChanged(String term) {\n }", "public void firstSearch() {\n\n\t\tif ((workspaceSearchField.getText() == null) || \"\".equals(workspaceSearchField.getText())) {\n\t\t\tworkspaceSearchField.setText(mainGUI.getSearchFieldText());\n\t\t\tsearchInWorkspaceFor(workspaceSearchField.getText());\n\t\t}\n\t}", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "@Override\n public void afterTextChanged(Editable s)\n {\n String userInput = filter(s.toString());\n\n // Then searches database and return result\n searchDatabase(userInput);\n }", "public interface ISearch {\n void onTextQuery(String text);\n\n}", "@Override\n public boolean onQueryTextChange(String newText) {\n adapteer.getFilter().filter(newText);\n return false;\n }", "@Autowired\n public void setSearchService(SearchService searchService) {\n this.searchService = searchService;\n }", "public void setSearchTerms(String searchTerms) {\r\n this.searchTerms = searchTerms;\r\n }", "@Override\n public void afterTextChanged(Editable s) {\n filter(s.toString());\n //you can use runnable postDelayed like 500 ms to delay search text\n }", "public void setReportText(java.lang.String param){\n \n this.localReportText=param;\n \n\n }", "@JsonSetter(\"text\")\r\n public void setText(String text) {\r\n this.text = text;\r\n }", "@Override\n public void afterTextChanged(Editable s) {\n if (s.length() != 0) {\n search(searchIput.getText().toString()); // search user\n } // if input is not empty\n }", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "public String initializeSearch() {\r\n\t\tthis.searchCompanyManage = \"\";\r\n\t\tthis.idSearchBranchOffice = 0;\r\n\t\tthis.idFarmSearch = 0;\r\n\t\treturn consultPermissionPersonCompany();\r\n\t}", "HasValue<String> getSearchString();", "private void searchFunction() {\n\t\t\r\n\t}", "public Search() throws Exception {\n sesion = Controller.getSession();\n fullTextSesion = org.hibernate.search.Search.getFullTextSession(sesion);\n }", "public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}", "@Override\n public void setText(String englishText) {\n\n }", "public void onSearchSubmit(String queryTerm);", "@Override\n public boolean onQueryTextChange(String newText) {\n filter(newText);\n return true;\n }" ]
[ "0.6488572", "0.6237819", "0.58584625", "0.57637495", "0.5701768", "0.5496234", "0.54719394", "0.5434772", "0.5413678", "0.5397612", "0.53958523", "0.53924775", "0.5373386", "0.53540444", "0.53515476", "0.5336572", "0.5306432", "0.52981937", "0.5272218", "0.5269671", "0.52029896", "0.5186819", "0.5181435", "0.5180634", "0.51715505", "0.51531035", "0.51495266", "0.5148578", "0.5143779", "0.51390105", "0.51209027", "0.510963", "0.5108833", "0.51041424", "0.5101945", "0.5095413", "0.50917876", "0.50917876", "0.5052558", "0.5052309", "0.50475585", "0.50425446", "0.50425446", "0.5037827", "0.5013649", "0.5012173", "0.49995908", "0.4993288", "0.49853754", "0.4982968", "0.49616748", "0.49585292", "0.49533498", "0.49520746", "0.49507985", "0.49443734", "0.49443734", "0.49442238", "0.4921782", "0.49180195", "0.49140033", "0.49029264", "0.4900861", "0.48919687", "0.48825833", "0.4882392", "0.48790863", "0.48710304", "0.48694372", "0.48620343", "0.4851464", "0.4844441", "0.48437724", "0.48399255", "0.48290038", "0.48230806", "0.48229882", "0.48224044", "0.48223922", "0.48066378", "0.48036063", "0.48022652", "0.4798469", "0.4778192", "0.4775453", "0.47735742", "0.47648126", "0.4764165", "0.47638112", "0.4761893", "0.47604454", "0.47514915", "0.47458383", "0.47268242", "0.4725828", "0.47247353", "0.47211236", "0.4715233", "0.47132245", "0.47090328" ]
0.60118854
2
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.state
public String getState() { return state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getSqlState();", "public java.lang.String getSqlState() {\n java.lang.Object ref = sqlState_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n sqlState_ = s;\n return s;\n }\n }", "java.lang.String getPluginstate();", "public java.lang.String getSqlState() {\n java.lang.Object ref = sqlState_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n sqlState_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n public String getState() {\n\n if(this.state == null){\n\n this.state = TestDatabase.getInstance().getClientField(token, id, \"state\");\n }\n\n return state;\n }", "com.google.protobuf.ByteString\n getSqlStateBytes();", "public Integer getaState() {\n return aState;\n }", "public Long getState() {\n return state;\n }", "public int getState(){\n\t\treturn state;\n\t}", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\r\n return state;\r\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public Integer getState() {\n return state;\n }", "public com.google.protobuf.ByteString\n getSqlStateBytes() {\n java.lang.Object ref = sqlState_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n sqlState_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String state() {\n return this.state;\n }", "public String state() {\n return this.state;\n }", "public int getState(){\n return state;\n }", "public com.google.protobuf.ByteString\n getSqlStateBytes() {\n java.lang.Object ref = sqlState_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n sqlState_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState() {\n return state;\n }", "public int getState() {\n \t\treturn state;\n \t}", "public int getState() {return state;}", "public int getState() {return state;}", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public String getState() {\n return this.state;\n }", "public int getState() {\n\t\treturn state;\n\t}", "public String getState(){\n return state;\n }", "public int getState();", "public int getState();", "public int getState();", "public int getState();", "public String getState() {\n return this.State;\n }", "public String getState() {\r\n\t\treturn state;\t\t\r\n\t}", "public String getState() {\n return state;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override\n public int getStateValue() {\n return state_;\n }", "@java.lang.Override public int getStateValue() {\n return state_;\n }", "public STATE getState() {\n\t\n\t\treturn state;\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "public String getState() {\r\n\t\treturn state;\r\n\t}", "@java.lang.Override public int getStateValue() {\n return state_;\n }", "public int getState() {\n return _state;\n }", "public int getState() {\n return state.getValue();\n }", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState()\r\n\t{\r\n\t\treturn state;\r\n\t}", "public String getState() { return state; }", "public String getState()\n {\n \treturn state;\n }", "public String getState() {\n\t\treturn state;\n\t}", "@java.lang.Override\n public com.google.cloud.datafusion.v1beta1.Instance.State getState() {\n com.google.cloud.datafusion.v1beta1.Instance.State result =\n com.google.cloud.datafusion.v1beta1.Instance.State.forNumber(state_);\n return result == null\n ? com.google.cloud.datafusion.v1beta1.Instance.State.UNRECOGNIZED\n : result;\n }", "public String getState()\n\t{\n\t\treturn state;\n\t}", "public String getState() \n\t{\n\t\treturn state;\n\t}", "public int getState() {\n return this.mState;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public byte getState() {\n return myState;\n }", "public Object getState() {\n\t\tint columnCount = getColumnCount();\n\t\tColumnState[] state = new ColumnState[columnCount + hiddenCols.size()];\n\t\tfor (int i = 0; i < columnCount; i++) {\n\t\t\tTableColumn col = getColumn(i);\n\t\t\tObject id = col.getIdentifier();\n\t\t\tstate[i] = getColumnState(id);\n\t\t}\n\t\tfor (Object id : hiddenCols.keySet()) {\n\t\t\tstate[columnCount++] = getColumnState(id);\n\t\t}\n\t\treturn state;\n\t}", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\n return state_;\n }", "public int getState() {\r\n\t\treturn dState;\r\n\t}", "@java.lang.Override\n public com.google.cloud.datafusion.v1beta1.Instance.State getState() {\n com.google.cloud.datafusion.v1beta1.Instance.State result =\n com.google.cloud.datafusion.v1beta1.Instance.State.forNumber(state_);\n return result == null\n ? com.google.cloud.datafusion.v1beta1.Instance.State.UNRECOGNIZED\n : result;\n }", "@Generated\n @Selector(\"state\")\n @NInt\n public native long state();", "public String getState() {\n\t\treturn State;\n\t}", "public int getState() {\n return m_state;\n }", "public String getState()\n\t{\n\t\treturn State;\n\t\t\n\t}", "public int getState() {\n return mState;\n }", "public int getState() {\n return this.state.ordinal();\n }", "int getExecutionStageStateValue();", "public String getTransactionState();" ]
[ "0.6925484", "0.6519753", "0.6484949", "0.64803725", "0.62881464", "0.62154526", "0.6184747", "0.6151222", "0.6121577", "0.61159307", "0.61159307", "0.6111319", "0.6111319", "0.6111319", "0.6111319", "0.6111319", "0.6111319", "0.6105935", "0.6096712", "0.6096712", "0.6091125", "0.6052197", "0.60332626", "0.60024756", "0.60024756", "0.6001247", "0.5986414", "0.5986414", "0.5985988", "0.5985988", "0.59628195", "0.59628195", "0.59628195", "0.59628195", "0.59626245", "0.5961997", "0.5939532", "0.5939532", "0.5939532", "0.5939532", "0.59393746", "0.5935663", "0.59321404", "0.5928379", "0.5928379", "0.5928379", "0.5925186", "0.5925186", "0.5925186", "0.59244275", "0.59232074", "0.59221584", "0.59221584", "0.59221584", "0.5920975", "0.5917663", "0.5908931", "0.59077406", "0.59077406", "0.59011084", "0.58908176", "0.5886744", "0.58859974", "0.58746934", "0.5871882", "0.5866088", "0.5865328", "0.5865328", "0.5865328", "0.5865328", "0.5865328", "0.58607763", "0.5859647", "0.58590597", "0.58590597", "0.58590597", "0.58590597", "0.58587694", "0.5847973", "0.584631", "0.5835872", "0.5826392", "0.58220446", "0.5803873", "0.5802941", "0.5781687", "0.5778136", "0.577343" ]
0.5918544
65
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.state
public void setState(String state) { this.state = state == null ? null : state.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setPluginstate(java.lang.String pluginstate);", "void xsetPluginstate(org.apache.xmlbeans.XmlString pluginstate);", "public Builder setSqlState(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n sqlState_ = value;\n onChanged();\n return this;\n }", "public void setState(Integer state) {\r\n this.state = state;\r\n }", "public void setState(Integer state) {\r\n this.state = state;\r\n }", "public void setState(Integer state) {\n\t\tthis.state = state;\n\t}", "public void setState(String state){\n this.state = state;\n }", "void setState(boolean state);", "public void setState(int state);", "public void setState(int state);", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(Integer state) {\n this.state = state;\n }", "public void setState(String state);", "void setState(int state);", "public void setState(boolean state) {\n\t\tthis.state = state;\n\t}", "public void setState(int state) {\n \t\tthis.state = state;\n \t}", "@Override\n\tpublic void setState(STATE state) {\n\n\t}", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(int id, String state) {\n String sql = \"UPDATE gatewayinstance SET gateway_state = '\" + state + \"' WHERE id = \" + id;\n this.executeUpdateStatement(sql);\n }", "public void setState(Boolean state) {\n this.state = state;\n }", "public void setState(String state)\r\n\t{\r\n\t\tthis.state=state;\r\n\t}", "public void setInDatabase(boolean b) {\n \n }", "public void setState(Long state) {\n this.state = state;\n }", "public void setState(String state) {\r\n\t\tthis.state = state;\r\n\t}", "public void setState(String state) {\r\n\t\tthis.state = state;\r\n\t}", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(String state) {\n this.state = state;\n }", "public void setState(int state) {\n m_state = state;\n }", "public void setState(String state) {\n\t\tthis.state = state;\n\t}", "public void setState(String state) {\n\t\tthis.state = state;\n\t}", "public void setState(String state)\r\n\t{\r\n\t\tthis.state = state;\r\n\t}", "public void setState(String state)\n\t{\n\t\tthis.state = state; \n\t}", "public void setState(String state)\n\t{\n\t\tState = state;\n\t}", "void setState(org.landxml.schema.landXML11.StateType.Enum state);", "public void setState( boolean bool ) { state = bool; }", "void setState(String state);", "public void setState(int state) {\n\t\t\tmState = state;\n\t\t}", "public void setState(String State) {\n this.State = State;\n }", "public void setState(org.landxml.schema.landXML11.StateType.Enum state)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATE$14);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STATE$14);\r\n }\r\n target.setEnumValue(state);\r\n }\r\n }", "void xsetState(org.landxml.schema.landXML11.StateType state);", "public void setState(org.apache.axis.types.UnsignedInt state) {\n this.state = state;\n }", "public void setState(Byte state) {\n this.state = state;\n }", "public void setState(Byte state) {\n this.state = state;\n }", "java.lang.String getSqlState();", "public static void SetState (int state) {\n\t\t source = state;\n\t\t}", "private void setState( int state )\n {\n m_state.setState( state );\n }", "public void setState(java.lang.String state) {\r\n this.state = state;\r\n }", "public void setState (java.lang.String state) {\n\t\tthis.state = state;\n\t}", "public void setState(State state)\n\t\t{\n\t\t\tConferenceInfoDocument.this.setState(userElement, state);\n\t\t}", "@Generated\n @Selector(\"setState:\")\n public native void setState(@NInt long value);", "public void setaState(Integer aState) {\n this.aState = aState;\n }", "public void setState(State state) { model.setState(state); }", "void setState(Object state);", "void setBoolean(int index, boolean value) throws SQLException;", "private void setMPState(String state) {\n this.mpState = state;\n }", "public void setState(java.lang.String state) {\n this.state = state;\n }", "public void setState(java.lang.String state) {\n this.state = state;\n }", "public void set_state(String state) throws Exception{\n\t\tthis.state = state;\n\t}", "void\t\tsetCommandState(String command, String state);", "public void xsetState(org.landxml.schema.landXML11.StateType state)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.StateType target = null;\r\n target = (org.landxml.schema.landXML11.StateType)get_store().find_attribute_user(STATE$14);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.StateType)get_store().add_attribute_user(STATE$14);\r\n }\r\n target.set(state);\r\n }\r\n }", "@Override protected void setState(State s) {\n session.setState(s);\n super.setState(s);\n }", "public void setPlayerState(boolean state)\n\t{\n\t\tthis.blnPlayerState = state;\n\t\t\n\t}", "public void setState(java.lang.String State) {\n this.State = State;\n }", "public void setState(PlayerState state) {\n this.state = state;\n }", "java.lang.String getPluginstate();", "@Override\n\tpublic void setState(State state) \n\t\t{ current = new PuzzleState(state.getString(state.getState()),\n\t\t\t\t\t\t\t\t\tstate.getString(state.getGoalState())); \n\t\t}", "public void setState(State state) {\n\t\tenvironmentStatus = state.name();\n\t\tsetupResult = state.name();\n\t}", "void setState(State state);", "public void setModified(boolean state) {\n //System.out.println(\"setting modified to \" + state);\n //new Exception().printStackTrace();\n current.setModified(state);\n calcModified();\n }", "public abstract void setSensorState(boolean state);", "void setState(SimulationState state) {\n\t\tthis.state = state;\n\t}", "void\t\tsetCommandState(String command, boolean flag);", "public DynamicPart state(boolean state) {\n this.state = state;\n return this;\n }", "public void setState(GameState aState){\n\t\tpoints=aState.getScore();\n\t\tcurrentBoard.setState(aState.getBoardState());\n\t}", "@Override\n public void setState(int state) {\n synchronized(LOCK_STATE) {\n this.state = state;\n }\n }", "public void setState(Context.ContextState state)\n\t{\n\t this.state = state;\n\t}", "public void updateState(boolean state);", "public void setState(State state) {\n\t\tthis.state = state;\n\t}", "public void setState(int state) {\n\t\tif (state == CHASE)\n\t\t\tthis.state = CHASE;\n\t\telse if (state == RUN) \n\t\t\tthis.state = RUN;\n\t}", "void __setState(int i)\n {\n m_state = i;\n }", "@objid (\"dec04375-0805-4a30-ba61-5edb1bdcf44a\")\n void setDataState(BpmnDataState value);", "public Builder setSqlStateBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n sqlState_ = value;\n onChanged();\n return this;\n }", "public void saveState() {\n table.saveState(store);\n }", "public static Boolean setState(Boolean state)\n {\n state = false;\n return state;\n }", "private void setDGState(int dgCode, boolean state){\r\n source.setDGState(dgCode, state);\r\n }", "public void setState(String state) {\n // checkValidState(state);\n if ((!States.special.contains(this.state)\n || !this.inSpecialState)\n && this.state != state) {\n this.spriteNum = 0;\n this.curSpriteFrame = 0;\n this.state = state;\n }\n \n }", "public void changeInstanceState(boolean state) throws RemoteException;", "public void setState(State state) {\n this.state = state;\n }", "public void setState(State state) {\n this.state = state;\n }", "public void setState(@NotNull State state) {\n this.state = state;\n }" ]
[ "0.66404843", "0.599892", "0.5689553", "0.55825716", "0.55825716", "0.55772966", "0.5575299", "0.5570881", "0.5553832", "0.5553832", "0.5546395", "0.5546395", "0.5546395", "0.5546395", "0.5546395", "0.5546395", "0.5544496", "0.55282444", "0.5489546", "0.5436083", "0.54325306", "0.5427289", "0.5427289", "0.5409591", "0.54058087", "0.54053426", "0.5399488", "0.5387498", "0.53813934", "0.53813934", "0.53565586", "0.53565586", "0.53565586", "0.53565586", "0.53565586", "0.53565586", "0.53565586", "0.53565586", "0.5356252", "0.53400326", "0.53400326", "0.5322788", "0.5313289", "0.5312802", "0.5311051", "0.5302965", "0.5276848", "0.52471423", "0.52366394", "0.52329224", "0.5215055", "0.52146345", "0.5210483", "0.5210483", "0.5206033", "0.520415", "0.518354", "0.5158163", "0.51351184", "0.51340896", "0.51305413", "0.51292324", "0.51266086", "0.51200837", "0.5119544", "0.5115223", "0.51028734", "0.51028734", "0.5077896", "0.50634956", "0.504282", "0.5026978", "0.5018345", "0.5005134", "0.5000195", "0.4974056", "0.49685892", "0.4951872", "0.49494138", "0.4944861", "0.49401814", "0.49320298", "0.49318695", "0.49311712", "0.49252737", "0.49248156", "0.49236152", "0.49169087", "0.49078512", "0.49075803", "0.49073076", "0.49002373", "0.48971954", "0.48811615", "0.48734647", "0.48659015", "0.48615485", "0.4850679", "0.4845208", "0.4845208", "0.48383018" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column plugin.tenant_id
public String getTenantId() { return tenantId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getTenantID();", "public String getTENANT_ID() {\n return TENANT_ID;\n }", "@XmlElement(required = true, name = \"tenant_id\")\n public String getTenantId() {\n return tenantId;\n }", "public java.lang.String getTenantProjectId() {\n java.lang.Object ref = tenantProjectId_;\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 tenantProjectId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getTenantProjectId() {\n java.lang.Object ref = tenantProjectId_;\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 tenantProjectId_ = s;\n return s;\n }\n }", "java.lang.String getTenant();", "public String tenantId() {\n return this.tenantId;\n }", "public String getID(){\n return this.getKey().getTenantId(this.getTenantName());\n }", "public String getTenant()\n {\n return tenant;\n }", "public String getTenant() {\n if ( this.token == null || this.token.isEmpty())\n return null;\n JsonObject pl = this.getPayload();\n if ( pl == null )\n return null;\n String tenant = pl.getString(\"tenant\");\n return tenant;\n }", "String getTenantId();", "String getTenantId();", "String getTenantId();", "public UUID tenantId() {\n return this.tenantId;\n }", "public String getTenantId() {\n return tenantId;\n }", "public int getTenantId() { return tenantId; }", "@java.lang.Override\n public com.google.protobuf.ByteString getTenantProjectIdBytes() {\n java.lang.Object ref = tenantProjectId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n tenantProjectId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@ApiModelProperty(required = true, value = \"Tenant id of the Detailed Estimate Deduction\")\n\t@NotNull\n\n\t@Size(min = 4, max = 128)\n\tpublic String getTenantId() {\n\t\treturn tenantId;\n\t}", "public com.google.protobuf.ByteString getTenantProjectIdBytes() {\n java.lang.Object ref = tenantProjectId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n tenantProjectId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "STenant getTenant() throws STenantNotFoundException;", "public String aadTenantId() {\n return this.aadTenantId;\n }", "com.google.protobuf.ByteString\n getTenantBytes();", "public List<String> getTenantIds() {\n \t\treturn getTenantIds(EXCLUDE_CREATE_DISABLED_TENANTS);\n \t}", "@XmlElement(required = true, name = \"tenant_name\")\n public String getTenantName() {\n return tenantName;\n }", "@Override\n public String resolveCurrentTenantIdentifier() {\n return \"Default\";\n }", "@XmlElement(required = true, name = \"tenant_admin\")\n public String getTenantAdmin() {\n return tenantAdmin;\n }", "MasterTenant findByTenantId(String tenantId);", "public void setTenant(String tenant)\n {\n this.tenant = tenant;\n }", "public Builder setTenantProjectId(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n tenantProjectId_ = value;\n bitField0_ |= 0x00800000;\n onChanged();\n return this;\n }", "String provideTenantIdForProcessInstance(TenantIdProviderProcessInstanceContext ctx);", "public String getAccountID() {\n return (tozAdAccountID);\n }", "public void setTENANT_ID(String TENANT_ID) {\n this.TENANT_ID = TENANT_ID == null ? null : TENANT_ID.trim();\n }", "protected void testTenant() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n if (this.tenantName == null || this.tenantName.isEmpty()) {\n throw new IllegalStateException(\"Missing tenant name\");\n }\n\n // Part of Bring your own Tenant Key\n if (tenantKeyFileName != null) {\n // Only if the Tenant Key file is provided as a parameter is it not null.\n // in this case we want special behavior.\n tenantKey = this.tenantKeyFileUtil.readTenantFile(tenantKeyFileName);\n }\n\n if (this.tenantKey == null || this.tenantKey.isEmpty()) {\n throw new IllegalArgumentException(\"No tenant-key value provided\");\n }\n\n logger.info(\"Testing tenant: [\" + tenantName + \"]\");\n\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n // The tenants table, variable and set_tenant procedure are all located in\n // the admin schema. The data access user only has execute privileges on the\n // set_tenant procedure and read access to the variable. The variable can\n // only be set by calling the stored procedure\n Db2SetTenantVariable cmd = new Db2SetTenantVariable(adminSchemaName, tenantName, tenantKey);\n adapter.runStatement(cmd);\n\n Db2GetTenantVariable getter = new Db2GetTenantVariable(adminSchemaName);\n Integer tid = adapter.runStatement(getter);\n if (tid == null) {\n throw new IllegalStateException(\"SV_TENANT_ID not set!\");\n }\n\n // Print the id from the session variable (used for access control)\n logger.info(\"tenantName='\" + tenantName + \"', tenantId=\" + tid);\n\n // Now let's check we can run a select against one our tenant-based\n // tables\n GetResourceTypeList rtListGetter = new GetResourceTypeList(schemaName);\n List<ResourceType> rtList = adapter.runStatement(rtListGetter);\n rtList.forEach(rt -> logger.info(\"ResourceType: \" + rt.toString()));\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n }", "public String getAccountTimeZoneId() {\r\n return accountTimeZoneId;\r\n }", "public Integer getAcctId() {\n return acctId;\n }", "public String frsTenantId() {\n return this.frsTenantId;\n }", "String getAccountID();", "String getAccountID();", "String provideTenantIdForCaseInstance(TenantIdProviderCaseInstanceContext ctx);", "private String getTenantContextFromTenantDomain(String tenantDomain) {\n\n if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equalsIgnoreCase(tenantDomain)) {\n return MultitenantConstants.TENANT_AWARE_URL_PREFIX + \"/\" + tenantDomain + \"/\";\n }\n return \"\";\n }", "public Criteria andTenantIdEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"tenant_id = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }", "public String getCampaignAccount() {\n return (tozAdCampaignAccount);\n }", "io.dstore.values.IntegerValue getCampaignId();", "io.dstore.values.IntegerValue getCampaignId();", "Long getAccountId();", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public long getAccountId() {\n return accountId;\n }", "public List<String> getTenantIds(boolean includeDisabled) {\n \t\tList<String> tenantIds = new ArrayList<String>();\n \t\tString tenantId;\n \t\tHashtable<String, TenantBindingType> tenantBindings = getTenantBindings(includeDisabled);\n \t\tif (tenantBindings != null && !tenantBindings.isEmpty()) {\n \t\t\tEnumeration keys = tenantBindings.keys();\n \t\t\twhile (keys.hasMoreElements()) {\n \t\t\t\ttenantId = (String) keys.nextElement();\n \t\t\t\tif (Tools.notBlank(tenantId)) {\n \t\t\t\t\ttenantIds.add(tenantId);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn tenantIds;\n \t}", "String provideTenantIdForHistoricDecisionInstance(TenantIdProviderHistoricDecisionInstanceContext ctx);", "public String getIdGeneratorDatabaseUsername(){\n \t\treturn getProperty(\"org.sagebionetworks.id.generator.database.username\");\n \t}", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public String getTransDomainId() {\n return transDomainId;\n }", "public int getAccountId() {\n return accountId;\n }", "public String getBaseId();", "public long getOrganizationId();", "public UUID getDbId() {\n return dbId;\n }", "public int getAccountID() {\n return accountID;\n }", "public Long getAccountId() {\n return accountId;\n }", "public Integer getAccountId() {\n return accountId;\n }", "public Integer getAccountId() {\n return accountId;\n }", "@Override\n\tpublic List<TenantBean> getTenants(int aptId) {\n\t\tString query = \"Select * from Tenant where apartmentId=?\";\n\t\t List<TenantBean> tenants=getTenantDetails(query, aptId);\n\t\treturn tenants;\n\t}", "public static TenantCache getTenantCache(RegionCoprocessorEnvironment env, ImmutableBytesPtr tenantId) {\n GlobalCache globalCache = GlobalCache.getInstance(env);\n TenantCache tenantCache = tenantId == null ? globalCache : globalCache.getChildTenantCache(tenantId); \n return tenantCache;\n }", "@Column(name = \"ACCOUNT_ID\")\n\tpublic String getAccountID()\n\t{\n\t\treturn accountID;\n\t}", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public long getAccountId() {\n\t\treturn accountId;\n\t}", "public Long getProjectId() {\n return projectId;\n }", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "public Long getUserAccountId() {\r\n return userAccountId;\r\n }", "public Builder clearTenantProjectId() {\n tenantProjectId_ = getDefaultInstance().getTenantProjectId();\n bitField0_ = (bitField0_ & ~0x00800000);\n onChanged();\n return this;\n }", "public String getBigQueryProjectId() {\n return bigQueryProjectId;\n }", "public long getProjectId() {\r\n return projectId;\r\n }", "Integer getDomainTemplateColumn();", "public Long getAccountId() {\n\t\treturn accountId;\n\t}", "public static String getCacheNameForTenantDatastore() {\n \n StringBuilder cacheName = new StringBuilder();\n cacheName.append(FHIRRequestContext.get().getTenantId())\n .append(\"~\")\n .append(FHIRRequestContext.get().getDataStoreId());\n return cacheName.toString();\n }", "@GET\n @Path(\"/tenants/{id}\")\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @CheckPermission(roles = { Role.SECURITY_ADMIN })\n public OpenStackTenantParam getOpenstackTenant(@PathParam(\"id\") URI id) {\n\n if (id == null) {\n throw APIException.internalServerErrors.targetIsNullOrEmpty(\"Tenant ID\");\n }\n\n _log.debug(\"Keystone Service - getOpenstackTenant with id: {}\", id.toString());\n\n List<KeystoneTenant> tenants = listOpenstackTenants().getOpenstackTenants();\n\n for (KeystoneTenant tenant : tenants) {\n if (tenant.getId().equals(id.toString())) {\n return mapToOpenstackParam(tenant);\n }\n }\n\n throw APIException.notFound.unableToFindEntityInURL(id);\n }", "String organizationId();", "@Override\n public String provideCustomerConnectionId( )\n {\n return _signaleur.getGuid( );\n }", "public Integer getAccountId() {\n return this.accountId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "@Transient\n @JsonProperty(\"project\")\n public Long getProjectId() {\n if (project == null) {\n return 0L;\n } else {\n return project.getId();\n }\n }", "protected abstract String getPluginId();", "java.lang.String getProjectId();", "public String getCampaignID() {\n return (tozAdCampaignID);\n }", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public String getAccountId() {\n return accountId;\n }", "public String getAccountId() {\n return accountId;\n }", "java.lang.String getDatabaseId();", "public int getCountryId();" ]
[ "0.7382479", "0.6962073", "0.69089645", "0.68998337", "0.68673056", "0.68477297", "0.6832075", "0.6778572", "0.6693389", "0.6597976", "0.6593766", "0.6593766", "0.6593766", "0.6588893", "0.6571101", "0.6551993", "0.6468534", "0.6424861", "0.63236374", "0.61525613", "0.60899556", "0.5832837", "0.5827411", "0.57673025", "0.5746286", "0.571988", "0.55024016", "0.5457985", "0.5450806", "0.54368395", "0.5414801", "0.5345688", "0.53116566", "0.52855265", "0.52705544", "0.5257384", "0.52564335", "0.52564335", "0.5250147", "0.5186679", "0.5163773", "0.5136657", "0.5127212", "0.5122931", "0.5122931", "0.5101413", "0.5075752", "0.5075752", "0.5075074", "0.50579476", "0.503839", "0.5015623", "0.5013187", "0.5013187", "0.5009714", "0.49823764", "0.49799845", "0.49790666", "0.49786964", "0.49783748", "0.4974217", "0.49684414", "0.49684414", "0.49683192", "0.4965138", "0.49598613", "0.49459556", "0.49459556", "0.49438772", "0.49358276", "0.49354634", "0.49193168", "0.4908705", "0.48968172", "0.4887392", "0.4887097", "0.48861614", "0.48554638", "0.48528522", "0.4834614", "0.48180574", "0.48175564", "0.48105207", "0.48105207", "0.48045126", "0.4803316", "0.4798951", "0.47942033", "0.47923335", "0.47923335", "0.47923335", "0.47923335", "0.47923335", "0.4791155", "0.4791155", "0.4790983", "0.47891337" ]
0.6582288
16
This method was generated by MyBatis Generator. This method sets the value of the database column plugin.tenant_id
public void setTenantId(String tenantId) { this.tenantId = tenantId == null ? null : tenantId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTenant(String tenant)\n {\n this.tenant = tenant;\n }", "long getTenantID();", "@XmlElement(required = true, name = \"tenant_id\")\n public String getTenantId() {\n return tenantId;\n }", "public Builder setTenantProjectId(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n tenantProjectId_ = value;\n bitField0_ |= 0x00800000;\n onChanged();\n return this;\n }", "public void setTENANT_ID(String TENANT_ID) {\n this.TENANT_ID = TENANT_ID == null ? null : TENANT_ID.trim();\n }", "@Override\n\tpublic void updateTenant(int aptId,TenantBean tenant) {\n\t\tString query = \"update Tenant set tfirstName=?,tlastName=?,tEmail=?,tgender=?,tage=?,Nationality=? where tenantId=?\";\n\t\tResultSet rs=null;\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setString(1, tenant.getTfirstName());\n\t\t\tpstmt.setString(2, tenant.getTlastName());\n\t\t\tpstmt.setString(4, tenant.getTgender());\n\t\t\tpstmt.setString(3, tenant.gettEmail());\n\t\t\tpstmt.setInt(5, tenant.getTage());\n\t\t\tpstmt.setString(6, tenant.getNationality());\n\t\t\tpstmt.setInt(7, aptId);\n\t\t\tpstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int getTenantId() { return tenantId; }", "java.lang.String getTenant();", "@ApiModelProperty(required = true, value = \"Tenant id of the Detailed Estimate Deduction\")\n\t@NotNull\n\n\t@Size(min = 4, max = 128)\n\tpublic String getTenantId() {\n\t\treturn tenantId;\n\t}", "public String getTENANT_ID() {\n return TENANT_ID;\n }", "public String getTenant()\n {\n return tenant;\n }", "protected void testTenant() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n if (this.tenantName == null || this.tenantName.isEmpty()) {\n throw new IllegalStateException(\"Missing tenant name\");\n }\n\n // Part of Bring your own Tenant Key\n if (tenantKeyFileName != null) {\n // Only if the Tenant Key file is provided as a parameter is it not null.\n // in this case we want special behavior.\n tenantKey = this.tenantKeyFileUtil.readTenantFile(tenantKeyFileName);\n }\n\n if (this.tenantKey == null || this.tenantKey.isEmpty()) {\n throw new IllegalArgumentException(\"No tenant-key value provided\");\n }\n\n logger.info(\"Testing tenant: [\" + tenantName + \"]\");\n\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n // The tenants table, variable and set_tenant procedure are all located in\n // the admin schema. The data access user only has execute privileges on the\n // set_tenant procedure and read access to the variable. The variable can\n // only be set by calling the stored procedure\n Db2SetTenantVariable cmd = new Db2SetTenantVariable(adminSchemaName, tenantName, tenantKey);\n adapter.runStatement(cmd);\n\n Db2GetTenantVariable getter = new Db2GetTenantVariable(adminSchemaName);\n Integer tid = adapter.runStatement(getter);\n if (tid == null) {\n throw new IllegalStateException(\"SV_TENANT_ID not set!\");\n }\n\n // Print the id from the session variable (used for access control)\n logger.info(\"tenantName='\" + tenantName + \"', tenantId=\" + tid);\n\n // Now let's check we can run a select against one our tenant-based\n // tables\n GetResourceTypeList rtListGetter = new GetResourceTypeList(schemaName);\n List<ResourceType> rtList = adapter.runStatement(rtListGetter);\n rtList.forEach(rt -> logger.info(\"ResourceType: \" + rt.toString()));\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n }", "public String getTenantId() {\n return tenantId;\n }", "void setDeploymentTenantId(String deploymentId, String newTenantId);", "public String getTenantId() {\n return tenantId;\n }", "public String getTenantId() {\n return tenantId;\n }", "public String getTenantId() {\n return tenantId;\n }", "public String getTenantId() {\n return tenantId;\n }", "@Override\n public void saveSelectedTenantToDB(String selectedTenant) {\n }", "public Builder clearTenantProjectId() {\n tenantProjectId_ = getDefaultInstance().getTenantProjectId();\n bitField0_ = (bitField0_ & ~0x00800000);\n onChanged();\n return this;\n }", "public String tenantId() {\n return this.tenantId;\n }", "@java.lang.Override\n public java.lang.String getTenantProjectId() {\n java.lang.Object ref = tenantProjectId_;\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 tenantProjectId_ = s;\n return s;\n }\n }", "STenant getTenant() throws STenantNotFoundException;", "String getTenantId();", "String getTenantId();", "String getTenantId();", "default void setContext(String tenantId) {\n // defaults to no-op\n }", "public java.lang.String getTenantProjectId() {\n java.lang.Object ref = tenantProjectId_;\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 tenantProjectId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void addtenant(Tenant tenant) {\n\t\tthis.tenant = tenant;\n\t\tthis.save();\n\t}", "@Override\n public String resolveCurrentTenantIdentifier() {\n return \"Default\";\n }", "public UUID tenantId() {\n return this.tenantId;\n }", "protected void allocateTenant() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // The key we'll use for this tenant. This key should be used in subsequent\n // activities related to this tenant, such as setting the tenant context.\n if (tenantKeyFileUtil.keyFileExists(tenantKeyFileName)) {\n // Only if the Tenant Key file is provided as a parameter is it not null.\n // in this case we want special behavior.\n tenantKey = this.tenantKeyFileUtil.readTenantFile(tenantKeyFileName);\n } else {\n tenantKey = getRandomKey();\n }\n\n // The salt is used when we hash the tenantKey. We're just using SHA-256 for\n // the hash here, not multiple rounds of a password hashing algorithm. It's\n // sufficient in our case because we are using a 32-byte random value as the\n // key, giving 256 bits of entropy.\n final String tenantSalt = getRandomKey();\n\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n checkIfTenantNameAndTenantKeyExists(adapter, tenantName, tenantKey);\n\n if (tenantKeyFileName == null) {\n logger.info(\"Allocating new tenant: \" + tenantName + \" [key=\" + tenantKey + \"]\");\n } else {\n logger.info(\"Allocating new tenant: \" + tenantName + \" [tenantKeyFileName=\" + tenantKeyFileName + \"]\");\n }\n\n // Open a new transaction and associate it with our connection pool. Remember\n // that we don't support distributed transactions, so all connections within\n // this transaction must come from the same pool\n int tenantId;\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n tenantId =\n adapter.allocateTenant(adminSchemaName, schemaName, tenantName, tenantKey, tenantSalt,\n FhirSchemaConstants.TENANT_SEQUENCE);\n\n // The tenant-id is important because this is also used to identify the partition number\n logger.info(\"Tenant Id[\" + tenantName + \"] = [\" + tenantId + \"]\");\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n // Build/update the tables as well as the stored procedures\n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, schemaName);\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n // Get the data model to create the table partitions. This is threaded, so transactions are\n // handled within each thread by the adapter. This means we should probably pull some of\n // that logic out of the adapter and handle it at a higher level. Note...the extent size used\n // for the partitions needs to match the extent size of the original table tablespace (FHIR_TS)\n // so this must be constant.\n pdm.addTenantPartitions(adapter, schemaName, tenantId, FhirSchemaConstants.FHIR_TS_EXTENT_KB);\n\n // Fill any static data tables (which are also partitioned by tenant)\n // Prepopulate the Resource Type Tables and Parameters Name/Code Table\n populateResourceTypeAndParameterNameTableEntries(tenantId);\n\n // Now all the table partitions have been allocated, we can mark the tenant as ready\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n adapter.updateTenantStatus(adminSchemaName, tenantId, TenantStatus.ALLOCATED);\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n if (tenantKeyFileName == null) {\n logger.info(\"Allocated tenant: \" + tenantName + \" [key=\" + tenantKey + \"] with Id = \" + tenantId);\n } else {\n logger.info(\"Allocated tenant: \" + tenantName + \" [tenantKeyFileName=\" + tenantKeyFileName + \"] with Id = \"\n + tenantId);\n if (!tenantKeyFileUtil.keyFileExists(tenantKeyFileName)) {\n tenantKeyFileUtil.writeTenantFile(tenantKeyFileName, tenantKey);\n }\n }\n }", "public Builder setTenantProjectIdBytes(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n tenantProjectId_ = value;\n bitField0_ |= 0x00800000;\n onChanged();\n return this;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getTenantProjectIdBytes() {\n java.lang.Object ref = tenantProjectId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n tenantProjectId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static void mockWithTenant(String tenantID) {\n PowerMockito.mockStatic(TenancyContextHolder.class);\n TenancyContextHolder holder = mock(TenancyContextHolder.class);\n TenancyContext tenancyContext = mock(TenancyContext.class);\n Optional<Tenant> optionalTenant = Optional.of(new DefaultTenant(tenantID, null));\n when(holder.getContext()).thenReturn(tenancyContext);\n when(tenancyContext.getOptionalTenant()).thenReturn(optionalTenant);\n }", "public String getID(){\n return this.getKey().getTenantId(this.getTenantName());\n }", "public String aadTenantId() {\n return this.aadTenantId;\n }", "public com.google.protobuf.ByteString getTenantProjectIdBytes() {\n java.lang.Object ref = tenantProjectId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n tenantProjectId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "void updateTenant(EntityUpdateDescriptor descriptor) throws STenantUpdateException;", "@Override\n\tpublic void addTenant(String aptId, TenantBean newTenant) {\n\t\tString query = \"insert into Tenant(apartmentId,tfirstName,tlastName,tEmail,tgender,tage,Nationality) \"\n\t\t\t\t+ \"values (?,?,?,?,?,?,?)\";\n\t\tResultSet rs=null;\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, Integer.parseInt(aptId));\n\t\t\tpstmt.setString(2, newTenant.getTfirstName());\n\t\t\tpstmt.setString(3, newTenant.getTlastName());\n\t\t\tpstmt.setString(4, newTenant.gettEmail());\n\t\t\tpstmt.setString(5, newTenant.getTgender());\n\t\t\tpstmt.setInt(6, newTenant.getTage());\n\t\t\tpstmt.setString(7, newTenant.getNationality());\n\t\t\tpstmt.executeUpdate();\n\t\t\t//e.printStackTrace();\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 Criteria andTenantIdEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"tenant_id = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "@XmlElement(required = true, name = \"tenant_admin\")\n public String getTenantAdmin() {\n return tenantAdmin;\n }", "private String initializeTenantIfLost(String tenantIdentifier) {\r\n if (TenantContextHolder.getCurrentTenant() == null) {\r\n\r\n SecurityContext securityContext = SecurityContextHolder.getContext();\r\n Authentication authentication = securityContext.getAuthentication();\r\n// CustomUserDetails customUserDetails = null;\r\n if (authentication != null) {\r\n Object principal = authentication.getPrincipal();\r\n// customUserDetails = principal instanceof CustomUserDetails ? (CustomUserDetails) principal : null;\r\n }\r\n// TenantContextHolder.setCurrentTenant(customUserDetails.getTenant());\r\n }\r\n\r\n if (tenantIdentifier != TenantContextHolder.getCurrentTenant()) {\r\n tenantIdentifier = TenantContextHolder.getCurrentTenant();\r\n }\r\n return tenantIdentifier;\r\n }", "public AbstractMultitenantDAO(SessionFactory sessionFactory, TenantResolver tenantResolver) {\n super(sessionFactory);\n this.tenantResolver = tenantResolver;\n }", "@XmlElement(required = true, name = \"tenant_name\")\n public String getTenantName() {\n return tenantName;\n }", "MasterTenant findByTenantId(String tenantId);", "public String getTenant() {\n if ( this.token == null || this.token.isEmpty())\n return null;\n JsonObject pl = this.getPayload();\n if ( pl == null )\n return null;\n String tenant = pl.getString(\"tenant\");\n return tenant;\n }", "@Config(\"dc.remote.cluster.id\")\n public DataCenterConfig setRemoteClusterId(String tenant)\n {\n this.remoteClusterId = tenant;\n return this;\n }", "String provideTenantIdForProcessInstance(TenantIdProviderProcessInstanceContext ctx);", "protected void addTenantKey() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // Only if the Tenant Key file is provided as a parameter is it not null.\n // in this case we want special behavior.\n if (tenantKeyFileUtil.keyFileExists(tenantKeyFileName)) {\n tenantKey = this.tenantKeyFileUtil.readTenantFile(tenantKeyFileName);\n } else {\n tenantKey = getRandomKey();\n }\n\n // The salt is used when we hash the tenantKey. We're just using SHA-256 for\n // the hash here, not multiple rounds of a password hashing algorithm. It's\n // sufficient in our case because we are using a 32-byte random value as the\n // key, giving 256 bits of entropy.\n final String tenantSalt = getRandomKey();\n\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n checkIfTenantNameAndTenantKeyExists(adapter, tenantName, tenantKey);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n GetTenantDAO tid = new GetTenantDAO(adminSchemaName, addKeyForTenant);\n Tenant tenant = adapter.runStatement(tid);\n\n if (tenant != null) {\n // Attach the new tenant key to the tenant:\n AddTenantKeyDAO adder =\n new AddTenantKeyDAO(adminSchemaName, tenant.getTenantId(), tenantKey, tenantSalt,\n FhirSchemaConstants.TENANT_SEQUENCE);\n adapter.runStatement(adder);\n } else {\n throw new IllegalArgumentException(\"Tenant does not exist: \" + addKeyForTenant);\n }\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n if (tenantKeyFileName == null) {\n // Generated\n logger.info(\"New tenant key: \" + addKeyForTenant + \" [key=\" + tenantKey + \"]\");\n } else {\n // Loaded from File\n logger.info(\n \"New tenant key from file: \" + addKeyForTenant + \" [tenantKeyFileName=\" + tenantKeyFileName + \"]\");\n if (!tenantKeyFileUtil.keyFileExists(tenantKeyFileName)) {\n tenantKeyFileUtil.writeTenantFile(tenantKeyFileName, tenantKey);\n }\n }\n\n }", "default WorkdayEndpointConsumerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "@Override\n public void onTenantDelete(int i) {\n }", "default WorkdayEndpointBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "default WorkdayEndpointProducerBuilder tenant(String tenant) {\n doSetProperty(\"tenant\", tenant);\n return this;\n }", "String provideTenantIdForCaseInstance(TenantIdProviderCaseInstanceContext ctx);", "public void setAgencyId(int value) {\n this.agencyId = value;\n }", "@Test(alwaysRun=true, priority=17,enabled=true)\n\tpublic void tenantVerification() throws InterruptedException, IOException {\t\n\t\tadminPage.tenantVerification(driver);\n\t\t\n\t}", "com.google.protobuf.ByteString\n getTenantBytes();", "public List<String> getTenantIds() {\n \t\treturn getTenantIds(EXCLUDE_CREATE_DISABLED_TENANTS);\n \t}", "public void setTenantStorageRole(String tenantStorageRole) {\n this.tenantStorageRole = tenantStorageRole;\n }", "private void setTenantAdminSCIMAttributes(int tenantId) {\n\n try {\n UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService()\n .getTenantUserRealm(tenantId).getUserStoreManager();\n\n if (userStoreManager.isSCIMEnabled()) {\n Map<String, String> claimsMap = new HashMap<String, String>();\n String adminUsername = ClaimsMgtUtil.getAdminUserNameFromTenantId(IdentityTenantUtil.getRealmService(),\n tenantId);\n String id = UUID.randomUUID().toString();\n Date date = new Date();\n String createdDate = SCIMCommonUtils.formatDateTime(date);\n\n claimsMap.put(SCIMConstants.META_CREATED_URI, createdDate);\n claimsMap.put(SCIMConstants.USER_NAME_URI, adminUsername);\n claimsMap.put(SCIMConstants.META_LAST_MODIFIED_URI, createdDate);\n claimsMap.put(SCIMConstants.ID_URI, id);\n\n userStoreManager.setUserClaimValues(adminUsername, claimsMap,\n UserCoreConstants.DEFAULT_PROFILE);\n\n SCIMCommonUtils.addAdminGroup(userStoreManager);\n }\n } catch (Exception e) {\n String msg = \"Error while adding SCIM metadata to the tenant admin in tenant ID : \" + tenantId;\n log.error(msg, e);\n }\n }", "public static String tenantIdRemapping(String oldTenantId) {\n\t\tif (oldTenantId.equalsIgnoreCase(\"bukalapak\")) {\n\t\t\treturn \"bukalapak\";\n\t\t}\n\t\tif (oldTenantId.equalsIgnoreCase(\"familynara2014\")) {\n\t\t\treturn \"FAMILYNARA2014\";\n\t\t}\n\t\treturn oldTenantId;\n\t}", "public void setCountryId(int value);", "protected void dropTenant() {\n if (!MULTITENANT_FEATURE_ENABLED.contains(dbType)) {\n return;\n }\n\n // Mark the tenant as being dropped. This should prevent it from\n // being used in any way because the SET_TENANT stored procedure\n // will reject any request for the tenant being dropped.\n TenantInfo tenantInfo = freezeTenant();\n\n // Build the model of the data (FHIRDATA) schema which is then used to drive the drop\n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n // Detach the tenant partition from each of the data tables\n detachTenantPartitions(pdm, tenantInfo);\n \n // this may not complete successfully because Db2 runs the detach as an async\n // process. Just need to run --drop-detached to clean up.\n dropDetachedPartitionTables(pdm, tenantInfo);\n\n }", "@Override\n\tpublic List<TenantBean> getTenants(int aptId) {\n\t\tString query = \"Select * from Tenant where apartmentId=?\";\n\t\t List<TenantBean> tenants=getTenantDetails(query, aptId);\n\t\treturn tenants;\n\t}", "@Override\r\n public DataSource selectDataSource(String tenantIdentifier) {\n\r\n tenantIdentifier = initializeTenantIfLost(tenantIdentifier);\r\n\r\n if (!this.dataSourcesMtApp.containsKey(tenantIdentifier)) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\r\n \">>>> selectDataSource() -- tenant:\" + tenantIdentifier + \" Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.get(tenantIdentifier);\r\n }", "@Override\n\tpublic void onTenantActivation(int tenantId) throws StratosException {\n\t}", "private String getTenantContextFromTenantDomain(String tenantDomain) {\n\n if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equalsIgnoreCase(tenantDomain)) {\n return MultitenantConstants.TENANT_AWARE_URL_PREFIX + \"/\" + tenantDomain + \"/\";\n }\n return \"\";\n }", "@Override\n\tpublic void onTenantRename(int tenantId, String oldDomainName,\n String newDomainName) throws StratosException {\n\t}", "@JsonSetter(\"subaccount_id\")\r\n public void setSubaccountId (int value) { \r\n this.subaccountId = value;\r\n }", "private int statTenantFlow(String tenantDomain, String tenantAdminUsername) throws KeyChangeException {\n // Start a new tenant flow for a tenant\n log.info(\"Tenant '\" + tenantDomain + \"' update started.\");\n PrivilegedCarbonContext.startTenantFlow();\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain);\n int tenantId;\n try {\n tenantId = ServiceHolder.getRealmService().getTenantManager().getTenantId(tenantDomain);\n } catch (UserStoreException e) {\n throw new KeyChangeException(\"User store exception while getting the tenant ID for tenant \" +\n tenantDomain, e);\n }\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenantId);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(tenantAdminUsername);\n return tenantId;\n }", "void setAccountId(Long accountId);", "public static TenantCache getTenantCache(RegionCoprocessorEnvironment env, ImmutableBytesPtr tenantId) {\n GlobalCache globalCache = GlobalCache.getInstance(env);\n TenantCache tenantCache = tenantId == null ? globalCache : globalCache.getChildTenantCache(tenantId); \n return tenantCache;\n }", "@Override\n\tpublic void onTenantInitialActivation(int tenantId) throws StratosException {\n\t}", "public void setAD_User_ID (int AD_User_ID);", "interface WithClientTenantId {\n /**\n * Specifies the clientTenantId property: The tenant ID of the client making the request..\n *\n * @param clientTenantId The tenant ID of the client making the request.\n * @return the next definition stage.\n */\n WithCreate withClientTenantId(String clientTenantId);\n }", "String provideTenantIdForHistoricDecisionInstance(TenantIdProviderHistoricDecisionInstanceContext ctx);", "@Override\r\n \t\t\tpublic void deleteSessionsOfTenant(long tenantId) {\n \t\t\t\t\r\n \t\t\t}", "public void setDriveClientId(String id) {this.databaseConfig.setProperty(\"driveClientId\", id);}", "public void setAccountId(long value) {\n this.accountId = value;\n }", "public void setCustCountryId(int v) throws TorqueException\n {\n \n if (this.custCountryId != v)\n {\n this.custCountryId = v;\n setModified(true);\n }\n \n \n if (aCountry != null && !(aCountry.getCountryId() == v))\n {\n aCountry = null;\n }\n \n }", "@Override\n\tpublic void onTenantUpdate(TenantInfoBean tenantBean) throws StratosException {\n\t\t\n\t}", "public String frsTenantId() {\n return this.frsTenantId;\n }", "WithCreate withClientTenantId(String clientTenantId);", "@Override\n public void setPrimaryKey(long primaryKey) {\n _usersCatastropheOrgs.setPrimaryKey(primaryKey);\n }", "public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);", "public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);", "@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }", "public String getAccountTimeZoneId() {\r\n return accountTimeZoneId;\r\n }", "public Criteria andTenantIdNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"tenant_id <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public Builder setAccountID(long value) {\n validate(fields()[2], value);\n this.accountID = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public Builder setAccountID(long value) {\n validate(fields()[0], value);\n this.accountID = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public Integer getAcctId() {\n return acctId;\n }", "@Override\n public void setClientId(int clientId) {\n _entityCustomer.setClientId(clientId);\n }", "public TenantCache getChildTenantCache(ImmutableBytesPtr tenantId) {\n TenantCache tenantCache = perTenantCacheMap.get(tenantId);\n if (tenantCache == null) {\n int maxTenantMemoryPerc = config.getInt(\n MAX_TENANT_MEMORY_PERC_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_TENANT_MEMORY_PERC);\n int maxServerCacheTimeToLive = config.getInt(\n QueryServices.MAX_SERVER_CACHE_TIME_TO_LIVE_MS_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_TIME_TO_LIVE_MS);\n int maxServerCachePersistenceTimeToLive = config.getInt(\n QueryServices.MAX_SERVER_CACHE_PERSISTENCE_TIME_TO_LIVE_MS_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_CACHE_PERSISTENCE_TIME_TO_LIVE_MS);\n TenantCacheImpl newTenantCache = new TenantCacheImpl(\n new ChildMemoryManager(getMemoryManager(), maxTenantMemoryPerc),\n maxServerCacheTimeToLive, maxServerCachePersistenceTimeToLive);\n tenantCache = perTenantCacheMap.putIfAbsent(tenantId, newTenantCache);\n if (tenantCache == null) {\n tenantCache = newTenantCache;\n }\n }\n return tenantCache;\n }", "public Criteria andTenantIdLessThanOrEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"tenant_id <= \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "@Override\n\tpublic void onTenantDeactivation(int tenantId) throws StratosException {\n\t}" ]
[ "0.6651736", "0.65401", "0.6356399", "0.6231653", "0.60910255", "0.60699177", "0.6055597", "0.5935001", "0.59329504", "0.5926566", "0.5917997", "0.59175676", "0.59064656", "0.59055597", "0.5862113", "0.5862113", "0.5862113", "0.5862113", "0.5755795", "0.5752555", "0.57515156", "0.5730505", "0.57003856", "0.56495905", "0.56495905", "0.56495905", "0.564395", "0.55818915", "0.55694944", "0.55614495", "0.55251867", "0.54997945", "0.5471269", "0.54315853", "0.53866446", "0.5383284", "0.5324301", "0.5277963", "0.52625126", "0.52453214", "0.52416945", "0.5235931", "0.52254313", "0.5184982", "0.5135742", "0.51021355", "0.50692147", "0.503744", "0.5029926", "0.49814278", "0.49755034", "0.4956728", "0.49559632", "0.4931712", "0.49280748", "0.49081692", "0.48803136", "0.48570678", "0.47925827", "0.47547325", "0.47473186", "0.4727498", "0.47187895", "0.47007892", "0.46348286", "0.46345335", "0.4622548", "0.4587792", "0.45660558", "0.45362943", "0.45230255", "0.45155185", "0.45133808", "0.44659314", "0.44436172", "0.441819", "0.44155625", "0.44127062", "0.44089398", "0.44079524", "0.44038963", "0.43961", "0.43844822", "0.43747512", "0.4356181", "0.43551522", "0.43551522", "0.4354496", "0.43529004", "0.43485093", "0.43340227", "0.4328887", "0.43259323", "0.43147203", "0.43044376", "0.4301862", "0.42952514" ]
0.5851023
21
This method was generated by MyBatis Generator. This method corresponds to the database table plugin
@Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Plugin other = (Plugin) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getAdditionalInfo() == null ? other.getAdditionalInfo() == null : this.getAdditionalInfo().equals(other.getAdditionalInfo())) && (this.getApiToken() == null ? other.getApiToken() == null : this.getApiToken().equals(other.getApiToken())) && (this.getPluginClass() == null ? other.getPluginClass() == null : this.getPluginClass().equals(other.getPluginClass())) && (this.getConfiguration() == null ? other.getConfiguration() == null : this.getConfiguration().equals(other.getConfiguration())) && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) && (this.getPublicAccess() == null ? other.getPublicAccess() == null : this.getPublicAccess().equals(other.getPublicAccess())) && (this.getSearchText() == null ? other.getSearchText() == null : this.getSearchText().equals(other.getSearchText())) && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState())) && (this.getTenantId() == null ? other.getTenantId() == null : this.getTenantId().equals(other.getTenantId())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "String getTableName();", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "TableId table();", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "protected String getSqlTable() {\n\t\treturn \"Project\";\n\t}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "Table getBaseTable();", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "Table getTable();", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "Table createTable();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "public String getTableName() {\n return this.tableName;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "TableInstance createTableInstance();", "public String getTableName() {\n return tableName; \n }", "public void formDatabaseTable() {\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private String getTableName() {\n return this.tableName;\n }", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "public String tableName() {\n if ( tableName != null ) {\n return tableName;\n }\n\n TableName annotation = this.entityType().getAnnotation( TableName.class );\n if ( annotation != null ) {\n tableName = annotation.value();\n } else {\n tableName = entityType().getSimpleName().toLowerCase() + 's';\n }\n return tableName;\n }", "public TableImpl() { columns = new Column[0]; }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "public void doCreateTable();", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@Override\n protected Map<TableUniqueName, String> tableSubstitution() {\n return ImmutableMap.of();\n }", "<K, C> TableMetadata<K, C> getTableMetadata(TableName tableName);", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "@Test\n \tpublic void mapTable() {\n \t\t\n \t\tString[][] data = { { \"11\", \"12\" }, { \"21\", \"22\" } };\n \n \t\tTable table = tableWith(data,\"c1\",\"c2\");\n \n \t\tTableMapDirectives directives = new TableMapDirectives(table.columns().get(0));\n \t\t\n \t\tdirectives.add(column(\"TAXOCODE\"))\n \t\t .add(column(\"ISSCAAP\"))\n \t\t .add(column(\"Scientific_name\"))\n \t\t .add(column(\"English_name\").language(\"en\"))\n \t\t .add(column(\"French_name\").language(\"fr\"))\n \t\t .add(column(\"Spanish_name\").language(\"es\"))\n \t\t .add(column(\"Author\"))\n \t\t .add(column(\"Family\"))\n \t\t .add(column(\"Order\"));\n \n \t\tOutcome outcome = service.map(table, directives);\n \t\t\n \t\tassertNotNull(outcome.result());\n \t}", "SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public void initTable();", "public TableName name();", "@Override\n protected String getColNamesQuery(String tableName) {\n return \"SELECT t.* FROM \" + escapeTableName(tableName) + \" AS t LIMIT 1\";\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic long getTableId() {\n\t\treturn _expandoColumn.getTableId();\n\t}", "@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}", "@Override\n protected void initResultTable() {\n }", "String pvTableName();", "public abstract String doTableConvert(String sql);", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "public abstract void configureTables();", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "String getBaseTable();", "@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public AllFieldsTableHandler(){}", "public String getDbTable() {return dbTable;}", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "TableType getTableType()\n {\n return tableType;\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "private TableModel resultSetToTableModel(ResultSet UpdateJTable) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);", "List<List<Object>> getTableValues(TableParameters tableParameters);", "protected abstract TableName getTableNameByConvention(Class<?> beanClass);", "@Override\npublic String findParentKeyColumnName()\n{\n\treturn null;\n}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }", "@Override\n public void createTable() throws Exception {\n }", "public String getTable()\n {\n return table;\n }", "List<Table2> selectByExample(Table2Example example);", "private void appendPrimaryTableName() {\n super.appendTableName(Constants.FROM, joinQueryInputs.primaryTableName);\n }", "protected abstract void initialiseTable();", "public abstract String getDatabaseTableName(String entityName);", "public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header starting with 0\n * @param name the name to be used for this column\n * @return this to allow chaining\n */\n Table setColumn(int index, String name);\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Retrieve the value of the given row and column\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n\n String getValue(String column, int row);\n\n /**\n * Retrieve the configuration parameters of this table.\n *\n * As there can be many implementations of a table and these implementations are configured in a different manner,\n * this is the place where these parameters can be retrieved in a uniform manner and passed to other layers, e.g. to\n * configure appropriate writers and readers or simply to setup the respective factories.\n *\n * @return the not-null list of (key, value) pairs that configure this particular table\n */\n Map<String, String> getParameters();\n}", "public String getSourceTable();", "public abstract String getPrimaryKey(String tableName);", "public String getTableName() \n\t{\n\t return tableName ;\n\t}", "public AllTablesHaveColumnsRule() {\n super();\n\n this.countOp = this.addProperty(new ChoiceProperty<>(\n \"count_op\",\n ComparisonOperator.class, ComparisonOperator.GTE, ComparisonOperator.getChoices(),\n \"Počet sloupců\", \"Operátor pro ověření počtu řádků v tabulkách\", this.getGenericLabel()\n ));\n this.count = this.addProperty(new Property<>(\n \"count\",\n Integer.class, 1,\n \"...\", \"Všechny tabulky v databázi musí obsahovat zadaný počet sloupců\", this.getGenericLabel()\n ));\n\n this.columnType = this.addProperty(new ChoiceProperty<>(\n \"column_type\",\n ColumnType.class, ColumnType._ANY, ColumnType.getChoices(),\n \"Typ sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnName = this.addProperty(new Property<>(\n \"column_name\",\n String.class, \"\",\n \"Název sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnIsPrimary = this.addProperty(new ChoiceProperty<>(\n \"column_primary\",\n YesNoType.class, YesNoType._ANY, YesNoType.getChoices(),\n \"Primární klíč\", \"Ověří, zda je sloupec součástí primárního klíče\", this.getGenericLabel()\n ));\n }", "public ATExpression base_tableExpression();", "@Basic( optional = false )\r\n\t@Column( name = \"table_name\", nullable = false, length = 50 )\r\n\tpublic String getTableName() {\r\n\t\treturn this.tableName;\r\n\t\t\r\n\t}", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "public abstract String toSQL();", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n\tpublic void getFields(List<String> table) {\n\t\t\n\t}", "@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}" ]
[ "0.6307416", "0.6226568", "0.6191265", "0.6157438", "0.60787785", "0.60787785", "0.606224", "0.60420555", "0.60058314", "0.60039157", "0.60039157", "0.59952784", "0.59947", "0.59859324", "0.598107", "0.5979657", "0.59638876", "0.59370697", "0.5902837", "0.5894836", "0.5890436", "0.58868", "0.5881592", "0.5858536", "0.5844436", "0.5837712", "0.58158493", "0.58158493", "0.5772761", "0.5772761", "0.57697207", "0.57601076", "0.57413155", "0.57347757", "0.5730065", "0.57246757", "0.5722518", "0.57198846", "0.5692712", "0.5691757", "0.5690778", "0.566789", "0.5648016", "0.5644589", "0.56388766", "0.5624931", "0.5624931", "0.5623529", "0.56229836", "0.56229836", "0.561214", "0.56101197", "0.5607455", "0.56027836", "0.55954295", "0.5591415", "0.5565887", "0.55622524", "0.55587566", "0.5557158", "0.55536735", "0.5546795", "0.5546508", "0.55440086", "0.553745", "0.5504973", "0.5490465", "0.5487974", "0.54857695", "0.54806346", "0.54796946", "0.54780626", "0.54708606", "0.54708606", "0.54708606", "0.54708606", "0.5461505", "0.54607296", "0.5459199", "0.54527473", "0.54524595", "0.5440214", "0.5427239", "0.5426441", "0.5424525", "0.5422997", "0.5422797", "0.5422575", "0.542162", "0.54208124", "0.54168975", "0.5413128", "0.5408309", "0.54072434", "0.54007477", "0.5397756", "0.5394334", "0.5384322", "0.53791946", "0.53775966", "0.53740597" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table plugin
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getAdditionalInfo() == null) ? 0 : getAdditionalInfo().hashCode()); result = prime * result + ((getApiToken() == null) ? 0 : getApiToken().hashCode()); result = prime * result + ((getPluginClass() == null) ? 0 : getPluginClass().hashCode()); result = prime * result + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); result = prime * result + ((getPublicAccess() == null) ? 0 : getPublicAccess().hashCode()); result = prime * result + ((getSearchText() == null) ? 0 : getSearchText().hashCode()); result = prime * result + ((getState() == null) ? 0 : getState().hashCode()); result = prime * result + ((getTenantId() == null) ? 0 : getTenantId().hashCode()); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "String getTableName();", "public interface TableDefinition extends BaseColumns {\n\n String tableName();\n\n String createStatement();\n\n String dropStatement();\n \n}", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "TableId table();", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "protected String getSqlTable() {\n\t\treturn \"Project\";\n\t}", "SqlTables(String tableName){\n\t\t\t this.tableName = tableName; \n\t\t}", "Table getBaseTable();", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "Table getTable();", "public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "Table createTable();", "public MonthlyValuesTable(Database database) \n {\n //Constructor calls DbTable's constructor\n super(database);\n setTableName(\"monthlyvalues\");\n }", "public String getTableName() {\n return this.tableName;\n }", "@Override\n public String asTableDbName() {\n return \"user\";\n }", "TableInstance createTableInstance();", "public String getTableName() {\n return tableName; \n }", "public void formDatabaseTable() {\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "private void UpdateTable() {\n\t\t\t\t\n\t\t\t}", "private String getTableName() {\n return this.tableName;\n }", "public interface ITableInterface<T> extends C {\n\n void reconstructTable();\n\n boolean isUpdate();\n\n int getVersion();\n\n /**\n * get current operating table name\n * @return table name\n */\n String getTableName();\n\n /**\n * get table define sql sentence\n */\n String getTableDefines();\n\n Set<String> getColumns();\n\n Map<String, Class> KeyValPair();\n\n String sql2Count();\n\n long countAll();\n\n long count( String where );\n\n String sql2Select();\n\n List<T> selectAll();\n\n List<T> select( String where );\n\n String sql2Insert();\n\n Object insert( T t );\n\n Objects insert( Map<String, Object> param );\n\n String sql2Delete();\n\n int deleteAll();\n\n int delete( T t );\n\n int delete( String where );\n\n int delete( Map<String, Object> param );\n\n String sql2Modify();\n\n int modify( T t );\n\n int modify( Map<String, Object> param );\n\n}", "public String tableName() {\n if ( tableName != null ) {\n return tableName;\n }\n\n TableName annotation = this.entityType().getAnnotation( TableName.class );\n if ( annotation != null ) {\n tableName = annotation.value();\n } else {\n tableName = entityType().getSimpleName().toLowerCase() + 's';\n }\n return tableName;\n }", "public TableImpl() { columns = new Column[0]; }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "public void doCreateTable();", "private Object getTable() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}", "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "public ExampleTable toExampleTable() { return new ExampleTableImpl(this); }", "public interface TableDetailMapper {\n\n @Select(\"select * from dxh_sys.tabledetail where vendorId=0 and tableName='skuProfitDayReport'\")\n List<Map<String, Object>> list();\n\n}", "public interface TableMetaData {\n\n\t/** Adds normal column. */\n\tpublic void addColumn(final ColumnMetaData column);\n\n\t/** Adds primary key column. */\n\tpublic void addPrimaryKey(final ColumnMetaData column);\n\n\t/** Returns map of column meta data, keyed by the column label (the alias if provided in the query, otherwise the name). */\n\tpublic Map<String, ColumnMetaData> getColumns();\n\n\t/** Returns database name. */\n\tpublic String getDatabaseName();\n\n\t/** Returns ordered list of columns that are primary keys. */\n\tpublic List<ColumnMetaData> getPrimaryKeys();\n\n\t/**\n\t * Returns fully qualified table name in database-specific form for use in SQL statements. MySQL uses the form\n\t * <code>database.table</code>, for example <code>sakila.film</code>. PostgreSQL uses the form\n\t * <code>database.schema.table</code>, for example <code>sakila.public.film</code>.\n\t */\n\tpublic String getQualifiedTableName();\n\n\t/** Returns row alias. */\n\tpublic String getRowAlias();\n\t\n\t/** Returns row set alias. */\n\tpublic String getRowSetAlias();\n\t\n\t/**\n\t * Returns row alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #getRowAlias()}\n\t */\n\t@Deprecated\n\tpublic String getTableAlias();\n\n\t/** Returns table name. */\n\tpublic String getTableName();\n\n\t/** Returns role of table in the SQL Resource. */\n\tpublic TableRole getTableRole();\n\n\t/** Returns true if the SQL Resource role is child. */\n\tpublic boolean isChild();\n\n\t/** Returns true if the SQL Resource role is parent. */\n\tpublic boolean isParent();\n\n\t/** Sets all the row and row set aliases. */\n\tpublic void setAliases(final String alias, final String rowAlias, final String rowSetAlias);\n\n\t/** Sets attributes. */\n\tpublic void setAttributes(final String tableName, final String qualifedTableName,\n\t\t\tfinal String databaseName, final TableRole tableRole);\n\n\t/**\n\t * Sets table alias.\n\t * \n * @deprecated As of 0.8.11 use {@link #setAliases(String, String, String)}\n\t */\n\t@Deprecated\n\tpublic void setTableAlias(final String tableAlias);\n\t\n\t/** Represents all of the roles a table may plan in a SQL Resource. */\n\t@XmlType(namespace = \"http://restsql.org/schema\")\n\tpublic enum TableRole {\n\t\tChild, ChildExtension, Join, Parent, ParentExtension, Unknown;\n\t}\n}", "@Override\n protected Map<TableUniqueName, String> tableSubstitution() {\n return ImmutableMap.of();\n }", "<K, C> TableMetadata<K, C> getTableMetadata(TableName tableName);", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public interface SQLV4 {\n\n //数据统计\n String ALTER_TABLE_DATASTATISTICS_TYPE = \"ALTER TABLE \" + DataStatisticsTable.TABLE_DATA_STATISTICS\n + \" ADD COLUMN \" + DataStatisticsTable.COLUMN_DATA_TYPE + \" INTEGER DEFAULT 0\";\n}", "@Test\n \tpublic void mapTable() {\n \t\t\n \t\tString[][] data = { { \"11\", \"12\" }, { \"21\", \"22\" } };\n \n \t\tTable table = tableWith(data,\"c1\",\"c2\");\n \n \t\tTableMapDirectives directives = new TableMapDirectives(table.columns().get(0));\n \t\t\n \t\tdirectives.add(column(\"TAXOCODE\"))\n \t\t .add(column(\"ISSCAAP\"))\n \t\t .add(column(\"Scientific_name\"))\n \t\t .add(column(\"English_name\").language(\"en\"))\n \t\t .add(column(\"French_name\").language(\"fr\"))\n \t\t .add(column(\"Spanish_name\").language(\"es\"))\n \t\t .add(column(\"Author\"))\n \t\t .add(column(\"Family\"))\n \t\t .add(column(\"Order\"));\n \n \t\tOutcome outcome = service.map(table, directives);\n \t\t\n \t\tassertNotNull(outcome.result());\n \t}", "SqlColumns(String columnName){\n\t\t\t this.columnName = columnName; \n\t\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "public void initTable();", "public TableName name();", "@Override\n protected String getColNamesQuery(String tableName) {\n return \"SELECT t.* FROM \" + escapeTableName(tableName) + \" AS t LIMIT 1\";\n }", "@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }", "@Override\n\tpublic long getTableId() {\n\t\treturn _expandoColumn.getTableId();\n\t}", "@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}", "@Override\n protected void initResultTable() {\n }", "String pvTableName();", "public abstract String doTableConvert(String sql);", "public interface CfgSearchRecommendMapper extends BaseMapper {\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int countByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int deleteByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insert(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int insertSelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n CfgSearchRecommend selectByPrimaryKey(Long id);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExampleSelective(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByExample(@Param(\"record\") CfgSearchRecommend record, @Param(\"example\") CfgSearchRecommendExample example);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKeySelective(CfgSearchRecommend record);\n\n /**\n * This method was generated by MyBatis Generator.\n * This method corresponds to the database table t_cfg_search_recommend\n *\n * @mbggenerated\n */\n int updateByPrimaryKey(CfgSearchRecommend record);\n}", "public abstract void configureTables();", "public interface TableStructure extends Structure {\n FieldStructure getFieldByJava(String javaName);\n\n\n FieldStructure getFieldBySql(String sqlName);\n\n\n int getFieldCount();\n\n\n Map getFieldsByJavaKey();\n\n\n Map getFieldsBySqlKey();\n\n\n String getJavaName();\n\n\n String getType();\n\n\n List<String> getFunctionalKeyFields();\n\n\n List<String> getSqlPrimaryKeyFields();\n}", "String getBaseTable();", "@Override\n\tpublic String[] getTableColumns() {\n\t\treturn null;\n\t}", "private void Update_table() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public AllFieldsTableHandler(){}", "public String getDbTable() {return dbTable;}", "public Table() {\n this.tableName = \"\";\n this.rows = new HashSet<>();\n this.columnsDefinedOrder = new ArrayList<>();\n }", "TableType getTableType()\n {\n return tableType;\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "@Override public int get_Table_ID()\r\n {\r\n return Table_ID;\r\n \r\n }", "private TableModel resultSetToTableModel(ResultSet UpdateJTable) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);", "List<List<Object>> getTableValues(TableParameters tableParameters);", "protected abstract TableName getTableNameByConvention(Class<?> beanClass);", "@Override\npublic String findParentKeyColumnName()\n{\n\treturn null;\n}", "public List GetSoupKitchenTable() {\n\n //ArrayList<FoodPantry> fpantries = new ArrayList<FoodPantry>();\n\n\n //here we want to to a SELECT * FROM food_pantry table\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT * FROM cs6400_sp17_team073.Soup_kitchen\";\n\n List<SoupKitchen> skitchens = jdbcTemplate.query(sql, new SkitchenMapper());\n\n\n\n return skitchens;\n }", "@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }", "@Override\n public void createTable() throws Exception {\n }", "public String getTable()\n {\n return table;\n }", "private void appendPrimaryTableName() {\n super.appendTableName(Constants.FROM, joinQueryInputs.primaryTableName);\n }", "protected abstract void initialiseTable();", "List<Table2> selectByExample(Table2Example example);", "public abstract String getDatabaseTableName(String entityName);", "public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header starting with 0\n * @param name the name to be used for this column\n * @return this to allow chaining\n */\n Table setColumn(int index, String name);\n\n /**\n * Determine the name of a column if the position is known.\n *\n * @param index the position in the header starting with 0\n * @return the column name at the given position, null if unknown\n */\n String getColumn(int index);\n\n /**\n * Determine the index of a column if the name is known.\n *\n * @param column the case insensitive name of the respective column\n * @return the index of the column in the headings, -1 if the column is unknown\n */\n int indexOf(String column);\n\n /**\n * Retrieve the value of the given row and column\n *\n * If the row is out of bounds or the column is unknown will simply return <code>null</code> to indicate that no value\n * has been set.\n *\n * @param column the column name in the table\n * @param row the row number in the table starting with 0\n * @return the associated value of that cell, can be null\n */\n\n String getValue(String column, int row);\n\n /**\n * Retrieve the configuration parameters of this table.\n *\n * As there can be many implementations of a table and these implementations are configured in a different manner,\n * this is the place where these parameters can be retrieved in a uniform manner and passed to other layers, e.g. to\n * configure appropriate writers and readers or simply to setup the respective factories.\n *\n * @return the not-null list of (key, value) pairs that configure this particular table\n */\n Map<String, String> getParameters();\n}", "public String getSourceTable();", "public abstract String getPrimaryKey(String tableName);", "public String getTableName() \n\t{\n\t return tableName ;\n\t}", "public AllTablesHaveColumnsRule() {\n super();\n\n this.countOp = this.addProperty(new ChoiceProperty<>(\n \"count_op\",\n ComparisonOperator.class, ComparisonOperator.GTE, ComparisonOperator.getChoices(),\n \"Počet sloupců\", \"Operátor pro ověření počtu řádků v tabulkách\", this.getGenericLabel()\n ));\n this.count = this.addProperty(new Property<>(\n \"count\",\n Integer.class, 1,\n \"...\", \"Všechny tabulky v databázi musí obsahovat zadaný počet sloupců\", this.getGenericLabel()\n ));\n\n this.columnType = this.addProperty(new ChoiceProperty<>(\n \"column_type\",\n ColumnType.class, ColumnType._ANY, ColumnType.getChoices(),\n \"Typ sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnName = this.addProperty(new Property<>(\n \"column_name\",\n String.class, \"\",\n \"Název sloupce\", \"Ověří, zda v tabulce existuje sloupec daného typu a názvu\", this.getGenericLabel()\n ));\n this.columnIsPrimary = this.addProperty(new ChoiceProperty<>(\n \"column_primary\",\n YesNoType.class, YesNoType._ANY, YesNoType.getChoices(),\n \"Primární klíč\", \"Ověří, zda je sloupec součástí primárního klíče\", this.getGenericLabel()\n ));\n }", "public ATExpression base_tableExpression();", "@Basic( optional = false )\r\n\t@Column( name = \"table_name\", nullable = false, length = 50 )\r\n\tpublic String getTableName() {\r\n\t\treturn this.tableName;\r\n\t\t\r\n\t}", "public interface SysTableKindDao extends GenericDao<SysTableKind, String> {\n\tpublic JQueryPager getSysTableKindCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);\n\tpublic List<SysTableKind> getFullSysTableKind(String orgCode);\n}", "public abstract String toSQL();", "@Override\r\n public Db_db createTable (Db_table table)\r\n {\r\n Db_db db = null;\r\n String query = \"CREATE TABLE IF NOT EXISTS \"+ table.getName() + \" (\"; \r\n String primaryKeyName = null;\r\n Set<Map.Entry<String, Db_tableColumn>> tableEntries;\r\n List<String> listOfUniqueKey = Lists.newArrayList();\r\n \r\n if(curConnection_ != null)\r\n {\r\n try\r\n {\r\n tableEntries = table.getEntrySet();\r\n for(Map.Entry<String, Db_tableColumn> entry: tableEntries)\r\n {\r\n Db_tableColumn entryContent = entry.getValue();\r\n \r\n if(entryContent.isPrimary() && primaryKeyName == null)\r\n {\r\n primaryKeyName = entryContent.getName();\r\n }\r\n else if(entryContent.isPrimary() && primaryKeyName != null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(itsAttributeMapper_ == null)\r\n {\r\n throw new NumberFormatException();\r\n }\r\n \r\n if(entryContent.isUnique())\r\n {\r\n listOfUniqueKey.add(entryContent.getName());\r\n }\r\n \r\n String mappedAttribute = this.itsAttributeMapper_.MapAttribute(entryContent.getAttributeName());\r\n if(entryContent.getAttribute().isEnum())\r\n {\r\n mappedAttribute += entryContent.getAttribute().buildEnumValueListString();\r\n }\r\n query += entryContent.getName() + \" \" + mappedAttribute \r\n + (entryContent.isAutoIncreasmnet()?\" AUTO_INCREMENT \":\" \")\r\n + (entryContent.isUnique()?\" UNIQUE, \": \", \");\r\n }\r\n \r\n query += \"PRIMARY KEY (\" + primaryKeyName + \"));\";\r\n try (Statement sm = curConnection_.createStatement()) {\r\n sm.executeUpdate(query);\r\n db = this.curDb_;\r\n }\r\n \r\n }catch(NumberFormatException e){System.out.print(e);}\r\n catch(SQLException e){System.out.print(query);this.CurConnectionFailed();}\r\n }\r\n return db;\r\n }", "@Override\n\tpublic void getFields(List<String> table) {\n\t\t\n\t}", "public DatabaseTable(String tableName) {\n this.tableName = tableName;\n }" ]
[ "0.6307706", "0.62269706", "0.61911863", "0.61580133", "0.6078977", "0.6078977", "0.60625964", "0.6042092", "0.6006362", "0.6004162", "0.6004162", "0.59960365", "0.5995611", "0.59858954", "0.5981514", "0.5980046", "0.59638745", "0.5937246", "0.5903804", "0.58951885", "0.58913714", "0.58875185", "0.58813024", "0.58584476", "0.5845109", "0.58382475", "0.581652", "0.581652", "0.57734513", "0.57734513", "0.5770081", "0.5760848", "0.57411474", "0.573513", "0.57296723", "0.57253575", "0.57228106", "0.57202256", "0.5692669", "0.5691255", "0.569086", "0.566746", "0.5647502", "0.5644699", "0.56388384", "0.56257474", "0.56257474", "0.5623675", "0.5623675", "0.5623467", "0.5612429", "0.5610349", "0.5607813", "0.5603039", "0.5595566", "0.55913293", "0.55655587", "0.55632055", "0.55587995", "0.555751", "0.55543864", "0.554794", "0.5545394", "0.55438256", "0.5537399", "0.55055356", "0.54908824", "0.54881644", "0.54859567", "0.5481235", "0.5480444", "0.5478431", "0.54717696", "0.54717696", "0.54717696", "0.54717696", "0.5462006", "0.546119", "0.54596263", "0.54530835", "0.5452126", "0.54403526", "0.54277754", "0.54263043", "0.5425242", "0.54235387", "0.5422757", "0.5422507", "0.5421513", "0.54212093", "0.5417551", "0.5413606", "0.5409121", "0.5407933", "0.5400886", "0.53983647", "0.53945553", "0.5384176", "0.53794825", "0.53778976", "0.5374636" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); cbx_articuloFaltante = new com.jidesoft.swing.AutoCompletionComboBox(); jComboBox1 = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); txt_valor = new javax.swing.JTextField(); btn_Aceptar = new javax.swing.JButton(); btn_Cancelar = new javax.swing.JButton(); buttonCircle2 = new org.edisoncor.gui.button.ButtonCircle(); setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.LINE_AXIS)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Detalles del Faltante")); jLabel1.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N jLabel1.setText("Articulo Relacionado:"); cbx_articuloFaltante.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { cbx_articuloFaltanteItemStateChanged(evt); } }); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Deterioro", "Hurto", "Extravío", "Desconocido" })); jLabel2.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N jLabel2.setText("Cauda o Motivo:"); jLabel3.setFont(new java.awt.Font("Bell MT", 0, 14)); // NOI18N jLabel3.setText("Valor estimado:"); txt_valor.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txt_valorKeyTyped(evt); } }); btn_Aceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Guardar_2.png"))); // NOI18N btn_Aceptar.setText("Aceptar"); btn_Aceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_AceptarActionPerformed(evt); } }); btn_Cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Close.png"))); // NOI18N btn_Cancelar.setText("Cancelar"); btn_Cancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btn_CancelarActionPerformed(evt); } }); buttonCircle2.setText("buttonCircle1"); buttonCircle2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonCircle2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cbx_articuloFaltante, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(buttonCircle2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txt_valor, javax.swing.GroupLayout.DEFAULT_SIZE, 42, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(btn_Aceptar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btn_Cancelar))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(buttonCircle2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(cbx_articuloFaltante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(txt_valor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btn_Aceptar) .addComponent(btn_Cancelar))) ); add(jPanel1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
controls animation and decides which player sprite to use
public void render(Renderer screen) { sprite = chosenSprite.getSprite(); screen.renderEntity(x-16, y-16, this); //-16 centres player as it is a 32x32 sprite font.render(this.getUsername(), this.getX() - (this.getUsername().length()*8/2), this.getY() - 25, true, 0xffffffff, screen, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n break;\n case 1:\n sprite=Sprite.python_right;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_right,Sprite.python_right_1,Sprite.python_right_2,animate,40);\n break;\n case 2:\n sprite=Sprite.python_up;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_up,Sprite.python_up_1,Sprite.python_up_2,animate,40);\n break;\n case 3:\n sprite=Sprite.python_left;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_left,Sprite.python_left_1,Sprite.python_left_2,animate,40);\n break;\n\n\n }\n\n }", "@Override\r\n public void update() {\r\n // Animate sprite\r\n if (this.spriteTimer++ >= 4) {\r\n this.spriteIndex++;\r\n this.spriteTimer = 0;\r\n }\r\n if (this.spriteIndex >= this.animation.length) {\r\n this.destroy();\r\n } else {\r\n this.sprite = this.animation[this.spriteIndex];\r\n }\r\n }", "private void animate() {\r\n\t\tif (spriteCounter > 50) {\r\n\t\t\tanimationFrame = 0;\r\n\t\t} else {\r\n\t\t\tanimationFrame = -16;\r\n\t\t}\r\n\t\t\r\n\t\tif (spriteCounter > 100) {\r\n\t\t\tspriteCounter = 0;\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\tspriteCounter++;\r\n\t\tsetImage((Graphics2D) super.img.getGraphics());\r\n\t}", "public void playerAnimation(){\r\n \r\n switch (gif) {\r\n case 5:\r\n j= new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_1.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n ;\r\n break;\r\n case 15:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_2.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n break;\r\n case 20:\r\n j = new ImageIcon(getClass().getResource(\"/\"+ Character.choosen_char + \"_3.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 35:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_4.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 45:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_5.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 55:\r\n j = new ImageIcon(getClass().getResource(\"/\" + Character.choosen_char + \"_6.png\"));\r\n img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n\r\n break;\r\n case 65:\r\n // j= new ImageIcon(\"D:\\\\Netbeans\\\\Projects\\\\ProjectZ\\\\src\\\\shi_1.png\");\r\n // img = j.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT);\r\n // \r\n gif = 0;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n }", "@Override\r\n protected void chooseSprite() {\r\n switch(_direction) {\r\n case 0:\r\n case 1:\r\n if(_moving)\r\n _sprite = Sprite.movingSprite(Sprite.stupid_right1, Sprite.stupid_right2, Sprite.stupid_right3, _animate, 60);\r\n else\r\n _sprite = Sprite.stupid1;\r\n break;\r\n case 2:\r\n case 3:\r\n if(_moving)\r\n _sprite = Sprite.movingSprite(Sprite.stupid1, Sprite.stupid2, Sprite.stupid3, _animate, 60);\r\n else\r\n _sprite = Sprite.stupid1;\r\n break;\r\n }\r\n }", "public MyAnimation getSprite();", "protected abstract void chooseSprite();", "private void strengthenPlayerAnimation(int player) {\n\t\t//blue stat increase arrow\n\t\tImage increaseArrowImage = new Image(\"res/images/Blue Up Arrow.png\");\n\t\tImageView increaseArrow = new ImageView(increaseArrowImage);\n\t\t\n\t\tincreaseArrow.setTranslateX(100);\n\t\tincreaseArrow.setTranslateY(100);\n\t\t\n\t\tincreaseArrow.setFitWidth(40);\n\t\tincreaseArrow.setPreserveRatio(true);\n\t\tincreaseArrow.setSmooth(true);\n\t\t\n\t\tScaleTransition arrowScaleTrans = new ScaleTransition(Duration.millis(500),increaseArrow);\n\t\tarrowScaleTrans.setToX(1.5f);\n\t\tarrowScaleTrans.setToY(1.5f);\n\t\tarrowScaleTrans.setCycleCount(1);\n\t\t\n\t\tFadeTransition arrowFadeTrans = new FadeTransition(Duration.millis(1000),increaseArrow);\n\t\tarrowFadeTrans.setFromValue(1.0f);\n\t\tarrowFadeTrans.setToValue(0.0f);\n\t\tarrowFadeTrans.setCycleCount(1);\n\t\t\n\t\t//top star position\n\t\tImage star1Image = new Image(\"res/images/Star #1.png\");\n\t\tImageView star1 = new ImageView(star1Image);\n\t\t\n\t\tstar1.setTranslateX(100);\n\t\tstar1.setTranslateY(50);\n\t\t\n\t\tstar1.setFitWidth(20);\n\t\tstar1.setPreserveRatio(true);\n\t\tstar1.setSmooth(true);\n\t\t\n\t\tFadeTransition star1trans = new FadeTransition(Duration.millis(200));\n\t\tstar1trans.setCycleCount(2);\n\t\tstar1trans.setAutoReverse(true);\n\t\t\n\t\t//left star position\n\t\tImage star2Image = new Image(\"res/images/Star #2.png\");\n\t\tImageView star2 = new ImageView(star2Image);\n\t\t\n\t\tstar2.setTranslateX(50);\n\t\tstar2.setTranslateY(100);\n\t\t\n\t\tstar2.setFitWidth(20);\n\t\tstar2.setPreserveRatio(true);\n\t\tstar2.setSmooth(true);\n\t\t\n\t\tFadeTransition star2trans = new FadeTransition(Duration.millis(200));\n\t\tstar2trans.setCycleCount(2);\n\t\tstar2trans.setAutoReverse(true);\n\t\t\n\t\t//right star position\n\t\tImage star3Image = new Image(\"res/images/Star #3.png\");\n\t\tImageView star3 = new ImageView(star3Image);\n\t\t\n\t\tstar3.setTranslateX(150);\n\t\tstar3.setTranslateY(100);\n\t\t\n\t\tstar3.setFitWidth(20);\n\t\tstar3.setPreserveRatio(true);\n\t\tstar3.setSmooth(true);\n\t\t\n\t\tFadeTransition star3trans = new FadeTransition(Duration.millis(200));\n\t\tstar3trans.setCycleCount(2);\n\t\tstar3trans.setAutoReverse(true);\n\t\t\n\t\tif (player == LOCAL) {\n\t\t\tlocPane.getChildren().addAll(increaseArrow,star1,star2,star3);\n\t\t} else if (player == OPPONENT) {\n\t\t\toppPane.getChildren().addAll(increaseArrow,star1,star2,star3);\n\t\t}\n\t\t\n\t\tSequentialTransition sequencer = new SequentialTransition();\n\t\tsequencer.getChildren().addAll(arrowScaleTrans,\n\t\t\t\t\t\t\t\t\t star2trans,\n\t\t\t\t\t\t\t\t\t star1trans,\n\t\t\t\t\t\t\t\t\t star3trans,\n\t\t\t\t\t\t\t\t\t arrowFadeTrans);\n\t\tsequencer.setCycleCount(1);\n\t\tsequencer.play();\n\t}", "public MyAnimation getRearSprite();", "public MyAnimation getFrontSprite();", "public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }", "private void weakenPlayerAnimation(int player) {\n\t\t//red stat decrease arrow\n\t\tImage decreaseArrowImage = new Image(\"res/images/Red Down Arrow.png\");\n\t\tImageView decreaseArrow = new ImageView(decreaseArrowImage);\n\t\t\n\t\tdecreaseArrow.setTranslateX(100);\n\t\tdecreaseArrow.setTranslateY(100);\n\t\t\n\t\tdecreaseArrow.setFitWidth(40);\n\t\tdecreaseArrow.setPreserveRatio(true);\n\t\tdecreaseArrow.setSmooth(true);\n\t\t\n\t\tScaleTransition arrowScaleTrans = new ScaleTransition(Duration.millis(500),decreaseArrow);\n\t\tarrowScaleTrans.setToX(1.5f);\n\t\tarrowScaleTrans.setToY(1.5f);\n\t\tarrowScaleTrans.setCycleCount(1);\n\t\t\n\t\tFadeTransition arrowFadeTrans = new FadeTransition(Duration.millis(1000),decreaseArrow);\n\t\tarrowFadeTrans.setFromValue(1.0f);\n\t\tarrowFadeTrans.setToValue(0.0f);\n\t\tarrowFadeTrans.setCycleCount(1);\n\t\t\n\t\t//Left dust cloud\n\t\tImage dust1Image = new Image(\"res/images/Dust #1.png\");\n\t\tImageView dust1 = new ImageView(dust1Image);\n\t\t\n\t\tdust1.setTranslateX(50);\n\t\tdust1.setTranslateY(250);\n\t\t\n\t\tdust1.setFitWidth(20);\n\t\tdust1.setPreserveRatio(true);\n\t\tdust1.setSmooth(true);\n\t\t\n\t\tFadeTransition dust1transIn = new FadeTransition(Duration.millis(200),dust1);\n\t\tdust1transIn.setFromValue(0.0f);\n\t\tdust1transIn.setToValue(1.0f);\n\t\tdust1transIn.setCycleCount(1);\n\t\t\n\t\tFadeTransition dust1transOut = new FadeTransition(Duration.millis(500),dust1);\n\t\tdust1transOut.setFromValue(1.0f);\n\t\tdust1transOut.setToValue(0.0f);\n\t\tdust1transOut.setCycleCount(1);\n\t\t\n\t\tImage dust2Image = new Image(\"res/images/Dust #2.png\");\n\t\tImageView dust2 = new ImageView(dust2Image);\n\t\t\n\t\tdust2.setTranslateX(150);\n\t\tdust2.setTranslateY(250);\n\t\t\n\t\tdust2.setFitWidth(20);\n\t\tdust2.setPreserveRatio(true);\n\t\tdust2.setSmooth(true);\n\t\t\n\t\tFadeTransition dust2transIn = new FadeTransition(Duration.millis(200),dust2);\n\t\tdust2transIn.setFromValue(0.0f);\n\t\tdust2transIn.setToValue(1.0f);\n\t\tdust2transIn.setCycleCount(1);\n\t\t\n\t\tFadeTransition dust2transOut = new FadeTransition(Duration.millis(500),dust2);\n\t\tdust2transOut.setFromValue(1.0f);\n\t\tdust2transOut.setToValue(0.0f);\n\t\tdust2transOut.setCycleCount(1);\n\t\t\n\t\tif (player == LOCAL) {\n\t\t\tlocPane.getChildren().addAll(decreaseArrow,dust1,dust2);\n\t\t} else if (player == OPPONENT) {\n\t\t\toppPane.getChildren().addAll(decreaseArrow,dust1,dust2);\n\t\t}\n\t\t\n\t\tSequentialTransition sequencer = new SequentialTransition();\n\t\tsequencer.getChildren().addAll(arrowScaleTrans,\n\t\t\t\t\t\t\t\t\t dust1transIn,\n\t\t\t\t\t\t\t\t\t dust2transIn,\n\t\t\t\t\t\t\t\t\t dust1transOut,\n\t\t\t\t\t\t\t\t\t dust2transOut,\n\t\t\t\t\t\t\t\t\t arrowFadeTrans);\n\t\tsequencer.setCycleCount(1);\n\t\tsequencer.play();\n\t\t\n\t\t\n\t}", "public void onUpReleased(){\n// player.getSprite().setFitHeight(50);\n shipSoundPlayer.stop();\n if(GameEngine.isPlaying)\n player.setSprite(\"Sprites\\\\spaceship_new.png\");\n }", "private void play() {\n play(Animation.INDEFINITE);\n }", "private void idleAnimation(){\n timer++;\n if( timer > 4 ){\n setImage(loadTexture());\n animIndex++;\n timer= 0;\n if(animIndex > maxAnimIndex ){\n animIndex = 0;\n }\n }\n }", "public void update(){\n if(player.getPlaying()) {\n // update player animation.\n player.update();\n // update background animation.\n bg.update();\n // checks if skater has finished falling animation to end the game.\n if (player.animate instanceof FallAnimate && player.animate.getDone()) {\n player.setPlaying(false);\n player.setFall(false);\n System.out.println(\"End \" + player.getPlaying());\n }\n // checks if player has reached required points.\n if(player.getScore() > TARGETSCORE){\n player.setPlaying(false);\n levelCompleted = true;\n levelReset = System.nanoTime();\n }\n // increment jumpcounter while crouched.\n if (player.animate instanceof CrouchingAnimate && (jumpCounter <= 25)) {\n jumpCounter++;\n }\n // Creating Bananas:\n long bananaElapsed = (System.nanoTime() - bananaStartTime) / 1000000;\n if(bananaElapsed > 10500 && MainActivity.difficulty != 0){\n bananas.add(new Banana(BitmapFactory.decodeResource(getResources(),\n R.drawable.bigbanana), WIDTH + 10, (int) (HEIGHT * 0.85), 40, 40, 1));\n bananaStartTime = System.nanoTime();\n }\n //collision detection:\n for (int i = 0; i < bananas.size(); i++) {\n bananas.get(i).update();\n if (collision(bananas.get(i), player)) {\n bananas.remove(i);\n player.setFall(true);\n player.setPlaying(false);\n break;\n }\n // removing bananas when off screen\n if (bananas.get(i).getX() < -100) {\n bananas.remove(i);\n break;\n }\n }\n // Creating Cones:\n long coneElapsed = (System.nanoTime() - coneStartTime) / 1000000;\n if (coneElapsed > 5000) {\n cones.add(new TallBricks(BitmapFactory.decodeResource(getResources(),\n R.drawable.tallbricks), WIDTH + 10, (int) (HEIGHT * 0.59), 100, 161, 1));\n coneStartTime = System.nanoTime();\n }\n // update and check collisions.\n for (int i = 0; i < cones.size(); i++) {\n\n cones.get(i).update();\n if (collision(cones.get(i), player) && MainActivity.difficulty == 0) {\n cones.remove(i);\n player.forceSetScore(-500);\n break;\n }\n\n if (collision(cones.get(i), player) && MainActivity.difficulty != 0) {\n cones.remove(i);\n player.setFall(true);\n break;\n }\n // removing cones when off screen\n if (cones.get(i).getX() < -100) {\n cones.remove(i);\n break;\n }\n\n if((cones.get(i).getX() < player.getX() -15) ){\n cones.remove(i);\n player.setPendingPoints(1000);\n break;\n }\n }\n }\n else if(player.getPlaying() == false && levelCompleted){\n long resetElapsed = (System.nanoTime()-levelReset)/1000000;\n if(resetElapsed > 4000) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(\"result\",true);\n ((Activity)context).setResult(Activity.RESULT_OK,resultIntent);\n ((Activity)context).finish();\n }\n }\n else if(player.getPlaying() == false && !levelCompleted){\n if(!reset){\n newGameCreated = false;\n startReset = System.nanoTime();\n reset = true;\n }\n\n long resetElapsed = (System.nanoTime()-startReset)/1000000;\n\n if(resetElapsed > 2500 && !newGameCreated){\n newGame();\n }\n else if(resetElapsed < 2500 && started){\n player.update();\n }\n }\n }", "public void evaluateSprite(){\n if(this.orientation == Orientation.FACING_NORTH) {\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingNorth.png\"));\n }\n if(this.orientation == Orientation.FACING_WEST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingWest.png\"));\n }\n if(this.orientation == Orientation.FACING_SOUTH){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingSouth.png\"));\n }\n if(this.orientation == Orientation.FACING_EAST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingEast.png\"));\n }\n\n this.sprite = new Sprite(texture);\n }", "private void updateSprites() {\n\t\tpaddle1.setX(paddle1X);\r\n\t\tpaddle1.setY(paddle1Y);\r\n\r\n\t\tpaddle2.setX(paddle2X);\r\n\t\tpaddle2.setY(paddle2Y);\r\n\r\n\t\tball.setX(ballX);\r\n\t\tball.setY(ballY);\r\n\r\n\t\tscore.setVisible(paused);\r\n\t}", "@Override\n public void show() {\n\n skin = new Skin(Gdx.files.internal(\"menu/menu.json\"),new TextureAtlas(\"menu/menu.pack\"));\n\n Image background = new Image(skin, \"menuscreen\");\n background.setPosition(0,0);\n stage.addActor(background);\n\n Image gameOver = new Image(skin,\"gameOver\");\n gameOver.setPosition( ( 800 - 484)/2 , (480 - 345)/2 ) ;\n stage.addActor(gameOver);\n\n Button gameOverSim = new Button(skin,\"gameOverSim\");\n gameOverSim.setPosition(265,100);\n stage.addActor(gameOverSim);\n\n Button gameOverNao = new Button(skin,\"gameOverNao\");\n gameOverNao.setPosition(425,100);\n stage.addActor(gameOverNao);\n\n gameOverSim.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n // TO DO passar o level como parametro no construtor\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }\n });\n\n gameOverNao.addListener(new ClickListener() {\n @Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new MenuScreen(game));\n dispose();\n }\n });\n\n }", "public void displayGameMode (Graphics g1)\n {\n if (state == 1)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/1/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/1/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 2)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/2player2.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/2/1player2.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/2/plain2.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 3)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/3/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/3/plain.png\").getImage(), 0, 0, null);\n }\n \n else if (state == 4)\n {\n if (sprite == 2)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/2player.png\").getImage(), 0, 0, null);\n else if (sprite == 1)\n g1.drawImage (new ImageIcon (\"Images/1P2P/4/1player.png\").getImage(), 0, 0, null);\n else \n g1.drawImage (new ImageIcon (\"Images/1P2P/4/plain.png\").getImage(), 0, 0, null);\n }\n \n bird1.displayDisplayCharacter (g1);\n bird2.displayDisplayCharacter (g1);\n bird3.displayDisplayCharacter (g1);\n }", "public void act() \n {\n if(images != null)\n {\n if(animationState == AnimationState.ANIMATING)\n {\n if(animationCounter++ > delay)\n {\n animationCounter = 0;\n currentImage = (currentImage + 1) % images.length;\n setImage(images[currentImage]);\n }\n }\n else if(animationState == AnimationState.SPECIAL)\n {\n setImage(specialImage);\n }\n else if(animationState == AnimationState.RESTING)\n {\n animationState = AnimationState.FROZEN;\n animationCounter = 0;\n currentImage = 0;\n setImage(images[currentImage]);\n }\n }\n }", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "public void updateSprite() {\n //move to next frame\n if (this.curSpriteFrame == this.framesPerSprite) {\n if (this.spriteNum+1 < this.sprites.get(this.state).length) {\n this.spriteNum++;\n } else {\n this.spriteNum = 0;\n }\n this.curSpriteFrame = 0;\n }\n this.curSpriteFrame++;\n }", "@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }", "public void setAnimation()\n {\n if(speed<0)\n {\n if(animationCount % 4 == 0)\n animateLeft();\n }\n else\n {\n if(animationCount % 4 == 0)\n animateRight();\n }\n }", "@Override\n public void updateStates() {\n mySprite.update();\n }", "void makePlay(int player) {\n }", "public void checkanimation(){ \n if(super.movecheck(flag) == 1)\n animationup();\n if( super.movecheck(flag)== 2)\n animationdown();\n if(super.movecheck(flag) == 3)\n animationleft();\n if(super.movecheck(flag)== 4)\n animationright(); \n }", "@Override\n public void draw(SpriteBatch batch) {\n stateTime += Gdx.graphics.getDeltaTime();\n\n if (SinglePGameModel.getInstance().getPlayer().isWalking())\n sprite.setRegion(walkingAnimation.getKeyFrame(stateTime, true));\n else\n sprite.setRegion(jumpingAnimation);\n\n sprite.draw(batch);\n }", "public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}", "@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}", "public void modoEscudo(int modo) {\n\n this.modo = modo;\n switch (modo) {\n case 1:\n sprite.setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n setName(\"escudo1\");\n\n break;\n case 2:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(true, false);\n\n setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n\n setName(\"escudo2\");\n break;\n case 3:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2) - (sprite.getHeight()),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(true, true);\n\n setBounds((Gdx.graphics.getWidth() / 2),\n (Gdx.graphics.getHeight() / 2) - (sprite.getHeight()),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n\n\n setName(\"escudo3\");\n\n break;\n case 4:\n\n sprite.setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n ((Gdx.graphics.getHeight() / 2) - (sprite.getHeight())),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n sprite.flip(false, true);\n\n setBounds((Gdx.graphics.getWidth() / 2) - (sprite.getWidth()),\n ((Gdx.graphics.getHeight() / 2) - (sprite.getHeight())),\n Gdx.graphics.getWidth() * 0.15f,\n Gdx.graphics.getHeight() * 0.15f);\n setName(\"escudo4\");\n\n break;\n }\n spriteDebugger = new ShapeRenderer();\n }", "void walkAnimation(int direction, int index) {\n switch (direction) {\n case 0:\n if (flip) { tile.setImg(upSprites1.get(index)); }\n else { tile.setImg(upSprites2.get(index)); }\n break;\n case 1:\n if (flip) { tile.setImg(downSprites2.get(index)); }\n else { tile.setImg(downSprites2.get(index)); }\n break;\n case 2:\n tile.setImg(leftSprites.get(index));\n break;\n case 3:\n tile.setImg(rightSprites.get(index));\n break;\n }\n }", "private void play(int cycles) {\n this.currentAnimation = new SpriteAnimation(Duration.seconds((double) (count / fps)), cycles);\n this.currentAnimation.play();\n }", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\tdetachChild(anim);\n\n\t\t\t\t\tanim = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcache.get(position).getSound().play();\n\t\t\t\t\t\t// disable clicks on these first\n\t\t\t\t\t\tdetachChild(greenTick);\t\n\t\t\t\t\t\tdetachChild(redx);\n\t\t\t\t\t\tif(sprite1 != null)\n\t\t\t\t\t\t\tregisterTouchArea(sprite1);\n\t\t\t\t\t\tif(sprite2 != null)\n\t\t\t\t\t\t\tregisterTouchArea(sprite2);\n\t\t\t\t\t\tif(sprite3 != null)\n\t\t\t\t\t\t\tregisterTouchArea(sprite3);\n\t\t\t\t\t\tif(sprite4 != null)\n\t\t\t\t\t\t\tregisterTouchArea(sprite4);\n\t\t\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\t\t\tshowToast(\"Line 277\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "void playerHandler() {\n player.turnToPoint(mouseX, mouseY);\n if (firing && sTimer < 1) {\n\n Sprite smb = new Sprite(smbulletbase);\n smb.moveToSprite(player);\n if(usingCoil){\n clickEffect = new KTSound(this, coilshotURL);\n ktAudio.add(clickEffect);\n clickEffect.play();\n clickEffect = new KTSound(this, gunshotURL);\n ktAudio.add(clickEffect);\n }\n smBullets.add(smb);\n clickEffect.play();\n if(weapon == \"minigun\"){\n smb.turnToPoint(mouseX+(int)random(-90,90), mouseY+(int)random(-90,90));\n }\n else{\n smb.turnToPoint(mouseX, mouseY);\n }\n\n sTimer = firingSpeed;\n }\n sTimer -= 1;\n \n prevX = player.getX();\n prevY = player.getY();\n\n if (up) {\n player.moveY( - 5);\n // pAngle -= 1;\n }\n if (down) {\n player.moveY(5);\n // pAngle += 1;\n }\n if (left) {\n player.moveX( - 5);\n // pAngle -= 1;\n }\n if (right) {\n player.moveX(5);\n }\n if (player.getY() < player.getH() / 2) {\n player.setY(player.getH() / 2);\n }\n if (player.getY() > 2048 - player.getH() / 2) {\n player.setY(2048 - player.getH() / 2);\n }\n if (player.getX() < player.getH() / 2) {\n player.setX(player.getH() / 2);\n }\n if (player.getX() > 2048 - player.getH() / 2) {\n player.setX(2048 - player.getH() / 2);\n }\n \n \n\n // player.turnToDir(pAngle);\n player.display();\n // player.displayHitbox();\n}", "void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }", "protected abstract void animationLogicTemplate();", "public void chasePlayer() {\r\n\t\tif(!playerNear().equals(\"n\")) {\r\n\t\t\tif(playerNear().equals(\"left\")) {\r\n\t\t\t\tspeed = -1;\r\n\t\t\t}\r\n\t\t\telse if(playerNear().equals(\"right\")) {\r\n\t\t\t\tspeed = 1;\r\n\t\t\t}\r\n\t\t\tx += speed; setLocation(x,y); repaint();\r\n\t\t}\r\n\t\telse {\r\n\t\t\trandomMove();\r\n\t\t}\r\n\t\tif(speed > 0) {\r\n\t\t\tsetIcon(rightImage);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetIcon(leftImage);\r\n\t\t}\r\n\r\n\t}", "@Override\n public void setAnim(int nextIn, int nextOut, int quitIn, int quitOut) {\n if (manager != null) {\n manager.setAnim(nextIn, nextOut, quitIn, quitOut);\n }\n }", "public void setAnimation() {\r\n\r\n // start outside the screen and move down until the clock is out of sight\r\n ObjectAnimator moveDown = ObjectAnimator.ofFloat(this, \"y\", -100, screenY + 100);\r\n AnimatorSet animSet = new AnimatorSet();\r\n animSet.play(moveDown);\r\n\r\n // Set duration to 4000 milliseconds\r\n animSet.setDuration(4000);\r\n\r\n animSet.start();\r\n\r\n }", "public void moveLeft() {\r\n speedX = -6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/leftWalk1.png\");\r\n img = new Sprite (r1);\r\n }", "protected abstract void animate(int anim);", "@Override\n public void draw(SpriteBatch batch) {\n\n stateTime += Gdx.graphics.getDeltaTime();\n if(hurtTime > 0) hurtTime -= Gdx.graphics.getDeltaTime();\n\n if(direction != EntityModel.AnimDirection.NONE) {\n sprite.setRegion((TextureRegion) animations.get(direction.ordinal()).getKeyFrame(stateTime, true));\n\n } else sprite.setRegion(idleSprites.get(previousDirection.ordinal()));\n\n sprite.draw(batch);\n }", "private void getPlayer(){\n /** We need to have the correct child index from the scene **/\n //Spatial spatialNode = animation_Scene.getChild(16);\n //spatialNode\n animCharacter = (Node) animation_Scene.getChild(16);\n //rootNode.attachChild(animCharacter);\n animCharacter.setLocalTranslation(0, 0, 0);\n \n \n /** Get the animation control **/\n control = animCharacter.getChild(0).getControl(AnimControl.class);\n \n /** Print the names of animations**/\n Collection<String> animationNames = control.getAnimationNames();\n Object[] nameArray = animationNames.toArray();\n for(int a = 0; a < animationNames.size(); a++){\n System.out.println(\"Animation \" + a + \": \" + nameArray[a]);\n }\n \n /** Get Animation Channel **/\n channel = control.createChannel();\n walk = control.getAnim(\"Walk\");\n run = control.getAnim(\"Run\");\n stand = control.getAnim(\"Action_Stand\");\n \n channel.setAnim(\"Action_Stand\");\n }", "public void setUpAnimations(){\n //Vertical movement animation\n this.verticalMovement = new Animation[NUMBER_OF_VERTICAL_FRAMES]; //Number of images\n TextureRegion[][] heroVerticalSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_vertical.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_VERTICAL_FRAMES; i++)\n verticalMovement[i] = new Animation(ANIMATION_SPEED, heroVerticalSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n //Jump animation\n this.jumpMovement = new Animation[NUMBER_OF_JUMP_FRAMES];\n TextureRegion[][] heroJumpSpriteSheet = TextureRegion.split(new Texture(\"img/hero/hero_jump.png\"), HERO_WIDTH_PIXEL, HERO_HEIGHT_PIXEL); //TODO: Load atlas?\n\n for(int i = 0; i < NUMBER_OF_JUMP_FRAMES; i++)\n jumpMovement[i] = new Animation(ANIMATION_SPEED, heroJumpSpriteSheet[0][i]); //TODO HANDLE EXCEPTION?\n\n }", "public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }", "private void makePlay() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\n\t\tplay = new Sprite(6, 6, 360, 379, new Image(\"file:./res/images/basketball.png\"), 1, 1000);\n\t\tplay.setLayoutX(140);\n\t\tplay.setLayoutY(190);\n\t\tplay.setScaleX(0.5);\n\t\tplay.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(play);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1000));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(play);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().playWith();\n\t\t});\n\t\tpause.play();\n\n\t}", "private void chooseSprite()\r\n\t{\r\n\t\t//Ensure pedestrian sprites exist\r\n\t\tif (sprites.isEmpty()) {\r\n\t\t\tSystem.err.println(\"ERROR: No pedestrian sprites have been loaded\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//Select a random sprite\r\n\t\tint index = (int) Math.floor( Math.random()*sprites.size() );\r\n\t\tspriteName = sprites.get(index);\r\n\t\tsetSprite(\"pedestrians/\"+spriteName);\r\n\t}", "private void animateRight(){\n if(frame == 1){\n setImage(run1);\n }\n else if(frame == 2){\n setImage(run2);\n }\n else if(frame == 3){\n setImage(run3);\n }\n else if(frame == 4){\n setImage(run4);\n }\n else if(frame == 5){\n setImage(run5);\n }\n else if(frame == 6){\n setImage(run6);\n }\n else if(frame == 7){\n setImage(run7);\n }\n else if(frame == 8){\n setImage(run8);\n frame =1;\n return;\n }\n frame ++;\n }", "public void playOneTurn() {\r\n //the number of balls in the game\r\n this.ballCounter = new Counter(this.levelInformation.numberOfBalls());\r\n Sleeper sleeper = new Sleeper();\r\n\r\n this.runner = new AnimationRunner(gui, 60, sleeper);\r\n this.paddle.getRectangle().setUpperLeft(new Point(WIDTH_SCREEN / 2 - (this.levelInformation.paddleWidth() / 2),\r\n HI_SCREEN - 40));\r\n //initialize the balls\r\n initializeBall();\r\n\r\n //start the game by counting down\r\n if (this.sprites != null) {\r\n this.runner.run(new CountdownAnimation(2, 4, this.sprites));\r\n }\r\n //run the game\r\n this.running = true;\r\n this.runner.run(this);\r\n\r\n }", "private void setInitialAnim()\n {\n \n \n if(level.playerFacing == Direction.LEFT)\n {\t\n \tcurrentAnim = leftWalk;\n }\n else\n {\n \tcurrentAnim = rightWalk;\n }\n \n Image i = currentAnim.getCurrentFrame();\n width = i.getWidth();\n height = i.getHeight();\n }", "@Override\n public void draw(Batch batch, float parentAlpha) {\n\n if(vidas == 0){\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-12,16,16);\n sprite.draw(batch);\n\n }else{\n sprite.setBounds(body.getPosition().x-7,body.getPosition().y-7,16,16);\n sprite.setPosition(body.getPosition().x - 9f, body.getPosition().y - 9);\n sprite.draw(batch);\n patrullar();\n }\n\n\n }", "public void goToSprite(Sprite target) { \n goToXY(target.pos.x,target.pos.y);\n }", "public void play() { player.resume();}", "public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}", "abstract public void loadSprite();", "public abstract void animationStarted();", "public void Animate(JItemAnimation activeSprite, int style, float time) {\n\t\tMapRenderer.CurrentRenderer.ItemAnimation = activeSprite;\n\t\tAnimTime = 0;\n\t\tAnimationStyle = style;\n\t\tItemAnimdir = dir;\n\t\tItemPos.set(pos.x,pos.y+0.1f);\n\t\ttotalAnimTime = time;\n\t\tif(ItemAnimdir == RIGHT)\n\t\t\tactiveSprite.flip(true, false);\n\t\t\n\t\tisAttacking = true;\n}", "@Override\r\n\tpublic void act(float delta) {\r\n\r\n\t\t// position\r\n\t\tsetSpritesPosition();\r\n\t\tif(previousHealth != g.i().playerHealth)\r\n\t\t\tcover.setScale((100f -g.i().playerHealth)/100f, 1f);\r\n\t\tstateTime += Gdx.graphics.getDeltaTime();\r\n\t\tcurrentFrame = healthBarAnimation.getKeyFrame(stateTime, true);\r\n\t\theroHealth.setRegion(currentFrame);\r\n\t\t\r\n\t\tpreviousHealth = g.i().playerHealth;\r\n\r\n\t}", "private void rerunAnimation() {\n transition.playFromStart();\r\n}", "public void onUpPressed(){\n shipSoundPlayer.setVolume(App.getVolume()/2);\n if(timeAfterStateChanged > 3){\n timeAfterStateChanged = 0;\n if(fireState_1){\n player.setSprite(spaceship_flying_2);\n }else{\n player.setSprite(spaceship_flying_1);\n }\n fireState_1 = !fireState_1;\n }\n timeAfterStateChanged++;\n\n if(shipSoundPlayer.getCurrentTime().toMillis()>3400){\n shipSoundPlayer = new MediaPlayer(new Media(new File(\"Sounds\\\\SpaceShip_move.mp3\").toURI().toString()));\n }\n shipSoundPlayer.play();\n if(Math.pow(Math.pow(player.getSpeed().getX(),2)+Math.pow(player.getSpeed().getY(),2),0.5)<player.getSpeedLimit()) {\n player.setSpeed(new Point2D(player.getSpeed().getX() - Math.cos(Math.toRadians(player.getRotation() + 90)) * player.getAcceleration(), player.getSpeed().getY() - Math.sin(Math.toRadians(player.getRotation() + 90)) * player.getAcceleration()));\n }\n }", "public void resume(String theBase) {\r\n\t\tif (theBase.equals(\"zombie\")) {\r\n\t\t\tgetEnemyAnimation().getAnimation().play();\r\n\t\t\tgetEnemyAnimation().getTranslation().play();\r\n\t\t}else if (theBase.equals(\"tower\")) {\r\n\t\t\tgetAnimation().getAnimation().play();\r\n\t\t\tProjectile pjtile = getAnimation().getProjectile();\r\n\t\t\tif (pjtile != null) {\r\n\t\t\t\tList<Projectile> listOfPjtile = getAnimation().getPjList();\r\n\t\t\t\tfor (Projectile pjt: listOfPjtile) {\r\n\t\t\t\t\tpjt.getAnimation().play();\r\n\t\t\t\t\tpjt.getTranslation().play();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void replay() {\n if (currentAnimation == null) play();\n else currentAnimation.playFromStart();\n }", "@Override\n\tpublic void render(float delta) {\n\t\tbackground.render(camera);\n\t\tui.act();\n\t\tui.draw();\n\t\tif(showG) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t\tif(showA) {\n\t\t\tspriteBatch.begin();\n\t\t\tspriteBatch.draw(texture2, 0, 0);\n\t\t\tspriteBatch.end();\n\t\t}\n\t}", "protected void setAnimation(BufferedImage[] sprites, int delay) {\r\n animation.setFrames(sprites);\r\n animation.setDelay(delay);\r\n }", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif(flagD && !flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = -1;\n\t\t\t\t} else if(flagD && flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(!flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t}\n\t\t\t\t//Flags W & S\n\t\t\t\tif(flagS && !flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = -1;\n\t\t\t\t} else if(flagS && flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(!flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayer.setTranslateX(player.getTranslateX() + player.velocityX);\n\t\t\t\tplayer.setTranslateY(player.getTranslateY() + player.velocityY);\n\t\t\t\t\n\t\t\t\tif(collision(player, player2)) {\n\t\t\t\t\tplayer.setFill(Color.YELLOW);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayer.setFill(Color.BLACK);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void waitingFrames()\n\t{\n\t\tif(waitingFrames < framesToWait && action == false)\n\t\t{\n\t\t\twaitingFrames ++;\n\t\t}\n\t\telse if(waitingFrames == framesToWait && action == false)\n\t\t{\n\t\t\twaitingFrames = 0;\n\t\t\taction = true;\n\t\t\tspriteImageView.setImage(holdImage);\n\t\t\tswitch(getDirection())\n\t\t\t{\n\t\t\tcase \"UP\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 300, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"DOWN\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 0, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"LEFT\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 100, 100, 100));\n\t\t\t\tbreak;\n\t\t\tcase \"RIGHT\":\n\t\t\t\tspriteImageView.setViewport(new Rectangle2D(0, 200, 100, 100));\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tswitch(getDirection())\n//\t\t\t{\n//\t\t\t\tcase \"UP\":\t\t\t\t\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+300,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"DOWN\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"LEFT\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+100,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tcase \"RIGHT\":\n//\t\t\t\t\twalkingAnimation=new SpriteAnimation(spriteImageView,Duration.millis(500),count,column,offsetX,offsetY+200,width,height);\n//\t\t\t\t\tbreak;\n//\t\t\t\tdefault: break;\n//\t\t\t}\n//\t\t\twalkingAnimation.play();\n\t\t}\n\t}", "private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException 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 \t grafico.setIcon(null);\r\n\t}", "public void startAnimation()\n {\n if ( animationTimer == null )\n {\n currentImage = 0; // display first image\n \n // Create timer\n animationTimer = new Timer ( ANIMATION_DELAY, new TimerHandler() );\n \n animationTimer.start(); // start Timer\n } // end if statement\n else // animationTimer already exists, restart animation\n {\n if ( ! animationTimer.isRunning() )\n animationTimer.restart();\n } // end else statement\n }", "public void actionPerformed(ActionEvent arg0) {\r\n\t\tif (play == arg0.getSource())\r\n\t\t\tm.changePanel(\"2\");\r\n\t\tif(instructions == arg0.getSource()) {\r\n\t\t\tm.changePanel(\"3\");\r\n\t\t}\r\n\t}", "public void setSprite(Sprite sprite_)\n\t{\n\t\tsprite=sprite_;\n\t}", "void startAnimation();", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "public void updateAnimation() {\n\t\tif (anim < 1000) {\n\t\t\tanim++;\n\t\t} else anim = 0;\n\t}", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "public Mob(int x, int y, int width, int height, Game game, int direction, int type){\r\n super(x, y, width, height);\r\n this.game = game;\r\n this.direction = direction;\r\n this.type = type;\r\n this.alive = true;\r\n this.endAnimationFrameCount = 0;\r\n this.collider = new Collider(getX()+getWidth()/2,getY()+getHeight()/2,Math.max(getWidth()/2, getHeight()/2));\r\n switch(type){\r\n case 1:\r\n damage = 30;\r\n switch(direction){\r\n case 1: \r\n sprite = new Animation(Assets.arrowLeft);\r\n break;\r\n case 2: \r\n sprite = new Animation(Assets.arrowUp);\r\n break;\r\n case 3: \r\n sprite = new Animation(Assets.arrowRight);\r\n break;\r\n case 4: \r\n sprite = new Animation(Assets.arrowDown);\r\n break;\r\n }\r\n this.speed = 15;\r\n break;\r\n case 2:\r\n damage = 50;\r\n switch(direction){\r\n case 1: \r\n sprite = new Animation(Assets.playerLPunch);\r\n break;\r\n case 2: \r\n sprite = new Animation(Assets.playerUPunch);\r\n break;\r\n case 3: \r\n sprite = new Animation(Assets.playerRPunch);\r\n break;\r\n case 4: \r\n sprite = new Animation(Assets.playerDPunch);\r\n break;\r\n default:\r\n sprite = new Animation(Assets.playerRPunch);\r\n }\r\n this.speed = 0;\r\n break;\r\n }\r\n }", "private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }", "@Override\n\tpublic void show() {\n\t backgroundImage = new Texture(Gdx.files.internal(\"resources/images/menu.png\"));\n\t soccerImage = new Texture(Gdx.files.internal(\"resources/images/ball.gif\"));\n\t boomerangImage = new Texture(Gdx.files.internal(\"resources/images/boomerang.gif\"));\n\t wolfImage = new Texture(Gdx.files.internal(\"resources/images/wolf.gif\"));\n\t boyImage = new Texture(Gdx.files.internal(\"resources/images/bueno2.png\"));\n\t boyImageInv = new Texture(Gdx.files.internal(\"resources/images/bueno2Inv.png\"));\n\t grassImage = new Texture(Gdx.files.internal(\"resources/images/piso.png\"));\n\t \n\n\t // load the drop sound effect and the rain background \"music\"\n\t dropSound = Gdx.audio.newSound(Gdx.files.internal(\"resources/drop.wav\"));\n\t rainMusic = Gdx.audio.newMusic(Gdx.files.internal(\"resources/rain.mp3\"));\n\n\t // start the playback of the background music immediately\n\t rainMusic.setLooping(true);\n\t //rainMusic.play();\n\n\t // create the camera and the SpriteBatch\n\t camera = new OrthographicCamera();\n\t camera.setToOrtho(false, 800, 480);\n\t batch = new SpriteBatch();\n\n\t // create a Rectangle to logically represent the boy\n\t boy = new Rectangle();\n\t boy.x = 130; //800 / 2 - 50 / 2; // center the boy horizontally\n\t boy.y = 235; // just above the ground\n\t boy.width = 50;\n\t boy.height = 74;\n\t \n\t //boy2\n\t boy2 = new Rectangle();\n\t boy2.x = 130;\n\t boy2.y = 160; \n\t boy2.width = 50;\n\t boy2.height = 74;\n\t \n\t //create a grass Rectangle to represent the grass\n\t grass = new Rectangle();\n\t grass.x = 0;\n\t grass.y = camera.viewportHeight/2-30;\n\t \n\t grass2 = new Rectangle();\n\t grass2.x = camera.viewportWidth;\n\t grass2.y = camera.viewportHeight/2-30;\n\t \n\t velocidad = 8;\n\t counterGravity = 0.0;\n\t \n\t countObjs = 1;\n\t //stateTime = 0;\n\n\t // create the soccerballs array and spawn the first soccer ball\n\t soccerballs = new Array<Rectangle>();\n\n\t //create the boomerans array and spawn the first boomerang\n\t boomerangs = new Array<Rectangle>();\n\t \n\n\t spawnBoomerangs();\n\t spawnSoccerBall();\n\t\t\n\t}", "private void initAnimation(){\n\t\tplayer_card_anim = new TranslateAnimation(\r\n\t\t\t\tAnimation.ABSOLUTE, 0f,\r\n\t\t\t\tAnimation.ABSOLUTE, -240,\r\n\t\t\t\tAnimation.ABSOLUTE, 0f,\r\n\t\t\t\tAnimation.ABSOLUTE, -550);\r\n\t\tplayer_card_anim.setDuration(700);\r\n\t\tplayer_card_anim.setAnimationListener(new AnimationListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tsetSelectCard(0, player_card_index);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tnpc_card_anim = new TranslateAnimation(\r\n\t\t\t\tAnimation.ABSOLUTE, 0f,\r\n\t\t\t\tAnimation.ABSOLUTE, 240,\r\n\t\t\t\tAnimation.ABSOLUTE, 0f,\r\n\t\t\t\tAnimation.ABSOLUTE, 550);\r\n\t\tnpc_card_anim.setDuration(700);\r\n\t\tnpc_card_anim.setAnimationListener(new AnimationListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tsetSelectCard(1, npc_card_index);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tplayer_dialog_anim = new ScaleAnimation(\r\n\t\t\t\t0f, 1f, 0f, 1f,\r\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 0f,\r\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 1f);\r\n\t\tplayer_dialog_anim.setDuration(500);\r\n\t\tplayer_dialog_anim.setAnimationListener(new AnimationListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\t\r\n\t\t\t\tnew Handler().postDelayed(new Runnable(){ \r\n\t\t\t\t public void run() { \r\n\t\t\t\t \t\r\n\t\t\t\t \tint player_card_count = globalTools.getThisCardCount(npc_chara_index, player_card_index);\r\n\t\t\t\t \tint npc_card_count = globalTools.getThisCardCount(npc_chara_index, npc_card_index);\r\n\t\t\t\t \t\r\n\t\t\t\t \tif(player_card_count == 0 && npc_card_count > 1){\r\n\t\t\t\t \t\tyes_or_no = ANSWER_YES;\r\n\t\t\t\t \t}else{\r\n\t\t\t\t \t\tyes_or_no = ANSWER_NO;\r\n\t\t\t\t \t}\r\n\t\t\t\t \t\r\n\t\t\t\t \tif(exchange_or_gamble == ACTION_EXCHANGE){\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\tif(yes_or_no == ANSWER_YES){\r\n\t\t\t\t \t\t\ttv_npc_dialog.setText(R.string.negotiate_answer_exchange_yes);\r\n\t\t\t\t \t\t}else{\r\n\t\t\t\t \t\t\ttv_npc_dialog.setText(R.string.negotiate_answer_exchange_no);\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\ttv_npc_dialog.setVisibility(View.VISIBLE);\r\n\t\t\t\t \t\ttv_npc_dialog.startAnimation(npc_dialog_anim);\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t}else if(exchange_or_gamble == ACTION_GAMBLE){\r\n\t\t\t\t \t\t\r\n\t\t\t\t \t\tif(yes_or_no == ANSWER_YES){\r\n\t\t\t\t \t\t\ttv_npc_dialog.setText(R.string.negotiate_answer_gamble_yes);\r\n\t\t\t\t \t\t}else{\r\n\t\t\t\t \t\t\ttv_npc_dialog.setText(R.string.negotiate_answer_gamble_no);\r\n\t\t\t\t \t\t}\r\n\t\t\t\t \t\ttv_npc_dialog.setVisibility(View.VISIBLE);\r\n\t\t\t\t \t\ttv_npc_dialog.startAnimation(npc_dialog_anim);\r\n\t\t\t\t \t}\r\n\t\t\t\t } \r\n\t\t\t\t }, 1500);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tnpc_dialog_anim = new ScaleAnimation(\r\n\t\t\t\t0f, 1f, 0f, 1f,\r\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 1f,\r\n\t\t\t\tAnimation.RELATIVE_TO_SELF, 1f);\r\n\t\tnpc_dialog_anim.setDuration(500);\r\n\t\tnpc_dialog_anim.setAnimationListener(new AnimationListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\t\r\n\t\t\t\tnew Handler().postDelayed(new Runnable(){ \r\n\t\t\t\t public void run() { \r\n\t\t\t\t \ttv_player_dialog.setVisibility(View.INVISIBLE);\r\n\t\t\t\t\t\ttv_npc_dialog.setVisibility(View.INVISIBLE); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(yes_or_no == ANSWER_YES){\r\n\t\t\t\t\t\t\tif(exchange_or_gamble == ACTION_EXCHANGE){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tglobalTools.changeCardList(0, player_card_index, -1);\r\n\t\t\t\t\t\t\t\tglobalTools.changeCardList(0, npc_card_index, 1);\r\n\t\t\t\t\t\t\t\tglobalTools.changeCardList(npc_chara_index, player_card_index, 1);\r\n\t\t\t\t\t\t\t\tglobalTools.changeCardList(npc_chara_index, npc_card_index, -1);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tint temp = npc_card_index;\r\n\t\t\t\t\t\t\t\tnpc_card_index = player_card_index;\r\n\t\t\t\t\t\t\t\tplayer_card_index = temp;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\timg_player_card.startAnimation(player_card_anim);\r\n\t\t\t\t\t\t\t\timg_npc_card.startAnimation(npc_card_anim);\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else if(exchange_or_gamble == ACTION_GAMBLE){\r\n\t\t\t\t\t\t\t\t// TODO\r\n//\t\t\t\t\t\t\t\tnegotiateListener.showTargetFragment(global_data.JUMP_BATTLE);\r\n//\t\t\t\t\t\t\t\tnegotiateListener.changeBattleCard(0, player_select_index);\r\n//\t\t\t\t\t\t\t\tnegotiateListener.changeBattleCard(1, enemy_select_index);\r\n//\t\t\t\t\t\t\t\tnegotiateListener.changeBattleEnemy(enemy_index);\r\n//\t\t\t\t\t\t\t\tnegotiateListener.changeBattleBackground(which_scene);\r\n\t\t\t\t\t\t\t\tglobalTools.setPlayerBattleCardIndex(player_card_index);\r\n\t\t\t\t\t\t\t\tglobalTools.setNpcBattleCardIndex(npc_card_index);\r\n\t\t\t\t\t\t\t\tglobalTools.setBattleNpcCharaIndex(npc_chara_index);\r\n\t\t\t\t\t\t\t\tnegotiate_listener.showTargetFragment(globalTools.SHOW_BATTLE);\r\n\t\t\t\t\t\t\t}\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\t }, 1500);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void startNextPlayer() {\n if(flag.equals(\"player1\")){\n p2Handler.post(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n Message msg = maHandler.obtainMessage(2);\n maHandler.sendMessage(msg);\n }\n });\n }\n if(flag.equals(\"player2\")){\n p1Handler.post(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n Message msg = maHandler.obtainMessage(1);\n maHandler.sendMessage(msg);\n }\n });\n }\n }", "public void movement(){\n\t\t\n\t\tdelayCounter++;\n\t\t\n\t\tif(direction == Direction.RIGHT){\n\t\t\txCoor += 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[0] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[1];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[1] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[2];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[2] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == Direction.LEFT){\n\t\t\txCoor -= 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[3] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[4];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[4] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[5];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[5] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.UPWARD){\n\t\t\tyCoor += 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[10] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[11];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[11] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.DOWNWARD){\n\t\t\tyCoor -= 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\n\t\t\tif ( image == Assets.enemySprite[6] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[7];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[7] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[8];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[8] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tenemyWalk += 1;\n\t\t\n\t\t//This parts checks to see if the enemy has to turn or not.\n\t\tif(enemyWalk == screen.maps[screen.currentMap].path.getTileWidth()){\n\t\t\tint x = xCoor;\n\t\t\tint y = yCoor;\n\t\t\t\n\t\t\tif(direction == Direction.RIGHT){\n\t\t\t\tx = xCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.LEFT){\n\t\t\t\tx = xCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.UPWARD){\n\t\t\t\ty = yCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.DOWNWARD){\n\t\t\t\ty = yCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\t\n\t\t\tint tileBlockX = (int) (x/screen.maps[screen.currentMap].path.getTileWidth());\n\t\t\tint tileBlockY = (int) (y/screen.maps[screen.currentMap].path.getTileHeight());\n\t\t\t\n\t\t\t//As long as the enemy has not gone the opposite direction, the enemy will continue to move in the direction is was going originally.\n\t\t\tif(tileBlockX < screen.maps[screen.currentMap].path.getWidth()-1 && tileBlockX > 0){\n\t\t\t\tif(tileBlockY < screen.maps[screen.currentMap].path.getHeight()-1 && tileBlockY > 0){\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY + 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.DOWNWARD){\n\t\t\t\t\t\tdirection = Direction.UPWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY - 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.UPWARD){\n\t\t\t\t\t\tdirection = Direction.DOWNWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX + 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.LEFT){\n\t\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX - 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.RIGHT){\n\t\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the enemy makes it to the end, it is no longer in game.\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY).getTile().getProperties().containsKey(\"finish\") == true){\n\t\t\t\tinGame = false;\n\t\t\t\tscreen.playerHealth--;\n\t\t\t}\n\t\t\t\n\t\t\tenemyWalk = 0;\n\t\t}\n\t}", "private void setPlayer(BoardSquaresState player){\n\t\tif(player == BoardSquaresState.CROSS){\n\t\t\tselectedPlayer = BoardSquaresState.CROSS;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Cross\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"You go first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.cross_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\t\telse{\n\t\t\tselectedPlayer = BoardSquaresState.NOUGHT;\n\t\t\tplayerSelectionButton.setText(R.id.button_title, \"Nought\");\n\t\t\tplayerSelectionButton.setText(R.id.button_subtitle, \"Computer goes first!\");\n\t\t\tplayerSelectionButton.setImageResource(R.id.selector_button_image, R.drawable.nought_1);\n\t\t\tplayerSelectionButton.setImageResource(R.id.item_set_image, R.drawable.btn_check_on_focused_holo_light);\n\t\t}\n\n\t}", "public void animate(){\n\n if (ra1.hasStarted() && ra2.hasStarted()) {\n\n// animation1.cancel();\n// animation1.reset();\n// animation2.cancel();\n// animation2.reset();\n gear1Img.clearAnimation();\n gear2Img.clearAnimation();\n initializeAnimations(); // Necessary to restart an animation\n button.setText(R.string.start_gears);\n }\n else{\n gear1Img.startAnimation(ra1);\n gear2Img.startAnimation(ra2);\n button.setText(R.string.stop_gears);\n }\n }", "public void update() {\n\n\t\tif (speedX < 0) {\n\t\t\tcenterX += speedX;\n\t\t}\n\t\tif (speedX == 0 || speedX < 0) {\n\t\t\tbg1.setSpeedX(0);\n\t\t\tbg2.setSpeedX(0);\n\t\t}\n\t\tif (centerX <= 200 && speedX > 0) {\n\t\t\tcenterX += speedX;\n\t\t}\n\t\tif (speedX > 0 && centerX > 200) {\n\t\t\tscore+=speedX;\n\t\t\tbg1.setSpeedX(-moveSpeed / 5);\n\t\t\tbg2.setSpeedX(-moveSpeed / 5);\n\t\t}\n\n\t\t// Updates Y Position\n\t\tcenterY += speedY;\n\n\t\t// Handles Jumping\n\n\t\tspeedY += 1;\n\n\t\tif (speedY > 3) {\n\t\t\tjumped = true;\n\t\t}\n\n\t\t// Prevents going beyond X coordinate of 0\n\t\tif (centerX + speedX <= 60) {\n\t\t\tcenterX = 61;\n\t\t}\n\t\t//use characteristics of the new morph\n\t\tif(getMorph().equals(\"square\")){\n\t\t\tsquare();\n\t\t}if(getMorph().equals(\"circle\")){\n\t\t\tcircle();\n\t\t}if(getMorph().equals(\"balloon\")){\n\t\t\tballoon();\n\t\t}\n\t}", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "private void animateLeft(){\n if(frame == 1){\n setImage(run1_l);\n }\n else if(frame == 2){\n setImage(run2_l);\n }\n else if(frame == 3){\n setImage(run3_l);\n }\n else if(frame == 4){\n setImage(run4_l);\n }\n else if(frame == 5){\n setImage(run5_l);\n }\n else if(frame == 6){\n setImage(run6_l);\n }\n else if(frame == 7){\n setImage(run7_l);\n }\n else if(frame == 8){\n setImage(run8_l);\n frame =1;\n return;\n }\n frame ++;\n }", "public void initialize2() {\n\t\txHero1 = 10;\n\t\tinsecondmode=true;\n\t\tImageIcon bg = new ImageIcon(\"bg for one player.png\");\n\t\tBackground = (bg.getImage().getScaledInstance(bg.getIconWidth(), bg.getIconHeight(), Image.SCALE_DEFAULT));\n\t\tImageIcon[] in1 = new ImageIcon[12];\n\t\tin1[0] = new ImageIcon(\"\");\n\t\tin1[1] = new ImageIcon(\"\");\n\t\tin1[2] = new ImageIcon(\"\");\n\t\tin1[3] = new ImageIcon(\"\");\n\t\tin1[4] = new ImageIcon(\"\");\n\t\tin1[5] = new ImageIcon(\"\");\n\t\tin1[6] = new ImageIcon(\"\");\n\t\tin1[7] = new ImageIcon(\"\");\n\t\tin1[8] = new ImageIcon(\"\");\n\t\tin1[9] = new ImageIcon(\"\");\n\t\tin1[10] = new ImageIcon(\"\");\n\t\tin1[11] = new ImageIcon(\"\");\n\t\tImageIcon[] in2 = new ImageIcon[12];\n\t\tin2[0] = new ImageIcon(\"Hero02.png\");\n\t\tin2[1] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[2] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[3] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[4] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[5] = new ImageIcon(\"Hero02inj.png\");\n\t\tin2[6] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[7] = new ImageIcon(\"Hero02 Attack02.png\");\n\t\tin2[8] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[9] = new ImageIcon(\"Hero02 Defence.png\");\n\t\tin2[10] = new ImageIcon(\"Hero02 Attack01.png\");\n\t\tin2[11] = new ImageIcon(\"Hero02 Die.png\");\n\t\tImageIcon[] inBullet1 = new ImageIcon[3];\n\t\tinBullet1[0] = new ImageIcon(\"\");\n\t\tinBullet1[1] = new ImageIcon(\"\");\n\t\tinBullet1[2] = new ImageIcon(\"\");\n\t\tImageIcon[] inBullet2 = new ImageIcon[5];\n\t\tinBullet2[0] = new ImageIcon(\"20.png\");\n\t\tinBullet2[1]= new ImageIcon(\"50.png\");\n\t\tinBullet2[2]= new ImageIcon(\"100.png\");\n\t\tinBullet2[3]= new ImageIcon(\"200.png\");\n\t\tinBullet2[4]= new ImageIcon(\"500.png\");\n\t\tcannotdefend(1);\n\t\tHero1.settemplate(in2);\n\t\tHero2.settemplate(in1);\n\t\tBullet1.settemplate(inBullet2);\n\t\tBullet2.settemplate(inBullet1);\n\t\tHero1.setstatus(0);\n\t\tHero2.setstatus(0);\n\t}", "private void setSpritesPosition()\r\n\t{\r\n\t\tfloat w = Gdx.graphics.getWidth();\r\n\t\tfloat h = Gdx.graphics.getHeight();\r\n\t\t\r\n\t\tsetX(camera.position.x-camera.viewportWidth/2 + 0.1f * camera.viewportWidth/2);\r\n\t\tsetY(camera.position.y + camera.viewportHeight/2 - 0.15f*w/h* camera.viewportHeight/2);\r\n\t\theroHealth.setX(getX());\r\n\t\theroHealth.setY(getY());\r\n\t\t\r\n\t\tcover.setX(getX() + 10f/270f * heroHealth.getWidth());\r\n\t\tcover.setY(getY());\r\n\t\t\r\n\t}", "public interface SpriteInterface {\n\n\n void start();\n\n\n void update(double timeChange);\n\n\n void draw();\n\n void changeLocation(float xPos, float yPos, float rotation, float scaleX, float scaleY);\n\n\n}", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "public void drawAnimationAtStart(){\n animationThread = new AnimationThread(this.getGraphics(), getWidth(), getHeight());\n animationThread.start();\n music.playAudio(\"LoadingScreenMusic\");\n musicName = \"LoadingScreenMusic\";\n }", "public void nextIcon() {\n Profile profile = null;\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n playerIcon.setOpacity(1);\n currentIndex++;\n if (currentIndex == 0) {\n playerIcon.setImage(icon0);\n } else if (currentIndex == 1) {\n playerIcon.setImage(icon1);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 2) {\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n playerIcon.setImage(icon2);\n\n } else if (currentIndex == 3) {\n playerIcon.setImage(icon3);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 4) {\n playerIcon.setImage(icon4);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 5) {\n playerIcon.setImage(icon5);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 6) {\n playerIcon.setImage(icon6);\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerIcon.setOpacity(0.5);\n }\n\n } else if (currentIndex == 7) {\n playerIcon.setImage(icon0);\n currentIndex = 0;\n playerIcon.setOpacity(1);\n }\n }", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "@Override\n\tpublic void play(String position, int number) {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tfloat delta = Gdx.graphics.getDeltaTime();\n\t\ti+= delta;\n\t\timage.setRegion(animation.getKeyFrame(i, true));\n\t\t//this.getSpriteBatch().draw(animation.getKeyFrame(i, true), 0, 0);\n\t\t\n\t\tGdx.app.log(\"tag\", \"delta = \" + i);\n\t\t\n\t\tsuper.draw();\n\t}", "@Override\r\n\t\t\tpublic void onClick(ButtonSprite button, float arg1, float arg2) {\n\r\n\t\t\t\tif (button == settingBtn) {\r\n\t\t\t\t\tif (isSetting) {\r\n\t\t\t\t\t\tisSetting = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tisSetting = true;\r\n\t\t\t\t\t\tMainActivity.playScene.pauseGame();\r\n\t\t\t\t\t\tbgSettingSpr.setVisible(true);\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (button == musicBtn) {\r\n\t\t\t\t\tif (ConfigManager.IS_MUSIC) {\r\n\t\t\t\t\t\tConfigManager.IS_MUSIC = false;\r\n\t\t\t\t\t\tif (MainActivity.playScene.bgMusic.isPlaying()) {\r\n\t\t\t\t\t\t\tMainActivity.playScene.bgMusic.stop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tConfigManager.IS_MUSIC = true;\r\n\t\t\t\t\t\tMainActivity.playScene.bgMusic.play();\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(0);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (button == soundBtn) {\r\n\t\t\t\t\tif (ConfigManager.IS_SOUND) {\r\n\t\t\t\t\t\tConfigManager.IS_SOUND = false;\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tConfigManager.IS_SOUND = true;\r\n\t\t\t\t\t\tbutton.setCurrentTileIndex(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}" ]
[ "0.70878583", "0.69015896", "0.67097086", "0.6704027", "0.6672027", "0.660056", "0.6465981", "0.64309597", "0.63455164", "0.6295347", "0.62840104", "0.62446034", "0.62004274", "0.6062895", "0.5998375", "0.59937114", "0.59782857", "0.59712934", "0.59588695", "0.5909672", "0.5908782", "0.5908545", "0.5905622", "0.59034306", "0.5902721", "0.5877797", "0.5872879", "0.58662486", "0.58491516", "0.58464867", "0.5844133", "0.58207655", "0.5799737", "0.5792276", "0.5791722", "0.57914287", "0.5790476", "0.57897574", "0.5780099", "0.577785", "0.5756621", "0.57256454", "0.57235086", "0.5714052", "0.57133746", "0.5696889", "0.569232", "0.5690211", "0.56855416", "0.56563455", "0.5655361", "0.56553286", "0.5641703", "0.56339747", "0.5630595", "0.5628635", "0.56273013", "0.56270427", "0.56227493", "0.56225276", "0.56097674", "0.5607866", "0.560615", "0.5601507", "0.55930597", "0.5587829", "0.55876446", "0.55824083", "0.55797195", "0.55775577", "0.55771357", "0.55723387", "0.5571639", "0.5558141", "0.5553496", "0.55488", "0.5545363", "0.5540874", "0.5540206", "0.55395126", "0.5539403", "0.5536669", "0.5531747", "0.5529337", "0.55262697", "0.55233806", "0.5519899", "0.5518016", "0.55149686", "0.55126417", "0.5511915", "0.55098003", "0.55062777", "0.54941416", "0.54935706", "0.5491474", "0.54903984", "0.5485538", "0.5479626", "0.547902", "0.54785603" ]
0.0
-1
called through update method to bypass the 'hidden' variable that stops a player from being rendered
public void spawnTimeRender(Renderer screen) { if (respawns == 0) font.render("YOU LOSE", this.getX()-((8*8)/2), this.getY(), true, 0xffffffff, screen, true); else font.render("Respawn: "+respawnRender+"...", this.getX()-((13*8)/2), this.getY(), true, 0xffffffff, screen, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void makeHidden(Player viewer) {\n \n }", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "@Override\r\n public void onGameStart(){\r\n this.setVisible(false);\r\n }", "@Override\n public void hide() {\n if (!unit.player.isPlayerDead) {\n MyPreference.setIsNewGame(false);\n saves.Save();\n }\n GameController.allFalse();\n dispose();\n }", "public int overrideHidden(EntityPlayer player) {\n return 0;\n }", "public void hide() {\n energy = 0;\n redBull = 1;\n gun = 0;\n target = 1;\n }", "@Override\n\tpublic void hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}", "public void stopPlaying() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tisPlaying = false;\n\t\tupdateView();\n\t}", "public void stopShowing(Player player){\n\t\tFeatherBoardAPI.removeScoreboardOverride(player,\"build-battle-game\");\n\t}", "public void resetSeeing(Player player) {\n Debuggle.log(\"Resetting visibility on \" + player.getName());\n if (VanishPerms.canSeeAll(player)) {\n \tBungeeHelper.setSeeState(player, true);\n this.showVanished(player);\n Debuggle.log(\"Showing all to \" + player.getName());\n } else {\n \tBungeeHelper.setSeeState(player, false);\n this.hideVanished(player);\n Debuggle.log(\"Hiding all to \" + player.getName());\n }\n }", "public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}", "public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }", "public void playerMissedBall(){ active = false;}", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "public void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\r\n\t\tif (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {\r\n\t\t\tthis.mc.thePlayer.closeScreen();\r\n\t\t}\r\n\t}", "public void makeInvisible()\n {\n wall.makeInvisible();\n roof.makeInvisible();\n window.makeInvisible();\n }", "public void play() {\n\t\tpanel.remove(easy);\n\t\tpanel.remove(hard);\n\t\tdown.setVisible(true);\n\t\tmarket.setVisible(true);\n\t\tinfo.setVisible(true);\n\t}", "@Override\n public void onClick(View v) {\n \t\t croa.setVisibility(View.INVISIBLE);\n \t dancea.setVisibility(View.INVISIBLE);\n \t\t kfja.setVisibility(View.INVISIBLE);\n \t\t starters.setVisibility(View.VISIBLE);\n \t\t smia.setVisibility(View.INVISIBLE);\n \t\t diz1.setVisibility(View.INVISIBLE); \n \t\t diz2.setVisibility(View.INVISIBLE);\n \t\t plaa.setVisibility(View.INVISIBLE);\n \t\t starteres.setVisibility(View.VISIBLE);\n \t\t diz3.setVisibility(View.INVISIBLE); \n \t\t diz4.setVisibility(View.INVISIBLE);\n \t\t tjza.setVisibility(View.INVISIBLE);\n \t\t b = 0 ;\n \t\t player.stop();\n \t }", "@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"Hidden\");\n\n\t}", "public void makeInvisible() {\n\t\t\n\t\theadShape.setVisible(false);\n\t\tspine.setVisible(false);\n\t\tleftArmLine.setVisible(false);\n\t\trightArmLine.setVisible(false);\n\t\tleftLegLine.setVisible(false);\n\t\trightLegLine.setVisible(false);\n\t\tplayAgain.setVisible(false);\n\t\trevealLabel.setVisible(false);\n\t\t\n\t\t\n\t}", "public void unRender() {\n\t\tif (this.isPlaying) {\n\t\t\ttry {\n\t\t\t\tthis.mMediaPlayer.stop();\n\t\t\t\tLog.w(\"AUDIO PLAYER\", \"should have just stopped\");\n\t\t\t} catch (IllegalStateException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "private void stop(){ player.stop();}", "@Override\n\tpublic void hide() {\n\t\tGdx.app.log(\"GameScreen\", \"hide called\"); \n\t}", "@Override\n public void valueChanged(Boolean control_val) {\n samplePlayer.pause(!control_val);\n\n // if we are going to play, we will create the updateThread, otherwise we will kill it\n\n if (control_val){\n // create a new thread if one does not exists\n if (updateThread == null) {\n updateThread = createUpdateThread();\n }\n }\n else\n {\n // if we have a thread, kill it\n if (updateThread != null)\n {\n updateThread.interrupt();\n updateThread = null;\n }\n }\n\n // Write your DynamicControl code above this line \n }", "void show() {\n if (!isDead) {\n for (int i = 0; i < bullets.size(); i++) {//show bullets\n bullets.get(i).show();\n }\n if (immortalityTimer >0) {//no need to decrease immortalityCounter if its already 0\n immortalityTimer--;\n }\n\n if (immortalityTimer >0 && floor(((float)immortalityTimer)/5)%2 ==0) {//needs to appear to be flashing so only show half of the time\n } else {\n\n Constants.processing.pushMatrix();\n Constants.processing.translate(this.position.x, this.position.y);\n Constants.processing.rotate(rotation);\n\n //actually draw the player\n Constants.processing.fill(0);\n Constants.processing.noStroke();\n Constants.processing.beginShape();\n int size = 12;\n\n //black triangle\n Constants.processing.vertex(-size - 2, -size);\n Constants.processing.vertex(-size - 2, size);\n Constants.processing.vertex(2 * size - 2, 0);\n Constants.processing.endShape(CLOSE);\n Constants.processing.stroke(255);\n\n //white out lines\n Constants.processing.line(-size - 2, -size, -size - 2, size);\n Constants.processing.line(2 * size - 2, 0, -22, 15);\n Constants.processing.line(2 * size - 2, 0, -22, -15);\n if (boosting) {//when boosting draw \"flames\" its just a little triangle\n boostCount--;\n if (floor(((float)boostCount)/3)%2 ==0) {//only show it half of the time to appear like its flashing\n Constants.processing.line(-size - 2, 6, -size - 2 - 12, 0);\n Constants.processing.line(-size - 2, -6, -size - 2 - 12, 0);\n }\n }\n Constants.processing.popMatrix();\n }\n }\n for (int i = 0; i < asteroids.size(); i++) {//show asteroids\n asteroids.get(i).show();\n }\n }", "private void pause() { player.pause();}", "public void hideUnpauseButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_UNPAUSE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "@Override\n\tpublic void render() {\n\t\t// only render it when visible is true\n\t\tif (visible == false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tsuper.render();\n\t\t}\n\t}", "abstract void onHidden();", "@Override\n\tpublic void onInvisible() {\n\n\t}", "@Override\n public void gameOver() {\n messagePanel.showMessage(image);\n setEnabled(false);\n }", "public void onCustomViewHidden() {\n mTimer.cancel();\n mTimer = null;\n if (mVideoView.isPlaying()) {\n mVideoView.stopPlayback();\n }\n if (isVideoSelfEnded)\n mCurrentProxy.dispatchOnEnded();\n else\n mCurrentProxy.dispatchOnPaused();\n\n // Re enable plugin views.\n mCurrentProxy.getWebView().getViewManager().showAll();\n\n isVideoSelfEnded = false;\n mCurrentProxy = null;\n mLayout.removeView(mVideoView);\n mVideoView = null;\n if (mProgressView != null) {\n mLayout.removeView(mProgressView);\n mProgressView = null;\n }\n mLayout = null;\n }", "@Override\r\n public void onGameEnded() {\r\n this.setVisible(true);\r\n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "public void onCompletion(MediaPlayer mediaPlayer) {\n mVisualizer.setEnabled(false);\n }", "public void setNotVisibleIfNotBlockedAndReplaced() {\n\t\tif (!isBlocked && getReplacementAttribute() == null) {\n\t\t\tthis.isVisible = false;\n\t\t}\n\t}", "public void onPlayerPause() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tplay.setVisibility(View.VISIBLE);\n\t\t\t\tpause.setVisibility(View.GONE);\n\t\t\t}\n\t\t});\n\t}", "public void hide() {\n hidden = true;\n }", "private void videoVisible() {\n }", "private void showPlayerOptions() {\n playStartLinearLayout.setVisibility(View.INVISIBLE);\n timeInfoLinearLayout.setVisibility(View.INVISIBLE);\n gsOpenPlayImage.setVisibility(View.VISIBLE);\n\n\n }", "@Override\n protected void freeUpdate()\n {\n if (raceStarted)\n dragRacePanel.updateGameImage();\n\n /* Repaint panel */\n dragRacePanel.repaint();\n }", "public void freeze()\r\n\t\t{\r\n\t\tpause.setEnabled(false);\r\n\t\t}", "public void reducePlayerLive() {\n if (live > 1) {\n // make live bottle fall\n StillAtlasActor liveBottleActor = new StillAtlasActor(0, 0, BSGame.atlas1.findRegion(\"live\"));\n liveBottleActor.setPosition(BSGame.gw - liveBottleActor.getWidth() - BSGame.as.pt(10.0f), BSGame.gh - liveBottleActor.getHeight());\n uiStage.addActor(liveBottleActor);\n liveBottleActor.addAction(Actions.sequence(Actions.moveTo(liveBottleActor.getX(), -liveBottleActor.getHeight(), 2.0f), Actions.run(() -> {\n liveBottleActor.remove();\n })));\n BSGame.bottleBreakSound.play(1.0f);\n }\n liveActor.decreaseLive(--live);\n }", "public void disableUpdate() {\n\t\tupdate = false;\n\t}", "public void hide() {\n\t\thidden = true;\n\t}", "public abstract void hideSidebar(Player player);", "public void vanish() {\n\t\t\r\n\t\tlpanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tchecker.setEnabled(false);\r\n\t\t\t\tchecker.setVisible(false);\r\n\t\t\t\trequestL.setEnabled(false);\r\n\t\t\t\trequestL.setVisible(false);\r\n\t\t\t\tpatientL.setEnabled(false);\r\n\t\t\t\tpatientL.setVisible(false);\r\n\t\t\t\treport.setEnabled(false);\r\n\t\t\t\treport.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t}", "@Override\n\tpublic boolean isGamePlayScreen () {\n\t\treturn false;\n\t}", "@Override\n\tpublic void show() {\n\t worldRenderer = new WorldRenderer(game);\n\t\tGdx.input.setCatchBackKey(true);\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void landedOn(Player player) {}", "public void acivatePlayer() {\n\t\tthis.setEnabled(true);\n\t}", "public boolean needPlayer() {\n\t\treturn false;\n\t}", "void reset() {\n setVisible(false);\n myJumpedOver = false;\n }", "public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }", "public void hidePauseButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_PAUSE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "public boolean isHidden() {\n return false;\n }", "void paused() {\n\t\tif (playing) {\n\n\t\t\t// replaces cannon with explosion\n\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\tdeadcannon.pos_y = cannon.pos_y;\n\n\t\t\t// replaces cannon in center\t\t\t\n\t\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT);\n\n\t\t\t//resets the rest\n\t\t\tbullet = null;\n\t\t\tshot1 = null;\n\t\t\tshot2 = null;\n\t\t\tdead = false;\n\t\t\trepaint();\n\t\t}\n\t}", "@Override\n\tpublic void hide() {\n\t\t((InputMultiplexer)Gdx.input.getInputProcessor()).removeProcessor(ui);\n\t}", "public void setSinglePlayer(){\n isSinglePlayer = true;\n }", "@Override\r\n\tpublic void display() {\n\t\tif (silenced.contains(caster))\r\n\t\t\tdead = true;\r\n\t\tif (lastloc == null)\r\n\t\t\tlastloc = loc;\r\n\t\tdir = loc.toVector().subtract(lastloc.toVector());\r\n\t\tif (speed > 2)\r\n\t\t\tParUtils.dropItemEffectVector(loc.clone().add(0,1,0), Material.CACTUS, 1,1, 1,dir);\r\n\t\t\t\r\n\t\t\t//ParUtils.createFlyingParticle(Particles.CRIT, loc.clone().add(0,2.5,0), 0, 0, 0, 1, 5, dir.normalize());\r\n\t\t//ParUtils.createRedstoneParticle(loc.clone().add(0,2.5,0), 0.5,0.5, 0.5, 1, Color.GREEN, 1.5F);\r\n\t}", "private void setupPlayerUI() {\r\n // for now hide the player\r\n setPlayerVisible(false);\r\n\r\n // disable unnecesary buttons\r\n setButtonEnabled(mButtonPlayerSeekBackward, false);\r\n setButtonEnabled(mButtonPlayerSeekForward, false);\r\n setButtonEnabled(mButtonPlayerSkipBackward, false);\r\n\r\n setButtonEnabled(mButtonPlayerRepeat, false);\r\n }", "public void disableControls() // Disable the game's controls when needed.\n\t{\n\t\tfor (MutablePocket thisPocket: playerPockets) // Disable each control in turn.\n\t\t{\n\t\t\tthisPocket.disablePocket();\n\t\t}\n\n\t\tfor(ImmutablePocket thisPocket: goalPockets)\n\t\t{\n\t\t\tthisPocket.disablePocket();\n\t\t}\t\t\n\t}", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif(flagD && !flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = -1;\n\t\t\t\t} else if(flagD && flagA) {\n\t\t\t\t\tplayer.velocityX = 1;\n\t\t\t\t} else if(!flagA && !flagD) {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t}\n\t\t\t\t//Flags W & S\n\t\t\t\tif(flagS && !flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = -1;\n\t\t\t\t} else if(flagS && flagW) {\n\t\t\t\t\tplayer.velocityY = 1;\n\t\t\t\t} else if(!flagW && !flagS) {\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tplayer.velocityX = 0;\n\t\t\t\t\tplayer.velocityY = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayer.setTranslateX(player.getTranslateX() + player.velocityX);\n\t\t\t\tplayer.setTranslateY(player.getTranslateY() + player.velocityY);\n\t\t\t\t\n\t\t\t\tif(collision(player, player2)) {\n\t\t\t\t\tplayer.setFill(Color.YELLOW);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tplayer.setFill(Color.BLACK);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void onPlayerPlay() {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tplay.setVisibility(View.GONE);\n\t\t\t\tpause.setVisibility(View.VISIBLE);\n\t\t\t\tsetCurrentTrack();\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n public void hide() {\r\n bgMusic.pause();\r\n }", "public void removeFromGame(){\n this.isInGame = false;\n }", "@Override\n\tpublic void hide() {\n\t\thits.remove();\n\t\ttimeLeft.remove();\n\t\tdarken.remove();\n\t\tcontainer.remove();\n\t\ttimer = null;\n\t\ttrainingBag = null;\n\t}", "public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}", "public void disable()\n\t{\n\t\tplayButton.setEnabled(false);\n\t\tpassButton.setEnabled(false);\n\t\tbigTwoPanel.setEnabled(false);\n\t}", "public void waitingMissingPlayer() {\r\n\r\n\t\tthis.waitingPanel = new WaitingForPlayerPanel(this);\r\n\t\tgameFrame.add(waitingPanel);\r\n\t\tmultiplayerPanel.setVisible(false);\r\n\t\tgameFrame.pack();\r\n\t\tgameFrame.setVisible(true);\r\n\t\tgameFrame.repaint();\r\n\t}", "@Override\n public void update(){\n super.update();\n if(getPositionY() < -2.f){\n setAngleXYDeltaTheta(0.0f);\n setAngleXY(0.0f);\n setPositionY(1.0f);\n setDy(0.0f);\n setDx(0.0f);\n setInPlay(true);\n }\n }", "private void customUpdateView() {\n\t\tpbrLoading.setVisibility(View.GONE);\n\t\tif (isPlaying()) {\n\t\t\tgifVoiceLoader.setVisibility(View.VISIBLE);\n\t\t\timgPlay.setVisibility(View.GONE);\n\t\t} else {\n\t\t\tgifVoiceLoader.setVisibility(View.GONE);\n\t\t\timgPlay.setVisibility(View.VISIBLE);\n\t\t}\n\t\timgPlay.setImageResource(getPlayImageResId());\n\t\tgifVoiceLoader.setGifImageResourceID(getVoiceLoderGif());\n\t\ttxtButtonCaption.setText(getText());\n\n\t}", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "@Override\n public void wasHidden() {\n hide();\n }", "@SuppressWarnings(\"deprecation\")\n private void update(Player player) {\n Team team = teams.getTeam(player);\n\n if (team == null) {\n for (Player online : game.getPlayers()) {\n player.showPlayer(online);\n online.showPlayer(player);\n }\n return;\n }\n\n for (Player online : game.getPlayers()) {\n if (team.hasPlayer(online)) {\n player.hidePlayer(online);\n online.hidePlayer(player);\n } else {\n player.showPlayer(online);\n online.showPlayer(player);\n }\n }\n }", "public void hide() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = false;\n\t}", "public void stopPlaying() {\n \t\tisPlaying = false;\n \t}", "@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }", "public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}", "public void drawPlayer(){\n Player player = world.getPlayer();\n if(player.isGod()) {\n spriteBatch.draw(fadedPlayerTexture,player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n } else {\n spriteBatch.draw(playerTexture, player.getPosition().x * ppuX, player.getPosition().y * ppuY,\n player.WIDTH * ppuX, player.HEIGHT * ppuY);\n }\n }", "private void setGameStatus() {\n this.gameStatus = false;\n }", "public void setHidden(boolean arg0) {\n\n\t}", "@Override\n public void hide() {\n Gdx.input.setOnscreenKeyboardVisible(false);\n super.hide();\n }", "public int hideTurtle () {\n myTurtleShowing = false;\n return 0;\n }", "private void makeGUIVisible(){\n gameState = GameState.LOAD;\n notifyObservers();\n }", "@Override\n public boolean isVisible()\n {\n return !this.isDead();\n }", "public void updateInformation() {\r\n onFirstCycle = false;\r\n lastLocation = player.getLocation();\r\n preparedAppearance = false;\r\n }", "public void playerLost()\r\n {\r\n \r\n }", "private void setWhitePlayer(Player player) {\r\n\t\tthis.whitePlayer = player;\r\n\t}", "@Override\n public boolean canUpdate() { return false; }", "public void hide() {\n visible=false;\n }", "public void afterShow() {\n\t\tplayer1.afterShow();\n\t\tplayer2.afterShow();\n\t\t\n\t\tfor (int i = 0; i < cartouchesPlayer.size(); i++) {\n\t\t\tcartouchesPlayer.get(i).loadWaveform();\n\t\t}\n\t}", "void update(){\n\t\topacity -= (float)(1.0/(wakeStrength + 1));\n\t\twakeLife--;\n\t}", "private Boolean infect( Player player ){\n try {\n player.setHealth( false );\n return true;\n } catch (Exception e) {\n System.out.println(\"Something went wrong.\");\n return false;\n }\n }", "public void disableMonsters(){\n enabled = false;\n }", "public void hidePanelToNewPlayList() {\n\t\tjpIntroduceNameList.setVisible(false);\n\t}", "public void dontMove() {\r\n\t\tspeed = 0;\r\n\t\tif(!playerNear().equals(\"n\")) {\r\n\t\t\tif(playerNear().equals(\"left\")) {\r\n\t\t\t\tsetIcon(leftImage);\r\n\t\t\t}\r\n\t\t\telse if(playerNear().equals(\"right\")) {\r\n\t\t\t\tsetIcon(rightImage);\r\n\t\t\t}\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public boolean isHidden() {\n\t\treturn false;\n\t}", "public void unpause() {\n\t\t// Move the real time clock up to now\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmLastTime = System.currentTimeMillis() + 100;\n\t\t}\n\t\tsetState(GameState.RUNNING_LVL);\n\t}" ]
[ "0.7231107", "0.706599", "0.68959653", "0.6844065", "0.66111934", "0.64305514", "0.63423324", "0.6302746", "0.62571436", "0.6213328", "0.619466", "0.6173173", "0.6170801", "0.6161039", "0.61233234", "0.6119352", "0.61131436", "0.6109622", "0.6086163", "0.6083133", "0.6081249", "0.606451", "0.6064489", "0.60608065", "0.6052072", "0.60517657", "0.6048288", "0.6048039", "0.6037881", "0.6026059", "0.6015253", "0.5996908", "0.59910727", "0.59851706", "0.5965867", "0.59642625", "0.59499586", "0.5940166", "0.5936548", "0.59341055", "0.59136045", "0.59134185", "0.59127", "0.59004897", "0.58895713", "0.58826655", "0.5880148", "0.5876534", "0.5872903", "0.5860869", "0.5860651", "0.58566856", "0.58546555", "0.58505964", "0.5846888", "0.5838816", "0.5837812", "0.5836236", "0.58350563", "0.58335584", "0.58282566", "0.58221275", "0.5812246", "0.5805757", "0.5798261", "0.57954234", "0.57924736", "0.5792257", "0.57727516", "0.57719684", "0.5769229", "0.5764475", "0.5760853", "0.5758221", "0.5755037", "0.57507783", "0.57393056", "0.57330644", "0.5732343", "0.5722379", "0.57215905", "0.571866", "0.5715265", "0.5714963", "0.5708205", "0.5699772", "0.56994873", "0.5697398", "0.5694492", "0.5694373", "0.56933075", "0.5689112", "0.56884146", "0.56875896", "0.5684721", "0.56832975", "0.5677698", "0.5670875", "0.56707007", "0.5667049", "0.5666877" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Configuracion)) { return false; } Configuracion other = (Configuracion) object; if ((this.idconfiguracion == null && other.idconfiguracion != null) || (this.idconfiguracion != null && !this.idconfiguracion.equals(other.idconfiguracion))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
/ renamed from: a
public final void mo4887a(Object obj) { this.f15618a.mo18101q2((ErrorBundle) obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
config embedded Jetty server
public static void main(String[] args) { EmbeddedServers.add(EmbeddedServers.Identifiers.JETTY, (Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean hasMultipleHandler) -> { JettyHandler handler = setupHandler(routeMatcher, staticFilesConfiguration, hasMultipleHandler); customJettyServerFactory serv = new customJettyServerFactory(); return new EmbeddedJettyServer(serv, handler); }); port(80); Options op = new Options(); op.setOptions(args); //LabelCreator labels = new LabelCreator(op); staticFiles.location("/public"); // Static (web accessible) files (e.g. CSS files etc.) can be placed in src/main/resources/public staticFiles.header("Access-Control-Allow-Origin", "*"); // static files can be accessed from anywhere staticFiles.header("Access-Control-Allow-Headers", "*"); // static files can be accessed from anywhere // any empty action will be redirected to the API documentation redirect.any("/", "/labels/"+API_VERSION+"/"); redirect.any("/labels", "/labels/"+API_VERSION+"/"); redirect.any("/labels/", "/labels/"+API_VERSION+"/"); redirect.any("/labels/"+API_VERSION, "/labels/"+API_VERSION+"/"); options("/*", (req, res) -> { String accessControlRequestHeaders = req.headers("Access-Control-Request-Headers"); if (accessControlRequestHeaders != null) { res.header("Access-Control-Allow-Headers", accessControlRequestHeaders); } String accessControlRequestMethod = req.headers("Access-Control-Request-Method"); if (accessControlRequestMethod != null) { res.header("Access-Control-Allow-Methods", accessControlRequestMethod); } return "OK"; }); try { // Build swagger json description final String swaggerJson = SwaggerParser.getSwaggerJson(APP_PACKAGE); get("/labels/"+API_VERSION+"/", (req, res) -> { // TODO: redirect the Swagger JSON to a Swagger UI instance instead of returning it e.g. redirect.any("/test", "http://petstore.swagger.io"); res.header("Content-Type", "application/json"); return swaggerJson;//.replace(oldChar, newChar); }); } catch (Exception e) { System.err.println(e); e.printStackTrace(); } // Routes other than default Swagger documentation path("/labels", () -> { path("/"+API_VERSION, () -> { get("/static/*", (req, res) -> { AccessStatic c = new AccessStatic(op, req, res); return c.result(); }); post("/", (req, res) -> { if(req.queryParams("template")==null || req.queryParams("template").isEmpty()) { //res.redirect("/labels/"+API_VERSION+"/template/choose", 303); TemplateCreator tmpl = new TemplateCreator(op); //tmpl.baseURL = "http://"+req.host(); tmpl.target = tmpl.baseURL+ req.pathInfo(); tmpl.origReq = req; return tmpl.chooseTemplateForm(); } else { String format = req.queryParams("format"); String data = req.queryParams("data"); //op.baseURL = "http://"+req.host() + req.pathInfo(); //op.baseURL = op.baseURL + req.pathInfo(); if(format==null || format.isEmpty()) format="html"; if(format.equalsIgnoreCase("html")) try { CreateHTML c = new CreateHTML(op, req, res); String re = c.result(); return re; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } if(format.equalsIgnoreCase("pdf")) try { CreatePDF c = new CreatePDF(op, req, res); return c.result(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } return "3rror"; }); get("/tmp", (req, res) -> { AccessTmp c = new AccessTmp(op, req, res); return c.result(); }); try { CreatePDFRoute.route(op); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } try { CreateHTMLRoute.route(op); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } try { AccessTmpRoute.route(op); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } // TODO: Metadata about existing templates // @route /templates/ => get a list of all existing templates // @route /template/{id} => get a specific template with unique list of included placeholders and path to html file path("/template", () -> { get("/show", (req, res) -> { res.header("Content-Type", "text/html"); if(req.queryParams("template")!=null) op.templateFile = op.templateDir+"/"+req.queryParams("template"); String html = ""; File file = new File(op.templateFile); FileInputStream fis; if(file.exists()) { fis = new FileInputStream(file); byte[] data = new byte[(int) file.length()]; fis.read(data); fis.close(); html = new String(data, "UTF-8"); }; res.body(html); return res.body(); }); get("/show/all", (req, res) -> { res.header("Content-Type", "application/json"); res.body(new TemplateCreator(op).getTemplates().toString()); return res.body(); }); }); get("/check", (req, res)-> { byte[] bytes = Files.readAllBytes(Paths.get("templates/submit.html")); HttpServletResponse raw = res.raw(); raw.getOutputStream().write(bytes); raw.getOutputStream().flush(); raw.getOutputStream().close(); return res.raw(); }); // TODO: set option for configuring Allow-Origin through config.ini before((req, res) -> { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin,"); }); // TODO: make template editable (e.g. with (static) implementation of WYSIWYG Aloha Editor (http://alohoeditor.org)) // get("/template/edit", (req, res) -> { // @param Sting template: name of the template // } // TODO: save template (e.g. by sending the (full) DOM of the template edited by Aloha Editor (http://alohoeditor.org)) // get("/template/save", (req, res) -> { // @param String template: name of the (new) template // @param Boolean overwrite: what to do if template name already exists // } /* get("/json", (req, res) -> { byte[] bytes = Files.readAllBytes(Paths.get("templates/data.json")); HttpServletResponse raw = res.raw(); raw.addHeader("Content-Type", "application/json"); raw.getOutputStream().write(bytes); raw.getOutputStream().flush(); raw.getOutputStream().close(); return res.raw(); }); */ }); }); if(op.debug) enableDebugScreen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() throws IOException, ServletException, URISyntaxException {\n\n LOG.info(\"Initializing the internal Server\");\n Log.setLog(new Slf4jLog(Server.class.getName()));\n\n /*\n * Create and configure the server\n */\n this.server = new Server();\n this.serverConnector = new ServerConnector(server);\n this.serverConnector.setReuseAddress(Boolean.TRUE);\n\n LOG.info(\"Server configure ip = \" + DEFAULT_IP);\n LOG.info(\"Server configure port = \" + DEFAULT_PORT);\n\n this.serverConnector.setHost(DEFAULT_IP);\n this.serverConnector.setPort(DEFAULT_PORT);\n this.server.addConnector(serverConnector);\n\n /*\n * Setup the basic application \"context\" for this application at \"/iop-node\"\n */\n this.servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);\n this.servletContextHandler.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH);\n this.server.setHandler(servletContextHandler);\n\n /*\n * Initialize webapp layer\n */\n WebAppContext webAppContext = new WebAppContext();\n webAppContext.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH);\n\n URL webPath = JettyEmbeddedAppServer.class.getClassLoader().getResource(\"web\");\n LOG.info(\"webPath = \" + webPath.getPath());\n\n webAppContext.setResourceBase(webPath.toString());\n webAppContext.setContextPath(JettyEmbeddedAppServer.DEFAULT_CONTEXT_PATH+\"/web\");\n webAppContext.addBean(new ServletContainerInitializersStarter(webAppContext), true);\n webAppContext.setWelcomeFiles(new String[]{\"index.html\"});\n webAppContext.addFilter(AdminRestApiSecurityFilter.class, \"/rest/api/v1/admin/*\", EnumSet.of(DispatcherType.REQUEST));\n webAppContext.setInitParameter(\"org.eclipse.jetty.servlet.Default.dirAllowed\", \"false\");\n servletContextHandler.setHandler(webAppContext);\n server.setHandler(webAppContext);\n\n /*\n * Initialize restful service layer\n */\n ServletHolder restfulServiceServletHolder = new ServletHolder(new HttpServlet30Dispatcher());\n restfulServiceServletHolder.setInitParameter(\"javax.ws.rs.Application\", JaxRsActivator.class.getName());\n restfulServiceServletHolder.setInitParameter(\"resteasy.use.builtin.providers\", \"true\");\n restfulServiceServletHolder.setAsyncSupported(Boolean.TRUE);\n webAppContext.addServlet(restfulServiceServletHolder, \"/rest/api/v1/*\");\n\n this.server.dump(System.err);\n\n }", "@Override protected void configureServlets() {\n serveRegex(\"^/(?!_ah).*\").with(HandlerServlet.class);\n // serves xmpp urls\n serveRegex(\"/_ah/xmpp/.*\").with(HandlerServlet.class);\n }", "public static void main(String[] args) throws Exception {\n\n\t\tServer server = new Server(8080);\n\n\t\tWebAppContext bb = new WebAppContext();\n\t\tbb.setServer(server);\n\n\t\tbb.addFilter(GuiceFilter.class, \"/*\", EnumSet.allOf(DispatcherType.class));\n\n\t\tServletHolder holder = bb.addServlet(ServletContainer.class, \"/*\");\n\t\tholder.setInitParameter(\"javax.ws.rs.Application\", \"net.ludeke.rest.jersey.MyApplication\");\n\n\t\tbb.addServlet(holder, \"/*\");\n\t\tbb.setContextPath(\"/\");\n\t\tbb.setWar(\"src/main/webapp\");\n\n\t\tserver.setHandler(bb);\n\n\t\ttry {\n\t\t\tSystem.out.println(\">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP\");\n\t\t\tserver.start();\n\t\t\twhile (System.in.available() == 0) {\n\t\t\t\tThread.sleep(5000);\n\t\t\t}\n\t\t\tserver.stop();\n\t\t\tserver.join();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(100);\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }", "public synchronized static JettyEmbeddedAppServer getInstance() {\n if (instance == null) {\n instance = new JettyEmbeddedAppServer();\n }\n return instance;\n }", "public static void main(String... args) throws IOException {\r\n\r\n checkDatabaseConnectivity();\r\n checkServerProperties();\r\n checkSchedulerProperties();\r\n server = new Server(port);\r\n\r\n try {\r\n ServletContextHandler context = new ServletContextHandler(\r\n ServletContextHandler.SESSIONS\r\n | ServletContextHandler.SECURITY);\r\n\r\n context.setInitParameter(\r\n \"org.eclipse.jetty.servlet.SessionIdPathParameterName\",\r\n \"none\");\r\n\r\n context.setContextPath(\"/\");\r\n context.setSecurityHandler(setUpSecurityHandler());\r\n AppServlet.getInstance().setLoginService(\r\n (HashLoginService) context.getSecurityHandler()\r\n .getLoginService());\r\n\r\n context.addServlet(new ServletHolder(AppServlet.getInstance()),\r\n \"/*\");\r\n context.addServlet(new ServletHolder(UserServlet.getInstance()),\r\n \"/users/*\");\r\n context.addServlet(new ServletHolder(ModuleServlet.getInstance()),\r\n \"/modules/*\");\r\n context.addServlet(new ServletHolder(RoomServlet.getInstance()),\r\n \"/rooms/*\");\r\n context.addServlet(\r\n new ServletHolder(EquipmentServlet.getInstance()),\r\n \"/equipment/*\");\r\n context.addServlet(\r\n new ServletHolder(TimeframeServlet.getInstance()),\r\n \"/timeframe/*\");\r\n context.addServlet(\r\n new ServletHolder(SchedulerServlet.getInstance()),\r\n \"/scheduler/*\");\r\n\r\n ContextHandler fileHandler = new ContextHandler();\r\n fileHandler.setContextPath(\"/resources\");\r\n ResourceHandler resourceHandler = new ResourceHandler();\r\n resourceHandler.setResourceBase(\"site/resources\");\r\n fileHandler.setHandler(resourceHandler);\r\n\r\n ContextHandlerCollection contexts = new ContextHandlerCollection();\r\n contexts.setHandlers(new Handler[] { context, fileHandler });\r\n server.setHandler(contexts);\r\n\r\n server.start();\r\n\r\n } catch (Exception e) {\r\n System.err.println(\"Server failed to start.\");\r\n e.printStackTrace();\r\n }\r\n }", "@BeforeClass\n public static void startEmbeddedJetty_9_1_1() throws Exception {\n server = new Server( 8080 );\n \n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath( \"/websock-webapp\" );\n //But the .war should already have WebSocketServerEndpoint.class in it \n webapp.setWar( new File( \".\", \"../webapp/target/\" + WebAppConstants.WEBSOCKET_WEBAPP_NAME + \".war\" ).getPath() );\n server.setHandler( webapp );\n // Initialize the WebSocket Server Container\n WebSocketServerContainerInitializer.configureContext( webapp ); \n server.start();\n \n // After Jetty started and WebSocket Server Container was initialized, obtain it\n webSocketServerContainer = ( ServerContainer ) webapp.getServletContext().getAttribute( \n javax.websocket.server.ServerContainer.class.getName() );\n assertNotNull( webSocketServerContainer );\n System.out.println( \"--->> webSocketServerContainer [\" + webSocketServerContainer + \"] of class [\" + \n ( webSocketServerContainer == null ? null : webSocketServerContainer.getClass().getName() ) + \"]\" );\n \n //This should really NOT be needed since WebSocketServerEndpoint is in the .war and should be\n //picked up via annotation. PLUS this requires refactoring WebSocketServerEndpoint from out of the\n // /webapp child module into /common which is really unnecessary at this point.\n // webSocketServerContainer.addEndpoint( WebSocketServerEndpoint.class );\n \n WebSocketContainer container = ContainerProvider.getWebSocketContainer();\n assertNotNull( \"Jetty WebSockets Container is null\", container );\n container.connectToServer( WebSocketClientEndpoint.class,\n// // \"ws://localhost:8080/websock-webapp/echo\"\n new URI( WebAppConstants.WEBSOCKET_FULL_URL ) );\n \n/* This still throws the same damn, exception\n \nCaused by: org.eclipse.jetty.websocket.api.UpgradeException: Didn't switch protocols\n\tat org.eclipse.jetty.websocket.client.io.UpgradeConnection.validateResponse(UpgradeConnection.java:272)\n\tat org.eclipse.jetty.websocket.client.io.UpgradeConnection.read(UpgradeConnection.java:203)\n\tat org.eclipse.jetty.websocket.client.io.UpgradeConnection.onFillable(UpgradeConnection.java:148) \n*/ \n \n /* \n Running server as standalone and client as standalone via Spring work though.\n \n final ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );\n final ServletContextHandler context = new ServletContextHandler();\n\n context.setContextPath( \"/\" );\n context.addServlet( servletHolder, \"/*\" );\n context.addEventListener( new ContextLoaderListener() ); \n context.setInitParameter( \"contextClass\", AnnotationConfigWebApplicationContext.class.getName() );\n context.setInitParameter( \"contextConfigLocation\", AppConfig.class.getName() );\n */\n \n }", "public interface JettyConnectorFactory {\n\n\t/**\n\t * Build and configure a connector for our web server.\n\t */\n\tpublic Connector buildConnector(Server server, int serverPort);\n}", "private void startServlets(){\n\t\ttry{\n\t\t\tserver = new Server();\n\t\t\tServerConnector c = new ServerConnector(server);\n\t\t\tc.setIdleTimeout(15000);\n\t\t\tc.setAcceptQueueSize(256);\n\t\t\tc.setPort(port);\n\t\t\tif(!bind.equals(\"*\")){\n\t\t\t\tc.setHost(bind);\n\t\t\t}\n\n\t\t\tServletContextHandler handler = new ServletContextHandler(server,\"/\", true, false);\n\t\t\tServletHolder servletHolder = new ServletHolder(StatusServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/status/*\");\n\n\t\t\tservletHolder = new ServletHolder(SampleAPIServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/sample/*\");\n\n\t\t\tservletHolder = new ServletHolder(FileServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/*\");\n\t\t\tFileServlet.sourceFolder=\"./site\";\t\t\t\n\n\t\t\tserver.addConnector(c);\n\t\t\tserver.start();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);\n context.setContextPath(\"/\");\n\n // Establish DB connection first\n\n // now start the server\n System.out.println(\"=== Initializing server on port \" + PORT);\n\n Server jettyServer = new Server(PORT);\n jettyServer.setHandler(context);\n\n if (LOG_REQUESTS) {\n RequestLog requestLog = new RipLogger();\n jettyServer.setRequestLog(requestLog);\n }\n\n ServletHolder jerseyServlet = context.addServlet(ServletContainer.class, \"/sudoku/*\");\n jerseyServlet.setInitOrder(0);\n jerseyServlet.setInitParameter(\"jersey.config.server.provider.packages\", \"com.shadedreality.rest\");\n\n try {\n jettyServer.start();\n jettyServer.dumpStdErr();\n jettyServer.join();\n } catch (Exception e) {\n System.err.println(\"Uncaught Exception in server: \"+e);\n }\n finally {\n jettyServer.destroy();\n }\n }", "private static void startWebSocketServer() {\n\n Server webSocketServer = new Server();\n ServerConnector connector = new ServerConnector(webSocketServer);\n connector.setPort(PORT);\n webSocketServer.addConnector(connector);\n log.info(\"Connector added\");\n\n // Setup the basic application \"context\" for this application at \"/\"\n // This is also known as the handler tree (in jetty speak)\n ServletContextHandler webSocketContext = new ServletContextHandler(\n ServletContextHandler.SESSIONS);\n webSocketContext.setContextPath(\"/\");\n webSocketServer.setHandler(webSocketContext);\n log.info(\"Context handler set\");\n\n try {\n ServerContainer serverContainer = WebSocketServerContainerInitializer\n .configureContext(webSocketContext);\n log.info(\"Initialize javax.websocket layer\");\n\n serverContainer.addEndpoint(GreeterEndpoint.class);\n log.info(\"Endpoint added\");\n\n webSocketServer.start();\n log.info(\"Server started\");\n\n webSocketServer.join();\n log.info(\"Server joined\");\n\n } catch (Throwable t) {\n log.error(\"Error startWebSocketServer {0}\", t);\n }\n }", "void startServer(String name, Config.ServerConfig config);", "@Override\n\tpublic void customize(ConfigurableEmbeddedServletContainer container) {\n\t\tcontainer.setPort(8888); \n\t}", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setupJspHandler(WebAppContext context) throws IOException {\n JettyJasperInitializer sci = new JettyJasperInitializer();\n\n ServletContainerInitializersStarter sciStarter = new ServletContainerInitializersStarter(context);\n ContainerInitializer initializer = new ContainerInitializer(sci, null);\n List<ContainerInitializer> initializers = new ArrayList<ContainerInitializer>();\n initializers.add(initializer);\n context.setAttribute(\"org.eclipse.jetty.containerInitializers\", initializers);\n context.addBean(sciStarter, true);\n System.setProperty(\"org.apache.jasper.compiler.disablejsr199\",\"false\");\n\n // Set Classloader of Context to be sane (needed for JSTL)\n // JSP requires a non-System classloader, this simply wraps the\n // embedded System classloader in a way that makes it suitable\n // for JSP to use\n ClassLoader jspClassLoader = new URLClassLoader(new URL[0], this.getClass().getClassLoader());\n context.setClassLoader(jspClassLoader);\n\n // Add JSP Servlet (must be named \"jsp\")\n ServletHolder holderJsp = new ServletHolder(\"jsp\", JettyJspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\",\"INFO\");\n holderJsp.setInitParameter(\"fork\",\"false\");\n holderJsp.setInitParameter(\"xpoweredBy\",\"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\",\"1.8\");\n holderJsp.setInitParameter(\"compilerSourceVM\",\"1.8\");\n holderJsp.setInitParameter(\"keepgenerated\",\"true\");\n context.addServlet(holderJsp, \"*.jsp\");\n }", "public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Singleton\n\t@Provides\n\tServer provideServer(final Injector injector, final ExecutorService execService) {\n\t\tfinal Server server = new Server(port);\n\t\tServletContextHandler sch = new ServletContextHandler(server, \"/jfunk\");\n\t\tsch.addEventListener(new JFunkServletContextListener(injector));\n\t\tsch.addFilter(GuiceFilter.class, \"/*\", null);\n\t\tsch.addServlet(DefaultServlet.class, \"/\");\n\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\texecService.shutdown();\n\t\t\t\t\texecService.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n\t\t\t\t} catch (InterruptedException ex) {\n\t\t\t\t\tThread.currentThread().interrupt();\n\t\t\t\t\tlog.error(ex.getMessage(), ex);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tserver.stop();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tlog.error(\"Error stopping Jetty.\", ex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn server;\n\t}", "@BeforeAll\n public static void start() throws Exception {\n server = new Server(0);\n ((QueuedThreadPool)server.getThreadPool()).setMaxThreads(20);\n ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/foo\");\n server.setHandler(context);\n context.addServlet(new ServletHolder(TestServlet.class), \"/bar\");\n context.addServlet(new ServletHolder(TimeOutTestServlet.class), \"/timeout\");\n ((ServerConnector)server.getConnectors()[0]).setHost(\"localhost\");\n server.start();\n originalPort = ((ServerConnector)server.getConnectors()[0]).getLocalPort();\n LOG.info(\"Running embedded servlet container at: http://localhost:{}\", originalPort);\n // This property needs to be set otherwise CORS Headers will be dropped\n // by HttpUrlConnection\n System.setProperty(\"sun.net.http.allowRestrictedHeaders\", \"true\");\n }", "public Server(int port, mainViewController viewController, LogViewController consoleViewController){\n isRunningOnCLI = false;\n this.viewController = viewController;\n this.port = port;\n this.consoleViewController = consoleViewController;\n viewController.serverStarting();\n log = new LoggingSystem(this.getClass().getCanonicalName(),consoleViewController);\n log.infoMessage(\"New server instance.\");\n try{\n this.serverSocket = new ServerSocket(port);\n //this.http = new PersonServlet();\n log.infoMessage(\"main.Server successfully initialised.\");\n clients = Collections.synchronizedList(new ArrayList<>());\n ServerOn = true;\n log.infoMessage(\"Connecting to datastore...\");\n //mainStore = new DataStore();\n jettyServer = new org.eclipse.jetty.server.Server(8080);\n jettyContextHandler = new ServletContextHandler(jettyServer, \"/\");\n jettyContextHandler.addServlet(servlets.PersonServlet.class, \"/person/*\");\n jettyContextHandler.addServlet(servlets.LoginServlet.class, \"/login/*\");\n jettyContextHandler.addServlet(servlets.HomeServlet.class, \"/home/*\");\n jettyContextHandler.addServlet(servlets.DashboardServlet.class, \"/dashboard/*\");\n jettyContextHandler.addServlet(servlets.UserServlet.class, \"/user/*\");\n jettyContextHandler.addServlet(servlets.JobServlet.class, \"/job/*\");\n jettyContextHandler.addServlet(servlets.AssetServlet.class, \"/assets/*\");\n jettyContextHandler.addServlet(servlets.UtilityServlet.class, \"/utilities/*\");\n jettyContextHandler.addServlet(servlets.EventServlet.class, \"/events/*\");\n //this.run();\n } catch (IOException e) {\n viewController.showAlert(\"Error initialising server\", e.getMessage());\n viewController.serverStopped();\n log.errorMessage(e.getMessage());\n }\n }", "public static ETLgineServerJetty getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new ETLgineServerJetty();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "private void createWebServers() throws Exception {\r\n\t\tXPathReader xmlReader = new XPathReader(CONFIGURE_FILE);\r\n\t\tNodeList webServerNodeList = (NodeList) xmlReader.getElement(\"/application/webServer\");\r\n\t\tfor(int idx = 1; idx <= webServerNodeList.getLength(); idx ++ ) {\r\n\t\t\tString webServerExpression = String.format(\"/application/webServer[%d]\", idx);\r\n\t\t\tString id = xmlReader.getTextContent(webServerExpression + \"/@id\");\r\n\t\t\tint port = Integer.parseInt(xmlReader.getTextContent(webServerExpression + \"/@port\"));\r\n\t\t\tWebServer webServer = new WebServer();\r\n\t\t\twebServer.setPort(port);\r\n\t\t\t\r\n\t\t\t// setting SSL properties\r\n\t\t\tif(xmlReader.hasElement(webServerExpression + \"/ssl\")) {\r\n\t\t\t\twebServer.setSsl(true);\r\n\t\t\t\tString keyStorePath = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStorePath\");\r\n\t\t\t\tString keyStoreType = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStoreType\");\r\n\t\t\t\tString keyStorePass = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStorePass\");\r\n\t\t\t\twebServer.setKeyStorePath(keyStorePath);\r\n\t\t\t\twebServer.setKeyStoreType(keyStoreType);\r\n\t\t\t\twebServer.setKeyStorePass(keyStorePass);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// adds context\r\n\t\t\tNodeList contextNodeList = (NodeList) xmlReader.getElement(webServerExpression + \"/context\");\r\n\t\t\tfor(int i = 1; i <= contextNodeList.getLength(); i ++) {\r\n\t\t\t\tString contextExpression = String.format(webServerExpression + \"/context[%d]\", i);\r\n\t\t\t\tString path = xmlReader.getTextContent(contextExpression + \"/@path\");\r\n\t\t\t\tString resourceBase = xmlReader.getTextContent(contextExpression + \"/resourceBase\");\r\n\t\t\t\tString descriptor = xmlReader.getTextContent(contextExpression + \"/descriptor\");\r\n\t\t\t\tWebServerContext webServerContext = new WebServerContext();\r\n\t\t\t\twebServerContext.setContextPath(path);\r\n\t\t\t\twebServerContext.setResourceBase(resourceBase);\r\n\t\t\t\twebServerContext.setDescriptor(descriptor);\r\n\t\t\t\twebServer.addContext(webServerContext);\r\n\t\t\t}\r\n\r\n\t\t\t// add webServer\r\n\t\t\twebServers.put(id, webServer);\r\n\t\t}\r\n\t}", "private void startWebApp(Handler<AsyncResult<HttpServer>> next) {\n Router router = Router.router(vertx);\n\n router.route(\"/assets/*\").handler(StaticHandler.create(\"assets\"));\n router.route(\"/api/*\").handler(BodyHandler.create());\n\n router.route(\"/\").handler(this::handleRoot);\n router.get(\"/api/timer\").handler(this::timer);\n router.post(\"/api/c\").handler(this::_create);\n router.get(\"/api/r/:id\").handler(this::_read);\n router.put(\"/api/u/:id\").handler(this::_update);\n router.delete(\"/api/d/:id\").handler(this::_delete);\n\n // Create the HTTP server and pass the \"accept\" method to the request handler.\n vertx.createHttpServer().requestHandler(router).listen(8888, next);\n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tif(args.length <= 0)\n\t\t{\n\t\t\tSystem.out.println(\"usage:java -server -Xms1024m -Xmx1024m -jar mofang-chat-frontend.jar configpath\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString configpath = args[0];\n\t\t\n\t\ttry\n\t\t{\n\t\t\t///服务器初始化\n\t\t\tSystem.out.println(\"prepare to initializing config......\");\n\t\t\tInitializer initializer = new MainInitializer(configpath);\n\t\t\tinitializer.init();\n\t\t\tSystem.out.println(\"initialize config completed!\");\n\t\t\t\n\t\t\t///启动服务器\n\t\t\tActionResolve websocketActionResolve = new WebSocketActionResolve();\n\t\t\tActionResolve httpActionResolve = new HttpActionResolve();\n\t\t\tint port = GlobalConfig.SERVER_PORT;\n\t\t\tWebServer server = new WebServer(port, PostDataParserType.Json);\n\t\t\t\n\t\t\t///channel 配置\n\t\t\tChannelConfig channelConfig = new ChannelConfig();\n\t\t\tchannelConfig.setConnTimeout(GlobalConfig.CONN_TIMEOUT);\n\t\t\tchannelConfig.setSoTimeout(GlobalConfig.READ_TIMEOUT);\n\t\t\t\n\t\t\t///Idle 配置\n\t\t\tIdleConfig idleConfig = new IdleConfig();\n\t\t\tidleConfig.setReadIdleTime(GlobalConfig.READ_IDLE_TIME);\n\t\t\tidleConfig.setWriteIdleTime(GlobalConfig.WRITE_IDLE_TIME);\n\t\t\tidleConfig.setAllIdleTime(GlobalConfig.ALL_IDLE_TIME);\n\t\t\t\n\t\t\t///webserver logger\n\t\t\tFrameworkLogger serverLogger = new FrameworkLogger();\n\t\t\tserver.setWebServerLogger(serverLogger);\n\t\t\t\n\t\t\tserver.setChannelConfig(channelConfig);\n\t\t\tserver.setIdleConfig(idleConfig);\n\t\t\tserver.setScanPackagePath(GlobalConfig.SCAN_PACKAGE_PATH);\n\t\t\tserver.setWebSocketActionResolve(websocketActionResolve);\n\t\t\tserver.setHttpActionResolve(httpActionResolve);\n\t\t\tserver.setWebSocketCloseHandlerClass(WebSocketCloseHandlerImpl.class);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Frontend Server Start on \" + GlobalConfig.SERVER_PORT);\n\t\t\t\tserver.start();\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"frontend server start error. message:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public WebServer()\n {\n if (!Variables.exists(\"w_DebugLog\"))\n Variables.setVariable(\"w_DebugLog\", true);\n\n if (!Variables.exists(\"w_Port\"))\n Variables.setVariable(\"w_Port\", 80);\n\n if (!Variables.exists(\"w_NetworkBufferSize\"))\n Variables.setVariable(\"w_NetworkBufferSize\", 2048);\n\n PORT = Variables.getInt(\"w_Port\");\n DEBUG = Variables.getBoolean(\"w_DebugLog\");\n BUFFER_SIZE = Variables.getInt(\"w_NetworkBufferSize\");\n }", "@Test\n public void serverConfiguration() throws IOException {\n initJadlerUsing(new JettyStubHttpServer());\n \n try {\n onRequest().respond().withStatus(EXPECTED_STATUS);\n assertExpectedStatus();\n }\n finally {\n closeJadler();\n }\n }", "@PostConstruct\n public void init() throws SQLException, IOException {\n Server.createWebServer(\"-webPort\", \"1777\").start();\n\n\n }", "public HttpServerConfiguration() {\n this.sessionsEnabled = true;\n this.connectors = new ArrayList<HttpConnectorConfiguration>();\n this.sslConnectors = new ArrayList<HttpSslConnectorConfiguration>();\n this.minThreads = 5;\n this.maxThreads = 50;\n }", "private void enableEmbeddedJspSupport(ServletContextHandler servletContextHandler) throws IOException {\n // Establish Scratch directory for the servlet context (used by JSP compilation)\n File tempDir = new File(System.getProperty(\"java.io.tmpdir\"));\n File scratchDir = new File(tempDir.toString(), \"embedded-jetty-jsp\");\n\n if (!scratchDir.exists()) {\n if (!scratchDir.mkdirs()) {\n throw new IOException(\"Unable to create scratch directory: \" + scratchDir);\n }\n }\n servletContextHandler.setAttribute(\"javax.servlet.context.tempdir\", scratchDir);\n\n // Set Classloader of Context to be sane (needed for JSTL)\n // JSP requires a non-System classloader, this simply wraps the\n // embedded System classloader in a way that makes it suitable\n // for JSP to use\n ClassLoader jspClassLoader = new URLClassLoader(new URL[0], this.getClass().getClassLoader());\n servletContextHandler.setClassLoader(jspClassLoader);\n\n // Manually call JettyJasperInitializer on context startup\n servletContextHandler.addBean(new JspStarter(servletContextHandler));\n\n // Create / Register JSP Servlet (must be named \"jsp\" per spec)\n ServletHolder holderJsp = new ServletHolder(\"jsp\", JettyJspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\", \"DEBUG\");\n holderJsp.setInitParameter(\"fork\", \"false\");\n holderJsp.setInitParameter(\"xpoweredBy\", \"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\", \"1.8\");\n holderJsp.setInitParameter(\"compilerSourceVM\", \"1.8\");\n holderJsp.setInitParameter(\"keepgenerated\", \"true\");\n servletContextHandler.addServlet(holderJsp, \"*.jsp\");\n }", "public static void main(String[] args) throws Exception {\n\n String context = System.getProperty(\"rjrcontext\");\n String webAppDir = System.getProperty(\"rjrwebapp\");\n Integer port = Integer.getInteger(\"rjrport\");\n Integer sslport = Integer.getInteger(\"rjrsslport\");\n String webAppClassPath = System.getProperty(\"rjrclasspath\");\n String keystore = System.getProperty(\"rjrkeystore\");\n String password = System.getProperty(\"rjrpassword\");\n String keyPassword = System.getProperty(\"rjrkeypassword\");\n\n if (context == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrcontext\");\n }\n if (webAppDir == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrwebapp\");\n }\n if (port == null && sslport == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrport and/or -Drjrsslport\");\n }\n\n Server server = new Server();\n\n if (port != null) {\n SelectChannelConnector connector = new SelectChannelConnector();\n connector.setPort(port);\n\n if (sslport != null) {\n connector.setConfidentialPort(sslport);\n }\n\n server.addConnector(connector);\n }\n\n if (sslport != null) {\n if (keystore == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrkeystore with -Drjrsslport\");\n }\n if (password == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrpassword with -Drjrsslport\");\n }\n if (keyPassword == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrkeypassword with -Drjrsslport\");\n }\n\n SslSocketConnector sslConnector = new SslSocketConnector();\n sslConnector.setKeystore(keystore);\n sslConnector.setPassword(password);\n sslConnector.setKeyPassword(keyPassword);\n\n sslConnector.setMaxIdleTime(30000);\n sslConnector.setPort(sslport);\n\n server.addConnector(sslConnector);\n }\n\n WebAppContext web = new WebAppContext();\n web.setContextPath(context);\n web.setWar(webAppDir);\n\n // Fix issue 7, File locking on windows/Disable Jetty's locking of static files\n // http://code.google.com/p/run-jetty-run/issues/detail?id=7\n // by disabling the use of the file mapped buffers. The default Jetty behavior is\n // intended to provide a performance boost, but run-jetty-run is focused on\n // development (especially debugging) of web apps, not high-performance production\n // serving of static content. Therefore, I'm not worried about the performance\n // degradation of this change. My only concern is that there might be a need to\n // test this feature that I'm disabling.\n web.setInitParams(Collections.singletonMap(\"org.mortbay.jetty.servlet.Default.useFileMappedBuffer\", \"false\"));\n\n if (webAppClassPath != null) {\n ProjectClassLoader loader = new ProjectClassLoader(web, webAppClassPath);\n web.setClassLoader(loader);\n }\n\n server.addHandler(web);\n\n MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();\n MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);\n server.getContainer().addEventListener(mBeanContainer);\n mBeanContainer.start();\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(100);\n }\n return;\n }", "public static void main(String[] args) {\n\t\ttry { NetworkServerControl server = new NetworkServerControl(InetAddress.getByName(\"localhost\"),1527);\n\t\tserver.start(null);\n\t\tSystem.out.println(\"DB Server Started!\");\n\t\t//server.shutdown();\n\t\t//cn = DriverManager.getConnection(dbURL);\n\t\t} catch(Exception e) {System.out.println(\"Cannot Start DB Server!\"); }\n\t\t\n\t\tfinal JettyServer jettyServer = new JettyServer();\n\t\tString jetty_home = System.getProperty(\"jetty.home\",\".\");\n Server server = new Server(8080);\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n //webapp.setWar(jetty_home+\"/target/vrscloud-1.war\");\n webapp.setWar(\"ROOT.war\");\n server.setHandler(webapp);\n // server.start();\t\n\t\t\n\t\t\n jettyServer.setHandler(webapp);\t\n\t\t\n\t\tRunnable runner = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew ServerRunner(jettyServer);\n\t\t\t}\n\t\t};\n\t\tEventQueue.invokeLater(runner);\n\t}", "public static void main(String[] args) {\n\t\tif (args != null && args.length > 0) {\n\t\t\tport = Integer.parseInt(args[0]);\n\t\t}\n\t\tlog.info(\"i am the main for JServer\");\n\t\tlog.info(\"Server will use port: \" + port);\n\t\ttry {\n\t\t\twebServer = new WebServer(port);\n\t\t\t\n\t\t\tjsystem = new JSystemServer();\n\t\t\t\n\t\t\t//create the instances of handlers in server\n\t\t\tapplicationHandler = new JApplicationHandler();\n\t\t\tscenarioHandler = new JScenarioHandler();\n\t\t\t\n\t\t\t\n\t\t\tlogsHandler = new JReporterHandler();\n\t\t\t//register handlers in server\n\t\t\twebServer.addHandler(JServerHandlers.SCENARIO.getHandlerClassName(),scenarioHandler);\n\t\t\twebServer.addHandler(JServerHandlers.APPLICATION.getHandlerClassName(),applicationHandler);\n\t\t\twebServer.addHandler(\"jsystem\", jsystem);\n\t\t\twebServer.addHandler(JServerHandlers.REPORTER.getHandlerClassName(), logsHandler);\n\t\t\twebServer.start();\n\t\t\tSystem.out.println(\"webserver successfully started!!! + listening on port \" + port);\n\t\t} catch (Exception e) {\n\t\t\tlog.warning(\"failed in webserver handler adding or creation on port= \"+port + \"\\n\\n\"+StringUtils.getStackTrace(e));\n\t\t}\n\t}", "public static EmbeddedTestServer createAndStartServer(Context context) {\n return createAndStartServerWithPort(context, 0);\n }", "public static void main(final String[] args) {\n\t\tServer server = new Server();\n\t\tSocketConnector connector = new SocketConnector();\n\t\tconnector.setPort(9090);\n\t\tserver.setConnectors(new Connector[] {connector});\n\n\t\tWebAppContext context = new WebAppContext();\n\t\tcontext.setServer(server);\n\t\tcontext.setContextPath(\"/biomedcalib\");\n\t\tcontext.setWar(\"src/main/webapp\");\n\n\t\tserver.addHandler(context);\n\t\ttry {\n\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public static HttpServer startServer() {\n // create a resource config that scans for JAX-RS resources and providers\n // in com.example.rest package\n final ResourceConfig rc = new ResourceConfig().packages(\"com.assignment.backend\");\n rc.register(org.glassfish.jersey.moxy.json.MoxyJsonFeature.class);\n rc.register(getAbstractBinder());\n rc.property(ServerProperties.BV_SEND_ERROR_IN_RESPONSE, true);\n rc.property(ServerProperties.BV_DISABLE_VALIDATE_ON_EXECUTABLE_OVERRIDE_CHECK, true);\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n return GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n }", "@Override\n public void contextInitialized(ServletContextEvent servletContextEvent) {\n super.contextInitialized(servletContextEvent);\n\n try {\n ServletContext servletContext = servletContextEvent.getServletContext();\n RemotingServlet remotingServlet = new RemotingServlet();\n try {\n remotingServlet.init(new CubaServletConfig(\"remoting\", servletContext));\n } catch (ServletException e) {\n throw new RuntimeException(\"An error occurred while initializing remoting servlet\", e);\n }\n ServletRegistration.Dynamic remotingReg = servletContext.addServlet(\"remoting\", remotingServlet);\n remotingReg.addMapping(\"/remoting/*\");\n remotingReg.setLoadOnStartup(0);\n\n FilterRegistration.Dynamic filterReg = servletContext.addFilter(\"CoreSingleWarHttpFilter\", new SetClassLoaderFilter());\n filterReg.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, \"/remoting/*\");\n\n } catch (RuntimeException e) {\n log.error(\"Error initializing core servlets\", e);\n\n try {\n ApplicationContext springContext = AppContext.getApplicationContext();\n if (springContext != null) {\n ((ConfigurableApplicationContext) springContext).close();\n }\n } catch (Exception e1) {\n log.debug(\"Error closing application context: {}\", e1.toString());\n }\n\n throw e;\n }\n }", "public void setupWebServers(){\n if(rwsServer == null || csaServer == null){\n String serverURL = getFirstAttribute(cn,FRONTEND_ADDRESS_TAG);\n setupWebServers(serverURL);\n }\n }", "private void startServer(String ip, int port, String contentFolder) throws IOException{\n HttpServer server = HttpServer.create(new InetSocketAddress(ip, port), 0);\n \n //Making / the root directory of the webserver\n server.createContext(\"/\", new Handler(contentFolder));\n //Making /log a dynamic page that uses LogHandler\n server.createContext(\"/log\", new LogHandler());\n //Making /online a dynamic page that uses OnlineUsersHandler\n server.createContext(\"/online\", new OnlineUsersHandler());\n server.setExecutor(null);\n server.start();\n \n //Needing loggin info here!\n }", "private static void setupServerContext(){\n\n serverContext.set(new ServerContext());\n serverContext.get().bgThreadIds = new int[GlobalContext.getNumTotalBgThreads()];\n serverContext.get().numShutdownBgs = 0;\n serverContext.get().serverObj = new Server();\n\n }", "private static void initJspContext(WebAppContext webapp) throws IOException {\n File tempDir = new File(System.getProperty(\"java.io.tmpdir\"));\n File scratchDir = new File(tempDir.toString(),\"embedded-jetty-jsp\");\n\n if (!scratchDir.exists()) {\n if (!scratchDir.mkdirs()) {\n throw new IOException(\"Unable to create scratch directory: \" + scratchDir);\n }\n }\n\n webapp.setAttribute(\"javax.servlet.context.tempdir\",scratchDir);\n webapp.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());\n \n\n //Ensure the jsp engine is initialized correctly\n JettyJasperInitializer sci = new JettyJasperInitializer();\n ServletContainerInitializersStarter sciStarter = new ServletContainerInitializersStarter(webapp);\n ContainerInitializer initializer = new ContainerInitializer(sci, null);\n List<ContainerInitializer> initializers = new ArrayList<ContainerInitializer>();\n initializers.add(initializer);\n\n webapp.setAttribute(\"org.eclipse.jetty.containerInitializers\", initializers);\n webapp.addBean(sciStarter, true);\n\n // Add JSP Servlet (must be named \"jsp\")\n ServletHolder holderJsp = new ServletHolder(\"jsp\",JspServlet.class);\n holderJsp.setInitOrder(0);\n holderJsp.setInitParameter(\"logVerbosityLevel\",\"DEBUG\");\n holderJsp.setInitParameter(\"fork\",\"false\");\n holderJsp.setInitParameter(\"xpoweredBy\",\"false\");\n holderJsp.setInitParameter(\"compilerTargetVM\",\"1.7\");\n holderJsp.setInitParameter(\"compilerSourceVM\",\"1.7\");\n holderJsp.setInitParameter(\"keepgenerated\",\"true\");\n webapp.addServlet(holderJsp,\"*.jsp\");\n //context.addServlet(holderJsp,\"*.jspf\");\n //context.addServlet(holderJsp,\"*.jspx\");\n\t}", "@Parameter(optional=true, description=\"Port number for the embedded Jetty HTTP server, default: \\\\\\\"\" + ServletEngine.DEFAULT_PORT + \"\\\\\\\". \"\n\t\t\t+ \"If the port is set to 0, the jetty server uses a free tcp port, and the metric `serverPort` delivers the actual value.\")\n\tpublic void setPort(int port) {}", "@Bean\n public ServletWebServerFactory servletContainer() {\n TomcatServletWebServerFactory tomcatServer = new TomcatServletWebServerFactory() {\n @Override\n protected void postProcessContext(Context context) {\n SecurityConstraint securityConstraint = new SecurityConstraint();\n securityConstraint.setUserConstraint(\"CONFIDENTIAL\");\n SecurityCollection collection = new SecurityCollection();\n collection.addPattern(\"/*\");\n securityConstraint.addCollection(collection);\n context.addConstraint(securityConstraint);\n }\n };\n\n tomcatServer.addAdditionalTomcatConnectors(initiateHttpConnector());\n return tomcatServer;\n }", "@Override\n public void start() throws LifecycleException {\n logger.info(\"Start http server ... \");\n\n\n try {\n // create a resource config that scans for JAX-RS resources and providers\n final ResourceConfig rc = new ResourceConfig()\n .packages(PACKAGES_SCAN) // packages path for resources loading\n .property(MvcFeature.TEMPLATE_BASE_PATH, FREEMARKER_BASE) // config freemarker view files's base path\n .register(LoggingFeature.class)\n .register(FreemarkerMvcFeature.class)\n .register(JettisonFeature.class)\n .packages(\"org.glassfish.jersey.examples.multipart\")\n .register(MultiPartFeature.class)\n .registerInstances(new ApplicationBinder()); //\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n httpServer = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n\n // Set StaticHttpHandler to handle http server's static resources\n String htmlPath = this.getClass().getResource(HTML_BASE).getPath(); // TODO, 部署后要根据实际目录修正!classes 同级目录下的 html 目录\n HttpHandler handler = new StaticHttpHandler(htmlPath);\n httpServer.getServerConfiguration().addHttpHandler(handler, \"/\");\n\n logger.info(\"Jersey app started with WADL available at {} application.wadl\\n \", BASE_URI);\n } catch (Exception e) {\n throw new LifecycleException(e); // just convert to self defined exception\n }\n }", "@Bean\n public ServletWebServerFactory servletContainer() {\n TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();\n\n if (httpPort > 0) {\n tomcat.addAdditionalTomcatConnectors(getHttpConnector(httpPort));\n }\n return tomcat;\n }", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "public static void main(String args[]) throws Exception {\n SLF4JBridgeHandler.install();\n\n try {\n JettyServer server = new JettyServer(8080);\n server.start();\n log.info(\"Server started\");\n server.join();\n } catch (Exception e) {\n log.error(\"Failed to start server.\", e);\n }\n }", "@Override\n public final void contextInitialized(final ServletContextEvent sce) {\n context = sce.getServletContext();\n\n String apiSrvDaemonPath = context.getRealPath(PS);\n System.setProperty(\"APISrvDaemonPath\", context.getRealPath(\"/\"));\n System.setProperty(\"APISrvDaemonVersion\",\n \"v.0.0.2-22-g2338f25-2338f25-40\");\n\n // Notify execution\n System.out.println(\"--- \" + \"Starting APIServerDaemon \"\n + System.getProperty(\"APISrvDaemonVersion\") + \" ---\");\n System.out.println(\"Java vendor : '\" + VN + \"'\");\n System.out.println(\"Java vertion: '\" + VR + \"'\");\n System.out.println(\"Running as : '\" + US + \"' username\");\n System.out.println(\"Servlet path: '\" + apiSrvDaemonPath + \"'\");\n\n // Initialize log4j logging\n String log4jPropPath =\n apiSrvDaemonPath + \"WEB-INF\" + PS + \"log4j.properties\";\n File log4PropFile = new File(log4jPropPath);\n\n if (log4PropFile.exists()) {\n System.out.println(\"Initializing log4j with: \" + log4jPropPath);\n PropertyConfigurator.configure(log4jPropPath);\n } else {\n System.err.println(\n \"WARNING: '\" + log4jPropPath\n + \" 'file not found, so initializing log4j \"\n + \"with BasicConfigurator\");\n BasicConfigurator.configure();\n }\n\n // Make a test with jdbc/geApiServerPool\n // jdbc/UserTrackingPool\n // jdbc/gehibernatepool connection pools\n String currentPool = \"not yet defined!\";\n String poolPrefix = \"java:/comp/env/\";\n String[] pools = {\"jdbc/fgApiServerPool\",\n \"jdbc/UserTrackingPool\",\n \"jdbc/gehibernatepool\"};\n Connection[] connPools = new Connection[pools.length];\n\n for (int i = 0; i < pools.length; i++) {\n try {\n Context initContext = new InitialContext();\n Context envContext =\n (Context) initContext.lookup(\"java:comp/env\");\n\n currentPool = pools[i];\n\n // DataSource ds =\n // (DataSource)initContext.lookup(poolPrefix+currentPool);\n DataSource ds = (DataSource) envContext.lookup(currentPool);\n\n connPools[i] = ds.getConnection();\n System.out.println(\"PERFECT: \" + currentPool + \" was ok\");\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool + \" failed\" + LS\n + e.toString());\n } finally {\n try {\n connPools[i].close();\n } catch (Exception e) {\n System.err.println(\"WARNING: \" + currentPool\n + \" failed to close\" + LS + e.toString());\n }\n }\n }\n\n // Register MySQL driver\n APIServerDaemonDB.registerDriver();\n\n // Initializing the daemon\n if (asDaemon == null) {\n asDaemon = new APIServerDaemon();\n }\n\n asDaemon.startup();\n }", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "public static void main(final String[] args) throws Exception {\n Resource.setDefaultUseCaches(false);\n Integer SERVER_PORT = Integer.parseInt(ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.port\"));\n String SERVER_HOST = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.host\");\n String CONTEXT_PATH = ManejadorPropiedades.leerPropiedad(\"app_cfg.properties\", \"app.context_path\");\n \n final Server server = new Server(SERVER_PORT);\n System.setProperty(AppConfig.SERVER_PORT, SERVER_PORT.toString());\n System.setProperty(AppConfig.SERVER_HOST, SERVER_HOST);\n System.setProperty(AppConfig.CONTEXT_PATH, CONTEXT_PATH);\n \n\n // Configuring Apache CXF servlet and Spring listener \n final ServletHolder servletHolder = new ServletHolder(new CXFServlet());\n final ServletContextHandler context = new ServletContextHandler();\n context.setContextPath(\"/\");\n context.addServlet(servletHolder, \"/\" + CONTEXT_PATH + \"/*\");\n context.addEventListener(new ContextLoaderListener());\n context.setInitParameter(\"contextClass\", AnnotationConfigWebApplicationContext.class.getName());\n context.setInitParameter(\"contextConfigLocation\", AppConfig.class.getName());\n \n FilterHolder filterHolder = context.addFilter(CrossOriginFilter.class,\"/*\",EnumSet.allOf(DispatcherType.class));\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_ORIGINS_PARAM,\"*\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_HEADERS_PARAM,\"Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOWED_METHODS_PARAM,\"GET,PUT,POST,DELETE,OPTIONS\");\n filterHolder.setInitParameter(CrossOriginFilter.PREFLIGHT_MAX_AGE_PARAM,\"5184000\");\n filterHolder.setInitParameter(CrossOriginFilter.ALLOW_CREDENTIALS_PARAM,\"true\");\n\n\n // Configuring Swagger as static web resource\n final ServletHolder swaggerHolder = new ServletHolder(new DefaultServlet());\n final ServletContextHandler swagger = new ServletContextHandler();\n swagger.setContextPath(\"/swagger\");\n swagger.addServlet(swaggerHolder, \"/*\");\n swagger.setResourceBase(new ClassPathResource(\"/webapp\").getURI().toString());\n\n final HandlerList handlers = new HandlerList();\n handlers.addHandler(swagger);\n handlers.addHandler(context);\n\n server.setHandler(handlers);\n server.start();\n server.join();\n }", "@Bean\n public TomcatServletWebServerFactory servletWebServerFactory() {\n return new TomcatServletWebServerFactory() {\n\n @Override\n protected void prepareContext(Host host,\n ServletContextInitializer[] initializers) {\n super.prepareContext(host, initializers);\n StandardContext child = new StandardContext();\n child.addLifecycleListener(new Tomcat.FixContextListener());\n child.setPath(\"/cloudfoundryapplication\");\n ServletContainerInitializer initializer = getServletContextInitializer(\n getContextPath());\n child.addServletContainerInitializer(initializer, Collections.emptySet());\n child.setCrossContext(true);\n host.addChild(child);\n }\n\n };\n }", "public serverHttpHandler( String rootDir ) {\n this.serverHome = rootDir;\n }", "public WebServer(int port, Context context) throws IOException {\n this.server = HttpServer.create(new InetSocketAddress(port), 0);\n \n // handle concurrent requests with multiple threads\n server.setExecutor(Executors.newCachedThreadPool());\n \n List<Filter> logging = List.of(new ExceptionsFilter(), new LogFilter());\n\n StaticFileHandler.create(server, \"/static/\", \"static/\", \"invalid\");\n HttpContext eval = server.createContext(\"/eval/\", exchange -> handleEval(exchange, context));\n eval.getFilters().addAll(logging);\n }", "public static void main(String [] args) {\n context = new AnnotationConfigApplicationContext(Config.class);\n // For the destroy method to work.\n context.registerShutdownHook();\n\n\n //TestService service = (TestService) context.getBean(\"test_service\");\n //PollingConsumer consumer = (PollingConsumer) context.getBean(\"test_consumer\");\n\n // Start tcp and flash servers\n Map<String, Initializer> initializers = context.getBeansOfType(Initializer.class);\n if (initializers != null) {\n for(Initializer initializer : initializers.values()) {\n initializer.initialize();\n }\n }\n\n NettyManager manager = context.getBean(NettyManager.class);\n try\n {\n manager.startServer();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent arg0) {\n\t\tserverAPP.start();\n\t}", "public MyServer() {\n try {\n \ttimer = new Timer(1000, timerListener());\n regularSocket = new ServerSocket(7777);\n webServer = new Server(new InetSocketAddress(\"127.0.0.1\", 80));\n WebSocketHandler wsHandler = new WebSocketHandler() {\n\t @Override\n\t public void configure(WebSocketServletFactory factory) {\n\t factory.register(HumanClientHandler.class);\n\t }\n\t };\n\t \n webServer.setHandler(wsHandler);\n\t webServer.start();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] argv)\n {\n int p = determinePort(argv, 10000);\n XmlRpc.setKeepAlive (true);\n SecureWebServer webserver = new SecureWebServer (p);\n\n try\n {\n webserver.addDefaultHandlers();\n webserver.start();\n }\n catch (Exception e)\n {\n System.err.println(\"Error running secure web server\");\n e.printStackTrace();\n System.exit(1);\n }\n }", "public void init( ServletConfig cfg ) throws ServletException {\n super.init( cfg );\n\n String controllerFile = getInitParameter( \"Handler.configFile\" );\n if ( ! ( new File( controllerFile ).exists() ) ) {\n controllerFile = getServletContext().getRealPath( controllerFile );\n }\n String clientContext = this.getInitParameter( \"MapContext.configFile\" );\n if ( ! ( new File( clientContext ).exists() ) ) {\n clientContext = getServletContext().getRealPath( clientContext );\n try {\n File file = new File( clientContext );\n vc = WebMapContextFactory.createViewContext( file.toURL(), null, null );\n appHandler = new MapApplicationHandler( controllerFile, vc );\n } catch(Exception e) {\n e.printStackTrace();\n }\n } \n }", "public interface MyWebInitializer {\n void onStartup(ServletContext servletContext) throws ServletException;\n}", "public static <T extends EmbeddedTestServer> T initializeAndStartServer(\n T server, Context context, int port) {\n server.initializeNative(context, ServerHTTPSSetting.USE_HTTP);\n server.addDefaultHandlers(\"\");\n if (!server.start(port)) {\n throw new EmbeddedTestServerFailure(\"Failed to start serving using default handlers.\");\n }\n return server;\n }", "public IStatus prepareForServingDirectly(IPath baseDir, TomcatServer server, String tomcatVersion);", "@Override\n protected void extend(ServerConnector target) {\n\n }", "public static void startServlet() throws Exception {\n Server server = new Server(8081);\n\n log.info(\"configuring and starting servlet\");\n ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);\n context.setContextPath(\"/\");\n server.setHandler(context);\n\n DbProductQueryService dbProductQueryService = new DbProductQueryService();\n\n context.addServlet(new ServletHolder(new AddProductServlet(dbProductQueryService)), \"/add-product\");\n log.info(\"added AddProductServlet\");\n context.addServlet(new ServletHolder(new GetProductsServlet(dbProductQueryService)), \"/get-products\");\n log.info(\"added GetProductsServlet\");\n context.addServlet(new ServletHolder(new QueryServlet(dbProductQueryService)), \"/query\");\n log.info(\"added QueryServlet\");\n\n\n server.start();\n log.info(\"servlet started successfully\");\n server.join();\n }", "public void init(){\n\t\tcfg = new Configuration();\r\n\t\tcfg.setServletContextForTemplateLoading(getServletContext(), \"WEB-INF/templates\");\r\n }", "public Server() {\n\t\tinit(new Config());\n\t}", "@Override\r\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\r\n\t\tcontext = config.getServletContext();\r\n\t\tputDataSource(config.getServletContext(), \"jdbc/gdaDB\");\r\n//\t\tpublisher = new Publisher();\r\n\r\n\t}", "ServerEntry getServer();", "public void init() throws ServletException {\n\t\tserver = getInitParameter(\"ncserver\");\n\t\t// System.out.println(\"fffpropsFileName\"+propsFileName+\"...\");\n\t\tif (server == null)\n\t\t\tserver = \"http://100.100.1.61:81/service/XChangeServlet?account=0002\";\n\t\tSystem.out.println(\"server:\" + server + \"...\");\n\t}", "public void init(ServletConfig config) throws ServletException {\n\t\tcontext = config.getServletContext();\n\t}", "public static void main(final String[] args) throws Exception {\n\t\tServer server = new Server(8181);\n\n\t\t// Register and map the dispatcher servlet\n\t\tfinal ServletHolder servletHolder = new ServletHolder(new CXFServlet());\n\t\tfinal ServletContextHandler context = new ServletContextHandler();\n\t\tcontext.setContextPath(\"/\");\n\t\tcontext.addServlet(servletHolder, \"/rest/*\");\n\t\tcontext.addEventListener(new ContextLoaderListener());\n\t\tcontext.setInitParameter(\"contextClass\", AnnotationConfigWebApplicationContext.class.getName());\n\t\tcontext.setInitParameter(\"contextConfigLocation\", AppConfig.class.getName());\n\n\t\tfinal ResourceHandler resource_handler = new ResourceHandler();\n\t\tresource_handler.setDirectoriesListed(true);\n\t\tresource_handler.setWelcomeFiles(new String[] { \"index.html\" });\n\n\t\t// Try to find the webapp files in source\n\t\tFile basePath = new File(\"./src/main/webapp/logiclodge-webapp/\");\n\t\tif (basePath.exists()) {\n\t\t\tresource_handler.setBaseResource(new PathResource(basePath));\n\t\t} else {\n\t\t\t// Otherwise grab them from the classpath (usually inside the jar)\n\t\t\tresource_handler.setResourceBase(new ClassPathResource(\"logiclodge-webapp\").getURI().toString());\n\t\t}\n\n\t\tfinal HandlerList handlers = new HandlerList();\n\t\thandlers.setHandlers(new Handler[] { resource_handler, context });\n\t\tserver.setHandler(handlers);\n\t\tserver.start();\n\t\tserver.join();\n\t}", "@Activate\n public void activate(ComponentContext ctx) {\n try {\n this.serverContainer.addEndpoint(RealTimeWebSocketServerMsgHandler.class);\n LOG.info(\"Hydra Data-collection service Websocket: Server endpoint for key-value stream deployed\"); //endpoint is immediately available //$NON-NLS-1$\n this.serverContainer.addEndpoint(MessageWebSocketServerMsgHandler.class);\n LOG.info(\"Hydra Data-collection service Websocket: Server endpoint for messages deployed\"); //endpoint is immediately available //$NON-NLS-1$\n } catch (DeploymentException e) {\n LOG.error(\"Hydra Data-collection service Websocket: Error occurred while deploying the server endpoint\", e); //$NON-NLS-1$\n }\n }", "void setServletContext(ServletContext servletContext);", "void setServletContext(ServletContext servletContext);", "public WebServer ()\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t{\r\n\t\tthis.shost = DEF_HOST; \t\t\t\t\t\t\t\t\r\n\t\tthis.sPort = DEF_PORT; \t\t\t\t\t\t\t\t\r\n\t}", "public void registerWithServer();", "public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }", "public Configuration() {\r\n\t\tthis.serverAddress = \"127.0.0.1\";\r\n\t\tthis.serverPort = \"2586\";\r\n\t}", "public void testConfigureExtender() throws Exception {\n\t\tThread.sleep(5 *1000);\r\n\t\t\r\n\t\tfor(Bundle bundle : bundleContext.getBundles()) {\r\n//\t\t\tLOG.error(bundle.getSymbolicName()+\" \"+bundle.getBundleContext().);\r\n\t\t}\r\n\r\n\t\t// the context path is modified by the Web extender's configuration fragment\r\n\t\ttestConnection(\"http://localhost:8080/manningcontextpathstrategy/hello.htm\");\t\r\n\t\t\r\n//\t\tfindBundle(\"org.springframework.osgi.web.extender\").stop();\r\n//\t\tThread.sleep(5 * 1000);\r\n//\t\tfindBundle(\"org.springframework.osgi.web.extender\").start();\r\n//\t\tThread.sleep(5 * 1000);\r\n\r\n\t}", "@Override\n\tprotected void initInternal() throws LifecycleException {\n bootstrap = new ServerBootstrap();\n //初始化\n bootstrap.group(bossGroup, workGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>(){\n\n\t @Override\n\t protected void initChannel(SocketChannel ch) throws Exception {\n\t // TODO Auto-generated method stub\n\t //目前是每次new出来 由于4.0不允许加入加入一个ChannelHandler超过一次,除非它由@Sharable注解,或者每次new出来\n\t //ch.pipeline().addLast(\"idleChannelTester\", new IdleStateHandler(10, 5, 30));\n\t //ch.pipeline().addLast(\"keepaliveTimeoutHandler\", keepaliveTimeoutHandler);\n\t \t \n\t // server端接收到的是httpRequest,所以要使用HttpRequestDecoder进行解码\n\t ch.pipeline().addLast(\"http-encoder\", new HttpRequestDecoder()); \n\t //将解析出来的http报文的数据组装成为封装好的httpRequest对象 \n\t ch.pipeline().addLast(\"http-aggregator\", new HttpObjectAggregator(1024 * 1024));\n\t // server端发送的是httpResponse,所以要使用HttpResponseEncoder进行编码\n\t ch.pipeline().addLast(\"http-decoder\", new HttpResponseEncoder());\n\t //主要用于处理大数据流\n\t ch.pipeline().addLast(\"http-chunkedWriter\", new ChunkedWriteHandler()); \n\t //加强业务逻辑处理效率\n\t if(null == eventExecutor){\n\t \tch.pipeline().addLast(\"http-processor\",new HttpHandler()); \n\t }else {\n\t\t ch.pipeline().addLast(eventExecutor,\"http-processor\",new HttpHandler()); \n\t }\n\t \n\t /**\n\t // 这里只允许增加无状态允许共享的ChannelHandler,对于有状态的channelHandler需要重写\n\t // getPipelineFactory()方法\n\t for (Entry<String, ChannelHandler> channelHandler : channelHandlers.entrySet()) {\n\t ch.pipeline().addLast(channelHandler.getKey(), channelHandler.getValue());\n\t }\n\t \n\t **/\n\t }\n \n }) \n .option(ChannelOption.SO_BACKLOG, 1024000)\n .option(ChannelOption.SO_REUSEADDR, true)\n .childOption(ChannelOption.SO_REUSEADDR, true)\n .childOption(ChannelOption.TCP_NODELAY, true) //tcp\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\t}", "@Override\n\tpublic void onStartup(ServletContext servletContext)\n\t\t\tthrows ServletException {\n\t\tsuper.onStartup(servletContext);//master line where whole framework works\n\t\t//configure global objects/tasks if required\n\t}", "public ServerConfigImpl() {\n this.expectations = new ExpectationsImpl(globalEncoders, globalDecoders);\n this.requirements = new RequirementsImpl();\n }", "public static void main(String[] args) {\n int port = 8899;\n ServerBootstrap serverBootstrap = new ServerBootstrap();\n EventLoopGroup boss = new NioEventLoopGroup();\n EventLoopGroup work = new NioEventLoopGroup();\n\n try {\n serverBootstrap.group(boss, work)\n .channel(NioServerSocketChannel.class)\n .localAddress(new InetSocketAddress(port))\n .childHandler(new ChannelInitializer() {\n\n @Override\n protected void initChannel(Channel ch) throws Exception {\n ch.pipeline()\n .addLast(\"codec\", new HttpServerCodec()) // HTTP 编解码\n .addLast(\"compressor\", new HttpContentCompressor()) // HttpContent 压缩\n .addLast(\"aggregator\", new HttpObjectAggregator(65536)) // HTTP 消息聚合\n .addLast(\"handler\", new HttpServerHandler());\n }\n })\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture f = serverBootstrap.bind().sync();\n System.out.println(\"Http Server started, Listening on \" + port);\n f.channel().closeFuture().sync();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n work.shutdownGracefully();\n boss.shutdownGracefully();\n }\n }", "public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }", "@Override\n public void onStartup(ServletContext servletContext) throws ServletException {\n this.addServlet(servletContext);\n }", "public NettyHttpFileHandler() {\r\n synchronized(_lock) {\r\n if (mimeTypesMap == null) {\r\n InputStream is = this.getClass().getResourceAsStream(\"/server.mime.types\");\r\n if (is != null) {\r\n mimeTypesMap = new MimetypesFileTypeMap(is);\r\n } else {\r\n \tlogger.debug(\"Cannot load mime types!\");\r\n }\r\n }\r\n }\r\n }", "private Handler getWebAppHandler(String warLocation, Server server) {\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n File warFile = new File(warLocation);\n if (!warFile.exists()) {\n throw new RuntimeException(\"Unable to find WAR File: \" + warFile.getAbsolutePath());\n }\n webapp.setWar(warFile.getAbsolutePath());\n webapp.setExtractWAR(true);\n\n Configuration.ClassList classlist = Configuration.ClassList.setServerDefault(server);\n classlist.addBefore(\n \"org.eclipse.jetty.webapp.JettyWebXmlConfiguration\",\n \"org.eclipse.jetty.annotations.AnnotationConfiguration\");\n\n webapp.setAttribute(\n \"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\",\n \".*/[^/]*servlet-api-[^/]*\\\\.jar$|.*/javax.servlet.jsp.jstl-.*\\\\.jar$|.*/[^/]*taglibs.*\\\\.jar$\");\n\n return webapp;\n }", "public static void main(String[] args) throws Exception {\n WebServer webServer = new WebServer(8080);\n \n // Create a xmlRpc server using the web server\n XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();\n \n // Create classes manager and add the classes which offer services (methods)\n PropertyHandlerMapping phm = new PropertyHandlerMapping();\n phm.addHandler(\"Test\", chat.server.Test.class);\n \n // Add classes manager to xmlRpc server \n xmlRpcServer.setHandlerMapping(phm);\n \n // Setup xmlRpc server\n XmlRpcServerConfigImpl serverConfig = (XmlRpcServerConfigImpl) xmlRpcServer.getConfig();\n serverConfig.setEnabledForExtensions(true);\n serverConfig.setContentLengthOptional(false);\n\n // Start web server\n webServer.start(); \n }", "@Override\r\n public void setServletContext(ServletContext arg0) {\n \r\n }", "public void initEasyJWeb() {\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.execute.EasyJWeb.initialization.applications\"));\r\n\t\tif (resourceLoader == null) {\r\n\t\t\tif (servletContext != null)\r\n\t\t\t\tresourceLoader = new ServletContextResourceLoader(\r\n\t\t\t\t\t\tservletContext);\r\n\t\t\telse\r\n\t\t\t\tresourceLoader = new FileResourceLoader();\r\n\t\t}\r\n\t\tinitContainer();\r\n\t\tFrameworkEngine.setWebConfig(webConfig);// 初始化框架工具\r\n\t\tFrameworkEngine.setContainer(container);// 在引擎中安装容器\r\n\t\tAjaxUtil.setServiceContainer(new AjaxServiceContainer(container));// 初始化Ajax容器服务\r\n\t\tinitTemplate(); // 初始化模版\r\n\t\tinvokeApps();// 在应用启动的时候启动一些配置好的应用\r\n\t\thaveInitEasyJWeb = true;\r\n\t\tlogger.info(I18n.getLocaleMessage(\"core.EasyJWeb.initialized\"));\r\n\t}", "@Override\n public void initialize(ServerConfiguration config) {\n }", "public interface ServletContextAware {\r\n\r\n /**\r\n * Called by GuiceContainerFactory when initialize module.\r\n *\r\n * @param servletContext ServletContext object to be used by this object\r\n */\r\n void setServletContext(ServletContext servletContext);\r\n\r\n}", "List<HttpServletServer> getHttpServers();", "public void configureServerInitializationComponents(AppConfiguration appConfig,\n\t SpringBeansXMLBuilder builder);", "public WPIFlightServer(ServerConfig config) {\n\t\tthis.config = config;\n\t\tlock = new Lock(config.getLockTime());\n\t}", "public Server() {\n\t\tsession = new WelcomeSession();\n\t\tmPort = DEFAULT_PORT;\n\t\texecutor = Executors.newCachedThreadPool();\n\t}", "void startServer(int port) throws Exception;", "public static void main(String[] argv) throws Exception {\n int port = 7777;\n if (argv.length > 0) {\n port = Integer.parseInt(argv[0]);\n }\n HttpsServer server = HttpsServerFactory.createServer(\"localhost\", port);\n server.createContext(\"/\", new LogHandler());\n server.start();\n while (true) {\n }\n }", "@Override\r\n public void registerStompEndpoints(StompEndpointRegistry registry) {\n registry.addEndpoint(\"/server_socket\").withSockJS();\r\n }", "public static EmbeddedTestServer createAndStartServerWithPort(Context context, int port) {\n Assert.assertNotEquals(\"EmbeddedTestServer should not be created on UiThread, \"\n + \"the instantiation will hang forever waiting for tasks to post to UI thread\",\n Looper.getMainLooper(), Looper.myLooper());\n EmbeddedTestServer server = new EmbeddedTestServer();\n return initializeAndStartServer(server, context, port);\n }", "public static void main(String[] args) throws Exception {\n Set<Users> likedSet = new HashSet<>();\n new Server(8080){{\n setHandler(new ServletContextHandler() {{\n addServlet(new ServletHolder(new ServletUsers(likedSet)) ,\"/users\");\n addServlet(new ServletHolder(new ServletsLiked(likedSet)) ,\"/liked\");\n addServlet(new ServletHolder(new StaticServlet()),\"/assets/*\");\n /* addServlet(new ServletHolder(new ServletsLinked(likedSet)) ,\"/liked\");\n addServlet(new ServletHolder(new ServletMessages()) ,\"/messages\");*/\n }}\n );\n start();\n join();\n }};\n\n }", "public static void main(String[] args) throws IOException, URISyntaxException {\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (Exception e) { \r\n \tSystem.out.println(\"algo no jalo\"); \t\r\n }\r\n\t\t\r\n \tHost host=new Host();\r\n \t \t \t\r\n \thttpServer = HttpServer.create(new InetSocketAddress(puerto), 0);\r\n \t\r\n \thttpServer.createContext(\"/\", new Principal());\t\t//esta es la pagina principal\r\n \thttpServer.createContext(\"/apagado\", new Apagado());\r\n \thttpServer.createContext(\"/descarga\", new Descarga());// llama a la pagina como video1.mp4\r\n \thttpServer.createContext(\"/openFileDialog\", new OpenFileDialog());\r\n \r\n \thttpServer.setExecutor(null);\r\n \thttpServer.start();\r\n \t\r\n\r\n \thost.abreLocalHost();\r\n \thost.cargaGPIO();\r\n\t}" ]
[ "0.6789622", "0.6547609", "0.64915574", "0.64619523", "0.63971645", "0.63183665", "0.6309079", "0.6256339", "0.6236684", "0.6232781", "0.6143034", "0.61164004", "0.608301", "0.6077467", "0.60725653", "0.606573", "0.6063585", "0.6032832", "0.6007324", "0.59867233", "0.59284395", "0.59216714", "0.59017813", "0.5884065", "0.5873903", "0.58598447", "0.5853385", "0.58351505", "0.5825306", "0.5816657", "0.57718027", "0.5747115", "0.5719899", "0.57181114", "0.5717804", "0.57032007", "0.5689369", "0.5677136", "0.5674688", "0.5665404", "0.5652634", "0.5609125", "0.56056905", "0.56044495", "0.55842054", "0.5583633", "0.5579626", "0.55389714", "0.55374104", "0.552591", "0.55083305", "0.54969156", "0.5484377", "0.548412", "0.5483456", "0.5478799", "0.54749984", "0.5457412", "0.54533684", "0.5453311", "0.54502904", "0.5436648", "0.5431432", "0.5430979", "0.5421062", "0.54175705", "0.5415375", "0.5415093", "0.5409917", "0.5402037", "0.5387282", "0.5387282", "0.5378571", "0.53417546", "0.5326815", "0.5325057", "0.5315596", "0.52999467", "0.5296252", "0.52823806", "0.5281191", "0.5275429", "0.5269218", "0.5258112", "0.52399236", "0.5234059", "0.5227337", "0.5225336", "0.5219628", "0.5214596", "0.52120554", "0.5205117", "0.5198015", "0.51951855", "0.5194669", "0.51777166", "0.51622343", "0.5159688", "0.51593953", "0.5158751" ]
0.5926793
21
Creating push listener service.
public AmazonPushListenerService() { super(AmazonPushListenerService.class.getName()); // Measure singleton if(MEASURE_ACTIVE) { getMeasureProcessing(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createAndListen() {\n\n\t\t\n\t}", "public interface IPushListener {\n /**\n * 获取push返回的数据\n * @param data\n * @param pushType 代表推送消息的类型,\n * PushType:1. 为CMD时,消息为透传消息,消息并未展示在通知栏\n * 2. 为NOTIFIY时,消息已经显示在通知栏了,业务端不用在通知栏展示消息了\n */\n public void onPushMessageReceive(MessageBean data,PushType pushType);\n\n\n /**\n * 返回推送是否在线,在线才能收到推送,否则收不到\n * 如果无其他需求可以不处理\n *\n * @param online\n */\n public void isOnline(boolean online);\n\n /**\n * 返回推送是开启还是关闭,当业务端设置推送开启/关闭成功时会调用\n * 设置推送的开启/关闭参考{@PushInterface#switchPush(boolean)}\n *\n * @param toggle 开启或者关闭push的回调\n */\n public void onPushToggle(boolean toggle);\n\n /**\n *\n * @param token 注册到服务端的token\n * @param status 注册到服务端的 platStatus\n * @param success true 注册push成功,false 注册失败\n * 如果返回失败,业务端需要考虑重新登录push。\n */\n public void onPushRegister(String token,PlatStatus status,boolean success);\n\n /**\n * 将注册的push token 和push 渠道返回给业务端\n * @param token\n * @param status\n */\n public void onPushTokenReceive(String token,PlatStatus status);\n\n\n}", "public RNPushNotificationRegistrationService() {\n super();\n s_instance = this;\n }", "public NotificationService() {\n super(\"NotificationService\");\n }", "public NotificationReceiverService() {\n }", "Future<CreateListenerResponse> createListener(\n CreateListenerRequest request,\n AsyncHandler<CreateListenerRequest, CreateListenerResponse> handler);", "public SubscriptionListener() {\n this.protocol = \"stomp\";\n }", "private void createMBeanNotificationListener(ObjectName mBeanName, NotificationListener listener) {\n log.debug(\"Adding notification listener for JMXClient \" + url.getURLPath());\n try {\n mbsc.addNotificationListener(mBeanName, listener, null, null);\n } catch (InstanceNotFoundException | IOException e) {\n log.error(\"Unable to add notification listener\", e);\n }\n }", "public abstract void addServiceListener(PhiDiscoverListener listener);", "Service newService();", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tLog.e(\"androidtalk\", \"service created\") ;\n\t\tSystem.out.println(\"androidtalk-service created\") ;\n\t\t\n\t}", "public GCMIntentService() {\n super(\"GCMIntentService\");\n\n }", "private void registerWithNotificationHubs() {\n Intent intent = new Intent(this, RegistrationIntentService.class);\n startService(intent);\n }", "@Override\n\tpublic P createPusher(Address address, Puller<byte[]> puller) {\n\t\tPusher<byte[]> client = puller.newClient();\n\t\treturn ReflectivePusher.create(protocol, implementer, client, (method, arguments) -> {\n\t\t\ttry {\n\t\t\t\treturn Util.invocationToRequest(address, method.getName(), method.getParameterTypes(), arguments);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t}", "public SimpleMessageListenerContainer() {\n\t}", "public void InitListener()\n {\n Intent listener = new Intent(this, SmsListener.class);\n listener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startService(listener);\n }", "public void listen()\n {\n service = new BService (this.classroom, \"tcp\");\n service.register();\n service.setListener(this);\n }", "public interface SwrvePushManager {\n void processMessage(final Bundle msg);\n}", "public interface OnMessagingServiceConnetcedListenner {\n void onServiceConnected();\n}", "public interface OnServiceConnectionListener {\n}", "EventChannel create();", "@Override\n public void onCreate() {\n if (messageServiceUtil == null)\n messageServiceUtil = new MessageServiceUtil();\n messageServiceUtil.startMessageService(this);\n keepService2();\n }", "public NotificationService(String name) {\n super(name);\n }", "@Override\r\n\t\tpublic ApplicationListener createApplicationListener() {\n\t\t\treturn new FishchickenGame();\r\n\t\t}", "public interface ServiceConnectionListener {\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景TTS回调监听\n *\n * @param callbackListener 返回TTS到客户端的Binder\n */\n void onCallbackNotify(ICallbackListener callbackListener);\n\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景回调监听\n *\n * @param sceneNotifyListener 返现场景状态到客户端的Binder\n */\n void onSceneNotifyListener(ISceneNotifyListener sceneNotifyListener);\n}", "public interface PushFireBaseTokenRequestListener {\n\n public void tokenPushed();\n}", "public interface WebsocketLocalOutputCallbackRegisterService {\n\n public void subscribe(int tenantId, String adaptorName, String topic, Session session);\n\n public void unsubscribe(int tenantId, String adaptorName, String topic, Session session);\n}", "public void startListening();", "SourceBuilder createService();", "public abstract void listen(ServiceConfig serviceConfig) throws IOException;", "void onListeningStarted();", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateMethod(), responseObserver);\n }", "@Override\n\tpublic void onCreate() {\n\t\tnotifyServiceReceiver = new NotifyServiceReceiver();\n\t\tsuper.onCreate();\n\t}", "interface PlatformServiceListener {\n\t\tpublic void onServiceAvailable(PlatformInit service);\n\t}", "public GetConnListener() {\n }", "public interface ServiceListener {\r\n\t\tpublic void startService(String s);\r\n\r\n\t\tpublic void stopNotification();\r\n\t}", "private void registerGCM()\n {\n Intent intent = new Intent(this, GcmIntentService.class);\n intent.putExtra(\"key\", \"register\");\n startService(intent);\n }", "public interface MnsService {\n\n void init();\n\n String pop();\n\n boolean sendMsg(BaseConsumer.Message entity);\n\n String getTopicName();\n\n void destroy();\n}", "public ConversionListener createListener(ConfigProperties cprop){\n\t\tjlog.info(\"Create Listener \"+cprop.getProperty(\"PROJ.id\"));\n\t\treturn new ConversionListener(cprop.getProperty(\"PROJ.id\"));\n\t}", "private Command createPushCommand() {\n\t\treturn new PushCommand();\n\t}", "public MyListener() {\r\n }", "public interface IMessageService {\n\n /**\n * Notifies subscribed clients with the given message.\n *\n * @param m Message (e.g. object, status, warning)\n */\n void notify(Message m);\n\n /**\n * Notifies subscribed clients with the given message.\n *\n * @param m Message (e.g. object, status, warning)\n */\n void notify(PushMessage m);\n\n /**\n * Notifies subscribed clients with the given message and push-type (e.g. ALERT)\n * \n * @param data message which should be send to the client\n * @param type type of the notification (manual step, ...)\n */\n void notify(String data, PushType type);\n\n /**\n * Subscribes a client for push-notifications.\n *\n * @param id id of the client (address)\n */\n void subscribe(String id);\n\n /**\n * unsubscribes a client for push-notifications.\n *\n * @param id id of the client (address)\n */\n void unsubscribe(String id);\n\n /**\n * Informs all subscribed devices that something went wrong and the brewing process wasnt\n * successfull and could cause damage\n * \n * @param text message which should be shown to the user\n */\n void alarm(String text);\n}", "public CreateRemoteClassic<Msg, Ref> create();", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onCreate() {\n super.onCreate();\n createVirtualEnvironment();\n createNotificationChannel();\n }", "public ServiceExampleWorker() {\n super(\"ServiceExampleWorker\");\n shouldExecute = true;\n messageBinder = new IMessageBinder.Stub() {\n private List<ISubscriber> subscriberList = new ArrayList<>();\n\n @Override\n public void addSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.add(subscriber);\n }\n\n @Override\n public void removeSubscriber(ISubscriber subscriber) throws RemoteException {\n subscriberList.remove(subscriber);\n }\n\n @Override\n public void sendUpdate(String data) throws RemoteException {\n for (ISubscriber subscriber : subscriberList) {\n subscriber.send(data);\n }\n }\n\n @Override\n public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws RemoteException {\n\n }\n };\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n \tmServiceMessenger = new Messenger(service);\r\n // We want to monitor the service for as long as we are\r\n // connected to it.\r\n try {\r\n Message message = Message.obtain(null, WATCHiTServiceInterface.REGISTER_CLIENT);\r\n message.replyTo = mMessenger;\r\n mServiceMessenger.send(message);\r\n } catch (RemoteException e) {\r\n // In this case the service has crashed before we could even\r\n // do anything with it; we can count on soon being\r\n // disconnected (and then reconnected if it can be restarted)\r\n // so there is no need to do anything here.\r\n }\r\n // Toast.makeText(MainActivity.this, R.string.remote_service_bound, Toast.LENGTH_SHORT).show();\r\n }", "public void create(yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request, responseObserver);\n }", "@Override\r\n\tnative long createListenerProxy(EventSink eventSink);", "void subscribeReceiveListener(IDataReceiveListener listener);", "public ServiceEvent() {\n // eventSenderID and eventSenderClass are initialized by the OperatingSystem! \n }", "private DefaultListener() {\n }", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "public interface ServiceCallListener extends ServiceInstanceCallListener, RemoteServiceCallListener {\r\n\r\n}", "public static ServerSocket createServerSocket() {\n \t\n try {\n listener = new ServerSocket(PORT,1, InetAddress.getByName(hostname));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return listener;\n }", "ProgramActuatorService createProgramActuatorService();", "Fog_Services createFog_Services();", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t//Toast.makeText(getApplicationContext(), \"reasart\", 0).show();\n\t\t activityList = new ArrayList<FragmentActivity>(); \n\t\t\n\t\tmPushAgent = PushAgent.getInstance(this);\n\t\tmPushAgent.setDebugMode(true);\n\t\t\n\t\t//setPushListener();\n\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n messengerService = new Messenger(service);\n messengerServiceBound = true;\n }", "public interface Provider {\n //Connection connect(String url, java.util.Properties info)\n Service newService();\n}", "public static void StartRegisterToGCM(Context context) {\n Intent intent = new Intent(context, FooDoNetInstanceIDListenerService.class);\n intent.setAction(ACTION_REGISTER_TO_GCM);\n //parentForCallback = (IFooDoNetServerCallback)context;\n context.startService(intent);\n }", "@Override\n\tpublic void registListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.register(listener);\n\t}", "public interface PortPairGroupService extends ListenerService<PortPairGroupEvent, PortPairGroupListener> {\n\n /**\n * Returns if the port pair group is existed.\n *\n * @param portPairGroupId port pair group identifier\n * @return true or false if one with the given identifier exists.\n */\n boolean exists(PortPairGroupId portPairGroupId);\n\n /**\n * Returns the number of port pair groups known to the system.\n *\n * @return number of port pair groups.\n */\n int getPortPairGroupCount();\n\n /**\n * Returns an iterable collection of the currently known port pair groups.\n *\n * @return collection of port pair groups.\n */\n Iterable<PortPairGroup> getPortPairGroups();\n\n /**\n * Returns the portPairGroup with the given identifier.\n *\n * @param portPairGroupId port pair group identifier\n * @return PortPairGroup or null if port pair group with the given identifier is not\n * known.\n */\n PortPairGroup getPortPairGroup(PortPairGroupId portPairGroupId);\n\n /**\n * Creates a PortPairGroup in the store.\n *\n * @param portPairGroup the port pair group to create\n * @return true if given port pair group is created successfully.\n */\n boolean createPortPairGroup(PortPairGroup portPairGroup);\n\n /**\n * Updates the portPairGroup in the store.\n *\n * @param portPairGroup the port pair group to update\n * @return true if given port pair group is updated successfully.\n */\n boolean updatePortPairGroup(PortPairGroup portPairGroup);\n\n /**\n * Deletes portPairGroup by given portPairGroupId.\n *\n * @param portPairGroupId id of port pair group to remove\n * @return true if the give port pair group is deleted successfully.\n */\n boolean removePortPairGroup(PortPairGroupId portPairGroupId);\n}", "ConferenceScheduleBuilderService createEventsFromLunchToNetwork();", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"service on create\");\n\t\tsuper.onCreate();\n\t}", "private UDPSender(final URI serverURI) {\n\t\tsuper(serverURI);\n\t\t\n\t\t\t\t\n\t\t//InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());\n\t\tchannelStateListener.addChannelStateAware(this);\n\t\tloggingHandler = new LoggingHandler(InternalLogLevel.ERROR, true);\t\t\n\t\tchannelFactory = new NioDatagramChannelFactory(workerPool);\n\t\tbstrap = new ConnectionlessBootstrap(channelFactory);\n\t\tbstrap.setPipelineFactory(this);\n\t\tbstrap.setOption(\"broadcast\", true);\n\t\tbstrap.setOption(\"localAddress\", new InetSocketAddress(0));\n\t\tbstrap.setOption(\"remoteAddress\", new InetSocketAddress(serverURI.getHost(), serverURI.getPort()));\n\t\tbstrap.setOption(\"receiveBufferSizePredictorFactory\", new FixedReceiveBufferSizePredictorFactory(2048));\n\t\t\n\t\tlisteningSocketAddress = new InetSocketAddress(\"0.0.0.0\", 0);\n\t\t//listeningSocketAddress = new InetSocketAddress(\"127.0.0.1\", 0);\n\t\t\t\n\t\t//senderChannel = (NioDatagramChannel) channelFactory.newChannel(getPipeline());\n\t\tsenderChannel = bstrap.bind();\n\t\tcloseGroup.add(senderChannel);\n\t\tlog(\"Listening on [\" + senderChannel.getLocalAddress()+ \"]\");\t\t\t\t\t\n\t\t\n\t\t\n//\t\tsenderChannel.bind().addListener(new ChannelFutureListener() {\n//\t\t\tpublic void operationComplete(ChannelFuture f) throws Exception {\n//\t\t\t\tif(f.isSuccess()) {\n//\t\t\t\t\tlog(\"Listening on [\" + f.getChannel().getLocalAddress()+ \"]\");\t\t\t\t\t\n//\t\t\t\t} else {\n//\t\t\t\t\tlog(\"Failed to start listener. Stack trace follows\");\n//\t\t\t\t\tf.getCause().printStackTrace(System.err);\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\tsenderChannel.getConfig().setBufferFactory(new DirectChannelBufferFactory());\n//\t\tsenderChannel.connect(socketAddress).addListener(new ChannelFutureListener() {\n//\t\t\t@Override\n//\t\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n//\t\t\t\tconnected.set(true);\t\n//\t\t\t\tsentryState.setState(SentryState.CALLBACK);\n//\t\t\t}\n//\t\t});\n\t\t\n\t\t\n\t\t//socketAddress = new InetSocketAddress(\"239.192.74.66\", 25826);\n\t\tsendHello();\n\t}", "public static IPublishManager create() {\n\t\treturn null;\r\n\t}", "void register(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "public interface ChatServiceListener {\n\n public final static byte STATUS_CONNECT_SUCCESS = 1;\n\n public final static byte STATUS_CONNECT_CLOSED = 0;\n\n public final static byte STATUS_CONNECT_ERROR = 0;\n\n\n /**\n * 当接收到系统消息\n *\n */\n public void onMessageResponse(String msg);\n\n /**\n * 当服务状态发生变化时触发\n *\n */\n public void onServiceStatusConnectChanged(int statusCode);\n}", "public interface NotificationCatcher {\n public static final String COPYRIGHT_2009_2010 = Constants.COPYRIGHT_2009_2010;\n \n static final String SCM_REVISION = \"$Revision: 1.2 $\"; //$NON-NLS-1$\n\n /**\n * When the Manager is started, the Manager will invoke this method. The\n * Manager needs a way to start the NotificationCatcher when the Manager\n * starts. After that point, the NotificationCatcher can place Notifications\n * on the Manager's queue. This method will allow the NotificationCatcher to\n * do any initialization to receive events from devices (such as listening\n * on a network socket) after it has been instantiated by the\n * NotificationCatcherFactory.\n * \n * @see NotificationCatcherFactory\n * @see Manager\n */\n public void startup() throws AMPException;\n \n /**\n * When the Manager is shutdown, the Manager will invoke this method. For\n * any resources that were obtained via the NotificationCatcher's\n * constructor or {@link #startup()}, this method will allow those\n * resources (such as network sockets) to be released when the Manager is\n * shutdown.\n * \n * @see Manager\n */\n public void shutdown();\n \n /**\n * Get the URL that this NotificationCatcher listens on so Devices know\n * where to post Notifications. This URL is used when a subscription request (\n * {@link Commands#subscribeToDevice(DeviceContext, String, StringCollection, URL)})\n * is sent to a device so that the device knows where to send the\n * notifications (events).\n * \n * @return the URL that this NotificationCatcher listens on so Devices know\n * where to post Notifications. This value will be used when sending\n * subscription requests to Devices. This may be an https or http\n * url. Typically, the path part of the URL will not be relevant,\n * the relevant parts are the protocol, hostname, and port.\n */\n public URL getURL();\n}", "public static ServiceProvider createServiceProvider() {\n \t//return new ActiveMQProvider();\n \treturn new RSPServiceProvider();\n }", "EndPoint createEndPoint();", "public NotificationService(@Value(\"${event.notification.server.address}\") String address,\n\t\t\t@Value(\"${event.notification.server.port}\") String port,\n\t\t\t@Value(\"${event.notification.server.context}\") String context) {\n\n\t\t// building uri of the notification server\n\t\tStringBuilder notificationServerURIsb = new StringBuilder();\n\t\tnotificationServerURIsb.append(address).append(':').append(port).append(context);\n\t\tthis.notificationsServerUri = notificationServerURIsb.toString();\n\n\t\tHttpClient httpClient = HttpClient.create().wiretap(true);\n\n\t\t// configuring a webclient instance\n\t\tWebClient.Builder webClientBuilder = WebClient.builder()\n\t\t\t\t.clientConnector(new ReactorClientHttpConnector(httpClient)).baseUrl(notificationsServerUri)\n\t\t\t\t.defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);\n\t\tthis.webClient = webClientBuilder.build();\n\t}", "public void onServiceRegistered() {\r\n \t// Nothing to do here\r\n }", "@Override\n\tpublic void onDestroy() {\n\t \tIntent service = new Intent(Intent.ACTION_RUN);\n\t \tservice.putExtra(\"flags\",PushService.FLAGS_START);\n\t \tservice.setClass(this, PushService.class); \n\t \tstartService(service);\n\t\tsuper.onDestroy();\n\t}", "public ServiceMessage() {\r\n\t}", "private NotificationPublisher() {\n subscribers = new ArrayList<>();\n }", "@Override\r\n public void onCreate() {\r\n Log.d(TAG, \"on service create\");\r\n }", "public ReceiveAlarmService() {\n gson = new GsonBuilder().setPrettyPrinting().create();\n database = new DBConnection();\n }", "private static interface Service {}", "@Override\n public BrokerMessageListener create(long brokerMessageListenerId) {\n BrokerMessageListener brokerMessageListener = new BrokerMessageListenerImpl();\n\n brokerMessageListener.setNew(true);\n brokerMessageListener.setPrimaryKey(brokerMessageListenerId);\n\n return brokerMessageListener;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n WebsocketService.WebsocketBinder binder = (WebsocketService.WebsocketBinder) service;\n mService = binder.getService();\n mWebsocketServiceBound = true;\n\n if (mAvatarUrl == null) {\n mAvatarUrl = mService.getAvatarUrl();\n }\n\n mRoomName = mService.getCurrentRoomName();\n\n ArrayList<User> users = mService.getUsersInRoom(mRoomName.equals(getString(R.string.default_room)) ? \"\" : mRoomName);\n\n ArrayList<ChatItem> messages = mService.getMessages(mRoomName.equals(getString(R.string.default_room)) ? \"\" : mRoomName);\n\n if (messages != null && users != null) {\n HashMap<String, User> userMap = new HashMap<>();\n for (User user : users) {\n userMap.put(user.Id, user);\n }\n\n clearMessages();\n for (ChatItem chatItem : messages) {\n User user = userMap.get(chatItem.Id);\n if (user != null) {\n addMessage(chatItem, user, false);\n }\n else {\n // self\n user = userMap.get(chatItem.getRecipient());\n addMessage(chatItem, user, false);\n }\n\n }\n\n prepareChatDisplay();\n }\n }", "public interface SubscriptionListener {\n public void onReceivedMessage(String message);\n}", "public interface INotification {\n\n String WebService = \"https://fcm.googleapis.com/\";\n\n @Headers({\n \"Content-Type:application/json\",\n \"Authorization:key=AAAAnzTOKs8:APA91bFZ1fSBTifV40epf-sRpLrH8woY-ZgVWCHFcvHnokfbP3HSt8lUj2AXc0KkHEn3jfV1_SlhCzjTurAp6wbsDJhOjnsMNAFg5UrRuel0nJuJEPdgcaxgo20OPxMdWgKqcq3O0s5t\"\n })\n @POST(\"fcm/send\")\n Call<ReturnMessage> enviarNotificacao(@Body Sender body);\n\n\n //******************* SERVICE RETROFIT ******************************\n OkHttpClient okHttpClient = new OkHttpClient().newBuilder()\n .connectTimeout(15, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS)\n .build();\n\n public static final Retrofit retrofit = new Retrofit.Builder()\n\n .baseUrl(WebService)\n .client(okHttpClient)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n //*******************************************************************\n\n\n}", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"push\";//getString(R.string.channel_name);\n String description = \"pushnotif\";//getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"Stopwatch\", \"StopWatch\", NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(\"Stopwatch Notifications\");\n Objects.requireNonNull(this.getSystemService(NotificationManager.class)).createNotificationChannel(channel);\n }\n }", "private void registerLocalService() {\n WifiP2pDnsSdServiceInfo serviceInfo =\n WifiP2pDnsSdServiceInfo.newInstance(WifiDirectUtilities.SERVICE_NAME,\n \"_\" + WifiDirectUtilities.SERVICE_TYPE + \"._\" + WifiDirectUtilities.SERVICE_PROTOCOL,\n WifiDirectUtilities.SERVICE_RECORD);\n\n // Add the local service, sending the service info, network channel,\n // and listener that will be used to indicate success or failure of\n // the request.\n mManager.addLocalService(mChannel, serviceInfo, new WifiP2pManager.ActionListener() {\n @Override\n public void onSuccess() {\n // Command successful! Code isn't necessarily needed here,\n // Unless you want to update the UI or add logging statements.\n }\n\n @Override\n public void onFailure(int arg0) {\n // Command failed. Check for P2P_UNSUPPORTED, ERROR, or BUSY\n }\n });\n WifiDirectDnsSdListener listener = new WifiDirectDnsSdListener(this);\n mManager.setDnsSdResponseListeners(mChannel, listener, listener);\n }", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "private void registerWithService() {\n\n try {\n\n Message msg = Message.obtain(null, TallyDeviceService.MSG_REGISTER_MESSAGE_ACTIVITY);\n if (msg == null) { return; }\n msg.obj = this;\n msg.replyTo = messenger;\n service.send(msg);\n\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Line 306 :: \" + e.getMessage());\n service = null;\n }\n\n }", "public AutoSenderService() {\r\n\t\tsuper();\r\n\t}", "EventChannel create(Context context);", "@RemoteServiceRelativePath(\"greet\")\npublic interface GreetingService extends RemoteService {\n\tString greetServer(String name) throws IllegalArgumentException;\n\tString registrazione(String nome, String nick, String password, String mail) throws IllegalArgumentException;\n\tString login(String nick, String passw) throws IllegalArgumentException;\n\tString caricaevento(String nome, String luogo, String descs,String dal,String al,String idKey, int check, String cause) throws IllegalArgumentException;\n\tString cancellaevento(String id,String idKey) throws IllegalArgumentException;\n\tString chiudievento(String id,String idKey) throws IllegalArgumentException;\n\tString insertJoin(String idEvento, String nome, String nick, String commento,int disp) throws IllegalArgumentException;\n\tLinkedList<Partecipa> getAllUsersJoin(String idEvento) throws IllegalArgumentException;\n\tLinkedList<Evento> getAllUserEvents(String id) throws IllegalArgumentException;\n\tLinkedList<Evento> getAllEvents() throws IllegalArgumentException;\n}", "public interface StackMessageFactory {\n /**\n * Make a new SIPServerResponse given a SIPRequest and a message\n * channel.\n *\n * @param sipRequest is the incoming request.\n * @param sipTransaction is the message channel on which this request was\n * received.\n */\n public ServerRequestInterface newSIPServerRequest(\n SIPRequest sipRequest,\n SIPTransaction sipTransaction);\n\n /**\n * Generate a new server response for the stack.\n *\n * @param sipResponse is the incoming response.\n * @param msgChannel is the message channel on which the response was\n * received.\n */\n public ServerResponseInterface newSIPServerResponse(\n SIPResponse sipResponse,\n MessageChannel msgChannel);\n}", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "public interface FirebaseService {\n public void init();\n}", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "@Nonnull \r\n\tpublic static <T> T create(\r\n\t\t\t@Nonnull Class<T> listener, \r\n\t\t\t@Nonnull final Observer<? super Dynamic> bindTo) {\r\n\t\tfinal InvocationHandler handler = new InvocationHandler() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args)\r\n\t\t\t\t\tthrows Throwable {\r\n\t\t\t\tbindTo.next(new Dynamic(method.getName(), args));\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\treturn listener.cast(Proxy.newProxyInstance(listener.getClassLoader(), new Class<?>[] { listener }, handler));\r\n\t}", "public GroovyShellService() {\n \t\tthis(6789);\n \t}", "public static void initService() {\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://166.111.68.66:2042/news/\")\n .addConverterFactory(new Converter.Factory() {\n Gson gson = new Gson();\n\n @Override\n public Converter<ResponseBody, ?> responseBodyConverter(final Type type, final Annotation[] annotations, Retrofit retrofit) {\n return new Converter<ResponseBody, Object>() {\n @Override\n public Object convert(ResponseBody value) throws IOException {\n try {\n return gson.getAdapter(TypeToken.get(type)).fromJson(value.charStream());\n } finally {\n value.close();\n }\n }\n };\n }\n }).build();\n newsdetailHttpService = retrofit.create(GetNewsDetailService.NewsDetailHttpService.class);\n }", "public void onCreate(final Context context) {\n\n\t\tthis.context = context;\n\t\tpreferencesuser = context.getSharedPreferences(\n\t\t\t\tLogin.FILE_USER, Context.MODE_PRIVATE);\n\t\tSystem.out.println(\"创建推送服务\");\n\t\tinit();\n\t\thandler = new Handler() {\n\t\t\t@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tif (msg.what == 1) {\n\t\t\t\t\tLog.i(\"Push\", (String) msg.obj);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsoundRing(context);\n\t\t\t\t\t} catch (IllegalArgumentException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (SecurityException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IllegalStateException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\tLog.i(\"Push\", \"-----------------------------\");\n//\t\t\t\t\tpreferencesuser = context.getSharedPreferences(\n//\t\t\t\t\t\t\tLogin.FILE_USER, Context.MODE_PRIVATE);\n\t\t\t\t\tString DBName = preferencesuser.getString(Login.KEY_NAME,\n\t\t\t\t\t\t\t\"1\");\n\t\t\t\t\thelper = new DBHelper(context, DBName + \"_DB\");\n\t\t\t\t\tmgr = new DBManager(helper);\n\t\t\t\t\tJSONObject object;\n\t\t\t\t\tString title = null;\n\t\t\t\t\tString comtent = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tobject = new JSONObject((String) msg.obj);\n\t\t\t\t\t\ttitle = object.getString(\"TITLE\");\n\t\t\t\t\t\tcomtent = object.getString(\"COMTENT\");\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\n\t\t\t\t\tMessageDataEntity message = new MessageDataEntity();\n\t\t\t\t\tmessage.setMessageTitle(title);\n\t\t\t\t\tmessage.setMessage(comtent);\n\t\t\t\t\tmgr.addMessage(message);\n\n\t\t\t\t\tMessage msg55 = new Message();\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tint weidu = preferencesuser.getInt(\"weidu\", 1);\n\t\t\t\t\t\n\t\t\t\t\tmsg55.what = 5;\n\t\t\t\t\tmsg55.obj = weidu;\n\t\t\t\t\tmHandler.sendMessage(msg55);\n\n\t\t\t\t} else if (msg.what == 2) {\n\t\t\t\t\tLog.i(\"Push\", \"连接成功\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclient.subscribe(myTopic, 1);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (msg.what == 3) {\n\t\t\t\t\tLog.i(\"Push\", \"连接失败,系统正在重连\");\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tstartReconnect();\n\n\t}" ]
[ "0.6787826", "0.6293792", "0.5935405", "0.5908355", "0.5878875", "0.5795773", "0.57620096", "0.57600206", "0.5675735", "0.5652258", "0.56475514", "0.5631478", "0.5607686", "0.5594354", "0.55360585", "0.5534375", "0.5532405", "0.5527964", "0.5525782", "0.55140036", "0.550724", "0.54664844", "0.5464587", "0.54326695", "0.5353908", "0.5353454", "0.5346119", "0.53445256", "0.53282833", "0.53267455", "0.5318154", "0.5316071", "0.53097886", "0.5308139", "0.5303817", "0.53011155", "0.5300559", "0.5291258", "0.52823746", "0.52813536", "0.5266412", "0.52646345", "0.52564967", "0.52535945", "0.5239253", "0.52291805", "0.52193296", "0.52029306", "0.5194312", "0.5187471", "0.5186053", "0.5184257", "0.51703894", "0.5169872", "0.5168227", "0.5164931", "0.51647353", "0.5151988", "0.5144962", "0.51383525", "0.51352036", "0.51324207", "0.51263565", "0.5115891", "0.5111073", "0.5106173", "0.5105433", "0.5104854", "0.5101582", "0.50927347", "0.50913393", "0.5089195", "0.5085803", "0.5081545", "0.50799084", "0.5073432", "0.50672317", "0.50662917", "0.50658226", "0.5065146", "0.50629926", "0.5060843", "0.50587636", "0.5058443", "0.5054175", "0.50536937", "0.5053497", "0.50520575", "0.50485855", "0.5040188", "0.5039129", "0.5038028", "0.50260085", "0.50231093", "0.5019287", "0.5018045", "0.5016909", "0.5012119", "0.5009667", "0.50078887" ]
0.63334054
1
Registration process is started by calling startRegister() at AmazonSNSRegHandler. When the registration ID is ready, ADM calls onRegistred(). ID is transmitted to webserver, so webserver knows app instance. If device is rotated or changed for any reason, app passes new registration ID to webserver,
@Override protected void onRegistered(final String newRegistrationId) { try { snsToken = newRegistrationId; sendRegistrationToServer(snsToken, true); } catch (Exception e) { //Log info Log.e("SNSRegistration", "Amazon Token not retrieved"); sendRegistrationToServer("", false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void register() {\n Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);\n registrationIntent.setPackage(GSF_PACKAGE);\n registrationIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n registrationIntent.putExtra(EXTRA_SENDER, senderId);\n context.startService(registrationIntent);\n }", "private void gcmRegister() {\n\t\taController = (Controller) getApplicationContext();\n\n\t\t// Check if Internet present\n\t\tif (!aController.isConnectingToInternet()) {\n\n\t\t\t// Internet Connection is not present\n\t\t\taController.showAlertDialog(RegisterActivity.this,\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}\n\t\t// Make sure the device has the proper dependencies.\n\t\tGCMRegistrar.checkDevice(this);\n\n\t\t// Make sure the manifest permissions was properly set\n\t\tGCMRegistrar.checkManifest(this);\n\t\t// Register custom Broadcast receiver to show messages on activity\n\t\tregisterReceiver(mHandleMessageReceiver, new IntentFilter(\n\t\t\t\tConfig.DISPLAY_MESSAGE_ACTION));\n\n\t\t// Get GCM registration id\n\t\tfinal String regId = GCMRegistrar.getRegistrationId(this);\n\t\tLog.i(\"regId\", regId);\n\n\t\t// Check if regid already presents\n\t\tif (regId.equals(\"\")) {\n\n\t\t\t// Register with GCM\n\t\t\tGCMRegistrar.register(getApplicationContext(),\n\t\t\t\t\tConfig.GOOGLE_SENDER_ID);\n\n\t\t} else {\n\n\t\t\t// Device is already registered on GCM Server\n\t\t\tif (GCMRegistrar.isRegisteredOnServer(this)) {\n\t\t\t\t// Try to register again, but not in the UI thread.\n\t\t\t\t// It's also necessary to cancel the thread onDestroy(),\n\t\t\t\t// hence the use of AsyncTask instead of a raw thread.\n\n\t\t\t\tfinal Context context = this;\n\t\t\t\tmRegisterTask = new AsyncTask<Void, Void, Void>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\t\t\t\t// Register on our server\n\t\t\t\t\t\t// On server creates a new user\n\n\t\t\t\t\t\taController.register(context, email, regId);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tmRegisterTask = null;\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\t// execute AsyncTask\n\t\t\t\tmRegisterTask.execute(null, null, null);\n\n\t\t\t} else {\n\n\t\t\t}\n\t\t}\n\t}", "private void registerInBackground()\n {\n\tnew AsyncTask<Void, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(Void... params)\n\t {\n\t \tLog.i(Globals.TAG, \"backroundregister calisri\");\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t if (gcm == null)\n\t\t {\n\t\t \tgcm = GoogleCloudMessaging.getInstance(context);\n\t\t }\n\t\t\t regid = gcm.register(Globals.GCM_SENDER_ID);\n\t\t\t msg = \"Device registered, registration ID=\" + regid;\n\n\t\t // You should send the registration ID to your server over\n\t\t // HTTP, so it can use GCM/HTTP or CCS to send messages to your app.\n\t\t sendRegistrationIdToBackend();\n\n\t\t // For this demo: we use upstream GCM messages to send the\n\t\t // registration ID to the 3rd party server\n\n\t\t // Persist the regID - no need to register again.\n\t\t storeRegistrationId(context, regid);\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t // If there is an error, don't just keep trying to register.\n\t\t // Require the user to click a button again, or perform\n\t\t // exponential back-off.\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\t((TextView) findViewById(R.id.gcm_userid_textview)).setText(regid);\n\t }\n\t}.execute(null, null, null);\n }", "private void registerGCM()\n {\n Intent intent = new Intent(this, GcmIntentService.class);\n intent.putExtra(\"key\", \"register\");\n startService(intent);\n }", "void onNewRegistrationId(String registrationId);", "private void registerBackground() {\n new AsyncTask<Void,Void,Boolean>() {\n @Override\n protected Boolean doInBackground(Void... params) {\n try {\n if (gcm == null) {\n gcm = GoogleCloudMessaging.getInstance(context);\n }\n mregistrationGCMMessageView.setText(R.string.looking_for_regid);\n regid = gcm.register(SENDER_ID);\n \n // Save the regid - no need to register again.\n setRegistrationId(context, regid);\n\n } catch (IOException ex) {\n \tLog.v(\"RegisterGCM\", \"Registration not found. \" + ex);\n \treturn false;\n }\n return true;\n }\n\n @Override\n protected void onPostExecute(Boolean result) {\n if(!result)\n \tmregistrationGCMMessageView.setText(R.string.failed_regid);\n else\n \taskForUserAndPassword();\n }\n }.execute(null, null, null);\n }", "@Override\n protected void onRegistered(Context context, String registrationId) {\n Log.i(TAG, \"Device registered: regId = \" + registrationId);\n UnityPlayer.UnitySendMessage(\"ECPNManager\",\"RegisterAndroidDevice\",registrationId);\n }", "private void registerOnPushWoosh(final Context context, final String regId)\n\t{\n\t\tcancelPrevRegisterTask();\n\n\t\tHandler handler = new Handler(context.getMainLooper());\n\t\thandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t// if not register yet or an other id detected\n\t\t\t\tmRegistrationAsyncTask = getRegisterAsyncTask(context, regId);\n\n\t\t\t\tExecutorHelper.executeAsyncTask(mRegistrationAsyncTask);\n\t\t\t}\n\t\t});\n\t}", "private void sendRegistrationIdToBackend()\n {\n\tLog.d(Globals.TAG, \"REGISTER USERID: \" + regid);\n\tString name = ((EditText)findViewById(R.id.name_edittext)).getText().toString();\n\tnew AsyncTask<String, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(String... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"name\", params[0]);\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.REGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent registration\";\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t }\n\t}.execute(name);\n }", "private void manageRegID(boolean force) {\n String appVer = dataSource.getPubVar(\"appVer\");\n int currAppVer = CommonStuff.getAppVersion(getApplicationContext());\n\n String regID = dataSource.getPubVar(\"regID\");\n\n // clearing this will force re-reg\n if (force)\n regID = \"\"; // clear this so we force registration to execute\n\n // Time to register for new regID with Google Play Services\n if (!String.valueOf(currAppVer).equals(appVer) || regID.equals(\"\")) {\n\n GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(this);\n String newRegID = null;\n try {\n newRegID = gcm.register(GCM_SENDER_ID);\n }\n catch (IOException e) {\n Log.e(TAG, \"manageRegID(), GCM Registration IOException: \" + e.getMessage());\n\n // If we failed we don't do anything. We will try later when we\n // re-connect to Server\n return;\n }\n\n // If we actually succeeded...\n if (newRegID != null && !newRegID.equals(\"\")) {\n dataSource.savePubVar(\"appVer\", String.valueOf(currAppVer));\n dataSource.savePubVar(\"regID\", newRegID);\n\n Log.i(TAG, \"GCM Registered, new regID: \" + newRegID);\n\n // Send regID to Server\n CtrlMessage msg = new CtrlMessage();\n msg.setIsNotification(true);\n msg.setIsSystemMessage(true);\n\n JSONObject data = new JSONObject();\n try {\n data.put(\"type\", \"ext_android_gcm_myregid\");\n data.put(\"regid\", newRegID);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n msg.setData(data);\n\n // send to socket\n sendSocket(msg.buildMessage());\n }\n }\n }", "public void registrationPost(String regID){\n String type = \"android\";\n String name = LoginActivity.username;\n Callback<Events> callback = new Callback<Events>() {\n\n @Override\n public void success(Events serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEventServerResponse(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postRegistration(regID, type, name, callback);\n }", "private void sendRegistrationRequestToServer() {\r\n\t\tnew ServerAsyncTask(ApplicationConstant.appurl\r\n\t\t\t\t+ ApplicationConstant.registrationRequestType + \"&userid=62\"\r\n\t\t\t\t+ \"&email=\" + emailAddress.getText().toString().trim()\r\n\t\t\t\t+ \"&firstname=\" + firstName.getText().toString().trim()\r\n\t\t\t\t+ \"&lastname=\" + lastName.getText().toString().trim()\r\n\t\t\t\t+ \"&password=\" + password.getText().toString().trim()\r\n\t\t\t\t+ \"&roles=1\" + \"access=20\", context, new ResponseCallback() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccessRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage(\"Successfully register on app\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage((String) object);\r\n\t\t\t}\r\n\t\t}, ApplicationConstant.registrationRequestType).execute();\r\n\r\n\t}", "public static void StartRegisterToGCM(Context context) {\n Intent intent = new Intent(context, FooDoNetInstanceIDListenerService.class);\n intent.setAction(ACTION_REGISTER_TO_GCM);\n //parentForCallback = (IFooDoNetServerCallback)context;\n context.startService(intent);\n }", "@Override\n public void run() {\n if (serverR.equals(available)){\n Log.d(TAG, \"run: REGISTERED SUCCESSFULLY\");\n\n } else {\n Log.d(TAG, \"run: REGISTRATION ERROR\");\n Toast.makeText(getApplicationContext(),\n \"Something went wrong.\", Toast.LENGTH_LONG).show();\n }\n }", "public void register(RegistrationData d) {}", "public void uidRegistered(UIDRegistrationEvent uidregistrationevent) {\n \r\n }", "private void registerWithC2DMServer() {\n Intent registrationIntent = \n new Intent(\"com.google.android.c2dm.intent.REGISTER\");\n\n registrationIntent.putExtra(\"app\", \n PendingIntent.getBroadcast(this, 0, new Intent(), 0));\n\n registrationIntent.putExtra(\"sender\",\n \"[email protected]\");\n\n startService(registrationIntent);\n }", "private void register() {\n\t\tInetAddress iNA;\n\t\ttry {\n\t\t\tiNA = InetAddress.getLocalHost();\n\t\t\tmyIPAddress = iNA.getAddress();\n\t\t\tOverlayNodeSendsRegistration register = new OverlayNodeSendsRegistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum);\n\t\t\tthis.registry.getSender().sendData(register.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending registration event.\");\n\t\t}\n\t}", "private void registerGCM() {\n Intent intent = new Intent(this, vp.mom.gcm.gcm.GcmIntentService.class);\n intent.putExtra(\"key\", \"logout\");\n startService(intent);\n }", "public void run() {\n sendServerRegistrationMessage();\n if (serviceConnectedListener != null) {\n serviceConnectedListener.onServiceConnected(serviceDevice);\n }\n\n isRegistered = true;\n }", "private void registerWithNotificationHubs() {\n Intent intent = new Intent(this, RegistrationIntentService.class);\n startService(intent);\n }", "private void register(final Context context, final RegistrationParams params, final InternalRegistrationListener listener) {\n if (getLoginRestClient() != null) {\n params.initial_device_display_name = context.getString(R.string.login_mobile_device);\n mLoginRestClient.register(params, new UnrecognizedCertApiCallback<Credentials>(mHsConfig) {\n @Override\n public void onSuccess(Credentials credentials) {\n if (TextUtils.isEmpty(credentials.userId)) {\n listener.onRegistrationFailed(ERROR_EMPTY_USER_ID);\n } else {\n // Initiate login process\n Collection<MXSession> sessions = Matrix.getMXSessions(context);\n boolean isDuplicated = false;\n\n for (MXSession existingSession : sessions) {\n Credentials cred = existingSession.getCredentials();\n isDuplicated |= TextUtils.equals(credentials.userId, cred.userId) && TextUtils.equals(credentials.homeServer, cred.homeServer);\n }\n\n if (null == mHsConfig) {\n listener.onRegistrationFailed(\"null mHsConfig\");\n } else {\n if (!isDuplicated) {\n mHsConfig.setCredentials(credentials);\n MXSession session = Matrix.getInstance(context).createSession(mHsConfig);\n Matrix.getInstance(context).addSession(session);\n }\n\n listener.onRegistrationSuccess();\n }\n }\n }\n\n @Override\n public void onAcceptedCert() {\n register(context, params, listener);\n }\n\n @Override\n public void onTLSOrNetworkError(final Exception e) {\n listener.onRegistrationFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n if (TextUtils.equals(e.errcode, MatrixError.USER_IN_USE)) {\n // user name is already taken, the registration process stops here (new user name should be provided)\n // ex: {\"errcode\":\"M_USER_IN_USE\",\"error\":\"User ID already taken.\"}\n Log.d(LOG_TAG, \"User name is used\");\n listener.onRegistrationFailed(MatrixError.USER_IN_USE);\n } else if (TextUtils.equals(e.errcode, MatrixError.UNAUTHORIZED)) {\n // happens while polling email validation, do nothing\n } else if (null != e.mStatus && e.mStatus == 401) {\n try {\n RegistrationFlowResponse registrationFlowResponse = JsonUtils.toRegistrationFlowResponse(e.mErrorBodyAsString);\n setRegistrationFlowResponse(registrationFlowResponse);\n } catch (Exception castExcept) {\n Log.e(LOG_TAG, \"JsonUtils.toRegistrationFlowResponse \" + castExcept.getLocalizedMessage(), castExcept);\n }\n listener.onRegistrationFailed(ERROR_MISSING_STAGE);\n } else if (TextUtils.equals(e.errcode, MatrixError.RESOURCE_LIMIT_EXCEEDED)) {\n listener.onResourceLimitExceeded(e);\n } else {\n listener.onRegistrationFailed(\"\");\n }\n }\n });\n }\n }", "public void beginRegister() {}", "void register(final Context context, String name, final String regId,\n\t\t\tfinal String password) {\n\n\t\t// Server url to post gcm registration data\n\t\tString serverUrl = Config.SERVER_URL + \"register.php\";\n\n\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\tparams.add(new BasicNameValuePair(\"regId\", regId));\n\t\tparams.add(new BasicNameValuePair(\"name\", name));\n\t\tparams.add(new BasicNameValuePair(\"password\", password));\n\n\t\t// Once GCM returns a registration id, we need to register on our server\n\t\t// As the server might be down, we will retry it a couple times.\n\n\t\ttry {\n\t\t\t// Post registration values to web server\n\t\t\tJSONParser jsonParser = new JSONParser();\n\t\t\tjsonParser.performPostCall(serverUrl, params, false);\n\t\t\tIntent i1 = new Intent(context, LogRegActivity.class);\n\t\t\ti1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tstartActivity(i1);\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Controller-register\", \"Failed to register\" + e);\n\t\t}\n\t}", "private void registerReceiver() {\n // TODO: Is this needed?\n mRegistrationReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n boolean sentToken = PreferencesUtils.getBoolean(mActivity, R.string.gcm_sent_to_server_key, false);\n\n if (sentToken) {\n LogUtils.LOGE(\"***>GCM\", \"sent\");\n } else {\n LogUtils.LOGE(\"***>GCM\", \"error\");\n }\n }\n };\n }", "@Override\n protected Void doInBackground(Void... params) {\n ServerUtilities.register(context, name, email, regId);\n return null;\n }", "@Override\n protected MultifactorStartRegistrationResponseData doStartRegistration() throws Exception {\n final Boolean isBackup = Boolean.TRUE;\n return startRegistration(BACKUP_STRING_PROVIDER, null, null, isBackup);\n }", "private void handleRegistration(String registrationId) {\n C2DMSettings.resetBackoff(context);\n onRegistered(registrationId);\n }", "private void sendRegistrationToServer(String regId, String authToken) {\n\n try {\n // Send authToken to the server\n HttpHelper http = new HttpHelper(null, null, 7000);\n JSONObject data = new JSONObject();\n try {\n data.put(\"service\", \"AndroidGCM\");\n data.put(\"regId\", regId);\n data.put(\"name\", \"TODO: Nom\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n http.setUser(null);\n http.setPassword(null);\n ArrayList<String[]> headers = new ArrayList<>();\n headers.add(new String[]{\"authentication_token\", authToken});\n headers.add(new String[]{\"Content-Type\", \"application/json\"});\n HttpResultHelper httpResult = http.post(\"https://ioPush.net/app/api/addDevice\", data.toString(), headers);\n BufferedReader in = new BufferedReader(new InputStreamReader(httpResult.getResponse()));\n String result = \"\";\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n result += inputLine;\n }\n if (httpResult.getStatusCode() == 200) {\n Log.i(TAG, \"Send regId result : \" + result);\n } else {\n Log.i(TAG, \"Failed to send regId, error code : \" + httpResult.getStatusCode());\n Log.i(TAG, \"Error message : \" + result);\n }\n } catch (Exception e) {\n Log.d(TAG, \"Failed to issue post request\", e);\n }\n\n }", "private void registerInBackground(final int k) {\n\n new AsyncTask<String, String, String>() {\n\n @Override\n protected String doInBackground(String... params) {\n // TODO Auto-generated method stub\n String msg = \"\";\n try {\n if (gcm == null) {\n gcm = GoogleCloudMessaging.getInstance(context);\n }\n regid = gcm.register(SENDER_ID);\n msg = \"Device registered, registration ID=\" + regid;\n Log.e(\"ID RECEIVED IN BACK GROUND\", \"\" + msg);\n // You should send the registration ID to your server over\n // HTTP,\n // so it can use GCM/HTTP or CCS to send messages to your\n // app.\n // The request to your server should be authenticated if\n // your app\n // is using accounts.\n sendRegistrationIdToBackend();\n\n // For this demo: we don't need to send it because the\n // device\n // will send upstream messages to a server that echo back\n // the\n // message using the 'from' address in the message.\n\n // Persist the regID - no need to register again.\n storeRegistrationId(context, regid);\n } catch (IOException ex) {\n msg = \"Error :\" + ex.getMessage();\n // If there is an error, don't just keep trying to register.\n // Require the user to click a button again, or perform\n // exponential back-off.\n }\n return msg;\n }\n\n @Override\n protected void onPostExecute(String msg) {\n if (k == 1)\n login();\n else\n register();\n }\n\n }.execute(null, null, null);\n\n }", "public static void register(GCMRegistrationRequest request,\n APIResponseHandler<GenericSuccessModel> response) {\n\n APIConnection.send(API_PATH + \"register\", request, GenericSuccessModel.class, response);\n }", "private void handleRegistration(Intent intent) {\n String registrationId = intent.getStringExtra(EXTRA_REGISTRATION_ID);\n String error = intent.getStringExtra(EXTRA_ERROR);\n String removed = intent.getStringExtra(EXTRA_UNREGISTERED);\n if (Log.isLoggable(TAG, Log.DEBUG)) {\n Log.d(TAG,\n \"dmControl: registrationId = \" + registrationId + \", error = \" + error + \", removed = \"\n + removed);\n }\n if (removed != null) {\n onUnregistered();\n } else if (error != null) {\n handleRegistrationBackoffOnError(error);\n } else {\n handleRegistration(registrationId);\n }\n }", "protected void startRegActivity() {\n }", "public static void register(String secret, String gcmRegistrationID,\n APIResponseHandler<GenericSuccessModel> response) {\n\n GCMRegistrationRequest request = new GCMRegistrationRequest();\n\n request.secret = secret;\n request.gcmRegistrationID = gcmRegistrationID;\n\n register(request, response);\n }", "@Override\n protected String doInBackground(String... params) {\n String msg = \"\";\n try {\n if (gcm == null) {\n gcm = GoogleCloudMessaging.getInstance(context);\n }\n regid = gcm.register(SENDER_ID);\n msg = \"Device registered, registration ID=\" + regid;\n Log.e(\"ID RECEIVED IN BACK GROUND\", \"\" + msg);\n // You should send the registration ID to your server over\n // HTTP,\n // so it can use GCM/HTTP or CCS to send messages to your\n // app.\n // The request to your server should be authenticated if\n // your app\n // is using accounts.\n sendRegistrationIdToBackend();\n\n // For this demo: we don't need to send it because the\n // device\n // will send upstream messages to a server that echo back\n // the\n // message using the 'from' address in the message.\n\n // Persist the regID - no need to register again.\n storeRegistrationId(context, regid);\n } catch (IOException ex) {\n msg = \"Error :\" + ex.getMessage();\n // If there is an error, don't just keep trying to register.\n // Require the user to click a button again, or perform\n // exponential back-off.\n }\n return msg;\n }", "public void RegisterUser() {\n {\n //Initializing our broadcast receiver\n mRegistrationBroadcastReceiver = new BroadcastReceiver() {\n\n //When the broadcast received\n //We are sending the broadcast from GCMRegistrationIntentService\n\n @Override\n public void onReceive(Context context, Intent intent) {\n //If the broadcast has received with success\n //that means device is registered successfully\n if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){\n //Getting the registration token from the intent\n token = intent.getStringExtra(\"token\");\n //Displaying the token as toast\n// Toast.makeText(getApplicationContext(), \"Registration token:\" + token, Toast.LENGTH_LONG).show();\n// Intent emb = new Intent(SetingActivity.this, MainActivity.class);\n//sout\n System.out.println( \"Registration token:\" + token);\n //if the intent is not with success then displaying error messages\n } else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){\n Toast.makeText(getApplicationContext(), \"GCM registration error!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Error occurred\", Toast.LENGTH_LONG).show();\n }\n }\n };\n\n //Checking play service is available or not\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\n //if play service is not available\n if(ConnectionResult.SUCCESS != resultCode) {\n //If play service is supported but not installed\n if(GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n //Displaying message that play service is not installed\n Toast.makeText(getApplicationContext(), \"Google Play Service is not install/enabled in this device!\", Toast.LENGTH_LONG).show();\n GooglePlayServicesUtil.showErrorNotification(resultCode, getApplicationContext());\n\n //If play service is not supported\n //Displaying an error message\n } else {\n Toast.makeText(getApplicationContext(), \"This device does not support for Google Play Service!\", Toast.LENGTH_LONG).show();\n }\n\n //If play service is available\n } else {\n //Starting intent to register device\n Intent itent = new Intent(this, GCMRegistrationIntentService.class);\n startService(itent);\n }\n }\n\n\n }", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify of changes\n Intent intent = new Intent(this, RegistrationIntentService.class);\n intent.putExtra(\"SOURCE\", \"GCM\");\n startService(intent);\n }", "@Override\n public void onRegistered(Context context, String registration) {\n DeviceRegistrar.registerOrUnregister(context, registration, true);\n }", "public void run() {\n\t\t\t\tmRegistrationAsyncTask = getRegisterAsyncTask(context, regId);\n\n\t\t\t\tExecutorHelper.executeAsyncTask(mRegistrationAsyncTask);\n\t\t\t}", "@Override\n\t\t\tprotected String doInBackground(Void... params) {\n\t\t\t\tString id = null;\n\t\t\t\t\n\t\t\t\tGoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context);\n\t\t\t\t\n\t\t\t\t/** PROBLEM MIGHT OCCURE SO TRY MAX NUMBER OF TIMES MAX = 5 **/\n\t\t\t\tfor (int count = 1; count <= MAX_TRIES; count++) {\n\t\t\t\t\t\n\t\t\t\t\tlogMessage(\"Trying to register on cloud, try: \"+count);\n\t\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t\tid = gcm.register(GCMConfig.senderID(ActivityRegister.this));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// WE HAVE A REGISTRATION ID, BREAK THE LOOP AND RETURN\n\t\t\t\t\t\tif (id != null) {break;}\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {logMessage(\"Unable to register on cloud, error: \"+e.getMessage());}\n\t\t\t\t}\n\n\t\t\t\treturn id;\n\t\t\t}", "private AsyncTask<Void, Void, Void> getRegisterAsyncTask(final Context context, final String regId)\n\t{\n\t\treturn new WorkerTask(context)\n\t\t{\n\t\t\t@Override\n\t\t\tprotected void doWork(Context context)\n\t\t\t{\n\t\t\t\tDeviceRegistrar.registerWithServer(mContext, regId);\n\t\t\t}\n\t\t};\n\t}", "@Override\n\tprotected void onRegistered(Context context, String registrationId) {\n\t\tnew GCMAsyncTask().execute(registrationId);\n\t}", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\n startService(new Intent(this, RegistrationIntentService.class));\n }", "public void attemptRegistration(final Context context, final RegistrationListener listener) {\n final String registrationType;\n if (mRegistrationResponse != null && !TextUtils.isEmpty(mRegistrationResponse.session)) {\n AuthParams authParams = null;\n if (mPhoneNumber != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !TextUtils.isEmpty(mPhoneNumber.getSid())) {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n return;\n } else {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_MSISDN;\n authParams = getThreePidAuthParams(mPhoneNumber.getClientSecret(), identityServerUri.getHost(),\n mPhoneNumber.getSid(), LoginRestClient.LOGIN_FLOW_TYPE_MSISDN);\n }\n } else if (mEmail != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY)) {\n if (TextUtils.isEmpty(mEmail.getSid())) {\n // Email token needs to be requested before doing validation\n Log.d(LOG_TAG, \"attemptRegistration: request email validation\");\n requestValidationToken(context, mEmail, new ThreePidRequestListener() {\n @Override\n public void onIdentityServerMissing() {\n listener.onIdentityServerMissing();\n }\n\n @Override\n public void onThreePidRequested(ThreePid pid) {\n if (!TextUtils.isEmpty(pid.getSid())) {\n // The session id for the email validation has just been received.\n // We trigger here a new registration request without delay to attach the current username\n // and the pwd to the registration session.\n attemptRegistration(context, listener);\n\n // Notify the listener to wait for the email validation\n listener.onWaitingEmailValidation();\n }\n }\n\n @Override\n public void onThreePidRequestFailed(String errorMessage) {\n listener.onThreePidRequestFailed(errorMessage);\n }\n });\n return;\n } else {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n return;\n } else {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY;\n authParams = getThreePidAuthParams(mEmail.getClientSecret(), identityServerUri.getHost(),\n mEmail.getSid(), LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY);\n }\n }\n } else if (!TextUtils.isEmpty(mCaptchaResponse) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA;\n authParams = getCaptchaAuthParams(mCaptchaResponse);\n } else if (mTermsApproved && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_TERMS)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_TERMS;\n authParams = new AuthParams(LoginRestClient.LOGIN_FLOW_TYPE_TERMS);\n } else if (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_DUMMY)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_DUMMY;\n authParams = new AuthParams(LoginRestClient.LOGIN_FLOW_TYPE_DUMMY);\n } else if (isPasswordBasedFlowSupported()) {\n // never has been tested\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_PASSWORD;\n authParams = new AuthParamsLoginPassword();\n\n if (null != mUsername) {\n ((AuthParamsLoginPassword) authParams).user = mUsername;\n }\n\n if (null != mPassword) {\n ((AuthParamsLoginPassword) authParams).password = mPassword;\n }\n } else {\n // others\n registrationType = \"\";\n }\n\n if (TextUtils.equals(registrationType, LoginRestClient.LOGIN_FLOW_TYPE_MSISDN)\n && mEmail != null && !isCaptchaRequired()) {\n // Email will not be processed\n mShowThreePidWarning = true;\n mEmail = null;\n }\n\n final RegistrationParams params = new RegistrationParams();\n if (!registrationType.equals(LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA)\n && !registrationType.equals(LoginRestClient.LOGIN_FLOW_TYPE_TERMS)) {\n if (mUsername != null) {\n params.username = mUsername;\n }\n if (mPassword != null) {\n params.password = mPassword;\n }\n }\n\n if (authParams != null) {\n // Always send the current session\n authParams.session = mRegistrationResponse.session;\n\n params.auth = authParams;\n }\n\n register(context, params, new InternalRegistrationListener() {\n @Override\n public void onRegistrationSuccess() {\n if (mShowThreePidWarning) {\n // An email was entered but was not attached to account\n listener.onRegistrationSuccess(context.getString(R.string.auth_threepid_warning_message));\n } else {\n listener.onRegistrationSuccess(null);\n }\n }\n\n @Override\n public void onRegistrationFailed(String message) {\n if (TextUtils.equals(ERROR_MISSING_STAGE, message)\n && (mPhoneNumber == null || isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN))) {\n if (mEmail != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY)) {\n attemptRegistration(context, listener);\n } else if (isTermsRequired()) {\n listener.onWaitingTerms(getLocalizedLoginTerms(context));\n } else {\n // At this point, only captcha can be the missing stage\n listener.onWaitingCaptcha(getCaptchaPublicKey());\n }\n } else {\n listener.onRegistrationFailed(message);\n }\n }\n\n @Override\n public void onResourceLimitExceeded(MatrixError e) {\n listener.onResourceLimitExceeded(e);\n }\n });\n }\n }", "public void setAWSUserRegistration_Agree() {\r\n\r\n Tx_RN171DeviceSetDeviceName();\r\n\r\n /////////////////////////////////////////////////\r\n //Register/Insert Customer\r\n /////////////////////////////////////////////////\r\n\r\n //Call method and post appropriate values\r\n AWSconnection.insertCustomerURL(AppGlobals.userregInfo.userregistrationEmail,\r\n AppGlobals.userregInfo.userregistrationPassword,\r\n AppGlobals.userregInfo.userregistrationStreetAddress,\r\n AppGlobals.userregInfo.userregistrationSuburb,\r\n AppGlobals.userregInfo.userregistrationCityRegion,\r\n AppGlobals.userregInfo.userregistrationFirstName,\r\n AppGlobals.userregInfo.userregistrationLastName,\r\n AppGlobals.userregInfo.userregistrationPostcode,\r\n AppGlobals.userregInfo.userregistrationCountry,\r\n\r\n //Call interface to retrieve Async results\r\n new AWSconnection.textResult() {\r\n @Override\r\n\r\n public void getResult(String result) {\r\n\r\n //Do stuff with results here\r\n //Returns either success or fail message\r\n //Log.i(\"Registration:\", result);\r\n Log.d(\"myApp_AWS\", \"Registration:\" + result);\r\n\r\n if (!result.equals(\"\\\"Successful Registration\\\"\")) {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Web Services Error.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } else {\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Update Successful.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n /////////////////////////////////////////\r\n //Register Appliance\r\n /////////////////////////////////////////\r\n\r\n //Call method and post appropriate values\r\n AWSconnection.insertCustomerApplianceURL(AppGlobals.userregInfo.userregApplianceInfo_now.userregistrationApplianceSerial,\r\n AppGlobals.userregInfo.userregApplianceInfo_now.userregistrationApplianceType,\r\n AppGlobals.userregInfo.userregApplianceInfo_now.userregistrationApplianceModel,\r\n AppGlobals.fireplaceWifi.get(AppGlobals.selected_fireplaceWifi).UUID,\r\n AppGlobals.userregInfo.userregistrationEmail,\r\n AppGlobals.userregInfo.userregApplianceInfo_now.userregistrationApplianceName,\r\n\r\n //Call interface to retrieve Async results\r\n new AWSconnection.textResult() {\r\n @Override\r\n\r\n public void getResult(String result) {\r\n\r\n //Do stuff with results here\r\n //Returns either success or fail message\r\n //Log.i(\"Registration:\", result);\r\n Log.d(\"myApp_AWS\", \"Registration:\" + result);\r\n\r\n if (!result.equals(\"\\\"Appliance Registration Successful\\\"\")) {\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Web Services Error.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } else {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Update Successful.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }", "private void onRegistered(String registrationId) {\n setRegistrationInProcess(false);\n C2DMSettings.setC2DMRegistrationId(context, registrationId);\n for (C2DMObserver observer : observers) {\n onRegisteredSingleObserver(registrationId, observer);\n }\n }", "private synchronized void beginRegistration() {\n if (mDeviceRegistering == null && mDevicesToRegister.size() > 0) {\n mDeviceRegistering = mDevicesToRegister.remove(0);\n if (!connectToDevice(mDeviceRegistering)) {\n endRegistration();\n }\n } else if (mDeviceRegistering == null && mDevicesToRegister.size() == 0) {\n // Run out of devices, so revert wifi connection\n resetWifiConnection();\n } else {\n // registering a device\n }\n }", "@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\t\t\t\taController.register(context, email, regId);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "public RNPushNotificationRegistrationService() {\n super();\n s_instance = this;\n }", "public abstract void register();", "public boolean handleRegistrationIntent(Context context, Intent intent) {\n String stringExtra = intent.getStringExtra(\"error\");\n String stringExtra2 = intent.getStringExtra(ADM_REGISTRATION_ID_KEY);\n String stringExtra3 = intent.getStringExtra(ADM_UNREGISTERED_KEY);\n if (stringExtra != null) {\n String str = TAG;\n AppboyLogger.e(str, \"Error during ADM registration: \" + stringExtra);\n return true;\n } else if (stringExtra2 != null) {\n String str2 = TAG;\n AppboyLogger.i(str2, \"Registering for ADM messages with registrationId: \" + stringExtra2);\n Appboy.getInstance(context).registerAppboyPushMessages(stringExtra2);\n return true;\n } else if (stringExtra3 != null) {\n String str3 = TAG;\n AppboyLogger.w(str3, \"The device was un-registered from ADM: \" + stringExtra3);\n return true;\n } else {\n AppboyLogger.w(TAG, \"The ADM registration intent is missing error information, registration id, and unregistration confirmation. Ignoring.\");\n return false;\n }\n }", "private void sendRegistrationToServer(final String fcmToken) {\n Log.e(TAG, \"sendRegistrationToServer: \" + fcmToken);\n final String token= QueryPreferences.getToken(this);\n AsyncTask<Void, Void, Void> task= new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... voids) {\n\n RequestQueue requestQueue = Volley.newRequestQueue(MyFirebaseInstanceIDService.this);\n\n Map<String, String> params= new HashMap<>();\n params.put(\"token\", token);\n params.put(\"fcmToken\", \"\" + fcmToken);\n JsonObjectRequest jor= new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n });\n requestQueue.add(jor);\n return null;\n }\n };\n if(token!=null)\n task.execute();\n }", "private void onRegistrationError(String errorId) {\n setRegistrationInProcess(false);\n for (C2DMObserver observer : observers) {\n Intent outgoingIntent = new Intent(context, observer.getObserverClass());\n outgoingIntent.setAction(C2DMessaging.ACTION_REGISTRATION_ERROR);\n outgoingIntent.putExtra(C2DMessaging.EXTRA_REGISTRATION_ERROR, errorId);\n deliverObserverIntent(observer, outgoingIntent);\n }\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> registerApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "public void registerWithServer();", "private void sendRegisterMessage() {\n Message initMessage = new Message(\"register\");\n initMessage.name = name;\n sendMessage(initMessage);\n\n log(\"sent init. message:\" + initMessage);\n }", "private void getGCM_ID() {\n if (regIDValue.length() <= 0)\n regIDValue = DriverApplication.getGCMRegistrationId(ctx);\n Log.d(\"GCM_REG_ID \", regIDValue);\n }", "private String getRegistrationId(Context context) {\n final SharedPreferences prefs = getGCMPreferences(context);\n String registrationId = prefs.getString(PROPERTY_REG_ID, \"\");\n if (registrationId.isEmpty()) {\n Log.i(TAG, \"Registration not found.\");\n return \"\";\n }\n // Check if app was updated; if so, it must clear the registration ID\n // since the existing regID is not guaranteed to work with the new\n // app version.\n int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION,\n Integer.MIN_VALUE);\n int currentVersion = getAppVersion(context);\n if (registeredVersion != currentVersion) {\n Log.i(TAG, \"App version changed.\");\n return \"\";\n }\n return registrationId;\n }", "public int register() \n { \n File file = new File(MSB_REGISTION_FILE);\n if(!file.exists()) \n {\n LOGGER.info(\"Stop registering as can't find msb registion file:\" + file.getAbsolutePath()); \n return CommonConstant.MsbRegisterCode.MSDB_REGISTER_FILE_NOT_EXISTS;\n }\n\n Map<?, ?> msbRegistionBodyMap = getMsbRegistrationData();\n if(null == msbRegistionBodyMap)\n {\n LOGGER.info(\"Reading data from msb registion file failed:\" + file.getAbsolutePath()); \n return CommonConstant.MsbRegisterCode.MSDB_REGISTER_FILE_NOT_EXISTS;\n }\n\n LOGGER.info(\"Registering body: \" + JsonUtil.toJson(msbRegistionBodyMap));\n\n bRegistrationStatus = sendRequest(msbRegistionBodyMap);\n \n return bRegistrationStatus \n ? CommonConstant.MsbRegisterCode.MSDB_REGISTER_SUCESS \n : CommonConstant.MsbRegisterCode.MSDB_REGISTER_FAILED;\n }", "private boolean registerGCM() {\n\t\tif (relayMode == RelayMode.GCM) {\n\t\t\tregistrationId = GCMRegistrationUtil.getRegistrationId(context, gcmSenderId);\n\t\t\treturn registrationId != null;\n\t\t} else {\n\t\t\t// don't require a GCM registration id because not necessary\n\t\t\treturn true;\n\t\t}\n\t}", "@Override\n public void registerBtnClick(View view) {\n isRegisteredOnGCM(2);\n//\t\t\tfinish();\n }", "@Override\n public void onTokenRefresh(){\n // start Gcm registration service\n Intent intent = new Intent(this, GcmRegistrationIntentService.class);\n startService(intent);\n }", "public synchronized void startRegistration() {\n state = State.REGISTRATION;\n players = new HashSet<>();\n }", "void register();", "private void onRegisteredSingleObserver(String registrationId, C2DMObserver observer) {\n Intent outgoingIntent = new Intent(context, observer.getObserverClass());\n outgoingIntent.setAction(C2DMessaging.ACTION_REGISTERED);\n outgoingIntent.putExtra(C2DMessaging.EXTRA_REGISTRATION_ID, registrationId);\n deliverObserverIntent(observer, outgoingIntent);\n }", "void register() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(true));\n patientLoaderThread.start();\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void unregister()\n {\n\tLog.d(Globals.TAG, \"UNREGISTER USERID: \" + regid);\n\tnew AsyncTask<Void, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(Void... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.UNREGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent unregistration\";\n\t\t gcm.unregister();\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tremoveRegistrationId(getApplicationContext());\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t\t((TextView)findViewById(R.id.gcm_userid_textview)).setText(regid);\n\t }\n\t}.execute();\n }", "public interface GCMRegisterListener {\n public void onGCMRegisterComplete(String result);\n}", "public void registerApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver);", "String registerGcmNew(String senderId) {\n if (mGoogleCloudMessaging_class != null) {\n String errorMsg;\n Throwable throwable;\n try {\n Method getInstance_method = mInstanceID_class.getDeclaredMethod(\"getInstance\", Context.class);\n Object instanceIDInstance = getInstance_method.invoke(null, mContext);\n\n Method getToken_method = mInstanceID_class.getDeclaredMethod(\n \"getToken\", String.class, String.class);\n String gcmRegId = (String) getToken_method.invoke(instanceIDInstance, senderId, \"GCM\");\n Log.d(TAG, \"registerGcmNew(): completed with regId=\" + gcmRegId);\n return gcmRegId;\n } catch (NoSuchMethodException e) {\n // in this case\n errorMsg = \"registerGcmNew(): Unable to find method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (InvocationTargetException e) {\n errorMsg = \"registerGcmNew(): Unable to invoke method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (IllegalAccessException e) {\n errorMsg = \"registerGcmNew(): Unable to access method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (Exception e) {\n errorMsg = \"registerGcmNew(): Unknown error occurred.\";\n throwable = e;\n }\n Log.e(TAG, errorMsg, throwable);\n } else {\n Log.w(TAG, \"registerGcmNew(): Unable to find GoogleCloudMessaging class\");\n }\n return null;\n }", "@Override\n protected String doInBackground(final Void... params) {\n pushManager.registerDevice();\n\n // if registration succeeded.\n if (pushManager.isRegistered()) {\n try {\n pushManager.setPushEnabled(enabled);\n // Automatically subscribe to the default SNS topic\n if (enabled) {\n pushManager.subscribeToTopic(pushManager.getDefaultTopic());\n }\n return null;\n } catch (final AmazonClientException ace) {\n Log.e(LOG_TAG, \"Failed to change push notification status\", ace);\n return ace.getMessage();\n }\n }\n return \"Failed to register for push notifications.\";\n }", "@Override\n protected MultifactorDevice doFinishRegistration(MultifactorStartRegistrationResponseData startRegistrationData) throws Exception {\n return finishRegistration(BACKUP_STRING_PROVIDER, startRegistrationData.getDeviceId(), null, null, null);\n }", "private void regFliter() {\n\t\tIntentFilter filter = new IntentFilter();\r\n\t\tfilter.addAction(OsConstants.JSH.ADD_DEVICES_SUCCES);\r\n\t\tfilter.addAction(OsConstants.JSH.SETTIING_WIFI_SUCCESS);\r\n\t\tregisterReceiver(mReceiver, filter);\r\n\t}", "protected void registerDevice(JSONArray args, final CallbackContext callbackContext) {\n Log.d(TAG, \"REGISTER\");\n try {\n\t String deviceId = args.getString(0);\n\t String userId = null;\n\t String userName = null;\n\t if (args.length() == 2) {\n\t \tuserId = args.getString(1);\n\t }\n\t if (args.length() == 3) {\n\t \tuserId = args.getString(1);\n\t \tuserName = args.getString(2);\n\t }\n\t\t\tNotificare.shared().registerDevice(deviceId, userId, userName, new NotificareCallback<String>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\tNotificare.shared().setDeviceId(result);\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\n\t\t\t});\n } catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "@Override\n public void run() {\n if (needRefreshRegistration(registrationUri, resolvedDeployment)) {\n sendRegistrationEvent(resolvedDeployment);\n }\n }", "private void sendRegistrationIdToBackend() {\n // Your implementation here.\n }", "private void registerWithService() {\n\n try {\n\n Message msg = Message.obtain(null, TallyDeviceService.MSG_REGISTER_MESSAGE_ACTIVITY);\n if (msg == null) { return; }\n msg.obj = this;\n msg.replyTo = messenger;\n service.send(msg);\n\n } catch (Exception e) {\n Log.e(LOG_TAG, \"Line 306 :: \" + e.getMessage());\n service = null;\n }\n\n }", "private void getRegisterDetails() {\n String android_id = Settings.Secure.getString(this.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Log.d(\"androidId\", android_id);\n\n int loginDeviceType = 1;\n\n APIHelper.init_connection(getApplicationContext(), android_id, loginDeviceType, new Callback() {\n @Override\n public void onSuccess(JSONObject response) {\n try {\n AppController.user_id = response.getString(\"user_id\");\n AppController.user_device_id = response.getString(\"user_device_id\");\n mProgressBar.setProgress(60);\n startApp();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFail(String error) {\n }\n });\n }", "@Override\n public void onTokenRefresh(){\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n String token = FirebaseInstanceId.getInstance().getToken();\n Log.v(TAG, \"success in getting instance \"+ token);\n onSendRegistrationToServer(token);\n }\n }", "public RegistrationInfo getRegistrationInfo();", "com.google.protobuf.ByteString getRegistIdBytes();", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tRegisterVtvAccountService.register(mActivity, usernameFinal);\r\n\t\t\t\t\t}", "public com.google.protobuf.Empty registerApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "private String getRegistrationId(Context context)\n {\n\t\tfinal SharedPreferences prefs = getGcmPreferences(context);\n\t\t\n\t\tString registrationId = prefs.getString(Globals.PREFS_PROPERTY_REG_ID, \"\");\n\t\t\n\t\tif (registrationId == null || registrationId.equals(\"\"))\n\t\t{\n\t\t Log.i(Globals.TAG, \"Registration not found.\");\n\t\t return \"\";\n\t\t}\n\t\t// Check if app was updated; if so, it must clear the registration ID\n\t\t// since the existing regID is not guaranteed to work with the new\n\t\t// app version.\n\t\tint registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);\n\t\tint currentVersion = getAppVersion(context);\n\t\tif (registeredVersion != currentVersion)\n\t\t{\n\t\t Log.i(Globals.TAG, \"App version changed.\");\n\t\t return \"\";\n\t\t}\n\t\treturn registrationId;\n }", "private void AddMetaRegistrationInformation(Registration reg) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n //If the broadcast has received with success\n //that means device is registered successfully\n if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){\n //Getting the registration token from the intent\n token = intent.getStringExtra(\"token\");\n //Displaying the token as toast\n// Toast.makeText(getApplicationContext(), \"Registration token:\" + token, Toast.LENGTH_LONG).show();\n// Intent emb = new Intent(SetingActivity.this, MainActivity.class);\n//sout\n System.out.println( \"Registration token:\" + token);\n //if the intent is not with success then displaying error messages\n } else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){\n Toast.makeText(getApplicationContext(), \"GCM registration error!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Error occurred\", Toast.LENGTH_LONG).show();\n }\n }", "private void sendRegistrationToServer(String token) {\n String json =\"{'email' : '\"\n + device_id\n + \"' ,'firebase_token': '\" + token + \"'}\";\n\n try {\n JSONObject jObj = new JSONObject(json);\n responseId = doPostRequest(\"https://iot-api.herokuapp.com/users\", jObj.toString());\n } catch (IOException e) {\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public long getRegisterId();", "@Override\n public void onUnregistered(Context context) {\n SharedPreferences prefs = Util.getSharedPreferences(context);\n String deviceRegistrationID = prefs.getString(Util.DEVICE_REGISTRATION_ID, null);\n DeviceRegistrar.registerOrUnregister(context, deviceRegistrationID, false);\n }", "private void registerEmailAddr() {\r\n\t\t\t\tWindow.setTitle(Common.APPNAME);\r\n\t\t\t\tmanualRegisterBtn.setEnabled(false);\r\n\t\t\t\tfinal String emailAddrProvided = emailAddrField.getText();\r\n\t\t\t\tserverResponseLabel.setText(\"\");\r\n\t\t\t\tregisterService.manualRegister(emailAddrProvided,\r\n\t\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\t\t\t\tdialogBox.setText(\"Email Address Registration - Failure\");\r\n\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\t\tif (\"Verified\".equalsIgnoreCase(result)) {\r\n\t\t\t\t\t\t\t\tString registerReturnUri = GWT.getHostPageBaseURL() + REGISTER_RETURN_URI;\r\n\t\t\t\t\t\t\t\tWindow.open(registerReturnUri, \"_self\", \"\"); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\temailAddrField.setText(\"\");\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tWindow.alert(result);\r\n\t\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.setAnimationEnabled(true);\r\n\t\t\t\t\t\t\t\tdialogBox.setWidth(\"320px\");\r\n\t\t\t\t\t\t\t\tdialogBox.setText(result);\r\n\t\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tmanualRegisterBtn.setEnabled(true);\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}", "public String getRegistrationId() {\n\t\treturn registrationId;\n\t}", "@Override\r\n\r\n public void getResult(String result) {\n Log.d(\"myApp_AWS\", \"Registration:\" + result);\r\n\r\n if (!result.equals(\"\\\"Successful Registration\\\"\")) {\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Web Services Error.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n } else {\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n Toast.makeText(Rinnai11eRegistration.this, \"Update Successful.\",\r\n Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n }", "public void register(){\n }", "public void register() {\n unregister();\n Log.d(TAG, \"[register in eventbus]\");\n EventBus.getDefault().register(this);\n }", "@Override\n public void onNewToken(@NonNull String token)\n {\n super.onNewToken(token);\n String currentUserId = getCurrentUserId();\n if (currentUserId != null)\n {\n sendRegistrationToServer(token, currentUserId);\n }\n }" ]
[ "0.72207224", "0.7138111", "0.70029813", "0.6916967", "0.6881825", "0.68296117", "0.6824806", "0.6724149", "0.67143965", "0.66744876", "0.6568648", "0.6481147", "0.6467505", "0.6372622", "0.6336434", "0.63152564", "0.63086456", "0.63054675", "0.6297932", "0.6297064", "0.6292065", "0.62917644", "0.628208", "0.62791324", "0.6275822", "0.6272628", "0.6272528", "0.6255679", "0.62184507", "0.6217732", "0.6217132", "0.6194712", "0.6190052", "0.6187718", "0.61795527", "0.61404055", "0.61298275", "0.61024636", "0.60977167", "0.6094405", "0.60711557", "0.6068752", "0.6047192", "0.6041771", "0.60250133", "0.59776425", "0.5965605", "0.5921922", "0.5903646", "0.5888288", "0.58838594", "0.5881895", "0.58692175", "0.585189", "0.5846069", "0.5840498", "0.58218485", "0.58188814", "0.5802156", "0.57967734", "0.5793672", "0.5771751", "0.5764508", "0.576364", "0.576344", "0.57399684", "0.5738465", "0.57382", "0.57382", "0.57382", "0.57382", "0.5723088", "0.5716638", "0.5708861", "0.5708776", "0.57052714", "0.57014465", "0.56821036", "0.56759995", "0.5675776", "0.5674551", "0.56694055", "0.5656219", "0.5651896", "0.5649502", "0.5647538", "0.56448907", "0.56445307", "0.5642718", "0.5640177", "0.562382", "0.5623118", "0.56184345", "0.56173706", "0.5612304", "0.5605857", "0.55990547", "0.55829746", "0.55818576", "0.55746806" ]
0.757581
0
Sends broadcast to Main for persisting token to webserver.
private void sendRegistrationToServer(String token, boolean status) { Intent intent = new Intent(); intent.setAction(ADM_TOKEN_MESSAGE); intent.putExtra(ADM_TOKEN_MESSAGE_SUCCESS, status); intent.putExtra(ADM_TOKEN_FILTER_EXTRA, token); LocalBroadcastManager.getInstance(this).sendBroadcast(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendTokenToRemote() { }", "private TokenBroadcastReceiver() { }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "private void sendRegistrationToServer(String token) {\n EventBuilder.withItemAndType(\n Item.PUSH_NOTIFICATION, Event.EVT_SEND)\n .addParam(EventParam.PRM_VALUE, token)\n .send();\n }", "public static void sendBroadcast(){\n Intent intent = new Intent(CUSTOM_BROADCAST_ACTION);\n context.sendBroadcast(intent);\n }", "private void m5312e() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isReLoginHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }", "public void m5315f() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isLogoutHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }", "private void sendRegistrationToServer(String token) {\n CustomerApp.e.putString(\"fcm_token\",token);\n CustomerApp.e.putBoolean(\"fcm_token_sync\",false);\n CustomerApp.e.apply();\n\n //Displaying token on logcat\n Log.v(Constants.TAG, \"Refreshed token: \" + token);\n }", "@Override\r\n public void onTokenRefresh() {\n App.sendToken();\r\n }", "private void sendRegistrationToServer(final String token) {\n Log.e(TAG, \"sendRegistrationToServer: \" + token);\n }", "private void sendRegistrationToServer(String token) {\n LoginManager loginManager = new LoginManager(this);\n loginManager.setFCM_KEY(token);\n }", "private void sendRegistrationToServer(String token) {\n // Add custom implementation, as needed.\n }", "private void send() {\n vertx.eventBus().publish(GeneratorConfigVerticle.ADDRESS, toJson());\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"myToken\", \"Refreshed token: \" + refreshedToken);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n //sendRegistrationToServer(refreshedToken);\n getApplicationContext().sendBroadcast(new Intent(broadcast));\n SharedPrefManager.getInstance(getApplicationContext()).storeToken(refreshedToken);\n }", "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 sendBroadcast(long mId, double rating){\n // Use a LocalBroadcastManager to restrict the scope of this\n // Intent to the VideoUploadClient application.\n LocalBroadcastManager.getInstance(this)\n .sendBroadcast(new Intent(ACTION_RATING_SERVICE_RESPONSE)\n .addCategory(Intent.CATEGORY_DEFAULT)\n .putExtra(\"id\", mId)\n .putExtra(\"rating\", rating));\n }", "private void sendMetoMain(){\n Intent sendUserUI = new Intent(RegistrationActivity.this, MainActivity.class);\n sendUserUI.putExtra(KeyUserType, actualUserType);\n // unique id\n sendUserUI.putExtra(SenderKey, \"Register\");\n startActivity(sendUserUI);\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}", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify our app's server of any changes (if applicable).\n startService(new Intent(this, RegistrationIntentService.class));\n }", "public static void sendToken(SendTokenRequest tokenRequest) {\n APICalls invocations = getRetrofitEngine().create(APICalls.class);\n\n Call<SendTokenDAO> call = invocations.sendFCMToken(tokenRequest);\n call.enqueue(new retrofit2.Callback<SendTokenDAO>() {\n @Override\n public void onResponse(Call<SendTokenDAO> call, Response<SendTokenDAO> response) {\n BankCraftApplication.getInstance().getEventBus().post(new SendTokenResponseEvent(response.body()));\n }\n\n @Override\n public void onFailure(Call<SendTokenDAO> call, Throwable t) {\n BankCraftApplication.getInstance().getEventBus().post(new SendTokenResponseEvent(t.getMessage()));\n }\n });\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n //If the broadcast has received with success\n //that means device is registered successfully\n if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){\n //Getting the registration token from the intent\n token = intent.getStringExtra(\"token\");\n //Displaying the token as toast\n// Toast.makeText(getApplicationContext(), \"Registration token:\" + token, Toast.LENGTH_LONG).show();\n// Intent emb = new Intent(SetingActivity.this, MainActivity.class);\n//sout\n System.out.println( \"Registration token:\" + token);\n //if the intent is not with success then displaying error messages\n } else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){\n Toast.makeText(getApplicationContext(), \"GCM registration error!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Error occurred\", Toast.LENGTH_LONG).show();\n }\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 }", "private void registerReceiver() {\n // TODO: Is this needed?\n mRegistrationReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n boolean sentToken = PreferencesUtils.getBoolean(mActivity, R.string.gcm_sent_to_server_key, false);\n\n if (sentToken) {\n LogUtils.LOGE(\"***>GCM\", \"sent\");\n } else {\n LogUtils.LOGE(\"***>GCM\", \"error\");\n }\n }\n };\n }", "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 }", "@Override\n public void onNewToken(String token) {\n //Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n\n }", "@Override\n public void onReceive(Context context, Intent intent)\n {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE))\n {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n tokenGCM = intent.getStringExtra(\"token\");\n sharedPreferences.putString(\"TOKEN\",tokenGCM);\n\n // Toast.makeText(getApplicationContext(), \"GCM registration token: \" + tokenGCM, Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER))\n {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n }\n\n else if (intent.getAction().equals(Config.PUSH_NOTIFICATION))\n {\n // new push notification is received\n\n Log.w(\"ALERTA\", \"Push notification is received!\");\n\n //Toast.makeText(getApplicationContext(), \"Push notification is received!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n enviaTokenParaServidor(token);\n }", "private void sendRegistrationToServer(String token) {\n String json =\"{'email' : '\"\n + device_id\n + \"' ,'firebase_token': '\" + token + \"'}\";\n\n try {\n JSONObject jObj = new JSONObject(json);\n responseId = doPostRequest(\"https://iot-api.herokuapp.com/users\", jObj.toString());\n } catch (IOException e) {\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "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 startToNormalFlow() {\n new AppController().setConnectivityListener(this);\r\n\r\n try {\r\n objLocationDetails = new LocationDetails(LoginActivity.this);\r\n objLocationDetails.startTracking();\r\n } catch (NullPointerException ne) {\r\n ne.printStackTrace();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n arrPermission = Arrays.asList(\"public_profile\", \"email\", \"user_friends\");\r\n\r\n objSharedPreferences = getSharedPreferences(Constants.PROFILE_PREFERENCES, MODE_PRIVATE);\r\n\r\n try {\r\n PackageInfo info = getPackageManager().getPackageInfo(\"com.shout.shout_test\", PackageManager.GET_SIGNATURES);\r\n for (Signature signature : info.signatures) {\r\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\r\n md.update(signature.toByteArray());\r\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\r\n }\r\n } catch (PackageManager.NameNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n }\r\n try {\r\n// LoginManager.getInstance().logOut();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n\r\n /*mRegistrationBroadcastReceiver = new BroadcastReceiver() {\r\n @Override\r\n public void onReceive(Context context, Intent intent) {\r\n boolean sentToken = objSharedPreferences.getBoolean(Constants.SENT_TOKEN_TO_SERVER, false);\r\n if (sentToken) {\r\n // Get sentToken\r\n //setResultCode(Activity.RESULT_OK);\r\n } else {\r\n // Token Error\r\n }\r\n }\r\n };*/\r\n\r\n Intent intent = new Intent(this, MyInstanceIDListenerService.class);\r\n startService(intent);\r\n\r\n /*if (Utils.checkPlayServices(LoginActivity.this)) {\r\n // Start IntentService to register this application with GCM.\r\n Intent intent = new Intent(this, MyInstanceIDListenerService.class);\r\n startService(intent);\r\n }*/\r\n init();\r\n\r\n\r\n arrIntroPagerModel = new ArrayList<IntroPagerModel>();\r\n\r\n for (int index = 0; index < 5; index++) {\r\n IntroPagerModel objIntroPagerModel = null;\r\n switch (index) {\r\n case 0:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide1, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 1:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide3, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 2:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide4, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 3:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide5, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n case 4:\r\n objIntroPagerModel = new IntroPagerModel(R.drawable.slide6, \"example\");\r\n arrIntroPagerModel.add(objIntroPagerModel);\r\n break;\r\n }\r\n }\r\n objIntroPagerAdapter = new IntroPagerAdapter(LoginActivity.this, arrIntroPagerModel);\r\n viewPagerIntroSlider.setAdapter(objIntroPagerAdapter);\r\n if (arrIntroPagerModel.size() > 0) {\r\n relativeIntroBackground.setBackgroundResource(R.drawable.slide2);\r\n objViewPagerIndicator.setUnSelectedColor(getResources().getColor(R.color.color_unselected_indicator));\r\n objViewPagerIndicator.setSelectedColor(getResources().getColor(R.color.color_selected_indicator));\r\n objViewPagerIndicator.build(arrIntroPagerModel.size());\r\n objViewPagerIndicator.showIndicator(0);\r\n }\r\n viewPagerIntroSlider.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {\r\n @Override\r\n public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {\r\n\r\n }\r\n\r\n @Override\r\n public void onPageSelected(int position) {\r\n objViewPagerIndicator.showIndicator(position);\r\n }\r\n\r\n @Override\r\n public void onPageScrollStateChanged(int state) {\r\n\r\n }\r\n });\r\n\r\n viewPagerIntroSlider.setPageTransformer(true, new ViewPager.PageTransformer() {\r\n @Override\r\n public void transformPage(View view, float position) {\r\n System.out.print(\"SCROLLED POSITION : \" + position);\r\n\r\n if (position <= -1.0F || position >= 1.0F) {\r\n view.setTranslationX(view.getWidth() * position);\r\n view.setAlpha(0.0F);\r\n } else if (position == 0.0F) {\r\n view.setTranslationX(view.getWidth() * position);\r\n view.setAlpha(1.0F);\r\n } else {\r\n // position is between -1.0F & 0.0F OR 0.0F & 1.0F\r\n view.setTranslationX(view.getWidth() * -position);\r\n view.setAlpha(1.0F - Math.abs(position));\r\n }\r\n /* view.setAlpha(1 - Math.abs(position));\r\n if (position < 0) {\r\n view.setScrollX((int) ((float) (view.getWidth()) * position));\r\n } else if (position > 0) {\r\n view.setScrollX(-(int) ((float) (view.getWidth()) * -position));\r\n } else {\r\n view.setScrollX(0);\r\n }*/\r\n }\r\n });\r\n }", "public void onSendRegistrationToServer(final String token){\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n databaseReference.child(Constants.ARG_USERS)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .child(Constants.ARG_FIREBASE_TOKEN)\n .setValue(token);\n }", "@Override\n public void onNewToken(@NonNull String token)\n {\n super.onNewToken(token);\n String currentUserId = getCurrentUserId();\n if (currentUserId != null)\n {\n sendRegistrationToServer(token, currentUserId);\n }\n }", "public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}", "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 }", "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 }", "private void startBroadcaster() {\n mHandler.post(mBroadcaster);\n }", "@Override\n public void onTokenRefresh(){\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n String token = FirebaseInstanceId.getInstance().getToken();\n Log.v(TAG, \"success in getting instance \"+ token);\n onSendRegistrationToServer(token);\n }\n }", "@Override\n public void onTokenRefresh() {\n // Fetch updated Instance ID token and notify of changes\n Intent intent = new Intent(this, RegistrationIntentService.class);\n intent.putExtra(\"SOURCE\", \"GCM\");\n startService(intent);\n }", "void sendInterval() {\n OscilloscopeMsg omsg = new OscilloscopeMsg();\n\n omsg.set_version(version);\n omsg.set_interval(interval);\n omsg.set_token(Constants.TOKEN_SECRET_PC);\n\n System.out.println(\"Send out omsg\");\n try {\n mote.send(MoteIF.TOS_BCAST_ADDR, omsg);\n }\n catch (IOException e) {\n window.error(\"Cannot send message to mote\");\n }\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 }", "public void run() {\n sendServerRegistrationMessage();\n if (serviceConnectedListener != null) {\n serviceConnectedListener.onServiceConnected(serviceDevice);\n }\n\n isRegistered = true;\n }", "@Override\n public void run() {\n byte[] deviceTxPayload = CoreServices.getOrCreateHardwareWalletService().get().getContext().getSerializedTx().toByteArray();\n\n log.info(\"DeviceTx payload:\\n{}\", Utils.HEX.encode(deviceTxPayload));\n\n // Load deviceTx\n Transaction deviceTx = new Transaction(MainNetParams.get(), deviceTxPayload);\n\n log.info(\"deviceTx:\\n{}\", deviceTx.toString());\n\n // Check the signatures are canonical\n for (TransactionInput txInput : deviceTx.getInputs()) {\n byte[] signature = txInput.getScriptSig().getChunks().get(0).data;\n if (signature != null) {\n log.debug(\n \"Is signature canonical test result '{}' for txInput '{}', signature '{}'\",\n TransactionSignature.isEncodingCanonical(signature),\n txInput.toString(),\n Utils.HEX.encode(signature));\n } else {\n log.warn(\"No signature data\");\n }\n }\n\n log.debug(\"Committing and broadcasting the last tx\");\n\n BitcoinNetworkService bitcoinNetworkService = CoreServices.getOrCreateBitcoinNetworkService();\n\n if (bitcoinNetworkService.getLastSendRequestSummaryOptional().isPresent()\n && bitcoinNetworkService.getLastWalletOptional().isPresent()) {\n\n SendRequestSummary sendRequestSummary = bitcoinNetworkService.getLastSendRequestSummaryOptional().get();\n\n // Check the unsigned and signed tx are essentially the same as a check against malware attacks on the Trezor\n if (TransactionUtils.checkEssentiallyEqual(sendRequestSummary.getSendRequest().get().tx, deviceTx)) {\n // Substitute the signed tx from the trezor\n log.debug(\n \"Substituting the Trezor signed tx '{}' for the unsigned version {}\",\n deviceTx.toString(),\n sendRequestSummary.getSendRequest().get().tx.toString()\n );\n sendRequestSummary.getSendRequest().get().tx = deviceTx;\n log.debug(\"The transaction fee was {}\", sendRequestSummary.getSendRequest().get().fee);\n\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_TRANSACTION_CREATED_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n\n // Get the last wallet\n Wallet wallet = bitcoinNetworkService.getLastWalletOptional().get();\n\n // Commit and broadcast\n bitcoinNetworkService.commitAndBroadcast(sendRequestSummary, wallet, paymentRequestData);\n\n // Ensure the header is switched off whilst the send is in progress\n ViewEvents.fireViewChangedEvent(ViewKey.HEADER, false);\n } else {\n // The signed transaction is essentially different from what was sent to it - abort send\n sendBitcoinConfirmTrezorPanelView.setOperationText(MessageKey.TREZOR_FAILURE_OPERATION);\n sendBitcoinConfirmTrezorPanelView.setRecoveryText(MessageKey.CLICK_NEXT_TO_CONTINUE);\n sendBitcoinConfirmTrezorPanelView.setDisplayVisible(false);\n }\n } else {\n log.debug(\"Cannot commit and broadcast the last send as it is not present in bitcoinNetworkService\");\n }\n // Clear the previous remembered tx\n bitcoinNetworkService.setLastSendRequestSummaryOptional(Optional.<SendRequestSummary>absent());\n bitcoinNetworkService.setLastWalletOptional(Optional.<Wallet>absent());\n }", "public static void pushRequestDeviceToken(Context context) {\n PushRegistration.RegisterTask task = new PushRegistration.RegisterTask(context);\n executorService.submit(task);\n }", "@Override\n public void onTokenRefresh() {\n // Get updated InstanceID token.\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"Refreshed token: \" + refreshedToken);\n sendRegistrationToServer(refreshedToken);\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\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 sendBroadcast(String messageStr) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n byte[] sendData = messageStr.getBytes();\n try {\n DatagramSocket sendSocket = new DatagramSocket(null);\n sendSocket.setReuseAddress(true);\n sendSocket.bind(new InetSocketAddress(9876));\n sendSocket.setBroadcast(true);\n\n //Broadcast to all IP addresses on subnet\n try {\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, InetAddress.getByName(\"255.255.255.255\"), 9876);\n sendSocket.send(sendPacket);\n Log.i(getClass().getName(), \"Request packet sent to: 255.255.255.255 (DEFAULT)\");\n } catch (Exception e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n } catch (IOException e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.e(\"SERVICE\",\"sulod\");\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setAction(ResponseReceiver.ACTION_RESP);\n\t\t\t\tintent.addCategory(Intent.CATEGORY_DEFAULT);\n\t\t\t\tintent.putExtra(\"MESSAGE\", 100);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}", "private void sendRegistrationToServer(String token, String userId)\n {\n Context context = getAppContext();\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n db.document(context.getString(R.string.users_collection) + \"/\" + userId)\n .update(context.getString(R.string.firestore_user_token_field), token);\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 }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n super.onNewToken(token);\n Log.e(\"newToken\", token);\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n }", "private void sendRegistrationToServer(String regId, String authToken) {\n\n try {\n // Send authToken to the server\n HttpHelper http = new HttpHelper(null, null, 7000);\n JSONObject data = new JSONObject();\n try {\n data.put(\"service\", \"AndroidGCM\");\n data.put(\"regId\", regId);\n data.put(\"name\", \"TODO: Nom\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n http.setUser(null);\n http.setPassword(null);\n ArrayList<String[]> headers = new ArrayList<>();\n headers.add(new String[]{\"authentication_token\", authToken});\n headers.add(new String[]{\"Content-Type\", \"application/json\"});\n HttpResultHelper httpResult = http.post(\"https://ioPush.net/app/api/addDevice\", data.toString(), headers);\n BufferedReader in = new BufferedReader(new InputStreamReader(httpResult.getResponse()));\n String result = \"\";\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n result += inputLine;\n }\n if (httpResult.getStatusCode() == 200) {\n Log.i(TAG, \"Send regId result : \" + result);\n } else {\n Log.i(TAG, \"Failed to send regId, error code : \" + httpResult.getStatusCode());\n Log.i(TAG, \"Error message : \" + result);\n }\n } catch (Exception e) {\n Log.d(TAG, \"Failed to issue post request\", e);\n }\n\n }", "private void sendRegistrationIdToBackend()\n {\n\tLog.d(Globals.TAG, \"REGISTER USERID: \" + regid);\n\tString name = ((EditText)findViewById(R.id.name_edittext)).getText().toString();\n\tnew AsyncTask<String, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(String... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"name\", params[0]);\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.REGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent registration\";\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t }\n\t}.execute(name);\n }", "@Override\n public void onNewToken(String token) {\n Log.d(TAG, \"Refreshed token: \" + token);\n\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n sendRegistrationToServer(token);\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(\"Test\", \"Refreshed token: \" + refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }", "public static void storeToken(AccessToken token, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putString(\"Token\", token.getToken());\n\t\teditor.putString(\"Token Secret\", token.getTokenSecret());\n\t\teditor.commit();\n\t}", "@Override\n public void run() {\n String domain = Constant.BASE_URL + Constant.TICKER;\n String params = Constant.OPER + \"=\" + Constant.TICK_CORP + \"&\" + Constant.LOGIN_TOKEN + \"=\" + token + \"&\" + \"p=1\";\n String json = GetSession.post(domain, params);\n if (!json.equals(\"+ER+\")){\n try {\n if (json.equals(\"[]\")) {\n Message message = new Message();\n message.what = NODATASHOW;\n handler.sendMessage(message);\n }\n JSONArray jsonArray = new JSONArray(json);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n }", "private void syncWithServer() {\n if (!mIsActivityResumedFromSleep) {\n LogHelper\n .log(TAG, \"Activity is not resuming from sleep. So service initialization will handle xmpp login.\");\n return;\n }\n RobotCommandServiceManager.loginXmppIfRequired(getApplicationContext());\n }", "@Override\n\tpublic void startLocalTimer() throws HFModuleException {\n\t\tthis.isAppRunning = true;\n\t\ttry {\n\t\t\tHFConfigration.broudcastIp = InetAddress\n\t\t\t\t\t.getByName(getBroadcastAddress());\n\t\t\tlocalBeatSocket = new DatagramSocket();\n\t\t\tlocalBeatSocket.setBroadcast(true);\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_BROADCAST_GET,\n\t\t\t\t\te.getMessage());\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_BROADCAST_GET,\n\t\t\t\t\te.getMessage());\n\t\t}\n\t\tnew Thread(beatThread).start();\n\t\tnew Thread(recvThread).start();\n\t}", "public void sendToToken() throws FirebaseMessagingException {\n // [START send_to_token]\n // This registration token comes from the client FCM SDKs.\n// String registrationToken = \"ea3MHjI0W3E:APA91bH1LL8R1tG16JtkK4j3Up1CUAdvVhfdBfJC38zvdeGrLrsQ3bzFoVrgqlENRKM88f41VkM7pE5fMaUtCDn8BVHkDA_jmc74BOoO5tJHhKbkKGSnF3_J2nXWZNWfhFjzpT2nVDHr\";\n String registrationToken = \"f1ZopkTtXas:APA91bFZVD3HVC9UHWCfwnp6IbOUQRdTM0TOKjuRy\" +\n \"-6yoDDqJW9t1N1bncjRmvnp4qVGbH1Ncf32eOfdC6hImCIeFPgDI8pbQXs3PFnSCTmOgjBdiV_yyuYSUhK9IsRGvhq68ik0LQga\";\n FirebaseApp app = FirebaseApp.initializeApp(\"crajee\");\n FirebaseMessaging.getInstance(app);\n // See documentation on defining a message payload.\n Message message = Message.builder()\n .setNotification(new Notification(\"hello abhiii - 1\",\"message from code !\"))\n .putData(\"score\", \"850\")\n .putData(\"time\", \"2:45\")\n .setToken(registrationToken)\n .build();\n\n // Send a message to the device corresponding to the provided\n // registration token.\n String response = FirebaseMessaging.getInstance().send(message);\n // Response is a message ID string.\n System.out.println(\"Successfully sent message: \" + response);\n // [END send_to_token]\n }", "private void sendRegistrationToServer(final String fcmToken) {\n Log.e(TAG, \"sendRegistrationToServer: \" + fcmToken);\n final String token= QueryPreferences.getToken(this);\n AsyncTask<Void, Void, Void> task= new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... voids) {\n\n RequestQueue requestQueue = Volley.newRequestQueue(MyFirebaseInstanceIDService.this);\n\n Map<String, String> params= new HashMap<>();\n params.put(\"token\", token);\n params.put(\"fcmToken\", \"\" + fcmToken);\n JsonObjectRequest jor= new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n });\n requestQueue.add(jor);\n return null;\n }\n };\n if(token!=null)\n task.execute();\n }", "@Override\n public void run() {\n FirebaseDatabase.getInstance().getReference().child(\"Tokens\").child(targetID).child(\"token\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String usertoken=snapshot.getValue(String.class);\n sendNotifications(usertoken, \"Appointment completed\",\"Open your app to leave a review\");\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n updateDialog.dismiss();\n\n finish();\n overridePendingTransition(0, 0);\n startActivity(getIntent());\n overridePendingTransition(0, 0);\n\n }", "public void startBroadcast() {\r\n\t\tthePres.startBroadcast();\r\n\t\tstartBtn.setLabel(\"StopBroadcast\");\r\n\t\tdrawer.startTasking();\r\n\t\tisPlaying = true;\r\n\t}", "public void run() {\n try {\n PrivateKey privateKey = RSAUtils.getPrivateKey(SenzService.this);\n\n // if sender not already set find user(sender) and set it to senz first\n if (senz.getSender() == null || senz.getSender().toString().isEmpty())\n senz.setSender(PreferenceUtils.getUser(getBaseContext()));\n\n // get digital signature of the senz\n String senzPayload = SenzParser.getSenzPayload(senz);\n String signature = RSAUtils.getDigitalSignature(senzPayload.replaceAll(\" \", \"\"), privateKey);\n String message = SenzParser.getSenzMessage(senzPayload, signature);\n Log.d(TAG, \"Senz to be send: \" + message);\n\n // sends the message to the server\n write(message);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void sendEventToServer() throws UnknownHostException, IOException {\n \t\t\n \t\tSocket socket = null; \n \t\t\n \t\tsocket = new Socket(Constants.ServerIp, Constants.Port);\n \t\t\n \t\tObjectOutputStream serializer = null;\n \t\t\n \t\tserializer = new ObjectOutputStream(socket.getOutputStream());\n \t\t//TODO: Send a message to server for new Event\n \t\t\n \t\tMessageType t = MessageType.newPubEventMessage;\n \t\tserializer.writeObject(t);\n \t\tserializer.writeObject(event);\n \t\tserializer.flush();\n \t\t//TODO: Send the event\n \t\t//TODO: Send to Pending Screen\n \t}", "private void sendRegisterMessage() {\n Message initMessage = new Message(\"register\");\n initMessage.name = name;\n sendMessage(initMessage);\n\n log(\"sent init. message:\" + initMessage);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n //setContentView(R.layout.main);\n try {\n //KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());\n //ks.load(getResources().openRawResource(R.raw.public_key), \"asdf\".toCharArray());\n\n mobile = new Mobile(1, \"192.168.105.129\", 7777);\n mobile.SetAuthFile(this.getFileStreamPath(\"netronics_auth\").getPath());\n mobile.On(\"hi\", new RecvOnListener() {\n @Override\n public void On(Mobile mobile, Object o) {\n mobile.Emit(\"hi2\", o);\n }\n });\n mobile.On(\"push_test\", new RecvOnListener() {\n @Override\n public void On(Mobile mobile, Object o) {\n Log.d(\"Netronics Push\", o.toString());\n }\n });\n mobile.AddPush(new GCM(this, \"568476072992\"));\n mobile.Run();\n mobile.Emit(\"hi\", \"test\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onMotdSent() {\r\n\t\tif (!loggedIn) {\r\n\t\t\tif (adminWindow != null) {\r\n\t\t\t\tadminWindow.setVisible(true);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t\tloggedIn = true;\r\n\t\t}\r\n\t\t\r\n\t}", "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\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}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_welcome);\n\n final Handler handler = new Handler(WelcomeActivity.this.getMainLooper()){\n public void handleMessage(Message msg) {\n\n if (msg.what == -1) {\n\n if (!ifStartMainActivity) {\n ifStartMainActivity = true;\n\n tk = new TokenKeeper(getApplicationContext());\n// tk.logoutUser();\n\n if(!tk.isUserLoggedIn()){\n// Intent it = new Intent(WelcomeActivity.this, LoginActivity.class);\n Intent it = new Intent(WelcomeActivity.this, LoginActivity.class);\n startActivity(it);\n finish();\n }else{\n tk.getUser();\n Intent it2 = new Intent(WelcomeActivity.this, MyNewDaysActivity.class);\n startActivity(it2);\n finish();\n }\n }\n }\n }\n };\n\n// mAccount = CreateSyncAccount(this);\n\n\n Timer timer = new Timer();\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n handler.sendEmptyMessage(-1);\n }\n };\n\n timer.schedule(task, 1500);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(Config.REGISTRATION_COMPLETE)) {\n // gcm successfully registered\n // now subscribe to `global` topic to receive app wide notifications\n String token = intent.getStringExtra(\"token\");\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token: \" + token, Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.SENT_TOKEN_TO_SERVER)) {\n // gcm registration id is stored in our server's MySQL\n\n //Toast.makeText(getContext().getApplicationContext(), \"GCM registration token is stored in server!\", Toast.LENGTH_LONG).show();\n\n } else if (intent.getAction().equals(Config.PUSH_NOTIFICATION)) {\n // new push notification is received\n NotificationUtils notificationUtils = new NotificationUtils();\n notificationUtils.playNotificationSound();\n String message = intent.getStringExtra(\"message\");\n String from = intent.getStringExtra(\"from\");\n String time = intent.getStringExtra(\"time\");\n String other = intent.getStringExtra(\"otherId\");\n\n getHistory();\n\n //Toast.makeText(getApplicationContext(), from + \": \" + message + \" \" + other, Toast.LENGTH_LONG).show();\n //saveToPreferences(MainActivity.this,KEY_NOTIFICATIONS,null);\n }\n }", "public void startKeepAliveSender(String authToken) {\n this.token = authToken;\n stopKeepAliveSender();\n\n logger.info(\"Starting keepAlive Sender\");\n future = scheduler.scheduleAtFixedRate(new Runnable() {\n public void run() {\n sendKeepAliveBridgeMessage(appId, bridgeId, token, httpClient);\n }\n }, 0, keepAliveInterval, TimeUnit.MILLISECONDS);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n if (intent.getAction().endsWith(GCMRegistrationIntentService.REGISTRATION_SUCCESS)) {\n // Registration success\n String deviceToken = intent.getStringExtra(\"token\");\n\n // insert to database\n volleyGCM.storeAToken(deviceToken);\n\n // If the current logged in device doesn't match user's database token, update it\n if ((!deviceToken.equals(userLocalStore.getLoggedInUser().getToken())) && UserLocalStore.isUserLoggedIn) {\n\n // Update to the logged in device's token for push notification\n volleyGCM.updateGCMToken(userLocalStore.getLoggedInUser().getUserID(), deviceToken);\n }\n\n // if user is logged in, check to update their token\n\n //Toast.makeText(getApplicationContext(), \"GCM token \" + deviceToken, Toast.LENGTH_SHORT).show();\n } else if (intent.getAction().endsWith(GCMRegistrationIntentService.REGISTRATION_ERROR)) {\n // Registration error\n Toast.makeText(getApplicationContext(), \"GCM registration error \", Toast.LENGTH_SHORT).show();\n } else {\n // Tobe define\n }\n }", "public void sendHeartbeat();", "@Override\n public void onTokenRefresh() {\n\n String token = FirebaseInstanceId.getInstance().getToken();\n CTOKEN = token;\n\n// if(sgen.ID != \"\") {\n// String query = \"UPDATE USER_DETAILS SET FTOKEN = '\"+token+\"' WHERE ID = '\"+sgen.ID+\"'; \";\n// ArrayList<Team> savedatateam = servicesRequest.save_data(query);\n// sgen.FTOKEN = token;\n// }\n\n\n // Once the token is generated, subscribe to topic with the userId\n// if(sgen.ATOKEN.equals(sgen.CTOKEN)) {\n try {\n FirebaseMessaging.getInstance().subscribeToTopic(SUBSCRIBE_TO);\n Log.i(TAG, \"onTokenRefresh completed with token: \" + token);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n// }\n\n\n /* sendRegistrationToServer(refreshedToken);*/\n }", "public static void StartRegisterToGCM(Context context) {\n Intent intent = new Intent(context, FooDoNetInstanceIDListenerService.class);\n intent.setAction(ACTION_REGISTER_TO_GCM);\n //parentForCallback = (IFooDoNetServerCallback)context;\n context.startService(intent);\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tIntent intent =null;\r\n\t\t\t\t\tChainApplication application = (ChainApplication) getApplicationContext();\r\n\t\t\t\t\tUser user = application.getUserInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(StringUtils.isEmpty(user.getUser_Name()) && StringUtils.isEmpty(HttpManager.getInstance().getToken(HttpManager.KEY_TOKEN))){\r\n\t\t\t\t\t\tintent = new Intent(getActivity(),LoginActivity.class);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tintent = new Intent(getActivity(), MainActivity.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "void sendMessageOnRealtime(String revokedToken, Properties properties);", "public void GuardarToken(String token){\n SharedPreferences.Editor edits = prefs.edit();\n edits.putString(MYConstantsPreferences.MAQUIPURAY_TOKEN, token);\n edits.apply();\n }", "@Override\n public void run() {\n Gson gson = new Gson();\n view.setCanPass(false);\n view.timeout();\n SimpleMessage passMessage = new SimpleMessage(view.getOwnerNick());\n String message = gson.toJson(passMessage, SimpleMessage.class);\n MessageEnvelope envelope = new MessageEnvelope(MessageType.PASS, message);\n Command.sendMessage(gson.toJson(envelope, MessageEnvelope.class));\n }", "private void setMessagingToken() {\n FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(task -> {\n if (task.isSuccessful() && user != null) {\n sendMessageToken(Objects.requireNonNull(task.getResult()).getToken());\n }\n });\n }", "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}", "public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }", "@Override\n public void onTokenRefresh() {\n String refreshedToken = FirebaseInstanceId.getInstance().getToken();\n Log.d(TAG, \"Refreshed token: \" + refreshedToken);\n\n saveToken(refreshedToken);\n sendRegistrationToServer(refreshedToken);\n }", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void sendToToken() throws FirebaseMessagingException {\n String registrationToken = \"e7dEn3DxTSA:APA91bGeQSRd0nJ-pEx9p_vcl34aBvgaEnbB97T0XwF__vwsBVXC8rPHIn2s0q52z0yLJqQFrS03u9GyiIS6Yerp5WCCS37thK3VXf2ps6_mR9Ija-B6sGyp_2_hpURAsw56FsWMsYO-\";\n\n // See documentation on defining a message payload.\n Message message = Message.builder()\n .putData(\"score\", \"850\")\n .putData(\"time\", \"2:45\")\n .setToken(registrationToken)\n .build();\n\n // Send a message to the device corresponding to the provided\n // registration token.\n String response = FirebaseMessaging.getInstance().send(message);\n // Response is a message ID string.\n System.out.println(\"Successfully sent message: \" + response);\n // [END send_to_token]\n }", "private void updateRegistrationToServer(String token) {\n // Add custom implementation, as needed.\n JSONObject object = new JSONObject();\n try {\n object.put(\"device_id\", token);\n object.put(\"api_token\", Prefs.getUserInfo() != null ? Prefs.getUserInfo().getToken() : \"\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n String postData = object.toString();\n new DownloadAsyncTask(getApplicationContext(), Constants.API_UPDATE_DEVICE_ID, Constants.ID_METHOD_API_UPDATE_DEVICE_ID, jsonCallback, false, DownloadAsyncTask.HTTP_VERB.POST.getVal(), postData);\n\n }", "private void sendNotification() {\n }", "private void mtd_refresh_token() {\n RxClient.get(FeedActivity.this).Login(new loginreq(sharedpreferences.\n getString(SharedPrefUtils.SpEmail, \"\"),\n sharedpreferences.getString(SharedPrefUtils.SpPassword, \"\")), new Callback<loginresp>() {\n @Override\n public void success(loginresp loginresp, Response response) {\n\n if (loginresp.getStatus().equals(\"200\")){\n\n editor.putString(SharedPrefUtils.SpRememberToken,loginresp.getToken().toString());\n editor.commit();\n\n final Handler handler = new Handler();\n final Runnable runnable = new Runnable() {\n @Override\n public void run() {\n wbService(tmpansList);\n progressBar.setVisibility(View.INVISIBLE);\n }\n };\n handler.postDelayed(runnable, 500);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n progressBar.setVisibility(View.INVISIBLE);\n Log.d(\"refresh token\", \"refresh token error\");\n Toast.makeText(FeedActivity.this, \"Service not response\",\n Toast.LENGTH_LONG).show();\n finish();\n }\n });\n\n }", "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tRegisterVtvAccountService.register(mActivity, usernameFinal);\r\n\t\t\t\t\t}", "public void sendTokenToServer(final String strToken) {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n final DatabaseReference usersRef = database.getReference(\"users\");\n\n usersRef.addListenerForSingleValueEvent(new com.google.firebase.database.ValueEventListener() {\n @Override\n public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {\n\n for (com.google.firebase.database.DataSnapshot userSnapshot : dataSnapshot.getChildren()) {\n //Getting the data from snapshot\n FirebaseUserModel firebaseUserModel = userSnapshot.getValue(FirebaseUserModel.class);\n\n if (strToken != null && firebaseUserModel.getDeviceId().equals(user.deviceId) && !strToken.equals(firebaseUserModel.getDeviceToken())) {\n user.deviceToken = strToken;\n usersRef.child(userSnapshot.getKey()).child(\"deviceToken\").setValue(strToken, new Firebase.CompletionListener() {\n\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.i(TAG, firebaseError.toString());\n } else {\n System.out.println(\"Refreshed Token Updated\");\n }\n }\n });\n\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n System.out.println(\"The read failed: \" + databaseError.getMessage());\n }\n });\n\n }", "private void sendBroadcast(final String message) {\n Log.d(\"BLE\", \"sendBroadcast: \" + message);\n\n Intent intent = new Intent(message);\n\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Override\n public void onNewToken(String token) {\n Log.d(\"FireBaseActivity\", \"Refreshed token: \" + token);\n // If you want to send messages to this application instance or\n // manage this apps subscriptions on the server side, send the\n // Instance ID token to your app server.\n // sendRegistrationToServer(token);\n }" ]
[ "0.64070684", "0.62990063", "0.60492074", "0.60492074", "0.60492074", "0.60492074", "0.603866", "0.603866", "0.6017404", "0.58555216", "0.58416617", "0.5826512", "0.5800618", "0.56324357", "0.56184185", "0.5567789", "0.5548829", "0.5444275", "0.53946733", "0.53829116", "0.5258903", "0.52489704", "0.52399063", "0.52333766", "0.5232599", "0.52202004", "0.5212476", "0.52014714", "0.5195856", "0.5184199", "0.51433593", "0.5135484", "0.5133077", "0.51174015", "0.5112776", "0.5111389", "0.5110849", "0.50897574", "0.50808156", "0.5072258", "0.5058803", "0.50568163", "0.50560963", "0.504989", "0.50443316", "0.5039677", "0.50390464", "0.503577", "0.5029642", "0.50272715", "0.50184625", "0.50067335", "0.5005187", "0.49983132", "0.49884564", "0.49878025", "0.4982742", "0.4979608", "0.4968774", "0.49664098", "0.4963766", "0.4958601", "0.49584836", "0.49554563", "0.4952418", "0.49420938", "0.49388784", "0.4907144", "0.49038714", "0.49035564", "0.48985475", "0.48904684", "0.48751485", "0.48726222", "0.48697898", "0.48688787", "0.48678976", "0.48657233", "0.48621333", "0.4854352", "0.4841129", "0.483142", "0.4822894", "0.48207027", "0.48164985", "0.48164177", "0.48152328", "0.4813964", "0.48124406", "0.48095635", "0.48074588", "0.48070192", "0.48027223", "0.47979409", "0.47936964", "0.47936088", "0.47902948", "0.47872165", "0.47868448", "0.47854334" ]
0.5966939
9
Creating measure processing (used in case of measure).
private static MeasureProcessing getMeasureProcessing() { if(measure == null) { measure = new MeasureProcessing(); } return measure; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double getMeasure();", "int measure();", "public interface CurveMeasure extends Measure{\n\t\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to all topic and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues)\n\t\t\tthrows IOException, InterruptedException, NumberFormatException, ItemNotFoundException, \n\t\t\tInvalidItemNameException, QrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to selected topics and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @param topicNumbers - selected topic name array \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues, String[] topicNumbers) throws IOException,\n\t\t\tInterruptedException, NumberFormatException, ItemNotFoundException, InvalidItemNameException, \n\t\t\tQrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n}", "public T add(T measure);", "private void updateFMeasure(){\n double precisionValue = precision.get(precision.size()-1);\n double recallValue = recall.get(recall.size()-1);\n if(precisionValue==0.0 || recallValue==0.0){\n fMeasures.add(0.0);\n }else{\n fMeasures.add((2*precisionValue*recallValue)/(precisionValue+recallValue));\n }\n \n }", "public void onMeasure(int i, int i2) {\n AppMethodBeat.m2504i(38322);\n super.onMeasure(i, i2);\n AppMethodBeat.m2505o(38322);\n }", "protected abstract float getMeasurement();", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "Measure getMeasure ()\n {\n return null;\n }", "public MolapMeasure(String measureName) \r\n\t{\r\n\t\tthis.measureName = measureName;\r\n\t}", "public void addMeasureSpecs(Resource component, String label, Resource measureProperty){\n\t\tdataCubeModel.add(component, RDF.type, QB.ComponentSpecification);\n\t\tdataCubeModel.add(component, RDFS.label, label);\n\t\tdataCubeModel.add(component, QB.measure, measureProperty);\n\t}", "@Override\r\n public boolean visit (Measure measure)\r\n {\r\n // Adjust measure abscissae\r\n if (!measure.isDummy()) {\r\n measure.resetAbscissae();\r\n }\r\n\r\n // Set measure id, based on a preceding measure, whatever the part\r\n Measure precedingMeasure = measure.getPreceding();\r\n\r\n // No preceding system?\r\n if (precedingMeasure == null) {\r\n ScoreSystem prevSystem = (ScoreSystem) measure.getSystem()\r\n .getPreviousSibling();\r\n\r\n if (prevSystem != null) { // No preceding part\r\n precedingMeasure = prevSystem.getFirstRealPart()\r\n .getLastMeasure();\r\n }\r\n }\r\n\r\n if (precedingMeasure != null) {\r\n measure.setId(precedingMeasure.getId() + 1);\r\n } else {\r\n // Very first measure\r\n measure.setId(measure.isImplicit() ? 0 : 1);\r\n }\r\n\r\n return true;\r\n }", "public interface MeasurePropertyType\n\t\t{\n\t\tpublic String getDesc();\n\t\t\n\t\t/**\n\t\t * Which properties, must be fixed and the same for all particles \n\t\t */\n\t\tpublic Set<String> getColumns();\n\t\t\n\t\t/**\n\t\t * Evaluate a stack, store in info. If a particle is not in the list it must be\n\t\t * created. All particles in the map must receive data.\n\t\t */\n\t\tpublic void analyze(ProgressHandle progh, EvStack stackValue, EvStack stackMask, ParticleMeasure.FrameInfo info);\n\t\t}", "void addMeasure(double currentMeasure) {\n\t\t// If there is no more failed allowed, do nothing\n\t\tif(isTraining()) {\n\t\t\t/* Repeat 4x times from the second time\n\t\t\t * What we do is add:\n\t\t\t * (measure 3 - measure 2) + (measure 4 - measure 3) + ... */\n\t\t\tif(1 <= remainingLearnExample && remainingLearnExample <= 4)\n\t\t\t\tappendMeasureToSlope(currentMeasure);\n\t\t\t/* We need to keep the current measure for the next time\n\t\t\t * the method is called */\n\t\t\tlastMeasure = currentMeasure;\n\n\t\t\tremainingLearnExample--;\n\t\t\tif(remainingLearnExample == 0) {\n\t\t\t\t// If the random freq gave better results, keep it\n\t\t\t\tupdateBestFrequency();\n\t\t\t\trandomExploFreq = random.nextDouble(0.01, 1);\n\t\t\t\treset();\n\t\t\t}\n\t\t}\n\t}", "public abstract double getMeasurement();", "public abstract double getMeasurement();", "@Override\n public int getCurrentMeasure() {\n return this.currentMeasure;\n }", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public MMTMeasurement(){\n }", "@Override\n\tpublic void run(){\n\t\tLog.v(\"measure\",\"Thread started\");\n\t\t\n\t\twhile(mRun){\n try { \t\n \tsynchronized(this){wait(500);}\n \t\n \t\t\tfor(int i=0;i<numMeasurements;i++){\n \t\t\t\tfloat val=0;\n \t\t\t\tfloat diff=0;\n \t\t\t\tint timeDiv = measurementArray[i].mSource.getTimeDiv();\n \t\t\t\tint voltDiv = measurementArray[i].mSource.getVoltDiv();\n \t\t\t\tString result=null;\n \t\t\t\tMessage msg = new Message();\n \tmsg.what=MSG_MEASUREMENTS;\n \tmsg.arg1=-1;\n \tmsg.arg2=-1;\n \tBundle msgData = new Bundle();\n \t\t\t\t\n \t// Check measurement type, set correct result\n \t\t\t\tswitch(measurementArray[i].mType){\n \t\t\t\tcase 0: \t//delta-T measurement\n \t\t\t\t\tdiff = curt2.getPos()-curt1.getPos();//reversed, because of coordinate system on tablet\n \t\t\t\t\tval = diff/scrnWidth*mTimeConversion[timeDiv]; \n \t\t\t\t\t\n \t\t\t\t\tif(timeDiv<2)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ns\";\n \t\t\t\t\tif(timeDiv>=2 && timeDiv<=10)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" us\";\n \t\t\t\t\tif(timeDiv>=11 && timeDiv<=19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ms\";\n \t\t\t\t\tif(timeDiv>19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" s\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 1: \t//delta-V measurement\n \t\t\t\t\tdiff = curv2.getPos()-curv1.getPos(); //reversed, because of coordinate system on tablet \n \t\t\t\t\tval = diff/scrnHeight*mVoltConversion[voltDiv];\n \t\t\t\t\t\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2: \t//maximum\t\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMaximum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3: \t//minimum\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMinimum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\t\t//Pk-Pk\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getPkPk();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\t\t//Frequency\t\t\t\t\n \t\t\t\t\tval = measurementArray[i].mSource.getFreq();\n \t\t\t\t\tString append =\" Hz\";\n \t\t\t\t\tif(val/1000<1){\n \t\t\t\t\t\tappend = \" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if (val/1000000<1){\n \t\t\t\t\t\tval=val/1000;\n \t\t\t\t\t\tappend = \" kHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if(val/1000000>1){\n \t\t\t\t\t\tval=val/1000000;\n \t\t\t\t\t\tappend = \" MHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tappend=\" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val)+append;\n \t\t\t\t\t}\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\t\t//Average\n \t\t\t\t\tval = measurementArray[i].mSource.getAverage();\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n\t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n\t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tdefault:\n \t\t\t\t\tresult=\"...\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tsynchronized(measurementArray[i].mSource){\n\t\t\t\t\t\tmsg.arg1= measurementArray[i].mType;\n\t\t\t\t\t\tmsg.arg2=i;\n\t\t\t\t\t\t\n \t\t\t\t\tmsgData.putString(MEASUREMENT_RESULT, result);\n \t\t\t\t\tmsgData.putInt(SOURCE, measurementArray[i].mChan);\n \t\t\t\t}\n \t\t\t\tmsg.setData(msgData);\n \t\t\tif(msg.arg1!=-1)\n \t\t\t\tmHandler.sendMessage(msg);\n \t\t\t} \t\n }catch(Exception e){Log.e(TAG,e.toString());}\n\t\t}\n\t}", "private void analyseSamples(){\n EditText editTx;\n\n resetBackgrounds();\n\n MeasureSet measureSet;\n ArrayList<View> views = new ArrayList<View>();\n\n for(int y = 1; y <= rowCount; y++) {\n measureSet = new MeasureSet();\n views.clear();\n measureSet.copyUncertainty(measuredMag);\n for (int x = 1; x <= columnCount; x++) {\n editTx = (EditText) rootView.findViewById(Integer.parseInt(\"10\" + x + \"00\" + y)).findViewById(R.id.third_list_value);\n views.add(editTx);\n\n try {\n measureSet.add(Double.parseDouble(editTx.getText().toString()));\n } catch (Exception e) {\n editTx.setBackgroundResource(R.drawable.red_shape);\n Toast.makeText(getActivity(), getString(R.string.third_invalid_value), Toast.LENGTH_SHORT).show();\n return;\n }\n }\n\n if (!StatisticUtils.applyChauvenet(measureSet, views)) {\n Toast.makeText(getActivity(), getString(R.string.third_chauvenet_invalid_samples), Toast.LENGTH_SHORT).show();\n return;\n }\n\n measuredMag.addMeasureSet(measureSet);\n }\n\n ((MainActivity) getActivity()).callFragment(Constants.FINAL_STEP_FRAGMENT, mag1, mag2);\n }", "public ChunkDataSetBuilder addMeasure(BugPronenessMeasure measure) {\n\t\tthis.measures.add(measure);\n\t\tthis.attributes.addAttribute(new Attribute(measure.getName()));\n\t\treturn this;\n\t}", "Meter createMeter();", "private void iterativeDataPropertyMetrics() {\n\t}", "public void setMeasuredBy(MeasureDefinition measure) {\n\t\t\n\t\tthis.measuredBy = measure;\n\t}", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public void addMeasureProperty(Property measure, String label){\n\t\tdataCubeModel.add(measure, RDF.type, QB.MeasureProperty);\n\t\tdataCubeModel.add(measure, RDFS.label, label);\n\t}", "public interface Measurable {\n double getMeasure();\n}", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Measure p, A arg)\n {\n\n return null;\n }", "@SuppressWarnings(\"restriction\")\npublic interface Meter {\n\n Collection<? extends Metric<?>> supportedMetrics();\n\n Collection<? extends Measure<?>> measureData(MonitoredVm vm);\n}", "@Override\n public Optional<Measure> createMeasure(FakeCounter counter, CreateMeasureContext context) {\n assertThat(context.getComponent()).isNotNull();\n assertThat(context.getMetric()).isSameAs(metricRepository.getByKey(NCLOC_KEY));\n\n return Optional.of(Measure.newMeasureBuilder().create(counter.value));\n }", "@Override\n public Optional<Measure> createMeasure(FakeVariationCounter counter, CreateMeasureContext context) {\n assertThat(context.getComponent()).isNotNull();\n assertThat(context.getMetric()).isSameAs(metricRepository.getByKey(NEW_COVERAGE_KEY));\n\n IntValue measureVariations = counter.values;\n if (measureVariations.isSet()) {\n return Optional.of(\n newMeasureBuilder()\n .setVariation(measureVariations.getValue())\n .createNoValue());\n }\n return Optional.empty();\n }", "@Override\n public Optional<Measure> createMeasure(FakeCounter counter, CreateMeasureContext context) {\n assertThat(context.getComponent()).isNotNull();\n assertThat(context.getMetric())\n .isIn(metricRepository.getByKey(NEW_LINES_TO_COVER_KEY), metricRepository.getByKey(NEW_COVERAGE_KEY));\n\n return Optional.of(Measure.newMeasureBuilder().create(counter.value + metricOffset(context.getMetric())));\n }", "public void setMeasureID(Integer measureID) {\n this.measureID = measureID;\n }", "public abstract Set<Measure> supportedMeasures();", "public void startMeasuring() {\n\tsuper.startMeasuring();\n}", "@Override\n public List<String> getMeasures() {\n return measures;\n }", "public String getMeasureResult() {\r\n return measureResult;\r\n }", "public String getMeasureId() {\r\n\t\treturn measureId;\r\n\t}", "@Override\n public Enumeration<String> enumerateMeasures() {\n\n Vector<String> newVector = new Vector<String>(3);\n newVector.addElement(\"measureNumRules\");\n newVector.addElement(\"measureNumPositiveRules\");\n newVector.addElement(\"measureNumConditionsInPositiveRules\");\n return newVector.elements();\n }", "private Measurement getMeasurements(){\n Measurement measurement = new Measurement();\n\n //set to date of measurement added\n measurement.setDate(new Date());\n\n //retrieve measurement data from edit texts. if edit text is empty make measurement 0;\n String neckString = neckEditText.getText().toString();\n double neck = (!neckString.equals(\"\")) ? Double.parseDouble(neckString) : 0;\n measurement.setNeck(neck);\n\n String chestString = chestEditText.getText().toString();\n double chest = (!chestString.equals(\"\")) ? Double.parseDouble(chestString) : 0;\n measurement.setChest(chest);\n\n String shoulderString = shoulderEditText.getText().toString();\n double shoulders = (!shoulderString.equals(\"\")) ? Double.parseDouble(shoulderString) : 0;\n measurement.setShoulders(shoulders);\n\n String leftArmString = leftArmEditText.getText().toString();\n double leftArm = (!leftArmString.equals(\"\")) ? Double.parseDouble(leftArmString) : 0;\n measurement.setLeftArm(leftArm);\n\n String rightArmString = rightArmEditText.getText().toString();\n double rightArm = (!rightArmString.equals(\"\")) ? Double.parseDouble(rightArmString) : 0;\n measurement.setRightArm(rightArm);\n\n String leftForearmString = leftForearmEditText.getText().toString();\n double leftForearm = (!leftForearmString.equals(\"\")) ? Double.parseDouble(leftForearmString) : 0;\n measurement.setLeftForearm(leftForearm);\n\n String rightForearmString = rightForearmEditText.getText().toString();\n double rightForearm = (!rightForearmString.equals(\"\")) ? Double.parseDouble(rightForearmString) : 0;\n measurement.setRightForearm(rightForearm);\n\n String waistString = waistEditText.getText().toString();\n double waist = (!waistString.equals(\"\")) ? Double.parseDouble(waistString) : 0;\n measurement.setWaist(waist);\n\n String hipsString = hipsEditText.getText().toString();\n double hips = (!hipsString.equals(\"\")) ? Double.parseDouble(hipsString) : 0;\n measurement.setHips(hips);\n\n String leftLegString = leftLegEditText.getText().toString();\n double leftLeg = (!leftLegString.equals(\"\")) ? Double.parseDouble(leftLegString) : 0;\n measurement.setLeftLeg(leftLeg);\n\n String rightLegString = rightLegEditText.getText().toString();\n double rightLeg = (!rightLegString.equals(\"\")) ? Double.parseDouble(rightLegString) : 0;\n measurement.setRightLeg(rightLeg);\n\n String leftCalfString = leftCalfEditText.getText().toString();\n double leftCalf = (!leftCalfString.equals(\"\")) ? Double.parseDouble(leftCalfString) : 0;\n measurement.setLeftCalf(leftCalf);\n\n String rightCalfString = rightCalfEditText.getText().toString();\n double rightCalf = (!rightCalfString.equals(\"\")) ? Double.parseDouble(rightCalfString) : 0;\n measurement.setRightCalf(rightCalf);\n\n String weightString = weightEditText.getText().toString();\n double weight = (!weightString.equals(\"\")) ? Double.parseDouble(weightString) : 0;\n measurement.setWeight(weight);\n\n String bodyFatString = bodyFatEditText.getText().toString();\n double bodyFat = (!bodyFatString.equals(\"\")) ? Double.parseDouble(bodyFatString) : 0;\n measurement.setBodyFat(bodyFat);\n\n //below variables are should be retrieved from the Shared Preferences.\n int age = mSharedPreferences.getInt(Constants.AGE, 0);\n measurement.setAge(age);\n boolean male = mSharedPreferences.getBoolean(Constants.SEX, true);\n measurement.setMale(male);\n String activityLevel = mSharedPreferences.getString(Constants.ACTIVITY, \"\");\n\n if(activityLevel.equals(getString(R.string.sedentary))){\n measurement.setActivityLevel(Calculators.SEDENTERAY);\n } else if(activityLevel.equals(getString(R.string.light))){\n measurement.setActivityLevel(Calculators.LIGHT);\n }else if(activityLevel.equals(getString(R.string.moderate))){\n measurement.setActivityLevel(Calculators.MODERATE);\n }else if(activityLevel.equals(getString(R.string.very_active))){\n measurement.setActivityLevel(Calculators.VERY_ACTIVE);\n }else if(activityLevel.equals(getString(R.string.extremely_active))){\n measurement.setActivityLevel(Calculators.EXTREMELY_ACTIVE);\n }\n\n double height = mSharedPreferences.getFloat(Constants.HEIGHT,0);\n measurement.setHeight(height);\n\n //if weight is more than 0 use the Calculators class to calculate the rest of the measurement variables\n if(weight > 0){\n measurement.setRestingEnergyExpenditure(Calculators.getRestingEnergyExpenditure(weight, height, age, male));\n measurement.setTotalDailyEnergyExpenditure(Calculators.getTotalDailyEnergyExpenditure(measurement.getRestingEnergyExpenditure(), measurement.getActivityLevel()));\n measurement.setProteinAmount(Calculators.getProteinAmount(weight));\n measurement.setFatAmount(Calculators.getFatAmount(measurement.getTotalDailyEnergyExpenditure()));\n measurement.setCarbAmount(Calculators.getCarbAmount(measurement.getProteinAmount(), measurement.getFatAmount(), measurement.getTotalDailyEnergyExpenditure()));\n measurement.setBMI(Calculators.getBMI(height, weight, true));\n measurement.setBMICategory(Calculators.getBMICatagory(measurement.getBMI()));\n measurement.setWaistToHeightRatio(Calculators.waistToHeightRatio(waist, height));\n measurement.setWITHCategory(Calculators.getWTHCatagory(measurement.getWaistToHeightRatio(), male));\n }\n return measurement;\n }", "protected final void registerMeasure(String inId) {\r\n\t\tmeasureIds.add(inId);\r\n\t}", "public void processRun(int nr, boolean logAtomics) throws IOException {\r\n\t\tString out =\"\";\r\n\t\t\r\n\t\tif(logAtomics) {\r\n\t\t\tout = \"\"+data.getName()+\" run \"+nr;\r\n\t\t\twriter.write(out);\r\n\t\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\t\tout = \"gen\"+SEP+\"fitness\"+SEP+\"pfm\"+SEP+\"f_full\"+SEP+\"f_1to1\"+SEP+\"dur\"+SEP+\"AUC_full\"+SEP+\"AUC_1to1\"+SEP+\"AUC_pfm\"+SEP+\"metric\"+SEP+\"prec\"+SEP+\"recall\";\r\n\t\t\twriter.write(out);\r\n\t\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\t\t// write to file\r\n\t\t\twriter.flush();\r\n\t\t}\r\n\t\tdouble xBefore = 0;\r\n\t\t\r\n\t\tdouble aucFull = 0; double yFullBefore = 0;\r\n\t\t\r\n\t\tdouble auc1to1 = 0; double y1to1Before = 0;\r\n\t\t\r\n\t\tdouble aucpfm = 0; double ypfmBefore = 0;\r\n\t\t\r\n\t\tMapping reference = data.getReferenceMapping();\r\n\t\tfor(int i = 0; i<perRunAndDataSet.size(); i++) {\r\n\t\t\tEvaluationPseudoMemory mem = perRunAndDataSet.get(i);\r\n\t\t\tMapping map = fitness.getMapping(mem.metric.getExpression(), mem.metric.getThreshold(), true);\r\n\t\t\t// For real F-measures use best 1-to-1 mapping\r\n\t\t\tMapping map_1to1 = Mapping.getBestOneToOneMappings(map);\r\n\t\t\tdouble prec, recall, fMeasure, prec_1to1, recall_1to1, fMeasure_1to1;\r\n\t\t\tPRFCalculator prf = new PRFCalculator();\r\n\t\t\tprec = prf.precision(map, reference);\r\n\t\t\trecall = prf.recall(map, reference);\r\n\t\t\tfMeasure = prf.fScore(map, reference);\r\n\t\t\t\r\n\t\t\tif(Double.isNaN(fMeasure) || Double.isInfinite(fMeasure)) {\r\n\t\t\t\tSystem.err.println(\"NaN computation on Fmeasure, setting it to 0\");\r\n\t\t\t\tfMeasure = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmem.precision=prec;\r\n\t\t\tmem.recall=recall;\r\n\t\t\tmem.fmeasue=fMeasure;\r\n\t\t\t\r\n\t\t\tprec_1to1 = prf.precision(map_1to1, reference);\r\n\t\t\trecall_1to1 = prf.recall(map_1to1, reference);\r\n\t\t\tfMeasure_1to1 = prf.fScore(map_1to1, reference);\r\n\t\t\t\r\n\t\t\tif(Double.isNaN(fMeasure_1to1) || Double.isInfinite(fMeasure_1to1)) {\r\n\t\t\t\tSystem.err.println(\"NaN computation on Fmeasure 1-to-1, setting it to 0\");\r\n\t\t\t\tfMeasure_1to1 = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmem.precision_1to1=prec_1to1;\r\n\t\t\tmem.recall_1to1=recall_1to1;\r\n\t\t\tmem.fmeasue_1to1=fMeasure_1to1;\r\n\t\t\t// compute auc values\r\n\t\t\tdouble xNow=mem.generation;\r\n\t\t\taucFull += computeAUCSummand(xBefore, xNow, yFullBefore, fMeasure);\r\n\t\t\tauc1to1 += computeAUCSummand(xBefore, xNow, y1to1Before, fMeasure_1to1);\r\n\t\t\taucpfm += computeAUCSummand(xBefore, xNow, ypfmBefore, mem.pseudoFMeasure);\r\n\t\t\t//log\r\n\t\t\tif(logAtomics) {\r\n\t\t\t\tlogAtomic(mem, aucFull, auc1to1, aucpfm);\r\n\t\t\t}\r\n\t\t\txBefore = xNow;\r\n\t\t\tyFullBefore = fMeasure;\r\n\t\t\ty1to1Before = fMeasure_1to1;\t\r\n\t\t\typfmBefore = mem.pseudoFMeasure;\r\n\t\t}\r\n\t\t// log to statistics final fs,auc\r\n\t\tF_full.add(yFullBefore);\r\n\t\tF_1to1.add(y1to1Before);\r\n\t\tPFM.add(ypfmBefore);\r\n\t\tAUC_full.add(aucFull);\r\n\t\tAUC_1to1.add(auc1to1);\r\n\t\tAUC_pfm.add(aucpfm);\r\n\t\t\r\n\t\tout = data.getName()+\" run:\"+nr+\"\\n\"+\"gens\"+SEP+\"fit\"+SEP+\"pfm\"+SEP+\"f\"+SEP+\"f_1to1\"+SEP+\"dur\"+SEP+\"AUC\"+SEP+\"AUC_1to1\"+SEP+\"AUC_pfm\";\r\n\t\twriter.write(out);\r\n\t\twriter.write(System.getProperty(\"line.separator\"));\r\n\t\tlogAtomic(perRunAndDataSet.getLast(),aucFull,auc1to1,aucpfm);\r\n\t}", "protected abstract Object doCalculations();", "MeterProvider create();", "public MetricMeasurement measureTarget(IMeasurableNode target) {\n \t\tif (testAppliesTo(target.getModelTypeName()))\r\n \t\t\treturn target.accept( this, \r\n \t\t\t\t\tMeasurableVisitorPool.getInstance().getPooledVisitor(visitor) );\r\n \t\treturn null;\r\n \t}", "@Override\n public double getMeasure() {\n return getFuelEffieciency();\n }", "public MeasureData(Tuple tuple) {\n mtype = tuple.getStringByField(StormUtils.STORM.FIELDS.MEASURE_TYPE);\n caseid = tuple.getStringByField(StormUtils.STORM.FIELDS.CASE_ID);\n mid = tuple.getIntegerByField(StormUtils.STORM.FIELDS.MEASURE_ID);\n mvalue = tuple.getDoubleByField(StormUtils.STORM.FIELDS.MEASURE_VALUE);\n }", "public ParticleMeasure(ProgressHandle progh, EvChannel chValue, EvChannel chMask, List<String> use)\n\t\t{\n\t\tprepareEvaluate(progh, chValue, chMask, use);\n\t\t}", "public static void main(String[] args) {\n Measurable myShape; // define data type of Measureable and variable name myShape\n\n myShape = new Square(5);\n\n// System.out.println(box1.getPerimeter()); // 18\n// System.out.println(box1.getArea()); // 20\n// System.out.println(\"\");\n// System.out.println(box2.getPerimeter()); // 20\n// System.out.println(box2.getArea()); // 25\n\n System.out.println(myShape.getArea());\n System.out.println(myShape.getPerimeter());\n\n myShape = new Rectangle(5,4);\n\n System.out.println(myShape.getPerimeter());\n System.out.println(myShape.getArea());\n\n\n }", "@Override\r\n public void calculate() {\r\n // do the calculations\r\n this.categories = new String[]{\"one\", \"two\"};\r\n this.data = new double[]{75, 50};\r\n }", "void measure(TextInfo info, float x, float y) {\n\n if (info instanceof MultiTextInfo) {\n RectF rect = _host.getCurrentViewRect();\n if(rect != null) {\n info.setRange(rect.left, rect.right, rect.top, rect.bottom);\n info.measure(x, y);\n int wd = info.getWidth();\n int ht = info.getHeight();\n if (wd > rect.width() || ht > rect.height()) {\n info.setRange(0, _swd, 0, _sht);\n info.measure(x, y);\n }\n }\n } else {\n info.measure(x, y);\n }\n\n reArrange(info);\n list.add(info);\n }", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public static Cons computeMeasuresForPrimeId(Ratio pid, Object [] MV_returnarray) {\n { Cons _return_temp = Utilities.computeMeasuresForInteger(pid.numerator);\n\n MV_returnarray[0] = Utilities.computeMeasuresForInteger(pid.denominator);\n return (_return_temp);\n }\n }", "private void readMeasurementData() {\n if (choice == 1){\n readImperialData();\n } \n if (choice == 2){\n readMetricData();\n }\n }", "public boolean testCase5()\n {\n String flavor = null;\n final String DESC = \"Simple performance measurement \";\n reporter.testCaseInit(DESC);\n // Reset the counting for outputNames for this testcase\n outNames = new OutputNameManager(baseOutName + \"Perf\", \".out\");\n try\n {\n long[] times = null;\n Vector streamTimes = new Vector();\n Vector domTimes = new Vector();\n TransformWrapper transformWrapper = null;\n\n flavor = \"trax.stream\";\n transformWrapper = TransformWrapperFactory.newWrapper(flavor);\n transformWrapper.newProcessor(testProps);\n reporter.logHashtable(Logger.TRACEMSG, transformWrapper.getProcessorInfo(), \"wrapper.getProcessorInfo() for next transforms\");\n\n // Repeat a few times with streams\n for (int i = 1; i <= 5; i++)\n {\n perfFileInfo.outputName = outNames.nextName();\n reporter.logInfoMsg(\"perf-stream transform into \" + perfFileInfo.outputName);\n times = transformWrapper.transform(perfFileInfo.xmlName, perfFileInfo.inputName, perfFileInfo.outputName);\n logPerfElem(times, perfFileInfo, flavor);\n streamTimes.addElement(new Long(times[TransformWrapper.IDX_OVERALL]));\n }\n // Only bother checking the *last* iteration of perfs\n fileChecker.check(reporter, \n new File(perfFileInfo.outputName), \n new File(perfFileInfo.goldName), \n DESC + flavor + \" into: \" + perfFileInfo.outputName);\n \n flavor = \"trax.dom\";\n transformWrapper = TransformWrapperFactory.newWrapper(flavor);\n transformWrapper.newProcessor(testProps);\n reporter.logHashtable(Logger.TRACEMSG, transformWrapper.getProcessorInfo(), \"wrapper.getProcessorInfo() for next transforms\");\n\n // Repeat a few times with DOMs\n for (int i = 1; i <= 5; i++)\n {\n perfFileInfo.outputName = outNames.nextName();\n reporter.logInfoMsg(\"perf-dom transform into \" + perfFileInfo.outputName);\n times = transformWrapper.transform(perfFileInfo.xmlName, perfFileInfo.inputName, perfFileInfo.outputName);\n logPerfElem(times, perfFileInfo, flavor);\n domTimes.addElement(new Long(times[TransformWrapper.IDX_OVERALL]));\n }\n // Only bother checking the *last* iteration of perfs\n fileChecker.check(reporter, \n new File(perfFileInfo.outputName), \n new File(perfFileInfo.goldName), \n DESC + flavor + \" into: \" + perfFileInfo.outputName);\n\n // Log a big message at the very end to make it easier to see\n StringBuffer buf = new StringBuffer(\"Minitest.testCase5 PERFORMANCE NUMBERS\\n\");\n buf.append(\" STREAM OVERALL TIMES: \");\n for (Enumeration elements = streamTimes.elements();\n elements.hasMoreElements(); /* no increment portion */ )\n {\n buf.append(elements.nextElement());\n buf.append(\", \");\n }\n buf.append(\"\\n\");\n buf.append(\" DOM OVERALL TIMES: \");\n for (Enumeration elements = domTimes.elements();\n elements.hasMoreElements(); /* no increment portion */ )\n {\n buf.append(elements.nextElement());\n buf.append(\", \");\n }\n buf.append(\"\\n\");\n reporter.logArbitrary(Logger.CRITICALMSG, buf.toString());\n } \n catch (Throwable t)\n {\n reporter.logThrowable(reporter.ERRORMSG, t, DESC + flavor + \" threw: \");\n reporter.checkErr(DESC + flavor + \" threw: \" + t.toString());\n }\n reporter.testCaseClose();\n return true;\n }", "double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}", "MetricModel createMetricModel();", "private static void exportMeasurements(Properties props, int opcount, long runtime) throws IOException {\n MeasurementsExporter exporter = null;\n try {\n // if no destination file is provided the results will be written to stdout\n OutputStream out;\n String exportFile = props.getProperty(EXPORT_FILE_PROPERTY);\n if (exportFile == null) {\n out = System.out;\n } else {\n out = new FileOutputStream(exportFile);\n }\n\n // if no exporter is provided the default text one will be used\n String exporterStr = props.getProperty(EXPORTER_PROPERTY, \"com.yahoo.ycsb.measurements.exporter.TextMeasurementsExporter\");\n try {\n exporter = (MeasurementsExporter) Class.forName(exporterStr).getConstructor(OutputStream.class).newInstance(out);\n } catch (Exception e) {\n System.err.println(\"Could not find exporter \" + exporterStr + \", will use default text reporter.\");\n e.printStackTrace();\n exporter = new TextMeasurementsExporter(out);\n }\n\n exporter.write(\"OVERALL\", \"RunTime(ms)\", runtime);\n double throughput = 1000.0 * (opcount) / (runtime);\n exporter.write(\"OVERALL\", \"Throughput(ops/sec)\", throughput);\n\n Measurements.getMeasurements().exportMeasurements(exporter);\n } finally {\n if (exporter != null) {\n exporter.close();\n }\n }\n }", "public final void evaluate() throws IOException {\n final ParserEvaluator evaluator = new ParserEvaluator(this.parser);\n evaluator.evaluate(this.testSamples);\n System.out.println(evaluator.getFMeasure());\n }", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "public void setMeasureId(String measureId) {\r\n\t\tthis.measureId = measureId;\r\n\t}", "@Override\n public double getMeasure(String additionalMeasureName) {\n\n if (additionalMeasureName.equalsIgnoreCase(\"measureNumRules\")) {\n return tree.getNumLeaves();\n }\n if (additionalMeasureName.equalsIgnoreCase(\"measureNumPositiveRules\")) {\n return tree.numPosRulesAndNumPosConditions()[0];\n }\n if (additionalMeasureName\n .equalsIgnoreCase(\"measureNumConditionsInPositiveRules\")) {\n return tree.numPosRulesAndNumPosConditions()[1];\n } else {\n throw new IllegalArgumentException(additionalMeasureName\n + \" not supported (MultiInstanceRuleLearner)\");\n }\n }", "private AggResult parse(MeasuredData measuredData, AggResult dest) {\n measuredData.data.computeIfPresent(MetricNames.SEND_QUEUE, (comp, data) -> {\n parseQueueResult((Map<String, Number>) data, dest.getSendQueueResult());\n return data;\n });\n measuredData.data.computeIfPresent(MetricNames.RECV_QUEUE, (comp, data) -> {\n parseQueueResult((Map<String, Number>) data, dest.getRecvQueueResult());\n return data;\n });\n if (firstTasks.contains(measuredData.task)) {\n measuredData.data.computeIfPresent(MetricNames.DURATION, (comp, data) -> {\n dest.addDuration(((Number) data).longValue());\n return data;\n });\n }\n if (rawTopo.get_spouts().containsKey(measuredData.component)) {\n Map<String, Object> data = (Map<String, Object>) measuredData.data.get(MetricNames.COMPLETE_LATENCY);\n if (data != null) {\n data.forEach((stream, elementStr) -> {\n String[] elements = ((String) elementStr).split(\",\");\n int cnt = Integer.valueOf(elements[0]);\n if (cnt > 0) {\n double val = Double.valueOf(elements[1]);\n double val_2 = Double.valueOf(elements[2]);\n ((SpoutAggResult) dest).getCompletedLatency().computeIfAbsent(stream, (k) -> new CntMeanVar())\n .addAggWin(cnt, val, val_2);\n }\n });\n }\n } else {\n Map<String, Object> data = (Map<String, Object>) measuredData.data.get(MetricNames.TASK_EXECUTE);\n if (data != null) {\n data.forEach((stream, elementStr) -> {\n String[] elements = ((String) elementStr).split(\",\");\n int cnt = Integer.valueOf(elements[0]);\n if (cnt > 0) {\n double val = Double.valueOf(elements[1]);\n double val_2 = Double.valueOf(elements[2]);\n ((BoltAggResult) dest).getTupleProcess().computeIfAbsent(stream, (k) -> new CntMeanVar())\n .addAggWin(cnt, val, val_2);\n }\n });\n }\n }\n return dest;\n }", "public Measure getMeasureId() {\r\n\t\treturn measureId;\r\n\t}", "public T subtract(T measure);", "@Override\r\n\t\tpublic void parseAttribute(Attributes atr,Measurement m) {\n\t\t}", "public static void registerMeasure(String name, ParticleMeasure.MeasurePropertyType t)\n\t\t{\n\t\tsynchronized (measures)\n\t\t\t{\n\t\t\tmeasures.put(name, t);\n\t\t\t}\n\t\t}", "private Object writeReplace() throws ObjectStreamException {\n return new MeasureUnitProxy(type, subType);\n }", "@Test\n public void testMemoryMetric() {\n MetricValue mv = new MetricValue.Builder().load(40).add();\n\n MEMORY_METRICS.forEach(cmt -> testUpdateMetricWithoutId(cmt, mv));\n MEMORY_METRICS.forEach(cmt -> testLoadMetric(nodeId, cmt, mv));\n }", "public void onMeasure(int i, int i2) {\n int i3;\n int i4;\n int max;\n int combineMeasuredStates;\n int i5;\n Object obj;\n int[] iArr = this.auf;\n if (bk.bW(this)) {\n i3 = 0;\n i4 = 1;\n } else {\n i3 = 1;\n i4 = 0;\n }\n int i6 = 0;\n if (bQ(this.atJ)) {\n l(this.atJ, i, 0, i2, this.atS);\n i6 = this.atJ.getMeasuredWidth() + bR(this.atJ);\n max = Math.max(0, this.atJ.getMeasuredHeight() + bS(this.atJ));\n combineMeasuredStates = View.combineMeasuredStates(0, this.atJ.getMeasuredState());\n i5 = max;\n } else {\n combineMeasuredStates = 0;\n i5 = 0;\n }\n if (bQ(this.atN)) {\n l(this.atN, i, 0, i2, this.atS);\n i6 = this.atN.getMeasuredWidth() + bR(this.atN);\n i5 = Math.max(i5, this.atN.getMeasuredHeight() + bS(this.atN));\n combineMeasuredStates = View.combineMeasuredStates(combineMeasuredStates, this.atN.getMeasuredState());\n }\n int currentContentInsetStart = getCurrentContentInsetStart();\n int max2 = Math.max(currentContentInsetStart, i6) + 0;\n iArr[i4] = Math.max(0, currentContentInsetStart - i6);\n i6 = 0;\n if (bQ(this.acw)) {\n l(this.acw, i, max2, i2, this.atS);\n i6 = this.acw.getMeasuredWidth() + bR(this.acw);\n i5 = Math.max(i5, this.acw.getMeasuredHeight() + bS(this.acw));\n combineMeasuredStates = View.combineMeasuredStates(combineMeasuredStates, this.acw.getMeasuredState());\n }\n currentContentInsetStart = getCurrentContentInsetEnd();\n max2 += Math.max(currentContentInsetStart, i6);\n iArr[i3] = Math.max(0, currentContentInsetStart - i6);\n if (bQ(this.atO)) {\n max2 += a(this.atO, i, max2, i2, 0, iArr);\n i5 = Math.max(i5, this.atO.getMeasuredHeight() + bS(this.atO));\n combineMeasuredStates = View.combineMeasuredStates(combineMeasuredStates, this.atO.getMeasuredState());\n }\n if (bQ(this.atK)) {\n max2 += a(this.atK, i, max2, i2, 0, iArr);\n i5 = Math.max(i5, this.atK.getMeasuredHeight() + bS(this.atK));\n combineMeasuredStates = View.combineMeasuredStates(combineMeasuredStates, this.atK.getMeasuredState());\n }\n i4 = getChildCount();\n i3 = 0;\n int i7 = combineMeasuredStates;\n int i8 = i5;\n while (i3 < i4) {\n View childAt = getChildAt(i3);\n if (((LayoutParams) childAt.getLayoutParams()).auo == 0 && bQ(childAt)) {\n max2 += a(childAt, i, max2, i2, 0, iArr);\n max = Math.max(i8, childAt.getMeasuredHeight() + bS(childAt));\n i6 = View.combineMeasuredStates(i7, childAt.getMeasuredState());\n currentContentInsetStart = max;\n } else {\n i6 = i7;\n currentContentInsetStart = i8;\n }\n i3++;\n i7 = i6;\n i8 = currentContentInsetStart;\n }\n currentContentInsetStart = 0;\n i6 = 0;\n int i9 = this.atV + this.atW;\n max = this.atT + this.atU;\n if (bQ(this.atH)) {\n a(this.atH, i, max2 + max, i2, i9, iArr);\n currentContentInsetStart = bR(this.atH) + this.atH.getMeasuredWidth();\n i6 = this.atH.getMeasuredHeight() + bS(this.atH);\n i7 = View.combineMeasuredStates(i7, this.atH.getMeasuredState());\n }\n if (bQ(this.atI)) {\n currentContentInsetStart = Math.max(currentContentInsetStart, a(this.atI, i, max2 + max, i2, i9 + i6, iArr));\n i6 += this.atI.getMeasuredHeight() + bS(this.atI);\n i7 = View.combineMeasuredStates(i7, this.atI.getMeasuredState());\n }\n currentContentInsetStart += max2;\n i6 = Math.max(i8, i6) + (getPaddingTop() + getPaddingBottom());\n int i10 = i;\n max = View.resolveSizeAndState(Math.max(currentContentInsetStart + (getPaddingLeft() + getPaddingRight()), getSuggestedMinimumWidth()), i10, WebView.NIGHT_MODE_COLOR & i7);\n i6 = View.resolveSizeAndState(Math.max(i6, getSuggestedMinimumHeight()), i2, i7 << 16);\n if (this.mr) {\n max2 = getChildCount();\n for (currentContentInsetStart = 0; currentContentInsetStart < max2; currentContentInsetStart++) {\n View childAt2 = getChildAt(currentContentInsetStart);\n if (bQ(childAt2) && childAt2.getMeasuredWidth() > 0 && childAt2.getMeasuredHeight() > 0) {\n obj = null;\n break;\n }\n }\n obj = 1;\n } else {\n obj = null;\n }\n if (obj != null) {\n i6 = 0;\n }\n setMeasuredDimension(max, i6);\n }", "private void start(){\n\t\tMetricData metric = new MetricData();\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\tmetric.setValue(2);\n\t}", "protected void postRun() {\r\n\t\tthis.calculateFlowBandwidthHops();\r\n\t\tdouble abt = this.ABT();\r\n\t\tdouble agt = this.AGT();\r\n\t\tthis.metrics.add(new ResultMetric(\"ABT\", abt));\r\n\t\tthis.metrics.add(new ResultMetric(\"AGT\", agt));\r\n\t\tthis.metrics.add(new ResultMetric(\"Hops\", this.Hops()));\r\n\t\tthis.metrics.add(new ResultMetric(\"AveHops\", this.Hops()\r\n\t\t\t\t/ this.flows.size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"SuccCount\", this.successfulCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"FailCount\", this.failedCount));\r\n\t\tthis.metrics.add(new ResultMetric(\"ServerNum\", this.dcn\r\n\t\t\t\t.getServerUUIDs().size()));\r\n\t\tthis.metrics.add(new ResultMetric(\"ThroughputPerLink\", abt\r\n\t\t\t\t/ this.dcn.linkCount()));\r\n\t}", "public void setMeasureId(Measure measureId) {\r\n\t\tthis.measureId = measureId;\r\n\t}", "private void processCalculation(String line) {\n\t\t//TODO: fill\n\t}", "void addStatisticsCalculation(ProcessingUnitStatisticsId statisticsId);", "MetricOuterClass.Metric getMetricTreatment();", "public void setMeasureStart(Location measureStart) {\n this.measureStart = measureStart;\n }", "public void editMeasures() {\r\n \t\tdialogFactory.getDialog(new MeasurePanel(model, model, model), \"Define performance indices\");\r\n \t}", "public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/recall.size();\n System.out.print(\"Recall: \");\n System.out.println(recallFinal);\n //fMeasures\n fMeausureFinal = fMeasures.stream().mapToDouble(f -> f).sum()/fMeasures.size();\n System.out.print(\"Fmeasure: \");\n System.out.println(fMeausureFinal);\n\n //MAP\n mapFinal = apRes.stream().mapToDouble(d->d).sum()/apRes.size();\n System.out.print(\"Mean Avarage Precision: \");\n System.out.println(mapFinal);\n \n mapLimitedFinal = apResRankedTopLimited.stream().mapToDouble(d->d).sum()/apResRankedTopLimited.size();\n System.out.print(\"Mean Precision at rank 10: \");\n System.out.println(mapLimitedFinal);\n \n //NDCG\n ndcgResultsFinal =0;\n ndcgResults.stream().forEach(l-> {\n //it is always true, only added to ensure that doesnt' break with another examples where some queries doens't have results.\n if(l.size()>0){\n ndcgResultsFinal= l.get(l.size()-1)+ndcgResultsFinal;\n }\n });\n ndcgResultsFinal=ndcgResultsFinal/ndcgResults.size();\n \n System.out.print(\"NDCG: \");\n System.out.println(ndcgResultsFinal);\n }", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "public void calculateMMage() {\n\t\t\n\t}", "void collect(MetricsCollector collector);", "public void create(String context)\n\t{\n\t\treset();\n\t\tif (!context.equals(\"\"))\n\t\t{\n\t\t\tint i = 0;\n\t\t\tScanner scanner = new Scanner(context);\n\t\t\tdouble params[] = new double[4];\n\t\t\tString arrowType = \"\";\n\t\t\tScanner lineScanner = new Scanner(scanner.nextLine());\n\t\t\t\n\t\t\twidth = lineScanner.nextDouble ();\n\t\t\theight = lineScanner.nextDouble ();\n\n\t\t\t// Begin Processing Arrow Data\n\t\t\twhile (scanner.hasNextLine())\n\t\t\t{\n\t\t\t\tlineScanner = new Scanner(scanner.nextLine());\n\t\t\t\tfor (i = 0; i < 4; ++i)\n\t\t\t\t{\n\t\t\t\t\tif (lineScanner.hasNextDouble()) \n\t\t\t\t\t{\n\t\t\t\t\t\tparams[i] = lineScanner.nextDouble();\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lineScanner.hasNext())\n\t\t\t\t{\n\t\t\t\t\tarrowType = lineScanner.next();\n\t\t\t\t\t++i;\n\t\t\t\t\taddArrow(arrowType, params[0], params[1], params[2], params[3]);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Begin Processing UML Data\n\t\t\tif (i == 2)\n\t\t\t{\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tVector<String> linesTop = new Vector<String>();\n\t\t\t\t\tVector<String> linesMid = new Vector<String>();\n\t\t\t\t\tVector<String> linesBtm = new Vector<String>();\n\t\t\t\t\taddUML(params[0], params[1]);\n\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\tif (scanner.hasNextLine() && line.equals(\"[\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\tif (!line.equals(\"]\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlinesTop.add(line);\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\tif (scanner.hasNextLine())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (linesTop.size() > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString content = linesTop.elementAt(0);\n\t\t\t\t\t\t\t\t\tfor (int ind = 1; ind < linesTop.size(); ++ind)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontent += \"\\n\" + linesTop.elementAt(ind);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclasses.topAt(classes.size() - 1).setText(content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (scanner.hasNextLine());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (scanner.hasNextLine() && line.equals(\"[\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\tif (!line.equals(\"]\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlinesMid.add(line);\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\tif (scanner.hasNextLine())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (linesMid.size() > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString content = linesMid.elementAt(0);\n\t\t\t\t\t\t\t\t\tfor (int ind = 1; ind < linesMid.size(); ++ind)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontent += \"\\n\" + linesMid.elementAt(ind);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclasses.midAt(classes.size() - 1).setText(content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (scanner.hasNextLine());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (scanner.hasNextLine() && line.equals(\"[\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tdo\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\tif (!line.equals(\"]\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlinesBtm.add(line);\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\tif (linesBtm.size() > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString content = linesBtm.elementAt(0);\n\t\t\t\t\t\t\t\t\tfor (int ind = 1; ind < linesBtm.size(); ++ind)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcontent += \"\\n\" + linesBtm.elementAt(ind);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclasses.btmAt(classes.size() - 1).setText(content);\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile (scanner.hasNextLine());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get Next Positions\n\t\t\t\t\tif (scanner.hasNextLine())\n\t\t\t\t\t{\n\t\t\t\t\t\tlineScanner = new Scanner(scanner.nextLine());\n\t\t\t\t\t\tif (lineScanner.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (i = 0; i < 2; ++i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparams[i] = lineScanner.nextDouble();\n\t\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{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (i != 2)\n\t\t\t\t\t\t{\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\twhile (scanner.hasNextLine());\n\t\t\t}\n\t\t\tlineScanner.close();\n\t\t\tscanner.close();\n\t\t}\n\t}", "MetricsFactory getMetricsFactory();", "private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal[1]*smac[1]*g[i] + RGBcal[2]*smac[2]*b[i];\n\t\t\tM = RGBcal[0]*mel[0]*r[i] + RGBcal[1]*mel[1]*g[i] + RGBcal[2]*mel[2]*b[i];\n\t\t\tVPR = RGBcal[0]*vp[0]*r[i] + RGBcal[1]*vp[1]*g[i] + RGBcal[2]*vp[2]*b[i];\n\t\t\tVM = RGBcal[0]*vmac[0]*r[i] + RGBcal[1]*vmac[1]*g[i] + RGBcal[2]*vmac[2]*b[i];\n \n\t\t\tif(S > CLAcal[2]*VM) {\n\t\t\t\tCLA[i] = M + CLAcal[0]*(S - CLAcal[2]*VM) - CLAcal[1]*683*(1 - pow((float)2.71, (float)(-VPR/4439.5)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCLA[i] = M;\n\t\t\t}\n\t\t\tCLA[i] = CLA[i]*CLAcal[3];\n\t\t\tif(CLA[i] < 0) {\n\t\t\t\tCLA[i] = 0;\n\t\t\t}\n \n\t\t\t//get CS\n\t\t\tCS[i] = (float) (.7*(1 - (1/(1 + pow((float)(CLA[i]/355.7), (float)1.1026)))));\n \n\t\t\t//get activity\n\t\t\ta[i] = (float) (pow(a[i], (float).5) * .0039 * 4);\n\t\t}\n\t}", "public void run() {\n \n if (Parameter != null && Parameter instanceof ConvertTextUnitsParameter) {\n CastParameter = (ConvertTextUnitsParameter)Parameter;\n }\n else {\n CastParameter = null;\n }\n\n String shortErrorMessage = \"Error: Text Units Cannot be Converted!\";\n this.acceptTask(TaskProgress.INDETERMINATE, \"Initial Preparations\");\n this.validateParameter(Parameter, shortErrorMessage);\n this.openDiasdemCollection(CastParameter.getCollectionFileName());\n this.checkPrerequisitesAndSetDefaultTextUnitsLayer(shortErrorMessage);\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS) {\n RegexPattern = Pattern.compile(CastParameter.getRegularExpression());\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS) {\n // read multi token word: each line contains one multi token word;\n // comment lines start with '#'\n TextFile multiTokenFile = new TextFile(\n new File(CastParameter.getMultiTokenFileName()));\n multiTokenFile.open();\n String line = multiTokenFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n ArrayList list = new ArrayList();\n while (line != null) {\n list.add(line.trim());\n line = multiTokenFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n Collections.sort(list, new SortStringsByDecreasingLength());\n // for (int i = 0; i < list.size(); i++) {\n // System.out.println((String)list.get(i));\n // }\n // System.out.println(list.size());\n String[] multiToken = new String[list.size()];\n for (int i = 0; i < list.size(); i++)\n multiToken[i] = (String)list.get(i);\n multiTokenFile.close();\n MyMultiTokenWordIdentifier = new HeuristicMultiTokenWordIdentifier(\n multiToken);\n }\n else {\n MyMultiTokenWordIdentifier = null;\n }\n \n if (CastParameter.getConversionType() == ConvertTextUnitsParameter\n .FIND_AND_REPLACE_SPECIFIED_TOKENS) {\n // read token replacement file: each line contains the tokens to search \n // for and the replacement tokens separated by a tab stop;\n // comment lines start with '#'\n TextFile tokenReplacementFile = new TextFile(\n new File(CastParameter.getTokenReplacementFileName()));\n tokenReplacementFile.open();\n String line = tokenReplacementFile.getFirstLineButIgnoreCommentsAndEmptyLines();\n HashMap tokensSearchList = new HashMap();\n String[] tokensContents = null;\n while (line != null) {\n tokensContents = line.split(\"\\t\");\n if (tokensContents.length == 2\n && tokensContents[1].trim().length() > 0) {\n try {\n tokensSearchList.put(tokensContents[0].trim(), \n tokensContents[1].trim());\n }\n catch (PatternSyntaxException e) {\n System.out.println(\"[TokenizeTextUnitsTask] Regex syntax error in \"\n + \" file \" + CastParameter.getTokenReplacementFileName() + \": \"\n + \" Line \\\"\" + line + \"\\\"; error message: \" + e.getMessage());\n }\n }\n else {\n System.out.println(\"[TokenizeTextUnitsTask] Error in file \"\n + CastParameter.getTokenReplacementFileName() + \": Line \\\"\"\n + line + \"\\\" does not conform to syntax!\");\n }\n line = tokenReplacementFile.getNextLineButIgnoreCommentsAndEmptyLines();\n }\n // sort multi token terms by decreasing length\n ArrayList list = new ArrayList(tokensSearchList.keySet());\n Collections.sort(list, new SortStringsByDecreasingLength());\n // create arrays for token replacement \n String[] tokensSearch = new String[list.size()];\n String[] tokensReplace = new String[list.size()];\n Iterator iterator = list.iterator();\n int i = 0;\n while (iterator.hasNext()) {\n TmpString = (String)iterator.next();\n tokensSearch[i] = TmpString;\n tokensReplace[i++] = (String)tokensSearchList.get(TmpString);\n }\n tokenReplacementFile.close();\n MyTokenReplacer = new HeuristicTokenReplacer(tokensSearch, tokensReplace);\n }\n else {\n MyTokenReplacer = null;\n }\n \n int counterProgress = 0;\n long maxProgress = DiasdemCollection.getNumberOfDocuments();\n \n DiasdemDocument = DiasdemCollection.getFirstDocument(); \n while (DiasdemDocument != null) {\n \n if (counterProgress == 1 || (counterProgress % 50) == 0) {\n Progress.update( (int)(counterProgress * 100 / maxProgress),\n \"Processing Document \" + counterProgress);\n DiasdemServer.setTaskProgress(Progress, TaskThread);\n }\n\n DiasdemDocument.setActiveTextUnitsLayer(DiasdemProject\n .getActiveTextUnitsLayerIndex());\n DiasdemDocument.backupProcessedTextUnits(DiasdemProject\n .getProcessedTextUnitsRollbackOption());\n \n for (int i = 0; i < DiasdemDocument.getNumberOfProcessedTextUnits(); \n i++) {\n DiasdemTextUnit = DiasdemDocument.getProcessedTextUnit(i);\n switch (CastParameter.getConversionType()) {\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_LOWER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toLowerCase();\n break;\n }\n case ConvertTextUnitsParameter.CONVERT_TEXT_UNITS_TO_UPPER_CASE: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString()\n .toUpperCase();\n break;\n } \n case ConvertTextUnitsParameter.APPLY_REGULAR_EXPRESSION_TO_TEXT_UNITS: {\n RegexMatcher = RegexPattern.matcher(DiasdemTextUnit\n .getContentsAsString());\n TmpStringBuffer = new StringBuffer(DiasdemTextUnit\n .getContentsAsString().length() + 10000);\n while (RegexMatcher.find()) {\n RegexMatcher.appendReplacement(TmpStringBuffer,\n CastParameter.getReplacementString());\n }\n TextUnitContentsAsString = RegexMatcher.appendTail(TmpStringBuffer)\n .toString();\n break;\n }\n case ConvertTextUnitsParameter.IDENTIFY_SPECIFIED_MULTI_TOKEN_TERMS: {\n TextUnitContentsAsString = MyMultiTokenWordIdentifier\n .identifyMultiTokenWords(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.FIND_AND_REPLACE_SPECIFIED_TOKENS: {\n TextUnitContentsAsString = MyTokenReplacer\n .replaceTokens(DiasdemTextUnit.getContentsAsString());\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_PART_OF_SPEECH_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/p:\");\n break;\n } \n case ConvertTextUnitsParameter.REMOVE_WORD_SENSE_TAGS_FROM_TOKENS: {\n TextUnitContentsAsString = this.removeTagsFromTokens(\n DiasdemTextUnit.getContentsAsString(), \"/s:\");\n break;\n } \n default: {\n TextUnitContentsAsString = DiasdemTextUnit.getContentsAsString();\n }\n }\n DiasdemTextUnit.setContentsFromString(TextUnitContentsAsString);\n DiasdemDocument.replaceProcessedTextUnit(i, DiasdemTextUnit);\n }\n\n DiasdemCollection.replaceDocument(DiasdemDocument\n .getDiasdemDocumentID(), DiasdemDocument);\n \n DiasdemDocument = DiasdemCollection.getNextDocument();\n counterProgress++;\n \n } // read all documents\n \n super.closeDiasdemCollection();\n \n CastResult = new ConvertTextUnitsResult(TaskResult.FINAL_RESULT,\n \"All processed text units have been converted in the DIAsDEM document\\n\" +\n \" collection \" +\n Tools.shortenFileName(CastParameter.getCollectionFileName(), 55) + \"!\", \n \"Processed text units have been converted.\");\n this.setTaskResult(100, \"All Documents Processed ...\", CastResult,\n TaskResult.FINAL_RESULT, Task.TASK_FINISHED);\n \n }", "protected abstract void _analyze(Object input, Consumer<Analysis> collector);", "public static String getPluralMeasure (String measure, double quantity, Context context){\n @PluralsRes int resourceId = R.plurals.measure_empty;\n\n if (!measure.isEmpty()){\n switch (measure) {\n case \"CUP\": // ----------------------------------------------------------------- cup\n resourceId = R.plurals.measure_cup;\n break;\n case \"TBLSP\": // -------------------------------------------------------- tablespoon\n resourceId = R.plurals.measure_tablespoon;\n break;\n case \"TSP\": // ------------------------------------------------------------ teaspoon\n resourceId = R.plurals.measure_teaspoon;\n break;\n case \"K\": //--------------------------------------------------------------------- Kg\n resourceId = R.plurals.measure_kilogram;\n break;\n case \"G\": //------------------------------------------------------------------- gram\n resourceId = R.plurals.measure_gram;\n break;\n case \"OZ\": //-------------------------------------------------------------------- oz\n resourceId = R.plurals.measure_oz;\n break;\n case \"UNIT\": //---------------------------------------------------------------- unit\n resourceId = R.plurals.measure_unit;\n break;\n case \"SERW\": //---------------------------------------------------------------- unit\n resourceId = R.plurals.servings;\n }\n }\n return context.getResources().getQuantityString(resourceId, (round(quantity)));\n }", "public void update() { \r\n // create container\r\n Element container = createContainer(root.actual(), name, \r\n wiz.getTotalWidth(), wiz.getTotalHeight());\r\n \r\n if (root.isType(OBJECTS)) {\r\n setAttributeIfMissing(container, POS_X, \"0\");\r\n setAttributeIfMissing(container, POS_Y, \"0\"); \r\n }\r\n \r\n // create background circle\r\n int startAng = wiz.getStartAngle();\r\n int endAng = wiz.getEndAngle();\r\n Element ellipse; \r\n ellipse = createEllipse(container, \"background\", wiz.getBackgroundWidth(), wiz.getBackgroundWidth(),\r\n startAng, endAng,\r\n wiz.getFillAttribute(), wiz.getLineAttribute(), !wiz.isCuttedCircle()); \r\n setIncludeAttributes(ellipse, (wiz.getTotalWidth() - wiz.getBackgroundWidth()) / 2, \r\n (wiz.getTotalHeight() - wiz.getBackgroundWidth()) / 2);\r\n \r\n //create meter \r\n int minVal = (int) (wiz.getMinValue() / wiz.getScale()) - wiz.getOffset();\r\n int maxVal = (int) (wiz.getMaxValue() / wiz.getScale()) - wiz.getOffset();\r\n Element meter = createMeter(container, \"metercomp\", wiz.getMeterWidth(), \r\n startAng, endAng, minVal, maxVal,\r\n wiz.getValue(), wiz.getTicks(), wiz.isClockwise(),\r\n wiz.getNeedleColor(), wiz.getArcAndTickColor(), wiz.getNumberReference());\r\n setIncludeAttributes(meter, (wiz.getTotalWidth() - wiz.getMeterWidth()) / 2,\r\n (wiz.getTotalHeight() - wiz.getMeterWidth()) / 2);\r\n \r\n // create numbers\r\n if (startAng > endAng) startAng -= 360;\r\n if (wiz.isClockwise()) {\r\n int temp = startAng;\r\n startAng = endAng;\r\n endAng = temp;\r\n }\r\n Element fontElement = root.getModel().getElementByName(wiz.getFontAttribute());\r\n int fontWidth = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getWidth();\r\n int fontHeight = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getHeight();\r\n int i;\r\n for (i = 0; i < wiz.getNumbers() && wiz.getNumbers() > 1; i++) {\r\n int value = wiz.getMinValue() + i*(wiz.getMaxValue()-wiz.getMinValue()) / (wiz.getNumbers()-1); \r\n String valueString = Integer.toString(value);\r\n int stringWidth = (fontWidth * valueString.length());\r\n \r\n Element number = createString(container, \"label\" + i, fontWidth * valueString.length(), \r\n fontHeight, valueString, wiz.getFontAttribute());\r\n \r\n double ang = Math.toRadians(startAng + i * (endAng - startAng) / (wiz.getNumbers() - 1));\r\n double rad = wiz.getMeterWidth() / 2 + wiz.getNumberDistance();\r\n int x = wiz.getTotalWidth() / 2 + (int) (Math.cos(-ang) * rad) - stringWidth / 2;\r\n int y = wiz.getTotalHeight() / 2 + (int) (Math.sin(-ang) * rad) - fontHeight / 2;\r\n setIncludeAttributes(number, x, y);\r\n }\r\n \r\n // labelX, X >= i -> poistetaan\r\n removeExtraElements(container, \"label\", i);\r\n \r\n // create a numberfield\r\n int extraSpace = wiz.getOffset() < 0 ? 1 : 0;\r\n int nroWidth = fontWidth * (Integer.toString(wiz.getMaxValue()).length() + extraSpace);\r\n Element numberfield = createNumber(container, \"number\", nroWidth, fontHeight, wiz.getValue(), \r\n wiz.getNumberReference(), wiz.getFontAttribute(), wiz.getOffset(), wiz.getScale());\r\n setIncludeAttributes(numberfield, (wiz.getTotalWidth() - nroWidth/*meterWizard.getMeterWidth()*/) / 2, \r\n wiz.getTotalHeight() / 2 + wiz.getMeterWidth() / 4);\r\n \r\n // create heading\r\n String text = wiz.getHeading();\r\n Element heading = createString(container, \"title\", fontWidth*text.length(), fontHeight, text, wiz.getFontAttribute());\r\n setIncludeAttributes(heading, (wiz.getTotalWidth() - fontWidth * text.length()) / 2, \r\n wiz.getTotalHeight() / 2 - wiz.getMeterWidth() / 4);\r\n \r\n // moves the attribute-objects to include objects with roles\r\n // System.out.println(\"finalizing...\");\r\n // Tools.createRoles(container);\r\n }", "@Test\n\tpublic void testMakeMeterSectionTimes() {\n\t\tScorePiece sp = new ScorePiece(MIDIImport.importMidiFile(midiTestGetMeterKeyInfo));\n\t\tScoreMetricalTimeLine smtl = new ScoreMetricalTimeLine(sp.getMetricalTimeLine());\n\n\t\tList<Long> expected = Arrays.asList(new Long[]{\n\t\t\t(long) 0, \n\t\t\t(long) 1800000, \n\t\t\t(long) 11400000, \n\t\t\t(long) 25800000, \n\t\t\t(long) 30600000, \n\t\t\t(long) 31350000\n\t\t});\n\n\t\tList<Long> actual = smtl.makeMeterSectionTimes();\n\n\t\tassertEquals(expected.size(), actual.size());\n\t\tfor (int i = 0; i < expected.size(); i++) {\n\t\t\tassertEquals(expected.get(i), actual.get(i));\t\t\n\t\t}\n\t\tassertEquals(expected, actual);\n\t}", "@Override\r\n protected void calculateValues(DataContext ctx)\r\n {\r\n\t//Common MTF Inputs\r\n\tint mtfPeriod = getSettings().getInteger(MTF_MULTIPLIER);\r\n Object mtfInput = getSettings().getInput(SMI_INPUT, Enums.BarInput.CLOSE);\r\n \r\n int mtfSmooth = getSettings().getInteger(SMI_SMOOTH);\r\n int mtfSignal = getSettings().getInteger(SMI_SIGNAL);\r\n int mtfHLinc = getSettings().getInteger(SMI_HL_MTF_INC);\r\n int mtfMAinc = getSettings().getInteger(SMI_MA_MTF_INC);\r\n \r\n\tint mtfHL = getSettings().getInteger(SMI_HL1_MTF);\r\n\tint mtfMA = getSettings().getInteger(SMI_MA1_MTF);\r\n \r\n /* MTF Bar sizing */\r\n BarSize barSize = ctx.getChartBarSize(); //Gets the barsize off the chart\r\n int mtfbarint = barSize.getInterval(); //Gets the interval of the chart\r\n int barSizeint = mtfbarint * mtfPeriod; //Multiply the interval by the mtf multiplier\r\n \r\n //Calculates a longer period interval based upon the mtfPeriod\r\n BarSize barSizeNew = barSize.getBarSize(barSize.getType(), barSizeint); \r\n //Assembes the longer period timeframe series\r\n DataSeries series2 = ctx.getDataSeries(barSizeNew);\r\n\r\n String valStringOut; //variables for the return results\r\n String valStringD;\r\n String valStringHL;\r\n String valStringD_MA;\r\n String valStringHL_MA;\r\n int hlPeriodmtf;\r\n int maPeriodmtf;\r\n \r\n StudyHeader header = getHeader();\r\n boolean updates = getSettings().isBarUpdates() || (header != null && header.requiresBarUpdates());\r\n\r\n // Calculates Moving Average for the Secondary Data Series\r\n for(int i = 1; i < series2.size(); i++) {\r\n if (series2.isComplete(i)) continue;\r\n if (!updates && !series2.isBarComplete(i)) continue;\r\n //Double sma = series2.ma(MAMethod.SMA, i, mtfPeriod, mtfInput);\r\n \r\n //insert smi logic\r\n for(int j = 1; j <= 4; j++) {\r\n \t \r\n switch (j) {\r\n case 1:\r\n \t valStringOut \t = \"Values.MTF1\"; //D1, HL1, D_MA1, HL_MA1 mtfHLinc\r\n \t valStringD \t = \"Values.D1\";\r\n \t valStringHL \t = \"Values.HL1\";\r\n \t valStringD_MA\t = \"Values.D_MA1\";\r\n \t valStringHL_MA = \"Values.HL_MA1\";\r\n \t hlPeriodmtf = mtfHL; //Base HL\r\n \t maPeriodMA = mtfMA; //Base MA\r\n \t break;\r\n case 2:\r\n \t valStringOut = \"Values.MTF2\";\r\n \t valStringD \t = \"Values.D2\";\r\n \t valStringHL \t = \"Values.HL2\";\r\n \t valStringD_MA\t = \"Values.D_MA2\";\r\n \t valStringHL_MA = \"Values.HL_MA2\";\r\n \t hlPeriodmtf = mtfHL + mtfHLinc; //Base HL + Increment\r\n \t maPeriodMA = mtfMA + mtfMAinc; //Base MA + Increment \t \r\n \t break;\r\n case 3:\r\n \t valStringOut = \"Values.MTF3\";\r\n \t valStringD \t = \"Values.D3\";\r\n \t valStringHL \t = \"Values.HL3\";\r\n \t valStringD_MA\t = \"Values.D_MA3\";\r\n \t valStringHL_MA = \"Values.HL_MA3\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*2); //Base HL + Increment*2\r\n \t maPeriodMA = mtfMA + (mtfMAinc*2); //Base MA + Increment*2 \t \r\n \t break;\r\n case 4:\r\n \t valStringOut = \"Values.MTF4\";\r\n \t valStringD \t = \"Values.D4\";\r\n \t valStringHL \t = \"Values.HL4\";\r\n \t valStringD_MA\t = \"Values.D_MA4\";\r\n \t valStringHL_MA = \"Values.HL_MA4\";\r\n \t hlPeriodmtf = mtfHL + (mtfHLinc*3); //Base HL + Increment\r\n \t maPeriodMA = mtfMA + (mtfMAinc*3); //Base MA + Increment\r\n \t break;\r\n default:\r\n \t break;\t \r\n } //end switch\r\n \r\n //base HL period is mtfHL\r\n if (i < mtfHL) return;\r\n\r\n double HH = series2.highest(i, hlPeriodmtf, Enums.BarInput.HIGH);\r\n double LL = series2.lowest(i, hlPeriodmtf, Enums.BarInput.LOW);\r\n double M = (HH + LL)/2.0;\r\n double D = series2.getClose(i) - M;\r\n \r\n series.setDouble(i, valStringD, D);\r\n series.setDouble(i, valStringHL, HH - LL);\r\n \r\n int maPeriod = getSettings().getInteger(MA_PERIOD);\r\n if (index < hlPeriod + maPeriod) return;\r\n \r\n Enums.MAMethod method = getSettings().getMAMethod(Inputs.METHOD);\r\n series.setDouble(index, Values.D_MA, series.ma(method, index, maPeriod, Values.D));\r\n series.setDouble(index, Values.HL_MA, series.ma(method, index, maPeriod, Values.HL));\r\n \r\n int smoothPeriod= getSettings().getInteger(SMOOTH_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod) return;\r\n \r\n Double D_SMOOTH = series.ma(method, index, smoothPeriod, Values.D_MA);\r\n Double HL_SMOOTH = series.ma(method, index, smoothPeriod, Values.HL_MA);\r\n \r\n if (D_SMOOTH == null || HL_SMOOTH == null) return;\r\n double HL2 = HL_SMOOTH/2;\r\n double SMI = 0;\r\n if (HL2 != 0) SMI = 100 * (D_SMOOTH/HL2);\r\n\r\n series.setDouble(index, Values.SMI, SMI);\r\n\r\n int signalPeriod= getSettings().getInteger(Inputs.SIGNAL_PERIOD);\r\n if (index < hlPeriod + maPeriod + smoothPeriod + signalPeriod) return;\r\n\r\n Double signal = series.ma(method, index, signalPeriod, Values.SMI);\r\n if (signal == null) return;\r\n series.setDouble(index, Values.SMI_SIGNAL, signal);\r\n\r\n \r\n \r\n } //end j bracket\r\n \r\n \r\n \r\n \r\n \r\n series2.setDouble(i, Values.MTF, sma);\r\n }\r\n\r\n // Invoke the parent method to run the \"calculate\" method below for the primary (chart) data series\r\n super.calculateValues(ctx);\r\n }", "public void setMeasurementArray(){\n\t\tnResults = rt.size();\n\t\tData = new double[4][nResults];\n\t\tfor(int i =1; i<nResults; i++) {\n\t\t\tData[0][i]=i;\n\t\t\tData[1][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Mean\"),i); \n\t\t\tData[2][i]=rt.getValueAsDouble(rt.getColumnIndex(\"StdDev\"),i);\n\t\t\tData[3][i]=rt.getValueAsDouble(rt.getColumnIndex(\"Max\"),i)-rt.getValueAsDouble(rt.getColumnIndex(\"Min\"),i);\n\t\t}\n\t\treturn;\n\t}", "public void createPerformance(Artist artist, Stage stage, int sH, int sM, int eH, int eM) throws FileNotFoundException, ClassNotFoundException, IOException{\r\n\t\tgetOldFile();\r\n\t\tboolean performanceTest = false;\r\n\t\tfor (int i = 0; i <performances.size();i++){\r\n\t\t\tif (stage.equals(performances.get(i).getStageName()) && sH == performances.get(i).getSH()\r\n\t\t\t\t\t&& sM == performances.get(i).getSM()){\r\n\t\t\t\tperformanceTest = true; \r\n\t\t\t}\r\n\t\t}\r\n\t\tif (performanceTest == true){\r\n\t\t\tmain.dubPerformance();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tperformances.add(new Performance(artist, stage, sH, sM, eH, eM));\r\n\t\t\t\t\tmain.noDubPerformance();\r\n\t\t\t\t}\r\n\t\tupdate();\r\n\t}", "public void onMeasure(int i, int i2) {\n super.onMeasure(i, i2);\n int childCount = getChildCount();\n for (int i3 = 0; i3 < childCount; i3++) {\n measureChild(getChildAt(i3), i, i2);\n }\n }", "@Override\n public Object build() {\n ScriptedMetricAggregationBuilder scriptedMetric = AggregationBuilders.scriptedMetric(this.getName());\n Map<String, Object> params = new HashMap<>();\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n /*case \"init_script\":\n scriptedMetric.initScript((String)param.getValue());\n break;\n\n case \"map_script\":\n scriptedMetric.mapScript((String)param.getValue());\n break;\n\n case \"combine_script\":\n scriptedMetric.combineScript((String)param.getValue());\n break;\n\n case \"reduce_script\":\n scriptedMetric.reduceScript((String)param.getValue());\n break;*/\n\n default:\n params.put(param.getName(), param.getValue());\n break;\n }\n }\n\n if (!params.isEmpty()) {\n scriptedMetric.params(params);\n }\n\n return scriptedMetric;\n }", "@Override\r\n public Map<ByteArrayWrapper, MeasureAggregator[]> call() throws Exception\r\n {\n return null;\r\n }", "public void measureRuntime() throws IOException {\n int[] ns = new int[]{10, 100, 1000};\n for (int i : ns) {\n System.out.println(String.format(\"%d times input read took %fms\", i, (float) measureReadInput(i)));\n }\n for (int i : ns) {\n System.out.println(String.format(\"%d times pca took %fms\", i, (float) measurePCA(i)));\n }\n for (int i : ns) { // all cubes\n System.out.println(String.format(\"%d skeleton generations all cubes took %fms\", i, (float) measureAlgorithmWithoutPCA(i, true, true)));\n }\n for (int i : ns) { // low res\n System.out.println(String.format(\"%d skeleton generations low res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, true)));\n }\n for (int i : ns) { // high res\n System.out.println(String.format(\"%d skeleton generations high res took %fms\", i, (float) measureAlgorithmWithoutPCA(i, false, false)));\n }\n }", "public void setMeasureSpace(float measurespace) {\n\t\tthis.measurespace = measurespace;\n\t}", "public void mpgCalculations() {\n\n }" ]
[ "0.6304782", "0.6135739", "0.601369", "0.58959556", "0.57784444", "0.57491076", "0.57462436", "0.5675715", "0.56692266", "0.5622429", "0.5593425", "0.5566577", "0.55506873", "0.55344665", "0.55031997", "0.55031997", "0.5502923", "0.54861575", "0.54668856", "0.5465207", "0.54356384", "0.5424233", "0.5414695", "0.54120386", "0.5408396", "0.540254", "0.5399327", "0.53978807", "0.53486496", "0.53430414", "0.53320587", "0.5301886", "0.5294973", "0.5273659", "0.5262805", "0.524942", "0.5235412", "0.52257454", "0.5211604", "0.52111745", "0.52085286", "0.5182312", "0.51796377", "0.5176699", "0.51456934", "0.513886", "0.51375777", "0.513024", "0.51249075", "0.5109739", "0.5089107", "0.508508", "0.50839657", "0.50818706", "0.50771934", "0.50683403", "0.5058547", "0.5052255", "0.50455356", "0.5044821", "0.50317997", "0.5031378", "0.5023098", "0.5019456", "0.500721", "0.5000043", "0.49856538", "0.49849942", "0.4977346", "0.49620795", "0.49617776", "0.49573782", "0.49546248", "0.49531662", "0.4946198", "0.49343404", "0.4931653", "0.49294123", "0.49265566", "0.49136183", "0.49081793", "0.49041465", "0.49033788", "0.48940256", "0.48908934", "0.48862094", "0.48818684", "0.4881635", "0.48653066", "0.4860454", "0.4855449", "0.48531318", "0.4840537", "0.48333585", "0.48279533", "0.4827209", "0.48265815", "0.47945517", "0.47890323", "0.47873673" ]
0.73853177
0
Send measure data to webserver.
private void sendMeasureToServer(Intent intent) { measure.processMeasureData(intent.getExtras()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMeasures() throws IOException {\n\t\tJSONObject obj = new JSONObject();\n\t\t\n\t\tobj.put(\"type\", this.type.toString());\n\t\tobj.put(\"rate\", this.rate);\n\t\tobj.put(\"error\", this.error);\n\t\tobj.put(\"localisation\", this.localisation);\n\t\tobj.put(\"range\", this.range);\n\t\tobj.put(\"intensity\", this.alerte.getIntensity());\n\t\tString jsonString =obj.toJSONString();\n\n\t\tSystem.out.print(obj);\n\t\t\t \n\t\t\n\t\tURL url = new URL(\"http://localhost:8084/EmergencyWebService/add/\"); \n\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection(); \n\t\tconnection.setRequestMethod(\"POST\"); \n\t\tconnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\"); \n\t\tconnection.setDoOutput(true); \n\t\t\n\t\tOutputStream os = connection.getOutputStream(); \n\t\tOutputStreamWriter osw = new OutputStreamWriter(os, \"UTF-8\"); \n\t\tosw.write(jsonString); \n\t\tosw.flush(); \n\t\tosw.close();\n\t\tconnection.getInputStream();\n\t}", "private void writeMetric(String data, HttpServerResponse response) {\n response.write(PAYLOAD_HEADER);\n response.write(Buffer.buffer(data.getBytes(DEFAULT_CHARSET)));\n response.write(PAYLOAD_FOOTER);\n }", "private void sendData() throws DataProcessingException, IOException {\n Data cepstrum = null;\n do {\n cepstrum = frontend.getData();\n if (cepstrum != null) {\n if (!inUtterance) {\n if (cepstrum instanceof DataStartSignal) {\n inUtterance = true;\n dataWriter.writeDouble(Double.MAX_VALUE);\n dataWriter.flush();\n } else {\n throw new IllegalStateException\n (\"No DataStartSignal read\");\n }\n } else {\n if (cepstrum instanceof DoubleData) {\n // send the cepstrum data\n double[] data = ((DoubleData) cepstrum).getValues();\n for (double val : data) {\n dataWriter.writeDouble(val);\n }\n } else if (cepstrum instanceof DataEndSignal) {\n // send a DataEndSignal\n dataWriter.writeDouble(Double.MIN_VALUE);\n inUtterance = false;\n } else if (cepstrum instanceof DataStartSignal) {\n throw new IllegalStateException\n (\"Too many DataStartSignals.\");\n }\n dataWriter.flush();\n }\n }\n } while (cepstrum != null);\n }", "private void reportMetrics(HttpServerRequest request, HttpServerResponse response) {\n response.setChunked(true)\n .setStatusCode(200)\n .headers()\n .add(HttpHeaders.CONTENT_TYPE, HTTP_CONTENT_TYPE_VALUE)\n .add(HttpHeaders.CACHE_CONTROL, HTTP_CACHE_CONTROL_VALUE)\n .add(HTTP_HEADER_PRAGMA, HTTP_HEADER_PRAGMA_VALUE);\n\n long delay = DEFAULT_DELAY;\n\n final String requestDelay = request.getParam(\"delay\");\n try {\n if (requestDelay != null && !requestDelay.isEmpty()) {\n delay = Math.max(Long.parseLong(requestDelay), 1);\n }\n } catch (Exception e) {\n log.warn(\"[Vertx-EventMetricsStream] Error parsing the delay parameter [{}]\", requestDelay);\n }\n\n final Subscription metricsSubscription = Observable.interval(delay, TimeUnit.MILLISECONDS, scheduler)\n .map(i -> new DashboardData(HystrixCommandMetrics.getInstances(),\n HystrixThreadPoolMetrics.getInstances(),\n HystrixCollapserMetrics.getInstances()))\n .concatMap(dashboardData -> Observable.from(SerialHystrixDashboardData.toMultipleJsonStrings(dashboardData)))\n .onTerminateDetach()\n .subscribe(metric -> writeMetric(metric, response),\n ex -> log.error(\"Error sending metrics\", ex));\n\n response.closeHandler(ignored -> {\n log.debug(\"[Vertx-EventMetricsStream] - Client closed connection, stopping sending metrics\");\n metricsSubscription.unsubscribe();\n handleClosedConnection();\n });\n\n request.exceptionHandler(ig -> {\n log.error(\"[Vertx-EventMetricsStream] - Sending metrics, stopping sending metrics\", ig);\n metricsSubscription.unsubscribe();\n handleClosedConnection();\n });\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic void run() {\n long throughputMeasurementStartTime = System.currentTimeMillis();\n\n byte[] reply;\n int reqId;\n int req = 0;\n\n Storage st = new Storage(nTXs);\n\n System.out.println(\"Executing experiment for \" + nTXs + \" ops\");\n\n for (int i = 0; i < nTXs; i++, req++) {\n long last_send_instant = System.nanoTime();\n if (dos) {\n reqId = proxy.generateRequestId((readOnly) ? TOMMessageType.UNORDERED_REQUEST : TOMMessageType.ORDERED_REQUEST); \n proxy.TOMulticast(request, reqId, (readOnly) ? TOMMessageType.UNORDERED_REQUEST : TOMMessageType.ORDERED_REQUEST); \n\n } else {\n \tif(readOnly) {\n \t\treply = proxy.invokeUnordered(request);\n \t} else {\n \t\treply = proxy.invokeOrdered(request);\n \t}\n }\n st.store(System.nanoTime() - last_send_instant);\n\n if (timeout > 0) {\n //sleeps timeout ms before sending next request\n try {\n\t\t\t\t\t\tThread.sleep(timeout);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n } \n\n } \n writeReportJSON(throughputMeasurementStartTime, st); \n }", "public abstract void sendData(Float data, int dataType);", "private void writeMetrics() {\n if (metrics.size() > 0) {\n try {\n String payload = pickleMetrics(metrics);\n int length = payload.length();\n byte[] header = ByteBuffer.allocate(4).putInt(length).array();\n socket.getOutputStream().write(header);\n writer.write(payload);\n writer.flush();\n } catch (Exception e) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Error writing to Graphite\", e);\n } else {\n LOGGER.warn(\"Error writing to Graphite: {}\", e.getMessage());\n }\n }\n\n // if there was an error, we might miss some data. for now, drop those on the floor and\n // try to keep going.\n LOGGER.debug(\"Wrote {} metrics\", metrics.size());\n\n metrics.clear();\n }\n }", "public void sendData(String data, int numCapteur);", "public void calcPerfMeasure(View view) {\n \tPerfMeasure.Calculate();\n \talertbox(\"HTTP Download Performance\",PerfMeasure.toString());\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 send(String name, String value, long timestamp) throws IOException {\n metrics.add(new MetricTuple(sanitize(name), timestamp, sanitize(value)));\n\n if (metrics.size() >= batchSize) {\n writeMetrics();\n }\n }", "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 }", "private void sendTrafficSummary() {\n\t\ttry {\n\t\t\tregistry.getSender().sendData(\n\t\t\t\t\tnew OverlayNodeReportsTrafficSummary(myAssignedID,\n\t\t\t\t\t\t\tsendTracker, relayTracker, sendSummation,\n\t\t\t\t\t\t\treceiveTracker, receiveSummation).getBytes());\n\t\t\tthis.sendTracker = 0; // reset all counters after reporting\n\t\t\tthis.relayTracker = 0;\n\t\t\tthis.receiveTracker = 0;\n\t\t\tthis.sendSummation = 0;\n\t\t\tthis.receiveSummation = 0;\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble reporting traffic summary or closing sockets.\");\n\t\t}\n\t}", "private void sendDataToBlynk(Measurement measurement) throws IOException {\n\n\n Unit unit = measurement.Temperatur.get(0);\n if (unit != null) {\n //put into value display widget\n HttpPut put = new HttpPut(\"http://blynk-cloud.com/743cecc5eab44fa0a9ef9c208d2e95f6/pin/V0\");\n put.setEntity(new StringEntity(\"[\\\"\" + unit.value + \" \" + unit.unit + \"\\\"]\", ContentType.APPLICATION_JSON));\n try (CloseableHttpResponse response = httpclient.execute(put)) {\n\n }\n\n //put into value display widget\n put = new HttpPut(\"http://blynk-cloud.com/743cecc5eab44fa0a9ef9c208d2e95f6/pin/V2\");\n put.setEntity(new StringEntity(\"[\\\"\" + unit.value + \"\\\"]\", ContentType.APPLICATION_JSON));\n try (CloseableHttpResponse response = httpclient.execute(put)) {\n\n }\n }\n\n //put into terminal widget\n HttpPut put = new HttpPut(\"http://blynk-cloud.com/743cecc5eab44fa0a9ef9c208d2e95f6/pin/V1\");\n put.setEntity(new StringEntity(\"[\\\"\" + measurement.toString() + \"\\\\n\" + \"\\\"]\", ContentType.APPLICATION_JSON));\n try (CloseableHttpResponse response = httpclient.execute(put)) {\n\n }\n\n }", "private void sendTelemetry(HttpRecordable recordable) {\n }", "void clientData(final int index, final int data, final double value);", "private static void sendProfilingPacket() throws IOException{\r\n ProfilingPacketType profilingPacket = new ProfilingPacketType();\r\n ProfilingPacketType.serializePacket(profilingPacket);\r\n\r\n System.out.println(\"Client - sending datagram!\");\r\n //printSendProfilingPacket(profilingPacket);\r\n clientObjectOutputStream.writeObject(new String(\"DATA\"));\r\n //clientObjectOutputStream.flush();\r\n\r\n try{\r\n Thread.sleep(PACKET_SEND_INTERVAL);\r\n }catch (InterruptedException interE){\r\n interE.printStackTrace();\r\n //TODO - log error etc.\r\n }\r\n }", "@Scheduled(fixedRate = 2000)\n private void doSendRpcUsage() {\n List<MethodCallDTO> items = stats.values()\n .stream()\n .map(stat -> new MethodCallDTO(\n stat.name,\n stat.count.longValue(),\n stat.lastCall.longValue(),\n stat.lastResult.get(),\n stat.curl))\n .sorted((s1, s2) -> s1.getMethodName().compareTo(s2.getMethodName()))\n .collect(Collectors.toList());\n\n clientMessageService.sendToTopic(\"/topic/rpcUsage\", items);\n }", "private void sendStatsToServer(List<Statistic> stats)\n {\n if(stats == null)\n {\n System.out.println(\"COORDINATOR - Nothing to send yet\");\n return;\n }\n\n ClientResponse response;\n String serverURI = coordinator.getNode().getServerURI();\n\n try\n {\n WebResource webResource = RESTclient.resource(serverURI + \"/Statistics/\");\n response = webResource.type(\"application/json\").put(ClientResponse.class, new Gson().toJson(stats, new TypeToken<List<Statistic>>(){}.getType()));\n }\n catch (ClientHandlerException ce)\n {\n System.out.println(\"COORDINATOR - Server cloud connection refused - impossible to send data\");\n backupBuffer.add(stats);\n return;\n }\n\n switch (response.getStatus())\n {\n case 200:\n System.out.println(\"COORDINATOR - Sending statistics to server successful\");\n return;\n\n default:\n backupBuffer.add(stats);\n System.out.println(\"COORDINATOR - Failed sending statistics: HTTP error code: \" + response.getStatus());\n }\n }", "public void run() {\n\t\ttry {\r\n\t\t\tInetAddress localHost = InetAddress.getLocalHost();\r\n\t\t\tString ip_address = localHost.getHostAddress().trim();\r\n\t\t\tSocket socket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\twhile (socket.isClosed() == true) {\r\n\t\t\t\tsocket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\t}\r\n\t\t\tString request = \"HELLO \" + ip_address + \" \" + socket \r\n\t\t\t\t\t+ \" \" + this.client_id;\r\n\t\t\tOutputStream output = socket.getOutputStream();\r\n\t\t\tPrintWriter writer = new PrintWriter(output, true);\t\r\n\t\t\t// while <300 send request\r\n\t\t\tint requests = 0;\r\n\t\t\tlong sum=0;\r\n\t\t\twhile (requests < 300) {\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\twriter.println(request);\r\n\t\t\t\tDataInputStream reader = new DataInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\treader.readUTF();\r\n\t\t\t\tint length = reader.readInt();\r\n\t\t\t\tif(length>0){\r\n\t\t\t\t\tbyte[] payload = new byte[length];\r\n\t\t\t\t reader.readFully(payload, 0, payload.length); // read the message\r\n\t\t\t\t}\r\n\t\t\t\trequests++;\r\n\t\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\t\tlong time = endTime - startTime;\r\n\t\t\t\tsum+=time;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Client \" + this.client_id + \" has finished after \"\r\n\t\t\t\t\t+ requests + \" requests\");\r\n\t\t\tdouble averTime = sum / 300;\r\n\t\t\tString text = \"Average Communication Latency (\" + this.client_id + \"): \" + averTime + \"\\n\";\r\n\t\t\tFiles.write(Paths.get(this.latencyTimes.getName()), text.getBytes(), StandardOpenOption.APPEND);\r\n\t\t\tsocket.close();\t\r\n\t\t} catch (UnknownHostException ex) {\r\n\t\t\tSystem.out.println(\"Server not found: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"I/O error: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public static void sendInfo(int cpuUsg, int mmUsg) {\n try {\n disObj.performanceInfo(1, cpuUsg, mmUsg); //cluster ID HC\n } catch (RemoteException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "void getDataFromServer();", "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 }", "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 synchronized void sendData(PrintWriter stream){\r\n\t\t\tstream.println(\"3\");\r\n\t\t\tstream.println(Integer.toString(x));\r\n\t\t\tstream.println(Integer.toString(y));\r\n\t\t\tstream.println(Integer.toString(health));\r\n\t\t\tstream.println(Integer.toString(level));\r\n\t\t}", "public void reportMetric(SimpleAgentMetric m)\n\t{\n\t\tif (reportMetricsToServers)\n\t\t\treportMetric(m.getMetricCategory() + \"/\" + m.getMetricLabel(), m.getMetricUnits(), m.getMetricValue());\n\t}", "private void writeMetrics(float wx, float llx, float lly, float urx, float ury, boolean isColor) {\n this.isColor = isColor;\n this.wx = wx;\n\n this.llx = llx;\n this.lly = lly;\n this.urx = urx;\n this.ury = ury;\n\n if (isColor) {\n contentStream.getOutputStream()\n .writeFloat(wx)\n .writeSpace()\n .writeFloat(0)//wy\n .writeSpace()\n .writeBytes(d0);\n } else {\n contentStream.getOutputStream()\n .writeFloat(wx)\n .writeSpace()\n .writeFloat(0)//wy\n .writeSpace()\n .writeFloat(llx)\n .writeSpace()\n .writeFloat(lly)\n .writeSpace()\n .writeFloat(urx)\n .writeSpace()\n .writeFloat(ury)\n .writeSpace()\n .writeBytes(d1);\n }\n }", "private void analyzeData(final String sec) {\n\n if (sec != null) {\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(getString(R.string.analysis_server) + \"/tennis\");\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n JSONObject jsonParam = new JSONObject();\n try {\n jsonParam.put(\"session\", sec);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n OutputStream rout = new BufferedOutputStream(urlConnection.getOutputStream());\n rout.write(jsonParam.toString().getBytes());\n rout.flush();\n rout.close();\n\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n final StringBuilder out = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n out.append(line);\n }\n Log.v(CollectData.class.toString(), \"API Result: \" + out.toString());\n\n try {\n JSONObject jsonObj = new JSONObject(out.toString());\n\n setStats(jsonObj.getJSONObject(\"aggregate\").getString(\"Forehands\"),\n jsonObj.getJSONObject(\"aggregate\").getString(\"Backhands\"),\n jsonObj.getJSONObject(\"aggregate\").getString(\"Serves\"));\n\n final PutDataMapRequest putRequest = PutDataMapRequest.\n create(\"/STATS_UPDATE\");\n \n putRequest.setUrgent();\n final DataMap map = putRequest.getDataMap();\n map.putString(\"forehand\", numForehands);\n map.putString(\"backhand\", numBackhands);\n map.putString(\"serve\", numServes);\n Wearable.DataApi.putDataItem(mGoogleApiClient,\n putRequest.asPutDataRequest());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n }\n }).start();\n }\n }", "private void run() throws InterruptedException, IOException {\n endpoint.getWcEvents().take();\n\n //process received data\n processRecv();\n\n for (int i=0; i < 1000000; i++) {\n //change data in remote memory\n writeData(i);\n\n //wait for writing remote memory to complete\n endpoint.getWcEvents().take();\n }\n System.out.println(\"ClientWrite::finished!\");\n }", "private void reportMetered(Metric metric, Metered metered) {\n send(metric.attribute(\"stat\", \"1m\").value(metered.getOneMinuteRate()));\n send(metric.attribute(\"stat\", \"5m\").value(metered.getOneMinuteRate()));\n }", "public void startData()\n\t\t\t{\n\t\t\t\tsend(\"<data>\", false);\n\t\t\t}", "public interface OnSendTotSpent {\n void ReceiveTotSpent(double totSpent);\n }", "public static Result reportMetermaidSighting(){\n \tForm<MeterMaid> filledForm = Form.form(MeterMaid.class).bindFromRequest();\n \tMeterMaid maid = filledForm.get();\n \t\n \t// handle new information\n// \tMeterMaid.acceptReport(maid);\n \t\n \t// render the splash page again \t\n \treturn ok(index.render(byline, maidForm, parkingForm));\n \t\n }", "public static synchronized void writeMetricsToFile(String request) { \n\n Metric metric = getMetricByThread();\n BufferedWriter outputMetrics = null;\n try {\n FileWriter fstream = new FileWriter(cnvProject + \"/\" + metricsOutputFile, true); //true tells to append data.\n outputMetrics = new BufferedWriter(fstream);\n outputMetrics.write(metric.toString());\n outputMetrics.close();\n metric.resetMetrics();\n System.out.println(\"> [BIT]: Stored metrics in: \" + cnvProject + \"/\" + metricsOutputFile);\n return;\n }\n catch (Exception e) {\n System.out.println(\"> [BIT]: \" + e.getMessage());\n }\n }", "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}", "private static void collectProfilingData() throws ClassNotFoundException, IOException{\r\n\r\n //TODO - clean lists in each iteration (when data packet is received)\r\n List<MemoryMeasurement> memoryData;\r\n List<CPUmeasurement> cpuData;\r\n List<ThreadMeasurement> threadData;\r\n List<ClassMeasurement> classData;\r\n Map<String, TimeMeasurement> methodRunList;\r\n String message = null;\r\n\r\n do{\r\n message = (String)serverObjectInputStream.readObject();\r\n\r\n if(message.equals(\"DATA\")){\r\n System.out.println(\"Server: packet received: \" + message);\r\n\r\n ProfilingPacketType.deserializePacket();\r\n memoryData = ProfilingPacketType.memoryUsageList;\r\n //System.out.println(\"MemoryData: \" + memoryData);\r\n ProfilingMemoryPage.prepareMemoryData(memoryData);\r\n cpuData = ProfilingPacketType.cpuUsageList;\r\n ProfilingCPUPage.prepareData(cpuData);\r\n //printCpuData(cpuData);\r\n threadData = ProfilingPacketType.threadList;\r\n ProfilingThreadsPage.prepareData(threadData);\r\n //System.out.println(\"Received thread data: \" + threadData.size());\r\n classData = ProfilingPacketType.classUsageList;\r\n ProfilingClassesPage.prepareData(classData);\r\n //System.out.println(classData.size());\r\n methodRunList = ProfilingPacketType.methodTimeList;\r\n ProfilingMethodsPage.prepareData(methodRunList);\r\n //printMethodRuns(methodRunList);\r\n\r\n ProfilingOverviewPage.getProfilingData();\r\n ProfilingVMSummaryPage.collectVMData();\r\n\r\n }\r\n\r\n }while (!message.equals(Attributes.PROFILING_PACKET_MESSAGE_TERMINATE));\r\n throw new EOFException(\"Agent has finished it's job.\");\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tMessage msg=new Message();\n\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\tbundle.putInt(\"percent\",(int) (100*downLoadFileSize/totalsize));\n\t\t\t\tmsg.setData(bundle);\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\n\t\t\t}", "@Ignore\n @Test\n public void testPerformanceFuserOnly() throws JAXBException, ClassNotFoundException, Exception\n {\n int num_messages = 20000;\n int num_samples = 10;\n \n long total = 0;\n long min = Long.MAX_VALUE;\n long max = Long.MIN_VALUE;\n \n for( int i = 0; i < num_samples; i++ )\n {\n long proc_time = sendMatmFlightMsgs( num_messages );\n total = total + proc_time;\n min = Math.min( min, proc_time );\n max = Math.max( max, proc_time );\n }\n \n log.info( \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" );\n log.info( \"Ran \" + num_samples + \" samples. Avg Time = \" + ( total / num_samples ) + \n \", Min Time = \" + min + \", Max Time = \" + max );\n log.info( \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" ); \n }", "public void send(double d) {\r\n\t\tif (s != null) {\r\n\t\t\ttry {\r\n\t\t\t\tdos.writeByte(LiteServer.DOUBLE_CONST);\r\n\t\t\t\tdos.writeDouble(d);\r\n\t\t\t\tif (autoFlush) {\r\n\t\t\t\t\tdos.flush();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// if the socket is null\r\n\t\t}\r\n\r\n\t}", "@RequestMapping(value=\"storeEvaluateData\",method = RequestMethod.POST)\n @ResponseBody\n public String storeEvaluateData(@RequestBody PerformanceAssess performanceAssess){\n evaluateService.storePerfomanceData(performanceAssess);\n return \"1\";\n }", "public static void sendData(String message) {\n try // send object to server\n {\n output.writeObject(message);\n output.flush(); // flush data to output\n displayMessage(\"\\nSend to Server:\");\n displayMessage(\"\\n\" + message);\n } // end try\n catch (IOException ioException) {\n displayArea.append(\"\\nError writing object\");\n } // end catch\n }", "public void savePerfMeasure(View view) {\n \tdouble[] gps = getGPS();\n \tPerfMeasure.Save(gps);\n \talertbox(\"Save Results\",\"The performance results are saved successfully.\");\n }", "@Override\n\tpublic void run(){\n\t\tLog.v(\"measure\",\"Thread started\");\n\t\t\n\t\twhile(mRun){\n try { \t\n \tsynchronized(this){wait(500);}\n \t\n \t\t\tfor(int i=0;i<numMeasurements;i++){\n \t\t\t\tfloat val=0;\n \t\t\t\tfloat diff=0;\n \t\t\t\tint timeDiv = measurementArray[i].mSource.getTimeDiv();\n \t\t\t\tint voltDiv = measurementArray[i].mSource.getVoltDiv();\n \t\t\t\tString result=null;\n \t\t\t\tMessage msg = new Message();\n \tmsg.what=MSG_MEASUREMENTS;\n \tmsg.arg1=-1;\n \tmsg.arg2=-1;\n \tBundle msgData = new Bundle();\n \t\t\t\t\n \t// Check measurement type, set correct result\n \t\t\t\tswitch(measurementArray[i].mType){\n \t\t\t\tcase 0: \t//delta-T measurement\n \t\t\t\t\tdiff = curt2.getPos()-curt1.getPos();//reversed, because of coordinate system on tablet\n \t\t\t\t\tval = diff/scrnWidth*mTimeConversion[timeDiv]; \n \t\t\t\t\t\n \t\t\t\t\tif(timeDiv<2)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ns\";\n \t\t\t\t\tif(timeDiv>=2 && timeDiv<=10)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" us\";\n \t\t\t\t\tif(timeDiv>=11 && timeDiv<=19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + \" ms\";\n \t\t\t\t\tif(timeDiv>19)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" s\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 1: \t//delta-V measurement\n \t\t\t\t\tdiff = curv2.getPos()-curv1.getPos(); //reversed, because of coordinate system on tablet \n \t\t\t\t\tval = diff/scrnHeight*mVoltConversion[voltDiv];\n \t\t\t\t\t\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 2: \t//maximum\t\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMaximum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\t\n \t\t\t\t\tbreak;\n \t\t\t\tcase 3: \t//minimum\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getMinimum();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 4:\t\t//Pk-Pk\n \t\t\t\t\tsynchronized(measurementArray[i].mSource){\n \t\t\t\t\t\tval = measurementArray[i].mSource.getPkPk();\n\t \t\t\t\t\t}\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n \t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tcase 5:\t\t//Frequency\t\t\t\t\n \t\t\t\t\tval = measurementArray[i].mSource.getFreq();\n \t\t\t\t\tString append =\" Hz\";\n \t\t\t\t\tif(val/1000<1){\n \t\t\t\t\t\tappend = \" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if (val/1000000<1){\n \t\t\t\t\t\tval=val/1000;\n \t\t\t\t\t\tappend = \" kHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else if(val/1000000>1){\n \t\t\t\t\t\tval=val/1000000;\n \t\t\t\t\t\tappend = \" MHz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\",val) + append;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tappend=\" Hz\";\n \t\t\t\t\t\tresult=String.format(\"%.2f\", val)+append;\n \t\t\t\t\t}\n \t\t\t\t\tbreak;\n \t\t\t\tcase 6:\t\t//Average\n \t\t\t\t\tval = measurementArray[i].mSource.getAverage();\n \t\t\t\t\tval = val/255*mVoltConversion[voltDiv];\n \t\t\t\t\tif(voltDiv<6)\n\t\t\t\t\t\tresult = String.format(\"%.2f\", val) + \" mV\";\n \t\t\t\t\tif(voltDiv>=6)\n\t\t\t\t\t\tresult=String.format(\"%.2f\", val) + \" V\";\n \t\t\t\t\tbreak;\n \t\t\t\tdefault:\n \t\t\t\t\tresult=\"...\";\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tsynchronized(measurementArray[i].mSource){\n\t\t\t\t\t\tmsg.arg1= measurementArray[i].mType;\n\t\t\t\t\t\tmsg.arg2=i;\n\t\t\t\t\t\t\n \t\t\t\t\tmsgData.putString(MEASUREMENT_RESULT, result);\n \t\t\t\t\tmsgData.putInt(SOURCE, measurementArray[i].mChan);\n \t\t\t\t}\n \t\t\t\tmsg.setData(msgData);\n \t\t\tif(msg.arg1!=-1)\n \t\t\t\tmHandler.sendMessage(msg);\n \t\t\t} \t\n }catch(Exception e){Log.e(TAG,e.toString());}\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\n @CalledByNative\n private void onMetricsCollected(long requestStartMs, long dnsStartMs, long dnsEndMs,\n long connectStartMs, long connectEndMs, long sslStartMs, long sslEndMs,\n long sendingStartMs, long sendingEndMs, long pushStartMs, long pushEndMs,\n long responseStartMs, long requestEndMs, boolean socketReused, long sentByteCount,\n long receivedByteCount) {\n synchronized (mNativeStreamLock) {\n try {\n if (mMetrics != null) {\n throw new IllegalStateException(\"Metrics collection should only happen once.\");\n }\n mMetrics = new CronetMetrics(requestStartMs, dnsStartMs, dnsEndMs, connectStartMs,\n connectEndMs, sslStartMs, sslEndMs, sendingStartMs, sendingEndMs,\n pushStartMs, pushEndMs, responseStartMs, requestEndMs, socketReused,\n sentByteCount, receivedByteCount);\n assert mReadState == mWriteState;\n assert (mReadState == State.SUCCESS) || (mReadState == State.ERROR)\n || (mReadState == State.CANCELED);\n int finishedReason;\n if (mReadState == State.SUCCESS) {\n finishedReason = RequestFinishedInfo.SUCCEEDED;\n } else if (mReadState == State.CANCELED) {\n finishedReason = RequestFinishedInfo.CANCELED;\n } else {\n finishedReason = RequestFinishedInfo.FAILED;\n }\n final RequestFinishedInfo requestFinishedInfo =\n new RequestFinishedInfoImpl(mInitialUrl, mRequestAnnotations, mMetrics,\n finishedReason, mResponseInfo, mException);\n mRequestContext.reportRequestFinished(\n requestFinishedInfo, mInflightDoneCallbackCount);\n } finally {\n mInflightDoneCallbackCount.decrement();\n }\n }\n }", "public void sendMicroServer(String message, Long num) throws Exception {\n InetAddress ip = InetAddress.getByName(\"localhost\");\n \tDatagramPacket dp = new DatagramPacket(message.getBytes(), message.length(), ip, (int) (7000+num));\n \ttoMicroServer.send(dp);\n System.out.printf(\"Sending message '%s' to micro-service %s\\n\", message, num);\n\t\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String name = request.getParameter(GenericConstants.COMPONENT_PNAME);\n \n RealTimeSUStateHelper suRTHelper = new RealTimeSUStateHelper(name);\n String responseData = suRTHelper.getServiceUnitsState();\n response.setStatus(HttpServletResponse.SC_OK);\n response.setHeader(RealTimeStatisticServlet.CONTENT_TYPE_HEADER, \n RealTimeStatisticServlet.CONTENT_TYPE_VALUE);\n response.setHeader(RealTimeStatisticServlet.CACHE_CONTROL_HEADER, \n RealTimeStatisticServlet.CACHE_CONTROL_VALUE);\n \n // Write out the message on the response stream\n OutputStream outputStream = response.getOutputStream();\n try {\n outputStream.write(responseData.getBytes());\n } catch (IOException e2) {\n }\n outputStream.flush();\n \n }", "private void sendReports()\n {\n int modeState = 0;\n if(currentTentativetrack!=null){\n modeState = 3;\n }\n if(currentTrack!=null){\n modeState = 2;\n }\n if(autoPanningMode){\n modeState = 1;\n }\n\n\n double myTrackDistance = currentTrack!=null ? Spherical.getRhumbDistance(controllingCamera.getSensorPosition(), currentTrack.getPosition()) : 0;\n String trackId = currentTrack != null ? ((TrackDetection) currentTrack).getSimulatedTrackId() : \"0\";\n\n Reports.getInstance().sendAgentMode(simulationDuration, getObjectId(), modeState, trackId, myTrackDistance, controllingCamera.getLookingAtPoint());\n }", "double clientData(final int index, final int data);", "int measure();", "private void sendData(String message) {\n\t\t\ttry {\n\t\t\t\toutput.writeObject(message);\n\t\t\t\toutput.flush(); // flush output to client\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"\\nError writing object\");\n\t\t\t}\n\t\t}", "private void sendWave(){\n\t\tif(mainApp.getCommunication() == null){\n\t\t\tmainApp.showSetting();\n\t\t}\n\t\tif((mainApp.getCommunication() !=null)&&mainApp.getCommunication().isReady){\n\t\t\t//2 - Formulating data structure from the data filled\n\t\t\ttry{\n\t\t\t\tWaveConf waveCH0 = new WaveConf();\n\t\t\t\twaveCH0.setWaveType(getWaveformIndex(groupWaveTypeCH0));\n\t\t\t\twaveCH0.setFreq(getFreq(groupFreqCH0,\n\t\t\t\t\t\tFloat.parseFloat(freqFieldCH0.getText())));\n\t\t\t\tSystem.out.println(getAltitude(groupAltitudeCH0,\n\t\t\t\t\t\tFloat.parseFloat(altitudeFieldCH0.getText())));\n\t\t\t\twaveCH0.setAltitude(getAltitude(groupAltitudeCH0,\n\t\t\t\t\t\tFloat.parseFloat(altitudeFieldCH0.getText())));\n\t\t\t\twaveCH0.setOffset(Float.parseFloat(offsetFieldCH0.getText()));\n\t\t\t\tif(waveCH0.getWaveform() == WaveformConstants.WAVETYPE_SIN){\n\t\t\t\t\twaveCH0.setPhase(Float.parseFloat(dutyFieldCH0.getText()));\n\t\t\t\t}\n\t\t\t\telse if(waveCH0.getWaveform() == WaveformConstants.WAVETYPE_SQUARE){\n\t\t\t\t\twaveCH0.setDuty(Integer.parseInt(dutyFieldCH0.getText()));\n\t\t\t\t}\n\n\t\t\t\twaveCH0.setChannel(0);\n\t\t\t\t\n\t\t\t\t//3 - generate the command and data for MCU\n\t\t\t\tCommandGenerator cg = new CommandGenerator(waveCH0);\n\t\t\t\tbyte[] buffer = cg.generatePackage();\n\t\t\t\tCommunication comm = mainApp.getCommunication();\n\t\t\t\t\n\t\t\t\t//Send the command at most four times\n\t\t\t\tbyte ack = 0, times = 4;\n\t\t\t\twhile(ack != CommandGenerator.CMD_QUERY_CONFIGURED){\n\t\t\t\t\tcomm.send(buffer);\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\tcomm.delay();\n\t\t\t\t\t//Query if the device received successfully\n\t\t\t\t\tcomm.send(CommandGenerator.CMD_QUERY);\n\t\t\t\t\tack = comm.getResponse();\n\t\t\t\t\tSystem.out.println(\"ack = \"+ack);\n\t\t\t\t\tif(times-- == 0) throw new IOException();\n\t\t\t\t\tif(ack == CommandGenerator.CMD_QUERY_DISCONNECTED)\n\t\t\t\t\t\tthrow new IOException();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Parameters correctely sent!\");\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\tcomm.delay();\n\t\t\t\t\n\t\t\t\tbuffer = cg.genWaveform();\n\t\t\t\tbyte[] test = cg.generatePackage(buffer);\n\t\t\t\tfor(int i = 0; i < test.length; i++) System.out.printf(\"%x,\",test[i]);\n\t\t\t\tack = comm.send(test);\n\t\t\t\t//check if need to send data too.\n\t\t\t\t//cg.calcParameters();\n\t\t\t\t//4 - Sending the command or the data to MCU, if any error happens\n\t\t\t\t// generate communication error.\n\t\t\t\t//5 - wait for response and inform the user the results.\n\t\t\t\t\n\t\t\t\t//6 - All success, then we inform user and disable the buttons\n\t\t\t\tdisableChannel();\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.INFORMATION);\n\t\t\t\talert.setTitle(\"A Canal 0 est¨¢ ligado.\");\n\t\t\t\talert.setHeaderText(\"Aviso: A Canal 0 est¨¢ ligado!\");\n\t\t\t\talert.setContentText(null);\n\t\t\t\talert.showAndWait();\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch (DataInvalidException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tswitchCH0.setSelected(false);\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Invalid Field\");\n\t\t\t\talert.setHeaderText(\"Please correct invalid fields\");\n\t\t\t\talert.setContentText(\"O Amplitude tem que ser dentro de [0.1,10] \"\n\t\t\t\t\t\t+ \"volts!\\n A frequ¨ºncia tem que ser dentro de [1,100kHz]\");\n\t\t\t\talert.showAndWait();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tswitchCH0.setSelected(false);\n\t\t\t\tmainApp.getCommunication().close();\n\t\t\t\tmainApp.setCommunication(null);\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Device connection error\");\n\t\t\t\talert.setHeaderText(\"Please check the state of the device\");\n\t\t\t\talert.setContentText(\"Connect to device fails!\");\n\t\t\t\talert.showAndWait();\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (purejavacomm.PureJavaIllegalStateException e){\n\t\t\t\tswitchCH0.setSelected(false);\n\t\t\t\tmainApp.getCommunication().close();\n\t\t\t\tmainApp.setCommunication(null);\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Device connection error\");\n\t\t\t\talert.setHeaderText(\"Please check the state of the device\");\n\t\t\t\talert.setContentText(\"Connect to device fails!\");\n\t\t\t\talert.showAndWait();\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tswitchCH0.setSelected(false);\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Device connection error\");\n\t\t\talert.setHeaderText(\"Please check the state of the device\");\n\t\t\talert.setContentText(\"Connect to device fails!\");\n\t\t\talert.showAndWait();\n\t\t}\n\t}", "@POST\n public Response startStorageReport(){\n log.debug(\"Starting storage report\");\n\n try {\n String responseText = resource.startStorageReport();\n return responseOk(responseText);\n } catch (Exception e) {\n return responseBad(e);\n }\n }", "void requestData();", "private void receive() {\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tsuper.store(generateSimulateData());\n\t\t\t\t\tSystem.out.println(\"模拟接收数据\");\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t }", "@Override\r\n\t\tpublic void run() {\n\t\t\tBufferedReader is = null;\r\n\t\t\tPrintWriter os = null;\r\n\t\t\ttry{\r\n\t\t\t\tis = new BufferedReader(new InputStreamReader(clientScoket.getInputStream()));\r\n\t\t\t\tos = new PrintWriter(clientScoket.getOutputStream(), true);\r\n\t\t\t\t//从InputStream当中读取客户端发送的数据\r\n\t\t\t\tString inputLine = null;\r\n\t\t\t\tlong b = System.currentTimeMillis();\r\n\t\t\t\twhile((inputLine = is.readLine())!=null){\r\n\t\t\t\t\tos.println(inputLine);\r\n\t\t\t\t}\r\n\t\t\t\tlong g = System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"spend:\"+(b-g)+\"ms\");\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally{\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(is!=null)is.close();\r\n\t\t\t\t\tif(os!=null)os.close();\r\n\t\t\t\t\tclientScoket.close();\r\n\t\t\t\t}catch (IOException e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void run() {\n\t\tString request;\n\t\ttry {\n\t\t\tSocketBuilder socketBuilder = new SocketBuilder(this.IP);\n\n\t\t\tSocket clientSocketStrings = socketBuilder.createStringSocket();\n\t\t\tSocket clientSocketBytes = socketBuilder.createByteSocket();\n\n\t\t\tDataOutputStream outToServer = new DataOutputStream(clientSocketStrings.getOutputStream());\n\n\t\t\tDataInputStream bytesStream = new DataInputStream(clientSocketBytes.getInputStream());\n\n\t\t\tBufferedReader inFromServer = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(clientSocketStrings.getInputStream(), StandardCharsets.UTF_8));\n\t\t\t\n\t\t\tMessage requestMessage = new Message();\n\t\t\trequestMessage.createDownloadMessage(path);\n\n\t\t\trequest = JsonParser.messageToJson(requestMessage);\n\n\t\t\toutToServer.write(request.getBytes(\"UTF-8\"));\n\t\t\toutToServer.writeByte('\\n');\n\n\t\t\tMessage responseMessage = JsonParser.jsonToMessage(inFromServer.readLine());\n\n\t\t\t// check if operation is possible\n\t\t\tif (responseMessage.isERRORMessage()) {\n\t\t\t\t/*\n\t\t\t\t * Handle Error Here\n\t\t\t\t */\n\t\t\t} else {\n\n\t\t\t\tFileTransfer fileTransfer = new FileTransfer();\n\n\t\t\t\tlong size = Long.parseLong(inFromServer.readLine());\n\n\t\t\t\tEstimationViewManagementThread manage = new EstimationViewManagementThread(size, \n\t\t\t\t\t\tfileTransfer, clientSocketStrings, clientSocketBytes);\n\t\t\t\tmanage.start();\n\t\t\t\tfileTransfer.receiveFiles(bytesStream, inFromServer, locationToSave);\n\t\t\t}\n\t\t\t\n\t\t\toutToServer.close();\n\t\t\tbytesStream.close();\n\t\t\tinFromServer.close();\n\t\t\tclientSocketBytes.close();\n\t\t\tclientSocketStrings.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void send(float f) {\r\n\t\tif (s != null) {\r\n\t\t\ttry {\r\n\t\t\t\tdos.writeByte(LiteServer.FLOAT_CONST);\r\n\t\t\t\tdos.writeFloat(f);\r\n\t\t\t\tif (autoFlush) {\r\n\t\t\t\t\tdos.flush();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// if the socket is null\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void sendPacket() {\n\t\t\n\t\tStringBuilder theURL = new StringBuilder();\n\t\t\n\t\ttheURL.append(core.modelCore.targetURL);\n\t\ttheURL.append(\"michael/updateevent.php?\");\n\t\ttheURL.append(\"page=\" + \"eleven\" +\"&\"); //page = \"three\"&\n\t\ttheURL.append(\"name=\" + core.modelCore.selectedEvent.eventName +\"&\");\n\t\ttheURL.append(\"answer=\" + yesBox.isChecked() +\"&\");\n\t\ttheURL.append(\"user=\" + core.modelCore.username);\n\t\t\n\t\tSystem.out.println( theURL.toString() );\n\t\t\n\t\tLogic_PHP.getResponseFromURL(core, theURL.toString());\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tint clients = connectedClients.get();\n\t\t\tdouble standardDeviation = 0;\n\t\t\tdouble mean = 0;\n\t\t\tInteger total = 0;\n\t\t\tsynchronized (currentClients) {\n\t\t\t\tfor (Map.Entry<String, Integer> entry : currentClients.entrySet())\n\t\t\t\t\ttotal += entry.getValue();\n\n\t\t\t\tif (clients != 0) {\n\t\t\t\t\tmean = total / clients;\n\n\t\t\t\t\tfor (Map.Entry<String, Integer> entry : currentClients.entrySet()) {\n\t\t\t\t\t\tString k = entry.getKey();\n\t\t\t\t\t\tInteger v = entry.getValue();\n\n\t\t\t\t\t\tstandardDeviation += Math.pow(v - mean, 2);\n\t\t\t\t\t\tcurrentClients.put(k, 0);\n\t\t\t\t\t}\n\t\t\t\t\tstandardDeviation = Math.sqrt(standardDeviation / clients - 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmean = 0;\n\t\t\t}\n\n\t\t\tif (Double.isNaN(standardDeviation))\n\t\t\t\tstandardDeviation = 0;\n\n\t\t\tSystem.out.printf(\"[%s] Server Throughput: %d messages/s, \" +\n\t\t\t\t\t\t\t\"Active Client Connections: %d, \" +\n\t\t\t\t\t\t\t\"Mean Per-client Throughput: %f messages/s, \" +\n\t\t\t\t\t\t\t\"Std. Dev. Of Per-client Throughput: %f messages/s%n\",\n\t\t\t\t\tnew Timestamp(System.currentTimeMillis()),\n\t\t\t\t\ttotal,\n\t\t\t\t\tclients,\n\t\t\t\t\tmean,\n\t\t\t\t\tstandardDeviation\n\t\t\t\t\t);\n\n\n\t\t\t//reset variables for next output\n\t\t\tmessagesSent.set(0);\n\t\t\tmessagesReceived.set(0);\n\n\n\t\t}", "public abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing);", "public void sendData (accVal data)\r\n\t {\r\n\t\t \tsynchronized (this)\r\n\t\t \t{\r\n\r\n\t\t \t\tif (data.accx>0.2) // bigger than 0.2 or 0.3\r\n\t\t \t\t\t_roboCOM.sendMessageToServer(global.urlRight);\r\n\t\t \t\t\t\r\n\t\t \t\tif (acc_val.accx<-0.2) // this is the only way that it works\r\n\t\t \t\t\t_roboCOM.sendMessageToServer(global.urlLeft);\r\n\t\t \t\t\r\n\t\t \t\tif (data.accz>0.4) // it is better like this because you need to incline it a bit more\r\n\t\t \t\t\t_roboCOM.sendMessageToServer(global.urlForward);\r\n\t\t \t\t\r\n\t\t \t\tif (data.accz<-0.3) // it is better if the value is lower than -0.3 to move backwards\r\n\t\t \t\t\t_roboCOM.sendMessageToServer(global.urlBackward);\r\n\t\t \t\t\r\n\t\t \t\tif (data.accz>-0.17 && data.accz<0.10) // This will stop the walk\r\n\t\t \t\t\t_roboCOM.sendMessageToServer(global.urlStopWalk);\r\n\t\t \t\t\r\n\t\t \t}\r\n\t }", "public void write(long time, double value) {\n timeEncoder.encode(time, timeOut);\n valueEncoder.encode(value, valueOut);\n statistics.update(time, value);\n }", "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 reportData() {\n getSender().tell(new GameRoomDataMessage(gameRoomName, capacity, players), this.getSelf());\n }", "public void flush() {\n // all getAndSet will not be synchronous but it's ok since metrics will\n // be spread out among processor worker and we flush every 5s by\n // default\n\n processor.send(new TelemetryMessage(this.metricsSentMetric, this.metricsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.eventsSentMetric, this.eventsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.serviceChecksSentMetric, this.serviceChecksSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.bytesSentMetric, this.bytesSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.bytesDroppedMetric, this.bytesDropped.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsSentMetric, this.packetsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsDroppedMetric, this.packetsDropped.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsDroppedQueueMetric, this.packetsDroppedQueue.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.aggregatedContextsMetric, this.aggregatedContexts.getAndSet(0), tags));\n }", "@SuppressWarnings(\"unchecked\")\n private void submitData() {\n final JsonObject data = getServerData();\n \n JsonArray pluginData = new JsonArray();\n // Search for all other bStats Metrics classes to get their plugin data\n for (Class<?> service : Server.getInstance().getServiceManager().getKnownService()) {\n try {\n service.getField(\"B_STATS_VERSION\"); // Our identifier :)\n \n List<? extends RegisteredServiceProvider<?>> providers = null;\n try {\n providers = Server.getInstance().getServiceManager().getRegistrations(service);\n } catch (Throwable t) { // no such method: ServiceManager.getRegistrations()\n try {\n Field handle = NKServiceManager.class.getDeclaredField(\"handle\");\n handle.setAccessible(true);\n providers = ((Map<Class<?>, List<RegisteredServiceProvider<?>>>) handle.get(Server.getInstance().getServiceManager())).get(service);\n } catch (NullPointerException | NoSuchFieldException | IllegalAccessException | IllegalArgumentException e) {\n if (logFailedRequests) {\n plugin.getLogger().error(\"Encountered unexpected exception \", e);\n }\n }\n }\n \n if (providers != null) {\n for (RegisteredServiceProvider<?> provider : providers) {\n try {\n Object plugin = provider.getService().getMethod(\"getPluginData\").invoke(provider.getProvider());\n if (plugin instanceof JsonObject) {\n pluginData.add((JsonElement) plugin);\n }\n } catch (NullPointerException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { }\n }\n }\n } catch (NoSuchFieldException ignored) { }\n }\n \n data.add(\"plugins\", pluginData);\n \n // Create a new thread for the connection to the bStats server\n new Thread(() -> {\n try {\n // Send the data\n sendData(plugin, data);\n } catch (Exception e) {\n // Something went wrong! :(\n if (logFailedRequests) {\n plugin.getLogger().warning(\"Could not submit plugin stats of \" + plugin.getName(), e);\n }\n }\n }).start();\n }", "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}", "private void showWeb() throws IOException{\n\n InputStream inputStream;\n BufferedReader bufferedReader;\n PrintWriter out;\n String request;\n String response;\n String[] requestParam;\n String[] requestParamButton;\n String path;\n String sensorDataIndex;\n String message = \"Don't have a Products\";\n String historyURL = \"/history\";\n String listURL = \"/list\";\n String invoiceURL = \"/invoice\";\n String testBadURL = \"/testError\";\n String buyForURL = \"/buyFor\";\n String pathForRefresh = \"\";\n String topic =\"\";\n //For test Status\n String httpStatus = \"\";\n\n try{\n inputStream = socket.getInputStream();\n bufferedReader = new BufferedReader(new InputStreamReader(inputStream));\n request = bufferedReader.readLine();\n if(!request.isEmpty()){\n System.out.println(request);\n requestParam = request.split(\" \");\n path = requestParam[1];\n System.out.println(path);\n if(!path.isEmpty()){\n requestParamButton = path.split(\":\");\n System.out.println(\"requestParamButton lenght is : \" + requestParamButton.length\n + \" last index have \" + requestParamButton[requestParamButton.length - 1]);\n sensorDataIndex = requestParamButton[requestParamButton.length - 1];\n }else{\n sensorDataIndex = \"0\";\n }\n //sensorDataIndex = \"0\";\n\n if(path.contains(buyForURL)){\n manuelOrder(sensorDataIndex);\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n }\n if(path.equals(invoiceURL)){\n message = makeOneStringInvoice();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"Invoise : \";\n pathForRefresh = invoiceURL;\n }\n if(path.equals(historyURL)){\n message = makeOneStringHistory();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"History of products : \";\n pathForRefresh = historyURL;\n }\n if(path.equals(listURL)){\n message = makeOneStringList();\n httpStatus = \"HTTP/1.1 200\";\n topic = \"List of products : \";\n pathForRefresh = listURL;\n /** compare Data from actualSensorData with response Data */\n //testShowList(message);\n }\n /** if path not equals /list or /history will be BAD REQUEST with status 400 */\n if(!path.equals(listURL) && !path.equals(historyURL) && !path.equals(invoiceURL) && !path.contains(buyForURL)){\n message = \"<h1 style='color:red'> BAD REQUEST, ALLOWED ONLY HTTP GET /list or /history REQUESTS </h1>\";\n httpStatus = \"HTTP/1.1 400\";\n topic = \"<h1 style='color:red'> ERROR </h1>\";\n pathForRefresh = testBadURL;\n }\n\n }\n\n /** Color test */\n //testColor(message,httpStatus);\n\n out = new PrintWriter(socket.getOutputStream());\n out.println(httpStatus);\n out.println(\"Content-type: text/html\");\n out.println(\"Server-name: myServer\");\n response = \"<html>\" + \"<head>\"\n + \"<meta http-equiv=\\\"refresh\\\" content=\\\"2\\\"; url=localhost:8282\" + pathForRefresh + \">\"\n + \"<meta charset='utf-8'>\" // Umlauts\n + \"<link rel=\\\"icon\\\" href=\\\"data:;base64,iVBORw0KGgo=\\\">\" // How to prevent favicon.ico requests?\n + \"<title>My Web Server</title></head>\"\n + \"<h1>Your request: \" + request + \"</h3>\"\n + \"<table width=\\\"200\\\">\"\n + \"<td><h3><a href=\\\"/list \\\">List</a></h3></td>\"\n + \"<td><h3><a href=\\\"/history \\\">History</a></h3></td>\"\n + \"<td><h3><a href=\\\"/testError \\\">TestError</a></h3></td>\"\n + \"<td><h3><a href=\\\"/invoice \\\">Invoice</a></h3></td>\"\n + \"<td><h3><a href=\\\"/buyFor \\\">BuyFor</a></h3></td>\"\n + \"</table>\"\n + \"<h1>\" + topic + \"</h1>\"\n + \"<table width=\\\"200\\\">\"\n + \"<h3>\" + message + \"</h3>\"\n + \"</table>\"\n + \"</html>\";\n out.println(\"Content-length: \" + response.length());\n out.println(\"\");\n out.println(response);\n out.flush();\n //out.close();\n //bufferedReader.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Failed respond to client request: \" + e.getMessage());\n }\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}", "@Override\n\tpublic SampleResult runTest(JavaSamplerContext arg0) {\n\t\thost=arg0.getParameter(\"host\");\n//\t\tSystem.out.println(\"host:\"+host);\n\t\tport=arg0.getParameter(\"port\");\n\t\tusername=arg0.getParameter(\"username\");\n\t\tpassword=arg0.getParameter(\"password\");\n\t\tphonehead=arg0.getParameter(\"phonehead\");\n\t\tpath=arg0.getParameter(\"path\");\n\t\tTemplateNo=arg0.getParameter(\"TemplateNo\");\n\t\tbatchname=arg0.getParameter(\"batchname\");\n\t\tbiztype=Integer.parseInt(arg0.getParameter(\"biztype\"));\n\t\tif (arg0.getParameter(\"distinctFlag\").toLowerCase().equals(\"true\")){\n\t\t\tdistinctFlag=true;\n\t\t}else{\n\t\t\tdistinctFlag=false;\n\t\t}\n\t\t\n\t\tSampleResult sr = new SampleResult();\n\t\tsr.setSampleLabel( \"Java请求发送sms\");\n\t\ttry {\n sr.sampleStart();// jmeter 开始统计响应时间标记\n DoSendSms_group test = new DoSendSms_group(host,port,username,password,phonehead,path,TemplateNo,batchname,biztype,distinctFlag);\n // 通过下面的操作就可以将被测方法的响应输出到Jmeter的察看结果树中的响应数据里面了。\n test.test();\n resultData = test.getResult();\n if (resultData != null && resultData.getStatus() == 200) {\n sr.setResponseData(\"响应结果:\\n\"+resultData.getResult(), null);\n sr.setResponseCode(resultData.getStatus()+\"\");\n sr.setDataType(SampleResult.TEXT);\n sr.setSuccessful(true);\n }else{\n \tsr.setResponseData(\"响应结果:\\n\"+resultData.getResult(), null);\n sr.setResponseCode(resultData.getStatus()+\"\");\n sr.setDataType(SampleResult.TEXT);\n \tsr.setSuccessful(false);\n }\n } catch (Throwable e) {\n \tsr.setResponseData(\"报错!报错信息如下:\\n\"+e.getMessage(), null);\n \tsr.setResponseCode(ResultState.SERVER_ERROR+\"\");\n sr.setSuccessful(false);\n e.printStackTrace();\n } finally {\n sr.sampleEnd();// jmeter 结束统计响应时间标记\n }\n return sr;\n\t}", "protected void sendDataToTraceFile(String data) {\n\t\thandler.postTraceData(data);\n\t}", "protected void send(String s) throws IOException {\n\t\t// Send string to browser.\n\t\t// Log.debug(\"Adapter: sending: \" + s);\n\t\tif (servletOut == null) {\n\t\t\tthrow new IOException(\"Client adapter was stopped\");\n\t\t}\n\n\t\tservletOut.print(s);\n\n\t\tservletOut.flush();\n\n\t\t// Note: this doesn't seem to have effect\n\t\t// in Tomcat 4/5 if the client already disconnected.\n\t\tservletRsp.flushBuffer();\n\n\t\tbytesSent += s.length();\n\t\tLog.debug(\"bytesSent= \" + bytesSent);\n\t\t// Log.debug(\"BCA sent event: \" + s);\n\t}", "public void sendRemainData();", "@Override\n public void transferred(long num) {\n publishProgress((int) ((num / (float) totalSize) * 100));\n }", "@Test\n\tpublic void storeLogDataTest() {\n\n\t\tStatisticsRequest request = new StatisticsRequest(\"testingid\", \"testing\", 200, 3);\n\t\twebTestClient.post().uri(\"/logginResponseTime\").contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON).body(Mono.just(request), StatisticsRequest.class).exchange()\n\t\t\t\t.expectStatus().isOk().expectBody(String.class).consumeWith(res -> {\n\t\t\t\t\tassertTrue(res.getResponseBody().equalsIgnoreCase(\"saved\"));\n\t\t\t\t});\n\n\t}", "public void setCollectData(int value) {\n JsoHelper.setAttribute(getJsObj(), \"collectData\", value);\n }", "@Override\n\tpublic void send(OutputStream stream) throws IOException {\n\t\tstream.write(this.data);\n\t}", "@Override\n\tpublic void sendData(int type, byte[] data) {\n\t\t\n\t}", "@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void dataSent(LLRPDataSentEvent event);", "@Override\n\tpublic void sendPacket() {\n\t\t\n\t\tAbstract_StepPage currentPage = (Abstract_StepPage) core.currentScreen;\n\t\t\n\t\tStringBuilder theURL = new StringBuilder();\n\t\t\n\t\ttheURL.append(core.modelCore.targetURL);\n\t\ttheURL.append(\"michael/updateevent.php?\");\n\t\ttheURL.append(\"page=\" + \"four\" +\"&\"); //page = \"three\"&\n\t\ttheURL.append(\"name=\" + core.modelCore.selectedEvent.eventName +\"&\");\n\t\ttheURL.append(\"answer=\" + yesBox.isChecked() +\"&\");\n\t\ttheURL.append(\"user=\" + core.modelCore.username);\n\t\t\n\t\tSystem.out.println( theURL.toString() );\n\t\t\n\t\tLogic_PHP.getResponseFromURL(core, theURL.toString());\n\t}", "public static void testIBMMQSendData(){\n\n MQParam param = new MQParam();\n param.setHost(\"10.86.92.194\");\n param.setPort(30099);\n param.setCcsid(1208);\n param.setChannel(\"SVRCONN_GW_OUT\");\n param.setQueueManager(\"ESB_OUT\");\n param.setQueueName(\"EIS.QUEUE.REQUEST.OUT.GCDCHZWMES\");\n param.setUserId(\"mqm\");\n param.setPassword(\"mqm\");\n new Thread(new IBMReceiverThread(param)).run();\n }", "private void timerEngine(){\n SensorController me = this;\n //generate new value or send existing to server\n if(isValueGeneratorRunning()){\n logger.trace(\"Generating new sensor value\");\n //create new values\n try{\n getModel().getValues().stream()\n .filter(Value::isGenerateValue) //if new value should be generated\n .forEach(v -> {\n Object next = v.nextValue();\n if (next != null) {\n Platform.runLater(() -> v.setValue(next));\n }\n }); //do it\n }catch (IllegalArgumentException e){\n adapterController.sendError(toString() + \" -> cannot generate new value!\",e,false);\n }\n logger.trace(\"Building sensor message\");\n //create XML message with new values\n XMLmessage = adapterController.getAdapter().getProtocol()\n .buildSensorMessage(adapterController.getAdapter().getProtocol().buildAdapterMessage(adapterController.getAdapter()), getModel());\n //change engine to send message mod\n setRunValueGenerator(false);\n }else if(getModel().getStatus()){\n //if sensor's message doesn't exist, error is showed\n if(XMLmessage == null){\n adapterController.sendError(toString() + \" doesn't have XML message to send\",null,false);\n return;\n }\n //if we have means to send message and adapter is registered, send message to adapter\n if(adapterController.getServerReceiver() != null || adapterController.getAdapter().getRegistered()){\n //full message contains information about adapter\n if(isFullMessage()){\n //used in \"Performance simulation\"\n adapterController.sendMessage(me.toString() + \" --> data sent\",XMLmessage,me, OutMessage.Type.SENSOR_MESSAGE);\n }else{\n //short message contains information only about sensor\n //used in \"Detailed simulation\"\n adapterController.sendMessage(\"Sensor \" + me.toString() + \" trying to send message.\");\n adapterController.sendMessage(\"Sensor \" + me.toString() + \" --> data sent\",XMLmessage,me, OutMessage.Type.SENSOR_MESSAGE);\n }\n //change engine to generate value mod\n setRunValueGenerator(true);\n }\n }\n }", "protected double getDataRate() {\n\t\treturn (double) getThroughput() / (double) getElapsedTime();\n\t}", "@Override\n\tpublic void WriteResponseTime() {\n\t\ttry (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(responseTimeFileStr, true))) {\n\t\t\tString responseStr = \"Using Buffered Stream with a Byte Size of \" + bufferSize + \"\\n\";\n\t\t\tresponseStr += \"Response Time: \" + elapsedTime / 1000000.0 + \" msec\\n\\n\";\n\t\t\tout.write(responseStr.getBytes());\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Override\n public void run()\n {\n List<Integer> sendedItemsIds = new ArrayList<>();\n\n final Collection<Map.Entry<Integer, ExerciseScore> > allExerciseItems = m_reportedScores.entrySet();\n try\n {\n for (Map.Entry<Integer, ExerciseScore> item : allExerciseItems)\n {\n final ExerciseScore exerciseScore = item.getValue();\n m_serverOperations.reportExerciseScore(exerciseScore.date, exerciseScore.exerciseName, exerciseScore.score);\n sendedItemsIds.add(item.getKey());\n }\n }\n catch (CommonException | NetworkException exp)\n {\n Log.w(LogTag, String.format(\"Failed to send cache item, exp:\\\"%s\\\"\", exp.getMessage()));\n if (exp instanceof CommonException)\n m_commonErrorCode = ((CommonException)exp).getResultCode();\n else\n m_networkErrorCode = ((NetworkException) exp).getResultCode();\n }\n\n m_exerciseScoreCache.removeCacheItems(sendedItemsIds);\n }", "@Override\n public Mono<Void> sendMeasurement(MeasurementEvent measurementEvent) {\n System.out.println(\"Measurement to send to NATS: \" + measurementEvent);\n return Mono.empty();\n }", "@Override\n public void onProgress(float percent, SpeedTestReport report) {\n System.out.println(\"[PROGRESS] progress : \" + percent + \"%\");\n System.out.println(\"[PROGRESS] rate in octet/s : \" + report.getTransferRateOctet());\n System.out.println(\"[PROGRESS] rate in bit/s : \" + report.getTransferRateBit());\n }", "private void data(Messenger replyTo, int encoderId, Bundle data) {\n\n // obtain new message\n Message message = obtainMessage(Geotracer.MESSAGE_TYPE_DATA, encoderId, 0);\n message.setData(data);\n\n // send response\n send(replyTo, message);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n /* TODO output your page here. You may use following sample code. */\n \n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet ViewStats</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet ViewStats at \" + request.getContextPath() + \"</h1>\");\n out.println(\"Number of active sessions : \" + SessionCounter.getSessionNum() );\n out.println(\"<p></p>\");\n out.println(\"Number of total daily sessions : \" + SessionCounter.getTotalSessionNum(7) );\n out.println(\"<p></p>\");\n \n final double[][] data = new double[][]{\n \n {SessionCounter.getTotalSessionNum(1),SessionCounter.getTotalSessionNum(2),SessionCounter.getTotalSessionNum(3),\n SessionCounter.getTotalSessionNum(4),SessionCounter.getTotalSessionNum(5),SessionCounter.getTotalSessionNum(6),\n SessionCounter.getTotalSessionNum(7),}\n \n };\n \n\n final CategoryDataset dataset = \n DatasetUtilities.createCategoryDataset(\n \"Web App \",\"\",data);\n\n JFreeChart chart = null;\n BarRenderer renderer = null;\n CategoryPlot plot = null;\n\n\n final CategoryAxis categoryAxis = new CategoryAxis(\"Day\");\n final ValueAxis valueAxis = new NumberAxis(\"Number of Sessions\");\n renderer = new BarRenderer();\n\n plot = new CategoryPlot(dataset, categoryAxis, valueAxis, \n renderer);\n plot.setOrientation(PlotOrientation.VERTICAL);\n chart = new JFreeChart(\"Sessions\", JFreeChart.DEFAULT_TITLE_FONT, \n plot, true);\n\n chart.setBackgroundPaint(new Color(249, 231, 236));\n\n Paint p1 = new GradientPaint(\n 0.0f, 0.0f, new Color(16, 89, 172), 0.0f, 0.0f, new Color\n (201, 201, 244));\n\n renderer.setSeriesPaint(1, p1);\n\n \n\n plot.setRenderer(renderer);\n\n try {\n final ChartRenderingInfo info = new ChartRenderingInfo\n (new StandardEntityCollection());\n final File file1 = new File(\"/usr/share/tomcat6/webapps/project4/barchart.png\");\n ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);\n } catch (Exception e) {\n out.println(e);\n }\n\n \n out.println(\"<IMG SRC=\\\"barchart.png\\\" WIDTH=\\\"600\\\" HEIGHT=\\\"400\\\" BORDER=\\\"0\\\" USEMAP=\\\"#chart\\\">\");\n out.println(\"</br><a href=\\\"http://83.212.96.35:8080/project4/index.jsp\\\">Back To Gallery</a></br>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally { \n out.close();\n }\n }", "void sendProgressMessage(int bytesWritten, int bytesTotal);", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "private void getData() {\n\n //Adding the method to the queue by calling the method getDataFromServer\n requestQueue.add(getDataFromServer(pos));\n\n }", "public void storeStats() throws Exception {\n logger.info(\"[WORKER-MONITOR] - Start store stats into file. TopologyId: \" + topologyId);\n\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT START------------------\");\n logger.debug(\"Current InterNode Traffic is: \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n logger.debug(\"This Topology current total load is: \" + DataManager.getInstance().getTotalLoad(topologyId));\n // 2018-07-23 add for simple logs\n /*\n if (taskMonitorList.size() != 0) {\n FileUtils.writeToFile(trafficFilename, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n }\n */\n FileUtils.writeToFile(Constants.TRAFFIC_DATA_FILE, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n\n // Output the threadToTaskMap\n logger.debug(\"Threads to Tasks association is: \");\n for (long threadId : threadToTaskMap.keySet()) {\n logger.debug(\" - \" + threadId + \": \" + threadToTaskMap.get(threadId));\n }\n\n logger.debug(\"Inter-Task Traffic Stats (tuples sent per time slot): \");\n for (TaskPair pair : trafficStats.keySet()) {\n logger.debug(\" - \" + pair.getSourceTaskId() + \" -> \" + pair.getDestinationTaskId() + \": \" + getTraffic(pair) + \" tuple/s [\" + Utils.collectionToString(trafficStats.get(pair)) + \"]\");\n // invoke DataManager function to store Traffic info. 2018-05-08\n DataManager.getInstance().storeTraffic(topologyId, pair.getSourceTaskId(), pair.getDestinationTaskId(), getTraffic(pair));\n }\n\n logger.debug(\"Load stats (CPU cycles consumed per time slot): \");\n long totalCPUCyclesPerSecond = 0;\n for (long threadId : loadStats.keySet()) {\n List<Long> threadLoadInfo = loadStats.get(threadId);\n totalCPUCyclesPerSecond += threadLoadInfo.get(threadLoadInfo.size() - 1) / timeWindowLength;\n logger.debug(\" - thread \" + threadId + \": \" + getLoad(threadId) + \" cycle/s [\" + Utils.collectionToString(threadLoadInfo) + \"]\");\n\n Executor executor = threadToTaskMap.get(threadId);\n // invoke DataMananger to store load info. 2018-05-08\n DataManager.getInstance().storeCpuLoad(topologyId, executor.getBeginTask(), executor.getEndTask(), getLoad(threadId));\n\n }\n long totalCPUCyclesAvailable = CPUInfo.getInstance().getTotalSpeed();\n double usage = ((double) totalCPUCyclesPerSecond / totalCPUCyclesAvailable) * 100; // int -> double\n logger.debug(\"Total CPU cycles consumed per second: \" + totalCPUCyclesPerSecond + \", Total available: \" + totalCPUCyclesAvailable + \", Usage: \" + usage + \"%\");\n\n // add from yitian 2018-04-29\n logger.debug(\"Output the TaskMonitorList: \");\n for (TaskMonitor monitor : taskMonitorList) {\n logger.debug(\"- ProcessId: \" + monitor.getProcessId() + \" -> threadId: \" + monitor.getThreadId() + \" -> taskId: \" + monitor.getTaskId());\n }\n\n // 2018-09-27 add load usage of each host(worker node)\n /*\n Map<String, String> hostCpuUsageList = DataManager.getInstance().getCpuUsageOfHost();\n for (String hostname : hostCpuUsageList.keySet()) {\n FileUtils.writeToFile(cpuUsageFilename, hostname + \" : \" + hostCpuUsageList.get(hostname));\n }\n */\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT END------------------\");\n }", "@Test\n\tpublic void getStaticsDataTest() {\n\t\tthis.repo.save(new StatisticsRequest(\"1233333\", \"testing\", Integer.valueOf(200), Integer.valueOf(2000)));\n\n\t\twebTestClient.get().uri(\"/getLoggedData\").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()\n\t\t\t\t.expectBody(StatisticsResponse.class)\n\t\t\t\t.consumeWith(res -> assertTrue(res.getResponseBody().getTotalRequest() > 0.0));\n\n\t}", "private synchronized void sendGameData(PrintWriter stream) {\r\n\t\tstream.println(\"1\");\r\n\t\tstream.println(Integer.toString(XSIZ));\r\n\t\tstream.println(Integer.toString(YSIZ));\r\n\t\tstream.println(Integer.toString(ZOMBIE_BORDER));\r\n\t\tstream.println(Integer.toString(MAX_NR_ZOMBIES));\r\n\t\tstream.println(Integer.toString(SQ_SIZE));\r\n\t\tif(dead){\r\n\t\t\tstream.println(\"true\");\r\n\t\t}else{\r\n\t\t\tstream.println(\"false\");\r\n\t\t}\r\n\t\t\r\n\t\t//planten doorsturen\r\n\t\tsendPlants(stream);\r\n\t\t//zombies doorsturen\r\n\t\tsendZombies(stream);\r\n\r\n\t\tstream.flush();\r\n\t}", "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}", "@Override\r\n\t\tpublic void writeAttribute(Element melelement,Measurement m) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void writeAttribute(Element melelement,Measurement m) {\n\t\t\t\r\n\t\t}", "public void sendHeartbeat();" ]
[ "0.6872505", "0.60332084", "0.5957095", "0.5716558", "0.5632867", "0.55237496", "0.54645866", "0.5452735", "0.5396394", "0.538785", "0.52794456", "0.5272104", "0.52719", "0.5172806", "0.5160918", "0.51503193", "0.5137168", "0.5134961", "0.51318735", "0.5099871", "0.50985867", "0.50656986", "0.5026335", "0.5015128", "0.5001167", "0.49998587", "0.49873912", "0.49814382", "0.49602753", "0.49559617", "0.49519473", "0.49335623", "0.49045625", "0.48950055", "0.4892491", "0.48884228", "0.48857144", "0.48788086", "0.487575", "0.48754105", "0.4855815", "0.48483646", "0.48415542", "0.48022342", "0.48015064", "0.4797094", "0.4796076", "0.47890708", "0.47858956", "0.4765658", "0.47636476", "0.47475198", "0.47432294", "0.47429627", "0.47397515", "0.47340035", "0.4723461", "0.4719539", "0.47179165", "0.46995088", "0.46965253", "0.46936128", "0.46934396", "0.46884143", "0.46859244", "0.46814948", "0.46814606", "0.46737853", "0.46462", "0.46301487", "0.4629953", "0.46293157", "0.46273685", "0.46250278", "0.46161118", "0.46097547", "0.46076134", "0.46070373", "0.46065423", "0.46036997", "0.4598753", "0.45987403", "0.45983794", "0.4591077", "0.45898852", "0.4586594", "0.45828643", "0.4580425", "0.4579562", "0.45745242", "0.456271", "0.4552091", "0.45517093", "0.4543042", "0.45401666", "0.4536461", "0.45352066", "0.45320144", "0.45320144", "0.45307687" ]
0.6975091
0
Create and show a simple notification containing the received ADM message.
private void showNotification(Integer pushId, String notificationTitle, String pushTitle, Float longitude, Float latitude, int radius, int[] kitchenTypeIds) { // Create pending intent (which is used, when user opens push-notification), that calls MainActivity. Intent intent = new Intent(this, MainActivity.class); intent.putExtra("intent_source", 1); intent.putExtra("title", pushTitle); intent.putExtra("longitude", longitude); intent.putExtra("latitude", latitude); intent.putExtra("radius", radius); intent.putExtra("kitchenTypeIds", kitchenTypeIds); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, pushId, intent, PendingIntent.FLAG_ONE_SHOT); // Display Push-Notification in Android Status-Bar. Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_find_lunch_white) .setContentTitle(notificationTitle) .setContentText(pushTitle) .setAutoCancel(true) .setSound(defaultSoundUri) .setContentIntent(pendingIntent); NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.notify(pushId, notificationBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void AlarmByNotification(String message) {\n\t\tToast.makeText(this, message, Toast.LENGTH_LONG).show();\r\n\t}", "public void showNotification(String msg) {\n Notification.show(msg);\n }", "private void showNotification() {\n }", "int displayNotification(Message message);", "private void showNotification() {\n\t\t\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0, \n\t\t\t\t\t\tnew Intent(this, MainActivity.class), 0);\n\t\t\t\t\n\t\t// Use NotificationCompat.Builder to build the notification, display using mNM\n\t\tNotificationCompat.Builder mNotifyBuilder= new NotificationCompat.Builder(this)\n\t\t\t.setContentTitle(getText(R.string.notificationTitle))\n\t\t\t.setContentText(getText(R.string.notificationText))\n\t\t\t.setSmallIcon(R.drawable.ic_launcher)\n\t\t\t.setContentIntent(contentIntent);\n\t\t\n\t\tmNM.notify(notifyID, mNotifyBuilder.build());\n\t}", "private void showNotification() {\n\n }", "void simpleNotify(SimpleAlarmMessage message);", "private void showNotification() {\n CharSequence text = \"Running\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n //.setSmallIcon(R.drawable.stat_sample) // the status icon\n .setTicker(text) // the status text\n //.setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"PodcastFTPService\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n mNM.notify(0, notification);\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = getText(R.string.local_service_started);\n\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, text,\n System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, ServiceActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, getText(R.string.local_service_label),\n text, contentIntent);\n\n // Send the notification.\n mNM.notify(NOTIFICATION, notification);\n }", "@Override\n\tpublic void ActOnNotification(String message) {\n\t \tSystem.out.println(\"Sending Event\");\n\t}", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.service_icon,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tnew Intent(this, stopServiceJ.class), 0);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "private void showNotification(String message) {\n // Prepare intent which is triggered if the\n // notification is selected\n Intent intent = new Intent(this, LoginActivity.class);\n int mNotificationId = (int) System.currentTimeMillis();\n PendingIntent pIntent =\n PendingIntent.getActivity(this,\n mNotificationId,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_logo)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(message)\n .setContentIntent(pIntent)\n .setAutoCancel(true);\n\n NotificationManager mNotifyMgr = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNotifyMgr.notify(mNotificationId, mBuilder.build());\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void showNotification() {\n\t\t// What happens when the notification item is clicked\n\t\tIntent contentIntent = new Intent(this, MainActivity.class);\n\n\t\tPendingIntent pending = PendingIntent.getActivity(\n\t\t\t\tgetApplicationContext(), 0, contentIntent,\n\t\t\t\tandroid.content.Intent.FLAG_ACTIVITY_NEW_TASK);\n\n\t\tNotification nfc = new Notification(R.drawable.ic_launcher, null,\n\t\t\t\tSystem.currentTimeMillis());\n\t\tnfc.flags |= Notification.FLAG_ONGOING_EVENT;\n\n\t\tString contentText = getString(R.string.service_label);\n\n\t\tnfc.setLatestEventInfo(getApplicationContext(), contentText,\n\t\t\t\tcontentText, pending);\n\n\t\tmNM.notify(NOTIFICATION, nfc);\n\t\tSession.setNotificationVisible(true);\n\t}", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void sendAlert(String notificationInfo, ILabMember personInCharge) {\n }", "public void displayToastMessage(String msg) {\n\t\tToast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n\t\ttoast.setGravity(Gravity.CENTER, 0, 0);\n\t\ttoast.show();\n\t}", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void run() {\n String lg_ti = \"Test.\";\n String des_ti = \"The license valid until \";\n String ban_ti = \"Warning!\";\n getNotificationData();\n //notificationShow(des_ti,lg_ti,ban_ti);\n }", "private void sendNotification() {\n }", "public static void displayMessage(Context context, String message) {\r\n Intent intent = new Intent(AppConstants.DISPLAY_MESSAGE_ACTION);\r\n intent.putExtra(AppConstants.EXTRA_NOTIFICATION_MESSAGE, message);\r\n context.sendBroadcast(intent);\r\n }", "public void createNotification(Context context, String msg, String msgText, String msgAlert, int notifID) {\n\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent repeating_intent = new Intent(context, MainMenu.class);\n repeating_intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, notifID, repeating_intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentIntent(pendingIntent)\n .setSmallIcon(R.drawable.ic_fridge_empty)\n .setContentTitle(msg)\n .setContentText(msgText)\n .setTicker(msgAlert)\n .setColor(0xFFC107) // colour of the circle backgroud\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000}) // Vibration\n .setLights(0xFFFF00, 100, 50) // LED\n .setAutoCancel(true);\n\n notificationManager.notify(notifID, builder.build());\n }", "private void showNotification(final CharSequence text) {\n if (DEBUG) {\n Log.v(TAG, \"showNotification:\" + text);\n }\n // Set the info for the views that show in the notification panel.\n final Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.mipmap.ic_launcher) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(getText(R.string.app_name)) // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(createPendingIntent()) // The intent to send when the entry is clicked\n .build();\n\n startForeground(NOTIFICATION, notification);\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n if (remoteMessage.getNotification() != null) {\n showNotification(remoteMessage); // Create a notification!\n }\n\n if (remoteMessage.getData() != null) {\n showToastMessage(remoteMessage.getData().get(\"title\")); // Show a toast!\n }\n }", "private void showNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_running))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n }", "private void showNotification() throws NullPointerException\n\t{\n\t\tint status;\n//\t\tstatus = mqttClient != null ? R.string.connected_to_server\n//\t\t\t\t: R.string.cannot_connect_to_server;\n//\t\tPendingIntent contentIntent = PendingIntent.getActivity( this, 0,\n//\t\t\t\tnew Intent( this, MainActivity.class ), 0 );\n//\t\tnotification = new Notification.Builder( this )\n//\t\t\t\t.setContentTitle( this.getString( R.string.service_label ) )\n//\t\t\t\t.setContentText( getResources().getString( status ) )\n//\t\t\t\t.setSmallIcon( Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP\n//\t\t\t\t\t\t? R.mipmap.pristine_zen_icon_silhouette : R.mipmap.pristine_zen_icon )\n//\t\t\t\t.setContentIntent( contentIntent )\n//\t\t\t\t.setAutoCancel( false )\n//\t\t\t\t.setOngoing( true )\n//\t\t\t\t.build();\n\t\tmNotificationManager =\n\t\t\t\t(NotificationManager) getApplicationContext().getSystemService( NOTIFICATION_SERVICE );\n\t\t//notification.flags |= Notification.FLAG_ONGOING_EVENT;\n\t\t//notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n\t\tmNotificationManager.notify( 123321, notification );\n\t}", "public void showMessage(String message);", "private void showNotification() {\n\n Intent intent = new Intent(this, DashboardActivity.class);\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(DashboardActivity.class);\n stackBuilder.addNextIntent(intent);\n\n final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);\n\n builder.setSmallIcon(R.drawable.ic_gps);\n builder.setContentText(getText(R.string.local_service_started));\n builder.setContentTitle(getText(R.string.local_service_label));\n builder.setOngoing(true);\n builder.setContentIntent(stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT));\n\n final Notification notification = builder.build();\n\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "public abstract void onCreate(MessageCreateEvent e, List<String> args);", "public void showMessage(String message){\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "public static void debugNotification(String title, String message, Context ctx){\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "public void displayMessage(JSONArray data, final CallbackContext callbackContext) throws JSONException {\n\n String deviceName = data.getString(0);\n String deviceMacAddress = data.getString(1);\n String messageToDisplay = data.getString(2);\n\n PinpadObject pinpad = new PinpadObject(deviceName, deviceMacAddress, false);\n\n DisplayMessageProvider displayMessageProvider = new DisplayMessageProvider(StoneSDK.this.cordova.getActivity(), messageToDisplay, pinpad);\n\n displayMessageProvider.setDialogMessage(\"Ativando o aplicativo...\");\n displayMessageProvider.setDialogTitle(\"Aguarde\");\n\n displayMessageProvider.setWorkInBackground(false); // informa se este provider ira rodar em background ou nao\n displayMessageProvider.setConnectionCallback(new StoneCallbackInterface() {\n\n public void onSuccess() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Msg enviada com sucesso\", Toast.LENGTH_SHORT).show();\n callbackContext.success(\"Ativado com sucesso\");\n }\n\n public void onError() {\n Toast.makeText(StoneSDK.this.cordova.getActivity(), \"Erro no envio da mensagem\", Toast.LENGTH_SHORT).show();\n callbackContext.error(displayMessageProvider.getListOfErrors().toString());\n }\n\n });\n\n displayMessageProvider.execute();\n\n }", "public void newADMsg(OL_Message msg) {\n socket.appmsgArrived(msg, socket.callback);\n setADMsg(msg);\n myState = HavePayload;\n messageStore.setTimer(this, DELETE_TIMER_INDEX, delete);\n }", "private void sendNotification(PanicIncidentDTO simpleMessage) {\n// Intent intent = new Intent(this, SimpleMessagingActivity.class);\n// intent.putExtra(\"simpleMessage\",simpleMessage);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this,\n// LOCATION_REQUEST_CODE, intent,\n// PendingIntent.FLAG_ONE_SHOT);\n\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_favorite)\n .setContentTitle(\"Message received\")\n .setContentText(simpleMessage.getPanicType().getName())\n .setAutoCancel(true)\n .setSound(defaultSoundUri);\n// .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "private void sendNotification(String msg) {\n mNotificationManager = (NotificationManager)\n ctx.getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(ctx, 0,\n new Intent(ctx, LLActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(ctx)\n .setSmallIcon(R.drawable.ic_stat_gcm)\n .setContentTitle(\"GCM Notification\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\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 showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "public void displayMessage(String message){\n //Display a toast with the message we recieved\n displayMessage(message,Toast.LENGTH_LONG);\n }", "private void notifyUser(Context context, String message) {\n\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n Intent intent = new Intent(context, MovieActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationManager manager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n android.support.v4.app.NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentTitle(\"device is now \" + message + \".\")\n .setOngoing(true)\n .setVibrate(new long[]{0, 500, 500, 500, 500, 500, 500})\n .setSound(soundUri)\n .setContentIntent(pendingIntent)\n .setSmallIcon(android.R.drawable.sym_def_app_icon)\n .setAutoCancel(true);\n\n manager.notify(1001, builder.build());\n\n }", "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}", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "private void displayNotificationMessage(String message)\n\t{\n\n\t\tString CHANNEL_ID = \"my_channel_01\";\n\t\tint NOTIFICATION_ID = 0;\n\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n\t\t\tCharSequence name = \"my_channel\";\n\t\t\tString Description = \"This is my channel\";\n\t\t\tint importance = NotificationManager.IMPORTANCE_HIGH;\n\t\t\tNotificationChannel mChannel = new NotificationChannel(CHANNEL_ID, name, importance);\n\t\t\tmChannel.setDescription(Description);\n\t\t\tmChannel.enableLights(true);\n\t\t\tmChannel.setLightColor(Color.RED);\n\t\t\tmChannel.enableVibration(true);\n\t\t\tmChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});\n\t\t\tmChannel.setShowBadge(false);\n\t\t\tnotificationManager.createNotificationChannel(mChannel);\n\t\t}\n\n\t\tNotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)\n\t\t\t\t.setSmallIcon(R.drawable.image2)\n\t\t\t\t.setContentTitle(\"Ting skjer!!!\")\n\t\t\t\t.setContentText(message);\n\n\t\tIntent resultIntent = new Intent(this, MyActivity.class);\n\t\tTaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n\t\t//stackBuilder.addParentStack(MainActivity.class);\n\t\tstackBuilder.addNextIntent(resultIntent);\n\t\tPendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\t\tbuilder.setContentIntent(resultPendingIntent);\n\n\t\tnotificationManager.notify(NOTIFICATION_ID, builder.build());\n\t}", "void templateNotify(TeampleAlarmMessage message);", "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 }", "private void sendNotificationSample() {\n Intent notificationIntent = new Intent(GCMIntentService.this, AlertActivity.class);\n\n // Get a PendingIntent containing the entire back stack.\n int i = new Random().nextInt(100);\n PendingIntent notificationPendingIntent = PendingIntent.getActivity(GCMIntentService.this, i, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get a notification builder that's compatible with platform versions >= 4\n NotificationCompat.Builder builder = new NotificationCompat.Builder(GCMIntentService.this);\n\n // Define the notification settings.\n builder.setSmallIcon(R.drawable.icon_v2)\n // In a real app, you may want to use a library like Volley\n // to decode the Bitmap.\n //.setLargeIcon(BitmapFactory.decodeResource(ctx.getResources(), R.drawable.ic_launcher)).\n .setContentTitle(\"Shang\").setContentText(i + \". This is test mesage from notification\").setContentIntent(notificationPendingIntent);\n\n // Dismiss notification once the user touches it.\n builder.setAutoCancel(true);\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n builder.setSound(alarmSound);\n\n builder.setVibrate(new long[]{0, 2000});\n\n builder.setContentIntent(notificationPendingIntent);\n\n // Get an instance of the Notification manager\n NotificationManager mNotificationManager = (NotificationManager) GCMIntentService.this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n // Issue the notification\n mNotificationManager.notify(i, builder.build());\n }", "public void showNotification(String title,\n String message) {\n Intent intent = new Intent(this, MainActivity.class);\n String channel_id = getString(R.string.channel_id);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent\n = PendingIntent.getActivity(\n this, 0, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n NotificationCompat.Builder builder\n = new NotificationCompat\n .Builder(getApplicationContext(),\n channel_id)\n .setSmallIcon(R.drawable.ic_launcher_foreground)\n .setAutoCancel(true)\n .setVibrate(new long[]{1000, 1000, 1000,\n 1000, 1000})\n .setOnlyAlertOnce(true)\n .setContentIntent(pendingIntent);\n\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.JELLY_BEAN) {\n builder = builder.setContent(\n getCustomDesign(title, message));\n }\n else {\n builder = builder.setContentTitle(title)\n .setContentText(message)\n .setSmallIcon(R.drawable.ic_launcher_foreground);\n }\n\n NotificationManager notificationManager\n = (NotificationManager) getSystemService(\n Context.NOTIFICATION_SERVICE);\n if (Build.VERSION.SDK_INT\n >= Build.VERSION_CODES.O) {\n NotificationChannel notificationChannel\n = new NotificationChannel(\n channel_id, getString(R.string.channel_name),\n NotificationManager.IMPORTANCE_HIGH);\n notificationManager.createNotificationChannel(\n notificationChannel);\n }\n\n notificationManager.notify(0, builder.build());\n }", "private void sendNotification(String message) {\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,\n PendingIntent.FLAG_ONE_SHOT);\n\n Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_check_circle_black_24dp)\n .setContentTitle(\"Welcome Aboard\")\n .setContentText(message)\n .setAutoCancel(true)\n .setSound(defaultSoundUri)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());\n }", "public void show(String message, int duration, int mcolor, int mtextsize) {\n\t\ttry {\n\n\t\t\tif (null == mNotificationDialog) {\n\t\t\t\tmNotificationDialog = (View) inflateManager.inflate(\n\t\t\t\t\t\tR.layout.unipointnotificationtoast, null);\n\t\t\t\t// Set the window params and set it to TYPE_TOAST .\n\t\t\t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams(\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\tLayoutParams.WRAP_CONTENT,\n\t\t\t\t\t\tWindowManager.LayoutParams.TYPE_TOAST,\n\t\t\t\t\t\tWindowManager.LayoutParams.FLAG_NOT_TOUCHABLE\n\t\t\t\t\t\t\t\t| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,\n\t\t\t\t\t\tPixelFormat.OPAQUE);\n\n\t\t\t\tlp.gravity = Gravity.BOTTOM;\n\t\t\t\t// lp.x = 0;\n\t\t\t\t// lp.y = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tmWindowManager.addView(mNotificationDialog, lp);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tif (Unipoint_ServiceActivity.bDEBUG)\n\t\t\t\t\t\tLog.v(TAG,\"Add View got exception, may already added \");\n\t\t\t\t}\n\n\t\t\t\tmNotificationDialog.setVisibility(View.INVISIBLE);\n\n\t\t\t\t((LinearLayout) mNotificationDialog).setGravity(Gravity.TOP);\n\n\t\t\t}\n\n\t\t\tmNotificationDialog.setVisibility(View.INVISIBLE);\n\n\t\t\tif (!mShowing) {\n\t\t\t\tmShowing = true;\n\t\t\t}\n\t\t\tmNotificationDialog.setVisibility(View.VISIBLE);\n\n\t\t\t// It is shown already\n\t\t\tTextView descriptions = (TextView) mNotificationDialog\n\t\t\t\t\t.findViewById(R.id.notificationdescription);\n\t\t\tdescriptions.setText(message);\n\t\t\tdescriptions.setTextColor(mcolor);\n\t\t\tdescriptions.setTextSize(mtextsize);\n\n\t\t\tif (Unipoint_ServiceActivity.bDEBUG)\n\t\t\t\tLog.v(TAG, \"Start to Show the dialog, context :\" + message\n\t\t\t\t\t\t+ \" textsize : \" + mtextsize + \" Color :\" + mcolor);\n\n\t\t\tmUIthreadHandler.removeCallbacks(mRemoveWindowRunnable);\n\n\t\t\tboolean ret = mUIthreadHandler.postDelayed(mRemoveWindowRunnable,\n\t\t\t\t\tduration);\n\t\t\tif (ret) {\n\t\t\t\tif (Unipoint_ServiceActivity.bDEBUG)\n\t\t\t\t\tLog.v(TAG,\n\t\t\t\t\t\t\t\"Add delayed callbakc, duration Successfully\"\n\t\t\t\t\t\t\t\t\t+ duration);\n\n\t\t\t} else {\n\t\t\t\tif (Unipoint_ServiceActivity.bDEBUG)\n\t\t\t\t\tLog.v(TAG, \"Add delayed callbakc, duration Failed\"\n\t\t\t\t\t\t\t+ duration);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void showMessage(@NonNull BaseMessage message);", "private void displayToast(String message) {\n\n //get the LayoutInflater and inflate the custom_toast layout\n LayoutInflater view = getLayoutInflater();\n View layout = view.inflate(R.layout.toast, null);\n\n //get the TextView from the custom_toast layout\n TextView text = layout.findViewById(R.id.txtMessage);\n text.setText(message);\n\n //create the toast object, set display duration,\n //set the view as layout that's inflated above and then call show()\n Toast toast = new Toast(getApplicationContext());\n toast.setDuration(Toast.LENGTH_LONG);\n toast.setView(layout);\n toast.show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "protected void confirmMessage(EventManagerInterface ei, int evtId, String m) {\n // Here we create the event.\n Event evt = new Event(evtId, m);\n\t// Here we send the event to the event manager.\n try {\n ei.sendEvent(evt);\n } // try\n catch (Exception e) {\n System.out.println(\"Error Confirming Message:: \" + e);\n } // catch\n }", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage2) {\n Log.i(TAG, \"알림 메시지\" + remoteMessage2);\n\n remoteMessage = remoteMessage2;\n if(remoteMessage.getData().get(\"title\").equals(\"NEW!\")){\n sendNotificationNewDevice(remoteMessage.getData().get(\"body\"));\n }\n //String now = dateFormat.format (System.currentTimeMillis());\n else {\n sendNotificationDangerAlert();\n }\n }", "private void sendNotify(JSONObject notification, String staffID) {\r\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(FCM_API, notification,\r\n new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Toast.makeText(BookingListDetails.this, \"\"+ staffID + \" has been Notified!\", Toast.LENGTH_SHORT).show();\r\n Log.i(TAG, \"onResponse: \" + response);\r\n startActivity(new Intent(getApplicationContext(), AdminBookingList.class));\r\n finish();\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Toast.makeText(BookingListDetails.this, \"Request error\", Toast.LENGTH_LONG).show();\r\n Log.i(TAG, \"onErrorResponse: Didn't work\");\r\n }\r\n }) {\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"Authorization\", serverKey);\r\n params.put(\"Content-Type\", contentType);\r\n return params;\r\n }\r\n };\r\n MySingleton.getInstance(getApplicationContext()).addToRequestQueue(jsonObjectRequest);\r\n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void sendNotification(String msg) {\n mNotificationManager = (NotificationManager) getApplicationContext()\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class),\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\n this).setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"GCM Notification\")\n .setStyle(new NotificationCompat.BigTextStyle().bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n\n }", "private void showArrivalNotification(String body) {\n\n PendingIntent contentIntent = PendingIntent.getActivity(getBaseContext()\n , 0, new Intent(), PendingIntent.FLAG_ONE_SHOT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getBaseContext());\n\n builder.setAutoCancel(true).setDefaults(android.app.Notification.DEFAULT_LIGHTS| android.app.Notification.DEFAULT_SOUND)\n .setWhen(System.currentTimeMillis()).setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"Arrival\").setContentText(body)\n .setContentIntent(contentIntent);\n NotificationManager manager = (NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);\n manager.notify(1, builder.build());\n }", "public void displayMessage(String message) {\n Toast.makeText(_context, message, Toast.LENGTH_SHORT).show();\n }", "public boolean handleAppboyAdmMessage(Context context, Intent intent) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(\"notification\");\n if (\"deleted_messages\".equals(intent.getStringExtra(\"message_type\"))) {\n int intExtra = intent.getIntExtra(ADM_NUMBER_OF_MESSAGES_DELETED_KEY, -1);\n if (intExtra == -1) {\n String str = TAG;\n AppboyLogger.e(str, \"Unable to parse ADM message. Intent: \" + intent.toString());\n } else {\n String str2 = TAG;\n AppboyLogger.i(str2, \"ADM deleted \" + intExtra + \" messages. Fetch them from Appboy.\");\n }\n return false;\n }\n Bundle extras = intent.getExtras();\n String str3 = TAG;\n AppboyLogger.d(str3, \"Push message payload received: \" + extras);\n if (!extras.containsKey(Constants.APPBOY_PUSH_RECEIVED_TIMESTAMP_MILLIS)) {\n extras.putLong(Constants.APPBOY_PUSH_RECEIVED_TIMESTAMP_MILLIS, System.currentTimeMillis());\n }\n AppboyNotificationUtils.logPushDeliveryEvent(context, extras);\n Bundle appboyExtrasWithoutPreprocessing = AppboyNotificationUtils.getAppboyExtrasWithoutPreprocessing(extras);\n extras.putBundle(Constants.APPBOY_PUSH_EXTRAS_KEY, appboyExtrasWithoutPreprocessing);\n if (AppboyNotificationUtils.isNotificationMessage(intent)) {\n int notificationId = AppboyNotificationUtils.getNotificationId(extras);\n extras.putInt(Constants.APPBOY_PUSH_NOTIFICATION_ID, notificationId);\n Notification createNotification = AppboyNotificationUtils.getActiveNotificationFactory().createNotification(new AppboyConfigurationProvider(context), context, extras, appboyExtrasWithoutPreprocessing);\n if (createNotification == null) {\n AppboyLogger.d(TAG, \"Notification created by notification factory was null. Not displaying notification.\");\n return false;\n }\n notificationManager.notify(Constants.APPBOY_PUSH_NOTIFICATION_TAG, notificationId, createNotification);\n AppboyNotificationUtils.sendPushMessageReceivedBroadcast(context, extras);\n AppboyNotificationUtils.wakeScreenIfHasPermission(context, extras);\n if (!extras.containsKey(Constants.APPBOY_PUSH_NOTIFICATION_DURATION_KEY)) {\n return true;\n }\n AppboyNotificationUtils.setNotificationDurationAlarm(context, getClass(), notificationId, Integer.parseInt(extras.getString(Constants.APPBOY_PUSH_NOTIFICATION_DURATION_KEY)));\n return true;\n }\n AppboyNotificationUtils.sendPushMessageReceivedBroadcast(context, extras);\n AppboyNotificationUtils.requestGeofenceRefreshIfAppropriate(context, extras);\n return false;\n }", "public void present(Tag tag) {\n\n Log.i(TAG, \"dispatching notification\");\n String message = tag.userId + \": \" + tag.text;\n Intent intent = new Intent(mContext, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, 0);\n Notification notification = new NotificationCompat.Builder(mContext).\n setSmallIcon(R.drawable.ic_launcher).\n setContentTitle(message).\n setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)).\n setContentText(\"PopHello\").\n setAutoCancel(true).\n setContentIntent(pendingIntent).\n setTicker(message).\n build();\n\n mNotificationManager.cancelAll();\n mNotificationManager.notify(tag.id, NOTIFICATION_ID, notification);\n }", "private void sendNotification(final String msg) {\n mNotificationManager = (NotificationManager)\n GcmIntentService.this.getSystemService(Context.NOTIFICATION_SERVICE);\n PendingIntent contentIntent = PendingIntent.getActivity(GcmIntentService.this, 0,\n new Intent(GcmIntentService.this, MainActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(GcmIntentService.this)\n .setSmallIcon(R.drawable.pplogo)\n .setAutoCancel(true)\n .setContentTitle(\"PawPads\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "public void displayInfo(String message){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "private void showSimpleNotification() {\n Notification notification = new NotificationCompat.Builder(getActivity())\n //Title of the notification\n .setContentTitle(getString(R.string.nf_simple_title))\n //Content of the notification once opened\n .setContentText(getString(R.string.nf_simple_message))\n //This bit will show up in the notification area in devices that support that\n .setTicker(getString(R.string.nf_simple_ticker))\n //Icon that shows up in the notification area\n .setSmallIcon(R.drawable.ic_notify)\n //Icon that shows up in the drawer\n .setLargeIcon(BitmapFactory.decodeResource(getActivity().getResources(), R.drawable.ic_launcher))\n //Set the intent\n .setContentIntent(pendingIntentForNotification())\n //Build the notification with all the stuff you've just set.\n .build();\n\n //Add the auto-cancel flag to make it dismiss when clicked on\n //This is a bitmask value so you have to pipe-equals it.\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n\n //Grab the NotificationManager and post the notification\n NotificationManager notificationManager = (NotificationManager)\n getActivity().getSystemService(Context.NOTIFICATION_SERVICE);\n\n //Set a tag so that the same notification doesn't get reposted over and over again and\n //you can grab it again later if you need to.\n notificationManager.notify(TAG_SIMPLE_NOTIFICATION, notification);\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "public void message(String message){\n Toast.makeText(getContext(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void handleMessage(Message m)\n {\n String content = m.getContent();\n if (content.isEmpty())\n {\n content = \"N/A\";\n }\n\n JOptionPane.showMessageDialog(null, \"From: \" + m.getFrom() + \"\\n\"\n + \"To: \" + m.getTo() + \"\\n\"\n + \"Content: \" + content + \"\\n\"\n + \"Type: \" + m.getType().toString(),\n \"Message Notification\",\n JOptionPane.INFORMATION_MESSAGE);\n }", "public void notifyAd(Topic topic) throws RemoteException {\r\n System.out.println(\"Topic Advertisement Received\");\r\n System.out.println(\"These are the Details: \");\r\n System.out.println(topic);\r\n receivedTopics.add(topic);\r\n }", "public void onEventMainThread(MessageEvent event){\n Toast.makeText(this, event.message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n\n if (remoteMessage.getData().size() > 0) {\n Log.d(\"Remote message\", String.valueOf(remoteMessage.getData()));\n }\n String title = Objects.requireNonNull(remoteMessage.getNotification()).getTitle();\n\n Intent intent = new Intent(this, MainActivity.class);\n PendingIntent pIntent = PendingIntent.getActivity(this, (int) System.currentTimeMillis(), intent, 0);\n\n Notification n = new Notification.Builder(this)\n .setContentTitle(title)\n .setContentIntent(pIntent)\n .setSmallIcon(R.mipmap.ic_launcher_round)\n .build();\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n assert notificationManager != null;\n notificationManager.notify(0, n);\n }", "public void messageArrived(StatusMessage statusMessage);", "private void sendNotification(String msg) {\n\n mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);\n\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,new Intent(this, ServiceListActivity.class), 0);\n\n NotificationCompat.Builder mBuilder =new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"Ruta Plus\")\n .setStyle(new NotificationCompat.BigTextStyle()\n .bigText(msg))\n .setContentText(msg);\n\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());\n }", "@Override\n public void showMessage(String message) {\n getRootActivity().showMessage(message);\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public InfoMessage createInfoMessage();", "private void generateNotification(Context context, String m) {\n message = m;\n handler.post(new Runnable() {\n public void run() {\n Context context = GCMIntentService.this;\n int icon = getResources().getIdentifier(\"ic_launcher\", \"drawable\", context.getPackageName());//R.drawable.ic_launcher;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification notification = new Notification(icon, message, when);\n \n Intent notificationIntent = new Intent(GCMIntentService.this, UnityPlayerActivity.class);\n // set intent so it does not start a new activity\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |\n Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent intent =\n PendingIntent.getActivity(context, 0, notificationIntent, 0);\n notification.setLatestEventInfo(context, NOTIFICATION_TITLE, message, intent);\n \n // Flags\n notification.flags |= Notification.FLAG_AUTO_CANCEL;\n //notification.defaults |= Notification.DEFAULT_SOUND;\n //notification.defaults |= Notification.DEFAULT_VIBRATE; // uncomment and add VIBRATE permissions on manifest to get vibrating notifications\n notificationManager.notify(0, notification);\n }\n });\n \n }", "public Void doInBackground(Void... voidArr) {\n try {\n AppboyAdmReceiver.this.handleAppboyAdmMessage(this.mContext, this.mIntent);\n return null;\n } catch (Exception e) {\n AppboyLogger.e(AppboyAdmReceiver.TAG, \"Failed to create and display notification.\", e);\n return null;\n }\n }", "public void displayNotificationDialog(Context ctx, String title, String msg){\n AlertDialog.Builder dialog = new AlertDialog.Builder(ctx);\n dialog.setTitle(title);\n dialog.setMessage(msg);\n dialog.setPositiveButton(ctx.getResources().getString(R.string.ok_en), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n dialog.show();\n }", "public void run() {\n handler.post(new Runnable() {\n public void run() {\n\n //TODO CALL NOTIFICATION FUNC\n String lg_ti = \"Test.\";\n String des_ti = \"The license valid until \";\n String ban_ti = \"Warning!\";\n getNotificationData();\n //notificationShow(des_ti,lg_ti,ban_ti);\n }\n });\n }", "public void toastMsg(View v){\n String msg = \"Message Sent!\";\n Toast toast = Toast.makeText(this,msg,Toast.LENGTH_SHORT);\n toast.show();\n }", "public void displayToastMessage(String message) {\n Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG);\n toast.setGravity(Gravity.BOTTOM, 0, 0);\n toast.show();\n }", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, \"Longitude is active\", System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, LongitudeActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, \"Longitude\", \"Tracking your location\", contentIntent);\n\n // Send the notification.\n notificationManager.notify(NOTIFICATION, notification);\n }", "private void ShowNotification()\n {\n Notification n = new Notification.Builder(this)\n .setContentTitle(\"Message from Himanshu\")\n .setContentText(\"Thank you Sir. Enjoyed Your Class!\")\n .setSmallIcon(R.drawable.cloud)\n //.setContentIntent(pIntent)\n .setAutoCancel(true)\n //.addAction(R.drawable.icon, \"Call\", pIntent)\n //.addAction(R.drawable.icon, \"More\", pIntent)\n //.addAction(R.drawable.icon, \"And more\", pIntent)\n .getNotification();\n\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n try {\n notificationManager.notify(0, n);\n }catch (Exception ex) {\n Log.d(\"MyApp\", \"Exception Occured!\");\n }\n }", "public void displayNotificationMessage(String notificationMessage) {\n userMessage.setTextFill(Color.BLACK);\n userMessage.setText(notificationMessage);\n }", "void onNewMessage(String message);", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "public void btnpress(View view) {\n NewMessageNotification newMessageNotification = new NewMessageNotification();\n newMessageNotification.notify(MainActivity.this,\"Danger\",1);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tAHNotification notification = new AHNotification.Builder()\n\t\t\t\t\t\t.setText(\":)\")\n\t\t\t\t\t\t.setBackgroundColor(ContextCompat.getColor(ManagerDemoActivity.this, R.color.color_notification_back))\n\t\t\t\t\t\t.setTextColor(ContextCompat.getColor(ManagerDemoActivity.this, R.color.color_notification_text))\n\t\t\t\t\t\t.build();\n\t\t\t\tbottomNavigation.setNotification(notification, 1);\n\t\t\t\tSnackbar.make(bottomNavigation, \"Parking Hero welcomes you :)\",\n\t\t\t\t\t\tSnackbar.LENGTH_SHORT).show();\n\t\t\t}", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n Log.d(TAG, \"Notification Message Body: \" + remoteMessage.getNotification().getBody());\n\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);\n mBuilder.setSmallIcon(R.drawable.logo);\n mBuilder.setContentTitle(remoteMessage.getNotification().getTitle());\n mBuilder.setContentText(remoteMessage.getNotification().getBody());\n\n NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n // notificationID allows you to update the notification later on.\n mNotificationManager.notify(14, mBuilder.build());\n }", "public INotification createNotification()\n throws OculusException;", "void notify(PushMessage m);", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}" ]
[ "0.629572", "0.62902164", "0.6229281", "0.6182909", "0.61779606", "0.6174995", "0.615427", "0.6092267", "0.608093", "0.6067156", "0.599175", "0.59693485", "0.59550846", "0.592803", "0.5838563", "0.5829237", "0.57993716", "0.5798371", "0.5783181", "0.578298", "0.57818604", "0.5767533", "0.57639396", "0.5750584", "0.5747796", "0.57473564", "0.57398903", "0.5735214", "0.5729198", "0.57286125", "0.57232124", "0.57210034", "0.5717387", "0.5711477", "0.57087314", "0.5706294", "0.5693368", "0.5683043", "0.5677936", "0.5669724", "0.5663455", "0.56629515", "0.5659921", "0.5657646", "0.5650102", "0.56478894", "0.56451374", "0.56437", "0.56365216", "0.5635265", "0.56306714", "0.5617955", "0.560851", "0.5603405", "0.5602395", "0.5596057", "0.55942535", "0.55892146", "0.55868226", "0.5575948", "0.5562779", "0.5556725", "0.55556005", "0.55536205", "0.55534935", "0.5553336", "0.5543835", "0.5533453", "0.5528346", "0.5524524", "0.55235386", "0.55186164", "0.5507823", "0.5505804", "0.5501504", "0.54974526", "0.54833436", "0.5482931", "0.5481663", "0.54816127", "0.54737926", "0.54698956", "0.5468782", "0.54571664", "0.5455373", "0.5451511", "0.5449609", "0.54449385", "0.54413986", "0.54408646", "0.5436675", "0.5436104", "0.54356927", "0.5434551", "0.54223967", "0.5419818", "0.54195005", "0.5416842", "0.5416529", "0.5410802", "0.54084855" ]
0.0
-1
TODO Autogenerated method stub
public void Del(String id) { sql = "delete from throw_history where throw_history_id='"+id+"'"; dao.executeUpdate(sql); System.out.println("=del==="+sql); }
{ "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
Busca todos os campos com com a InjectView em automatiza findViewById
private void injectViews() { Field[] declaredFields = getClass().getDeclaredFields(); for (Field declaredField : declaredFields) { if(declaredField.isAnnotationPresent(InjectView.class)) { declaredField.setAccessible(true); try { declaredField.set(this, findViewById(declaredField.getAnnotation(InjectView.class).value())); } catch (IllegalAccessException e) { e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findViews() {\n\n altura_et = findViewById(R.id.et_altura);\n altura_et.setText(String.valueOf(user.getAltura()));\n\n peso_et = findViewById(R.id.et_peso);\n peso_et.setText(String.valueOf(user.getPeso()));\n\n nombreUO_et = findViewById(R.id.et_uo);\n nombreUO_et.setText(user.getUserID());\n\n email_et = (EditText) findViewById(R.id.editTextEmail);\n email_et.setText(user.getCorreo().toString());\n\n nombre = findViewById(R.id.tv_nombre);\n nombre.setText(user.getNombre().concat(\" \").concat(user.getApellidos()));\n\n fecha = findViewById(R.id.textViewFechaNaci);\n fecha.setText(fecha.getText().toString().concat(\" \").concat(user.getNacimiento()));\n\n email_et.setEnabled(false);\n altura_et.setEnabled(false);\n peso_et.setEnabled(false);\n nombreUO_et.setEnabled(false);\n }", "private void findViews() {\n\n FirstName = (EditText) findViewById(R.id.FirstName);\n LastName = (EditText) findViewById(R.id.LastName);\n CreditCard = (EditText) findViewById(R.id.CreditCard);\n EmailAddress = (EditText) findViewById(R.id.EmailAddress);\n PhoneNumber = (EditText) findViewById(R.id.PhoneNumber);\n ID = (EditText) findViewById(R.id.ID);\n Add = (Button) findViewById(R.id.Add);\n Password = (EditText) findViewById(R.id.Password);\n\n Add.setOnClickListener(this);\n }", "private void initViews() {\n textViewRole = findViewById(R.id.textViewAddress);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n appCompatButtonAddProperty = findViewById(R.id.appCompatButtonAddProperty);\n }", "private void initViews() {\n nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);\n nomeLogin = (TextInputEditText) findViewById(R.id.nomeLogin);\n emailLogin = (TextInputEditText) findViewById(R.id.emailLogin);\n senhaLogin = (TextInputEditText) findViewById(R.id.senhaLogin);\n senhaLoginConfirmar = (TextInputEditText) findViewById(R.id.senhaLoginConfirmar);\n btnCadastrar = (Button) findViewById(R.id.btnCadastrar);\n cadastrar = (TextView) findViewById(R.id.cadastrar);\n regEmail = (TextInputLayout) findViewById(R.id.regEmail);\n regNome = (TextInputLayout) findViewById(R.id.regNome);\n regSenha = (TextInputLayout) findViewById(R.id.regSenha);\n regSenhaConfirmar = (TextInputLayout) findViewById(R.id.regSenhaConfirmar);\n }", "private void initViews() {\n View view = getView();\n if (view != null) {\n edtConfirmPassword = view.findViewById(R.id.edt_reg_confim_password);\n edtConfirmPassword.setTag(\"Confirm Password\");\n edtEmail = view.findViewById(R.id.edt_reg_email);\n edtEmail.setTag(\"Email\");\n edtPhone = view.findViewById(R.id.edt_reg_phone);\n edtPhone.setTag(\"Phone\");\n edtPassword = view.findViewById(R.id.edt_reg_password);\n edtPassword.setTag(\"Password\");\n tv_RegisterSignIn = view.findViewById(R.id.tv_register_sign_in);\n btn_reg_signup = view.findViewById(R.id.btn_reg_signup);\n edtUserName = view.findViewById(R.id.edt_reg_name);\n edtUserName.setTag(\"Name\");\n }\n }", "private void initViews() {\n editTextEmail = (EditText) findViewById(R.id.email);\n editTextPassword = (EditText) findViewById(R.id.password);\n textInputLayoutEmail = (TextInputLayout) findViewById(R.id.textInputLayoutEmail);\n textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);\n buttonLogin = (Button) findViewById(R.id.buttonLogin);\n\n }", "private void findViews(View view) {\n alamat = (TextView)view.findViewById( R.id.alamat );\n telp = (TextView)view.findViewById( R.id.telp );\n email = (TextView)view.findViewById( R.id.email );\n }", "private void initViews() {\n textViewName = (EditText) findViewById(R.id.inputText_name);\n textViewEmail = (EditText) findViewById(R.id.inputText_email);\n textViewPhone = (EditText) findViewById(R.id.inputText_phone);\n textViewRent = (EditText) findViewById(R.id.inputText_rent);\n textViewChores = (EditText) findViewById(R.id.inputText_chores);\n\n updateUserButton = (Button) findViewById(R.id.button_updateUser);\n //redirectToUsers = (Button) findViewById(R.id.button_updateUser);\n }", "public void initView() {\n CouponGetPresenter couponGetPresenter = (CouponGetPresenter) getPresenter();\n if (couponGetPresenter != null) {\n couponGetPresenter.getNeedPsptId(this.venueId);\n }\n CouponGetPresenter couponGetPresenter2 = (CouponGetPresenter) getPresenter();\n if (couponGetPresenter2 != null) {\n couponGetPresenter2.getCouponDetail(this.couponId, this.campId);\n }\n EditText editText = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etPhoneNum\");\n ViewExt.filterBlank(editText);\n EditText editText2 = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPhoneNum\");\n ViewExt.setMaxLength$default(editText2, 11, (String) null, 2, (Object) null);\n EditText editText3 = (EditText) _$_findCachedViewById(R.id.etVerityCode);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etVerityCode\");\n ViewExt.filterBlank(editText3);\n EditText editText4 = (EditText) _$_findCachedViewById(R.id.etName);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etName\");\n ViewExt.addFilter(editText4, CouponGetActivity$initView$1.INSTANCE);\n ((CornerTextView) _$_findCachedViewById(R.id.ctGetCoupon)).setOnClickListener(new CouponGetActivity$initView$2(this));\n ((AgreementBar) _$_findCachedViewById(R.id.agreementBar)).setCheckListener(new CouponGetActivity$initView$3(this));\n ((TextView) _$_findCachedViewById(R.id.tvGetCode)).setOnClickListener(new CouponGetActivity$initView$4(this));\n AgreementBar agreementBar = (AgreementBar) _$_findCachedViewById(R.id.agreementBar);\n Intrinsics.checkExpressionValueIsNotNull(agreementBar, \"agreementBar\");\n agreementBar.setCheck(true);\n getAgreement();\n }", "public void InicializarComponentes() {\n campoCadastroNome = findViewById(R.id.campoCadastroNome);\n campoCadastroEmail = findViewById(R.id.campoCadastroEmail);\n campoCadastroSenha = findViewById(R.id.campoCadastroSenha);\n switchEscolhaTipo = findViewById(R.id.switchCadastro);\n botaoFinalizarCadastro = findViewById(R.id.botaoFinalizarCriacao);\n\n\n }", "public void findUIElements() {\n nameField = (EditText) findViewById(R.id.NAMEFIELD);\n nameField.setHintTextColor(getResources().getColor(R.color.colorPrimary));\n enterButton = (Button) findViewById(R.id.ENTER);\n enterButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = nameField.getText().toString();\n if (name.length() > 0) {\n RealmManager.getInstance().createUser(name);\n finish();\n }\n }\n });\n }", "private void connectVariablesToViews() {\n emailEditText = (EditText) findViewById(R.id.emailField);\n passwordEditText = (EditText) findViewById(R.id.passwordField);\n signIn = (Button) findViewById(R.id.sign_in);\n }", "private void initViews() {\n nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);\n textInputLayoutUsername = (TextInputLayout) findViewById(R.id.textInputLayoutUsername);\n textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);\n textInputEditTextUsername = (TextInputEditText) findViewById(R.id.textInputEditTextUsername);\n textInputEditTextPassword = (TextInputEditText) findViewById(R.id.textInputEditTextPassword);\n appCompatButtonLogin = (AppCompatButton) findViewById(R.id.appCompatButtonLogin);\n }", "private void getIds() {\n mBuilder_txv = (TextView) findViewById((R.id.buildman_txv_login));\n mBuilderTech_txv = (TextView) findViewById((R.id.buildmantechnologies_login));\n mVersion_txv = (TextView) findViewById((R.id.version_login));\n mEmail_Edt = (EditText) findViewById((R.id.email_id_edt_login));\n mPassword_Edt = (EditText) findViewById((R.id.password_edt_login));\n mLogin_Btn = (Button) findViewById((R.id.login_btn_login));\n if(userId!=null){\n mEmail_Edt.setText(userId);\n mEmail_Edt.setSelection(mEmail_Edt.getText().toString().length());\n mPassword_Edt.setText(pwd);\n mPassword_Edt.setSelection(mPassword_Edt.getText().toString().length());\n }\n }", "private void initViews() {\n\n //O metodo findViewById() recupera a referencia do EditText que se encontra no XML.\n editTextQuantidade = (EditText) findViewById(R.id.edittext_quantidade);\n imageViewOvos = (ImageView) findViewById(R.id.imageview_ovos);\n textViewTotal = (TextView) findViewById(R.id.textview_total);\n }", "private void initViews() {\r\n etEmail = findViewById(R.id.et_mail);\r\n etVerifyCode = findViewById(R.id.et_l_verifyCode);\r\n etNewPsw = findViewById(R.id.et_new_psw);\r\n etConfirmPsw = findViewById(R.id.et_confirm_psw);\r\n }", "protected void CriarComponentes() {\r\n\r\n edtCodigo = (EditText) this.findViewById(R.id.edtCodigo);\r\n\r\n edtNome = (EditText) this.findViewById(R.id.edtNome);\r\n\r\n edtRazaoSocial = (EditText) this.findViewById(R.id.edtRazaoSocial);\r\n\r\n edtEndereco = (EditText) this.findViewById(R.id.edtEndereco);\r\n\r\n edtBairro = (EditText) this.findViewById(R.id.edtBairro);\r\n\r\n edtCep = (EditText) this.findViewById(R.id.edtCep);\r\n\r\n edtCidade = (EditText) this.findViewById(R.id.edtCidade);\r\n\r\n edtTelefone = (EditText) this.findViewById(R.id.edtTelefone);\r\n\r\n edtFax = (EditText) this.findViewById(R.id.edtFax);\r\n\r\n edtCnpj = (EditText) this.findViewById(R.id.edtCnpj);\r\n\r\n edtIE = (EditText) this.findViewById(R.id.edtIE);\r\n\r\n checkBoxRegistroAtivo = (CheckBox) this.findViewById(R.id.checkBoxRegistroAtivo);\r\n\r\n buttonSalvar = (Button) this.findViewById(R.id.buttonSalvar);\r\n\r\n buttonVoltar = (Button) this.findViewById(R.id.buttonVoltar);\r\n\r\n }", "private void readViews() {\n mNameString = mNameEditText.getText().toString().trim();\n mQuantityString = Integer.parseInt(mQuantityTextView.getText().toString().trim());\n mPriceString = Double.parseDouble(mPriceEditText.getText().toString().trim());\n mPhoneString = Integer.parseInt(mPhoneEditText.getText().toString().trim());\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n // EditText etFoo = (EditText) view.findViewById(R.id.etFoo);\n }", "private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}", "private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }", "private void findViews() {\n Button loginButton = findViewById(R.id.button_login);\n loginButton.setOnClickListener(this);\n usernameEditText = findViewById(R.id.edit_text_username);\n username = sharedPreferences.getString(Constants.SP_USERNAME_KEY, \"\");\n this.passwordEditText = findViewById(R.id.edit_text_password);\n this.coordinatorLayout = findViewById(R.id.coordinator_layout_login);\n checkBox = findViewById(R.id.checkbox_remember_user);\n checkBox.setOnClickListener(this);\n TextView textViewServerName = findViewById(R.id.text_view_login_server);\n textViewServerName.setText(getResources().getString(R.string.login_server_name, sharedPreferences.getString(Constants.SP_SERVER_NAME_KEY, \"\")));\n }", "public void initViews() {\n View accountExists = activity.findViewById(R.id.button_register);\n Button buttonSubmitAuth = activity.findViewById(R.id.button_login);\n\n viewUsername = activity.findViewById(R.id.login_username);\n viewPassword = activity.findViewById(R.id.login_password);\n\n accountExists.setOnClickListener(view ->\n activity.setViewPagerCurrentItem(OnboardingActivity.Companion.getFRAGMENT_REGISTRATION()));\n\n buttonSubmitAuth.setOnClickListener(view -> authenticateUser());\n }", "private void getAttributes(View view) {\n firstName = view.findViewById(R.id.user_first_name);\n vibez = view.findViewById(R.id.vibePointsNum);\n vibezString = view.findViewById(R.id.myVibe);\n myBooksRecyclerView = view.findViewById(R.id.my_books_recycler_view);\n booksIReadRecyclerView = view.findViewById(R.id.books_i_read_recycler_view);\n ownerImg = (CircleImageView) view.findViewById(R.id.circ_image);\n }", "public void iniViwes() {\n txtcodigoAnimal = (EditText) findViewById(R.id.txtcodigoAnimal);\n btnBuscar = (Button) findViewById(R.id.btnBuscar);\n txtresultado = (ListView) findViewById(R.id.txtresultado);\n\n }", "private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_fragment_test, container, false);\n\n ButterKnife.inject(FragmentTest.this, view);\n\n /*btToastMessage = (Button) view.findViewById(R.id.btToastMessage);\n btToastMessage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getActivity(), \"Toast printado\", Toast.LENGTH_SHORT).show();\n }\n });\n\n etName = (EditText) view.findViewById(R.id.etName);\n etEmail = (EditText) view.findViewById(R.id.etEmail);*/\n\n for(int i = 0, tam = listEt.size(); i < tam; i++){\n Log.i(\"LOG\", \"Hint: \"+listEt.get(i).getHint().toString());\n }\n\n\n return(view);\n }", "public void getDadosDosCampos2() {\n EditText campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n RadioButton campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n RadioButton campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n EditText numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n EditText numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n EditText campoIMEI1 = findViewById(R.id.campoIMEI1);\n EditText campoIMEI2 = findViewById(R.id.campoIMEI2);\n\n //instanciando o celular\n Celular novoCelular = new Celular();\n\n novoCelular.setModelo(campoModeloCelular.getText().toString());\n novoCelular.setChip1(campoNumeroChip1.getText().toString());\n novoCelular.setChip2(campoNumeroChip2.getText().toString());\n novoCelular.setImei1(campoIMEI1.getText().toString());\n novoCelular.setImei2(campoIMEI2.getText().toString());\n\n CelularDAO daoC = new CelularDAO();\n\n CelularDAO.Cel_cadastrado = novoCelular;\n\n UsuarioDAO.user_cadastrado.setCelularP(novoCelular);\n\n UsuarioDAO.dao.inserir(UsuarioDAO.user_cadastrado);\n\n\n\n }", "private void initViews(){\n tvName = findViewById(R.id.textViewLoggedUserName);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n }", "private void initializeObjects() {\r\n mName = view.findViewById(R.id.name);\r\n mEmail = view.findViewById(R.id.email);\r\n mPassword = view.findViewById(R.id.password);\r\n Button mRegister = view.findViewById(R.id.register);\r\n\r\n mRegister.setOnClickListener(this);\r\n }", "private void initView() {\n final EditText etName = (EditText) findViewById(R.id.et_name);\r\n final EditText etTel = (EditText) findViewById(R.id.et_tel);\r\n final EditText etAddress = (EditText) findViewById(R.id.et_cell_address);\r\n final EditText etPwd1 = (EditText) findViewById(R.id.et_pwd1);\r\n final EditText etPwd2 = (EditText) findViewById(R.id.et_pwd2);\r\n tvAddress = (TextView) findViewById(R.id.tv_cell_address);\r\n\r\n tvBrand = (TextView) findViewById(R.id.tv_brand);\r\n\r\n tvBrand.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n requestEtBrand();\r\n }\r\n });\r\n\r\n findViewById(R.id.ll_cell_address).setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n requestRunTimePermission(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, new PermissionListener() {\r\n @Override\r\n public void onGranted() {\r\n Intent intent = new Intent(RegisterActivity.this, AddressSelActivity.class);\r\n startActivityForResult(intent, 101);\r\n }\r\n\r\n @Override\r\n public void onDenied(List<String> permission) {\r\n }\r\n });\r\n }\r\n });\r\n\r\n findViewById(R.id.tv_submit).setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n\r\n registerOwner(etName.getText().toString(),\r\n etTel.getText().toString(), etAddress.getText().toString(),\r\n etPwd1.getText().toString(), etPwd2.getText().toString());\r\n }\r\n\r\n });\r\n }", "public void init(){\n nomInscription = (EditText)findViewById(R.id.inscriptionNomEdit);\n prenomInscription = (EditText)findViewById(R.id.inscriptionPrenomEdit);\n mailInscription = (EditText)findViewById(R.id.inscriptionMailEdit);\n telInscription = (EditText)findViewById(R.id.inscriptionGSMEdit);\n mdpInscription = (EditText)findViewById(R.id.inscriptionPSWEdit);\n mdpConfirmation = (EditText)findViewById(R.id.inscriptionConfirmEdit);\n }", "private void getValues(){\n username = etUsername.getText().toString();\n password = etPassword.getText().toString();\n }", "private void initViews() {\n inputName = findViewById(R.id.inputGroceryItemName);\n inputQuantityToBuy = findViewById(R.id.inputGroceryItemQuantity);\n inputUnits = findViewById(R.id.inputGroceryItemUnits);\n inputPrice = findViewById(R.id.inputGroceryItemPrice);\n inputCalories = findViewById(R.id.inputGroceryItemCalories);\n\n btnCancel = findViewById(R.id.btnCancelAddGrocery);\n btnAdd = findViewById(R.id.btnAddGroceryItem);\n\n checkEgg = findViewById(R.id.inputCheckGroceryEggs);\n checkFish = findViewById(R.id.inputCheckGroceryFish);\n checkGluten = findViewById(R.id.inputCheckGroceryGluten);\n checkLactose = findViewById(R.id.inputCheckGroceryLactose);\n checkSoy = findViewById(R.id.inputCheckGrocerySoy);\n checkNuts = findViewById(R.id.inputCheckGroceryNuts);\n }", "private void registerViews() {\n editTextLogin = (EditText) findViewById(R.id.editText_username);\n editTextLogin.addTextChangedListener(new TextWatcher() {\n // after every change has been made to this editText, we would like to check validity\n public void afterTextChanged(Editable s) {\n Validate.isEmailAddress(editTextLogin, true);\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n });\n\n editTextPassword = (EditText) findViewById(R.id.editText_password);\n editTextPassword.addTextChangedListener(new TextWatcher() {\n // after every change has been made to this editText, we would like to check validity\n public void afterTextChanged(Editable s) {\n Validate.isPassword(editTextPassword, true);\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n });\n }", "public void readEditTexts() {\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n // Setup any handles to view objects here\n // EditText etFoo = (EditText) view.findViewById(R.id.etFoo);\n }", "private void getViews(View view) {\n listView = (com.baoyz.swipemenulistview.SwipeMenuListView)view.findViewById(R.id.detail_listview);\n accept = (Button)view.findViewById(R.id.change_quantity_button);\n totalPriceTextView = (TextView)view.findViewById(R.id.total_price_text_view);\n searchET = (EditText)view.findViewById(R.id.search_edit_text);\n clearTextButton = (Button)view.findViewById(R.id.clear_text_button);\n }", "private void fieldsInitialization() {\n this.emailEditText = findViewById(R.id.login_email_edit_text);\n this.passwordEditText = findViewById(R.id.login_password_edit_text);\n this.loginButton = findViewById(R.id.login_button_login);\n\n this.emailEditText.setOnFocusChangeListener(this.emailFocusChangingListener);\n this.emailEditText.setOnEditorActionListener(this.emailTextChangingListener);\n this.passwordEditText.setOnFocusChangeListener(this.passwordFocusChangingListener);\n this.passwordEditText.setOnEditorActionListener(this.passwordTextChangingListener);\n this.loginButton.setOnClickListener(this.loginButtonClickListener);\n }", "private void initView() {\n\t\tbtnBack = (Button) findViewById(R.id.btn_regist_back);\n\t\tbtnRegist = (Button) findViewById(R.id.btn_regist_regist);\n\t\tuseret=(EditText)findViewById(R.id.userID);\n\t\tcellet=(EditText)findViewById(R.id.pNUM);\n\t\tpwet=(EditText)findViewById(R.id.et_regist_userPwd);\n\t\trpwet=(EditText)findViewById(R.id.rp_userPwd);\n\t\tmProgressView = findViewById(R.id.login_progress);\n\t\tbtnConf=(Button) findViewById(R.id.btn_msg);\n\t\tconfet=(EditText)findViewById(R.id.et_confirm);\n\n\t}", "private void initViews(){\n mTitle = (EditText) findViewById(R.id.scheduled_event_title);\n mDescription = (EditText) findViewById(R.id.scheduled_event_description);\n mHour = (EditText) findViewById(R.id.scheduled_event_time_hour);\n mMinute = (EditText) findViewById(R.id.scheduled_event_time_minutes);\n mCategorySpinner = (Spinner) findViewById(R.id.scheduled_spinner_categories);\n mDueDate = (TextView) findViewById(R.id.tv_scheduled_event_due_date);\n mDueTime = (TextView) findViewById(R.id.tv_scheduled_event_due_time);\n }", "private void findAttributesId() {\r\n\t\tparentActivity = this;\r\n\t\tcontext = this;\r\n\t\temailAddress = (EditText) findViewById(R.id.registrationEmailField);\r\n\t\tfirstName = (EditText) findViewById(R.id.registrationFirstName);\r\n\t\tlastName = (EditText) findViewById(R.id.registrationLastName);\r\n\t\tpassword = (EditText) findViewById(R.id.registrationPasswrod);\r\n\t\tconfirmPassword = (EditText) findViewById(R.id.registrationConfirmPassword);\r\n\t\tcontactNumber = (EditText) findViewById(R.id.registrationCompanyName);\r\n\t\tloadingProgress = (ProgressBar) findViewById(R.id.loadingProgress);\r\n\t}", "private void preencherCampos(){\n if (!TextUtils.isEmpty(usuario.getPhotoUrl())){\n Picasso.with(EditarUsuarioPerfilActivity.this).load(usuario.getPhotoUrl()).transform(new CircleTransform()).into(imgPerfilUser);\n }else{\n Picasso.with(EditarUsuarioPerfilActivity.this).load(R.drawable.ic_empresa_new).transform(new CircleTransform()).into(imgPerfilUser);\n }\n\n\n editNome.setText(usuario.getNome());\n editEmail.setText(usuario.getEmail());\n editrelefoneCel.setText(usuario.getTelefoneCel());\n editTelefoneResidencial.setText(usuario.getTelefoneResidencial());\n textUserEditHabilidades.setText(textUserEditHabilidades.getText().toString());\n editCEP.setText(usuario.getCEP());\n editPais.setText(usuario.getPais());\n editEstado.setText(usuario.getEstado());\n editCidade.setText(usuario.getCidade());\n editBairro.setText(usuario.getBairro());\n editRua.setText(usuario.getRua());\n editNumero.setText(usuario.getNumero());\n editComplemento.setText(usuario.getComplemento());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_otp, container, false);\n ButterKnife.bind(this, view);\n btnForgotPassword.setOnClickListener(this);\n btnLogin.setOnClickListener(this);\n edittxtMailId.setText(mParam1);\n return view;\n }", "private void obtener(){\n Bundle bundle = getIntent().getExtras();\n id = bundle.getString(\"id\");\n nombre = bundle.getString(\"nombre\");\n apellido = bundle.getString(\"apellido\");\n telefono = bundle.getInt(\"telefono\");\n //seteo de datos\n editTextN.setText(nombre);\n editTextA.setText(apellido);\n editTextT.setText(String.valueOf(telefono));\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mScannerView = new ZXingScannerView(getActivity());\n mScannerView.setAutoFocus(true);\n idAlumno = getArguments().getString(\"idalumno\");\n nombreAlumno = getArguments().getString(\"nombrealumno\");\n Toast.makeText(getActivity(), nombreAlumno, Toast.LENGTH_SHORT).show();\n\n retrofit = new Retrofit.Builder().baseUrl(\"http://45.55.189.9/webservices/sda/asistenciasda/\").build();\n apiService = retrofit.create(APIService.class);\n\n return mScannerView;\n }", "private void inizialiteViews() {\n tvDirectionStore = findViewById(R.id.tvDirectionStore);\n tvNameOwner = findViewById(R.id.tvNameOwnerView);\n tvNameStore = findViewById(R.id.tvNameStoreView);\n tvPhonestore = findViewById(R.id.tvPhoneNumberOwner);\n editStore = findViewById(R.id.btnEditStore);\n imageViewStore = findViewById(R.id.imageStore);\n }", "public void setupTextFields(View v) {\n other = (EditText) v.findViewById(R.id.eText_Notes);\n totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);\n\n other.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());\n }\n });\n\n totalTotes.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());\n }\n });\n }", "private void bindViewsById(View view) {\n mViewPager = (ViewPager) view.findViewById(R.id.pager);\n mViewPager.setOffscreenPageLimit(1);\n mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout);\n\n // mTvNoFavAvail = (TextView) view.findViewById(R.id.tv_no_fav_available);\n // mTvNoInternet = (TextView) view.findViewById(R.id.tv_no_internet_available);\n }", "private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }", "public interface ForgetKeyAtView {\n\n EditText getEtPhoneV();\n EditText getEtKeyV();\n\n}", "private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}", "private void editableEditTexts() {\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tetTitle.setKeyListener(titleListener);\n\t\tetDescription.setKeyListener(descriptionListener);\n\t\tetDirections.setKeyListener(directionsListener);\n\n\t\tsetListViewOnClickListener();\n\n\t}", "private void findViews() {\n serverView = findViewById(R.id.server_view);\n portView = findViewById(R.id.port_view);\n usernameView = findViewById(R.id.username_view);\n passwordView = findViewById(R.id.password_view);\n messageView = findViewById(R.id.message_view);\n uploadButtonView = findViewById(R.id.upload_button_view);\n }", "private void RetrieveEditTextData() {\n\n strFirstName = etFirstName.getText().toString();\n strMiddleName = etMiddleName.getText().toString();\n strLastName = etLastName.getText().toString();\n strEmployId = etEmployId.getText().toString();\n strDesignation = etDesignation.getText().toString();\n strCompName = etCompName.getText().toString();\n strCategory = etCategory.getText().toString();\n strDOB = etDOB.getText().toString();\n\n }", "private void setUpReferences()\n {\n namedFields = new HashMap<>(5);\n namedFields.put(\"firstName\", (EditText) findViewById(R.id.signUpFirstNameField));\n namedFields.put(\"surname\", (EditText) findViewById(R.id.signUpSurnameField));\n namedFields.put(\"password\", (EditText) findViewById(R.id.signUpPasswordField));\n namedFields.put(\"confPassword\", (EditText) findViewById(R.id.signUpConfirmPassword));\n namedFields.put(\"email\", (EditText) findViewById(R.id.signUpEmailField));\n formContainer = (ScrollView) findViewById(R.id.signUpFormContainer);\n progressContainer = (RelativeLayout) findViewById(R.id.signUpProgressContainer);\n }", "private void initView() {\n un = findViewById(R.id.un);\n deux = findViewById(R.id.deux);\n trois = findViewById(R.id.trois);\n quatre = findViewById(R.id.quatre);\n cinq = findViewById(R.id.cinq);\n six = findViewById(R.id.six);\n sept = findViewById(R.id.sept);\n huit = findViewById(R.id.huit);\n neuf = findViewById(R.id.neuf);\n zero = findViewById(R.id.zero);\n etoile = findViewById(R.id.etoile);\n diaize = findViewById(R.id.diaize);\n call_btn = findViewById(R.id.appeler);\n tableView = findViewById(R.id.ecran);\n edit_search = findViewById(R.id.edit_search);\n efface = findViewById(R.id.effacer);\n setComposer = findViewById(R.id.set_composer);\n paletteComposition = findViewById(R.id.palette_de_composition);\n\n if (is_search) {\n setComposer.setVisibility(View.GONE);\n paletteComposition.setVisibility(View.GONE);\n edit_search.setFocusable(true);\n }\n }", "private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }", "public void PlaceHolders(){\n TextHolder holderUsuario = new TextHolder(\"Ingrese un usuario\", txtUsuario);\n TextHolder holderCorreo = new TextHolder(\"Ingrese su correo\",txtCorreo); \n }", "private void initializeFields(View view) {\n aboutUsButton = (Button) view.findViewById(R.id.aboutUsButton);\n contactUsButton = (Button) view.findViewById(R.id.contactUsButton);\n upcomingEventsButton = (Button) view.findViewById(R.id.upcomingEventsButton);\n makeADonationButton = (Button) view.findViewById(R.id.makeADonationButton);\n }", "private void findAll(View view) {\n facility_RGP_group = view.findViewById(R.id.search_RGP_facility);\n facility_EDT_value = view.findViewById(R.id.search_facility_EDT_value);\n facility_BTN_search = view.findViewById(R.id.search_facility_BTN_search);\n facility_RCV_result = view.findViewById(R.id.search_RCV_facilities);\n facility_LBL_results = view.findViewById(R.id.search_facility_LBL_results);\n }", "private void limparCampos() {\n\t\ttxtCidade.setText(\"\");\n\t\tlblId.setText(\"0\");\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "private void initView() {\n wvProvince = findViewById(R.id.wheelv_province);\r\n wvCity = findViewById(R.id.wheelv_city);\r\n wvArea = findViewById(R.id.wheelv_area);\r\n\r\n findViewById(R.id.tv_addresspicker_confirm).setOnClickListener(this);\r\n // findViewById(R.id.tv_addresspicker_exit).setOnClickListener(this);\r\n\r\n // if (!TextUtils.isEmpty(title)) tvAddressTitle.setText(title);\r\n }", "void populateFrom(Person r) {\n // nombre.setText(r.mail1);\n // apellido.setText(r.apellido1);\n usu.setText(r.nom_usuario1);\n // mail.setText(r.mail1);\n }", "private void setupEditTexts() {\n EditText paino = findViewById(R.id.etWeight);\n EditText alaPaine = findViewById(R.id.etLowerBP);\n EditText ylaPaine = findViewById(R.id.etUpperBP);\n\n //Set the input filters\n paino.setFilters(new InputFilter[] { new InputFilterMinMax(0f, 999f)});\n alaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n ylaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n\n //Set listeners for the edit texts on when the user clicks something else on the screen while typing\n //When clicked outside, the keyboard closes\n paino.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n alaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n ylaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }", "private void capturarControles() {\n \t\n \ttxtNombre = (TextView)findViewById(R.id.txtNombre);\n \timagenDestacada = (ImageView)findViewById(R.id.imagenDestacada);\n\t\ttxtDescripcion = (TextView)findViewById(R.id.txtDescripcion);\n\t\tlblTitulo = (TextView)findViewById(R.id.lblTitulo);\n\t\tbtnVolver = (Button)findViewById(R.id.btnVolver);\n\t\tbtnHome = (Button)findViewById(R.id.btnHome);\n\t\tpanelCargando = (RelativeLayout)findViewById(R.id.panelCargando);\n\t}", "private void limpiarCampos() {\n campoNombre.setText(\"\");\n campoNumLibro.setText(\"\");\n campoNumPagina.setText(\"\");\n }", "@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n TextView txtPlayerOne = getView().findViewById(R.id.txtv_playerOne);\n TextView txtPlayerTwo = getView().findViewById(R.id.txtv_playerTwo);\n\n txtPlayerOne.setText(playerOne.getName());\n txtPlayerTwo.setText(playerTwo.getName());\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_cadastro_cliente_enderecos, container, false);\n logradouro = view.findViewById(R.id.textInputLogradouro);\n numero = view.findViewById(R.id.textInputNumero);\n complemento = view.findViewById(R.id.textInputComplemento);\n bairro = view.findViewById(R.id.textInputBairro);\n cep = view.findViewById(R.id.textInputCep);\n uf = view.findViewById(R.id.textInputEstado);\n municipio = view.findViewById(R.id.textInputMunicipio);\n\n if(getCliente() != null){\n if(getCliente().getEndereco() != null){\n if(logradouro.getEditText().getText() == null){\n logradouro.getEditText().setText(getCliente().getEndereco());\n }\n }\n if(getCliente().getNumero() !=null){\n if(numero.getEditText().getText() == null){\n numero.getEditText().setText(getCliente().getNumero());\n }\n }\n if(getCliente().getComplemento() != null){\n if(complemento.getEditText().getText()==null){\n complemento.getEditText().setText(getCliente().getComplemento());\n }\n }\n if(getCliente().getBairro() !=null){\n if(bairro.getEditText().getText()==null){\n bairro.getEditText().setText(getCliente().getBairro());\n }\n }\n if(getCliente().getCep() !=null){\n if(cep.getEditText().getText()==null){\n cep.getEditText().setText(getCliente().getCep());\n }\n }\n if (getCliente().getCodMunicipio())\n }\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_data_diri, container, false);\n ButterKnife.bind(this, view);\n\n grosirMobilPreference = new GrosirMobilPreference(getActivity());\n grosirMobilFunction = new GrosirMobilFunction(getActivity());\n\n etFullName.setFilters(new InputFilter[] {new InputFilter.AllCaps()});\n\n etFullName.setText(grosirMobilPreference.getFullName());\n etPhoneNumber.setText(grosirMobilPreference.getPhoneNumber());\n\n stepView.go(0, true);\n\n Nson nson = Nson.readJson(UtilityAndroid.getSetting(\"daftar\") ) ;\n etNik.setText(nson.get(\"datadiri-nik\").asString());\n etFullName.setText(nson.get(\"datadiri-fullname\").asString());\n\n\n return view;\n }", "private void realizarVinculos() {\n btnVoltar = findViewById(R.id.btnVoltar);\n\n edtNome = findViewById(R.id.edtNome);\n edtCPF = findViewById(R.id.edtCpf);\n edtTelefone = findViewById(R.id.edtTelefone);\n edtIdade = findViewById(R.id.edtIdade);\n edtEmail = findViewById(R.id.edtEmail);\n }", "private void bindViews() {\n if (mSolidWate == null || mViewRoot == null) {\n return;\n }\n String otherValue = getContext().getResources().getString(R.string.list_item_other);\n\n // Waste type other \"forward deceleration\"\n FormInput.TextInput wasteTypeOther = new FormInput.TextInput((TextView)\n mViewRoot.findViewById(R.id.write_review_solid_waste_type_other),\n Review.SolidWaste.Key.WASTE_TYPE_OTHER, mSolidWate);\n\n // Waste type selector\n Spinner wateTypeView = mViewRoot.findViewById(R.id.write_review_solid_waste_type);\n FormInput.addAdapterToSpinner(getContext(), wateTypeView,\n R.array.write_review_solid_waste_type_dropdown_items);\n new FormInput.DropDown(wateTypeView, Review.SolidWaste.Key.WASTE_TYPE, mSolidWate,\n wasteTypeOther, otherValue);\n\n // Waste amount\n Spinner wateAmountView = mViewRoot.findViewById(R.id.write_review_solid_waste_amount);\n FormInput.addAdapterToSpinner(getContext(), wateAmountView,\n R.array.write_review_solid_waste_amount_dropdown_items);\n new FormInput.DropDown(wateAmountView, Review.SolidWaste.Key.AMOUNT, mSolidWate);\n\n // Waste odor other \"forward deceleration\"\n FormInput.TextInput odorTypeOther = new FormInput.TextInput((TextView)\n mViewRoot.findViewById(R.id.write_review_solid_odor_other),\n Review.SolidWaste.Key.ODOR_OTHER, mSolidWate);\n\n // Waste odor selector\n Spinner odorTypeView = mViewRoot.findViewById(R.id.write_review_solid_odor);\n FormInput.addAdapterToSpinner(getContext(), odorTypeView,\n R.array.write_review_odor_dropdown_items);\n new FormInput.DropDown(odorTypeView, Review.SolidWaste.Key.ODOR, mSolidWate,\n odorTypeOther, otherValue);\n\n // Waste miscellaneous & measurements\n new FormInput.TextInput((TextView) mViewRoot.findViewById(R.id.write_review_solid_misc),\n Review.SolidWaste.Key.MEASUREMENTS, mSolidWate);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_complete, container, false);\n x.view().inject(this, root);\n initUserNameEditText();\n initSexLayout();\n return root;\n }", "private void initViews() {\n etEmail = (EditText) findViewById(R.id.etEmail);\n etPassword = (EditText) findViewById(R.id.etPassword);\n btnLogin = (Button) findViewById(R.id.btnLogin);\n mAuth = FirebaseAuth.getInstance();\n db = FirebaseFirestore.getInstance();\n user = mAuth.getCurrentUser();\n\n }", "public void loadTextBoxs(){\n txtIndice.setText(String.valueOf(indice));\n txtDni.setText(String.valueOf(dni[indice]));\n txtNombre.setText(nombre[indice]);\n txtApellido.setText(apellido[indice]);\n txtDireccion.setText(direccion[indice]);\n txtTelefono.setText(telefono[indice]);\n txtFechaNacimiento.setText(fNacimiento[indice]);\n }", "private void initVistas() {\n // La actividad responderá al pulsar el botón.\n Button btnSolicitar = (Button) this.findViewById(R.id.btnSolicitar);\n btnSolicitar.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n solicitarDatos();\n }\n });\n lblDatos = (TextView) this.findViewById(R.id.lblDatos);\n }", "public interface RegisterView extends BaseView {\n void findViews();\n\n void setValues();\n\n void setListeners();\n\n void onSendVerificationClick();\n\n void onVerifyClick();\n}", "public interface ISearchView extends BaseView {\n String getInputContent();\n void setSearchResult(List<Person> data);\n}", "private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }", "private void setupVariables() {\n mCalendarView = findViewById(R.id.calendarView);\n mTextView = findViewById(R.id.eventsView);\n }", "private void setValues() {\n textViewPrice = findViewById(R.id.textViewPrice);\n textViewStoreName = findViewById(R.id.textViewStoreName);\n textViewLocation = findViewById(R.id.textViewLocation);\n buttonAcceptOrder = findViewById(R.id.buttonAcceptOrder);\n\n order = Parcels.unwrap(getIntent().getParcelableExtra(Order.class.getSimpleName()));\n\n textViewPrice.setText(\"$\" + decimalFormat.format(order.getPrice()));\n textViewStoreName.setText(\"Store: \"+ order.getStore().getName());\n textViewLocation.setText(\"Address: \" + order.getStore().getAddress());\n }", "private void limpiarCampos() {\n\t\tthis.campoClave.setText(\"\");\n\t\tthis.campoClaveNueva.setText(\"\");\n\t\tthis.campoClaveRepita.setText(\"\");\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_find1, container, false);\n\n txt_people = (EditText) view.findViewById(R.id.editText);\n txt_patient = (EditText) view.findViewById(R.id.editText2);\n\n Button click = (Button) view.findViewById(R.id.eiei);\n click.setOnClickListener(this);\n\n return view;\n }", "private void initViews() {\n appCompatButtonLogout = (AppCompatButton) findViewById(R.id.appCompatLogoutButton);\n appCompatButtonDelete = (AppCompatButton) findViewById(R.id.appCompatDeleteButton);\n\n }", "private void generarReferenciasViews() {\n this.contexto = this;\n editText = (EditText)findViewById(R.id.editText);\n boton = (Button)findViewById(R.id.btnEjecutarMapa);\n boton3 = (Button) findViewById(R.id.buttonActividad3);\n editTextLat = (EditText) findViewById(R.id.editTextLatitud);\n editTextLong = (EditText) findViewById(R.id.editTextLong);\n\n ControladorBotones cb = new ControladorBotones(contexto,editText,editTextLong,editTextLat);\n boton.setOnClickListener(cb);\n boton3.setOnClickListener(cb);\n /*\n boton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // crear el intento que nos ejecute la SecondActivity\n Intent intento = new Intent(contexto,SecondActivity.class);\n contexto.startActivity(intento);\n }\n });\n */\n }", "private void initializeElements() {\n textViewIntroduceEmail = findViewById(R.id.textViewIntroduceEmail);\n textViewIntroduceCode = findViewById(R.id.textViewIntroduceCode);\n editTextChangePasswordEmail = findViewById(R.id.editTextChangePasswordEmail);\n editTextChangePasswordCode = findViewById(R.id.editTextChangePasswordCode);\n buttonEmailNext = findViewById(R.id.buttonEmailNext);\n buttonCodeNext = findViewById(R.id.buttonCodeNext);\n\n buttonEmailNext.setOnClickListener(this);\n buttonCodeNext.setOnClickListener(this);\n }", "private void findViewsByID() {\n dinnerName = (EditText) findViewById(R.id.add_dinner_edit_dinner_name);\n dinnerCategory = (EditText) findViewById(R.id.add_dinner_edit_category);\n dinnerDescription = (EditText) findViewById(R.id.add_dinner_edit_dinner_description);\n dinnerRating = (RatingBar) findViewById(R.id.add_dinner_edit_rating);\n dateText = (TextView) findViewById(R.id.add_dinner_date_chosen);\n dinnerPrice = (EditText) findViewById(R.id.add_dinner_edit_price);\n dinnerDate = Calendar.getInstance();\n //We want to set the date to the current date\n dateText.setText(new SimpleDateFormat(\"dd-MM-yyyy\", new Locale(\"da\", \"DK\"))\n .format(dinnerDate.getTime()));\n chooseDate = (Button) findViewById(R.id.add_dinner_choose_date_button);\n saveButton = (Button) findViewById(R.id.add_dinner_save_button);\n cancelButton = (Button) findViewById(R.id.add_dinner_cancel_button);\n chooseIngredientsButton = (Button) findViewById(R.id.add_dinner_choose_ingredients);\n gridView = (GridView) findViewById(R.id.add_dinner_ingredient_gridview);\n }", "private void setupView()\n {\n btn = (Button) this.findViewById(R.id.btn);\n btn2 = (Button) this.findViewById(R.id.btn2);\n btn3 = (Button) this.findViewById(R.id.btn3);\n\n }", "private void bindViews(View view) {\n progress = view.findViewById(R.id.progress_bar);\n msn = (EditText) view.findViewById(R.id.msn);\n }", "@PostConstruct\n\tpublic void view() {\n\t\tif (log.isDebugEnabled()) {\n log.debug(\"Entering 'ConsultaHIPCuentaCorrientesAction - view' method\");\n }\n\t\tMap<String, String> parametros = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();;\n\t\tthis.parametrosPantalla = new HashMap<String, String>();\n\t\tthis.parametrosPantalla.putAll(parametros);\n\t\ttry {\n\t\t\tthis.formBusqueda = this.devuelveFormBusqueda();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t\n\t\t}\n\t}", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n\n getMainActivity().setImageSetter(this);\n getMainActivity().setOnActivityResultInterface(this);\n\n if (mSocialMediaPlatform != null && mSocialMediaPlatform.length() > 0) {\n edtName.setText(Name);\n edtEmail.setText(Email);\n }\n\n }", "public void findViews() {\n titleTextView = findViewById(R.id.song_title_text_view);\n artistTextView = findViewById(R.id.song_artist_text_view);\n albumCoverImg = findViewById(R.id.album_cover_img);\n albumTextView = findViewById(R.id.album_text_view);\n playButton = findViewById(R.id.play_button);\n nextButton = findViewById(R.id.next_button);\n backButton = findViewById(R.id.back_button);\n shuffleButton = findViewById(R.id.shuffle_button);\n repeatButton = findViewById(R.id.repeat_button);\n }", "private void limpiarCampos(){\n\ntxtId.setText(\"\");\ntxtCosto.setText(\"\");\ntxtDestino.setText(\"\");\ntxtKilom.setText(\"\");\ntxtMatricula.setText(\"\");\n\n\n\n}", "@Override\r\n protected void setupViews(Bundle bundle) {\n initPersonalInfo();\r\n }", "public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }", "private void populateInterfaceElements() {\n usernameTextView.setTypeface(Default.sourceSansProBold);\n userFullNameText.setTypeface(Default.sourceSansProLight);\n userFollowButton.setTypeface(Default.sourceSansProLight);\n\n setupUserProfilePicImageView();\n setupUsernameAndFullNameTextView();\n setupUserFollowButton();\n setupUserRelativeLayout();\n }", "private void populateFields() {\n pedidos = pdao.listaTodos();\n cCliente = new HashSet();\n cEstado = new HashSet();\n cCidade = new HashSet();\n cFornecedor = new HashSet();\n\n for (int i = 0; i < pedidos.size(); i++) {\n cCliente.add(pedidos.get(i).getCliente().getNome());\n cEstado.add(pedidos.get(i).getCliente().getEstado());\n cCidade.add(pedidos.get(i).getCliente().getCidade());\n for (int j = 0; j < pedidos.get(i).getItens().size(); j++) {\n cFornecedor.add(pedidos.get(i).getItens().get(j).getProduto().getFornecedor().getNome());\n }\n }\n\n clientes = new ArrayList<>(cCliente);\n fornecedores = new ArrayList<>(cFornecedor);\n\n Iterator i = cCliente.iterator();\n while (i.hasNext()) {\n jCBCliente.addItem(i.next());\n }\n\n i = null;\n i = cEstado.iterator();\n while (i.hasNext()) {\n jCBEstado.addItem(i.next());\n }\n\n i = null;\n i = cCidade.iterator();\n while (i.hasNext()) {\n jCBCidade.addItem(i.next());\n }\n i = null;\n i = cFornecedor.iterator();\n while (i.hasNext()) {\n jCBFornecedor.addItem(i.next());\n }\n\n }", "private void populateViews() {\n TextView songName = findViewById(R.id.songName);\n songName.setText(songs.getSongName());\n TextView albumName = findViewById(R.id.albumPlayerAlbumName);\n albumName.setText(songs.getAlbumName());\n TextView artistName = findViewById(R.id.albumPlayerArtistName);\n artistName.setText(songs.getArtistName());\n ImageView albumCover = findViewById(R.id.albumPlayerImage);\n albumCover.setImageResource(songs.getId());\n\n }", "public void referenciaComponentes() {\n campoModeloCelular = findViewById(R.id.CampoModeloCelular);\n campoNumeroChip1 = findViewById(R.id.radioButtonNumChip1);\n campoNumeroChip2 = findViewById(R.id.radioButtonNumChip2);\n numeroDoChip1 = findViewById(R.id.EditTextNumChip1);\n numeroDoChip2 = findViewById(R.id.EditTextNumChip2);\n IMEI1 = findViewById(R.id.campoIMEI1);\n IMEI2 = findViewById(R.id.campoIMEI2);\n\n // iniciando alguns componentes invisiveis\n IMEI2.setVisibility(View.GONE);\n numeroDoChip2.setVisibility(View.GONE);\n }", "private void findAllViews(View view) {\n recyclerView = view.findViewById(R.id.news_recycler_view);\n emptyView = view.findViewById(R.id.empty_view);\n progressBar = view.findViewById(R.id.progress_bar);\n swipeRefreshLayout = view.findViewById(R.id.swipe_container);\n }" ]
[ "0.61843616", "0.61522424", "0.61440897", "0.57998836", "0.57796323", "0.5769037", "0.57541233", "0.5739019", "0.571818", "0.5617624", "0.55996555", "0.5583889", "0.5570163", "0.5533782", "0.55310446", "0.55175084", "0.5517488", "0.5508689", "0.5463459", "0.54594266", "0.5453704", "0.54393923", "0.54390174", "0.541358", "0.54067767", "0.5406296", "0.5400404", "0.5355994", "0.53322625", "0.5326584", "0.53040355", "0.5293657", "0.528847", "0.5249236", "0.5239925", "0.520952", "0.51888055", "0.5185984", "0.51851577", "0.5166341", "0.5164661", "0.5142852", "0.51350516", "0.51336735", "0.51188904", "0.51148844", "0.5113159", "0.51101774", "0.5097474", "0.5096961", "0.5096227", "0.5089391", "0.5085471", "0.5079514", "0.50760794", "0.50743955", "0.50737154", "0.50727105", "0.5069423", "0.506876", "0.50568557", "0.5051255", "0.5049627", "0.5048689", "0.50484234", "0.5046716", "0.50427186", "0.5036729", "0.50323075", "0.50322294", "0.5020879", "0.5017338", "0.50171554", "0.5014899", "0.5012395", "0.5006117", "0.49941808", "0.49932423", "0.49882096", "0.4974961", "0.49707654", "0.49658945", "0.49644926", "0.49577093", "0.49562016", "0.49401638", "0.49323794", "0.49319503", "0.4931651", "0.49314886", "0.49239367", "0.49189046", "0.4918376", "0.49178588", "0.49116316", "0.4911359", "0.4901708", "0.49004325", "0.4900074", "0.48950025" ]
0.7114154
0
TODO Autogenerated method stub
@Override public void initialize(URL location, ResourceBundle resources) { question.setItems(questionlist); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Function to find the length of longest common subsequence in two strings.
static int lcs(int x, int y, String s1, String s2) { // your code here int len1 = x; int len2 = y; int dp[][] = new int[len1+1][len2+1]; for(int i=0;i<=len1;i++){ dp[i][0] = 0; } for(int i=0;i<=len2;i++){ dp[0][i] = 0; } for(int i=1;i<=len1;i++){ for(int j=1;j<=len2;j++){ if(s1.charAt(i-1)==s2.charAt(j-1)){ dp[i][j]=1+dp[i-1][j-1]; } else { dp[i][j] = Math.max(dp[i-1][j],dp[i][j-1]); } } } return dp[len1][len2]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int longestCommonSubsequenceLength(String s1, String s2)\n {\n return longestCommonSubsequenceLength(s1.toCharArray(), s2.toCharArray(), s1.length(), s2.length());\n }", "public static int longestCommonSubsequence2(String text1, String text2) {\n int[] length = new int[text2.length() + 1];\n\n for (int i = 1; i <= text1.length(); ++i) {\n int previous = length[0];\n\n for (int j = 1; j <= text2.length(); ++j) {\n int temp = length[j];\n\n if (text1.charAt(i - 1) == text2.charAt(j - 1)) {\n length[j] = 1 + previous;\n } else {\n length[j] = Math.max(length[j], length[j - 1]);\n }\n\n previous = temp;\n }\n }\n\n return length[text2.length()];\n }", "public int longestCommonSubsequence(String text1, String text2) {\n int[] f = new int[text2.length()+1];\n int temp = 0;\n for (int i = 1; i <= text1.length(); ++i) {\n int last = 0;\n for (int j = 1; j <= text2.length(); ++j) {\n temp = f[j];\n if (text1.charAt(i-1) == text2.charAt(j-1)) f[j] = last + 1;\n else f[j] = Math.max(f[j], f[j-1]);\n last = temp;\n }\n }\n return f[text2.length()];\n }", "public int longestCommonSubstring(String A, String B) {\n int max = 0;\n for (int i = 0; i < A.length(); i++) {\n for (int j = 0; j < B.length(); j++) {\n int count = 0;\n while (i + count < A.length() && j + count < B.length() && A.charAt(i + count) == B.charAt(j + count)){\n count ++;\n }\n max = Math.max(max, count);\n }\n\n }\n return max;\n }", "public int longestCommonSubsequence(String text1, String text2) {\n\t\tint m = text1.length();\n\t\tint n = text2.length();\n\t\tint[][] dp = new int[ m + 1][];\n\t\tfor( int i = 0; i < dp.length; i++ ) {\n\t\t\tdp[i] = new int[ n + 1]; \n\t\t}\n\n\t\tfor( int i = 1; i <= m; i++ ) {\n\t\t\tchar c1 = text1.charAt(i - 1);\n\t\t\tfor( int j = 1; j <= n; j++ ) {\n\t\t\t\tchar c2 = text2.charAt(j - 1);\n\n\t\t\t\tif( c1 == c2 ) {\n\t\t\t\t\tdp[i][j] = dp[i-1][j-1] + 1;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = Math.max( dp[i-1][j], dp[i][j-1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dp[m][n];\n\t}", "private void longestCommonSubsequence(String str1, String str2) {\n\tdp\t= new int[str1.length()+1][str2.length()+1];\t\r\n\tString lcs = \"\";\r\n\tint i=0,j=0;\r\n\tfor(i=0;i<str1.length();i++){\r\n\t\tfor(j=0;j<str2.length();j++){\r\n\t\t\r\n\t\t\tif(str1.charAt(i)==str2.charAt(j)){\r\n\t\t\t\tdp[i+1][j+1] = dp[i][j] + 1; \r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tdp[i+1][j+1] =\r\n Math.max(dp[i+1][j], dp[i][j+1]);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}\r\n\t\tSystem.out.println(dp[dp.length-1][dp[0].length-1]);\r\n\t\t\r\n\t}", "public int longestCommonSubsequence(String text1, String text2) {\n\t\tint m=text1.length();\n\t\tint n=text2.length();\n\t\tint lcs[][]=new int[m+1][n+1];\n\t\t\n\t\tfor(int i=1; i<=m; i++) {\n\t\t\tfor(int j=1; j<=n; ++j){\n\t\t\t\tif(text1.charAt(i-1)==text2.charAt(j-1))\n\t\t\t\t\tlcs[i][j]=1+lcs[i-1][j-1];\n\t\t\t\telse\n\t\t\t\t\tlcs[i][j]=Math.max(\n\t\t\t\t\t\t\tlcs[i][j-1], lcs[i-1][j]);\n\t\t\t}\n\t\t}\n return lcs[m][n];\n }", "public int longestCommonSubsequence(String text1, String text2) {\n int[][] dp = new int[text1.length()][text2.length()];\n\n // init the first column\n for (int i = 0; i < text1.length(); i++) {\n // if they match characters\n if (text1.charAt(i) == text2.charAt(0)) {\n dp[i][0] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[i - 1][0] > dp[i][0]) {\n dp[i][0] = dp[i - 1][0];\n }\n }\n // init the first row\n for (int i = 0; i < text2.length(); i++) {\n // if they match characters\n if (text1.charAt(0) == text2.charAt(i)) {\n dp[0][i] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[0][i - 1] > dp[0][i]) {\n dp[0][i] = dp[0][i - 1];\n }\n }\n\n // use the results from the previous DP indexes for the text 1 and 2 subsequences\n // to compare which subsequence we should use\n for (int i = 1; i < dp.length; i++) {\n for (int j = 1; j < dp[i].length; j++) {\n // check if we found a character match\n if (text1.charAt(i) == text2.charAt(j)) {\n // if so, use the LCS from the i-1,j-1 index to hold the new length\n dp[i][j] = dp[i - 1][j - 1] + 1;\n } else if (dp[i - 1][j] > dp[i][j - 1]) {\n // if there was no character match, use the\n // LCS length from the column before or row above\n dp[i][j] = dp[i - 1][j];\n } else {\n dp[i][j] = dp[i][j - 1];\n }\n }\n }\n // return the result from dp[text1.length()-1][text2.length()-1]\n // as it holds the longest subseqence\n return dp[text1.length()-1][text2.length()-1];\n }", "public static int longestCommonSubsequence1(String text1, String text2) {\n int L1 = s1.length();\n int L2 = s2.length();\n\n int[][] counts = new int[L1][L2];\n\n for (int idx1 = 0; idx1 < L1; ++idx1) {\n for (int idx2 = 0; idx2 < L2; ++idx2) {\n\n if (s1.charAt(idx1) == s2.charAt(idx2)) {\n if (idx1 >= 1 && idx2 >= 1) {\n counts[idx1][idx2] = 1 + counts[idx1 - 1][idx2 - 1];\n } else {\n counts[idx1][idx2] = 1;\n }\n } else {\n int count1 = idx1 >= 1 ? counts[idx1 - 1][idx2] : 0;\n int count2 = idx2 >= 1 ? counts[idx1][idx2 - 1] : 0;\n counts[idx1][idx2] = Math.max(count1, count2);\n }\n }\n }\n\n return counts[L1 - 1][L2 - 1];\n }", "public static int longestCommonSubsequence(String text1, String text2) {\n Map<Character, List<Integer>> characterListMap = new HashMap<>();\n char[] cA = text1.toCharArray();\n for (int i = 0; i < cA.length; i++) {\n if (characterListMap.get(cA[i]) == null) {\n List<Integer> list = new ArrayList<>();\n list.add(i);\n characterListMap.put(cA[i], list);\n } else {\n characterListMap.get(cA[i]).add(i);\n }\n }\n char[] cA2 = text2.toCharArray();\n int i = 0;\n int prevBiggest = 0;\n int previndex = 0;\n int currBiggest = 0;\n while (i < cA2.length && characterListMap.get(cA2[i]) == null) {\n i++;\n }\n if (i < cA2.length && characterListMap.get(cA2[i]) != null) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n i++;\n currBiggest++;\n }\n\n\n for (; i < cA2.length; i++) {\n if (characterListMap.containsKey(cA2[i])) {\n if (characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1) > previndex) {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n currBiggest++;\n } else {\n previndex = characterListMap.get(cA2[i]).get(characterListMap.get(cA2[i]).size() - 1);\n if (currBiggest > prevBiggest) {\n prevBiggest = currBiggest;\n }\n currBiggest = 1;\n }\n }\n }\n\n return prevBiggest > currBiggest ? prevBiggest : currBiggest;\n }", "public int longestCommonSubsequence0(String text1, String text2) {\n final int L1 = text1.length();\n final int L2 = text2.length();\n\n int[][] counts = new int[L1][L2];\n\n // BASE\n counts[0][0] = text1.charAt(0) == text2.charAt(0) ? 1 : 0;\n\n for (int idx = 1; idx < L1; ++idx) {\n counts[idx][0] = text1.charAt(idx) == text2.charAt(0) ? 1 : counts[idx - 1][0];\n }\n\n for (int idx = 1; idx < L2; ++idx) {\n counts[0][idx] = text1.charAt(0) == text2.charAt(idx) ? 1 : counts[0][idx - 1];\n }\n\n // TRANSFORM\n for (int i = 1; i < L1; ++i) {\n for (int j = 1; j < L2; ++j) {\n\n if (text1.charAt(i) == text2.charAt(j)) {\n counts[i][j] = counts[i - 1][j - 1] + 1;\n } else {\n counts[i][j] = Math.max(counts[i - 1][j], counts[i][j - 1]);\n }\n }\n }\n\n return counts[L1 - 1][L2 - 1];\n }", "int lcs(int x, int y, string s1, string s2,int[][] str){\n \n if(text1.length()==0||text2.length()==0) {\n return 0;\n }\n \n if(str[x][y]!=0) {\n return str[x][y];\n }\n \n int ans =0;\n \n if(text1.charAt(0)== text2.charAt(0)) {\n \n \n \n ans = 1 + longestCommonSubsequence(x+1,y+1,ros1, ros2,str);\n \n \n }\n else {\n \n int first = longestCommonSubsequence(x,y+1,ros1, text2,str);\n int second = longestCommonSubsequence(x+1,y,text1, ros2,str);\n \n ans = Math.max(first,second);\n \n \n \n }\n \n str[x][y] = ans;\n return ans;\n \n \n \n \n \n}", "public int longestCommonSubsequence(String text1, String text2) {\n int[][] dp = new int[text1.length()][text2.length()];\n\n // init the first column\n for (int i = 0; i < text1.length(); i++) {\n // if they match characters\n if (text1.charAt(i) == text2.charAt(0)) {\n dp[i][0] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[i - 1][0] > dp[i][0]) {\n dp[i][0] = dp[i - 1][0];\n }\n }\n // init the first row\n for (int i = 0; i < text2.length(); i++) {\n // if they match characters\n if (text1.charAt(0) == text2.charAt(i)) {\n dp[0][i] = 1;\n }\n // check if the the subseq length is larger from the substring at 0...i-1\n if (i > 0 && dp[0][i - 1] > dp[0][i]) {\n dp[0][i] = dp[0][i - 1];\n }\n }\n\n // use the results from the previous DP indexes for the text 1 and 2 subsequences\n // to compare which subsequence we should use\n for (int i = 1; i < dp.length; i++) {\n boolean characterMatch = false;\n for (int j = 1; j < dp[i].length; j++) {\n // leverage the previous result to determine what the\n // starting number will be, since we are using that\n // to enable comparing the characters at i and j and\n // appending that to what the previous longest subsequence\n // was.\n\n if (dp[i - 1][j] > dp[i][j - 1]) {\n dp[i][j] = dp[i - 1][j];\n } else {\n dp[i][j] = dp[i][j - 1];\n // ONLY update the length IF the choice was if the subseq length came from\n // the same index for i, because it \n if (!characterMatch && text1.charAt(i) == text2.charAt(j)) {\n dp[i][j]++;\n characterMatch = true;\n }\n }\n }\n }\n // return the result from dp[text1.length()-1][text2.length()-1]\n // as it holds the longest subseqence\n return dp[text1.length()-1][text2.length()-1];\n }", "private static String lcs(String a, String b) {\n\n int rows = a.length();\n int cols = b.length();\n\n // Use two arrays to save space for a full metrics\n int[] previousRow = new int[cols];\n int[] currentRow = new int[cols];\n\n String longest = \"\"; // Longest so far\n\n for (int i=0; i<rows; ++i) {\n char r = a.charAt(i);\n for (int j=0; j<cols; ++j) {\n if (r == b.charAt(j)) {\n // Match!\n int matchLength = 1;\n if (j != 0) {\n matchLength += previousRow[j-1];\n }\n currentRow[j] = matchLength; \n if (matchLength > longest.length()) {\n // Fond a new candidate\n longest = a.substring(i - matchLength + 1, i + 1);\n }\n }\n // Clear out previous array so that it can be used for next round\n if (j != 0) {\n previousRow[j-1] = 0;\n }\n }\n\n // Reuse previous row, make it current.\n // It is already zero-ed out upto the last item, which won't be read\n int[] tmpRow = previousRow;\n previousRow = currentRow;\n currentRow = tmpRow;\n }\n\n return longest;\n }", "public static String getLongestSubSeq(String s1, String s2) {\n if (s1 == null || s2 == null) {\n return null;\n }\n Set<String> set1 = getAllSubSeq(s1);\n Set<String> set2 = getAllSubSeq(s2);\n if (set1 == null || set2 == null || set1.size() == 0 || set2.size() == 0) {\n return null;\n }\n\n String longest = \"\";\n for (String s : set1) {\n if (s.length() > longest.length() && set2.contains(s)) {\n longest = s;\n }\n }\n\n return longest.length() > 0 ? longest : null;\n }", "static int longestSubsequence(String x, String y) {\n char[] strX = x.toCharArray();\n char[] strY = y.toCharArray();\n\n Map<Character, Integer> xMap = new HashMap<>();\n Map<Character, Integer> yMap = new HashMap<>();\n\n for (int i = 0; i < strX.length; i++) {\n char c = strX[i];\n if (xMap.containsKey(c)) {\n xMap.put(c, xMap.get(c) + 1);\n } else {\n xMap.put(c, 1);\n }\n }\n\n for (int i = 0; i < strY.length; i++) {\n char c = strY[i];\n if (yMap.containsKey(c)) {\n yMap.put(c, yMap.get(c) + 1);\n } else {\n yMap.put(c, 1);\n }\n }\n\n System.out.println(xMap);\n System.out.println(yMap);\n\n ArrayList<Character> subsequence = new ArrayList<>();\n\n // first find match subsequence\n for (Character c : yMap.keySet()) {\n if (!xMap.containsKey(c)) {\n continue;\n }\n\n int xCount = xMap.get(c);\n int yCount = yMap.get(c);\n int charCount = xCount < yCount ? xCount : yCount;\n\n for (int i = 0; i < charCount; i++) {\n subsequence.add(c);\n }\n }\n\n System.out.println(\"may be seq\" + subsequence);\n\n int max = 0;\n for (int i = 0; i < subsequence.size(); i++) {\n char c = subsequence.get(i);\n ArrayList<Character> remains = new ArrayList<>(subsequence);\n remains.remove(i);\n StringBuilder curr = new StringBuilder();\n curr.append(c);\n// System.out.println(\"max\" + max);\n int result = findPermutation(y, curr, remains, max);\n if (result > max) {\n max = result;\n }\n }\n\n // find matching permutation\n\n System.out.println(\"result\" + max);\n // then find sub string\n return max;\n }", "public static int getCommonStrLength(String str1, String str2) {\n\t\t\n\t\tint len1 = str1.length();\n\t\tint len2 = str2.length();\n\t\t\n\t\tif (len1<=0 || len2<=0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tchar[] s1 = str1.toLowerCase().toCharArray();\n\t\tchar[] s2 = str2.toLowerCase().toCharArray();\n\t\tint[][] dp = new int[len1][len2];\n\t\tint result = 0;\n\t\t\n\t\tfor (int i=0; i<len1; i++) {\n\t\t\tfor (int j=0; j<len2; j++) {\n\t\t\t\tif (s1[i] == s2[j]) {\n\t\t\t\t\tif (i==0 || j==0) {\n\t\t\t\t\t\tdp[i][j] = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[i][j] = dp[i-1][j-1] + 1;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (dp[i][j] > result) {\n\t\t\t\t\tresult = dp[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t\t\t\n\t}", "public int commonPrefixLength(String s1, String s2)\r\n {\r\n\r\n int length = 0;\r\n if (s1.isEmpty() || s2.isEmpty())\r\n {\r\n return 0;\r\n }\r\n while (s1.charAt(length) == s2.charAt(length))\r\n {\r\n length++;\r\n //if (k >= s1.length() || k >= s2.length() || k >= system.getLookupTableSize() - 1)\r\n if (length >= s1.length() || length >= s2.length())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return length;\r\n\r\n }", "public static String longestCommonPrefix(String a, String b){\r\n int l = Math.min(a.length(), b.length());\r\n for (int i = 0; i < l; i++){\r\n if (a.charAt(i) != b.charAt(i))\r\n return a.substring(0,i);\r\n }\r\n return a.substring(0,l);\r\n }", "public static String longestSubSequence(String str1, int st1, String str2, int st2) {\n if ((st1 >= str1.length()) || (st2 >= str2.length()))\n return null;\n String subStr1 = str1.substring(st1, str1.length());\n String subStr2 = str2.substring(st2, str2.length());\n String lonSeq1 = null;\n String lonSeq2 = null;\n if (subStr1.length() == 1) {\n lonSeq1 = (str2.contains(subStr1)) ? subStr1 : null;\n } else {\n lonSeq1 = longestSubSequence(str1, st1 + 1, str2, st2);\n if ((lonSeq1 != null) && (!lonSeq1.isEmpty())) {\n String sub2 = str2.substring(0, str2.indexOf(lonSeq1.charAt(0)));\n if ((sub2 != null) && (!sub2.isEmpty())) {\n if (sub2.contains(String.valueOf(str1.charAt(st1)))) {\n lonSeq1 = str1.charAt(st1) + lonSeq1;\n }\n }\n }\n }\n if (subStr2.length() == 1) {\n lonSeq2 = (str1.contains(subStr2)) ? subStr2 : null;\n } else {\n // find longestSequence with str1 index increased\n lonSeq2 = longestSubSequence(str1, st1, str2, st2 + 1);\n if ((lonSeq2 != null) && (!lonSeq2.isEmpty())) {\n // find the index of longSeq2 in str1\n String sub1 = str1.substring(0, str1.indexOf(lonSeq2.charAt(0)));\n if ((sub1 != null) && (!sub1.isEmpty())) {\n if (sub1.contains(String.valueOf(str2.charAt(st2)))) {\n lonSeq2 = str2.charAt(st2) + lonSeq2;\n }\n }\n }\n\n }\n\n if ((lonSeq1 == null) || (lonSeq1.isEmpty())) return lonSeq2;\n if ((lonSeq2 == null) || (lonSeq2.isEmpty())) return lonSeq1;\n return (lonSeq1.length() > lonSeq2.length()) ? lonSeq1 : lonSeq2;\n }", "private int lcs(String word1, String word2) {\n int m = word1.length();\n int n = word2.length();\n int[][] dp = new int[m + 1][n + 1];\n //mem[i][j] means the LCS length formed by A[:i] and B[:j]\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n if (word1.charAt(i) == word2.charAt(j)) {\n dp[i + 1][j + 1] = dp[i][j] + 1;\n } else {\n dp[i + 1][j + 1] = Math.max(dp[i + 1][j], dp[i][j + 1]);\n }\n }\n }\n return dp[m][n];\n }", "public int lengthOfLongestSubstringTwoDistinct(String s) {\n int firstC = 0, secondC = 0;\n int start = 0, end = 0, len = s.length();\n int res = 0;\n char first =' ', second = ' ';\n while(end < len) {\n char cur = s.charAt(end);\n if(cur == first) {\n firstC++;\n }\n else if(cur == second) {\n secondC++;\n }\n else {\n while(firstC != 0 && secondC != 0) {\n if(s.charAt(start) == first) firstC--;\n else secondC--;\n start++;\n }\n if(firstC == 0) {\n first = cur;\n firstC = 1;\n }\n else {\n second = cur;\n secondC = 1;\n }\n }\n res = Math.max(res, end - start + 1);\n end++;\n }\n return res;\n }", "public static String longestSubstringLength(String X, String Y){\n int[][] L = new int[X.length()][Y.length()];\n // stores the length of the longest substring\n int max = 0;\n // stores the last index of the longest common substring\n int lastIndex = 0;\n // outer loop checks for every character of first string\n for(int i = 0; i < X.length(); i++){\n // inner loop checks for every character of second string\n for(int j =0; j < Y.length(); j++){\n // when character matches\n if(X.charAt(i) == Y.charAt(j)){\n // check if it is the first row or column\n if(i == 0 || j == 0){\n L[i][j] = 1;\n }else{\n // use earlier calculated longest length and add one\n L[i][j] = L[i - 1][j - 1] + 1;\n // check which is greater\n if(L[i][j] > max){\n // store length of the longest substring\n max = L[i][j];\n // index of the last character of the common substring\n lastIndex = i;\n }\n }\n }\n // when characters do not match\n else{\n // assign length as 0\n L[i][j] = 0;\n }\n }\n }\n // extract substring which will be the longest\n String longSubstring = X.substring(lastIndex - max + 1, lastIndex + 1);\n return longSubstring;\n }", "private static int longestPalindromicSubsequence(String str1) {\n\t\tStringBuilder str2 = new StringBuilder(str1);\n\t\tstr2.reverse().toString();\n\t\tString strtemp = str2.toString(); \n\t\treturn LCSDP(str1,strtemp,str1.length(),str1.length());\n\t}", "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}", "public static String longestCommonSubstring(String A, String B) {\n int[][] best = new int[A.length() + 1][B.length() + 1];\n\n for (int i = 1; i <= A.length(); ++i) {\n for (int j = 1; j <= B.length(); ++j) {\n if (A.charAt(i - 1) == B.charAt(j - 1)) {\n best[i][j] = best[i - 1][j - 1] + 1;\n } else {\n best[i][j] = Math.max(best[i - 1][j], best[i][j - 1]);\n }\n }\n }\n\n int size = best[A.length()][B.length()];\n char[] result = new char[size];\n\n // Build the result by walking the best array backwards\n int i = A.length(), j = B.length();\n while (i != 0 && j != 0) {\n if (A.charAt(i - 1) == B.charAt(j - 1)) {\n result[--size] = A.charAt(i - 1);\n --i;\n --j;\n } else if (best[i - 1][j] > best[i][j - 1]) {\n --i;\n } else {\n --j;\n }\n }\n\n return new String(result);\n }", "public static int shortestCommonSubsequence(String sequence1, String sequence2) {\r\n\t\tint lcs = longestCommonSubsequence(sequence1, sequence2);\r\n\t\tint shortestCommonSupersequence = sequence1.length() + sequence2.length() - lcs;\r\n\t\treturn shortestCommonSupersequence;\r\n\t}", "private int commonLength( int i0, int i1 )\n {\n \tint n = 0;\n \twhile( (text[i0] == text[i1]) && (text[i0] != STOP) ){\n \t i0++;\n \t i1++;\n \t n++;\n \t}\n \treturn n;\n }", "public static int lcs(String s1, String s2, int i, int j) {\n\n if (i < 0 || j < 0)\n return 0;\n if (s1.charAt(i) == s2.charAt(j)) {\n // System.out.println(s1.charAt(i) + \" \" + v++);\n return (1 + lcs(s1, s2, i - 1, j - 1));\n } else {\n // System.out.println(v++);\n return (Math.max(lcs(s1, s2, i, j - 1), lcs(s1, s2, i - 1, j)));\n }\n\n }", "public int longestPalindromeSubseqV2(String s) {\n int n = s.length();\n Integer[][] memo = new Integer[n][n];\n return helper(s, memo, 0, n - 1);\n }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "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 }", "private String longestCommonPrefixVS(String[] strs){\n\t\tif (strs == null || strs.length == 0) return \"\";\n\t\t for (int i = 0; i < strs[0].length() ; i++){\n\t\t char c = strs[0].charAt(i);\n\t\t for (int j = 1; j < strs.length; j ++) {\n\t\t if (i == strs[j].length() || strs[j].charAt(i) != c)\n\t\t return strs[0].substring(0, i);\n\t\t }\n\t\t }\n\t\t return strs[0];\n\t}", "private static String longestCommonPrefix(String[] strs) {\n\t\tif (strs == null || strs.length == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tint minLen = Integer.MAX_VALUE;\n\t\tfor (String str : strs) {\n\t\t\tif (minLen > str.length()) {\n\t\t\t\tminLen = str.length();\n\t\t\t}\n\t\t}\n\t\tif (minLen == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\tfor (int j = 0; j < minLen; j++) {\n\t\t\tchar prev = '0';\n\t\t\tfor (int i = 0; i < strs.length; i++) {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tprev = strs[i].charAt(j);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (prev != strs[i].charAt(j)) {\n\t\t\t\t\treturn strs[i].substring(0, j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn strs[0].substring(0, minLen);\n\t}", "private String longestCommonPrefix(String[] strs, int left, int right) {\n if (left == right) {\n return strs[left];\n } else {\n int mid = left + (right - left) / 2;\n String leftPrefix = longestCommonPrefix(strs, left, mid);\n String rightPrefix = longestCommonPrefix(strs, mid + 1, right);\n return commonPrefix(leftPrefix, rightPrefix);\n }\n }", "public String longestCommonPrefix_solution2(String[] strs) {\n if (strs == null || strs.length == 0) return \"\";\n for (int i = 0; i < strs[0].length() ; i++){\n char c = strs[0].charAt(i);\n for (int j = 1; j < strs.length; j ++) {\n if (i == strs[j].length() || strs[j].charAt(i) != c)\n return strs[0].substring(0, i);\n }\n }\n return strs[0];\n }", "public int lengthOfLongestSubstring(String s) {\n return sol2a(s); \n //return sol3_WRONG(s); //NO! D & C (unlike LC53)\n }", "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 }", "public static int commonCharacterCount(String s1, String s2) {\n\t int count = 0;\n\t int auxArray[] = new int[s2.length()];\n\t for (int i = 0; i < auxArray.length; i++){\n\t\tauxArray[i] = 0;\n\t }\n\t \n\t for(int i = 0; i < s1.length(); i++){\n\t\tfor(int j = 0; j < s2.length(); j++){\n\t\t if( auxArray[j] == 1){\n\t\t continue;\n\t\t }\n\t\t else{\n\t\t if(s1.charAt(i) == s2.charAt(j)){\n\t\t auxArray[j] = 1;\n\t\t count += 1;\n\t\t break;\n\t\t }\n\t\t }\n\t\t}\n\t }\n\t return count;\n\t}", "public static void main(String[] args) {\n\t\tString s = \"ababacbaccc\";//{abcbbbbcccbdddadacb,bcbbbbcccb,10}\n\t\tSystem.out.println(lengthOfLongestSubstringTwoDistinct(s));\n\t}", "public int lengthOfLongestSubstring(String s) {\n int[] chars = new int[128];\n\n int left = 0;\n int right = 0;\n\n int res = 0;\n while (right < s.length()) {\n char r = s.charAt(right);\n chars[r]++;\n\n while (chars[r] > 1) {\n char l = s.charAt(left);\n chars[l]--;\n left++;\n }\n\n res = Math.max(res, right - left + 1);\n\n right++;\n }\n return res;\n }", "private String longestCommonPrefixHS(String[] strs){\n\t\tif (strs.length == 0) return \"\";\n\t\tString prefix = strs[0];\n\t\tfor (int i = 1; i < strs.length; i++){\n\t\t\twhile (strs[i].indexOf(prefix) != 0) {\n\t\t\t\tprefix = prefix.substring(0, prefix.length() - 1);\n\t\t\t\tif (prefix.isEmpty()) return \"\";\n\t\t\t}\n\t\t}\n\t\treturn prefix;\n\t}", "public String longestCommonPrefixApproach2(String[] strs) {\n\t\tif (strs == null || strs.length == 0) return \"\";\n\t\tfor (int i = 0; i < strs[0].length() ; i++){\n\t\t\tchar c = strs[0].charAt(i);\n\t\t\tfor (int j = 1; j < strs.length; j ++) {\n\t\t\t\tif (i == strs[j].length() || strs[j].charAt(i) != c)\n\t\t\t\t\treturn strs[0].substring(0, i); \n\t\t\t}\n\t\t}\n\t\treturn strs[0];\n\t}", "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 static int[] longestCommonSubstring(int[] A, int[] B) {\n int[][] best = new int[A.length + 1][B.length + 1];\n\n for (int i = 1; i <= A.length; ++i) {\n for (int j = 1; j <= B.length; ++j) {\n if (A[i - 1] == B[j - 1]) {\n best[i][j] = best[i - 1][j - 1] + 1;\n } else {\n best[i][j] = Math.max(best[i - 1][j], best[i][j - 1]);\n }\n }\n }\n\n int size = best[A.length][B.length];\n int[] result = new int[size];\n\n // Build the result by walking the best array backwards\n int i = A.length, j = B.length;\n while (i != 0 && j != 0) {\n if (A[i - 1] == B[j - 1]) {\n result[--size] = A[i - 1];\n --i;\n --j;\n } else if (best[i - 1][j] > best[i][j - 1]) {\n --i;\n } else {\n --j;\n }\n }\n\n return result;\n }", "public String longestCommonPrefix(String[] strs) {\n \n\t\tif(strs==null || strs.length==0||strs[0].length()==0)\n\t\t\treturn \"\";\n\t\t\n \tfor (int j = 0; j < strs[0].length(); j++) {\n \t\t\tfor (int i = 1; i < strs.length; i++) {\n\t\t\t\tif (j >= strs[i].length()) \n\t\t\t\t\treturn strs[0].substring(0, strs[i].length());\n\t\t\t\tif (strs[i].charAt(j) != strs[0].charAt(j))\n \t\t\treturn strs[0].substring(0, j);\n\t\t\t}\n\t\t}\n\t\treturn strs[0];\n \t}", "public int lengthOfLongestSubstringTwoDistinct(String s) {\n if(s == null || s.length() == 0)\n return 0;\n \n //corner case\n int n = s.length();\n if(n < 3)\n return n;\n \n int left = 0;\n int right = 0;\n HashMap<Character,Integer> sMap = new HashMap<>(); // HashMap storing Character, rightmost position\n int maxLen = 2;\n \n while(right < n) {\n // when the slidewindow contains less than three characters\n sMap.put(s.charAt(right), right++);\n \n // when the slidewindow contains three characters\n if(sMap.size() == 3) {\n int i = Collections.min(sMap.values());\n sMap.remove(s.charAt(i)); // remove leftmost character\n left = i+1;\n }\n maxLen = Math.max(maxLen, right - left);\n }\n return maxLen;\n }", "public static String longestCommonPrefix(String[] strs) {\n \tif(strs==null){\n \t\treturn null;\n \t}\n \tif(strs.length==0){\n \t\treturn \"\";\n \t}\n \tint prefix_count=strs[0].length();\n \tchar[] s=strs[0].toCharArray();\n \tfor(int i=1;i<strs.length;i++){\n \t\tchar[] str=strs[i].toCharArray();\n \t\tint count=0;\n \t\twhile (count<str.length && count<prefix_count){\n \t\t\tif(str[count]!=s[count]){\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tcount++;\n \t\t\t}\n \t\t}\n \t\tprefix_count=count;\n \t}\n \treturn strs[0].substring(0, prefix_count);\n }", "public static void main(String[] args) {\n String str1 = \"ABABAB\";\n String str2 = \"ABAB\";//\n// String str1 = \"LEFT\";\n// String str2 = \"RIG\";\n String result = gcdOfStrings(str1, str2);\n System.out.println(\"result = \" + result);\n }", "public static int lengthOfLongestSubstring(String s) {\n if(s.length()==1)\n return 1;\n\n int sum=0;\n int left = 0, right = 0;\n boolean[] used = new boolean[128];\n\n while(right < s.length()){\n if(used[s.charAt(right)] == false){\n used[s.charAt(right)] = true;\n right++;\n }else{\n sum = Math.max(sum, right-left);\n while(left<right && s.charAt(right) != s.charAt(left)){\n used[s.charAt(left)] = false;\n left++;\n }\n left++;\n right++;\n }\n }\n sum = Math.max(sum, right - left);\n\n return sum;\n }", "static int lcs(int p, int q, String s1, String s2){\n int [][]t=new int[p+1][q+1];\n for(int i=0;i<p+1;i++){\n for(int j=0;j<q+1;j++){\n if(i==0||j==0){\n t[i][j]=0;\n }\n }\n }\n for(int i=1;i<p+1;i++){\n for(int j=1;j<q+1;j++){\n if(s1.charAt(i-1)==s2.charAt(j-1)){\n t[i][j]=1+t[i-1][j-1];\n }\n else{\n t[i][j]=Math.max(t[i-1][j],t[i][j-1]);\n }\n }\n }\n return t[p][q];\n }", "private static int commonChild(String s1, String s2) {\n //reduce of iterations\n //make strings shorter\n //TreeMap to keep order\n Map<Integer, Character> map1 = new TreeMap<>();\n Map<Integer, Character> map2 = new TreeMap<>();\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < s1.length(); i++) {\n for (int j = 0; j < s2.length(); j++) {\n char charOfS1 = s1.charAt(i);\n char charOfS2 = s2.charAt(j);\n if (charOfS1 == charOfS2) {\n map1.put(i, charOfS1);\n map2.put(j, charOfS2);\n }\n }\n }\n for (Map.Entry<Integer, Character> entry : map1.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s1 = stringBuilder.toString();\n stringBuilder = new StringBuilder();\n for (Map.Entry<Integer, Character> entry : map2.entrySet()) {\n stringBuilder.append(entry.getValue());\n }\n s2 = stringBuilder.toString();\n /*\n ------------------------------------------------\n */\n int lengthS1 = s1.length();\n int lengthS2 = s2.length();\n int[][] arr = new int[lengthS1+1][lengthS2+1];\n for (int i = 1; i <= lengthS1; i++) {\n for (int j = 1; j <= lengthS2; j++) {\n char charI = s1.charAt(i - 1); //from 0\n char charJ = s2.charAt(j - 1); //from 0\n arr[i][j] = (charI==charJ) ?\n arr[i-1][j-1] + 1 :\n Math.max(arr[i-1][j],arr[i][j-1]);\n }\n }\n\n return arr[lengthS1][lengthS2];\n }", "public String longestCommonPrefix(String[] strs) {\n\t\tif (strs == null || strs.length == 0)\n\t\t\treturn \"\";\n\t\tint minLen = Integer.MAX_VALUE;\n\t\tfor (String str : strs)\n\t\t\tminLen = Math.min(minLen, str.length());\n\t\tint low = 1;\n\t\tint high = minLen;\n\t\twhile (low <= high) {\n\t\t\tint middle = (low + high) / 2;\n\t\t\tif (isCommonPrefix(strs, middle))\n\t\t\t\tlow = middle + 1;\n\t\t\telse\n\t\t\t\thigh = middle - 1;\n\t\t}\n\t\treturn strs[0].substring(0, (low + high) / 2);\n\t}", "public static int lengthOfLongestSubstring(String s) {\n int[] dp=new int[256];\n for(int i=0;i<dp.length;i++){\n dp[i]=-1;\n }\n int start=0,result=0;\n for(int i=0;i<s.length();i++){\n start=Math.max(dp[s.charAt(i)]+1,start);\n dp[s.charAt(i)]=i;\n result=Math.max(result,i-start+1);\n }\n return result;\n }", "public abstract String getLongestRepeatedSubstring();", "@Test\n\tpublic void eg1() {\n\t\tString s=\"babad\";\n\t\tSystem.out.println(longestPalindromicSubString(s));\n\t\t\n\t}", "public String longestCommonPrefix(String[] strs) {\n if (strs == null || strs.length == 0) return \"\";\n for (int i = 0; i < strs[0].length() ; i++){\n char c = strs[0].charAt(i);\n for (int j = 1; j < strs.length; j ++) {\n if (i == strs[j].length() || strs[j].charAt(i) != c)\n return strs[0].substring(0, i); \n }\n }\n return strs[0];\n}", "public int stringMatch(String a, String b) {\n int result = 0;\n int end = (a.length()<=b.length()? a.length():b.length());\n for (int i = 0; i <end-1 ; i++){\n if (a.substring(i, i + 2).equals(b.substring(i, i + 2))) {\n result++;\n }\n }\n return result;\n }", "public int longestPalindromeSubseq(String s) {\n return lps(s, 0, s.length() - 1);\n }", "static int compare(String a, String b) {\n if (a == null) a = \"\";\n if (b == null) b = \"\";\n\n int i = 0;\n while (i < a.length() && i < b.length()) {\n char x = a.charAt(i), y = b.charAt(i);\n if (x != y) return x - y;\n i++;\n }\n return a.length() - b.length();\n }", "public String longestCommonPrefix_solution1(String[] strs) {\n if (strs.length == 0)\n return \"\";\n\n String prefix = strs[0];\n for (int i = 0; i < strs.length; i++) {\n while (strs[i].indexOf(prefix) != 0) {\n prefix = prefix.substring(0, prefix.length() - 1); // String.substring: 左闭右开[left inclusive, right exclusive]\n if (prefix.isEmpty())\n return \"\";\n }\n }\n return prefix;\n }", "public static void main(String[] args) {\n\t\tString A = \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\";\r\n\t\tLongestSubString longestSubString = new LongestSubString();\r\n\t\tint lengthOfLongestSubstring = longestSubString.lengthOfLongestSubstring(A);\r\n\t\tSystem.out.println(lengthOfLongestSubstring);\r\n\r\n\t}", "private static int strStr(String a, String b)\n\t{\n\t\tint aL=a.length();\n\t\tint bL=b.length();\n\t\tif(a.equals(b)){\n\t\t\treturn 0;\n\t\t}\n\t\tfor(int i=0;i<aL;i++){\n\t\t\tint j=i+bL;\n\t\t\tif(j<=aL){\n\t\t\t\tString subStr=a.substring(i, j);\n\t\t\t\tif(subStr.equals(b)){\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int unsignedLongestCommonPrefix(long z1, long z2) {\n\treturn Long.numberOfLeadingZeros(z1 ^ z2);\n }", "public int lengthOfLongestSubstring(String s) {\n\t\tint n = s.length();\n\t\tint ans = 0;\n\t\tMap<Character, Integer> map = new HashMap<Character, Integer>();\n\t\tfor (int i = 0, j = 0; j < n; j++) {\n\t\t\tif (map.containsKey(s.charAt(j))) {\n\t\t\t\ti = Math.max(map.get(s.charAt(j)), i);\n\t\t\t}\n\t\t\tans = Math.max(ans, j - i + 1);\n\t\t\tmap.put(s.charAt(j), j + 1);\n\t\t}\n\t\treturn ans;\n\n\t}", "public String longestCommonPrefix(String[] strs) {\n\n\t\tif (strs.length == 0)\n\t\t\treturn \"\";\n\n\t\tString prefix = strs[0];\n\t\tfor (int i = 1; i < strs.length; i++)\n\t\t\twhile (strs[i].indexOf(prefix) != 0) {\n\t\t\t\tprefix = prefix.substring(0, prefix.length() - 1);\n\t\t\t\tif (prefix.isEmpty())\n\t\t\t\t\treturn \"\";\n\t\t\t}\n\t\treturn prefix;\n\t}", "public static void main(String[] args) {\n String str = \"pwwkew\";\n// System.out.println(str.length());\n System.out.println(lengthOfLongestSubstring(str));\n\n\n }", "public String longestCommonPrefix(String[] strs) {\n\t\tif(strs.length == 0) return \"\";\n\t\tString min = strs[0];\n\t\tfor(int i =0 ; i< strs.length; i++){\n\t\t\tif(min.length() > strs[i].length()) min = strs[i];\n\t\t}\n\t\t\n\t\tint x = 0;\n\t\t\n\t\t\twhile(x < min.length()){\n\t\t\t\tfor(String s: strs){\n\t\t\t\t\tif(min.equals(s)) continue;\n\t\t\t\t\telse if(s.charAt(x) != min.charAt(x)) return s.substring(0,x);\n\t\t\t}\n\t\t\t\tx++;\n\t\t}\n\t\treturn min.substring(0,x);\n\t}", "static int[] longestCommonSubsequence(int[] arrA, int[] arrB) {\n int[][] dp = new int[arrA.length + 1][arrB.length + 1];\n\n for(int r = 1; r <= arrA.length; r++){\n for(int c = 1; c <= arrB.length; c++){\n if(arrA[r - 1] == arrB[c - 1]){\n // if same, put the updated val from the prev diag\n dp[r][c] = dp[r - 1][c - 1] + 1;\n }else{\n // if not same, take the greater between prev two vals\n dp[r][c] = Math.max(dp[r - 1][c], dp[r][c - 1]);\n }\n }\n }\n\n //find the max length and its sequence\n int maxLength = dp[arrA.length][arrB.length];\n //System.out.println(maxLength);\n int[] solutionArr = new int[maxLength];\n\n int r = arrA.length, c = arrB.length;\n int solutionArrIndex = solutionArr.length - 1;\n\n while(maxLength > 0){\n //same found?\n // a. put it into the arr\n // b. move diagonal\n if(arrA[r - 1] == arrB[c - 1]){\n solutionArr[solutionArrIndex--] = arrA[r - 1];\n r--; c--;\n maxLength--;\n }else{\n // same not found\n // find the bigger of the two adjacent val\n // move to the position\n if(dp[r][c - 1] > dp[r - 1][c]){\n // left if bigger and up\n c--;\n }else{\n // up is bigger than left\n r--;\n }\n }\n }\n return solutionArr;\n }", "public static int computeLevenshteinDistance(CharSequence str1, CharSequence str2) {\n int[][] distance = new int[str1.length() + 1][str2.length() + 1];\n\n for (int i = 0; i <= str1.length(); i++)\n distance[i][0] = i;\n for (int j = 0; j <= str2.length(); j++)\n distance[0][j] = j;\n\n for (int i = 1; i <= str1.length(); i++)\n for (int j = 1; j <= str2.length(); j++)\n distance[i][j] = minimum(\n distance[i - 1][j] + 1,\n distance[i][j - 1] + 1,\n distance[i - 1][j - 1]\n + ((str1.charAt(i - 1) == str2.charAt(j - 1)) ? 0\n : 1));\n\n return distance[str1.length()][str2.length()];\n }", "private int calculateLevenshtein(String lhs, String rhs) {\n\t\tint len0 = lhs.length() + 1; \n\t int len1 = rhs.length() + 1; \n\t \n\t // the array of distances \n\t int[] cost = new int[len0]; \n\t int[] newcost = new int[len0]; \n\t \n\t // initial cost of skipping prefix in String s0 \n\t for (int i = 0; i < len0; i++) cost[i] = i; \n\t \n\t // dynamically computing the array of distances \n\t \n\t // transformation cost for each letter in s1 \n\t for (int j = 1; j < len1; j++) { \n\t // initial cost of skipping prefix in String s1 \n\t newcost[0] = j; \n\t \n\t // transformation cost for each letter in s0 \n\t for(int i = 1; i < len0; i++) { \n\t // matching current letters in both strings \n\t int match = (lhs.charAt(i - 1) == rhs.charAt(j - 1)) ? 0 : 1; \n\t \n\t // computing cost for each transformation \n\t int cost_replace = cost[i - 1] + match; \n\t int cost_insert = cost[i] + 1; \n\t int cost_delete = newcost[i - 1] + 1; \n\t \n\t // keep minimum cost \n\t newcost[i] = Math.min(Math.min(cost_insert, cost_delete), cost_replace);\n\t } \n\t \n\t // swap cost/newcost arrays \n\t int[] swap = cost; cost = newcost; newcost = swap; \n\t } \n\t \n\t // the distance is the cost for transforming all letters in both strings \n\t return cost[len0 - 1]; \n }", "public static int lengthOfLongestSubstring(String s) \r\n {\r\n \tif (s.length()==0) \r\n \t\treturn 0;\r\n \t\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n int length = 0;\r\n int start = 0;\r\n \r\n for (int end=0; end < s.length(); end++)\r\n {\r\n \t// When we have reached a repeated character, then the currently held string is potentially the largest string.\r\n \t// If the character is there in the map, start needs to be changed. \r\n \t// If it is not there, start remains the same so that it can increase the count\r\n if (map.containsKey(s.charAt(end)))\r\n {\r\n \t// Consider input as abba. For b[2], start < map.get(s.charAt(end)) + 1 \r\n \t// For b[3], start > map.get(s.charAt(end)) + 1. It means, if the character has occured towards the beginning, we dont want the start to be modified.\r\n \tstart = Math.max(start, map.get(s.charAt(end)) + 1);\r\n } \r\n \r\n map.put(s.charAt(end), end);\r\n \r\n // Why +1? Lets say start=2, end=5. Then the length will be 5-2=3. And, 3+1 = 4.\r\n length = Math.max(length, end-start+1);\r\n \r\n }\r\n return length;\r\n }", "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 }", "private int compareInternal(String shorter, String longer) {\n int lengthDiff = longer.length() - shorter.length();\n\n for (int compareStartIndexInsideLonger = 0; compareStartIndexInsideLonger <= lengthDiff; compareStartIndexInsideLonger++) {\n String compariosonPartFromLonger = longer.substring(compareStartIndexInsideLonger, compareStartIndexInsideLonger + shorter.length());\n //we have found an answer if they are not equal\n int result = shorter.compareTo(compariosonPartFromLonger);\n if (result != 0) {\n return result;\n }\n }\n\n //the are equal\n return 0;\n }", "public static int shared(String s1, String s2) {\n\t\tMap<Character, Integer> c1 = counts(s1);\n\t\tMap<Character, Integer> c2 = counts(s2);\n\t\tint result = 0;\n\t\tfor (Character key : c1.keySet()) {\n\t\t\tInteger val1 = c1.get(key);\n\t\t\tInteger val2 = c2.get(key);\n\t\t\tif (val2 == null) continue;\n\t\t\tresult += Math.min(val1, val2);\n\t\t}\n\t\treturn result;\n\t}", "public static void lcsDynamic(String a, String b) {\n\t\tchar[] A = a.toCharArray();\n\t\tchar[] B = b.toCharArray();\n\t\tint[][] l = new int[A.length+1][B.length+1];\n\t\tfor(int i=0; i<=A.length;i++) {\n\t\t\tfor(int j = 0; j<=B.length; j++) {\n\t\t\t\tif(i==0 || j==0) l[i][j] = 0;\n\t\t\t\telse if(A[i-1] == B[j-1]) {\n\t\t\t\t\tl[i][j] = 1+l[i-1][j-1];\n\t\t\t\t} else {\n\t\t\t\t\tl[i][j] = Math.max(l[i][j-1], l[i-1][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"MAX LCS \"+l[A.length][B.length]);\n\t}", "public static int diff(String s1, String s2) {\n if (s1 == null || s2 == null) return -1;\n int len1 = s1.length();\n int len2 = s2.length();\n \n int len = (len1<len2) ? len1 : len2;\n \n \n for (int i=0; i<len; i++) {\n if (s1.charAt(i) != s2.charAt(i)) return i;\n }\n \n return (len1==len2) ? -1 : len;\n }", "public int minInsertions(String s) {\n int n = s.length();\n //Initialising dp array. It will represent the longest common subsequence between first i characters of first string and first j characters of second string\n int[][] dp = new int[n+1][n+1];\n \n //Looping through start and end of the string. Thus dp will consider the string from start and string from end and then store the ans\n for (int i = 0; i < n; ++i){\n for (int j = 0; j < n; ++j){\n \n //If both the characters are equal, then we increment the previous dp value otherwise we take max of the next character considered for both strings\n dp[i + 1][j + 1] = s.charAt(i) == s.charAt(n - 1 - j) ? dp[i][j] + 1 : Math.max(dp[i][j + 1], dp[i + 1][j]);\n } \n }\n //Returning ans\n return n - dp[n][n];\n }", "int LCSubStr(char X[], char Y[], int m, int n) \n {\n int LCStuff[][] = new int[m + 1][n + 1]; \n int result = 0; // To store length of the longest common substring \n \n // Following steps build LCSuff[m+1][n+1] in bottom up fashion \n for (int i = 0; i <= m; i++) \n { \n for (int j = 0; j <= n; j++) \n { \n if (i == 0 || j == 0) \n LCStuff[i][j] = 0; \n else if (X[i - 1] == Y[j - 1]) \n { \n LCStuff[i][j] = LCStuff[i - 1][j - 1] + 1; \n result = Integer.max(result, LCStuff[i][j]); \n } \n else\n LCStuff[i][j] = 0; \n } \n } \n return result; \n }", "public int repeatedStringMatch(String a, String b) {\n \n int count = 0;\n StringBuilder sb = new StringBuilder();\n \n while(sb.length() < b.length()){\n sb.append(a); //O(roundUp(M/N) * N) < O(M*N)\n count++;\n }\n \n if(sb.indexOf(b) != -1) return count; //check at max O(M*N) characters\n \n //handles rotated array case\n if(sb.append(a).indexOf(b) != -1) return count + 1; //append takes O(N), indexOf takes in the worst case (missing match) ~O(M*N)\n \n return -1;\n }", "public static int longestRepeatingSubstringUsingSuffixArray(String s) {\n\t\tint n = s.length();\n\t\tSuffixArray sa = new SuffixArray(s);\n\t\tint ans = 0;\n\t\tfor(int i = 1 ; i < n ; i++) {\n\t\t\tint len = sa.lcp(i);\n\t\t\tans = Math.max(ans, len);\n\t\t}\n\t\treturn ans;\n\t}", "static String doit(final String string1, final String string2) {\n String shorterString; // a\n String longerString; // b\n if (string1.length() > string2.length()) {\n shorterString = string2;\n longerString = string1;\n } else {\n longerString = string2;\n shorterString = string1;\n }\n String r = \"\";\n\n for (int i = 0; i < shorterString.length(); i++) {\n for (int j = shorterString.length() - i; j > 0; j--) {\n for (int k = 0; k < longerString.length() - j; k++) {\n if (shorterString.regionMatches(i, longerString, k, j) && j > r.length()) {\n r = shorterString.substring(i, i + j);\n }\n }\n } // Ah yeah\n }\n return r;\n\n }", "public static String gcdOfStrings(String str1, String str2) {\n if (str2.length() < str1.length())\n return gcdOfStrings(str2, str1);\n\n if (str1.isEmpty())\n return str2;\n\n if (!str2.startsWith(str1))\n return \"\";\n\n return gcdOfStrings(str1, str2.substring(str1.length()));\n }", "int lcsDP(char[] str1, char[] str2, int m, int n) {\r\n\r\n int max = 0;\r\n int array[][] = new int[m + 1][n + 1];\r\n\r\n for (int i = 1; i <= m; i++) {\r\n\r\n for (int j = 1; j <= n; j++) {\r\n\r\n if (str1[i - 1] == str2[j - 1]) {\r\n array[i][j] = 1 + array[i - 1][j - 1];\r\n } else {\r\n array[i][j] = Math.max(array[i - 1][j], array[i][j - 1]);\r\n }\r\n\r\n if (max < array[i][j]) max = array[i][j];\r\n }\r\n }\r\n\r\n return max;\r\n }", "public int lengthOfLongestSubstring(String s) {\r\n\r\n int answer = 0;\r\n int index = 0;\r\n while (index < s.length()) {\r\n String tmp = \"\";\r\n for (int i = index; i < s.length(); i++) {\r\n if (tmp.contains(String.valueOf(s.charAt(i)))) {\r\n break;\r\n } else {\r\n tmp += String.valueOf(s.charAt(i));\r\n }\r\n }\r\n if (tmp.length() > answer) {\r\n answer = tmp.length();\r\n }\r\n index++;\r\n }\r\n\r\n return answer;\r\n }", "public int lengthOfLongestSubstring(String s) {\n int longest = 0;\n Set<Character> set = new HashSet<>();\n int i = 0, j = 0;\n while (j < s.length()) {\n if (set.contains(s.charAt(j))) {\n longest = getMax(set.size(), longest);\n set.remove(s.charAt(i));\n i++;\n } else {\n set.add(s.charAt(j));\n j++;\n }\n }\n return getMax(longest, set.size());\n }", "public static String longestRepeatedSubstring(String s){\r\n int N = s.length();\r\n String[] suffixes = new String[N];\r\n \r\n for (int i = 0; i < N; i++)\r\n suffixes[i] = s.substring(i, N);\r\n \r\n /* bring subffixes with common prefix together. */\r\n Arrays.sort(suffixes);\r\n \r\n /* compare the adjacent suffixes. */\r\n String longest = \"\";\r\n for (int i = 0; i < suffixes.length - 1; i++){\r\n String common = longestCommonPrefix(suffixes[i], suffixes[i+1]);\r\n if (common.length() > longest.length())\r\n longest = common;\r\n }\r\n \r\n return longest;\r\n }", "public int lengthOfLongestSubstring(String s) {\n if(s == null || s.length() == 0){\n return 0;\n }\n int runner = 0;\n int walker = 0;\n int max = 0;\n HashSet<Character> set = new HashSet<Character>();\n while(runner < s.length()){\n if(set.contains(s.charAt(runner))){\n if(max < runner - walker){\n max = runner - walker;\n }\n while(s.charAt(walker) != s.charAt(runner)){\n set.remove(s.charAt(walker));\n walker++;\n }\n walker++;\n }else{\n set.add(s.charAt(runner));\n }\n runner++;\n }\n max = Math.max(max, runner - walker);\n return max;\n }", "public String longestCommonPrefix1(String[] strs) {\n if (null == strs || strs.length == 0) return \"\";\n\n String pre = strs[0]; //Take the first String as pre\n for (int i = 1; i < strs.length; i++) {\n /**\n * \"indexOf\"\n * This means pre is not the prefix in current string,\n * hence, shorten it by one and continue\n */\n while (strs[i].indexOf(pre) != 0) {\n pre = pre.substring(0, pre.length() - 1);\n if (pre.isEmpty()) {\n return \"\";\n }\n }\n }\n\n return pre;\n }", "public String longestCommonPrefix(String[] strs) {\n if (strs == null && strs.length == 0) {\n return \"\";\n }\n\n String prefix = strs[0];\n\n for (int i = 1; i < strs.length; i++) {\n while (strs[i].indexOf(prefix) != 0) {\n prefix = prefix.substring(0, prefix.length() - 1);\n if (prefix.isEmpty()) {\n return \"\";\n }\n }\n }\n\n return prefix;\n }", "private static int getLongestSemiAlternatingSubString(String s) {\n int max = 0, count = 1, len = s.length(), p1 = 0;\n for (int p2 = 1; p2 < len; p2++) {\n if (s.charAt(p2 - 1) == s.charAt(p2)) {\n count++;\n } else {\n count = 1;\n }\n if (count < 3) {\n max = Math.max(max, p2 - p1 + 1);\n } else {\n p1 = p2 - 1;\n count = 2;\n }\n }\n return max;\n }", "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 }", "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 int lengthOfLongestSubstring(String s)\n {\n\tif (s.length() < 2)\n\t return s.length();\n\n\tint max = 0, i = 0, j = 1;\n\n\tboolean[] cache = new boolean[128];\n\tcache[s.charAt(i) - ' '] = true;\n\n\twhile (i < s.length() && j < s.length())\n\t{\n\t while (cache[s.charAt(j)-' '])\n\t\t cache[s.charAt(i++)-' '] = false; \n\t cache[s.charAt(j++)-' '] = true;;\n\t max = Math.max(max, j - i);\n\t}\n\treturn max;\n }", "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 static String longestCommonPrefixNOOOOO(String[] strs) {\n HashSet<Character> set1 = new HashSet<>();\n for(int i=0; i<strs.length; i++){\n HashSet<Character> set2 = new HashSet<>();\n for(int j=0; j<strs[i].length(); j++){\n set2.add(strs[i].charAt(j));\n }\n if(i==0){\n set1=set2;\n }else{\n set1.retainAll(set2);\n }\n }\n StringBuilder sb = new StringBuilder();\n for(Character c : set1) sb.append(c);\n return sb.toString();\n }", "public static void main(String[] args) {\n String a = \"agbcba\";\n StringBuilder rev = new StringBuilder(a);\n System.out.println(a.length() - findLCS(a, rev.reverse().toString(), a.length(), a.length()));\n }", "public static int longestCommonActions(List<String> A, List<String> B) {\n if (A == null || B == null) return 0;\n\n // state[x][y] means how long the lcs is when it is A[x-1] b [y-1].\n // initial state will be 0 for each cell.\n int[][] state = new int[A.size()+1][B.size()+1];\n int begin = 0 ;\n int end = 0;\n\n int max = 0;\n\n for (int i = 1 ; i < A.size() + 1 ; i++){\n for (int j = 1 ; j < B.size() +1 ; j++){\n // State transfer.\n if (A.get(i-1) != B.get(j-1)){\n state[i][j] = 0;\n }else{\n state[i][j] = state[i-1][j-1] + 1;\n }\n if (max < state[i][j]){\n max = state[i][j];\n end = i;\n }\n }\n }\n\n System.out.println(\"last position\" + end);\n for (int i = end - max ; i < end ; i++){\n System.out.println(A.get(i));\n }\n return max;\n }", "public static void main(String[] args) {\n\t\tString string1 = \"acbdfbdfacb\";\n\t\tint length = string1.length();\n\t\tString[] sub = new String[length*(length+1)/2];\n\t\tint temp = 0;\n\t\tfor(int i =0;i<length;i++) {\n\t\t\tfor(int j = i;j<length;j++) {\n\t\t\t\tString parts = string1.substring(i,j+1);\n\t\t\t\tsub[temp] = parts;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t}\n\t\tfor(int j =0;j<sub.length;j++) {\n\t\t\tSystem.out.println(sub[j]);\n\t\t}\n\t\tArrayList<String> rep = new ArrayList<String>();\n\t\tfor(int i=0;i<sub.length;i++) {\n\t\t\tfor(int j =i+1;j<sub.length;j++) {\n\t\t\t\tif(sub[i].equals(sub[j])) {\n\t\t\t\t\trep.add(sub[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint largestString = 0;\n\t\tSystem.out.println(rep);\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\t\tif(rep.get(k).length()>largestString) {\n\t\t\t\tlargestString = rep.get(k).length();\n\t\t\t}\t\t\n\t\t}\n\t\tfor(int k =0;k<rep.size();k++) {\n\t\tif(rep.get(k).length()==largestString) {\n\t\t\tSystem.out.println(\"the longest repeating sequence in a string : \"+rep.get(k));\n\t\t}\n\t\t}\n\t}", "public String longestPalindrome(String s) {\n String ans = \"\";\n int maxLen = 0;\n for (int i = 0; i < s.length(); i++) {\n int[] pair = expand(s, i, i);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n pair = expand(s, i, i + 1);\n if (pair[1] - pair[0] + 1 > maxLen) {\n maxLen = pair[1] - pair[0] + 1;\n ans = s.substring(pair[0], pair[1] + 1);\n }\n }\n return ans;\n }" ]
[ "0.86148113", "0.795225", "0.78853446", "0.7881204", "0.78683233", "0.78248984", "0.77020377", "0.7664992", "0.76136607", "0.75833577", "0.753819", "0.7504491", "0.75011706", "0.74532455", "0.74258614", "0.7408715", "0.73796004", "0.7378406", "0.7326796", "0.71837795", "0.71736795", "0.7111756", "0.7095811", "0.7095426", "0.69220793", "0.6877115", "0.6829416", "0.6828915", "0.6771441", "0.6761665", "0.6742608", "0.67124575", "0.66834056", "0.6681062", "0.6659633", "0.66337913", "0.66158533", "0.6613171", "0.6611395", "0.66035783", "0.6603021", "0.65953577", "0.6585646", "0.6584645", "0.65723646", "0.6560408", "0.65556973", "0.65445405", "0.65404373", "0.65345055", "0.6531936", "0.65220255", "0.6501266", "0.64877117", "0.64875144", "0.64874816", "0.64747363", "0.6466658", "0.64603823", "0.64523274", "0.6435197", "0.6430432", "0.6430308", "0.6415144", "0.64059657", "0.6404355", "0.6394949", "0.639394", "0.6383702", "0.6381579", "0.6379973", "0.63679516", "0.63655573", "0.6361059", "0.6350651", "0.63252527", "0.63251317", "0.6320923", "0.6299915", "0.6289073", "0.6282499", "0.6281861", "0.62806517", "0.62715805", "0.6270723", "0.62573564", "0.6254822", "0.6253437", "0.62467843", "0.62399006", "0.62319624", "0.62315255", "0.6228766", "0.622831", "0.6228056", "0.6225146", "0.62229985", "0.6220691", "0.6210397", "0.62085074" ]
0.6452462
59
Creates a new player who accepts input through the console to make moves
public ConsoleHumanPlayer(PlayerIdentity identity, Deck deck) { super(identity, deck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createPlayer(Player player);", "Player createPlayer();", "void createNewGame(Player player);", "public void start(){\n int numberOfPlayers = Integer.parseInt(JOptionPane.showInputDialog(\"How many players\"));\n player1 = new Player(JOptionPane.showInputDialog(\"What is your name?\"));\n if(numberOfPlayers == 1){\n player2 = new Player(\"Computer\");\n }\n else if(numberOfPlayers == 2){\n player2 = new Player(JOptionPane.showInputDialog(\"What is the second player name?\"));\n }\n\n }", "public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}", "private void consoleWelcome()\n {\n welcomePartOne();\n\n Scanner reader = new Scanner(System.in);\n String playerName = reader.nextLine();\n player.playerName = playerName;\n \n welcomePartTwo();\n }", "public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }", "public void processTurn(Player player) {\n Move move;\n do {\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"Enter current position of Piece you want to move\");\n // Positions entered by player\n int startX = scan.nextInt();\n int startY = scan.nextInt();\n\n System.out.println(\"Enter position where you want to put Piece\");\n int endX = scan.nextInt();\n int endY = scan.nextInt();\n\n // Move created based on position entered by player 1\n move = new Move(player, board.getCellAtLocation(startX, startY), board.getCellAtLocation(endX, endY));\n } while (!makeMove(move));\n }", "public void createPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create online player \" + name);\r\n player = new OnlinePlayer(name, x, y);\r\n players.put(name, player);\r\n }\r\n }", "public static void main(String[] args) {\n System.out.println(\"Create the player.\");\n }", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "public static Player make(String n) {\n\t\treturn new NewPlayer(n);\n\t}", "public PlayerFighter create(GamePlayer player);", "public static Character createCharacter () {\n\n System.out.println(\"Enter the name of your character : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n System.out.println(\"Enter the healpoint of your character : \");\n Scanner scan = new Scanner(System.in);\n String healPointCharacter = scan.next();\n int hpCharacter = Integer.parseInt(healPointCharacter);\n\n System.out.println(\"Enter the power of your character : \");\n Scanner sca = new Scanner(System.in);\n String powerCharacter = sca.next();\n int pcCharacter = Integer.parseInt(powerCharacter);\n\n System.out.println(\"Enter the initiative of your character : \");\n Scanner scann = new Scanner(System.in);\n String initiativeCharacter = scann.next();\n int iniCharacter = Integer.parseInt(initiativeCharacter);\n\n Character characterPlayer = new Character(nameCharacter, pcCharacter, hpCharacter, iniCharacter);\n System.out.println(\"Your character has been created with success!\");\n System.out.println(characterPlayer);\n\n return characterPlayer;\n }", "private Player selectPlayer (int which) {\n System.out.println();\n int choice = readPlayerChoice(which);\n String name = readPlayerName();\n if (choice == TIMID)\n return new TimidPlayer(name);\n else if (choice == GREEDY)\n return new GreedyPlayer(name);\n else if (choice == CLEVER)\n return new CleverPlayer(name);\n else\n return new InteractivePlayer(name);\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public void startGame() {\n Scanner in = new Scanner(System.in);\n Player player = Player.getInstance();\n setPlayer(player);\n\n try {\n\n System.out.println(\"\\t\\u2680\\t\\u2681\\t\\u2682\\t\\u2683\\t\\u2684\\t\\u2685\" +\n \"\\nWelcome to the World Series of Craps!\\n\" +\n \"Please enter your name\");\n\n player.setName(in.nextLine());\n\n }\n catch(NoSuchElementException e){\n System.out.println(\"Exiting system, thank you for playing\");\n System.exit(0);\n }\n catch (Exception e) {\n e.printStackTrace();\n setExit(true);\n }\n System.out.println(\"Welcome \" + player.getName() + \"\\n\");\n }", "public Game()\n {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Get player name\"); \n playerName = userInput.nextLine(); \n }", "public Player(Keyboard input) {\n\t\tthis.input = input;\n\t}", "Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }", "private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }", "public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\n}", "public Player createPlayer(String name, Player.Token token, int playerNum) {\n switch (token) {\n case MissScarlett:\n return new Player(name, token, Parser.playersStartPositions.get(0), playerNum);\n case ProfessorPlum:\n return new Player(name, token, Parser.playersStartPositions.get(1), playerNum);\n case MrsWhite:\n return new Player(name, token, Parser.playersStartPositions.get(2), playerNum);\n case MrsPeacock:\n return new Player(name, token, Parser.playersStartPositions.get(3), playerNum);\n case MrGreen:\n return new Player(name, token, Parser.playersStartPositions.get(4), playerNum);\n case ColonelMustard:\n return new Player(name, token, Parser.playersStartPositions.get(5), playerNum);\n default:\n throw new IllegalArgumentException(\"Player selection was abnormally exited\");\n }\n }", "private void login(){\n out.println(\"Enter player name: \");\n player = new Player(in.nextLine());\n game.addPlayerObject(player);\n out.println(\"Player name set to: \" + player.getName() + \"\\r\\n\");\n\n game.incrementPlayersConnected();\n\n login = true;\n }", "public String createPlayer(OutputStreamWriter newOut, InputStreamReader newIn) {\r\n String name;\r\n int hitPoints = 100;\r\n Item slot1 = items.get(0);\r\n Item slot2 = null;\r\n int gold = 0;\r\n Room room = dungeon.getRoom(dungeon.getStartRoom());\r\n\r\n OutputStreamWriter ostream = newOut;\r\n BufferedWriter out = new BufferedWriter(ostream);\r\n\r\n InputStreamReader instream = newIn;\r\n BufferedReader in = new BufferedReader(instream);\r\n try {\r\n out.write(\"Enter your name: \");\r\n out.newLine();\r\n out.flush();\r\n name = in.readLine();\r\n player = new Player(name, hitPoints, slot1, slot2, gold, room);\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return null;\r\n }", "public void newGame()throws InputMismatchException{\r\n String token; \r\n token = \"X\";\r\n displayBoard();\r\n System.out.println(\"Begin Game. Enter 'P' if you want to play against another player; Enter 'C' if you want to play against computer.\"); \r\n String choice = in.nextLine();\r\n if (choice.equals(\"p\") || choice.equals(\"P\")){\r\n makeMove(token, false);\r\n } else if (choice.equals(\"c\") || choice.equals(\"C\")){\r\n System.out.println(\"Start game against computer.\");\r\n makeMove(token, true);\r\n } else {\r\n System.out.println(\"Invalid choice. Please try again!\");\r\n newGame();\r\n } \r\n }", "public abstract void makePlayer(Vector2 origin);", "private void promptTurn()\n \t{\n \t\tUserInfo curr;\n\t\tString meow;\n \t\tcurr = players[turnIndex];\n \t\tString[] tokens;\n \t\tint x;\n \t\tint y;\n \t\n// PROTOCOL \t\n \t\tcurr.sendMessage(prtcl.makePacket(\"Please enter a move\", \"message\")); \n\t\tmeow = curr.getMessage();\n\t\ttokens = meow.split(\" \");\n// PROTOCOL\n \t\tx = Integer.parseInt(tokens[0]);\n \t\ty = Integer.parseInt(tokens[1]);\n \t\n \t\t// Should have a method to process the user's input, and provide an error message back to them if necessary. \n \t\tif(game.remove(x, y))\n \t\t{\n \t\t\tplayers[(turnIndex + 1) % 2].sendMessage(prtcl.makePacket(\"Other player took \" + tokens[0] + \" items from row \" + tokens[1] + \".\", \"message\"));\n \t\t\tbroadcast(prtcl.makePacket(game.toString(), \"message\"));\n \t\t\t// This is where the check to see if the game is won occurs. If so, a winner (the person who just moved) is \n \t\t\t// congratulated. \n \t\t\tif(!game.isDone())\n \t\t\t{\n \t\t\t\tturnIndex += 1;\n \t\t\t\tturnIndex %= 2;\n \t\t\t}\n \t\t} else\n \t\t{\n // PROTOCOL\n \t\t\tplayers[turnIndex].sendMessage(prtcl.makePacket(\"Something was wrong with that. Try again.\", \"ERROR\"));\n // PROTOCOL\n \t\t}\t\n \t}", "public void initPlayer() throws IOException\n\t{\n\t\t\n\t\tout.println(\"Enter your name: \");\n\t\tout.flush();\n\t\tthis.name = in.readLine();\n\t\t\n//Here's some nice instructions to show a client\t\t\n\t\tout.println(\" You will now place 2 ships. You may choose between either a Cruiser (C) \" );\n\t\tout.println(\" and Destroyer (D)...\");\n\t\tout.println(\" Enter Ship info. An example input looks like:\");\n\t\tout.println(\"\\nD 2 4 S USS MyBoat\\n\");\n\t\tout.println(\" The above line creates a Destroyer with the stern located at x=2 (col),\" );\n\t\tout.println(\" y=4 (row) and the front of the ship will point to the SOUTH (valid\" );\n\t\tout.println(\" headings are N, E, S, and W.\\n\\n\" );\n\t\tout.println(\" the name of the ship will be \\\"USS MyBoat\\\"\");\n\t\tout.println(\"Enter Ship 1 information:\" );\n\t\tout.flush();\n\t\t\n\t\t//Get ship locations from the player for all 2 ships (or more than 2 if you're using more ships)\n\t\tString[] ships;\n\t\tdo {\n\t\t\tships = in.readLine().split(\" \");\n\t\t\tif (ships[0].equalsIgnoreCase(\"C\") && ships.length > 3) {\n\t\t\t\tboolean yes = board.addShip(new Cruiser(Arrays.copyOfRange(ships, 4, ships.length).toString()), new Position(Integer.parseInt(ships[1]), Integer.parseInt(ships[2])), HEADING.valueOf((ships[3])));\n\t\t\t\tout.println(\"Added a cruiser.\");\n\t\t\t} else if (ships[0].equalsIgnoreCase(\"D\") && ships.length > 3) {\n\t\t\t\tboard.addShip(new Destroyer(Arrays.copyOfRange(ships, 4, ships.length).toString()), new Position(Integer.parseInt(ships[1]), Integer.parseInt(ships[2])), HEADING.valueOf((ships[3]).toUpperCase()));\n\t\t\t\tout.println(\"Added a destroyer.\");\n\t\t\t} else if (ships[0].equalsIgnoreCase(\"pic\")) {\n\t\t\t\tString pic = board.draw();\n\t\t\t\tpic.replaceAll(\"\\\\n\", NEWL);\n\t\t\t\tout.println(pic);\n\t\t\t\tSystem.out.println(pic);\n\t\t\t\tout.flush();\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tout.println(\"Wrong ship placement. Try again.\");\n\t\t\t}\n\t\t\tout.flush();\n\t\t} while (board.myShips.size() < 2);\n\t\t\n\t\t\n\t\t//After all game state is input, draw the game board to the client\n\t\t\n\t\t\n\t\tSystem.out.println( \"Waiting for other player to finish their setup, then war will ensue!\" );\n\t}", "private void autoCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new MachinePlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "public Player(int x, int y, Keyboard input) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.input = input;\n\t\tfireRate = WizardProjectile.FIRE_RATE;\n\t}", "static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }", "public void startGame() {\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"* Medieval Warriors *\\n* the adventure *\");\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.print(\"Enter your name: \");\n\n\t\tthis.playern = new Player(sc.nextLine());\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"Welcome \" + playern.getName() + \" The Warrior\\n\");\n\t\t\n\t\tint input = -1;\n\t\twhile (!wonGame && !lostGame) {\n\t\t\tprintMainMenu();\n\t\t\tSystem.out.print(\"> \");\n\t\t\tinput = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tswitch(input) {\n\t\t\t\tcase 1:\n\t\t\t\t\tgoAdventure();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tgoToTavern();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tgoCharacter();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bye!\");\n\t\t\t\t\tlostGame = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (wonGame) {\n\t\t\tSystem.out.println(\"Congratulations! You won The Game!\");\n\t\t}\n\n\t}", "public Pawn(String player){\r\n this.player=player;\r\n\r\n }", "public static void main(String[] args)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\t//gets alphabetic keyboard input\n\t\tScanner kbNum = new Scanner(System.in);\t\t//gets numeric keyboard input\n\t\tPlayer player = new Player();\t\t\t\t\t//creates player object\n\t\t\n\t\tString strInput;\t\t\t\t\t//user-input before char is determined\n\t\tchar cStartOption;\t\t\t\t\t//determined choice based on strInput\n\t\tchar cAction;\t\t\t\t\t\t//determined choice based on strInput\n\t\tint iRoom;\t\t\t\t\t\t\t//holds room number\n\t\t\n\t\tcStartOption = 'x';\n\t\t\n\t\twhile (cStartOption != 's' || cStartOption != 'S')\n\t\t{\n\t\t\tSystem.out.print(\"\\n\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\" V O L C A N O \\n\");\n\t\t\tSystem.out.print(\" O F \\n\");\n\t\t\tSystem.out.print(\" H O P E \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * * \\n\");\n\t\t\tSystem.out.print(\" * * * * * * ## \\n\");\n\t\t\tSystem.out.print(\" * * * * * # # # \\n\");\n\t\t\tSystem.out.print(\" ## * * * * * # ## ## \\n\");\n\t\t\tSystem.out.print(\" # # * * * * * ## # \\n\");\n\t\t\tSystem.out.print(\" # # * * * * # # \\n\");\n\t\t\tSystem.out.print(\" ## # # * ## * # # \\n\");\n\t\t\tSystem.out.print(\" # #### #### ####### # \\n\");\n\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\tSystem.out.print(\" ## # \\n\");\n\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\tSystem.out.print(\" # #### \\n\");\n\t\t\tSystem.out.print(\" # # \\n\");\n\t\t\tSystem.out.print(\" \\n\");\n\t\t\tSystem.out.print(\"\\t\\t [S] Start\\t\\t[I] Instructions\\n\");\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\" +\n\t\t\t\t\"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcStartOption = strInput.charAt(0);\n\t\t\n\t\t\twhile (cStartOption != 'i' && cStartOption != 'I' && cStartOption != 's' && \n\t\t\t\tcStartOption != 'S')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\t\tSystem.out.print(\"\\n________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" V O L C A N O \\n\");\n\t\t\t\tSystem.out.print(\" O F \\n\");\n\t\t\t\tSystem.out.print(\" H O P E \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * * \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * * ## \\n\");\n\t\t\t\tSystem.out.print(\" * * * * * # # # \\n\");\n\t\t\t\tSystem.out.print(\" ## * * * * * # ## ## \\n\");\n\t\t\t\tSystem.out.print(\" # # * * * * * ## # \\n\");\n\t\t\t\tSystem.out.print(\" # # * * * * # # \\n\");\n\t\t\t\tSystem.out.print(\" ## # # * ## * # # \\n\");\n\t\t\t\tSystem.out.print(\" # #### #### ####### # \\n\");\n\t\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\t\tSystem.out.print(\" ## # \\n\");\n\t\t\t\tSystem.out.print(\" # ### \\n\");\n\t\t\t\tSystem.out.print(\" # #### \\n\");\n\t\t\t\tSystem.out.print(\" # # \\n\");\n\t\t\t\tSystem.out.print(\" \\n\");\n\t\t\t\tSystem.out.print(\"\\t\\t [S] Start\\t\\t[I] Instructions\\n\");\n\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcStartOption = strInput.charAt(0);\n\t\t\t}\n\n\t\t\tif (cStartOption == 'i' || cStartOption == 'I')\n\t\t\t{\n\t\t\t\tcStartOption = instructions();\n\t\t\t}\n\t\t\t\n\t\t\tif (cStartOption == 's' || cStartOption == 'S')\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tplayer.setRoom(1);\n\t\t\n\t\t// THE GAME LOOP\n\t\twhile (player.getPlayerState() && !(player.getVictory()))\n\t\t{\n\t\t\tiRoom = player.getRoom();\n\t\t\tcAction = player.showMessage(iRoom);\n\t\t\tif (player.getPlayerState() && !(player.getVictory()))\n\t\t\t{\n\t\t\t\tif (cAction == 'm' || cAction == 'M')\n\t\t\t\t{\n\t\t\t\t\tmap(player.getRoom());\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'r' && cAction != 'R')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tmap(player.getRoom());\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (cAction == 'e' || cAction == 'E')\n\t\t\t\t{\n\t\t\t\t\tplayer.showInventory();\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\twhile (cAction != 'r' && cAction != 'R')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tplayer.showInventory();\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAction = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Player(String playerName) {\n this.playerName = playerName;\n }", "public void setPlayerName()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name: \");\r\n\t\tname = in.nextLine();\r\n\t}", "private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }", "public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}", "public static void main(String[] args) throws Exception{\n locations = World.getInstance();\n player = Player.getInstance();\n\n startMessage();\n\n try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))){\n playerName = reader.readLine();\n printConstantMessage(Constants.HELLO_MSG, playerName);\n System.out.println();\n\n player.moveTo(locations.stream().findFirst().get());\n\n while(runGame){\n System.out.print(Constants.PRE_INPUT_TEXT);\n parseInput(reader.readLine());\n }\n }\n }", "static Player createUserPlayer(boolean randPlace, FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, randPlace);\n }", "private void manualCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new HumanPlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "public void makeMove(){\n System.out.println(\"Player choose x or o.\");\n String chose = keyword.nextLine();\n int row;\n int column;\n if (chose.equals(\"x\")){\n System.out.println(\"Type coordenates for first move.\");\n System.out.println(\"Type row.\");\n row = keyword.nextInt();\n System.out.println(\"Type column.\");\n column = keyword.nextInt();\n getBoard(row, column, \"x\");\n }\n else if (chose.equals(\"o\")){\n System.out.println(\"Type coordenates for first move.\");\n System.out.println(\"Type row.\");\n row = keyword.nextInt();\n System.out.println(\"Type column.\");\n column = keyword.nextInt();\n getBoard(row, column, \"o\");\n }\n }", "public static void main(String[] args) {\n // TODO code application logic here\n GameController.start();\n boolean active=true;\n Scanner input = new Scanner(System.in);\n while(active){\n GameController.printBoard();\n System.out.print(GameController.getTurn()+\"'s move: \");\n String move = input.nextLine();\n GameController.playerMove(move);\n }\n }", "public NimTUI () {\n this.player1 = null;\n this.player2 = null;\n this.game = null;\n this.in = new Scanner(System.in);\n }", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "private void createPlayers() {\n // create human player first\n Player human = new Player(\"Player 1\", true);\n players.add(human);\n \n // create remaining AI Players\n for (int i = 0; i < numAIPlayers; i++) {\n Player AI = new Player(\"AI \" + (i + 1), false);\n players.add(AI);\n }\n }", "public Player addNewPlayer(String username){\n\n // if no username is provided return error;\n if(username == null || username.isEmpty()){\n throw new ApplicationException(\"Please provide a username\");\n }\n // else return player by provided username via @Repository\n System.out.println(ANSI_BLUE + \"=== PLAYER \" + username + \" CREATED ===\" + ANSI_RESET);\n return gameRepository.addNewPlayer(username);\n\n }", "public Player createPlayer(String playerName) {\n Player player = new Player(playerName);\n gamePlayers.add(player);\n notifier.broadcastPlayerJoined(playerName);\n if (allPlayersJoined()) {\n startGame();\n }\n return player;\n }", "private void createPlayers() {\n\tGlobal.camera_player1 = new Camera(new OrthographicCamera());\n\tGlobal.camera_player2 = new Camera(new OrthographicCamera());\n\tGlobal.camera_ui = new OrthographicCamera();\n\tGlobal.player1 = new Plane(Global.player1_respawn.x,\n\t\tGlobal.player1_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER1);\n\tGlobal.player2 = new Plane(Global.player2_respawn.x,\n\t\tGlobal.player2_respawn.y, 0, new Planetype(PlaneTypes.F35),\n\t\tEntityType.PLAYER2);\n }", "private void createGame() {\n String[] options = { \"2\", \"3\", \"4\" };\n String result = (String) JOptionPane.showInputDialog(frame, \"Please enter the max player amount (must be between 2-4\", \"Create game\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n if (result == null) {\n System.out.println(\"[Client] Cancelled game creation\");\n } else {\n connectedServer.writeMessage(client.create(Integer.parseInt(result)));\n gameWindow();\n }\n }", "public void createStartingPlayers(CFrame frame) {\r\n\t\tSet<String> passableActions = new HashSet<String>();\r\n\t\tint playerNumber = Integer.parseInt(frame.getSidePanel().getButtons().getButton(\"start\", null));\r\n\t\tString name =\"\", charr;\r\n\t\tMap<String, String> pc = new HashMap<String, String>();\r\n\t\t\r\n\t\tframe.getSidePanel().getText().setText(\"Please select a character\\nand enter your name\\n\");\r\n\t\tfor(int i =0;i<playerNumber;i++){\r\n\t\t\tString test = frame.getSidePanel().getButtons().getButton(\"characterSelect\", passableActions);\r\n\r\n\t\t\tString Playercharacter[] = test.split(\",\");\r\n\t\t\tname= Playercharacter[0];\r\n\t\t\tcharr= Playercharacter[1];\r\n\t\t\tpassableActions.add(charr);\r\n\t\t\t\r\n\t\t\tpc.put(charr, name);\r\n\r\n\t\t\tSystem.out.println(\"Output: \" + name+\" : \"+charr);\r\n\t\t}\r\n\t\t\r\n\t\tfor(BoardObject object: boardObjects){\r\n\t\t\tSystem.out.println(object.getName() +\" \"+passableActions);\r\n\t\t\tif(object instanceof Character && passableActions.contains(object.getName())){\r\n\t\t\t\tSystem.out.println(object.getName());\r\n\t\t\t\t((Character) object).setAsPlayer(true);\r\n\t\t\t\t((Character) object).setPlayerName(pc.get(object.getName()));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdeck.deal(players(), players().size());\r\n\r\n\t\t//Testing allocation\r\n\t\tfor(Character c: players())\r\n\t\t\tSystem.out.println(c.getName() + \": \" + c.playerName());\r\n\t}", "public void makeMove(Player player, int input) {\n\t\t// Get all the valid moves if there are any\n\t\tArrayList<ArrayList<Integer>> validMoves = getValidMoves(this.board, player.color);\n\t\tprintValidMoves(validMoves, board);\n\t\tif (!validMoves.isEmpty()) {\n\t\t\tif (setMove(input, validMoves, player.color, this.board)) {\n\t\t\t\tturn++;\n\t\t\t}\n\n\t\t\t// Reset noWinnerCount\n\t\t\tnoWinnerCount = 0;\n\t\t} else {\n\t\t\t// Player can't move, if this counter reaches 2, that means both players can't\n\t\t\t// move and the game will end\n\t\t\tnoWinnerCount++;\n\t\t\tSystem.out.println(\"Out of moves + Count = \" + noWinnerCount);\n\t\t}\n\n\t\t// Input is last player player\n\t\tArrayList<ArrayList<Integer>> validMovesOpponent = getValidMoves(board, player.opponent);\n\t\tif (validMovesOpponent.size() > 0) {\n\t\t\tswitchTurn(player);\n\t\t}\n\t}", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}", "Player createNewPlayer(PlayerDTO playerDTO);", "public void run() {\n Scanner cin = new Scanner(System.in, \"UTF-8\");\n boolean quit = false;\n chess = new Chess();\n Player temp;\n boolean check = false;\n Pawnposition p = null;\n int checknew = 0;\n\n while (!quit) {\n System.out.print(\"Chess> \");\n String str = cin.nextLine();\n if (str.length() <= 0) {\n System.out.println(\"Error! Not support this command1!\\n\");\n }\n else {\n String[] cmd = str.split(\" \");\n if (\"new\".startsWith(cmd[0]) && cmd.length == 2) {\n if(cmd[1].equals(\"SINGLE\")||(cmd[1].equals(\"single\"))){\n chess = new Chess();\n checknew = 1;\n }\n if(cmd[1].equals(\"HOTSEAT\")){\n chess = new Chess();\n }\n }\n else if (\"help\".startsWith(cmd[0]) && cmd.length == 1) {\n this.showHelp();\n }\n else if (\"quit\".startsWith(cmd[0]) && cmd.length == 1) {\n return;\n }\n else if (\"move\".startsWith(cmd[0]) && cmd.length == 3) {\n Cell f = new Cell(this.inputChange(cmd[1].charAt(0)), this.inputChange(cmd[1].charAt(1)));\n Cell t = new Cell(this.inputChange(cmd[2].charAt(0)), this.inputChange(cmd[2].charAt(1)));\n\n check = chess.move(f, t);\n if (check == true) {\n if ((chess.getState().getWinner() == Player.BLACK) || (chess.getState().getWinner() == Player.WHITE)) {\n Player tempforwin = this.chess.getState().getCurrentPlayer();\n System.out.println(tempforwin + \" moved \" + cmd[1] + \" to \" + cmd[2]);\n System.out.println(\"Game over. \" + tempforwin + \" has won\");\n continue;\n }\n if (this.chess.getState().getCurrentPlayer() == Player.WHITE) {\n temp = Player.BLACK;\n System.out.println(temp + \" moved \" + cmd[1] + \" to \" + cmd[2]);\n }\n if (this.chess.getState().getCurrentPlayer() == Player.BLACK) {\n temp = Player.WHITE;\n System.out.println(temp + \" moved \" + cmd[1] + \" to \" + cmd[2]);\n if(checknew == 1) {\n p = this.chess.minmax(0, Player.BLACK);\n if (p == null) {\n System.out.println(\"Fehler bei p\");\n } else if (p.getresult() == 0) {\n System.out.println(\"Fehler bei p.r\");\n } else if (p.getcellt() == null) {\n System.out.println(\"Fehler bei p.getcellt\");\n } else if (p.getcellf() == null) {\n System.out.println(\"Fehler bei p.getcellf\");\n } else {\n this.chess.move(p.getcellf(), p.getcellt());\n }\n }\n }\n }\n if (this.chess.ifmiss() == false && chess.getState().getWinner() == null) {\n System.out.println(this.chess.getState().getCurrentPlayer() + \" must miss a turn\");\n this.chess.getState().setCurrentPlayer(this.chess.getState().getCurrentPlayer());\n }\n\n\n }\n else if (\"print\".startsWith(cmd[0]) && cmd.length == 1) {\n if (chess == null) {\n System.out.println(\"Error! Fehler chess\");\n }\n else {\n chess.print();\n }\n }\n else {\n System.out.println(\"Error! Not support this command!\");\n }\n }\n }\n }", "public Player(String name) {\r\n this.name = name;\r\n }", "@Override\r\n public boolean doAction(String[] inputs) {\n String playersName = inputs[0];\r\n //player = savePlayer(playersName)\r\n Player player = GameControl.savePlayer(playersName);\r\n //IF player == null\r\n if (player == null) {\r\n System.out.println(\"Could not create the player.\"\r\n + \"Enter a different name.\");\r\n //RETURN false // Repeats the StartProgramView\r\n return false;\r\n } else {\r\n System.out.println(\"****************************************\"\r\n + \" Hello\" + playersName + \",\"\r\n + \" Welcome to Delirium. Good luck!\"\r\n + \"****************************************\");\r\n }\r\n //mainMenuView = Create a new MainMenuView object\r\n MainMenuView mainMenuView = new MainMenuView();\r\n mainMenuView.display();\r\n return true;\r\n }", "public static void main(String[] args) {\r\n\t\tint portNumber = 1500;\r\n\t\tString serverAddress = \"localhost\";\r\n\t\tString userName = \"Anonymous\";\r\n\t\tint type = 1;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter Character Name: \");\r\n\t\tuserName = scan.nextLine();\r\n\t\tSystem.out.println(\"Type '1' to be a warrior\");\r\n\t\tSystem.out.println(\"Type '2' to be a wizard\");\r\n\t\tSystem.out.println(\"Type '3' to be a paladin\");\r\n\t\ttype = Integer.parseInt(scan.nextLine());\r\n\r\n\t\tswitch(type) {\r\n\t\t\tcase 1:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tp = new Player(userName, 2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tp = new Player(userName, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tp = new Player(userName, 1);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tClient client = new Client(serverAddress, portNumber, p);\r\n\t\tif(!client.start())\r\n\t\t\treturn;\r\n\t\t\r\n\t\tSystem.out.println(\"Instructions:\");\r\n\t\tSystem.out.println(\"1. Simply type the message to send broadcast to all active clients\");\r\n\t\tSystem.out.println(\"2. Type 'LIST PARTY' to see who is in the game\");\r\n\t\tSystem.out.println(\"3. Type 'STATUS' to show your stats.\");\r\n\t\tSystem.out.println(\"4. Type 'ENEMIES' to show enemies in room\");\r\n\t\tSystem.out.println(\"5. Type 'TURN' to show your parties remaining turns.\");\r\n\t\tSystem.out.println(\"6. Type 'ATTACK X' where X is the enemy target.\");\r\n\t\tSystem.out.println(\"7. Type 'QUIT' to close the game\\n\");\r\n\t\t\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.print(\"> \");\r\n\t\t\tString msg = scan.nextLine();\r\n\t\t\tif(msg.equalsIgnoreCase(\"QUIT\")) {\r\n\t\t\t\tclient.sendMessage(\"QUIT\");\r\n\t\t\t\tbreak;\r\n\t\t\t}else if(msg.length() > 0){\r\n\t\t\t\tclient.sendMessage(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tscan.close();\r\n\t\tclient.disconnect();\t\r\n\t}", "PlayerBean create(String name);", "public final static void play()\n\t{\n\t\tDatabase.resetForNewGame();\n\n\n\t\tclearConsole();\n\t\tint playerOnePoints = 0, playerTwoPoints = 0, matrixSize=0, userChoise=0;\n\t\tString playerOneName, playerTwoName;\n\t\tchar controller;\n\n\n\t\tSystem.out.println(\"LET THE GAME BEGIN!\");\n\t\tSystem.out.println(\"Please type players' names: \");\n\n\t\t/**\n\t\t * Asks for player's names and Galaxy size.\n\t\t * */\n\t\tdo\n\t\t{\n\t\t\tSystem.out.println(\"Player One: \");\n\t\t\tplayerOneName=Global.sc.next(\"\\\\w+\");\n\t\t\tSystem.out.println(\"Player Two: \");\n\t\t\tplayerTwoName=Global.sc.next(\"\\\\w+\");\n\t\t\tif ((!checkNames(playerOneName, playerTwoName)))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Error. Please enter names with no marks and spaces, different first letter or less length.: \");\n\t\t\t}\n\t\t} while(!checkNames(playerOneName, playerTwoName));\n\t\tclearConsole();\n\t\tSystem.out.println(\"Please choose galaxy size: \");\n\t\tSystem.out.println(\"[1] Small\");\n\t\tSystem.out.println(\"[2] Large\");\n\t\tuserChoise=Global.sc.nextInt();\n\t\twhile(userChoise!=1&&userChoise!=2)\n\t\t{\n\t\t\tSystem.out.println(\"Wrong number. Please enter again: \");\n\t\t\tuserChoise=Global.sc.nextInt();\n\t\t}\n\t\tif (userChoise==1) {\n\t\t\tmatrixSize=GameConstants.smallMatrixSize;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tmatrixSize=GameConstants.largeMatrixSize;\n\t\t}\n\n\t\t/**\n\t\t * Creates the Galaxy and player's coordinates.\n\t\t * */\n\t\tGalaxy galaxy = new Galaxy(matrixSize);\n\t\tPlayerOne playerOneCol=new PlayerOne();\n\t\tPlayerOne playerOneRow=new PlayerOne();\n\t\tPlayerTwo playerTwoRow=new PlayerTwo(matrixSize);\n\t\tPlayerTwo playerTwoCol=new PlayerTwo(matrixSize);\n\t\t/**\n\t\t * Creates TemporaryChar which will hold a potential symbol ('8'/'+'/'*') of a question.\n\t\t * */\n\t\tTemporaryChar temp = new TemporaryChar();\n\t\tgalaxy.putStars(matrixSize);\n\t\tgalaxy.putPlayers(playerOneName, playerTwoName, matrixSize);\n\n\n\t\t//GAME BEGINS\n\n\n\n\t\tdo\n\t\t{\n\t\t\t//First player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerOneRow, playerOneCol);\n\n\t\t\t//Throws exception if player has tried to move on the other player's position.\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerOnePoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\n\t\t\t//Checks if there are any stars.\n\t\t\tif(!galaxy.checkForRemainingStars(matrixSize)) break;\n\n\n\n\n\n\t\t\t//Second player\n\n\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.print(\", please make a move: \");\n\n\t\t\tcontroller=Global.sc.next(\".\").charAt(0);\n\n\t\t\tmovePlayer(galaxy,temp, controller, playerTwoRow, playerTwoCol);\n\n\t\t\tif (playerOneRow.coordinate == playerTwoRow.coordinate&&playerOneCol.coordinate ==playerTwoCol.coordinate)\n\t\t\t{\n\t\t\t\tthrow new ArrayIndexOutOfBoundsException();\t\n\t\t\t}\n\t\t\tplayerTwoPoints+=pointsToAdd(temp);\n\t\t\tclearConsole();\n\t\t\tdisplayPlayerInfo(playerOneName, playerOnePoints, playerTwoName, playerTwoPoints);\n\t\t\tgalaxy.printMatrix(matrixSize);\n\t\t} while (galaxy.checkForRemainingStars(matrixSize));\n\n\n\n\n\t\tif (playerOnePoints > playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerOneName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse if (playerOnePoints < playerTwoPoints)\n\t\t{\n\t\t\tSystem.out.print(playerTwoName);\n\t\t\tSystem.out.println(\" wins!\");\n\t\t}\n\t\telse System.out.println(\"It's a draw!\");\n\n\t\tpressAnyKeyToContinue();\n\t\tshowMenu();\n\n\n\t}", "public BoardPosition(int rowInput, int colInput, char playerInput) {\n row = rowInput;\n col = colInput;\n player = playerInput;\n }", "public static void playerMove() \n\t{\n\t\tSystem.out.println(\"\\nPlayer: Enter a slot number :\\n\");\n\t\tint boardSlotNumber = scanner.nextInt();\n\n\t\tif (boardSlotNumber > 0 && boardSlotNumber <= 9 && tictactoeBoard[boardSlotNumber] != 'x' && tictactoeBoard[boardSlotNumber] != 'o')\n\t\t{\n\t\t\ttictactoeBoard[boardSlotNumber] = playerInput;\n\t\t\t//beforeMoveBoard();\n\t\t\tshowBoard();\n\t\t} \n\t\telse \n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\tplayerMove();\n\t\t}\n\t}", "Game() {\n _randomSource = new Random();\n\n _players = new Player[2];\n _input = new BufferedReader(new InputStreamReader(System.in));\n _players[0] = new HumanPlayer(BP, this);\n _players[1] = new MachinePlayer(WP, this);\n _playing = false;\n }", "public Player(String name) {\n this.name = name;\n this.points = 0;\n }", "public void AskForMove();", "public static Character newPlayer(int nbPlayer) {\n\n\n\n int characterClass, level, strength, agility, intelligence, health;\n System.out.println(\"Création du personnage du Joueur \" + nbPlayer);\n characterClass = Character.askAction(\"Veuillez choisir la classe de votre personnage (1 : Guerrier, 2 : Rôdeur, 3 : Mage)\", 1, 3);\n\n do {\n level = Character.askAction(\"Niveau du personnage ?\", 1, 100);\n health = 5 * level;\n System.out.println(\"Votre personnage possède \" + health + \" points de vie\");\n System.out.println(\"Il vous reste \" + level + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n strength = Character.askAction(\"Force du personnage ?\", 0);\n\n while (level <= 0 || level > 100){\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n level = Character.askAction(\"Niveau du personnage ?\", 0);\n }\n while (strength < 0 || strength > level) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Force du personnage ?\", 0);\n }\n\n int levelMinusStrength = level - strength;\n System.out.println(\"Il vous reste \" + levelMinusStrength + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n agility = Character.askAction(\"Agilité du personnage ?\", 0);\n while (agility <0 || agility > level - strength) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Agilité du personnage ?\", 0);\n }\n\n\n\n int levelMinusStrengthMinusAgility = level - strength - agility;\n System.out.println(\"Il vous reste \" + levelMinusStrengthMinusAgility + \" point(s) restant à allouer aux caractéristiques de votre personnage\");\n intelligence = Character.askAction(\"Intelligence du personnage ?\", 0);\n while (intelligence <0 || intelligence > level - strength - agility) {\n System.out.println(\"Recommencez : Votre choix n'est pas bon!\");\n strength = Character.askAction(\"Intelligence du personnage ?\", 0);\n }\n\n\n if (strength + agility + intelligence != level) {\n System.out.println(\"Attention le total 'force + agilité + intelligence' doit être égal au niveau du joueur !\");\n }\n }while (strength + agility + intelligence != level);\n\n Character player;\n switch (characterClass) {\n case 1:\n player = new Warrior(nbPlayer, strength, agility, intelligence);\n break;\n case 2:\n player = new Prowler(nbPlayer, strength, agility, intelligence);\n break;\n default:\n player = new Wizard(nbPlayer, strength, agility, intelligence);\n break;\n }\n return player;\n }", "private static Player create(String playername) throws GameException {\n\t\ttry {\n\t\t\treturn (Player) createObject(playername);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GameException(\"Player \" + playername + \" not found\");\n\t\t}\n\t}", "public void createTurn() {\n Turn turn = new Turn(this.getOnlinePlayers());\n this.setCurrentTurn(turn);\n }", "public Player(String type){\n \n this.type = type;\n }", "public abstract void generateNextMove(final ChessGameConsole console);", "private Move produceHumanMove(Board board){\n\t\tfinal int PRINT_BOARD = 1, ENTER_A_MOVE = 2;\n\t\twhile(true) // keep asking the user the question below till he make a move.\n\t\t{\n\t\t\tSystem.out.println(\"Press 1 to display the board. Press 2 to make a move:\");\n\t\t\tint userInput = scanner.nextInt();\n\t\t\tif(userInput == PRINT_BOARD){\n\t\t\t\tSystem.out.println(board.toString());\n\t\t\t}\n\t\t\telse if(userInput == ENTER_A_MOVE){\n\t\t\t\tSystem.out.println(\"Enter the row number:\");\n\t\t\t\tint inRow = scanner.nextInt();\n\t\t\t\tSystem.out.println(\"Enter the index of the leftmost stick:\");\n\t\t\t\tint leftMost = scanner.nextInt();\n\t\t\t\tSystem.out.println(\"Enter the index of the rightmost stick:\");\n\t\t\t\tint rightMost = scanner.nextInt();\n\t\t\t\treturn new Move(inRow,leftMost,rightMost);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Unsupported command\");\n\t\t\t}\n\t\t}\n\t}", "private static void playerTurn()\n {\n int playerMove;\n while (true)\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Choose your location(1-9): \");\n playerMove = scanner.nextInt();\n if (board[playerMove] == ' ')\n {\n break;\n }\n\n }\n System.out.println(\"Player choose:: \" + playerMove);\n board[playerMove] = userLetter;\n }", "public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }", "public Player(){}", "public Player(){}", "TicTacToe(){\n\t\tplayerMgr=new PlayerManager();\n\t\tinterp=new Interpreter();\n\t\tgameMgr=new GameManager();\n\t\tkeyBoard=new Scanner(System.in);\n\t}", "Input createInput();", "public static Player[] createPlayers(){\r\n\t\tPlayer[] players = new Player[2];\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player1: \");\r\n\t\tplayers[0] = new Player(getName(), 0);\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player2: \");\r\n\t\tplayers[1] = new Player(getName(), 18);\r\n\t\treturn players;\r\n\t}", "public static void main(String[] args) throws IOException {\r\n\r\n // CREATE A NEW INSTANCE OF A SCANNER, WHICH\r\n // ALLOWS US TO ACCEPT INPUT FROM USERS\r\n input = new Scanner(System.in);\r\n\r\n // PRINT A WELCOME MESSAGE\r\n WelcomeMessage();\r\n\r\n // GET THE NUMBER OF PLAYERS\r\n player_count = GetNumberOfPlayers();\r\n\r\n // SET THE SIZE OF THE PLAYER ARRAY\r\n player = new Player[player_count];\r\n\r\n // SET PLAYER NAMES\r\n SetPlayerNames();\r\n\r\n // DEFAULT MAX # OF ROUNDS (CUSTOMIZABLE)\r\n max_rounds = 5;\r\n\r\n // CHOOSE GAME MODE\r\n ChooseMode();\r\n\r\n // CHOOSE A RANDOM PLAYER TO START\r\n System.out.println(\"Choosing who goes first...\\n\");\r\n next_player = (int)(Math.random() * (double)player_count);\r\n\r\n\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~MAIN LOOP~~~~~~~~~~~~~~\r\n // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n\r\n // THIS LOOP RUNS THE WHOLE GAME\r\n while (rounds < max_rounds) {\r\n\r\n // \"PRESS ANY KEY TO CONTINUE\"\r\n System.out.println(\"Input to proceed...\");\r\n input.next();\r\n\r\n // SETUP A NEW ROUND\r\n StartNewRound();\r\n\r\n // THIS LOOP RUNS A SINGLE ROUND\r\n while (GetPlayersLeft() > 1) {\r\n\r\n\r\n // ~~~~~~~~~~~~~~~OBTAINING INPUT~~~~~~~~~~~~~~~\r\n\r\n\r\n // DID THEY SURVIVE?\r\n boolean survived = true;\r\n\r\n // DETECTS INPUT (LIGHTNING ROUND)\r\n boolean input_present = true;\r\n\r\n // PROMPT THE NEXT PLAYER\r\n System.out.println(player[next_player].GetName().toUpperCase() + \", IT IS YOUR TURN.\");\r\n System.out.print(\"Choose a number (0-9): \");\r\n\r\n // 3, 2, 1 SECS TO INPUT, VARIES INVERSELY WITH ROUND NUMBER (LIGHTNING ROUND)\r\n if (lightning_round) input_present = TimeInput(GetTimeFrame() );\r\n\r\n // STORE THE PLAYER'S CHOICE\r\n int choice = 0;\r\n\r\n // NO INPUT? NO MERCY (LIGHTNING ROUND)\r\n if (lightning_round && !input_present) {\r\n survived = false;\r\n System.out.println(\"NOT FAST ENOUGH!\");\r\n }\r\n // GET THEIR CHOICE\r\n else {\r\n choice = input.nextInt();\r\n input.nextLine();\r\n }\r\n\r\n // THIS HOLDS A MESSAGE IN CASE THEY CHOSE POORLY\r\n String message = \"\";\r\n\r\n\r\n // ~~~~~~~~~~~~~~~INTERPRETING CHOICE~~~~~~~~~~~~~~~\r\n\r\n\r\n if (choice == number) {\r\n // THEY PICKED THE MAGIC NUMBER\r\n survived = false;\r\n message = \"Tough luck!\";\r\n }\r\n else if (choice < 0) {\r\n // THEY PICKED A NUMBER TOO LOW (BELOW RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (choice > 9) {\r\n // THEY PICKED A NUMBER TOO HIGH (ABOVE RANGE)\r\n survived = false;\r\n message = choice + \" was never an option...\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n else if (picked[choice]) {\r\n // THEY PICKED A NUMBER THAT HAD ALREADY BEEN PICKED\r\n survived = false;\r\n message = choice + \" has already been picked!\";\r\n player[next_player].smart = true;\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n // GIVE SOME SPACE...\r\n System.out.println();\r\n\r\n\r\n // ~~~~~~~~~~~~~~~DETERMINING SURVIVAL~~~~~~~~~~~~~~~\r\n\r\n\r\n // THEY DIDN'T SURVIVE!\r\n if (!survived) {\r\n\r\n // LET THE USER KNOW THAT THEY FAILED\r\n System.out.println(\"( { K A B O O M } )\");\r\n System.out.println(player[next_player].GetName().toUpperCase() + \" HAS BEEN ELIMINATED.\");\r\n System.out.println(message);\r\n System.out.println();\r\n java.awt.Toolkit.getDefaultToolkit().beep(); // <-- BEEP!\r\n\r\n // REMEMBER THAT THEY LOST\r\n player[next_player].lost = true;\r\n\r\n // CHECK TO SEE IF THIS ENDED THE ROUND\r\n // AND PREP THE NEXT ROUND IF SO\r\n if (GetPlayersLeft() > 1) {\r\n SetNewNumber();\r\n ResetPickedNumbers();\r\n }\r\n }\r\n\r\n // THEY DID SURVIVE!\r\n else {\r\n // RECORD THAT THIS NUMBER IS NO LONGER AVAILABLE\r\n picked[choice] = true;\r\n\r\n // RANDOM CHANCE TO CLOWN ON THE PLAYER (2% CHANCE)\r\n if ((int) (Math.random() * 50) == 0) CheekyMessage();\r\n\r\n }\r\n\r\n // WHO'S NEXT?\r\n ChooseNextPlayer();\r\n }\r\n\r\n // INCREASE THE ROUND COUNT\r\n rounds++;\r\n System.out.println();\r\n\r\n // INCREASE SCORE AND RESET PLAYER STATES\r\n for (int i = 0; i < player_count; i++) {\r\n\r\n if (!player[i].lost) {\r\n // ADD A POINT TO THE WINNER\r\n player[i].score++;\r\n\r\n // LET EVERYONE KNOW WHO WON\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[i].GetName().toUpperCase() + \" WINS ROUND \" + rounds + \".\");\r\n System.out.println(\"-----------------------------------------------\");\r\n }\r\n\r\n // RESET THIS FOR THE NEXT ROUND\r\n player[i].lost = false;\r\n }\r\n\r\n // SHOW THE SCORES\r\n PrintScores();\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n\r\n // TAKE TOP TWO PLAYERS IN THE LAST ROUND AND START SUDDEN DEATH\r\n if ((player[player.length - 1].score == player[player.length - 2].score)\r\n && (rounds == max_rounds - 1) ) { SuddenDeath(); }\r\n }\r\n\r\n\r\n System.out.println(\"-----------------------------------------------\");\r\n System.out.println(player[player.length - 1].GetName().toUpperCase() + \" WINS THE GAME!!!\");\r\n System.out.println(\"-----------------------------------------------\");\r\n\r\n // THE GAME HAS ENDED\r\n System.out.println(\"!!! GAME OVER !!!\");\r\n }", "boolean makeMove(int index, Player player);", "static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }", "private ActionManager initModel(){ \n System.out.println(\"Welcome to Deadwood!\"); \n ArrayList<Player> players = new ArrayList<Player>();\n\n if(numOfPlayers == null){\n System.out.println(\"How many players?\");\n numOfPlayers = sc.nextInt();\n }\n if(numOfPlayers < 2 || numOfPlayers > 8){\n sc.close();\n throw new IllegalArgumentException(\"Invalid number of players.\");\n }\n sc.nextLine();\n for(int i = 1; i <= numOfPlayers; i++){\n System.out.println(\"What is your name?\");\n String playerName = sc.nextLine();\n if(!players.stream().anyMatch(p -> p.getName().equals(playerName))) { \n players.add(new Player(playerName));\n } else {\n System.out.println(\"Choose another name!\");\n i--;\n }\n }\n return new ActionManager(players);\n }", "private Board playerMove(Board board)\n {\n System.out.println(\"Player Move\");\n \n Scanner scanner = new Scanner(System.in);\n int i = scanner.nextInt();\n int j = scanner.nextInt();\n \n board.array[i][j] = PLAYER;\n \n displayBoard(board);\n \n return board;\n }", "public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}", "public Player_ex1(String playerName){\n this.name = playerName;\n winner = false;\n }", "public static void NewChar(){\n\t\tSystem.out.println(\"\\\"What is the name of the powerful soul who wishes to brave the Depths alone?\\\"\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString Name = sc.nextLine();\n\t\tSystem.out.println(\"\\\"\" + Name + \"? Such an odd name, I cannot tell if this is bravery or foolishness...\\\"\");\n\t\tSystem.out.println(\"\\\"So tell me, \" + Name + \", what do your stats look like?\\\"\");\n\t\tboolean key = true; //To allow the player to re-enter stats if he/she messes up in choosing them.\n\t\twhile (key){\n\t\t\tkey = false;\n\t\t\ttstr = statChoice(\"strength\"); //The string in this method is used as text to let the player in on what stat they are choosing. The method automatically lowers the statPoints.\n\t\t\ttmag = statChoice(\"magic power\");\n\t\t\ttluc = statChoice(\"luck\");\n\t\t\ttacc = statChoice(\"accuracy\");\n\t\t\ttdef = statChoice(\"defense\");\n\t\t\ttspe = statChoice(\"speed\");\n\t\t\ttHP = ((statChoice(\"Health Points\") * 10) + 10); //HP and MP are multiplied by ten, and HP auto starts at 10 so the player doesn't automatically die when they start the game.\n\t\t\ttMP = (statChoice(\"Mystic Energy\") * 10);\n\t\t\ttstatSheet(); //This method just prints out the player's current stats.\n\t\t\tSystem.out.println(\"Are you okay with these stats?(Note - You cannot change them later)\");\n\t\t\tString statConfermation = sc.nextLine();\n\t\t\tif(statConfermation.equalsIgnoreCase(\"yes\")||statConfermation.equalsIgnoreCase(\"ye\")||statConfermation.equalsIgnoreCase(\"y\")){\n\t\t\t\tPlayer player = new Player(Name, tstr, tmag, tluc, tacc, tdef, tspe, tHP, tMP); //This is cementing the stats in the Player class\n\t\t\t\tArrays.fill(player.items, \"\");\n\t\t\t\tArrays.fill(player.spell, \"\");\n\t\t\t\tplayer.statSheet();\n\t\t\t\tChooseGift(player);\n\t\t\t\tSystem.out.println(\"\\\"It appears you have chosen your gift.\\nI believe you have all you need, \" + player.name + \", I hope you are ready for the depths!\\nGood luck.\\\"\");\n\t\t\t\tDepthsIntro.Enter(player);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tReset(); //this method just resets the game for the process to go through again.\n\t\t\t\tkey = true;\n\t\t\t}\n\t\t}\n\t\t}", "public Pawn(Player player) {\n super(player);\n }", "public Player(int type, int id, Scanner inputScanner){\t\t\n\t\t// Check for legal player type (we will see better ways to do this in the future).\n\t\tif (type != RANDOM && type != HEURISTIC \n\t\t\t\t&& type != SMART && type != HUMAN){\n\t\t\tSystem.out.println(\"Received an unknown player type as a parameter\"\n\t\t\t\t\t+ \" in Player constructor. Terminating.\");\n\t\t\tSystem.exit(-1);\n\t\t}\t\t\n\t\tplayerType = type;\t\n\t\tplayerId = id;\n\t\tscanner = inputScanner;\n\t}", "GameGUI() {\r\n _randomSource = new Random();\r\n _players = new Player[2];\r\n _input = new BufferedReader(new InputStreamReader(System.in));\r\n _players[0] = new HumanPlayer(BP, this);\r\n _players[1] = new MachinePlayer(WP, this);\r\n _playing = false;\r\n }", "Player(String name){\n\t\tthis.name = name;\n\t}", "public void welcomePlayer(Player p);", "public interface PlayerFactory {\r\n Player create(GUI gui);\r\n}", "public Player createPlayer(Player player) {\n // check whether unique player can be created or not\n if (playerRepository.existsByUsername(player.getUsername())) {\n return null;\n }\n if (playerRepository.existsByEmailAddress(player.getEmailAddress())) {\n return null;\n }\n player.setPassword(encryption.encoder().encode(player.getPassword()));\n return playerRepository.save(player);\n }", "void addPlayer(Player newPlayer);" ]
[ "0.7237903", "0.7149936", "0.68145657", "0.67104656", "0.66723555", "0.6611811", "0.65918744", "0.65757114", "0.64601946", "0.6420388", "0.6415467", "0.6391069", "0.6370683", "0.6357976", "0.63536257", "0.63392395", "0.63242143", "0.630301", "0.62989855", "0.6279268", "0.62561184", "0.62525105", "0.6227508", "0.6210295", "0.62077373", "0.61878914", "0.6185097", "0.6182433", "0.6151037", "0.61467594", "0.6126868", "0.6125043", "0.61223805", "0.6104135", "0.609802", "0.60853493", "0.60463554", "0.6044096", "0.6034934", "0.6012647", "0.6007923", "0.6004296", "0.6001549", "0.59924245", "0.59799284", "0.5974091", "0.59544903", "0.59529674", "0.59529674", "0.59529674", "0.59529674", "0.59492165", "0.59463495", "0.59357446", "0.59287345", "0.5923151", "0.5919687", "0.5904984", "0.5882066", "0.5880549", "0.58722365", "0.5869568", "0.58675826", "0.58665085", "0.586543", "0.5856766", "0.58561283", "0.5855003", "0.58480275", "0.5847294", "0.5844388", "0.58314973", "0.5828761", "0.58280534", "0.58240813", "0.5820431", "0.58190787", "0.5810991", "0.5810026", "0.5807642", "0.58065397", "0.58065397", "0.5805756", "0.5801002", "0.5800909", "0.57987577", "0.5796465", "0.57961476", "0.57950455", "0.5785573", "0.5784088", "0.57760674", "0.5775722", "0.57564634", "0.57556033", "0.5748152", "0.57463235", "0.5742315", "0.57401514", "0.57280403", "0.5720466" ]
0.0
-1
TODO Autogenerated method stub
@Override public int next() { return current++; }
{ "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
Memory instantiation. The instantiation only takes place if the memory size is meaningful (greater than zero). No error is reported.
protected MemObject (int nElem) { if (nElem > 0) mem = new Object [nElem]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Memory() {}", "public Memory() {\n this(false);\n }", "private MemoryTest() {\r\n }", "public MemoryImpl(int size) {\n\t\tif (size < 0) {\n\t\t\tthrow new IllegalArgumentException(\"The size of the memory should be greater than 0!\");\n\t\t}\n\t\tmemory = new Object[size];\n\t}", "public MemoryImpl(int size) {\n\t\tif(size < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Memory size can not be lower than 1!\");\n\t\t}\n\t\tthis.memory = new Object[size];\n\t}", "public MyMemory(int size){\n super(size);\n printSize();\n loadMemory(); //loads memory with instructions to be executed during the instruction cycle\n }", "public MemoryTest()\n {\n }", "public static Memory getInstance(){\n if (mem == null) mem = new Memory(4000);\n return mem;\n }", "public Memory(Integer tSize, Integer aTime){\r\n\t\tif(DEBUG_LEVEL >= 1)System.out.println(\"Memory(\" + tSize +\", \" + aTime + \")\");\r\n\t\t\r\n\t\t// Validity Checking\r\n\t\tif(tSize == null)throw new NullPointerException(\"tSize Can Not Be Null\");\r\n\t\tif(tSize < 0)throw new IllegalArgumentException(\"tSize Must Be Greater Than Zero\");\r\n\t\t\r\n\t\tif(aTime == null)throw new NullPointerException(\"aTime Can Not Be Null\");\r\n\t\tif(aTime < 0)throw new IllegalArgumentException(\"aTime Must Be Greater Than Zero\");\r\n\t\t\r\n\t\ttotalSize = tSize;\r\n\t\taccessTime = aTime;\r\n\t\t\r\n\t\tmemory = new MemoryElement[totalSize];\r\n\t\t\r\n\t\tchildCaches = new ArrayList<CacheController>();\r\n\t\t\r\n\t\tcacheStats = new CacheStatistics();\r\n\t\t\r\n\t\tif(DEBUG_LEVEL >= 2)System.out.println(\"Memory()...Finished\");\r\n\t}", "public MemoryByteArrayOutputStream() {\n\t\tthis(4096, 65536);\n\t}", "public PhysicalMemory()\n {\n frames = new TreeMap<Long, MemoryFrame>();\n for (int i = 0; i < Const.MEM_FRAMES; i++) {\n MemoryFrame frame = new MemoryFrame(i);\n Long zero = new Long(i);\n frames.put(zero, frame);\n }\n }", "public Memory() {\r\n init();\n ruletables = new RuleTables(this);\n budgetfunctions = new BudgetFunctions(this);\r\n }", "public SampleMemory(int size) {\n this.memory = new double[size];\n this.pointer = 0;\n }", "public PlainMemory(String name,int size)\n\t{\n\t\tsuper(name);\n\t\tsetSize(size);\n\t}", "public PlainMemory(String name)\n\t{\n\t\tsuper(name);\n\t\t\t\n\t}", "public MyMemory(){\n super();\n this.instruction = new Instruction(); //Only the IR register will use this attribute\n }", "public static void initializeMemory(){\n\t\tif(memory == null){\n\t\t\tmemory = new TreeMap<String,String>();\n\t\t\tfor(int i=0;i<2048;i++){\n\t\t\t\tmemory.put(Utility.decimalToHex(i, 3), null);\n\t\t\t}\n\t\t\tmemory_fmbv = new int[256];\n\t\t\tfor(int i:memory_fmbv){\n\t\t\t\tmemory_fmbv[i] = 0;\n\t\t\t}\n\t\t}\n\t\tif(diskJobStorage == null){\n\t\t\tdiskJobStorage = new TreeMap<String,DiskSMT>();\n\t\t}\n\t}", "private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }", "public AVRMemory()\n {\n super(32, 256, 4096, 65535);\n }", "private void setMemorySize() { }", "public Memory(int access_time) {\n\t\tthis.mem_array = new String[65536];\n\t\tthis.access_time = access_time;\n\t\tthis.fetch_cycles_left = access_time;\n\t\tthis.load_cycles_left = access_time;\n\t}", "public VirtualMachine(int memorySize, DebuggingPanel dp) {\n memory = new int[memorySize];\n this.dp = dp;\n dp.setComponents(this, register, pc, stackRegister, compareRegister);\n }", "public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}", "public Memory(String file) {\n\t\tfor(int i=0; i < Constants.MEM_SIZE; ++i){\n\t\t\tmemory[i] = 0;\n\t\t}\n\t\tinstructions = new FileProcessor(file).fetchInstructions();\n\t}", "public MarkusMachine ()\n {\n fMemory = new Hashtable <String, Object> ();\n }", "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "public HeapImp() {\n\t\tthis(10000);\n\t}", "public MemoryInfo(com.google.appinventor.components.runtime.ComponentContainer r7) {\n /*\n r6 = this;\n r1 = r6\n r2 = r7\n r3 = r1\n r4 = r2\n com.google.appinventor.components.runtime.Form r4 = r4.$form()\n r3.<init>(r4)\n r3 = r1\n r4 = 1048576(0x100000, double:5.180654E-318)\n r3.hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = r4\n r3 = r1\n r4 = r2\n android.app.Activity r4 = r4.$context()\n r3.context = r4\n r3 = r1\n r4 = r2\n r3.container = r4\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.appinventor.components.runtime.MemoryInfo.<init>(com.google.appinventor.components.runtime.ComponentContainer):void\");\n }", "private Heap() { }", "private Heap() { }", "public Memory(int cache_size, int associativity, int block_size, boolean protocolIsMSI, int hitPenalty, int missPenalty, int numberOfBanks)\n\t{\n\t\tsuper(cache_size, associativity, block_size, protocolIsMSI);\n\t\tthis.hitPenalty = hitPenalty;\n\t\tthis.missPenalty = missPenalty;\n\t\tthis.numberOfBanks = numberOfBanks;\n\t\tthis.bankFreeAtCycle = new int[this.numberOfBanks];\n\t\tthis.addressesBeingRetrieved = new ArrayList<List<Message>>();\n\t\tfor(int i = 0; i < this.numberOfBanks; i++)\n\t\t{\n\t\t\tthis.addressesBeingRetrieved.add(new LinkedList<Message>());\n\t\t}\n//\t\tthis.bankQueues = new ArrayList<Queue<Message>>();\n//\t\tfor(int i = 0; i < this.numberOfBanks; i++)\n//\t\t{\n//\t\t\tthis.bankQueues.add(new LinkedList<Message>());\n//\t\t}\n\t}", "public void MIPSme()\n {\n sir_MIPS_a_lot.getInstance().heap_allocate(size, targetReg);\n }", "GenericHeap() { // default\r\n\r\n\t}", "public long memory() {\n\treturn 0;\n }", "protected JvmMemoryMeta createJvmMemoryMetaNode(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer) {\n/* 541 */ return new JvmMemoryMeta(this, this.objectserver);\n/* */ }", "public CacheMemory(MainMemory m, int size, int lineSize, int linesPerSet) {\n\n if (lineSize % WORD_SIZE != 0) {\n throw new IllegalArgumentException(\"lineSize is not a multiple of \" + WORD_SIZE);\n }\n\n if (size % lineSize != 0) {\n throw new IllegalArgumentException(\"size is not a multiple of lineSize.\");\n }\n\n // number of lines in the cache\n int numLines = size / lineSize;\n\n if (numLines % linesPerSet != 0) {\n throw new IllegalArgumentException(\"number of lines is not a multiple of linesPerSet.\");\n }\n\n // number of sets in the cache\n int numSets = numLines / linesPerSet;\n\n // Set the main memory\n mainMemory = m;\n\n // Initialize the counters to zero\n requestCount = 0;\n warmUpRequests = 0;\n hitCount = 0;\n hitCost = 0;\n\n // Determine the number of bits required for the byte within a line,\n // for the set, and for the tag.\n int value;\n numByteBits = 0; // initialize to zero\n value = 1; // initialize to 2^0\n while (value < lineSize) {\n numByteBits++;\n value *= 2; // increase value by a power of 2\n }\n\n numSetBits = 0;\n value = 1;\n while (value < numSets) {\n numSetBits++;\n value *= 2;\n }\n\n // numTagBits is the remaining memory address bits\n numTagBits = 32 - numSetBits - numByteBits;\n\n System.out.println(\"CacheMemory constructor:\");\n System.out.println(\" numLines = \" + numLines);\n System.out.println(\" numSets = \" + numSets);\n System.out.println(\" numByteBits = \" + numByteBits);\n System.out.println(\" numSetBits = \" + numSetBits);\n System.out.println(\" numTagBits = \" + numTagBits);\n System.out.println();\n\n // Create the array of CacheSet objects and initialize each CacheSet object\n cache = new CacheSet[numSets];\n for (int i = 0; i < cache.length; i++) {\n cache[i] = new CacheSet(lineSize, linesPerSet, numTagBits);\n }\n }", "public static MainMemory getInstance(){ \n\t\treturn memory;\n\t}", "public static DBMaker openMemory(){\n return new DBMaker();\n }", "public Pleasure() {\r\n\t\t}", "public BitmapMemoryCache() {\r\n //use 25% of available heap size\r\n setLimit(Runtime.getRuntime().maxMemory() / 4);\r\n }", "public Main() {\n this(DEFAULT_SIZE);\n }", "public Main() {\n this(DEFAULT_SIZE);\n }", "public static C10067G m32839a() {\n String str = \"newInstance\";\n try {\n Class<?> unsafeClass = Class.forName(\"sun.misc.Unsafe\");\n Field f = unsafeClass.getDeclaredField(\"theUnsafe\");\n f.setAccessible(true);\n return new C10063C(unsafeClass.getMethod(\"allocateInstance\", new Class[]{Class.class}), f.get(null));\n } catch (Exception e) {\n try {\n Method getConstructorId = ObjectStreamClass.class.getDeclaredMethod(\"getConstructorId\", new Class[]{Class.class});\n getConstructorId.setAccessible(true);\n int constructorId = ((Integer) getConstructorId.invoke(null, new Object[]{Object.class})).intValue();\n Method newInstance = ObjectStreamClass.class.getDeclaredMethod(str, new Class[]{Class.class, Integer.TYPE});\n newInstance.setAccessible(true);\n return new C10064D(newInstance, constructorId);\n } catch (Exception e2) {\n try {\n Method newInstance2 = ObjectInputStream.class.getDeclaredMethod(str, new Class[]{Class.class, Class.class});\n newInstance2.setAccessible(true);\n return new C10065E(newInstance2);\n } catch (Exception e3) {\n return new C10066F();\n }\n }\n }\n }", "protected abstract Object createJvmMemoryMBean(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer);", "public void createNew(int size);", "public MemoryLogger(int size) {\n\t\tthis.size = size;\n\t}", "public PacketBuilder() {\n\t\tthis(1024);\n\t}", "public ByteArrayCache() {\n try {\n imm = ImmortalMemory.instance();\n byteBuffers = (Queue) imm.newInstance(Queue.class);\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.WARN, getClass(), \"<init>\", e);\n System.exit(-1);\n }\n }", "public void testPhysicalMemoryLessThanJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setPhysicalMemory(1207959551);\n jvmRun.doAnalysis();\n Assert.assertTrue(Analysis.ERROR_PHYSICAL_MEMORY + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_PHYSICAL_MEMORY));\n }", "long getMemory();", "long getMemory();", "private void init() {\n mMemoryCache = new LruCache<String, Bitmap>(DEFAULT_MEM_CACHE_SIZE) {\n /**\n * Measure item size in kilobytes rather than units which is more\n * practical for a bitmap cache\n */\n @Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = getBitmapSize(bitmap) / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }\n };\n }", "public Heap() {\r\n\t\tthis(DEFAULT_INITIAL_CAPACITY, null);\r\n\t}", "protected void initJvmMemory(MBeanServer paramMBeanServer) throws Exception {\n/* 504 */ String str = getGroupOid(\"JvmMemory\", \"1.3.6.1.4.1.42.2.145.3.163.1.1.2\");\n/* 505 */ ObjectName objectName = null;\n/* 506 */ if (paramMBeanServer != null) {\n/* 507 */ objectName = getGroupObjectName(\"JvmMemory\", str, this.mibName + \":name=sun.management.snmp.jvmmib.JvmMemory\");\n/* */ }\n/* 509 */ JvmMemoryMeta jvmMemoryMeta = createJvmMemoryMetaNode(\"JvmMemory\", str, objectName, paramMBeanServer);\n/* 510 */ if (jvmMemoryMeta != null) {\n/* 511 */ jvmMemoryMeta.registerTableNodes(this, paramMBeanServer);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 517 */ JvmMemoryMBean jvmMemoryMBean = (JvmMemoryMBean)createJvmMemoryMBean(\"JvmMemory\", str, objectName, paramMBeanServer);\n/* 518 */ jvmMemoryMeta.setInstance(jvmMemoryMBean);\n/* 519 */ registerGroupNode(\"JvmMemory\", str, objectName, jvmMemoryMeta, jvmMemoryMBean, paramMBeanServer);\n/* */ } \n/* */ }", "private Instantiation(){}", "public void onMemoryExceed();", "public EmptyHeapException() {\n }", "@Test (expected = AbstractMainMemory.InvalidAddressException.class)\n public void getTest() throws AbstractMainMemory.InvalidAddressException {\n mem = new MainMemory(SIZE);\n mem.set(0, new byte[]{0x12, 0x13, 0x14, 0x15});\n assertArrayEquals(new byte[]{0x12, 0x13, 0x14, 0x15}, mem.get(0, 4));\n\n // max length\n mem = new MainMemory(SMALL_SIZE);\n mem.set(0, new byte[]{0x12, 0x13});\n assertArrayEquals(new byte[]{0x12, 0x13, 0, 0}, mem.get(0, SMALL_SIZE));\n assertArrayEquals(new byte[]{0, 0}, mem.get(2, 2));\n\n // array out of range\n mem.get(2, SMALL_SIZE);\n }", "static protected int[] allocMemory(int size)\n\t{\n\t\tint m[] = new int[size];\n\t\tArrays.fill(m,(byte)0xff);\n\t\treturn m;\n\t}", "public MemManager( int poolSize )\n {\n\n this.poolSize = poolSize;\n memoryPool = new byte[poolSize];\n // creates a twoWayLinkedList that will store HashMaps defining the\n // blocks\n // of free space within our pool\n freeBlock = new HashMap<Integer, Integer>( 1 );\n freeBlock.put( 0, poolSize );\n freeBlockList = new TwoWayLinkedList<HashMap<Integer, Integer>>();\n // Initially adds the entire memory\n freeBlockList.add( freeBlock );\n\n }", "MyHashMap(int initialCapacity) {\r\n data = new Node[initialCapacity];\r\n }", "public BinaryHeap() {\n }", "public abstract long estimateMemorySize();", "public int DataMemorySize() { return DATA_MEMORY_SIZE; }", "public IMemory getMemory() { return memory; }", "public AsmMemoryMap(int numRegisters, int sizeOfMemory, int startPoint) {\r\n\t\tfinal int POINTERCOPY = 1; // 1 is added to the array of memory addresses to allocate a memory address for the pointer copy register\r\n\t\t\r\n\t\tthis.registers = new AsmMemoryAddress[numRegisters];\r\n\t\tthis.fullMemory = new AsmMemoryAddress[numRegisters+sizeOfMemory+POINTERCOPY+1/*memory pointer*/+3/*memory pointer arr*/];\r\n\t\tthis.programMemory = new AsmMemoryAddress[sizeOfMemory];\r\n\t\t\r\n\t\tinit(startPoint);\r\n\t}", "public MemoryEntryInfo createMemoryEntryInfo() {\n\t\tMemoryEntryInfo info = new MemoryEntryInfo(new HashMap<String, Object>(this.info.getProperties()));\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILE_MD5, md5);\n\t\tinfo.getProperties().put(MemoryEntryInfo.FILENAME, fileName);\n\t\tinfo.getProperties().put(MemoryEntryInfo.OFFSET, fileoffs);\n\t\treturn info;\n\t}", "public void setMemorySize(Integer memorySize) {\n this.memorySize = memorySize;\n }", "@SuppressWarnings(\"unchecked\")\n public dHeap() {\n // Calls third constructor to initialize a binary max-dHeap with capacity = 6\n this(BINARY, DEFAULT_SIZE, true);\n }", "public DynamicArray() {\n this(16);\n }", "default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }", "public AddressCacheImpl() {\n\t\tthis(CACHE_SIZE_DEFAULT, 0L);\n\t}", "Reproducible newInstance();", "public void testCtorLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n assertNotNull(\"Fail to create MessageImpl instance.\",\n new MessageImpl());\n }\n System.out.println(\"Creating \" + TOTAL_ITERATION + \" MessageImpl instances\"\n + \" with the first constructor costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "protected abstract SharedMemory make_infos();", "public int getMemory()\n\t{\n\t\treturn memorySize;\n\t}", "public void setMemorySize(Integer memorySize) {\n this.MemorySize = memorySize;\n }", "public GenericDynamicArray() {this(11);}", "One(){\n data = new int[DEFAULT_CAPACITY];\n }", "public MemoryGame() {\n infoCard = new Dialogue(\"Memory! As a cashier, you must be able to remember customers' orders. Click cards to flip over and match pairs. Good luck!\", \"Coworker\");\n drawing = new MemoryGameDrawing();\n Utility.changeDrawing(drawing);\n bgm = new BGM(\"memory\");\n bgm.play();\n }", "public Heap12()\n {\n arrayList = new ArrayList<E>(5);\n size = 0;\n isMax = false;\n cap = 5;\n }", "byte[] allocateArray(int initialCapacity)\r\n/* 53: */ {\r\n/* 54: 87 */ return new byte[initialCapacity];\r\n/* 55: */ }", "public void testPhysicalMemoryEqualJvmAllocation() {\n String jvmOptions = \"-Xmx1024M -XX:MaxPermSize=128M\";\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setPhysicalMemory(1207959552);\n jvmRun.doAnalysis();\n Assert.assertFalse(Analysis.ERROR_PHYSICAL_MEMORY + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.ERROR_PHYSICAL_MEMORY));\n }", "public ByteArray()\n\t{\n\t\t// initialize the byte array\n\t\tbytes = new byte[0];\n\t}", "public NodeHeap () {\n // Stupid Java doesn't allow init generic arrays\n heap = new Node[DEFAULT_SIZE];\n size = 0;\n }", "public void testSun13AccuracyNull_Shallow() throws Exception {\n assertEquals(\"null memory size not correct\", 4,\n test.getShallowMemoryUsage(null).getUsedMemory());\n }", "public void initialize(int size);", "public interface MemoryInstrumentation {\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory that has been allocated by this instance. The return value is equal to the sum\n * of the values returned by {@link #memoryUsed()} and {@link #memoryUnused()}.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated by this instance\n */\n long memoryAllocated();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory actually in use by this instance\n */\n long memoryUsed();\n\n\n /**\n * Returns an <i>estimate</i> of the total bytes of memory allocated, but not actually in use by this instance.\n * <p>\n * This value must be estimated because actual memory consumed is different for different CPU architectures and Java runtime implementations,\n * and possibly even on flags used to invoke the runtime.\n *\n * @return the estimated bytes of memory allocated but not in use by this instance\n */\n long memoryUnused();\n}", "MemoryPartition createMemoryPartition();", "public Heap(){\n data = new Vector();\n }", "@Test\n public void createLowMemoryIfNeededWithMemberArg_ReturnsNullWhenNotOptimizedForWrite()\n throws Exception {\n createLowMemoryIfNeededWithMemberArg_returnsNull(false, false, member);\n }", "public ArrayHeap() {\r\n capacity = 10;\r\n length = 0;\r\n heap = makeArrayOfT(capacity);\r\n }", "public Heap12( int capacity, boolean isMaxHeap)\n {\n arrayList = new ArrayList<E>(capacity);\n size = 0;\n isMax = isMaxHeap;\n cap = capacity;\n }", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "@Test\n public void constructorInitializesAllItemsInUnknownState() {\n FirstAidItem firstAidItem = Tests.buildFirstAidItem(Point.pt(2.5, 3.5));\n WeaponItem weaponItem = Tests.buildWeaponItem(Point.pt(1.5, 0.5), Weapon.WeaponType.HANDGUN);\n\n Bot bot = Tests.mockBot();\n ItemMemory itemMemory = new ItemMemory(bot, asList(firstAidItem, weaponItem));\n\n assertThat(itemMemory.get(firstAidItem).getState(), is(ItemMemoryRecord.State.UNKNOWN));\n assertThat(itemMemory.get(weaponItem).getState(), is(ItemMemoryRecord.State.UNKNOWN));\n }", "public static void main(String[] args) {\n Memory mem = new Memory();\n System.out.println(\n \"Initial memory: \"\n + Utils.doubleToString(Memory.toMegaByte(mem.getInitial()), 1) + \"MB\" \n + \" (\" + mem.getInitial() + \")\");\n System.out.println(\n \"Max memory: \"\n + Utils.doubleToString(Memory.toMegaByte(mem.getMax()), 1) + \"MB\"\n + \" (\" + mem.getMax() + \")\");\n }", "public CPU (String name, AbstractMainMemory memory) {\n super (name, memory);\n }", "@Test\n public void createLowMemoryIfNeededWithSetArg_ReturnsNullWhenNotOptimizedForWrite()\n throws Exception {\n createLowMemoryIfNeededWithSetArg_returnsNull(false, false, memberSet);\n }", "@Benchmark\n public AllocAndZeroStoreHelper testAllocAndZeroStore() throws Exception {\n return new AllocAndZeroStoreHelper(s1, s2, s3, s4, s5, s6, s7, s8);\n }", "public static void getOutOfMemoryErrorMetaspace() {\n LOGGER.info(String.format(MESSAGE, \"OutOfMemoryError\", \"to many loaded classes\"));\n\n for (int i = 0; i < 1700; i++) {\n try {\n Class clazz = classPool.makeClass(i + \"class\").toClass();\n } catch (CannotCompileException e) {\n e.printStackTrace();\n }\n }\n }" ]
[ "0.79512703", "0.73473865", "0.71775776", "0.71243954", "0.706125", "0.69973147", "0.69113684", "0.6806487", "0.6630542", "0.6594453", "0.6575889", "0.6543084", "0.65334743", "0.64737487", "0.6369759", "0.6366027", "0.6296663", "0.6292311", "0.62461025", "0.62116563", "0.60979456", "0.6080022", "0.60735345", "0.60157746", "0.59943974", "0.59922385", "0.5961851", "0.59137666", "0.5880828", "0.5880828", "0.5879796", "0.585495", "0.58229685", "0.5743906", "0.57345533", "0.569257", "0.5636706", "0.56329536", "0.5600806", "0.5592313", "0.5579885", "0.5579885", "0.55621713", "0.5547037", "0.5524893", "0.55242026", "0.5516025", "0.550506", "0.54991996", "0.5485932", "0.5485932", "0.5482864", "0.5481866", "0.54626817", "0.54536396", "0.54493546", "0.54428864", "0.54255956", "0.54208946", "0.54157895", "0.540742", "0.5407144", "0.54017246", "0.53878194", "0.53822577", "0.53609926", "0.5350312", "0.5348343", "0.5345929", "0.53401464", "0.5329161", "0.5328568", "0.5310975", "0.5305607", "0.53043413", "0.5294139", "0.52938986", "0.5293616", "0.5290271", "0.52790064", "0.5260216", "0.5255116", "0.525341", "0.52533156", "0.5243379", "0.52423775", "0.5234689", "0.52291906", "0.5221642", "0.52216005", "0.52198607", "0.52179205", "0.5216116", "0.52146035", "0.52129763", "0.52060485", "0.5204288", "0.5199734", "0.5188552", "0.51819754" ]
0.6526394
13
Memory write. A generic object is written into it. Virtual method, it has to be overridden in a derived data type.
protected abstract void write (Object val);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeObject ();", "public abstract <T> SerializationStream writeObject(T t);", "public void writeObject(Object obj) throws IOException;", "void writeCustom(Object custom);", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "public abstract void write(O value) throws IOException;", "public abstract void write(T dataElement);", "@Override\n public void write() {\n\n }", "public abstract void serialize(OutputStream stream, T object) throws IOException;", "String objectWrite();", "private void writeObject(ObjectOutputStream _stream)\n/* 428: */ throws IOException\n/* 429: */ {\n/* 430:503 */ _stream.defaultWriteObject();\n/* 431:504 */ writeCustomData(_stream);\n/* 432: */ }", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "void writeObject(OutputSerializer out) throws java.io.IOException;", "public void writeObject(Object obj) throws IOException\n\t{\n\t\tif (obj == null) {\n\t\t\twriteMark(Ion.NULL);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBinary) {\n\t\t\tfinal IonBinary iObj = (IonBinary) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\tiObj.save(this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof IonBundled) {\n\t\t\tfinal IonBundled iObj = (IonBundled) obj;\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tiObj.save(bundle);\n\t\t\twriteBundle(bundle);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBundled(obj)) {\n\t\t\tfinal IonizerBundled<?> ionizer = Ion.getIonizerBundledForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tfinal IonDataBundle bundle = new IonDataBundle();\n\t\t\tionizer._save(obj, bundle);\n\t\t\twriteBundle(bundle);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Ion.isObjectIndirectBinary(obj)) {\n\t\t\tfinal IonizerBinary<?> ionizer = Ion.getIonizerBinaryForClass(obj.getClass());\n\t\t\t\n\t\t\twriteMark(Ion.getMark(obj));\n\t\t\t\n\t\t\tionizer._save(obj, this);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Map) {\n\t\t\twriteMark(Ion.MAP);\n\t\t\twriteMap((Map<?, ?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Collection) {\n\t\t\twriteMark(Ion.SEQUENCE);\n\t\t\twriteSequence((Collection<?>) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Boolean) {\n\t\t\twriteMark(Ion.BOOLEAN);\n\t\t\twriteBoolean((Boolean) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Byte) {\n\t\t\twriteMark(Ion.BYTE);\n\t\t\twriteByte((Byte) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Character) {\n\t\t\twriteMark(Ion.CHAR);\n\t\t\twriteChar((Character) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Short) {\n\t\t\twriteMark(Ion.SHORT);\n\t\t\twriteShort((Short) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Integer) {\n\t\t\twriteMark(Ion.INT);\n\t\t\twriteInt((Integer) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Long) {\n\t\t\twriteMark(Ion.LONG);\n\t\t\twriteLong((Long) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Float) {\n\t\t\twriteMark(Ion.FLOAT);\n\t\t\twriteFloat((Float) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Double) {\n\t\t\twriteMark(Ion.DOUBLE);\n\t\t\twriteDouble((Double) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String) {\n\t\t\twriteMark(Ion.STRING);\n\t\t\twriteString((String) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof boolean[]) {\n\t\t\twriteMark(Ion.BOOLEAN_ARRAY);\n\t\t\twriteBooleans((boolean[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof byte[]) {\n\t\t\twriteMark(Ion.BYTE_ARRAY);\n\t\t\twriteBytes((byte[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof char[]) {\n\t\t\twriteMark(Ion.CHAR_ARRAY);\n\t\t\twriteChars((char[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof short[]) {\n\t\t\twriteMark(Ion.SHORT_ARRAY);\n\t\t\twriteShorts((short[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof int[]) {\n\t\t\twriteMark(Ion.INT_ARRAY);\n\t\t\twriteInts((int[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof long[]) {\n\t\t\twriteMark(Ion.LONG_ARRAY);\n\t\t\twriteLongs((long[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof float[]) {\n\t\t\twriteMark(Ion.FLOAT_ARRAY);\n\t\t\twriteFloats((float[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof double[]) {\n\t\t\twriteMark(Ion.DOUBLE_ARRAY);\n\t\t\twriteDoubles((double[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof String[]) {\n\t\t\twriteMark(Ion.STRING_ARRAY);\n\t\t\twriteStrings((String[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (obj instanceof Object[]) {\n\t\t\twriteMark(Ion.OBJECT_ARRAY);\n\t\t\twriteObjects((Object[]) obj);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new IOException(\"Object \" + obj + \" could not be be written to stream.\");\n\t}", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "public abstract void write(DataOutput out) throws IOException;", "@Override\n\tpublic void WriteData(String obj) {\n\t\t\n\t}", "private void writeObject(final ObjectOutputStream out) throws IOException {\n try {\n if (location == null) location = IOHelper.serializeData(object);\n IOHelper.writeData(location, new StreamOutputDestination(out));\n } catch (final IOException e) {\n throw e;\n } catch (final Exception e) {\n throw new IOException(e);\n }\n }", "@Override\n public final void writeTo(final Object object, final Class<?> type,\n final Type genericType, final Annotation[] annotations,\n final MediaType mediaType,\n final MultivaluedMap<String, Object> httpHeaders,\n final OutputStream entityStream) throws IOException {\n OutputStreamWriter writer = new OutputStreamWriter(entityStream,\n \"UTF-8\");\n try {\n Type jsonType;\n if (type.equals(genericType)) {\n jsonType = type;\n } else {\n jsonType = genericType;\n }\n getGson().toJson(object, jsonType, writer);\n } finally {\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (IOException e) {\n // ignore, nothing to be done here anyway\n }\n }\n }", "private void writeObject(\n \t\t ObjectOutputStream aOutputStream\n\t\t ) throws IOException {\n\t\t //perform the default serialization for all non-transient, non-static fields\n \t\t aOutputStream.defaultWriteObject();\n \t}", "private void writeObject(final ObjectOutputStream out) throws IOException\n\t{\n\t\t// Read the data\n\t\tif (dfos.isInMemory())\n\t\t{\n\t\t\tcachedContent = get();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcachedContent = null;\n\t\t\tdfosFile = dfos.getFile();\n\t\t}\n\n\t\t// write out values\n\t\tout.defaultWriteObject();\n\t}", "public <T> void serialize(T obj, Class<T> type, OutputStream os) throws SerializationException;", "public void writeObject(ZObjectOutputStream out) throws IOException {\n }", "public abstract void writeData(DataOutput dout) throws IOException;", "@Override\r\n\tpublic void write(IByteBuffer target, long offset) {\n\r\n\t}", "private void writeObject(ObjectOutputStream out) throws IOException\r\n\t{\r\n\t\tthis.serialize(out);\r\n\t}", "protected abstract void _write(DataOutput output) throws IOException;", "@Override\r\n public void store(long key, O object) throws OBException {\n }", "public void serialize(RevisionDataOutput dataOutput, T object) throws IOException {\n serialize(dataOutput.getBaseStream(), object);\n }", "void writeReference(Object obj);", "public interface ObjectOutput extends DataOutput, AutoCloseable {\n /**\n * Write an object to the underlying storage or stream. The class that implements this interface\n * defines how the object is written.\n *\n * @param obj the object to be written\n * @exception IOException Any of the usual Input/Output related exceptions.\n */\n public void writeObject(Object obj) throws IOException;\n\n /**\n * Writes a byte. This method will block until the byte is actually written.\n * \n * @param b the byte\n * @exception IOException If an I/O error has occurred.\n */\n public void write(int b) throws IOException;\n\n /**\n * Writes an array of bytes. This method will block until the bytes are actually written.\n * \n * @param b the data to be written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[]) throws IOException;\n\n /**\n * Writes a sub array of bytes.\n * \n * @param b the data to be written\n * @param off the start offset in the data\n * @param len the number of bytes that are written\n * @exception IOException If an I/O error has occurred.\n */\n public void write(byte b[], int off, int len) throws IOException;\n\n /**\n * Flushes the stream. This will write any buffered output bytes.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void flush() throws IOException;\n\n /**\n * Closes the stream. This method must be called to release any resources associated with the\n * stream.\n * \n * @exception IOException If an I/O error has occurred.\n */\n public void close() throws IOException;\n}", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n aOutputStream.defaultWriteObject();\n }", "@Override\r\n\tpublic void write(CEntity entity) {\n\t\tentity.write(writer);\t\t\r\n\t}", "public void writeObject(RandomAccessFile arq) throws IOException{\n byte[] dados = this.getByteArray();\n arq.writeChar(' ');\n arq.writeShort(dados.length);\n arq.write(dados);\n }", "@SuppressWarnings(\"unchecked\")\n public void writeObject(SQLData x) throws SQLException{\n /**\n * Except for the types that are passed as objects\n * this seems to be the only way for an object to\n * get a null value for a field in a structure.\n *\n * Note: this means that the class defining SQLData\n * will need to track if a field is SQL null for itself\n */\n if(x==null){\n attribs.add(null);\n }else{\n /**\n * We have to write out a SerialStruct that contains\n * the name of this class otherwise we don't know\n * what to re-instantiate during readSQL()\n */\n attribs.add(new SerialStruct(x,map));\n }\n }", "@Override\n public int writeData(OutputStream out, T data) throws Exception\n {\n OutputStreamWriter w = new OutputStreamWriter(out, \"UTF-8\");\n w.write(_serializer.deepSerialize(data));\n w.close();\n return -1;\n }", "public abstract void write(Entity entity, Writer out) throws IOException;", "@Override\n protected void doWriteTo(StreamOutput out) throws IOException {\n }", "protected void writeWrite ()\n {\n stream.println (\" public void _write (org.omg.CORBA.portable.OutputStream o)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" o.write_string (value);\");\n\n else if (mType instanceof PrimitiveEntry)\n {\n String name = entry.name ();\n stream.println (\" \" + name + \" vb = new \" + name + \" (value);\");\n stream.println (\" \" + helperClass + \".write (o, vb);\");\n }\n\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n }\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n stream.println (\" }\");\n stream.println ();\n }", "private void writeObject(ObjectOutputStream out) throws IOException {\n out.defaultWriteObject();\n }", "@Override\r\n\tpublic void writeObject(Object obj) throws IOException {\n\t\t\r\n\t\tif (obj instanceof HandShake ) {\r\n\t\t\t((HandShake) obj).write(this);\r\n\t\t} else if (obj instanceof Message){\r\n\t\t\t((Message) obj).write(this);\r\n\t\t} else {\r\n\t\t\tthrow new UnsupportedOperationException(\" Message is not supported to write \");\r\n\t\t}\r\n\t}", "@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }", "protected byte[] objectToBytes(O object) throws OBException {\r\n try {\r\n return object.store();\r\n\r\n } catch (IOException e) {\r\n throw new OBException(e);\r\n }\r\n }", "public void writeTo(Object obj, CodedOutputByteBufferNano codedOutputByteBufferNano) {\n if (this.repeated) {\n writeRepeatedData(obj, codedOutputByteBufferNano);\n } else {\n writeSingularData(obj, codedOutputByteBufferNano);\n }\n }", "@SuppressWarnings(\"all\")\n protected static boolean writeObjectType(Output out, Object obj) {\n if (obj instanceof ObjectMap || obj instanceof BeanMap) {\n out.writeObject((Map) obj);\n } else if (obj instanceof Map) {\n out.writeMap((Map) obj);\n } else if (obj instanceof RecordSet) {\n out.writeRecordSet((RecordSet) obj);\n } else {\n out.writeObject(obj);\n }\n return true;\n }", "public void memPut(String str, T t) {\n }", "void writeObject(Map<Object, Object> map);", "public abstract void write(byte[] b);", "@SuppressWarnings(\"unchecked\")\n public void put(final T object) {\n data.add(object);\n }", "public void writeArray(Object o) throws IOException;", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n //perform the default serialization for all non-transient, non-static fields\n aOutputStream.defaultWriteObject();\n }", "private Object writeReplace() throws ObjectStreamException {\n return new MeasureUnitProxy(type, subType);\n }", "private void writeObject(final java.io.ObjectOutputStream out) throws java.io.IOException {\n\t\t/*\n\t\t * out.writeInt(0); // Version of the stream. // Version 0 outstuff...\n\t\t * out.writeObject(states); out.writeObject(initialState);\n\t\t * out.writeObject(finalStates); out.writeObject(transitions); if (this\n\t\t * instanceof TuringMachine) { out.writeInt(((TuringMachine)\n\t\t * this).tapes); } out.writeObject(\"SENT\"); // The sentinel object.\n\t\t */\n\t}", "private void writeDeviceIndependentObject(XDIMEContextInternal context)\n throws XDIMEException {\n\n DeviceIndependentTypeProcessor deviceIndependentTypeProcessor =\n new DeviceIndependentTypeProcessor();\n deviceIndependentTypeProcessor.writeObject(context,(ObjectAttribute)protocolAttributes,\n bodyContentBuffer);\n }", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n\t java.io.IOException\n {\n s.defaultWriteObject();\n }", "void write();", "@Override\n\tpublic void encode(Crate object, IoBuffer buf) {\n\t}", "@Override\n public void write(byte[] buf) throws IOException;", "private void method_979(ObjectOutputStream var1) {\n var1.defaultWriteObject();\n var1.writeObject(this.a);\n }", "void serialize(Object obj, OutputStream stream) throws IOException;", "@Override\n public void serialize(ByteBuffer buf) {\n }", "public interface WritableObject {\n\n\t/** Write this object to the specified {@link DataTransferOutput} stream.\n\t * @param outputStream the data output stream to write the data to\n\t * @throws IOException if there is an error writing data to the output stream\n\t */\n\tpublic void writeData(DataTransferOutput outputStream) throws IOException;\n\n}", "public synchronized final void write(Serializable o) {\n\t\toutQueue.enqueue(o);\n\t}", "@Override\n public void marshal(T object, XMLStreamWriter output,\n AttachmentMarshaller am) throws JAXBException {\n try {\n output.flush();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n SAX2StaxContentHandler handler = new SAX2StaxContentHandler(output);\n if (object instanceof DataObject) {\n serializeDataObject((DataObject) object, new SAXResult(handler),\n am);\n return;\n }\n\n try {\n String value = serializePrimitive(object, javaType);\n String prefix = output.getPrefix(xmlTag.getNamespaceURI());\n //TODO, this is a hack, seems to be wrong. why should namespace returned is \"\"?\n if (xmlTag.getNamespaceURI().equals(\"\")) {\n output.writeStartElement(\"\", xmlTag.getLocalPart(), xmlTag.getNamespaceURI());\n// } else if (prefix == null) {\n// output.writeStartElement(xmlTag.getNamespaceURI(), xmlTag.getLocalPart());\n } else {\n output.writeStartElement(prefix, xmlTag.getLocalPart(), xmlTag.getNamespaceURI());\n output.writeNamespace(prefix, xmlTag.getNamespaceURI());\n }\n output.writeCharacters(value);\n output.writeEndElement();\n } catch (XMLStreamException e) {\n throw new SDODatabindingException(e);\n }\n }", "protected static boolean writeCustomType(Output out, Object obj) {\n if (out.isCustom(obj)) {\n // Write custom data\n out.writeCustom(obj);\n return true;\n } else {\n return false;\n }\n }", "public interface Output {\n\n void putString(String string);\n\n // Basic Data Types\n /**\n * Write number\n *\n * @param num\n * Number\n */\n void writeNumber(Number num);\n\n /**\n * Write boolean\n *\n * @param bol\n * Boolean\n */\n void writeBoolean(Boolean bol);\n\n /**\n * Write string\n *\n * @param string\n * String\n */\n void writeString(String string);\n\n /**\n * Write date\n *\n * @param date\n * Date\n */\n void writeDate(Date date);\n\n void writeNull();\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Collection<?> array);\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object[] array);\n\n /**\n * Write primitive array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object array);\n\n /**\n * Write map.\n *\n * @param map\n * Map to write\n */\n void writeMap(Map<Object, Object> map);\n\n /**\n * Write array as map.\n *\n * @param array\n * Array to write\n */\n void writeMap(Collection<?> array);\n\n /**\n * Write object.\n *\n * @param object\n * Object to write\n */\n void writeObject(Object object);\n\n /**\n * Write map as object.\n *\n * @param map\n * Map to write\n */\n void writeObject(Map<Object, Object> map);\n\n /**\n * Write recordset.\n *\n * @param recordset\n * Recordset to write\n */\n void writeRecordSet(RecordSet recordset);\n\n /**\n * Write XML object\n *\n * @param xml\n * XML document\n */\n void writeXML(Document xml);\n\n /**\n * Write ByteArray object (AMF3 only).\n *\n * @param array\n * object to write\n */\n void writeByteArray(ByteArray array);\n\n /**\n * Write a Vector&lt;int&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorInt(Vector<Integer> vector);\n\n /**\n * Write a Vector&lt;uint&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorUInt(Vector<Long> vector);\n\n /**\n * Write a Vector&lt;Number&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorNumber(Vector<Double> vector);\n\n /**\n * Write a Vector&lt;Object&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorObject(Vector<Object> vector);\n\n /**\n * Write reference to complex data type\n *\n * @param obj\n * Referenced object\n */\n void writeReference(Object obj);\n\n /**\n * Whether object is custom\n *\n * @param custom\n * Object\n * @return true if object is of user type, false otherwise\n */\n boolean isCustom(Object custom);\n\n /**\n * Write custom (user) object\n *\n * @param custom\n * Custom data type object\n */\n void writeCustom(Object custom);\n\n /**\n * Clear references\n */\n void clearReferences();\n}", "private void writeObject(ObjectOutputStream oos) throws IOException {\n oos.defaultWriteObject();\n /*if(serializeEverything) {\n //The cast to Serializable is necessary to avoid Sonar bug issues because List does not implement Serializable but all implementations of List (such as ArrayList) in effect implements Serializable\n //oos.writeObject((Serializable)cardPower);\n oos.writeObject((Serializable)weapons);\n oos.writeInt(points);\n }\n serializeEverything = false;*/\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public void serialize(OutputStream stream, BaseType o) throws IOException {\n Class c = o.getClass();\n val si = this.serializersByType.get(c);\n ensureCondition(si != null, \"No serializer found for %s.\", c.getName());\n si.serializer.beforeSerialization(o);\n\n // Encode the Serialization Format Version.\n stream.write(SERIALIZER_VERSION);\n\n // Encode the Object type; this will be used upon deserialization.\n stream.write(si.id);\n\n // Write contents.\n si.serializer.serializeContents(stream, o);\n }", "public <T> SerializationStream writeValue(T value){\n return writeObject(value);\n }", "private void method_157(ObjectOutputStream var1) {\n var1.defaultWriteObject();\n var1.writeObject(this.a());\n }", "public void writeValue(Object value) throws IOException\n {\n if (value == null) {\n writeNullValue();\n return;\n }\n _writeValue(value, _writerLocator.findSerializationType(value.getClass()));\n }", "@Override\r\n\tpublic final void saveObjectData() throws BillingSystemException{\n\t}", "private void setData(T data, int size, List<? extends T> memory, T type) { }", "private void method_277(ObjectOutputStream var1) {\n var1.defaultWriteObject();\n var1.writeObject(this.a);\n }", "public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;", "@Override\n\tpublic void write(WorkVO workVO) {\n\t\tworkMapper.write(workVO);\n\t\t\n\t}", "@Override\n\tpublic void write(Object obj, File file) throws IJunitException {\n\t\t\n\t}", "public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;", "private void writeObject(ObjectOutputStream out) throws IOException {\n\tout.defaultWriteObject();\n\tservID.writeBytes(out);\n }", "public <E extends Writeable> void storeObject(String sql, E e);", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.lang.ClassNotFoundException,\n java.io.IOException\n {\n s.defaultWriteObject();\n }", "@Override\n protected void writeFixed(Schema schema, Object datum, Encoder out)\n throws IOException {\n\n final byte[] bytes = ((GenericFixed) datum).bytes();\n GenericBinding.writeFixed(schema, bytes, out);\n }", "@Override\n public void write(byte[] buf, int offset, int size) throws IOException;", "private final void writeObject(ObjectOutputStream out) throws java.io.IOException {\n\t\tthrow new java.io.IOException(\"Object cannot be serialized\");\n\t}", "void mo6321a(OutputStream outputStream, Object obj);", "public boolean ownWrite(Object data);", "private void writeObject(ObjectOutputStream out) throws IOException{\n out.defaultWriteObject();\n // writeUTF <--> readUTF, will write length;\n // writeChars <--> readChar, will not write length, you should know the length before read.\n out.writeUTF(company);\n // out.writeChars(company);\n out.writeUTF(encryptor.xor(password));\n }", "private void writeObject(java.io.ObjectOutputStream out) throws IOException {\n throw new NotSerializableException();\n }", "public void write(Object value, Writer writer)\n {\n if (value == null) {\n writer.writeNull();\n\n return;\n }\n\n traversalStack.push(value);\n\n TypeAdapter<Object> adapter = getAdapter(value.getClass());\n\n adapter.write(value, writer, this);\n\n traversalStack.pop();\n }", "@Override\n\tpublic void write(OutStream outStream) {\n\t}", "public byte[] writeValue(TBase value) throws IOException {\n Validate.notNull(value, \"Value object is null\");\n\n byte[] bytes;\n try {\n bytes = serializer.serialize(value);\n } catch (TException e) {\n throw new IOException(e);\n }\n\n return bytes;\n }", "public void writeObject( DataOutput out ) throws IOException {\n boolean sgIO = node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO;\n out.writeBoolean( sgIO );\n out.writeInt( symbol.nodeID );\n\n\n int nodeClassID = control.getNodeClassID( node );\n\n out.writeShort( nodeClassID );\n\n if (nodeClassID==-1)\n out.writeUTF( nodeClassName );\n\n writeConstructorParams( out );\n\n if (sgIO) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t DataOutputStream tmpOut = new DataOutputStream( byteStream );\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).writeSceneGraphObject( tmpOut );\n\t tmpOut.close();\n\t out.writeInt( byteStream.size() );\n\t out.write( byteStream.toByteArray() );\n }\n\n writeUserData( out );\n writeString(node.getName(), out);\n\n writeCapabilities( out );\n }", "private void writeObject(ObjectOutputStream oos) throws IOException {\n\t\toos.defaultWriteObject();\r\n\t\tGdx.app.log(\"L/S\", \"entityInfoCollector size: \" + manList.size() + \":\" + buildingsList.size() + \":\" + buildingsList.size());\r\n\t\t\r\n\t}", "@Override\n public void serializeObject(Object o, int hashCode, String destDir) {\n // throw new NotImplementedException();\n }", "@Override\n\tpublic void write(DataOutput dout) throws IOException {\n\t\tdout.writeLong(this.time);\n\t\tdout.writeInt(this.intVal);\n\t}", "Write createWrite();", "public void writeUnsafe(UnsafeMemory um) {\n int mySize = getWriteUnsafeSize();\n um.putInt(mySize);\n //serial\n um.putLong(serialVersionUID);\n\n //class member\n um.putString(fileName);\n\n\n //rocksDbKlueFileName\n um.putString(rocksDbKlueFileName);\n //boolean readOnly\n um.putBoolean(readOnly);\n\n um.putInt(last);\n\n //arrays\n um.put(nameIndex, UnsafeMemory.ARRAYLIST_STRING_TYPE);\n um.put(entries, UnsafeMemory.ARRAYLIST_KID_TYPE);\n um.put(kingdoms,UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n\n\n //No longer stored in memory\n //um.put(sequences,UnsafeMemory.ARRAYLIST_DNABITSTRING_TYPE);\n\n\n\n //ArrayList<Integer> sequenceLength = new ArrayList<Integer>();\n um.put(sequenceLength, UnsafeMemory.ARRAYLIST_INT_TYPE);\n //ArrayList<HashMap<Integer,Character>> exceptionsArr;\n\n int total = 0;\n total += UnsafeMemory.SIZE_OF_INT // byte header\n + UnsafeMemory.SIZE_OF_LONG // SerialUID\n + UnsafeMemory.SIZE_OF_INT; // number of entries\n\n for (int z=0; z < exceptionsArr.size(); z++){\n total += UnsafeMemory.getWriteUnsafeSize(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n um.putInt(total);\n um.putLong(serialVersionUID_ArrayListHashMap_INT_CHAR);\n um.putInt(exceptionsArr.size());\n for (int z=0; z < exceptionsArr.size(); z++){\n um.put(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n }", "public void writeExternal(ObjectOutput out) throws IOException{\n\t\tSystem.out.println(\"Inside writeExternal()\");\n\t\t\n\t\t// In this case, I can write my liked data member even transient and static.\n\t\tout.writeInt(this.age);\t\t\n\t\tout.writeObject(this.name);\n\t\tout.writeObject(this.address);\n\t\tout.writeObject(this.job);\n\t}", "public void write(Object o)\r\n throws IOException, XmlPullParserException\r\n {\n if(o instanceof XmlNode) {\r\n\t writeNode((XmlNode)o);\r\n } else if(o instanceof XmlStartTag) {\r\n\t writeStartTag((XmlStartTag)o);\r\n } else if(o instanceof XmlEndTag) {\r\n\t writeEndTag((XmlEndTag)o);\r\n } else if(o instanceof XmlWritable) {\r\n\t ((XmlWritable)o).writeXml(out);\r\n } else {\r\n\t if(o != null) {\r\n\t\twriteContent(o.toString());\r\n\t } else {\r\n\t\t//silenty ignore null values\r\n\t }\r\n\t}\r\n }", "public static void writeObject(JsonGenerator jsonGenerator, Object object) throws IOException {\n\n if (object == null) {\n jsonGenerator.writeNull();\n return;\n }\n\n if (object instanceof String) {\n jsonGenerator.writeString((String) object);\n return;\n }\n\n if (object instanceof Short) {\n jsonGenerator.writeNumber((Short) object);\n return;\n }\n\n if (object instanceof Integer) {\n jsonGenerator.writeNumber((Integer) object);\n return;\n }\n\n if (object instanceof Long) {\n jsonGenerator.writeNumber((Long) object);\n return;\n }\n\n if (object instanceof BigDecimal) {\n jsonGenerator.writeNumber((BigDecimal) object);\n return;\n }\n\n if (object instanceof Float) {\n jsonGenerator.writeNumber((Float) object); // Not GC-free!\n return;\n }\n\n if (object instanceof Double) {\n jsonGenerator.writeNumber((Double) object); // Not GC-free!\n return;\n }\n\n if (object instanceof byte[]) {\n jsonGenerator.writeBinary((byte[]) object);\n return;\n }\n\n jsonGenerator.writeObject(object);\n\n }" ]
[ "0.7281699", "0.709895", "0.69559455", "0.68739974", "0.68554294", "0.6656797", "0.66101253", "0.65803945", "0.65760463", "0.64417934", "0.641931", "0.6405803", "0.63958776", "0.63514215", "0.6303935", "0.6296406", "0.62739974", "0.62016016", "0.6138427", "0.6135932", "0.6131819", "0.6102754", "0.60912263", "0.6023868", "0.6014585", "0.59962815", "0.5993931", "0.5988401", "0.5974873", "0.59688634", "0.59637046", "0.5943212", "0.59385645", "0.5935571", "0.592308", "0.5910725", "0.59079564", "0.5892494", "0.58885074", "0.58744335", "0.5867821", "0.5834414", "0.5826911", "0.58255655", "0.5801992", "0.57775223", "0.5772603", "0.57603335", "0.57298505", "0.5711653", "0.5711131", "0.57058454", "0.57014227", "0.56950176", "0.568142", "0.5677738", "0.5676968", "0.5676186", "0.5671311", "0.5670564", "0.5667163", "0.564413", "0.56427103", "0.56391096", "0.5638708", "0.5637149", "0.563501", "0.56328046", "0.5631378", "0.5625993", "0.5622733", "0.5611007", "0.559798", "0.5595394", "0.5592467", "0.559224", "0.55919254", "0.5588233", "0.5578718", "0.55776125", "0.55623263", "0.55581", "0.5552627", "0.5552514", "0.5549873", "0.5548531", "0.55421394", "0.5539676", "0.5526358", "0.55216146", "0.54998714", "0.54954743", "0.54946166", "0.5494381", "0.54892176", "0.5484914", "0.547769", "0.54650164", "0.5457649", "0.5445037" ]
0.7033695
2
Memory read. A generic object is read from it. Virtual method, it has to be overridden in a derived data type.
protected abstract Object read ();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract <T> T readObject();", "public Object read();", "private void readObject() {}", "private void readObject() {}", "private void readObject() {}", "public abstract org.omg.CORBA.Object read_Object();", "private void readObject() {\n }", "public Object read() throws IOException, RecordIOException;", "public T read() throws IOException;", "@Override\n\tpublic Object readObject() {\n\t\treturn super.readObject();\n\t}", "String objectRead();", "public Object read() throws IOException {\n int code = 1;\n try {\n code = in.readUnsignedByte();\n } catch (EOFException eof) {\n return null;\n }\n if (code == Type.BYTES.code) {\n return new Buffer(readBytes());\n } else if (code == Type.BYTE.code) {\n return readByte();\n } else if (code == Type.BOOL.code) {\n return readBool();\n } else if (code == Type.INT.code) {\n return readInt();\n } else if (code == Type.LONG.code) {\n return readLong();\n } else if (code == Type.FLOAT.code) {\n return readFloat();\n } else if (code == Type.DOUBLE.code) {\n return readDouble();\n } else if (code == Type.STRING.code) {\n return readString();\n } else if (code == Type.VECTOR.code) {\n return readVector();\n } else if (code == Type.LIST.code) {\n return readList();\n } else if (code == Type.MAP.code) {\n return readMap();\n } else if (code == Type.MARKER.code) {\n return null;\n } else if (50 <= code && code <= 200) { // application-specific typecodes\n return new Buffer(readBytes());\n } else {\n throw new RuntimeException(\"unknown type\");\n }\n }", "@Override\n\tpublic void read(Object entidade) {\n\t\t\n\t}", "public <T> T readValue() {\n return readObject();\n }", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "private void readObject() {/*default - does nothing empty block */}", "public synchronized final Object readObject() {\n\t\tif (!inQueue.isEmpty())\n\t\t\treturn inQueue.dequeue();\n\t\telse return null;\n\t}", "Object readValue();", "private void readObject() {/* default - does nothing empty block */\n\t}", "private void readObject() {\n\t\t/* default - does nothing empty block */}", "private void readObject() {/* default - does nothing empty block */\n }", "@Override\r\n\tprotected Object readObject() throws IOException, SerializeException {\r\n\t\treturn AdvancedDeserializerUtil.readObject(super.readObject());\r\n\t}", "public org.omg.CORBA.Object read_Object(Class\n clz) {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "abstract void read();", "public Object readObject() throws IOException, ClassNotFoundException {\n if (objectInputStream == null) {\n objectInputStream = new ObjectInputStream(byteArrayInputStream);\n }\n return objectInputStream.readObject();\n }", "T read(int id);", "T read(int id);", "public Object readObject() throws ClassNotFoundException, IOException;", "void readObject(InputSerializer in) throws java.io.IOException;", "private void readObject() {\n /*default - does nothing empty block */\n }", "@Override\r\n\tpublic void read(Object id) {\n\t\t\r\n\t}", "@Override\n\tpublic int read() {\n\t\tint lowByte = getFirstArg();\n\t\tint highByte = getSecondArg();\n\t\tint address = highByte;\n\t\taddress = address << 8;\n\t\taddress |= lowByte;\n\t\treturn CpuMem.getInstance().readMem(address);\n\t}", "T getObject() {\n\t\t\treturn data;\n\t\t}", "public Object read(Object object) {\n EntityManager em = getEntityManager();\n em.getTransaction().begin();\n Object result = null;\n try {\n result = em.find(object.getClass(), \"id\");\n LOG.debug(\"Found \" + object);\n } catch (Exception e) {\n LOG.error(\"Could not find Object\", e);\n } finally {\n em.close();\n }\n return result;\n }", "@Override\n\tpublic Object read(String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public EncogPersistedObject readObject(final String name) {\r\n\r\n\t\t// did we find the object?\r\n\t\tif (advance(name)) {\r\n\t\t\tfinal String objectType = this.in.getTag().getName();\r\n\t\t\tfinal Persistor persistor = PersistorUtil\r\n\t\t\t\t\t.createPersistor(objectType);\r\n\r\n\t\t\tif (persistor == null) {\r\n\t\t\t\tthrow new PersistError(\"Do not know how to load: \" + objectType);\r\n\t\t\t}\r\n\t\t\treturn persistor.load(this.in);\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public abstract Object getUnderlyingObject();", "public Serializable readObject(){\n Serializable loadedObject = null;\n try {\n FileInputStream fileIn = new FileInputStream(name);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n loadedObject = (Serializable) in.readObject();\n in.close();\n fileIn.close();\n System.out.println(\"Data loaded from: \"+ name);\n } \n catch (IOException i) {\n System.out.println(\"File not found.\");\n } \n catch (ClassNotFoundException c) {\n System.out.println(\"Class not found\");\n }\n return loadedObject;\n }", "public StructManager read() throws Exception;", "T read(String identifier) throws IOException;", "@Nonnull\n public Memory read(@Nonnegative long offset, @Nonnegative int length) {\n return this.read(this.resolvePointer(offset), length);\n }", "public Object readObject() {\n Object fromServer = null;\n\n try {\n fromServer = inputStream.readObject();\n } catch(InvalidClassException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not deserialize the read object!\");\n e.printStackTrace();\n System.exit(1);\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - error reading an object from the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n } catch(ClassNotFoundException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - the read object's data type is unknown!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n return fromServer;\n }", "Read createRead();", "@Override\n\tpublic void read() {\n\n\t}", "protected Object readResolve() throws ObjectStreamException {\n try {\n return getContainer().getField(name).get(null);\n } catch (ReflectiveOperationException e) {\n throw new InvalidObjectException(e.toString());\n }\n }", "public Storable readStorable() throws IOException {\n Storable storable;\n String s = readString();\n\n if (s.equals(\"NULL\"))\n return null;\n\n if (s.equals(\"REF\")) {\n int ref = readInt();\n return (Storable) retrieve(ref);\n }\n\n storable = (Storable) makeInstance(s);\n map(storable);\n storable.read(this);\n return storable;\n }", "Object loadObject() throws Exception;", "public void ownRead();", "Object read(Object inputObject, Settings settings);", "public abstract Object deserialize(Object object);", "public IMemory getMemory() { return memory; }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "Object getRawData();", "@Override\r\n\tpublic void read() {\n\r\n\t}", "private void readObjectNoData() throws ObjectStreamException {}", "public Object getObject() {\n\t\ttry {\n\t\t\tByteArrayInputStream istream = new ByteArrayInputStream(mStoredObjectArray);\n\t\t\tObjectInputStream p;\n\t\t\tObject toReturn = null;\n\t\t\tif (mIsJython) {\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\ttoReturn = null;\n\t\t\t}\n\t\t\tistream.close();\n\t\t\treturn toReturn;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "E read(K id);", "ObjectAndClock tryRead(OID oid, Class type, Clock dependencies);", "public T read(JsonReader in) throws IOException {\n\t return null;\n\t }", "@Override\n public T readData(InputStream in) throws IOException\n {\n String doc = _read(in, \"UTF-8\");\n return _deserializer.deserialize(doc, _itemClass);\n }", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "public byte readByte()\r\n/* 387: */ {\r\n/* 388:400 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 389:401 */ return super.readByte();\r\n/* 390: */ }", "public Asn1Object read() throws IOException {\n\n\t\t\tint tag = this.in.read();\n\n\t\t\tif (tag == -1) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: stream too short, missing tag\");\n\t\t\t}\n\n\t\t\tint length = getLength();\n\n\t\t\tif (tag == BIT_STRING) {\n\t\t\t\t// Not sure what to do with this one.\n\t\t\t\tint padBits = this.in.read();\n\t\t\t\tlength--;\n\t\t\t}\n\n\t\t\tbyte[] value = new byte[length];\n\t\t\tint n = this.in.read(value);\n\t\t\tif (n < length) {\n\t\t\t\tthrow new IllegalStateException(\"Invalid DER: stream too short, missing value\");\n\t\t\t}\n\n\t\t\treturn new Asn1Object(tag, length, value);\n\t\t}", "public interface IObjectInput {\r\n\r\n\t/**\r\n\t * Reads a boolean.\r\n\t *\r\n\t * @return The next boolean.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic boolean readBoolean() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a char.\r\n\t *\r\n\t * @return The next char.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic char readChar() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a 32 bit integer.\r\n\t *\r\n\t * @return The next 32 bit integer.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic int readInt() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a 64 bit integer.\r\n\t *\r\n\t * @return The next 64 bit integer.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic long readLong() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a 16 bit integer.\r\n\t *\r\n\t * @return The next 16 bit integer.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic short readShort() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a utf encoded string.\r\n\t *\r\n\t * @return The next utf encoded string.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic String readUTF() throws IOException;\r\n\t\r\n\t/**\r\n\t * Reads a byte.\r\n\t *\r\n\t * @return The next byte.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic byte readByte() throws IOException;\r\n\r\n\t/**\r\n\t * Reads a number of bytes and writes them into the buffer.\r\n\t * The number of bytes read is defined by the lenght of the\r\n\t * buffer.\r\n\t * \r\n\t * @param buffer The buffer to fill.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic void readBytes(byte[] buffer) throws IOException;\r\n\t\r\n\t/**\r\n\t * Reads a number of bytes and writes them into the buffer\r\n\t * starting from the specified offset. The number of bytes\r\n\t * read is defined by the length parameter.\r\n\t * \r\n\t * @param buffer The buffer to fill.\r\n\t * @param offset The offset to start from.\r\n\t * @param length The number of bytes to fill.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic void readBytes(byte[] buffer, int offset, int length) throws IOException;\r\n\r\n\t/**\r\n\t * Reads an object.\r\n\t * \r\n\t * @return The object that has been read.\r\n\t * @throws IOException Thrown if a problem occurs.\r\n\t */\r\n\tpublic Object readObject() throws IOException;\r\n\r\n}", "protected Object readReference(long offset) {\n assert referenceMessageSize != 0 : \"References are not in use\";\n // Is there a way to compute the element offset once and just\n // arithmetic?\n return UnsafeRefArrayAccess.lpRefElement(references, UnsafeRefArrayAccess.calcRefElementOffset(offset));\n }", "public Object load() {\n return null;\n }", "private Object readObject(String path)\n throws IOException, ClassNotFoundException {\n InputStream file = new FileInputStream(path);\n InputStream buffer = new BufferedInputStream(file);\n ObjectInput input = new ObjectInputStream(buffer);\n Object inputObj = input.readObject();\n input.close();\n return inputObj;\n }", "public Object getObject() ;", "public <T> T readKey() {\n return readObject();\n }", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public Object readExternal(DataInput in)\n throws IOException\n {\n return readObject(in, getBeanInfo().getType().getClassLoader());\n }", "protected Object readResolve() throws java.io.ObjectStreamException\n {\n return( array[ index ] );\n }", "protected Object readResolve() throws java.io.ObjectStreamException\n {\n return( array[ index ] );\n }", "protected Object readResolve() throws java.io.ObjectStreamException\n {\n return( array[ index ] );\n }", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "public Object getObject();", "@Override\n\tpublic int read() {\n\t\treturn super.read();\n\t}", "public abstract void read(DataInput input) throws IOException;", "private Object readResolve() throws java.io.ObjectStreamException\n {\n return( array[ index ] );\n }", "T readOne(int id);", "protected O bytesToObject(byte[] data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n O res = type.newInstance();\r\n try {\r\n res.load(data);\r\n } catch (IOException e) {\r\n throw new OBException(e);\r\n }\r\n return res;\r\n }", "@Override\r\n\tpublic Person read(int id) {\n\t\treturn null;\r\n\t}", "public abstract Object getData();", "public T get() {\n return object;\n }", "public final Object getObject() \n\t{\n\tif (fTop > 0)\n\t\t{\n\t\tfTop--;\n\t\tObject result = fBin[fTop];\n\t\tfBin[fTop] = null;\n\t\treturn result;\n\t\t}\n\n\tfUnderflowCounter++;\n\tif (fHasOverflowed && (fBin.length < MAX_BIN_SIZE))\n\t\t{\n\t\tcreateBin(fBin.length + BIN_GROW_SIZE);\n\t\tfHasOverflowed = false;\n\t\t}\n\t\t\n\ttry\n\t\t{\n\t\treturn fClass.newInstance();\n\t\t}\n\tcatch (Exception e)\n\t\t{\n\t\treturn null;\n\t\t}\n\t}", "protected abstract Reader read() throws IOException;", "protected O bytesToObject(ByteBuffer data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n return bytesToObject(data.array());\r\n }", "@SuppressWarnings(\"unchecked\")\n static <T> T reserialize(T object) {\n checkNotNull(object);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try {\n ObjectOutputStream out = new ObjectOutputStream(bytes);\n out.writeObject(object);\n ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));\n return (T) in.readObject();\n } catch (IOException | ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "public void loadObject(long i, O object) throws OBException {\r\n try{\r\n byte[] data = A.getValue(i);\r\n object.load(data);\r\n }catch(IOException e){\r\n throw new OBStorageException(e);\r\n }\r\n }", "@Override\r\n\tprotected void readImpl()\r\n\t{\r\n\t\t_listId = readD();\r\n\t\tint count = readD();\r\n\t\tif (count <= 0 || count > Config.MAX_ITEM_IN_PACKET || count * BATCH_LENGTH != getByteBuffer().remaining())\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_items = new Item[count];\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t{\r\n\t\t\tint objectId = readD();\r\n\t\t\tint itemId = readD();\r\n\t\t\tlong cnt = readQ();\r\n\t\t\tif (objectId < 1 || itemId < 1 || cnt < 1)\r\n\t\t\t{\r\n\t\t\t\t_items = null;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t_items[i] = new Item(objectId, itemId, cnt);\r\n\t\t}\r\n\t}", "public abstract LocalAbstractObject getObject(UniqueID objectID) throws NoSuchElementException;" ]
[ "0.79835683", "0.7630269", "0.7521096", "0.7521096", "0.7521096", "0.7292754", "0.7246645", "0.7146056", "0.700188", "0.69019234", "0.6874481", "0.6850664", "0.6779453", "0.67355204", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6688819", "0.6624631", "0.66009426", "0.6561723", "0.65396285", "0.6509973", "0.65057236", "0.6350766", "0.632141", "0.63054585", "0.6291559", "0.6291559", "0.6284166", "0.6227172", "0.619766", "0.6178016", "0.6162717", "0.61576265", "0.6152892", "0.6137231", "0.6096768", "0.6092753", "0.60688215", "0.6055266", "0.60490096", "0.601854", "0.60097367", "0.5993021", "0.5989705", "0.59782046", "0.59131306", "0.5905624", "0.5901721", "0.5901257", "0.5899612", "0.5882718", "0.587786", "0.5875322", "0.5849198", "0.5842575", "0.5841036", "0.5826615", "0.58263266", "0.5818215", "0.581012", "0.5808157", "0.580499", "0.57968664", "0.5760436", "0.5755709", "0.5733502", "0.5725768", "0.57190484", "0.571688", "0.57163954", "0.5715131", "0.5693493", "0.5692807", "0.5692807", "0.5692807", "0.56879675", "0.56867707", "0.56664", "0.56658614", "0.56647086", "0.5658849", "0.5645692", "0.56415224", "0.56349343", "0.5629376", "0.56086904", "0.5606909", "0.5599754", "0.5598443", "0.5593123", "0.5591178", "0.5580766" ]
0.79919165
0
Loads the corpus files and parses them into a Document+Sentence structure. There should be one HTML file in the DOE corpus format per doc unter the source directory.
public DOECorpus loadFromHTML() { File[] files = getFileList(); System.out.println("Found " + files.length + " documents in " + this.sourceDir); System.out.println("Parsing their contents..."); int totalLineCount = 0; DOECorpus corpus = new DOECorpus(); for(File file : files) { try { Document htmlDoc = Jsoup.parse(file, null); String originalLocation = htmlDoc.location(); String shortTitle = htmlDoc.title(); String shortShortTitle = ""; String cameronNumber = ""; DOECorpusDocument corpusDoc = new DOECorpusDocument(shortTitle, shortShortTitle, cameronNumber, originalLocation); Elements paragraphElements = htmlDoc.select("p"); DOECorpusLine lineBefore = null; for(Element p : paragraphElements) { String text = p.text(); if(ignoreLine(text)) continue; else if(text.startsWith(SHORT_SHORT_TITLE)) shortShortTitle = text.replace(SHORT_SHORT_TITLE, ""); else if(text.startsWith(CAMERON_NUMBER)) cameronNumber = text.replace(CAMERON_NUMBER, ""); else if(text.startsWith("[")) { String lineID = ""; String line = ""; Pattern linePattern = Pattern.compile("\\[([0-9]+\\s\\([0-9a-zA-Z\\.,\\s\\(\\)]+\\))\\]\\s(.*)"); Matcher m = linePattern.matcher(text); if (m.matches()) { lineID = m.group(1).trim(); line = m.group(2).trim(); DOECorpusLine newLine = new DOECorpusLine(lineID, line, shortTitle); newLine.setLineBefore(lineBefore); if(lineBefore != null) lineBefore.setLineAfter(newLine); corpusDoc.addLine(newLine); lineBefore = newLine; } } else if(!text.isEmpty()) // This should be the full title corpusDoc.setFullTitle(text); } totalLineCount += corpusDoc.getLineCount(); corpus.addDocument(corpusDoc); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } System.out.println("Parsing their contents...DONE"); System.out.println("Total number of lines: " + totalLineCount); System.out.println("Splitting lines into sentences..."); corpus.splitIntoSentences(); System.out.println("Splitting lines into sentences...DONE"); System.out.println("Tokenizing sentences..."); corpus.tokenize(); System.out.println("Tokenizing sentences...DONE"); System.out.println("Total number of tokens: " + corpus.getTokenCount()); System.out.println("Total number of types: " + corpus.getTypeCount()); System.out.println("Total number of sentences: " + corpus.getSentenceCount()); System.out.println("Average sentence length: " + corpus.getAvgSenLength()); System.out.println("Minimum sentence length: " + corpus.getMinSenLength()); System.out.println("Maximum sentence length: " + corpus.getMaxSenLength()); return corpus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDocs() {\n\t\t\n\t\tArrayList<Document> docs=new ArrayList<>();\n\t\tString foldername=\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\input\";\n\t\tFile folder=new File(foldername);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor (File file : listOfFiles) {\n\t\t\ttry {\n\t\t\t\tFileInputStream fisTargetFile = new FileInputStream(new File(foldername+\"\\\\\"+file.getName()));\n\t\t\t\tString fileContents = IOUtils.toString(fisTargetFile, \"UTF-8\");\n\t\t\t\tString[] text=fileContents.split(\"ParseText::\");\n\t\t\t\tif(text.length>1){\n\t\t\t\t\tString snippet=text[1].trim().length()>100 ? text[1].trim().substring(0, 100): text[1].trim();\n\t\t\t\t\tDocument doc=new Document();\n\t\t\t\t\tdoc.setFileName(file.getName().replace(\".txt\", \"\"));\n\t\t\t\t\tdoc.setUrl(text[0].split(\"URL::\")[1].trim());\n\t\t\t\t\tdoc.setText(snippet+\"...\");\n\t\t\t\t\tdocs.add(doc);\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\t\n\t\tDBUtil.insertDocs(docs);\n\t}", "public void setupDuc2002Documents(String duc2002DocsWithSentenceBreaksDirPath, String outputDirPath) throws Exception {\n\t\tthis.replaceAmpersand(duc2002DocsWithSentenceBreaksDirPath);\n\t\tFile dir=new File(duc2002DocsWithSentenceBreaksDirPath);\n\t\tFile[] listDirectories=dir.listFiles();\n\t\tBufferedWriter bw;\n\t\tString docDirPath=outputDirPath;\n\t\tfor(int i=0;i<listDirectories.length;i++) {\n\t\t\tFile[] listFiles=listDirectories[i].listFiles();\n\t\t\tfor(int j=0;j<listFiles.length;j++) {\n\t\t\t\tDocument doc=this.parse(listFiles[j].toString());\n\t\t\t\tDuc2002Document ducDoc=this.getParsedDocument(doc);\n\t\t\t\tString docNo=ducDoc.getDocNo().replaceAll(\"\\n\",\"\");\n\t\t\t\tbw=new BufferedWriter(new FileWriter(new File(docDirPath+docNo+\".doc\")));\n\t\t\t\tString text=ducDoc.getText().replaceAll(\"\\n\",\"\");\n\t\t\t\tbw.write(text);\n\t\t\t\tbw.close();\n\t\t\t}\n\t\t}\n\t}", "private void setCorpus(){\n URL u = Converter.getURL(docName);\n FeatureMap params = Factory.newFeatureMap();\n params.put(\"sourceUrl\", u);\n params.put(\"markupAware\", true);\n params.put(\"preserveOriginalContent\", false);\n params.put(\"collectRepositioningInfo\", false);\n params.put(\"encoding\",\"windows-1252\");\n Print.prln(\"Creating doc for \" + u);\n Document doc = null;\n try {\n corpus = Factory.newCorpus(\"\");\n doc = (Document)\n Factory.createResource(\"gate.corpora.DocumentImpl\", params);\n } catch (ResourceInstantiationException ex) {\n ex.printStackTrace();\n }\n corpus.add(doc);\n annieController.setCorpus(corpus);\n params.clear();\n }", "public void docDataPreProcess(String xmlFileDir) throws Exception {\n XmlFileCollection corpus = new XmlFileCollection(xmlFileDir);\n\n // Load stopword list and initiate the StopWordRemover and WordNormalizer\n StopwordRemover stopwordRemover = new StopwordRemover();\n WordNormalizer wordNormalizer = new WordNormalizer();\n\n // initiate the BufferedWriter to output result\n FilePathGenerator fpg = new FilePathGenerator(\"result.txt\");\n String path = fpg.getPath();\n\n FileWriter fileWriter = new FileWriter(path, true); // Path.ResultAssignment1\n Map<String, String> curr_docs = corpus.nextDoc(); // doc_id:doc_content pairs\n Set<String> doc_ids = curr_docs.keySet();\n for (String doc_id : doc_ids){\n // load doc content\n char[] content = curr_docs.get(doc_id).toCharArray();\n // write doc_id into the result file\n fileWriter.append(doc_id + \"\\n\");\n\n // initiate a word object to hold a word\n char[] word = null;\n\n // initiate the WordTokenizer\n WordTokenizer tokenizer = new WordTokenizer(content);\n\n // process the doc word by word iteratively\n while ((word = tokenizer.nextWord()) != null){\n word = wordNormalizer.lowercase(word);\n// if (word.length == 1 && Character.isAlphabetic(word[0])){\n// continue;\n// }\n String wordStr = String.valueOf(word);\n // write only non-stopword into result file\n if (!stopwordRemover.isStopword(wordStr)){\n// fileWriter.append(wordNormalizer.toStem(word) + \" \");\n fileWriter.append(wordStr).append(\" \");\n }\n }\n fileWriter.append(\"\\n\");\n }\n fileWriter.close();\n }", "@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}", "private static List<String> loadDocuments(String path) throws Exception {\n\t\tFile folder = new File(path);\n\t\tArrayList<String> documents = new ArrayList<String>();\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tSystem.out.println(fileEntry.getName());\n\t\t\tif (fileEntry.isFile() && !fileEntry.isHidden()) {\n\t\t\t\tString content = getTextFromHtml(fileEntry);\n\t\t\t\tdocuments.add(content);\n\t\t\t}\n\t\t}\n\t\treturn documents;\n\t}", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "public void parseDocument(String fileLocation) {\n List<Object> objects = FileUtility.readObjectsFromFile(fileLocation);\n new File(FILE_DIRECTORY_NAME).mkdir();\n\n // TODO: Parellize the processing of html parsing for each html page\n\n objects.parallelStream().forEach((object) -> {\n HtmlPage htmlPage = (HtmlPage) object;\n String title = DocumentUtility.extractDocumentID(htmlPage.getURL());\n String parsedText = parseTitle(title) + NEWLINE + parseHtmlText(htmlPage);\n parsedHtmlPages.add(new ParsedHtmlPage(title, parsedText));\n });\n }", "public void buildDocument() {\n/* 248 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 250 */ syncAccessMethods();\n/* */ }", "public void constructDictionaries(String corpusFilePath) throws Exception {\n\n System.out.println(\"Constructing dictionaries...\");\n File dir = new File(corpusFilePath);\n for (File file : dir.listFiles()) {\n if (\".\".equals(file.getName()) || \"..\".equals(file.getName())) {\n continue; // Ignore the self and parent aliases.\n }\n System.out.printf(\"Reading data file %s ...\\n\", file.getName());\n BufferedReader input = new BufferedReader(new FileReader(file));\n String line = null;\n\n System.out.println(file.getName() + \"----------------------------------- \");\n while ((line = input.readLine()) != null) {\n\n if (line.isEmpty()) {\n continue;\n }\n\n /*\n * Remember: each line is a document (refer to PA2 handout)\n * TODO: Your code here\n */\n\n String[] words = line.trim().split(\"\\\\s+\");\n String previousWord = words[0];\n unigrams.add(previousWord);\n\n for (int i=1; i<words.length; ++i) {\n String w = words[i];\n unigrams.add(w);\n\n String bigram = previousWord + \" \" + w ;\n\n bigrams.add(bigram);\n\n previousWord = w;\n }\n\n }\n input.close();\n }\n\n computeUnigramProbabilities();\n computeBigramProbabilities();\n\n System.out.println(\"Done.\");\n }", "public void buildDocument() {\n/* 310 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 312 */ syncAccessMethods();\n/* */ }", "public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }", "public Map<String, Object> nextDocument() throws IOException {\n // 1. When called, this API processes one document from corpus, and returns its\n // doc number and content.\n // 2. When no document left, return null, and close the file.\n // 3. the HTML tags should be removed in document content.\n if (fileList.size() > 0) {\n Map<String, Object> r = new HashMap<>();\n File dataFile = fileList.pop();\n\n FileInputStream document = new FileInputStream(dataFile);\n byte[] context = new byte[(int) dataFile.length()];\n document.read(context);\n document.close();\n String text = new String(context, \"UTF-8\");\n char[] valueText = text.replaceAll(\"\\\\p{Cc}\", \"\")\n .replaceAll(\"<[^>]*>\", \" \").trim().toCharArray();\n r.put(dataFile.getPath(), valueText);\n return r;\n }\n\n return null;\n\n }", "public static void htmlExtractor() throws IOException {\t\n\t\tString inizio=\"Inizio:\"+new Date();\n\t\tfinal File sourceDocDir = new File(\"datasetWarc\");\n\t\tif (sourceDocDir.canRead()) {\n\t\t\tif (sourceDocDir.isDirectory()) {\n\t\t\t\tString[] files = sourceDocDir.list();\n\t\t\t\t// an IO error could occur\n\t\t\t\tif (files != null) {\n\t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\t\t\t\tSystem.out.println(files[i]);\n\t\t\t\t\t\tFromWarcToHtml.WarcExtractor(new File(sourceDocDir, files[i]));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\n\t\t}\n\n\t\tSystem.out.println(\"Tempo Estrazione HTML:\"+\"Inizio: \"+inizio+\"Fine: \"+new Date());\n\n\t}", "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}", "public static void loadCorpus(String corpus) throws IOException {\n List<String> lines = FileUtils.readLines(new File(corpus), \"UTF-8\");\n\n processLoadedCorpus(lines);\n }", "public static void loadCorpora(String directoryName) {\n // get the corpora directory\n File corporaDir = new File(TCommon.CORPORA_DIRECTORY);\n // list its files\n File[] corpora = corporaDir.listFiles();\n // load all of the files\n // don't take into account subdirectories\n for (File f : corpora) {\n String corpus = f.getPath();\n if (!isDirectory(corpus)) {\n try {\n loadCorpus(corpus);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n System.err.println(\"Total \" + corpora.length + \" files loaded.\");\n }", "private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}", "public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "public static Document parse(String filename) throws ParserException {\n\t\t// TODO YOU MUST IMPLEMENT THIS\n\t\t// girish - All the code below is mine\n\t\t\t\n\t\t// Creating the object for the new Document\n\t\t\n\t\t\n\t\tif (filename == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\t// Variable indexPos to track the current pointer location in the String Array\n\t\tint indexPos = 0;\n\t\t\n\t\t// Creating an instance of the document class to store the parsed content\n\t\tDocument d = new Document();\n\t\t\n\t\t// to store the result sent from the regexAuthor method and regexPlaceDate method\n\t\tObject[] resultAuthor = {null, null, null};\n\t\tObject[] resultPlaceDate = {null, null, null};\n\t\tStringBuilder news = new StringBuilder();\n\t\t\n\t\t// Next 4 lines contains the code to get the fileID and Category metadata\n\t\tString[] fileCat = new String[2];\n\t\t\n\t\tfileCat = regexFileIDCat(\"/((?:[a-z]|-)+)/([0-9]{7})\", filename);\n\t\t// System.out.println(filename);\n\t\t// throw an exception if the file is blank, junk or null\n\t\tif (fileCat[0] == null){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\td.setField(FieldNames.CATEGORY, fileCat[0]);\n\t\td.setField(FieldNames.FILEID, fileCat[1]);\n\t\t\n\t\t\n\t\t// Now , parsing the file\n\t\tFile fileConnection = new File(filename);\n\t\t\n\t\t// newscollated - it will store the parsed file content on a line by line basis\n\t\tArrayList<String> newscollated = new ArrayList<String>();\n\t\t\n\t\t// String that stores the content obtained from the . readline() operation\n\t\tString temp = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tBufferedReader getInfo = new BufferedReader(new FileReader(fileConnection));\n\t\t\twhile ((temp = getInfo.readLine()) != null)\n\t\t\t{\n\t\t\t\tif(temp.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\ttemp = temp + \" \";\n\t\t\t\t\tnewscollated.add(temp);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tgetInfo.close();\n\t\t\t\n\t\t\t//-- deprecated (REMOVE THIS IF OTHER WORKS)\n\t\t\t// setting the title using the arraylist's 0th index element\n\t\t\t//d.setField(FieldNames.TITLE, newscollated.get(0));\n\t\t\t\n\t\t\t// Appending the lines into one big string using StringBuilder\n\t\t\t\n\t\t\tfor (String n: newscollated)\n\t\t\t{\n\t\t\t\tnews.append(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Obtaining the TITLE of the file\n\t\t\tObject[] titleInfo = new Object[2];\n\t\t\t\n\t\t\ttitleInfo = regexTITLE(\"([^a-z]+)\\\\s{2,}\", news.toString());\n\t\t\td.setField(FieldNames.TITLE, titleInfo[0].toString().trim());\n\t\t\tindexPos = (Integer) titleInfo[1];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Getting the Author and Author Org\n\t\t\tresultAuthor = regexAuthor(\"<AUTHOR>(.*)</AUTHOR>\", news.toString());\n\t\t\t\n\t\t\tif (resultAuthor[0] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHOR, resultAuthor[0].toString());\n\t\t\t}\n\t\t\t\n\t\t\tif (resultAuthor[1] != null)\n\t\t\t{\n\t\t\t\td.setField(FieldNames.AUTHORORG, resultAuthor[1].toString());\n\t\t\t}\n\t\t \n\t\t \n\t\t \n\t\t if ((Integer) resultAuthor[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultAuthor[2];\n\t\t }\n\t\t\t\n\t\t \n\t\t \n\t\t // Getting the Place and Date\n \t\t\tresultPlaceDate = regexPlaceDate(\"\\\\s{2,}(.+),\\\\s(?:([A-Z][a-z]+\\\\s[0-9]{1,})\\\\s{1,}-)\", news.toString());\n \t\t\t\n \t\t\tif (resultPlaceDate[0] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.PLACE, resultPlaceDate[0].toString().trim());\n \t\t\t}\n \t\t \n \t\t\tif (resultPlaceDate[1] != null)\n \t\t\t{\n \t\t\t\td.setField(FieldNames.NEWSDATE, resultPlaceDate[1].toString().trim());\n \t\t\t}\n \t\t\t\n \t\t // getting the content\n \t\t \n \t\t if ((Integer) resultPlaceDate[2] != 0)\n\t\t {\n\t\t \tindexPos = (Integer) resultPlaceDate[2];\n\t\t }\n \t\t \n \t\t \n \t\t d.setField(FieldNames.CONTENT, news.substring(indexPos + 1));\n \t\t \n \t\t return d;\n \t\t \n\t\t \n\t\t \n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException e){\n\t\t\tthrow new ParserException();\n\t\t\t\n\t\t}\n\n\t\tcatch(IOException e){\n\t\t\tthrow new ParserException();\n\t\t}\n\t\t\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn d;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Document setUpDocumentToParse() throws ParserConfigurationException, SAXException, IOException{\n\t\tFile file = new File (dataFilePath);\n\t\tDocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tDocument document = documentBuilder.parse(file);\n\n\t\treturn document;\n\t}", "private static Map<String, List<List<String>>>[] splitYagoDataIntoDocumentSets(File yagoInputFile) {\r\n\t\tMap<String, List<List<String>>> trainData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testaData = new HashMap<String, List<List<String>>>();\r\n\t\tMap<String, List<List<String>>> testbData = new HashMap<String, List<List<String>>>();\r\n\t\t\r\n\t\tBufferedReader reader = FileUtil.getFileReader(yagoInputFile.getAbsolutePath());\r\n\t\ttry {\r\n\t\t\tString documentName = null;\r\n\t\t\tString documentSet = null;\r\n\t\t\tList<List<String>> documentLines = null;\r\n\t\t\tList<String> sentenceLines = null;\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tif (line.startsWith(\"-DOCSTART-\")) {\r\n\t\t\t\t\tif (documentSet != null) {\r\n\t\t\t\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\t\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tString docId = line.substring(\"-DOCSTART- (\".length(), line.length() - 1);\r\n\t\t\t\t\tString[] docIdParts = docId.split(\" \");\r\n\t\t\t\t\tdocumentName = docIdParts[0] + \"_\" + docIdParts[1];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (docIdParts[0].endsWith(\"testa\"))\r\n\t\t\t\t\t\tdocumentSet = \"testa\";\r\n\t\t\t\t\telse if (docIdParts[0].endsWith(\"testb\"))\r\n\t\t\t\t\t\tdocumentSet = \"testb\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tdocumentSet = \"train\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tdocumentLines = new ArrayList<List<String>>();\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else if (line.trim().length() == 0) {\r\n\t\t\t\t\tdocumentLines.add(sentenceLines);\r\n\t\t\t\t\tsentenceLines = new ArrayList<String>();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsentenceLines.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (documentSet.equals(\"train\"))\r\n\t\t\t\ttrainData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testa\"))\r\n\t\t\t\ttestaData.put(documentName, documentLines);\r\n\t\t\telse if (documentSet.equals(\"testb\"))\r\n\t\t\t\ttestbData.put(documentName, documentLines);\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tMap<String, List<List<String>>>[] returnData = new HashMap[3];\r\n\t\treturnData[0] = trainData;\r\n\t\treturnData[1] = testaData;\r\n\t\treturnData[2] = testbData;\r\n\t\t\r\n\t\treturn returnData;\r\n\t}", "public static void main(String[] args) {\n\t\tDocument html = new HtmlDocument();\n\t\thtml.open();\n\t\thtml.close();\n\n\t\tDocument pdf = new PdfDocument();\n\t\tpdf.open();\n\t\tpdf.close();\n\t}", "private void startParsing(){\r\n pondred = new ArrayList<>();\r\n //extract docs from corpus\r\n for (String xml:parseDocsFile(docs_file))\r\n {\r\n try {\r\n pondred.add(loadXMLFromString(xml));\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n System.out.println(\"Ending parsing\");\r\n for (Core pon:pondred){\r\n for (String string:pon.abstractTerm){\r\n Double tf = pon.getAbstractFerq(string)/pon.getAbstractSize();\r\n Double idf = Math.log10(Core.count/countingDuplicates(string));\r\n pon.abstractFrequence.put(string,tf*idf);\r\n }\r\n pon.finish();\r\n }\r\n }", "@Override\r\n\tpublic DocumentData read(File in) throws Exception {\r\n\t\tDocumentData doc = new DocumentData(in);\r\n\t\tBufferedReader reader = FileHandler.getBufferedReader(in);\r\n\t\tBufferedReader nested = null;\r\n\t\tString inpath = in.getAbsolutePath();\r\n\t\tFile nestin = new File (inpath.substring(0,inpath.length()-5)+SUBSUFFIX);\r\n\t\tif(nestin.exists())\r\n\t\t\tnested = FileHandler.getBufferedReader(nestin);\r\n\t\tint lcnt=0;\r\n\t\tint scnt=0;\r\n\t\tint start=-1;\r\n\t\tint nstart = -1;\r\n\t\tSentenceData sent = null;\r\n\t\twhile(true){\r\n\t\t\tString line = reader.readLine();\r\n\t\t\tString nline = null;\r\n\t\t\tif(nested!=null)\r\n\t\t\t\tnline = nested.readLine();\r\n\t\t\tif(line==null) {\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tline = line.trim();\r\n\t\t\tlcnt++;\r\n\t\t\tif(line.length()==0){\r\n\t\t\t\tif(sent!=null){\r\n\t\t\t\t\tdoc.addSentenceData(sent);\r\n\t\t\t\t\tsent=null;\r\n\t\t\t\t\tscnt=0;\r\n\t\t\t\t}else\r\n\t\t\t\t\tSystem.out.println(\"Skip empty line in line:\"+lcnt);\r\n\t\t\t}else if(line.startsWith(\"#\")){\r\n\t\t\t\tSystem.out.println(\"Skip comments in line:\"+lcnt+\"; \"+line);\r\n\t\t\t}else{\r\n\t\t\t\tif(sent==null)\r\n\t\t\t\t\tsent = new SentenceData();\r\n\t\t\t\tscnt++;\r\n\t\t\t\t\r\n\t\t\t\tString tmp[] = line.split(\"\\t\");\r\n\t\t\t\tsent.addTokens(tmp[0]);\r\n\t\t\t\tString mark = tmp[tmp.length-1];// last column is the markables;\r\n\t\t\t\tif(mark.equals(\"O\")){\r\n\t\t\t\t\tif(start>=0)\r\n\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\tstart=-1;\r\n\t\t\t\t}else if(mark.startsWith(\"I-\")||mark.startsWith(\"B-\")){\r\n\t\t\t\t\tif(start<0)\r\n\t\t\t\t\t\tstart = scnt;//support both IOB1 and IOB2\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (main): \"+lcnt+\": \"+line);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(nline!=null){\r\n\t\t\t\t\tString ntmp[] = nline.split(\"\\t\");\r\n\t\t\t\t\tString nmark = ntmp[ntmp.length-1];\r\n\t\t\t\t\tif(nmark.equals(\"O\")){\r\n\t\t\t\t\t\tif(nstart>=0)\r\n\t\t\t\t\t\t\tsent.addMarkables(start, scnt-1);\r\n\t\t\t\t\t\tnstart=-1;\r\n\t\t\t\t\t}else if(nmark.startsWith(\"I-\")||nmark.startsWith(\"B-\")){\r\n\t\t\t\t\t\tif(nstart<0)\r\n\t\t\t\t\t\t\tnstart = scnt;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthrow new Exception(\"Please input only IOB or IOB2 scheme (nested): \"+lcnt+\": \"+nline);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn doc;\r\n\t}", "private List<String> getMyDocsFromSomewhere(String aPath) {\n\t\tList<String> ret = new ArrayList<>();\n\t\ttry {\n\t\t\tFile startFileUrl = new File(aPath);\n\t\t\tFile[] files = startFileUrl.listFiles();\n\t\t\tfor (File file : files) {\n\t\t\t\t\n\t\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\t\tMetadata metadata = new Metadata();\n\t\t\t\tFileInputStream inputstream = new FileInputStream(file);\n\t\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t\t// Html parser\n\t\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\t\t// System.out.println(\"Contents of the document:\" +\n\t\t\t\t// handler.toString());\n\t\t\t\t// System.out.println(\"Metadata of the document:\");\n\t\t\t\tString[] metadataNames = metadata.names();\n\t\t\t\tStringBuilder build = new StringBuilder();\n\t\t\t\tfor (String name : metadataNames) {\n\t\t\t\t\tbuild.append(metadata.get(name));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tret.add(handler.toString());\n\t\t\t\tret.add(build.toString());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"--error: \" + aPath);\n\t\t\tSystem.out.println(\"--error: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ret;\n\t}", "private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}", "public static void main(String[] args) throws Exception{\n \n String filePath=args[0]; //pass path of the corpus as argument\n Part1_SourceCode.listFiles(filePath);\n \n }", "private ArrayList<String> parseDocsFile(String file_name){\r\n // extract each <DOC> ... </DOC> from file AS string (corpus)\r\n ArrayList<String> list = new ArrayList<>();\r\n Scanner scanner = null;\r\n try{\r\n scanner = new Scanner(new BufferedReader(new FileReader(file_name)));\r\n scanner.useDelimiter(\"</DOC>\"); // END of Next()\r\n while (scanner.hasNext())\r\n {\r\n list.add(scanner.next()+\"</DOC>\");\r\n }\r\n list.remove(list.size()-1);\r\n }\r\n catch (Exception e ){ System.out.println(\"Error reading file -> \"+e.getMessage()); }\r\n finally {\r\n if(scanner != null ){scanner.close();} // close the file\r\n }\r\n return list;\r\n }", "public static void main(String[] args) throws IOException,FileNotFoundException,NullPointerException {\n\t\tint _fileNumber = 1;\n\t\ttry {\n\t\t\tFile _directory = new File(\"C:\\\\Users\\\\Aayush\\\\Desktop\\\\Advance Computing Concepts\\\\W3C Web Pages\");\n\t\t\tFile[] _fileArray = _directory.listFiles();\n\t\t\tFile[] _fileArray2 = new File[102];\n\t\t\tint _numberOfFiles=0;\n\t\t\tfor(int _i=0;_i<(_fileArray.length);_i++)\n\t\t\t{\n\t\t\t\tif(_fileArray[_i].isFile())\n\t\t\t\t{\n\t\t\t\t\t_fileArray2[_numberOfFiles] = _fileArray[_i];\n\t\t\t\t\t_numberOfFiles++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i=0;i<100;i++)\n\t\t\t{\n\t\t\t\tconvertHtmlToText(_fileArray2[i],_fileNumber);\n\t\t\t\t_fileNumber = _fileNumber + 1;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception:\"+e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public static void readDatafiles() throws FileNotFoundException {\n int docNumber = 0;\n\n while(docNumber<totaldocument) { // loop will run until all 0 - 55 speech data is read\n String tempBuffer = \"\";\n\n Scanner sc_obj = new Scanner(new File(\"./inputFiles/speech_\"+docNumber+\".txt\"));\n sc_obj.nextLine(); //skip the first line of every document\n\n while(sc_obj.hasNext()) {\n tempBuffer = sc_obj.next();\n tempBuffer = tempBuffer.replaceAll(\"[^a-zA-Z]+\",\" \");\n\n String[] wordTerm = tempBuffer.split(\" |//.\"); // the read data will convert into single word from whole stream of characters\n // it will split according to white spaces . - , like special characters\n\n for (int i=0; i < wordTerm.length; i++) {\n\n String term = wordTerm[i].toLowerCase();\t\t//each splitted word will be converted into lower case\n term = RemoveSpecialCharacter(term);\t\t\t// it will remove all the characters apart from the english letters\n term = removeStopWords(term);\t\t\t\t\t// it will remove the stopWords and final version of the term in the form of tokens will form\n\n if(!term.equalsIgnoreCase(\"\") && term.length()>1) {\n term = Lemmatize(term);\t\t\t\t\t//all the words in the form of tokens will be lemmatized\n //increment frequency of word if it is already present in dictionary\n if(dictionary.containsKey(term)) {\t\t//all the lemmatized words will be placed in HashMap dictionary\n List<Integer> presentList = dictionary.get(term);\n int wordFrequency = presentList.get(docNumber);\n wordFrequency++;\n presentList.set(docNumber, wordFrequency);\t\t//frequency of all the lemmatized words in dictionary is maintained \t\t\t\t\t\t\t\t\t//i.e: Word <2.0,1.0,3.0,0.0 ...> here hashmap<String,List<Double> is used\n }\t\t\t\t\t\t\t\t\t\t//the 0th index shows the word appared 2 times in doc 0 and 1 times in doc 1 and so forth..\n else { // if word was not in the dictionary then it will be added\n // if word was found in 5 doc so from 0 to 4 index representing doc 0 to doc 4 (0.0) will be placed\n List<Integer>newList = new ArrayList<>();\n for(int j=0; j<57; j++) {\n if(j != docNumber)\n newList.add(0);\n else\n newList.add(1);\n }\n dictionary.put(term, newList);\n }\n }\n }\n\n }\n docNumber++;\n }\n }", "@Test\n public void testODTXHTMLIsParseable() throws Exception {\n int filesTested = 0;\n for (Path p : getAllTestFiles()) {\n String fileName = p.getFileName().toString();\n if (fileName.endsWith(\".odt\") || fileName.endsWith(\"odp\") || fileName.endsWith(\"odf\") ||\n fileName.endsWith(\".ods\")) {\n\n XMLResult xmlResult = null;\n try (InputStream is = TikaInputStream.get(p)) {\n xmlResult = getXML(is, AUTO_DETECT_PARSER, new Metadata());\n } catch (Exception e) {\n continue;\n }\n try {\n //just make sure this doesn't throw any exceptions\n XMLReaderUtils.parseSAX(new ByteArrayInputStream(xmlResult.xml.getBytes(StandardCharsets.UTF_8)),\n new DefaultHandler(), new ParseContext());\n filesTested++;\n } catch (Exception e) {\n fail(p.getFileName().toString(), e);\n }\n }\n }\n assertTrue(filesTested > 10);\n }", "private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }", "@Override\n\tprotected List<Document> loadContent(String content) throws Exception {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument document = \n\t\t\t\tdBuilder.parse(new InputSource(new StringReader(content)));\n\t\tdocument.getDocumentElement().normalize();\n\t\tList<Document> list = new LinkedList<>();\n\t\tlist.add(document);\n\t\treturn list;\n\t}", "public void generateWordDocument(String directory, String nameOfTheDocument) throws Exception{\n\t\t\n\t\t//Create empty document (instance of Document classe from Apose.Words)\n\t\tDocument doc = new Document();\n\t\t\n\t\t//Every word document have section, so now we are creating section\n\t\tSection section = new Section(doc);\n\t\tdoc.appendChild(section);\n\t\t\n\t\tsection.getPageSetup().setPaperSize(PaperSize.A4);\n\t\tsection.getPageSetup().setHeaderDistance (35.4); // 1.25 cm\n\t\tsection.getPageSetup().setFooterDistance (35.4); // 1.25 cm\n\t\t\n\t\t//Crating the body of section\n\t\tBody body = new Body(doc);\n\t\tsection.appendChild(body);\n\t\t\n\t\t//Crating paragraph\n\t\tParagraph paragraph = new Paragraph(doc);\n\t\t\n\t\tparagraph.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\tparagraph.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);\n\t\t//Crating styles\n\t\tStyle style = doc.getStyles().add(StyleType.PARAGRAPH, \"Style1\");\n\t\tstyle.getFont().setSize(24);\n\t\tstyle.getFont().setBold(true);\n\t\tstyle.getFont().setColor(Color.RED);\n\t\t//paragraph.getParagraphFormat().setStyle(style);\n\t\tbody.appendChild(paragraph);\n\t\t\n\t\tStyle styleForIntroduction = doc.getStyles().add(StyleType.PARAGRAPH, \"Style2\");\n\t\tstyle.getFont().setSize(40);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(true);\n\t\tstyle.getFont().setColor(Color.CYAN);\n\t\t\n\t\tStyle styleForText = doc.getStyles().add(StyleType.PARAGRAPH, \"Style3\");\n\t\tstyle.getFont().setSize(15);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(false);\n\t\tstyle.getFont().setColor(Color.BLACK);\n\t\t\n\t\t//Crating run of text\n\t\tRun textRunHeadin1 = new Run(doc);\n\t\ttry {\n\t\t\ttextRunHeadin1.setText(\"Probni test fajl\" + \"\\r\\r\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tparagraph.appendChild(textRunHeadin1);\n\t\t\n\t\t\n\t\t//Creating paragraph1 for every question in list\n\t\tfor (Question question : questions) {\n\t\t\t\n\t\t\t\n\t\t\t\t//Paragraph for Instruction Question\n\t\t\t\tParagraph paragraphForInstruction = new Paragraph(doc);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyle(styleForIntroduction);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 3\");\n\t\t\t\t\n\t\t\t\tRun runIntroduction = new Run(doc);\n\t\t\t\t\n\t\t\t\trunIntroduction.getFont().setColor(Color.BLUE);\n\t\t\t\ttry {\n\t\t\t\t\trunIntroduction.setText(((Question)question).getTextInstructionForQuestion()+\"\\r\");\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\tparagraphForInstruction.appendChild(runIntroduction);\n\t\t\t\tbody.appendChild(paragraphForInstruction);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Paragraph for Question\n\t\t\t\tParagraph paragraphForQuestion = new Paragraph(doc);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyle(styleForText);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Normal\");\n\t\t\t\t\n\t\t\t\tRun runText = new Run(doc);\n\t\t\t\tif(question instanceof QuestionBasic){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionBasic)question).toStringForDocument()+\"\\r\");\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionFillTheBlank){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionFillTheBlank)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionMatching){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionMatching)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionTrueOrFalse){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionTrueOrFalse)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception 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}\t\n\t\t\t\t\n\t\t\t\tparagraphForQuestion.appendChild(runText);\n\t\t\t\tbody.appendChild(paragraphForQuestion);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdoc.save(directory + nameOfTheDocument +\".doc\");\n\t}", "public void addDocument(Document d) throws IndexerException {\n\t\t\n\t//if (!isvaliddir) {System.out.println(\"INVALID PATH/execution !\");return;}\n\t\n\t\n\t//Tokenizing\n\t//one thgread\n\tDocID did=new DocID(d.getField(FieldNames.FILEID),\n\t\t\td.getField(FieldNames.CATEGORY),\n\t\t\td.getField(FieldNames.AUTHOR));\n\t\n\tTokenStream stream=tokenize(FieldNames.CATEGORY,d);\n\tAnalyzer analyz=analyze(FieldNames.CATEGORY, stream);\n\tCategoryIndex.getInst().doIndexing(did.getdID(), stream);\n\t/*\t}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);\n\t}\n\ttry{*/TokenStream stream1=tokenize(FieldNames.AUTHOR,d);\n\tAnalyzer analyz1=analyze(FieldNames.AUTHOR, stream1);\n\tAuthorIndex.getInst().doIndexing(did.getdID(), stream1);\n\t/*}catch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\ttry{*/TokenStream stream2=tokenize(FieldNames.PLACE,d);\n\tAnalyzer analyz2=analyze(FieldNames.PLACE, stream2);\n\tPlaceIndex.getInst().doIndexing(did.getdID(), stream2);\n/*}catch(Exception e)\n\t{\n\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t);}\n\ttry{*/tkizer = new Tokenizer();\n\tTokenStream stream3=tokenize(FieldNames.CONTENT,d);\n\tfactory = AnalyzerFactory.getInstance();\n\tAnalyzer analyz3=analyze(FieldNames.CONTENT, stream3);\n\tnew Indxr(IndexType.TERM).doIndexing(did, stream3);\n\t/*}\tcatch(Exception e)\n\t{\n\t\tif (e instanceof NullPointerException ||e instanceof StringIndexOutOfBoundsException\n\t\t\t\t||e instanceof ArrayIndexOutOfBoundsException ||e instanceof IllegalArgumentException\n\t\t\t\t);}\n\t*/\n\tdocs.add(did==null?\" \":did.toString());\n\t \n\t\na_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.AUTHOR);\nc_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.CATEGORY);\np_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.PLACE);\nt_indexrd= new IndexReader(System.getProperty(\"INDEX.DIR\"), IndexType.TERM);\n\t\t}", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \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//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\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\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\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\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \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//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \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\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\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\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\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\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\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\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\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\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\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//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\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/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public static Document parse(String filename) throws ParserException {\n\n\t\tString FileID, Category, Title = null, Author = null, AuthorOrg = null, Place = null, NewsDate = null, Content = null, FileN;\n\t\tDocument d = new Document();\n\t\tif (filename == null || filename == \"\")\n\t\t\tthrow new ParserException();\n\t\tFileN = filename;\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\tBufferedReader r = null;\n\t\tFile file = new File(FileN);\n\t\tif (!file.exists())\n\t\t\tthrow new ParserException();\n\t\tFileID = file.getName();\n\t\tCategory = file.getParentFile().getName();\n\t\ttry {\n\t\t\tr = new BufferedReader(new FileReader(file));\n\t\t\tint i = 1, j = 3;\n\t\t\tBoolean isTitle = true, hasAuthor = false;\n\t\t\tString line;\n\t\t\twhile ((line = r.readLine()) != null) {\n\t\t\t\tline = line.trim();\n\t\t\t\tif (!line.equals(\"\")) {\n\t\t\t\t\tmap.put(i, line);\n\t\t\t\t\tif (isTitle) {\n\t\t\t\t\t\tTitle = line;\n\t\t\t\t\t\tisTitle = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (hasAuthor == false && i == 2) {\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"<AUTHOR>(.+?)</AUTHOR>\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(line);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tAuthor = matcher.group(1).replace(\"BY\", \"\");\n\t\t\t\t\t\t\tAuthorOrg = Author.substring(\n\t\t\t\t\t\t\t\t\tAuthor.lastIndexOf(\",\") + 1).trim();\n\t\t\t\t\t\t\tAuthor = Author.split(\",\")[0].trim();\n\t\t\t\t\t\t\thasAuthor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!hasAuthor && i == 2) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t} else if (hasAuthor && i == 3) {\n\t\t\t\t\t\tString[] str = checkPlace(line);\n\t\t\t\t\t\tContent = str[0];\n\t\t\t\t\t\tPlace = str[1];\n\t\t\t\t\t\tNewsDate = str[2];\n\t\t\t\t\t\tj = 4;\n\t\t\t\t\t}\n\t\t\t\t\tif (i >= j) {\n\t\t\t\t\t\tContent = Content + map.get(i) + \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tr.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (Author != null) {\n\t\t\tAuthor = Author.replace(\"By\", \"\").trim();\n\t\t\td.setField(FieldNames.AUTHOR, Author);\n\t\t\td.setField(FieldNames.AUTHORORG, AuthorOrg);\n\t\t} \n\t\td.setField(FieldNames.FILEID, FileID);\n\t\td.setField(FieldNames.CATEGORY, Category);\n\t\td.setField(FieldNames.TITLE, Title);\n\t\td.setField(FieldNames.PLACE, Place);\n\t\td.setField(FieldNames.NEWSDATE, NewsDate);\n\t\td.setField(FieldNames.CONTENT, Content);\n\n\t\treturn d;\n\t}", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\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\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "private Document parseFile() throws IOException {\n\tString contents = instream_to_contents();\n\tDocument doc = Jsoup.parse(contents);\n\treturn doc;\n }", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "private static void loadFiles(String[] files) throws IOException {\n\t\tfor(String file : files){\n\n\t\t\t//Create reader for the file\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\n\t\t\t//Create HashMap to store words and counts\n\t\t\tHashMap<String,WordCount> fileWordCounts = new HashMap<String,WordCount>();\n\t\t\tArrayList<String> sentences = new ArrayList<String>();\n\n\t\t\t//While the file still has more lines to be read from\n\t\t\twhile(fileReader.ready()){\n\n\t\t\t\t//Read a line from the file\n\t\t\t\tString fileLine = fileReader.readLine();\n\t\t\t\t//Add the line to file sentences\n\t\t\t\tsentences.add(fileLine);\n\t\t\t\t//Split the file and remove punctuation from words\n\t\t\t\tString[] fileWords = fileLine.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n\n\t\t\t\t//iterate through all words in each line\n\t\t\t\tfor (String word : fileWords)\n\t\t\t\t{\n\t\t\t\t\tWordCount count = fileWordCounts.get(word);\n\t\t\t\t\t//If word is not in file, add it \n\t\t\t\t\tif (count == null) {\n\t\t\t\t\t\tfileWordCounts.put(word,new WordCount(word));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount.inc(); //If not, increment it\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t//Add file to fileDatabase \n\t\t\tfileDatabase.map.put(file, new FileObject(file, fileWordCounts, sentences));\n\n\t\t\tfileReader.close(); // Close File\n\n\t\t}//End of For Loop reading from all files\n\t}", "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 abstract TextDocument getTextDocumentFromFile(String path) throws FileNotFoundException, IOException;", "private Document getDocumentInFileSys()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\tFile file = new File(DIR,FILE_NAME);\r\n\t\tif(!file.exists())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tFileInputStream inStream =new FileInputStream(file);\r\n\t\ttry{\r\n\t\t\tDocument doc = builder.parse(inStream);\r\n\t\t\treturn doc;\r\n\t\t}finally{\r\n\t\t\tinStream.close();\r\n\t\t}\r\n\t}", "public void summarizeDuc2002Documents(String nameOfSystem, String duc2002DocsWithSentenceBreaksDirPath, String outputDirPath) throws Exception {\n\t\tthis.replaceAmpersand(duc2002DocsWithSentenceBreaksDirPath);\n\t\tFile dir=new File(duc2002DocsWithSentenceBreaksDirPath);\n\t\tFile[] listDirectories=dir.listFiles();\n\t\tPageRankSummarizer s=new PageRankSummarizer();\n\t\tBufferedWriter bw2;\n\t\tString summaryDirPath=outputDirPath;\n\t\tfor(int i=0;i<listDirectories.length;i++) {\n\t\t\tFile[] listFiles=listDirectories[i].listFiles();\n\t\t\tfor(int j=0;j<listFiles.length;j++) {\n\t\t\t\tDocument doc=this.parse(listFiles[j].toString());\n\t\t\t\tDuc2002Document ducDoc=this.getParsedDocument(doc);\n\t\t\t\tString docNo=(ducDoc.getDocNo()).replaceAll(\"[\\n\\t ]\",\"\");\n\t\t\t\tSystem.out.println(\"\\nSummarizing \"+docNo+\"...\");\n\t\t\t\tbw2=new BufferedWriter(new FileWriter(new File(summaryDirPath+docNo+\".\"+nameOfSystem+\".system\")));\n\t\t\t\tString summarySentences[];\n\t\t\t\tif(s.splitIntoSentences(ducDoc.getText()).length <= 5) {\n\t\t\t\t\tsummarySentences=s.splitIntoSentences(ducDoc.getText());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsummarySentences=s.splitIntoSentences(s.getSummary(ducDoc.getText(),100));\n\t\t\t\t}\n\t\t\t\tfor(int senNo=0;senNo<summarySentences.length;senNo++) {\n\t\t\t\t\tbw2.write(summarySentences[senNo]+\"\\n\");\n\t\t\t\t\tbw2.flush();\n\t\t\t\t}\n\t\t\t\tbw2.close();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\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\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\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\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\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//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\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\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\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//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\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\tdocLength++;\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\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\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\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\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\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \t\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}", "public static void readFiles () throws FileNotFoundException{\n try {\n data.setFeatures(data.readFeatures(\"features.txt\"));\n data.setUnknown(data.readFeatures(\"unknown.txt\"));\n data.setTargets(data.readTargets(\"targets.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"Document not found\");\n }\n }", "public abstract WalkerDocument newDocument(String path, IOptions options) throws HtmlWalkerException;", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tparseFile(\"english_file.txt\");\r\n\t\t\t\t}", "public void parseDirectory(File directory) throws IOException {\n this.parsedFiles.clear();\n File[] contents = directory.listFiles();\n for (File file : contents) {\n if (file.isFile() && file.canRead() && file.canWrite()) {\n String fileName = file.getPath();\n if (fileName.endsWith(\".html\")) {\n Document parsed;\n parsed = Jsoup.parse(file, \"UTF-8\");\n if (this.isWhiteBearArticle(parsed)) {\n HTMLFile newParsedFile = new HTMLFile(parsed, false);\n String name = file.getName();\n this.parsedFiles.put(name, newParsedFile);\n } else if (this.isMenuPage(parsed)) {\n //HTMLFile newParsedFile = new HTMLFile(parsed, false);\n //String name = file.getName();\n //this.parsedFiles.put(name, newParsedFile);\n }\n }\n }\n }\n }", "public static void main(final String[] args) throws Exception {\n File epubFile = new File(\"/home/matt/test/1984.epub\");\n File targetDir = new File(\"/home/matt/test/target6\");\n List<EpubDocument> docs =\n parse(epubFile, targetDir, file -> System.out.println(\"Processing \" + file.getAbsolutePath()), true);\n\n if(!docs.isEmpty()) {\n File cleanFile = new File(\"/home/matt/test/target6/combined.html\");\n try(FileOutputStream fos = new FileOutputStream(cleanFile)) {\n docs.get(0).writeCleanDocument(fos, true);\n }\n }\n }", "public void setupDuc2002ManualPerDocSummaries(String duc2002ExtractsAbstractsDirPath, String outputDirPath) throws Exception {\n\t\t//this.replaceAmpersand(duc2002ExtractsAbstractsDirPath);\n\t\tFile dir=new File(duc2002ExtractsAbstractsDirPath);\n\t\tFile[] listDirectories=dir.listFiles();\n\t\tBufferedWriter bw;\n\t\tString goldDirPath=outputDirPath;\n\t\tfor(int i=0;i<listDirectories.length;i++) {\n\t\t\tFile[] listFiles=listDirectories[i].listFiles();\n\t\t\tif(listFiles!=null) {\n\t\t\t\tfor(int j=0;j<listFiles.length;j++) {\n\t\t\t\t\tString fileName=listFiles[j].toString();\n\t\t\t\t\tif(fileName.endsWith(\"perdocs\")) {\n\t\t\t\t\t\tDuc2002Document[] goldSummaries=this.getParsedSummariesFromPerDocs(fileName);\n\t\t\t\t\t\tfor(int k=0;k<goldSummaries.length;k++) {\n\t\t\t\t\t\t\tString newGoldDirName=goldDirPath+goldSummaries[k].getDocNo();\n\t\t\t\t\t\t\tFile f=new File(newGoldDirName);\n\t\t\t\t\t\t\tif(!f.exists())\n\t\t\t\t\t\t\t\tf.mkdir();\n\t\t\t\t\t\t\tString newFileName=newGoldDirName+\"/\"+goldSummaries[k].getDocNo()+\".gold\";\n\t\t\t\t\t\t\tf=new File(newFileName);\n\t\t\t\t\t\t\tif(!f.exists()) {\n\t\t\t\t\t\t\t\tbw=new BufferedWriter(new FileWriter(new File(newFileName)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tint l=2;\n\t\t\t\t\t\t\t\twhile((new File(newGoldDirName+\"/\"+goldSummaries[k].getDocNo()+\".\"+l+\".gold\").exists())) {\n\t\t\t\t\t\t\t\t\tl++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbw=new BufferedWriter(new FileWriter(new File(newGoldDirName+\"/\"+goldSummaries[k].getDocNo()+\".\"+l+\".gold\")));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tPageRankSummarizer s=new PageRankSummarizer();\n\t\t\t\t\t\t\tString summarySentences[]=s.splitIntoSentences(goldSummaries[k].getText());\n\t\t\t\t\t\t\tfor(int senNo=0;senNo<summarySentences.length;senNo++) {\n\t\t\t\t\t\t\t\tbw.write(summarySentences[senNo]+\"\\n\");\n\t\t\t\t\t\t\t\tbw.flush();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbw.close();\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 TurkishSentenceAnalyzer(File dataDir) throws IOException {\n if (!dataDir.isDirectory()) {\n throw new IllegalArgumentException(dataDir + \" is not a directory.\");\n }\n if (!dataDir.exists()) {\n throw new IllegalArgumentException(dataDir + \" Directory does not exist\");\n }\n List<File> dicFiles = Files.crawlDirectory(dataDir, false, Files.extensionFilter(\"dict\"));\n System.out.println(\"Loading Dictionaries:\" + dicFiles.toString());\n if (dicFiles.size() == 0) {\n throw new IllegalArgumentException(\n \"At least one dictionary file is required. (with txt extension)\");\n }\n turkishMorphology = TurkishMorphology.builder()\n .addTextDictionaries(dicFiles.toArray(new File[dicFiles.size()])).build();\n System.out.println(\"Morph Parser Generated.\");\n\n File rootSmoothLm = new File(dataDir, \"root-lm.z3.slm\");\n File igSmoothLm = new File(dataDir, \"ig-lm.z3.slm\");\n if (!rootSmoothLm.exists()) {\n throw new IllegalArgumentException(\"Cannot find root model in \" + dataDir);\n }\n if (!igSmoothLm.exists()) {\n throw new IllegalArgumentException(\"Cannot find suffix model in \" + dataDir);\n }\n disambiguator = new Z3MarkovModelDisambiguator(rootSmoothLm, igSmoothLm);\n System.out.println(\"Morph Disambiguator Generated.\");\n }", "public void coreNLP(String inFile, String outFile) throws IOException {\n\tFile file = new File(inFile);\n\tlog.log(Level.INFO, \"Processing file with CoreNLP: {0}.\", new Object[] { file.getAbsolutePath() });\n\tString text = FileUtils.stringFromFileWithBytes(inFile, \"UTF-8\");\n\tDocument doc = new Document(inFile, text);\n\t// coreNLP(doc);\n\t// \n\tcoreNLPUsingServer(doc);\n\tFileUtils.write(doc.toXml().toXML(), new File(outFile));\n\n }", "public void loadDocument() {\n\t\ttry {\n\t\t\tString defaultDirectory = Utils.lastVisitedDirectory;\n\t\t\tif (Utils.lastVisitedDocumentDirectory != null)\n\t\t\t\tdefaultDirectory = Utils.lastVisitedDocumentDirectory;\n\n\t\t\tJFileChooser fileChooser = new JFileChooser(defaultDirectory);\n\t\t\tint returnVal = fileChooser.showOpenDialog(new JFrame());\n\n\t\t\tif (returnVal != JFileChooser.APPROVE_OPTION) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tURL fileURL = fileChooser.getSelectedFile().toURL();\n\n\t\t\t((XsdTreeStructImpl) xsdTree).loadDocument(fileURL);\n\t\t\txsdTree.getMessageManager().sendMessage(\"XML document \" + fileURL + \" loaded.\", MessageManagerInt.simpleMessage);\n\t\t} catch (IOException urie) {\n\n\t\t} catch (SAXException saxe) {\n\n\t\t}\n\t\texampleLine = null;\n\t\t// updatePreview();\n\t}", "private boolean createHTMLFiles(final DocTrees docTree,\n final Set<? extends Element> classes) throws IOException {\n\t\tboolean createdFiles = false;\n\t\tboolean documentationErrors = false;\n\t\tboolean invalidFileContent = false;\n\n\t\tfor (final Element clazz : classes) {\n // only add classes which are registered in our modules lookup table\n\t\t\tif (fModuleNodes.containsKey(clazz.toString())) {\n\t\t\t\t// class found to create help for\n\t\t\t\tfinal HTMLWriter htmlWriter = new HTMLWriter(clazz, fLinkProvider, fModuleNodes.get(clazz.toString()).getChildren(\"dependency\"), docTree);\n\t\t\t\tfinal String content = htmlWriter.createContents(fModuleNodes.get(clazz.toString()).getString(\"name\"));\n\n\t\t\t\tif (!htmlWriter.getDocumentationErrors().isEmpty()) {\n\t\t\t\t\tdocumentationErrors = true;\n\n\t\t\t\t\t// print errors\n\t\t\t\t\tSystem.out.println((fFailOnMissingDocs ? \"ERROR\" : \"WARNING\") + \": missing documentation content for \" + clazz + \":\");\n\t\t\t\t\tfor (final String errorMessage : htmlWriter.getDocumentationErrors())\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + errorMessage);\n\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tverifyContent(content);\n\t\t\t\t} catch (final Exception e) {\n\t\t\t\t\tSystem.out.println((fFailOnHTMLErrors ? \"ERROR\" : \"WARNING\") + \": invalid file content for \" + clazz + \":\");\n\t\t\t\t\tSystem.out.println(\"\\t\" + e.getMessage());\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\tinvalidFileContent = true;\n\t\t\t\t}\n\n\t\t\t\t// write document\n\t\t\t\tfinal File targetFile = getChild(getChild(fRootFolder, \"help\"), createHTMLFileName(fModuleNodes.get(clazz.toString()).getString(\"id\")));\n\t\t\t\twriteFile(targetFile, content);\n\t\t\t\tcreatedFiles = true;\n\t\t\t}\n\t\t}\n\n\t\tif ((fFailOnMissingDocs) && (documentationErrors))\n\t\t\tthrow new IOException(\"Documentation is not complete\");\n\n\t\tif ((fFailOnHTMLErrors) && (invalidFileContent))\n\t\t\tthrow new IOException(\"Documentation invalid\");\n\n\t\treturn createdFiles;\n\t}", "public static void main(String[] args) throws IOException \n\t{\n\t\tif (args.length != 1) {\n\t\t\tSystem.err.println(\"Usage: java \" + TextManager.class.getName() + \"[path to directory of files]\");\n\t\t}\n\t\t\n\t\tString dir = args[0];\n\t\tFile inputDir = new File(dir);\n\t\tif (inputDir.isDirectory())\n\t\t{\n\t\t\tFile[] files = inputDir.listFiles();\n\t\t\tfor (File file: files)\n\t\t\t{\n\t\t\t\tTextManager tm = new TextManager();\n\t\t\t\tString pdfPath = file.getAbsolutePath();\n\t\t\t\tString txtPath = pdfPath.substring(0, pdfPath.lastIndexOf('.')) + \".txt\";\n\t\t\t\tString text = tm.getPlainText(pdfPath);\n\t\t\t\tFileWriter txtWriter = new FileWriter(txtPath);\n\t\t\t\ttxtWriter.write(text);\n\t\t\t\ttxtWriter.close();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\tSystem.err.println(\"Error: A directory must be specified\");\n\t}", "public void preprocess(String trainDataFolder)\n\t{\n\t\tFile folder = new File(trainDataFolder);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tfor(int i=0;i<listOfFiles.length;i++){\n\t\t\t\ttry{\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(listOfFiles[i].getAbsoluteFile()));\n\t\t\t\t\tString allLines = new String();\n\t\t\t\t\tString line = null;\n\t\t\t\t\tint tabIndex;\n\t\t\t\t\tString type, msg;\n\t\t\t\t\tint label;\n\t\t\t\t\tint line_count = 0;\n\t\t\t\t\tallDocs = new ArrayList<String>();\n\t\t\t\t\twhile((line=reader.readLine())!=null && !line.isEmpty()){\n\t\t\t\t\t\tallDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(allDocs.size());\n\t\t\t\t\t//System.out.println(offset);\n\t\t\t\t\tfor(int s=0;s<offset;s++){\n\t\t\t\t\t\tline = allDocs.get(s);\n\t\t\t\t\t\ttabIndex = line.indexOf('\\t');\n\t\t\t\t\t\ttype = line.substring(0, tabIndex);\n\t\t\t\t\t\tmsg = line.substring(tabIndex + 1);\n\t\t\t\t\t\tmsg = msg.toLowerCase();\n\t\t\t\t\t\tif(type.equals(\"ham\")){label = 0;}\n\t\t\t\t\t\telse{label = 1;}\n\t\t\t\t\t\tclassStrings[label] += (line + \" \");\n\t\t\t\t\t\tclassCounts[label]++;\n\t\t\t\t\t\ttrainingDocs.add(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(IOException ioe){ioe.printStackTrace();}\n\t\t}\n\t\t/*System.out.println(\"number of ham tokens \"+classStrings[0].length());\n\t\tSystem.out.println(\"number of spam tokens \" +classStrings[1].length());\n\t\t*/\n\t\tSystem.out.println(\"Training Data Class Distribution:\");\n\t\tSystem.out.println(\"Ham: \"+classCounts[0]+\"(\"+Math.round(classCounts[0]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Spam: \"+classCounts[1]+\"(\"+Math.round(classCounts[1]*10000.0/trainingDocs.size())/100.0+\"%)\");\n\t\tSystem.out.println(\"Total: \"+trainingDocs.size());\n\t}", "private void handleDocument(String name,InputStream ins)\n{\n Map<String,Integer> words = new HashMap<>();\n Map<String,Integer> kgrams = new HashMap<>();\n \n try {\n String cnts = IvyFile.loadFile(ins);\n CompilationUnit cu = JcompAst.parseSourceFile(cnts);\n words = handleDocumentText(cnts);\n kgrams = buildKgramCounts(cnts,cu);\n }\n catch (IOException e) {\n IvyLog.logI(\"Problem reading document file \" + name + \": \" + e);\n }\n \n if (words.size() > 0) {\n ++total_documents;\n for (String s : words.keySet()) {\n Integer v = document_counts.get(s);\n if (v == null) document_counts.put(s,1);\n else document_counts.put(s,v+1);\n }\n }\n if (kgrams.size() > 0) {\n ++total_kdocuments;\n for (String s : kgrams.keySet()) {\n Integer v = kgram_counts.get(s);\n if (v == null) kgram_counts.put(s,1);\n else kgram_counts.put(s,v+1);\n }\n }\n}", "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "private int addDoc(IndexWriter w, String url, File file) throws IOException, IllegalArgumentException {\n\t\t\n\t\t//TODO: needs to be able to parse HTML pages here\n\t\t//File parsing\n\t\torg.jsoup.nodes.Document html = Jsoup.parse(String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\t//If we cant parse the html\n\t\tif(html == null)\n\t\t\treturn -1;\n\t\t\n\t\t\n\t\tif(PRINT_CONTENT_STRING)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + String.join(\"\",Files.readAllLines(file.toPath())));\n\t\t\n\t\tif(PRINT_CONTENT_BODY)\n\t\t\tSystem.out.println(\"***This is the body***\\n\" + html.body());\n\t\t\n\t\tString content = null;\n\t\tElement body = html.body();\n\t\t\n\t\t//Get the rest of the text in the body\n\t\tif(body != null)\n\t\t\tcontent = body.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the BODY text***\\n\" + content);\n\n\t\tString title = null;\n\t\tElement head = html.head();\n\t\tif(head != null)\n\t\t\ttitle = head.text();\n\t\t\n\t\tif(PRINT_CONTENT_TEXT)\n\t\t\tSystem.out.println(\"***This is the TITLE***\\n\" + title);\n\t\t\t\t\n\t\t//Document Creation\n\t\tDocument doc = new Document();\n\t\tField field = null;\n\t\tFieldType type = new FieldType();\n\t\ttype.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);\n\t\ttype.setStored(true); \n\t\ttype.setStoreTermVectors(true);\n\t\ttype.setTokenized(true);\n\t\t\n\t\t//If there is text in the head, it is probably a title\n\t\tif(title != null && !title.isEmpty()){\n\t\t\tfield = new Field(\"title\", title, type);\n\t\t\tfield.setBoost(15); //Set weight for the field when query matches to string in field here\n\t\t\tdoc.add(field);\n\t\t}\n\t\t\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is title: \" + title);\n\n\t\t//Grab the important text tags\n\t\tElements importantTags = body.select(\"b, strong, em\");\n\n\t\tif(importantTags != null && !importantTags.isEmpty())\n\t\t{\n\t\t\tfield = new Field(\"important\", importantTags.html(), type);\n\t\t\t\n\t\t\t//Setting the bold tag boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t\t\n\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\timportantTags.remove();\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is Bolding: \" + importantTags.text());\n\n\t\t\n\t\t//Grab all heading tags\n\t\tElements headingTags = body.select(\"h1, h2, h3, h4, h5, h6\");\n\n\t\tfor(int headingNum = 0; headingNum < 6; headingNum++)\n\t\t{\n\t\t\t//Attempt to index all the heading tags\n\t\t\tElements hTags = headingTags.select(\"h\" + (headingNum + 1));\n\t\t\tif(hTags != null && !hTags.isEmpty())\n\t\t\t{\n\t\t\t\tfield = new Field(\"heading\" + headingNum, hTags.html(), type);\n\t\t\t\t\n\t\t\t\t//Setting the heading tag boost\n\t\t\t\tfield.setBoost(5); \n\t\t\t\tdoc.add(field);\n\t\t\t\t\n\t\t\t\t//We remove any content in these tags so there is no duplicate counting\n\t\t\t\thTags.remove();\n\t\t\t}\n\t\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\t\tSystem.out.println(\"This is heading: \" + headingNum + \" - \" + hTags.text());\n\n\t\t}\n\t\t\n\t\t//Need to parse the remaining content after all the important tags have been deleted \n\t\tif(content != null && !content.isEmpty()){\n\t\t\tfield = new Field(\"content\", content, type);\n\t\t\t\n\t\t\t//Setting the default boost\n\t\t\tfield.setBoost(1); \n\t\t\tdoc.add(field);\n\t\t}\n\t\tif(PRINT_INDEX_TO_PARSING)\n\t\t\tSystem.out.println(\"This is content: \" + content);\n\n\t\t//Need to make sure we have content before attempting to add a link to a document\n\t\tif(doc.getFields().size() > 0)\n\t\t{\n\t\t\t//fileID field should not be used for finding terms within document, only for uniquely identifying this doc amongst others in index\n\t\t\ttype = new FieldType();\n\t\t\ttype.setStored(true);\n\t\t\ttype.setTokenized(false);\n\t\t\ttype.setStoreTermVectors(false);\n\t\t\tdoc.add(new Field(\"url\", url, type));\n\t\t\t\n\t\t\tw.addDocument(doc);\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public void description() throws Exception {\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \n \n // BufferedReader for obtaining the description files of the ontology & ODP\n BufferedReader br1 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/ontology_description\")); \n BufferedReader br2 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/odps_description.txt\")); \n String line1 = br1.readLine(); \n String line2 = br2.readLine(); \n \n // loop is used to copy the lines of file 1 to the other \n if(line1==null){\n\t \tpw.print(\"\\n\");\n\t }\n while (line1 != null || line2 !=null) \n { \n if(line1 != null) \n { \n pw.println(line1); \n line1 = br1.readLine(); \n } \n \n if(line2 != null) \n { \n pw.println(line2); \n line2 = br2.readLine(); \n } \n } \n pw.flush(); \n // closing the resources \n br1.close(); \n br2.close(); \n pw.close(); \n \n // System.out.println(\"Merged\"); -> for checking the code execution\n /* On obtaining the merged file, Doc2Vec model is implemented so that vectors are\n * obtained. And the, similarity ratio of the ontology description with the ODPs \n * can be found using cosine similarity \n */\n \tFile file = new File(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \t\n SentenceIterator iter = new BasicLineIterator(file);\n AbstractCache<VocabWord> cache = new AbstractCache<VocabWord>();\n TokenizerFactory t = new DefaultTokenizerFactory();\n t.setTokenPreProcessor(new CommonPreprocessor()); \n LabelsSource source = new LabelsSource(\"Line_\");\n ParagraphVectors vec = new ParagraphVectors.Builder()\n \t\t.minWordFrequency(1)\n \t .labelsSource(source)\n \t .layerSize(100)\n \t .windowSize(5)\n \t .iterate(iter)\n \t .allowParallelTokenization(false)\n .workers(1)\n .seed(1)\n .tokenizerFactory(t) \n .build();\n vec.fit();\n \n //System.out.println(\"Check the file\");->for execution of code\n PrintStream p=new PrintStream(new File(System.getProperty(\"user.dir\")+ \"/resources/description_values\")); //storing the numeric values\n \n \n Similarity s=new Similarity(); //method that checks the cosine similarity\n s.similarityCheck(p,vec);\n \n \n }", "private LanguageModel(String corpusFilePath) throws Exception {\n constructDictionaries(corpusFilePath);\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "public static void main(String[] args) {\n\n\t\tString docBody = null;\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(\"examples/doc1.txt\")), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tSmartScriptParser parser = null;\n\t\t\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch (SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tString originalDocumentBody = createOriginalDocumentBody(document);\n\t\tSystem.out.println(originalDocumentBody); \n\t\t\n\t\tSystem.out.println(\"==============\");\n\t\t\n\t\tSmartScriptParser parser2 = new SmartScriptParser(originalDocumentBody);\n\t\tDocumentNode document2 = parser2.getDocumentNode();\n\t\tString originalDocumentBody2 = createOriginalDocumentBody(document2);\n\t\tSystem.out.println(originalDocumentBody2);\n\t\t\n\t\tSystem.out.println(\"==============\");\n\t\t\n\t\tSystem.out.println(\"Documents are equal: \" + originalDocumentBody.equals(originalDocumentBody2));\n\n\t}", "String extractContentFromDocument(BotswanaCourtDocument bcd, String htmlfile,int startpage,int endpage){\n\t\t//dom tree structured in two formats example for 1st format(47-98) USA.1947.002 and for 2nd format(1998.25 - 2013) USA.2000.003\n\t\tDocument document = null;\n\t\tFile input = new File(htmlfile);\n\t\tString textContent = null;\n\t \t\n\t\tif( htmlfile == null ){\n\t\t\tSystem.out.println(\"File name is not valid\");\n\t\t}\n\t\telse{\n\t\t\ttry{\n\t\t\t\tdocument = Jsoup.parse(input,\"UTF-8\");\n\t\t\t\tString htmlText = document.body().toString();\n\t\t\t\tString textToBeExtracted = document.select(\"title\").text();\n\t \tSystem.out.println(\"text extracted =\"+textToBeExtracted);\n\t \t\n\t \t\n\t \tPattern pattern = Pattern.compile(\"\\\\((.*?)\\\\)\");\n\t \tMatcher matcher = pattern.matcher(textToBeExtracted);\n\t \tArrayList<String> matchedDataArray = new ArrayList<String>();\n\t \twhile(matcher.find()){\n\t \t\tmatchedDataArray.add(matcher.group());\n\t \t}\n\t \tif(matchedDataArray.size()>0){\n\t \t\tint firstIndex = textToBeExtracted.indexOf(matchedDataArray.get(matchedDataArray.size()-2)); \n\t\t \tif(firstIndex == -1){\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t\t \t}\n\t\t \telse{\n\t\t \t\tbcd.setParticipantsName(textToBeExtracted.substring(0,firstIndex-1));\n\t\t \t}\n\t\t \tbcd.setDecisionDate( matchedDataArray.get(matchedDataArray.size()-1));\n\t\t \tbcd.setCaseId(matchedDataArray.get(matchedDataArray.size()-2));\n\t\t \t\n\t \t}\n\t \telse{\n\t \t\tbcd.setParticipantsName(textToBeExtracted);\n\t \t\tbcd.setDecisionDate(\"\");\n\t\t \tbcd.setCaseId(\"\");\n\t \t}\n\t \t\n//\t \tint indexOfParticipantsEnd = textToBeExtracted.indexOf(\"[\");\n//\t \tString participantsName = textToBeExtracted.substring(0,indexOfParticipantsEnd-1);\n//\t \tbcd.setParticipantsName(participantsName);\n//\t \t\n//\t \tint indexOfDateStart = textToBeExtracted.indexOf(\"(\");\n//\t \tint indexOfDateEnd = textToBeExtracted.indexOf(\")\");\n//\t \tString decideDate = textToBeExtracted.substring(indexOfDateStart+1, indexOfDateEnd-1);\n//\t \tbcd.setDecisionDate(decideDate);\n//\t \t\n//\t \t\n//\t \tString caseIDPatternString = \"SC ([0-9]+/[0-9]+|CRI [0-9]+/[0-9]+)\";\n//\t \tPattern caseidPattern = Pattern.compile(caseIDPatternString);\n//\t \tMatcher caseidMatcher = caseidPattern.matcher(htmlText);\n//\t \t\n//\t \tString caseID =\"\";\n//\t \twhile (caseidMatcher.find()) {\n//\t \t\tcaseID = caseidMatcher.group();\n//\t \t \n//\t \t}\n//\t \tbcd.setCaseId(caseID);\n\t \t\n\t \ttextContent = htmlText;\n\t \t\n\t \t\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tSystem.out.println(\"Error in parsing html : \" + e.getMessage());\n\t \t}\n\t\t}\n\t\treturn textContent;\n\t}", "public static void main(String[] args) throws ParserConfigurationException, TransformerException, IOException {\n\t\tString[] nomeid={\"primo\",\"secondo\",\"terzo\",\"quarto\",\"quinto\",\"sesto\",\"settimo\",\"ottavo\",\"nono\",\"decimo\",\"undicesimo\",\"dodicesimo\",\"tredicesimo\",\"quattordicesimo\",\"quindicesimo\",\"sedicesimo\",\"diciassettesimo\",\"diciottesimo\",\"diciannovesimo\"};\r\n\r\n\t\t\r\n\t\t\r\n\t//for(int j=0;j<19;j++){\t\r\n\t\t\r\n\t\t//int nomefile=j+1;\r\n\t\tFile f=new File(\"C:\\\\Users\\\\Windows\\\\Desktop\\\\corpus\\\\corpus artigianale\\\\corpus2.xml\");\r\n\t\tString content = readFile(\"C:\\\\Users\\\\Windows\\\\Desktop\\\\corpus\\\\corpus artigianale\\\\corpus2.txt\", StandardCharsets.UTF_8);\t\r\n\t\tString[] frase=content.split(\"\\\\.\");\r\n\t\tString nome=nomeid[4];\t\r\n\t\t\t\r\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\r\n\t \r\n\t\t\t// root elements\r\n\t\t\tDocument doc = docBuilder.newDocument();\r\n\t\t\tElement rootElement = doc.createElement(\"add\");\r\n\t\t\tdoc.appendChild(rootElement);\r\n\t\t\t\r\n\t\t\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tfor (int i=0;i<frase.length;i++){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//if(frase[i].length()>150)\r\n\t\t\t\t//{// doc elements\r\n\t\t\t\t\tElement documento = doc.createElement(\"doc\");\r\n\t\t\t\t\trootElement.appendChild(documento);\r\n\t\t\t\t\r\n\t\t\t\t// id elements\r\n\t\t\t\t\t\tElement id = doc.createElement(\"field\");\r\n\t\t\t\t\t\tid.setAttribute(\"name\",\"id\");\r\n\t\t\t\t\t\tid.appendChild(doc.createTextNode(nome+i));\r\n\t\t\t\t\t\tdocumento.appendChild(id);\r\n\t\t\t\t//name element\r\n\t\t\t\t\t\tElement name = doc.createElement(\"field\");\r\n\t\t\t\t\t\tname.setAttribute(\"name\", \"name\");\r\n\t\t\t\t\t\tname.appendChild(doc.createTextNode(frase[i]));\r\n\t\t\t\t\t\tdocumento.appendChild(name);\r\n\t\t\t\t count++;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(count);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// write the content into xml file\r\n\t\t\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\t\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\t\t\tDOMSource source = new DOMSource(doc);\r\n\t\t\t\t\tStreamResult result = new StreamResult(f);\r\n\t\t\t \r\n\t\t\t\t\t// Output to console for testing\r\n\t\t\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\t\t\t \r\n\t\t\t\t\ttransformer.transform(source, result);\r\n\t\t\t \r\n\t\t\t\t\tSystem.out.println(\"File saved!\");\r\n\t\t\r\n\t //}\r\n\t\r\n\t}", "private void loadFromDoc(Document data) {\n if (total == null) { total = data; return; }\n\tNodeList tree = data.getDocumentElement().getChildNodes();\n\tfor (int i = 0; i < tree.getLength(); i++) {\n Node totroot = total.getDocumentElement();\n totroot.insertBefore(total.importNode(tree.item(i), true), null);\n }\n }", "public void processDocument(String url) throws PageReadException {\n // TODO: reset the results.\n impossible = false;\n givenUrl = url;\n nextPageLink = null;\n if (!notFirstPage) {\n xmlImages = new ArrayList<String>();\n title = null;\n }\n\n String content = pageReader.readPage(url);\n\n document = Jsoup.parse(content);\n\n if (document.getElementsByTag(\"body\").size() == 0) {\n LOG.error(\"no body to parse \" + url);\n impossible = true;\n throw new PageReadException(\"no body to parse\");\n }\n\n init(); // this needs another name, it does all the work.\n if (readAllPages && nextPageLink != null) {\n try {\n String textSoFar = articleText;\n notFirstPage = true;\n processDocument(nextPageLink);\n if (articleText != null) {\n articleText = textSoFar + articleText;\n }\n } finally {\n notFirstPage = false;\n System.out.println(articleText);\n }\n }\n\n }", "public void readDocument() throws FileNotFoundException{\r\n\t\t// Initialize 2 empty read document collections, one without duplicate words.\r\n\t\treadDocument = new LinkedBag<String>();\r\n\t\treadDocumentNoDuplicates = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Prompt user for name of read document file.\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the file you would like checked with extension: \");\r\n\t\tString readDocFileName = input.nextLine();\r\n\t\t\r\n\t\t// If exists, open file specified by user. Then add words to both collections.\r\n\t\ttry {\r\n\t\t\tFile file = new File(readDocFileName);\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString word = scanner.next();\r\n\t\t\t\treadDocument.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t\treadDocumentNoDuplicates.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"Document read\");\r\n\r\n\t\t\t// Get initial list of incorrect words.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\t// Display message showing how many words were in the read document.\r\n\t\t\tSystem.out.println(\"This document contains \" + readDocument.size() + \" words.\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\treadDocument = null;\r\n\t\t\treadDocumentNoDuplicates = null;\r\n\t\t\tSystem.out.println(\"Error: File '\" + readDocFileName + \"' not found. Please try again.\");\r\n\t\t}\r\n\t}", "public PoaMaestroMultivaloresHTML(DocumentLoader loader) { this(loader, true); }", "@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }", "@Override\r\n public void execute() throws BuildException \r\n {\r\n try {\r\n //Use Xerces as the parser. Does not support Saxon6.5.5 parser \r\n System.setProperty(\"org.xml.sax.driver\", \"org.apache.xerces.parsers.SAXParser\");\r\n System.setProperty(\"javax.xml.parsers.SAXParserFactory\", \"org.apache.xerces.jaxp.SAXParserFactoryImpl\");\r\n // System.setProperty(\"org.xml.sax.driver\", \"com.icl.saxon.aelfred.SAXDriver\");\r\n // System.setProperty(\"javax.xml.parsers.SAXParserFactory\", \"com.icl.saxon.aelfred.SAXParserFactoryImpl\");\r\n } catch (SecurityException se){\r\n System.out.println(\"[WARNING] Default parser is not set to Xerces. Make sure Saxon6.5.5 \" +\r\n \"is not in your CLASSPATH.\");\r\n } catch (Exception e){\r\n System.out.println(\"[WARNING] Default parser is not set to Xerces. Make sure Saxon6.5.5 \" +\r\n \"is not in your CLASSPATH\");\r\n }\r\n\r\n ArrayList<DocFileInfo> filesDescription = null; // list of information about the topic files\r\n ArrayList<File> htmlFiles = null; // topic files listed in the given directory\r\n ArrayList<String> htmlFilesPathRel = null;\r\n Map<String, String> tempDico = new HashMap<String, String>(); \r\n Iterator it;\r\n\r\n //File name initialization\r\n String htmlList = \"htmlFileList.js\";\r\n String htmlInfoList = \"htmlFileInfoList.js\";\r\n String indexName = \".js\";\r\n\r\n //timing\r\n Date dateStart = new Date();\r\n\t\t\r\n if (htmldir == null) {\r\n System.out.println(txt_no_args + \".\");\r\n return;\r\n }\r\n // Init input directory\r\n inputDir = new File(htmldir);\r\n\r\n // Begin of init\r\n\r\n // check if inputdir exists\t\t\r\n if ((inputDir == null) || !inputDir.exists()) {\r\n System.out.println(txt_no_inputdir + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n\r\n // check if outputdir defined\r\n if (outputDir == null) {\r\n //set the output directory: path= {inputDir}/search \r\n outputDir = inputDir.getPath().concat(File.separator).concat(searchdir);\r\n }\r\n\r\n // check if outputdir exists\r\n File tempfile = new File(outputDir); \r\n if (!tempfile.exists()) {\r\n boolean b = (new File(outputDir)).mkdir();\r\n if (!b) {\r\n System.out.println(txt_cannot_create_outputdir + \" \"+ outputDir + \".\");\r\n return;\r\n }\r\n }\r\n\t\t\r\n String inputPath = inputDir.getPath();\r\n \r\n //end of init\r\n\r\n\r\n // Get the list of all html files but the tocs, covers and indexes\r\n DirList nsiDoc = new DirList(inputDir, \"^.*\\\\.\" + htmlExtension + \"?$\", 1);\r\n htmlFiles = nsiDoc.getListFiles();\r\n // Check if found html files\r\n if ((htmlFiles == null) || htmlFiles.isEmpty()) {\r\n System.out.println(txt_no_html_files + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n // Get the list of all html files with relative paths \r\n htmlFilesPathRel = nsiDoc.getListFilesRelTo(inputPath);\r\n if (htmlFilesPathRel == null) {\r\n System.out.println(txt_no_relative_files_found);\r\n return;\t\t\t\r\n }\r\n\t\t\r\n // Create the list of the existing html files (index starts at 0)\r\n String htmlListPath = outputDir.concat(File.separator).concat(htmlList);\r\n WriteJSFiles.WriteHTMLList(htmlListPath, htmlFilesPathRel);\r\n\r\n // Parse each html file to retrieve the words:\r\n // ------------------------------------------\r\n\r\n // Retrieve the clean-up properties for indexing\r\n RetrieveCleanUpProps();\r\n RetrieveEncodingProps();\r\n // System.out.print(\"clean\"+\" \" +cleanUpStrings);\r\n\r\n //create a default handler\r\n //SaxHTMLIndex spe = new SaxHTMLIndex (); // do not use clean-up props files\r\n //SaxHTMLIndex spe = new SaxHTMLIndex (cleanUpStrings); // use clean-up props files\r\n FilesIndexer spe = new FilesIndexer(cleanUpStrings, cleanUpChars, encodingProps); // use clean-up props files\r\n\r\n if ( spe.init(tempDico) == 0 ) {\r\n\r\n //create a html file description list\r\n filesDescription = new ArrayList <DocFileInfo> ();\r\n\r\n it = htmlFiles.iterator ( ) ;\r\n\r\n // parse each html files\r\n while ( it.hasNext ( ) ) {\r\n File ftemp = (File) it.next();\r\n //tempMap.put(key, value);\r\n //The HTML file information are added in the list of FileInfoObject\r\n DocFileInfo docFileInfoTemp = new DocFileInfo(spe.runExtractData(ftemp, IndexerTask.indexerLanguage));\r\n\r\n // Set path relative to inputPath\r\n ftemp = docFileInfoTemp.getFullpath();\r\n String stemp = ftemp.toString(); \r\n int i = stemp.indexOf(inputPath);\r\n if ( i != 0 ) {\r\n System.out.println(\"The file path does not match with the input path: \" + stemp);\r\n continue;\r\n }\r\n int ad = stemp.equals(inputPath) ? 0 : 1;\r\n stemp = stemp.substring(inputPath.length() + ad);\r\n ftemp = new File (stemp);\r\n docFileInfoTemp.setFullpath(ftemp);\r\n\r\n filesDescription.add(docFileInfoTemp);\r\n }\r\n \r\n /*remove empty strings from the map*/\r\n if (tempDico.containsKey(\"\")) {\r\n tempDico.remove(\"\");\r\n }\r\n \r\n // write the index files\r\n if (tempDico.isEmpty()) {\r\n System.out.println(txt_no_words_gathered + \" \"+ inputDir + \".\");\r\n return;\r\n }\r\n\r\n WriteJSFiles.WriteIndex(outputDir.concat(File.separator).concat(indexName), tempDico);\r\n\r\n // write the html list file with title and shortdesc\r\n // create the list of the existing html files (index starts at 0)\r\n WriteJSFiles.WriteHTMLInfoList(outputDir.concat(File.separator).concat(htmlInfoList), filesDescription);\r\n\r\n // perf measurement\r\n Date dateEnd = new Date();\r\n long diff = dateEnd.getTime() - dateStart.getTime();\r\n if(diff < 1000) {\r\n System.out.println(\"Delay = \" + diff + \" milliseconds\");\r\n } else {\r\n System.out.println(\"Delay = \" + diff/1000 + \" seconds\");\r\n }\r\n } else {\r\n System.out.println(txt_wrong_dita_basedir);\r\n }\r\n }", "public static void main(String[] args) throws Exception {\n\n final Date start = new Date();\n final File sourceDirectory =\n new File(\"/home/alexeyev/hp/workspace/new_gizmodo/corpus3/\");\n final FileWriter destinationFile =\n new FileWriter(\"/home/alexeyev/hp/workspace/new_gizmodo/dan3.txt\");\n\n // all texts\n final BlockingQueue<File> queue = FilesCollector.getAllFiles(sourceDirectory);\n // all NEs\n final BlockingQueue<Pair<NamedEntity, String>> entities =\n new LinkedBlockingDeque<Pair<NamedEntity, String>>();\n\n log.info(\"Files obtained.\");\n\n final int NUMBER_OF_THREADS = 3;\n final ExecutorService pool = Executors.newFixedThreadPool(NUMBER_OF_THREADS);\n\n List<Future<?>> futures = new LinkedList<>();\n\n for (int i = 0; i < NUMBER_OF_THREADS; i++) {\n futures.add(pool.submit(new ExtractorHorse(queue, entities, tickLog, log)));\n }\n\n int size = 0;\n final ArrayList<Pair<NamedEntity, String>> buffer = new ArrayList<Pair<NamedEntity, String>>();\n while (!ready(futures)) {\n if (entities.size() > 5000) {\n log.info(TimeUnit.MILLISECONDS.toSeconds(new Date().getTime() - start.getTime()) + \" secs\");\n size += entities.drainTo(buffer);\n for (final Pair<NamedEntity, String> pair : buffer) {\n destinationFile.write(pair.second() + \"\\t\" + pair.first().getWords() + \"\\n\");\n }\n log.info(\"Flushed entities: \" + size);\n buffer.clear();\n }\n }\n\n size += entities.drainTo(buffer);\n for (final Pair<NamedEntity, String> pair : buffer) {\n destinationFile.write(pair.second() + \"\\t\" + pair.first().getWords() + \"\\n\");\n }\n\n log.info(\"Flushed entities: \" + size);\n buffer.clear();\n\n destinationFile.close();\n log.info(\"Done.\");\n pool.shutdown();\n }", "public static void main(String[] args) throws ParserConfigurationException,\n\t\t\tSAXException, IOException {\n\t\t\n\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t//File employeeFile = new File(\"Employees.xml\");\n\t\tFile SMSFile = new File(\"smsCorpusAnonymized-1.1.xml\"); \n\t\t\n\t\t//Document document = builder.parse(employeeFile);\n\t\tDocument document = builder.parse(SMSFile); \n\t\t\n\n\t\t//List<Employee> employees = new ArrayList<Employee>();\n\t\tList<SMS> sms = new ArrayList<SMS>(); \n\n\t\t\n\t\tNodeList nodeList = document.getDocumentElement().getChildNodes();\n\t\tfor (int i = 0; i < nodeList.getLength(); i++) {\n\n\t\t\tNode node = nodeList.item(i);\n\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement elem = (Element) node;\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tString id = elem.getAttribute(\"id\"); \n\t\t\t\tString text =elem.getElementsByTagName(\"text\").item(0).getChildNodes().item(0).getNodeValue(); \n\t\t\t\tString country = elem.getElementsByTagName(\"source\").item(0).getAttributes().item(0).getNodeValue(); \n\t\t\t\tString srcID = elem.getElementsByTagName(\"srcID\").item(0).getChildNodes().item(0).getNodeValue(); \n\t\t\t\tString collector = elem.getElementsByTagName(\"collectionMethod\").item(0).getAttributes().item(0).getNodeValue();\n\t\t\t\tString year = elem.getElementsByTagName(\"collectionMethod\").item(0).getAttributes().getNamedItem(\"year\").getNodeValue(); \n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tsms.add(new SMS (id,text, country, srcID, collector, year)); \n\t\t\t\t \n\t\t\t}\n\t\t}\n\t\t// Print all employees.\n\t\tfor (SMS text : sms)\n\t\t\tSystem.out.println(text.toString());\n\t}", "public static void main(String[] args) {\n\t\tPropertyManager.setPropertyFilePath(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/TextDigesterConfig.properties\");\n\t\t\n\t\tString text = MultilingImport.readText(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/multilingMss2015Training/body/text/\" + lang + \"/\" + docName);\n\n\t\t/* Process text document */\n\t\tLangENUM languageOfHTMLdoc = FlProcessor.getLanguage(text);\n\t\t\n\t\tTDDocument TDdoc = FlProcessor.generateDocumentFromFreeText(text, null, languageOfHTMLdoc);\n\n\t\t// Store GATE document\n\t\tWriter out = null;\n\t\ttry {\n\t\t\tout = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"/home/francesco/Desktop/NLP_HACHATHON_4YFN/EXAMPLE_TEXTS/\" + lang + \"_\" + docName.replace(\".txt\", \"_GATE.xml\")), \"UTF-8\"));\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tout.write(TDdoc.getGATEdoc().toXml());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tout.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\ttry {\n\t\t\tLexRankSummarizer lexRank = new LexRankSummarizer(languageOfHTMLdoc, SentenceSimilarityENUM.cosineTFIDF, false, 0.01);\n\t\t\tMap<Annotation, Double> sortedSentences = lexRank.sortSentences(TDdoc);\n\t\t\t\n\t\t\tList<Annotation> sentListOrderedByRelevance = new ArrayList<Annotation>();\n\t\t\tfor(Entry<Annotation, Double> sentence : sortedSentences.entrySet()) {\n\t\t\t\tlogger.info(\"Score: \" + sentence.getValue() + \" - '\" + GtUtils.getTextOfAnnotation(sentence.getKey(), TDdoc.getGATEdoc()) + \"'\");\n\t\t\t\tsentListOrderedByRelevance.add(sentence.getKey());\n\t\t\t}\n\t\t\t\n\t\t\tlogger.info(\"Summary max 100 tokens: \");\n\t\t\tList<Annotation> summarySentences = GtUtils.orderAnnotations(sentListOrderedByRelevance, TDdoc.getGATEdoc(), 100);\n\t\t\tfor(Annotation ann : summarySentences) {\n\t\t\t\tlogger.info(GtUtils.getTextOfAnnotation(ann, TDdoc.getGATEdoc()));\n\t\t\t}\n\t\t} catch (TextDigesterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t*/\n\t}", "public void indexFileOrDirectory(String fileName) {\r\n\r\n addFiles(new File(fileName));\r\n\r\n int originalNumDocs = writer.numRamDocs();\r\n for (File f : queue) {\r\n try {\r\n Document doc = new Document();\r\n\r\n // Creation of a simpledateformatter in order to print the last-modified-date of our files.\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n String date = sdf.format(f.lastModified());\r\n\r\n if (f.getName().endsWith(\".html\")) {\r\n\r\n // Creation of a jsoup document to help us with our html parsing.\r\n org.jsoup.nodes.Document htmlFile = Jsoup.parse(f, null);\r\n String body = htmlFile.body().text();\r\n String title = htmlFile.title();\r\n String summary = getSummary(htmlFile);\r\n\r\n\r\n doc.add(new TextField(\"contents\", body + \" \" + title + \" \" + date, Field.Store.YES));\r\n doc.add(new TextField(\"title\", title, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n doc.add(new StringField(\"summary\", summary, Field.Store.YES));\r\n\r\n }\r\n else {\r\n String content = FileUtils.readFileToString(f, StandardCharsets.UTF_8);\r\n\r\n doc.add(new TextField(\"contents\", content + \" \" + date, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n }\r\n doc.add(new StringField(\"filename\", f.getName(), Field.Store.YES));\r\n\r\n writer.addDocument(doc);\r\n System.out.println(\"Added: \" + f);\r\n } catch (Exception e) {\r\n System.out.println(\"Could not add: \" + f);\r\n }\r\n }\r\n\r\n int newNumDocs = writer.numDocs();\r\n System.out.println(\"\");\r\n System.out.println(\"************************\");\r\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\r\n System.out.println(\"************************\");\r\n\r\n queue.clear();\r\n }", "public void start(){\n\t\tboolean readFromFile = readFromIndex();\r\n\t\tif (!readFromFile){\t\r\n\t\t\tfor (int i = 0;i<1000;++i){\r\n\t\t\t\tString file = \"../crawler/pages/page\"+i+\".html\";\r\n\t\t\t\taddFile(file);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tInputStream modelIn = new FileInputStream(\"en-token.bin\");\n\n\t\ttry {\n\t\t\tTokenizerModel model = new TokenizerModel(modelIn);\n\t\t\tTokenizer tokenizer = new TokenizerME(model);\n\t\t\tString txt1 = readFile(\"files/job_1.txt\", null);\n\t\t\ttokenize(txt1,tokenizer);\n\t\t\t\n\t\t//\tString txt2 = readFile(\"files/job_1.html\", null);\n\t\t//\ttokenize(txt2,tokenizer);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (modelIn != null) {\n\t\t\t\ttry {\n\t\t\t\t\tmodelIn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void buildTrainData() throws IOException {\n\t\tString negativePath = \"./corpus/20ng-train-all-terms.txt\";\n\t\tString positivePath = \"./corpus/r8-train-all-terms.txt\";\n\t\tString fileout = \"./corpus/trainData\";\n\t\tFileReader fr1 = new FileReader(negativePath);\n\t\tFileReader fr2 = new FileReader(positivePath);\n\t\tFileWriter fw = new FileWriter(fileout);\n\t\tBufferedReader br1 = new BufferedReader(fr1);\n\t\tBufferedReader br2 = new BufferedReader(fr2);\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tHashtable<String, Integer> map = new Hashtable<String, Integer>();\n\t\tString readoneline;\n\t\twhile (((readoneline = br1.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\n\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\tbw.newLine();\n\t\t\t} else {\n\t\t\t\tInteger num = map.get(topic);\n\t\t\t\tif (num < 50) {\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"-1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\twhile (((readoneline = br2.readLine()) != null)) {\n\t\t\tint pos = readoneline.indexOf(\"\\t\");\n\t\t\tString topic = readoneline.substring(0, pos);\n\t\t\tString content = readoneline.substring(pos + 1);\n\t\t\tif (topic.equals(\"acq\") || topic.equals(\"earn\")\n\t\t\t\t\t|| topic.equals(\"money-fx\") || topic.equals(\"trade\")\n\t\t\t\t\t|| topic.equals(\"interest\")) {\n\t\t\t\tif (!map.containsKey(topic)) {\n\t\t\t\t\tmap.put(topic, new Integer(1));\n\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\tbw.newLine();\n\t\t\t\t} else {\n\t\t\t\t\tInteger num = map.get(topic);\n\t\t\t\t\tif (topic.equals(\"acq\") && num < 300) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"earn\") && num < 450) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"money-fx\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"trade\") && num < 100) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t} else if (topic.equals(\"interest\") && num < 50) {\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tStringTokenizer st = new StringTokenizer(content, \" \");\n\t\t\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\t\t\tString tmp = st.nextToken();\n\t\t\t\t\t\t\tif (tmp.length() >= 3) {\n\t\t\t\t\t\t\t\tresult.append(tmp + \" \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbw.write(\"1\\t\" + result.toString());\n\t\t\t\t\t\tbw.newLine();\n\t\t\t\t\t\tmap.put(topic, num + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbw.flush();\n\t\tbr1.close();\n\t\tbw.close();\n\t\tfw.close();\n\n\t}", "public void writeDocumentForA(String filename, String path) throws Exception\r\n\t{\n\t\tFile folder = new File(path);\r\n\t\tFile[] listOfFiles = folder.listFiles();\r\n\t \r\n\t \r\n\t \tFileWriter fwText;\r\n\t\tBufferedWriter bwText;\r\n\t\t\r\n\t\tfwText = new FileWriter(\"C:/Users/jipeng/Desktop/Qiang/updateSum/TAC2008/Parag/\"+ filename+\"/\" +\"A.txt\");\r\n\t\tbwText = new BufferedWriter(fwText);\r\n\t\t\r\n\t \tfor ( int i=0; i<listOfFiles.length; i++) {\r\n\t \t\t//String name = listOfFiles[i].getName();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString text = readText(listOfFiles[i].getAbsolutePath());\r\n\t\t\t\r\n\t\t\tFileWriter fwWI = new FileWriter(\"C:/pun.txt\");\r\n\t\t\tBufferedWriter bwWI = new BufferedWriter(fwWI);\r\n\t\t\t\r\n\t\t\tbwWI.write(text);\r\n\t\t\t\r\n\t\t\tbwWI.close();\r\n\t\t\tfwWI.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<List<HasWord>> sentences = MaxentTagger.tokenizeText(new BufferedReader(new FileReader(\"C:/pun.txt\")));\r\n\t\t\t\r\n\t\t\t//System.out.println(text);\r\n\t\t\tArrayList<Integer> textList = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t\tfor (List<HasWord> sentence : sentences)\r\n\t\t\t {\r\n\t\t\t ArrayList<TaggedWord> tSentence = tagger.tagSentence(sentence);\r\n\t\t\t \r\n\t\t\t for(int j=0; j<tSentence.size(); j++)\r\n\t\t\t {\r\n\t\t\t \t \tString word = tSentence.get(j).value();\r\n\t\t\t \t \t\r\n\t\t\t \t \tString token = word.toLowerCase();\r\n\t\t\t \t \r\n\t\t\t \t \tif(token.length()>2 )\r\n\t\t\t\t \t{\r\n\t\t\t \t\t\t if (!m_EnStopwords.isStopword(token)) \r\n\t\t\t \t\t\t {\r\n\t\t\t \t\t\t\t\r\n\t\t\t\t\t\t\t\t if (word2IdHash.get(token)==null)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t textList.add(id);\r\n\t\t\t\t\t\t\t\t\t // bwText.write(String.valueOf(id)+ \" \");\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t word2IdHash.put(token, id);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t allWordsArr.add(token);\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t id++;\r\n\t\t\t\t\t\t\t\t } else\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t \tint wid=(Integer)word2IdHash.get(token);\r\n\t\t\t\t\t\t\t\t \tif(!textList.contains(wid))\r\n\t\t\t\t\t\t\t\t \t\ttextList.add(wid);\r\n\t\t\t\t\t\t\t\t \t//bwText.write(String.valueOf(wid)+ \" \");\r\n\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 }\r\n\t\t\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\t\t\tCollections.sort(textList);\r\n\t\t \r\n\t\t\tString text2 = valueFromList(textList);\r\n\t\t bwText.write(text2);\r\n\t\t //System.out.println(text2);\r\n\t\t bwText.newLine();\r\n\t\t textList.clear();\r\n\t\t \r\n\t \t}\r\n\t \tbwText.close();\r\n\t fwText.close();\r\n\t}", "public ArrayList<String> makeSentences(String text) {\n \t\t/*\n \t\t * Quick check so we're not trying to split up an empty\n \t\t * String. This only happens right before the user types\n \t\t * at the end of a document and we don't have anything to\n \t\t * split, so return.\n \t\t */\n \t\tif (text.equals(\"\")) {\n \t\t\tArrayList<String> sents = new ArrayList<String>();\n \t\t\tsents.add(\"\");\n \t\t\treturn sents;\n \t\t}\n \t\t\n \t\t/**\n \t\t * Because the eosTracker isn't initialized until the TaggedDocument is,\n \t\t * it won't be ready until near the end of DocumentProcessor, in which\n \t\t * case we want to set it to the correct\n \t\t */\n \t\tthis.eosTracker = main.editorDriver.taggedDoc.eosTracker;\n \t\tthis.editorDriver = main.editorDriver;\n \t\t\n \t\tArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES);\n \t\tboolean mergeNext = false;\n \t\tboolean mergeWithLast = false;\n \t\tboolean forceNoMerge = false;\n \t\tint currentStart = 1;\n \t\tint currentStop = 0;\n \t\tString temp;\n \n \t\t/**\n \t\t * replace unicode format characters that will ruin the regular\n \t\t * expressions (because non-printable characters in the document still\n \t\t * take up indices, but you won't know they're there untill you\n \t\t * \"arrow\" though the document and have to hit the same arrow twice to\n \t\t * move past a certain point. Note that we must use \"Cf\" rather than\n \t\t * \"C\". If we use \"C\" or \"Cc\" (which includes control characters), we\n \t\t * remove our newline characters and this screws up the document. \"Cf\"\n \t\t * is \"other, format\". \"Cc\" is \"other, control\". Using \"C\" will match\n \t\t * both of them.\n \t\t */\n \t\ttext = text.replaceAll(\"\\u201C\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\u201D\",\"\\\"\");\n \t\ttext = text.replaceAll(\"\\\\p{Cf}\",\"\");\n \n \t\tint lenText = text.length();\n \t\tint index = 0;\n \t\tint buffer = editorDriver.sentIndices[0];\n \t\tString safeString = \"\";\n \t\tMatcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text);\n \t\t\n \t\t//================ SEARCHING FOR ABBREVIATIONS ================\n \t\twhile (index < lenText-1 && abbreviationFinder.find(index)) {\n \t\t\tindex = abbreviationFinder.start();\n \t\t\t\n \t\t\ttry {\n \t\t\t\tint abbrevLength = index;\n \t\t\t\twhile (text.charAt(abbrevLength) != ' ') {\n \t\t\t\t\tabbrevLength--;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) {\n \t\t\t\t\teosTracker.setIgnore(index+buffer, true);\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \t\t\t\n \t\t\tindex++;\n \t\t}\t\t\n \t\t\n \t\tMatcher sent = EOS_chars.matcher(text);\n \t\tboolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker.\n \t\t\n \t\t/*\n \t\t * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not\n \t\t * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if\n \t\t * an EOS exists in \"text\" that would normally be an EOS character and is not set to be ignored.\n \t\t */\n \t\t\n \t\tindex = 0;\n \t\tif (foundEOS) {\t\n \t\t\ttry {\n \t\t\t\twhile (index < lenText-1 && sent.find(index)) {\n \t\t\t\t\tindex = sent.start();\n \t\t\t\t\tif (!eosTracker.sentenceEndAtIndex(index+buffer)) {\n \t\t\t\t\t\tfoundEOS = false;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tfoundEOS = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tindex++;\n \t\t\t\t}\n \t\t\t} catch (IllegalStateException e) {}\n \t\t}\n \t\t//We need to reset the Matcher for the code below\n \t\tsent = EOS_chars.matcher(text);\n \t\tsent.find(currentStart);\n \t\t\n \t\tMatcher sentEnd;\n \t\tMatcher citationFinder;\n \t\tboolean hasCitation = false;\n \t\tint charNum = 0;\n \t\tint lenTemp = 0;\n \t\tint lastQuoteAt = 0;\n \t\tint lastParenAt = 0;\n \t\tboolean foundQuote = false;\n \t\tboolean foundParentheses = false;\n \t\tboolean isSentence;\n \t\tboolean foundAtLeastOneEOS = foundEOS;\n \t\t\n \t\t/**\n \t\t * Needed otherwise when the user has text like below:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two. This is the last sentence.\n \t\t * and they begin to delete the EOS character as such:\n \t\t * \t\tThis is my sentence one. This is \"My sentence?\" two This is the last sentence.\n \t\t * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character\n \t\t * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't\n \t\t * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside\n \t\t * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen.\n \t\t */\n \t\tString trimmedText = text.trim();\n \t\tint trimmedTextLength = trimmedText.length();\n \n \t\t//We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored\n \t\tboolean EOSAtSentenceEnd = true;\n \t\tif (trimmedTextLength != 0) {\n \t\t\tEOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1);\n \t\t} else {\n \t\t\tEOSAtSentenceEnd = false;\n \t\t}\n \t\t\n \t\t//Needed so that if we are deleting abbreviations like \"Ph.D.\" this is not triggered.\n \t\tif (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1))\n \t\t\tEOSAtSentenceEnd = true;\n \n \t\twhile (foundEOS == true) {\n \t\t\tcurrentStop = sent.end();\n \t\t\t\n \t\t\t//We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character\n \t\t\ttry {\n \t\t\t\twhile (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) {\n \t\t\t\t\tsent.find(currentStop+1);\n \t\t\t\t\tcurrentStop = sent.end();\n \t\t\t\t}\n \t\t\t} catch (Exception e) {}\n \n \t\t\ttemp = text.substring(currentStart-1,currentStop);\n \t\t\tlenTemp = temp.length();\n \t\t\tlastQuoteAt = 0;\n \t\t\tlastParenAt = 0;\n \t\t\tfoundQuote = false;\n \t\t\tfoundParentheses = false;\n \t\t\t\n \t\t\tfor(charNum = 0; charNum < lenTemp; charNum++){\n \t\t\t\tif (temp.charAt(charNum) == '\\\"') {\n \t\t\t\t\tlastQuoteAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundQuote == true)\n \t\t\t\t\t\tfoundQuote = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundQuote = true;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (temp.charAt(charNum) == '(') {\n \t\t\t\t\tlastParenAt = charNum;\n \t\t\t\t\t\n \t\t\t\t\tif (foundParentheses)\n \t\t\t\t\t\tfoundParentheses = false;\n \t\t\t\t\telse\n \t\t\t\t\t\tfoundParentheses = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundQuote == true && ((temp.indexOf(\"\\\"\",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote.\n \t\t\t\tif ((currentStop = text.indexOf(\"\\\"\",currentStart +lastQuoteAt+1)) == -1) {\n \t\t\t\t\tcurrentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text.\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tcurrentStop +=1;\n \t\t\t\t\tmergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.)\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\n \t\t\tif (foundParentheses && ((temp.indexOf(\")\", lastParenAt+1)) == -1)) {\n \t\t\t\tif ((currentStop = text.indexOf(\")\", currentStart + lastParenAt + 1)) == -1)\n \t\t\t\t\tcurrentStop = text.length();\n \t\t\t\telse {\n \t\t\t\t\tcurrentStop += 1;\n \t\t\t\t\tmergeNext = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \n \t\t\tif (foundQuote) {\n \t\t\t\tsentEnd = SENTENCE_QUOTE.matcher(text);\t\n \t\t\t\tisSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \n \t\t\t\tif (isSentence == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\t\tcurrentStop = text.indexOf(\"\\\"\",sentEnd.start())+1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (foundParentheses) {\n \t\t\t\tsentEnd = SENTENCE_PARENTHESES.matcher(text);\n \t\t\t\tisSentence = sentEnd.find(currentStop-2);\n \t\t\t\t\n \t\t\t\tif (isSentence == true) {\n \t\t\t\t\tcurrentStop = text.indexOf(\")\", sentEnd.start()) + 1;\n \t\t\t\t\tsafeString = text.substring(currentStart-1, currentStop);\n \t\t\t\t\tforceNoMerge = true;\n \t\t\t\t\tmergeNext = false;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t// now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing)\n \t\t\t// The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc..\n \t\t\tcitationFinder = CITATION.matcher(text.substring(currentStop));\t\n \t\t\thasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).)\n \t\t\t\n \t\t\tif (hasCitation == true) { // If it seems that the text looks like this: He said, \"Hello.\" Then she said, \"Hi.\" \n \t\t\t\t// Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, \"Hello.\")\n \t\t\t\tcurrentStop = text.indexOf(\")\",citationFinder.start()+currentStop)+1;\n \t\t\t\tsafeString = text.substring(currentStart-1,currentStop);\n \t\t\t\tmergeNext = false;\n \t\t\t}\t\n \t\t\t\n \t\t\tif (mergeWithLast) {\n \t\t\t\tmergeWithLast=false;\n \t\t\t\tString prev=sents.remove(sents.size()-1);\n \t\t\t\tsafeString=prev+safeString;\n \t\t\t}\n \t\t\t\n \t\t\tif (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through\n \t\t\t\tmergeNext=false;\n \t\t\t\tmergeWithLast=true;\n \t\t\t} else {\n \t\t\t\tforceNoMerge = false;\n \t\t\t\tfinalSents.add(safeString);\n \t\t\t}\n \t\t\n \t\t\tsents.add(safeString);\n \t\t\t\n \t\t\t//// xxx xxx xxx return the safeString_subbedEOS too!!!!\n \t\t\tif (currentStart < 0 || currentStop < 0) {\n \t\t\t\tLogger.logln(NAME+\"Something went really wrong making sentence tokens.\", LogOut.STDERR);\n \t\t\t\tErrorHandler.fatalProcessingError(null);\n \t\t\t}\n \n \t\t\tcurrentStart = currentStop+1;\n \t\t\tif (currentStart >= lenText) {\n \t\t\t\tfoundEOS = false;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tfoundEOS = sent.find(currentStart);\n \t\t}\n \n \t\tif (!foundAtLeastOneEOS || !EOSAtSentenceEnd) {\n \t\t\tArrayList<String> wrapper = new ArrayList<String>(1);\n \t\t\twrapper.add(text);\n \t\t\treturn wrapper;\n \t\t}\n \t\t\n \t\treturn finalSents;\n \t}", "private Document getDocumentInClassPath()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\t\r\n\t\tDocument doc = builder.parse(ServiceLoader.class.getResourceAsStream(\"/\"+FILE_NAME));\r\n\t\t\r\n\t\treturn doc;\r\n\t}", "public static void main(String[] args) throws FileNotFoundException,\n\t\t\tIOException, SAXException, TransformerConfigurationException, TransformerFactoryConfigurationError {\n\t\t\n\t\tDocument targetDocument = XMLUtil.getDocument(new FileInputStream(mtasResponse));\n\t\t//System.out.println(XMLUtil.toString(targetDocument));\n\t\tDOMSource xmlSource = new DOMSource(targetDocument);\n\t\tDOMResult tResult = new DOMResult();\n\t\ttry {\n\t\t\tInputStream inputStream = XSLTTransformerFactory.class.getResourceAsStream(xsltFileName);\n\t\t\tTransformer transformer = XSLTTransformerFactory.getTransformer(inputStream);\n\t\t\t\n Map<String, Document> docs = new HashMap<String, Document>();\n \n docs.put(\"sourceDocument\", targetDocument); \n System.out.println(docs.size());\n transformer.setURIResolver(new DocumentSourceResolver(docs));\n \n\t\t\ttransformer.transform(xmlSource, tResult);\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\tDocument transformedResponse = (Document) tResult.getNode();\n\t\tSystem.out.println(XMLUtil.toString(transformedResponse));\n\t}", "@Test\n\tpublic void testDocumentProcessorGlobally() {\n\t\tTrainingDocumentProcessor processor = new TrainingDocumentProcessor();\n\t\tTrainingDocumentFiler[] categories;\n\t\t\n\t\ttry {\n\t\t\tprocessor.importDocFile(\"testTextFiles/testDocuments.txt\");\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tprocessor.importStopWordFile(\"stopWords.txt\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t\tprocessor.process();\n\t\tcategories = processor.getTrainingDocumentFilerArray();\n\t\tassertEquals(\"Negative sentiment category should be 0\",0,categories[0].getCategory());\n\t\tassertEquals(\"Positive sentiment category should be 1\",1,categories[1].getCategory());\n\t\tassertEquals(\"Number of negative documents should be 8\", 8, categories[0].getNumberOfDocuments());\n\t\tassertEquals(\"Number of positive documents should be 8\", 8, categories[1].getNumberOfDocuments());\n\t}", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void init() {\n\n\t\tcontentDirectory = new Document();\n\n\t\t//For ass\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\t//list of links to places (on reddit for example) to scrape from\n\t\tArrayList<String> redditAssLinks = new ArrayList<>();\n\t\tredditAssLinks.add(\"http://www.reddit.com/r/fffffffuuuuuuuuuuuu\"); //add sites here\n\n\t\tredditAssLinks.add(\"http://www.reddit.com/r/memes\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/funnymeme/\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/adviceanimals\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/vertical\");\n\t\tredditAssLinks.add(\"https://www.reddit.com/r/firstworldproblems\");\n\t\tDocument redditAssDoc = new Document();\n\t\tredditAssDoc.append(\"reddit\", redditAssLinks);\n\n\t\t//could also append this when imgur implementation is ready:\n\t\t//contentDirectory.append(\"ass\", imgurAssDoc);\n\t\tcontentDirectory.append(\"ass\", redditAssDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for workout\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditWorkoutLinks = new ArrayList<>();\n\t\tredditWorkoutLinks.add(\"http://www.reddit.com/r/gymfails\");\n\t\tredditWorkoutLinks.add(\"http://www.reddit.com/r/gymmemes\");\n\t\tredditWorkoutLinks.add(\"https://www.reddit.com/r/bodybuilding/\");\n\t\tredditWorkoutLinks.add(\"https://www.reddit.com/r/weightlifting\");\n\t\tDocument redditWorkoutDoc = new Document();\n\t\tredditWorkoutDoc.append(\"reddit\", redditWorkoutLinks);\n\n\t\tcontentDirectory.append(\"workout\", redditWorkoutDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for minecraft\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditMinecraftLinks = new ArrayList<>();\n\t\tredditMinecraftLinks.add(\"http://www.reddit.com/r/Minecraft/\");\n\t\tredditMinecraftLinks.add(\"http://www.reddit.com/r/MinecraftSuggestions\");\n\t\tDocument redditMinecraftDoc = new Document();\n\t\tredditMinecraftDoc.append(\"reddit\", redditMinecraftLinks);\n\n\t\tcontentDirectory.append(\"minecraft\", redditMinecraftDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\n\t\t//for minecraft\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditKSPLinks = new ArrayList<>();\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/KerbalSpaceProgram/\");\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/KSPMemes\");\n\t\tredditKSPLinks.add(\"http://www.reddit.com/r/KerbalAcademy\");\n\t\tredditKSPLinks.add(\"https://www.reddit.com/r/RealSolarSystem/\");\n\t\tDocument redditKSPDoc = new Document();\n\t\tredditKSPDoc.append(\"reddit\", redditKSPLinks);\n\n\t\tcontentDirectory.append(\"KSP\", redditKSPDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for weed\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditWeedLinks = new ArrayList<>();\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/weed/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/trees/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/Picturesoftrees/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/bakedart/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/treecomics/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/nugs/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/nugporn/\");\n\t\tredditWeedLinks.add(\"https://www.reddit.com/r/TokeSpot/\");\n\n\t\tDocument redditWeedDoc = new Document();\n\t\tredditWeedDoc.append(\"reddit\", redditWeedLinks);\n\n\t\tcontentDirectory.append(\"weed\", redditWeedDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for drug\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditDrugLinks = new ArrayList<>();\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/DrugArt/\");\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/trippy/\");\n\t\tredditDrugLinks.add(\"https://www.reddit.com/r/drugmemes/\");\n\t\tDocument redditDrugDoc = new Document();\n\t\tredditDrugDoc.append(\"reddit\", redditDrugLinks);\n\n\t\tcontentDirectory.append(\"drug\", redditDrugDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\t\t//for cute animals\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\t\tArrayList<String> redditCanimalLinks = new ArrayList<>();\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/aww/\");\n\t\tredditCanimalLinks.add(\"http://www.reddit.com/r/cats/\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/babyanimals/\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/AnimalsBeingBros\");\n\t\tredditCanimalLinks.add(\"https://www.reddit.com/r/woof_irl/\");\n\t\tDocument reddiCanimalDoc = new Document();\n\t\treddiCanimalDoc.append(\"reddit\", redditCanimalLinks);\n\n\t\tcontentDirectory.append(\"canimal\", reddiCanimalDoc);\n\t\t//////////////////////////////////////////////////////////////////////////////////////////\n\n\n\t}", "public void tagDocument (Document doc) {\n\t\tmene.newDocument();\n\t\tVector textSegments = doc.annotationsOfType (\"TEXT\");\n\t\tIterator it = textSegments.iterator ();\n\t\twhile (it.hasNext ()) {\n\t\t\tAnnotation ann = (Annotation)it.next ();\n\t\t\tSpan textSpan = ann.span ();\n\t\t\tSentenceSplitter.split (doc, textSpan);\n\t\t}\n\t\tVector sentences = doc.annotationsOfType (\"sentence\");\n\t\tIterator is = sentences.iterator ();\n\t\twhile (is.hasNext ()) {\n\t\t\tAnnotation sentence = (Annotation)is.next ();\n\t\t\tSpan sentenceSpan = sentence.span();\n\t\t\tTokenizer.tokenize (doc, sentenceSpan);\n\t\t\tLexicon.annotateWithDefinitions(doc, sentenceSpan.start(), sentenceSpan.end());\n\t\t\ttag (doc, sentenceSpan);\n\t\t}\n\t}", "private static void createSeededFiles(String type, int seedNum, int trainNum, int testNum, File sourceDirectory,\n File destinationDirectory) {\n\n File trainDirectory = new File(destinationDirectory.getAbsolutePath() + \"/train\");\n if(trainNum > 0 && !trainDirectory.exists()) {\n trainDirectory.mkdir();\n }\n File testDirectory = new File(destinationDirectory.getAbsolutePath() + \"/test\");\n if(testNum > 0 && !testDirectory.exists()) {\n testDirectory.mkdir();\n }\n\n //for each language, we want to create a directory for that language, then parse trees/sentences through each of the novels listed there\n File[] languages = sourceDirectory.listFiles();\n File[] trainDirectoryLanguages = new File[languages.length];\n File[] testDirectoryLanguages = new File[languages.length];\n for (int i = 0; i < languages.length; i++) {\n if (languages[i].getName().startsWith(\".\")) {\n continue;\n }\n trainDirectoryLanguages[i] = new File(trainDirectory.getAbsolutePath() + \"/\" + languages[i].getName());\n testDirectoryLanguages[i] = new File(testDirectory.getAbsolutePath() + \"/\" + languages[i].getName());\n if (trainNum > 0)\n makeNewDirectoryIfNotExists(trainDirectoryLanguages[i]);\n if (testNum > 0)\n makeNewDirectoryIfNotExists(testDirectoryLanguages[i]);\n\n File[] novels = languages[i].listFiles();\n for (int j = 0; j < novels.length; j++) {\n if (novels[j].getName().startsWith(\".\")) {\n continue;\n }\n try {\n BufferedReader read = new BufferedReader(new FileReader(novels[j]));\n //name w/o .txt\n String fileShortName = novels[j].getName().substring(0, novels[j].getName().length()-4);\n String line;\n //max number of stuff we want to read is based on our inputs\n int maxFiles = testNum + trainNum;\n long maxLines = (long) maxFiles * (long) seedNum;\n int lineCount = 0;\n int fileCount = 1;\n //File currentFile = createNewNumberedFile(trainDirectoryLanguages[i].getAbsolutePath() + \"/\" + fileShortName, fileCount);\n String pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n File currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n PrintWriter pw = new PrintWriter(currentFile);\n\n //this is the part that varies based on calling for text or trees.\n switch (type) {\n case \"text\":\n while ((line = read.readLine()) != null && lineCount < maxLines ) {\n pw.println(line);\n lineCount++;\n //when our lineCount mod seedNum is 0, we want to create another PrintWriter\n if (lineCount % seedNum == 0) {\n fileCount++;\n //put in train or test, depending on our current file count.\n if (fileCount <= maxFiles) {\n pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n pw.flush();\n pw.close();\n pw = new PrintWriter(currentFile);\n }\n }\n }\n break;\n case \"tree\":\n //need to build a Treebank... lifting code from HW 3 to aid in this.\n Options op = new Options();\n op.doDep = false;\n op.doPCFG = true;\n op.setOptions(\"-goodPCFG\", \"-evals\", \"tsv\");\n Treebank treeBank = op.tlpParams.diskTreebank();\n treeBank.loadPath(novels[j]);\n Iterator<Tree> it = treeBank.iterator();\n while((it.hasNext()) && lineCount < maxLines) {\n lineCount++;\n Tree t = it.next();\n t.pennPrint(pw);\n if (lineCount % seedNum == 0) {\n fileCount++;\n //put in train or test, depending on our current file count.\n if (fileCount <= maxFiles) {\n pathToUse = (fileCount <= trainNum) ? trainDirectoryLanguages[i].getAbsolutePath() :\n testDirectoryLanguages[i].getAbsolutePath();\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n pw.flush();\n pw.close();\n pw = new PrintWriter(currentFile);\n }\n }\n }\n break;\n }\n pw.flush();\n pw.close();\n //if numlines is not equal to maxlines then we'll remove the last file.\n if (lineCount != maxLines) {\n currentFile = createNewNumberedFile(pathToUse + \"/\" + fileShortName, fileCount);\n currentFile.delete();\n }\n } catch (IOException e) {\n System.err.println(\"Exception caught while reading \" + novels[j] + \":\");\n e.printStackTrace();\n }\n }\n\n\n }\n\n\n }", "private static void createIndexDocument(String path, Configuration c, LODEParser l, Properties lang){\n //the boolean valuas come from the configuration.\n String textToWrite = Constants.getIndexDocument(\"resources\",c, l, lang);\n saveDocument(path+File.separator+\"index-\"+c.getCurrentLanguage()+\".html\", textToWrite,c);\n }", "@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}", "public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }", "public abstract Iterable<String> addDocument(TextDocument doc) throws IOException;", "private Document getDocument(String in) throws DocumentException, IOException {\n \t\tString path=getClass().getPackage().getName().replaceAll(\"\\\\.\",\"/\");\n \t\tInputStream stream=Thread.currentThread().getContextClassLoader().getResourceAsStream(path+\"/\"+in);\n \t\tSAXReader reader=new SAXReader();\n \t\tDocument doc=reader.read(stream);\n \t\tstream.close();\n \t\treturn doc;\n \t}", "public void processNER(ArrayList<Sentence> listofSentences,\r\n\t\t\tString path) throws FileNotFoundException {\r\n\r\n\t\tScanner sc = new Scanner(new File(path));\r\n\t\twhile (sc.hasNext()) {\r\n\t\t\tString properNoun = sc.nextLine();\r\n\t\t\tfor (Sentence sentence : listofSentences) {\r\n\t\t\t\tMap<String, Integer> tokenMap = sentence.tokenMap;\r\n\t\t\t\tint index = properNoun.indexOf(\" \");\r\n\t\t\t\tif (index > 0) {\r\n\t\t\t\t\tString[] nameParts = properNoun.split(\" \");\r\n\t\t\t\t\tboolean isPresent = false;\r\n\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\tif (tokenMap.containsKey(name))\r\n\t\t\t\t\t\t\tisPresent = true;\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tisPresent = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isPresent) {\r\n\t\t\t\t\t\tfor (String name : nameParts) {\r\n\t\t\t\t\t\t\tint count = tokenMap.get(name);\r\n\t\t\t\t\t\t\tif (count == 1)\r\n\t\t\t\t\t\t\t\ttokenMap.remove(name);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\ttokenMap.put(name, count - 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttokenMap.put(properNoun, 1);\r\n\t\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (tokenMap.containsKey(properNoun))\r\n\t\t\t\t\tsentence.namedEntities.add(properNoun);\r\n\t\t\t}\r\n\t\t}\r\n\t\tsc.close();\r\n\t}", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void prepDocument() {\n if (body == null) {\n body = document.appendElement(\"body\");\n }\n\n body.attr(\"id\", \"readabilityBody\");\n\n Elements frames = document.getElementsByTag(\"frame\");\n if (frames.size() > 0) {\n LOG.error(\"Frames. Can't deal. Write code later to look at URLs and fetch\");\n impossible = true;\n return;\n }\n\n Elements stylesheets = document.getElementsByTag(\"style\");\n stylesheets.remove();\n stylesheets = document.select(\"link[rel='stylesheet']\");\n stylesheets.remove();\n\n /* Turn all double br's into p's */\n /*\n * Note, this is pretty costly as far as processing goes. Maybe optimize later.\n */\n handlePP();\n handleDoubleBr();\n fontsToSpans();\n }", "public ArrayList<String> traverseFiles(File inputDir, ArrayList<String> Documents2 )\n\t{\n\t\tif (inputDir.isDirectory()) {\n\t\t\t//System.out.println(\"Checking for directory...\");\n\t String[] children = inputDir.list();\n\t for (int i = 0; children != null && i < children.length; i++) {\n\t traverseFiles(new File(inputDir, children[i]), Documents2);\n\t }\n\t }\n\t if (inputDir.isFile()) \n\t \t{ Documents2.add(inputDir.getAbsolutePath());}//change it if needed\n\t \n\t return Documents2;\n\t // System.out.println(Documents.size());\n\t}" ]
[ "0.66651565", "0.6008005", "0.5980577", "0.5942687", "0.59201217", "0.58728766", "0.5756821", "0.5638012", "0.55922246", "0.55742437", "0.5562036", "0.5531538", "0.5516045", "0.5485518", "0.5483437", "0.5466085", "0.54088485", "0.5402842", "0.5402152", "0.53901523", "0.53516096", "0.5306012", "0.52986866", "0.52985513", "0.5296388", "0.5295917", "0.52699393", "0.52596563", "0.5237793", "0.5226422", "0.5223448", "0.5191636", "0.5183096", "0.5181609", "0.5172761", "0.5136726", "0.5133823", "0.5125953", "0.51061857", "0.50943863", "0.50823104", "0.50752187", "0.50751686", "0.5062272", "0.50578046", "0.50473994", "0.5045193", "0.50390846", "0.5036558", "0.5034399", "0.5033581", "0.503031", "0.5020022", "0.5017988", "0.50003535", "0.49998358", "0.49915755", "0.4984007", "0.497211", "0.4969221", "0.49674067", "0.49554572", "0.4944381", "0.493535", "0.49325922", "0.4913159", "0.49091926", "0.49040553", "0.4903807", "0.48948884", "0.4892507", "0.4874603", "0.48628893", "0.48617503", "0.48609385", "0.4857808", "0.48567083", "0.48561653", "0.48550713", "0.48549908", "0.48531675", "0.48525193", "0.4843504", "0.4841583", "0.48394704", "0.48383918", "0.48376638", "0.48291135", "0.4828399", "0.48168498", "0.48067155", "0.4802088", "0.47993588", "0.47868675", "0.47795346", "0.47756535", "0.47721094", "0.47570017", "0.47568908", "0.47556952" ]
0.77441645
0
add items to cart
public ArrayList addToCart(Book book, int quantity){ if(cart == null){ cart = new ArrayList(); Item item = new Item(book, quantity); cart.add(item); } else{ Object items[] = cart.toArray(); boolean find = false; //to check it item already exits for(int i=0;i<items.length;i++){ Item temp = (Item)items[i]; if(temp.getBook().getBook_id()==book.getBook_id()){ temp.setQuant(temp.getQuant()+quantity); find = true; break; } } if(!find){ Item item = new Item(book, quantity); total+=item.getBook().getPrice()*quantity; cart.add(item); } } return cart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "@Override\n\tpublic void addProductToCart(ShoppingCartItem cart_items) {\n\t\tthis.shoppingCartList.add(cart_items);\n\t}", "public void AddtoCart(int id){\n \n itemdb= getBooksById(id);\n int ids = id;\n \n for(Books k:itemdb){ \n System.out.println(\"Quantity :\"+k.quantity); \n if (k.quantity>0){\n newcart.add(ids);\n System.out.println(\"Added to cartitem list with bookid\"+ ids);\n setAfterBuy(ids);\n System.out.println(\"Quantity Updated\");\n setCartitem(newcart);\n System.out.println(\"setCartitem :\"+getCartitem().size());\n System.out.println(\"New cart :\"+newcart.size());\n test.add(k);\n }\n else{\n System.out.println(\"Quantity is not enough !\");\n }\n }\n setBookcart(test);\n }", "@Override\n\tpublic void addItems(Workspace workspace) {\n//\t\tSession currentSession = sessionFactory.getCurrentSession();\n//\t\tfor(Cart_items myCart : workspace.getCartItems()) {\t\n//\t\t\tcurrentSession.save(myCart);\n//\t\t}\n\t}", "public void addItemToCart(Item item) {\n itemList.add(item);\n this.totalTaxes = totalTaxes.add(item.getTaxes());\n this.totalPrices = totalPrices.add(item.getTtcPrice());\n }", "public static void addToCart() {\n List<WebElement> buttonsAddItem = Browser.driver.findElements(ADD_TO_CART_BUTTON);\n buttonsAddItem.get(0).click();\n Browser.driver.navigate().refresh();\n }", "public void addItemsToCart(List<Item> items) {\n this.itemList.addAll(items);\n BigDecimal taxes = items.stream()\n .map(Item::getTaxes)\n .reduce(BigDecimal.ZERO, BigDecimal::add);\n BigDecimal price = items.stream()\n .map(Item::getTtcPrice)\n .reduce(BigDecimal.ZERO, BigDecimal::add);\n this.totalTaxes = totalTaxes.add(taxes);\n this.totalPrices = totalPrices.add(price);\n }", "@Override\n public void addCart(Items cartItem) {\n cartItem.setItemQuantity(cartItem.getItemQuantity() + 1);\n Items menuItem = cartItem.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n updateCartMenu();\n }", "public void addItem(Carryable g) {\r\n if (numItems < MAX_CART_ITEMS)\r\n cart[numItems++] = g;\r\n }", "Cart addToCart(String productCode, Long quantity, String userId);", "@Test\n\tpublic void testAddingItemsToShoppingCart() {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\ttry {\n\t\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), new BigDecimal(1));\n\t\t\tshoppingCartAggregate.addToCart(TestProduct.phoneCase.getProductId(), new BigDecimal(2));\n\t\t} catch (InsufficientStockException e) {\n\t\t\tfail(\"Inventory check failed while adding a product in shopping cart\");\n\t\t}\n\n\t\tPurchaseOrderAggregate purchaseOrderAggregate = shoppingCartAggregate.checkoutCart();\n\t\tassertNotNull(purchaseOrderAggregate);\n\n\t\tPurchaseOrder purchaseOrder = purchaseOrderAggregate.getPurchaseOrder();\n\t\tassertNotNull(purchaseOrder);\n\n\t\tassertEquals(2, purchaseOrder.getOrderItems().size());\n\n\t\tassertEquals(ShoppingCart.CartStatus.CHECKEDOUT, shoppingCartAggregate.getShoppingCart().getCartStatus());\n\t}", "public void onClick(View v)\n {\n // Add to cart model\n for (int i = 0; i < productQuantity; i++)\n {\n dbManager.addToCart(activeProduct.getID());\n }\n }", "@Override\n\tpublic void addItems(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"+++++++++++Add items here+++++++++++\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id, name, price and quantity\n\t\t\tSystem.out.print(\"Enter Item Id: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\tSystem.out.print(\"Enter Item Name without space: \");\n\t\t\tString itemName = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Type without space: \");\n\t\t\tString itemType = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Price: \");\n\t\t\tString itemPrice = scanner.next();\n\n\t\t\tSystem.out.print(\"Enter Item Quantity: \");\n\t\t\tint itemQuantity = scanner.nextInt();\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.addItems(session,itemId,itemName,itemType,itemPrice,itemQuantity);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "@Test\n\tpublic void testAddProductToCart() {\n\t\tdouble startBalance = cart.getBalance();\n\t\tassertEquals(0,startBalance,0.01);\n\t\t\n\t\t\n\t\t\t // 4. CHECK NUM ITEMS IN CART BEFORE ADDING PRODUCT\n\t\t\t // \t\t - PREV NUM ITEMS\n\t\t\n\t\tint StartingNumItems = cart.getItemCount();\n\t\tassertEquals(0,StartingNumItems);\n\t\t\n\t\t\t // 5. ADD THE PRODUCT TO THE CART \n\t\tcart.addItem(phone);\n\t\t\n\t\t\t // 6. CHECK THE UPDATED NUMBER OF ITEMS IN CART \n\t\t\t // \t\t-- EO: NUM ITEMS + 1\n\t\tassertEquals(StartingNumItems + 1, cart.getItemCount());\n\t\t\t // -----------------------\n\t\t\t // 7. CHECK THE UPDATED BALANCE OF THE CART\n\t\t\t // \t\t-- EO: PREVIOUS BALANCE + PRICE OF PRODUCT\n\t\t\n\t\tdouble expectedBalance = startBalance + phone.getPrice();\n\t\t\n\t\tassertEquals(expectedBalance,cart.getBalance(),0.01);\n\t\t\n\t\t\n\t\t\n\t}", "public void addItemInCart(Item anItem, Integer aQuantity,boolean fromServer){\n if(!fromServer){\n postItemOnServer(new Pair<Item, Integer>(anItem,aQuantity));\n }\n boolean alreadyInCart = false;\n for(Pair<Item,Integer> itemInCart : itemsInCart){\n if(itemInCart.first.getId()== anItem.getId()){\n alreadyInCart = true;\n }\n }\n if(alreadyInCart){\n updateItemInCart(anItem,aQuantity,fromServer);\n }\n else{\n itemsInCart.add(Pair.create(anItem, aQuantity));\n }\n }", "public static void addItem(int id,int quantity){\n\t\tif(userCart.containsKey(id)){\n\t\t\tint newQuantity = userCart.get(id).getQuantity() + quantity;\n\t\t\tuserCart.get(id).setQuantity(newQuantity);\n\t\t\tSystem.out.println(CartMessage.ALREADY_ADDED + newQuantity);\n\t\t}\n\t\telse{\n\t\t\tproducts.get(id).setQuantity(quantity);\n\t\t\tuserCart.put(id,products.get(id));\n\t\t\tSystem.out.println(CartMessage.ITEM_ADDED);\n\t\t}\n\t}", "@When(\"^: Add them to the cart$\")\r\n\tpublic void add_them_to_the_cart() throws Throwable {\n\t\tobj.search();\r\n\t}", "public void addToShoppingCart(BarcodedItem item, int quantity) {\n\t\t\n\t\tBarcodedProduct prod = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(item.getBarcode());\n\t\ttry {\n\t\t\t\n\t\t\tSHOPPING_CART_ARRAY[i][0] = prod.getDescription();\n\t\t\tSHOPPING_CART_ARRAY[i][1] = Integer.toString(quantity);\n\t\t\tBARCODEDITEM_ARRAY[i] = item;\n\t\t\tBARCODE_ARRAY[i] = prod.getBarcode();\n\t\t\tupdateTotalPayment(item, quantity);\n\t\t\t\n\t\t\ttotalNumOfItems += quantity;\n\t\t\t\n\t\t} catch (NullPointerException e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\t\t\n\t\ti++;\n\n\t}", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void addToCart(String userId ,ShoppingCartItem item) {\n\t\t PersistenceManager pm = PMF.get().getPersistenceManager();\r\n\t\t Transaction tx = pm.currentTransaction();\r\n\t\t try{\r\n\t\t\ttx.begin();\r\n\t\t\tShoppingCart cartdb = (ShoppingCart)pm.getObjectById(ShoppingCart.class, userId);\r\n\t\t\tcartdb.addItem(item);\r\n\t\t\ttx.commit();\r\n\r\n\t\t }\r\n\t\t catch (JDOCanRetryException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tlogger.warning(\"Error updating cart \"+ item);\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t\tcatch(JDOFatalException fx){\r\n\t\t\tlogger.severe(\"Error updating cart :\"+ item);\r\n\t\t\tthrow fx;\r\n\t\t\t}\r\n\t\t finally{\r\n\t\t\t if (tx.isActive()){\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t }\r\n\t\t\t pm.close();\r\n\t\t }\r\n\t}", "public void addItemsToCart() throws InterruptedException {\n\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver; // using JavascriptExecutor class to scroll down to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// page\n\t\tWebElement TopDeals = driver.findElement(By.xpath(\"/html/body/div[4]/div/div/div[3]/div/h1/span\")); // TopDeals\n\t\t// To avoid staleElementException\n\t\tfor (int i = 0; i <= 2; i++) {\n\t\t\ttry {\n\t\t\t\tjs.executeScript(\"arguments[0].scrollIntoView();\", TopDeals); // scrolling till TopDeals element visible\n\t\t\t\tbreak;\n\t\t\t} catch (Exception e) {\n\n\t\t\t\te.getMessage();\n\t\t\t}\n\t\t}\n\t\t// Adding 1st element to the cart\n\t\tWebElement crownbrocli = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-26487-homepage-collection\\\"]\"));\n\t\tcrownbrocli.click();\n\n\t\tActions actions = new Actions(driver); // now use action class to move cursor to another element so that we can\n\t\t\t\t\t\t\t\t\t\t\t\t// add another element\n\t\t // Adding 2nd Element to the cart\n\t\tWebElement apples = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-25982-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(apples);\n\t\tapples.click();\n\n\t\t// Adding 3rd element to the cart\n\t\tWebElement tomatoes = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-254884-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(tomatoes).click(); // Adding 3rd element to the cart\n\n\n\t\t// Adding 4rd element to the cart\n\t\tWebElement salmonFillet= driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-select-item-weight-22454-homepage-collection\\\"]\"));\n\t\tactions.moveToElement(salmonFillet).click(); \n Select salmonWeight = new Select(salmonFillet); //to choose particular weight use Select Class\n\t\tsalmonWeight.selectByVisibleText(\"0.75 lbs\"); \n\n\t\t/*WebElement ChickenBreast = driver.findElement(\n\t\t\t\tBy.xpath(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\"));\n//(\"//*[@id=\\\"add-to-cart-button-cart-service-add-item-265709-homepage-collection\\\"]\n\t\tactions.moveToElement(ChickenBreast).click(); // Adding 4th element to the cart\n*/\n\t}", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "@Override\n public void onClick(View v)\n {\n Card.addtoCard(new CardItem(content.get(position).getName(),\n content.get(position).getDescription(),\n content.get(position).getPrice(),(long) 1,\"None\",\n content.get(position).getPrice()));\n Toast.makeText(RecycleViewAdapter.this.mContext,\"Added to Cart\",Toast.LENGTH_LONG).show();\n }", "@POST(\"V1/carts/mine/items\")\n Observable<CartProductItem> addItemToCart(@Body CartItemRequest CartItemRequest);", "private void addProductToCart(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productID = request.getParameter(\"ProductID\");\n\n HttpSession session = request.getSession();\n\n List<Product> cartProducts = (List<Product>) session.getAttribute(\"cartProducts\");\n\n if (productID != null) {\n\n int id = Integer.parseInt(productID);\n\n if (cartProducts != null) {\n\n if (getCartSize(cartProducts) < Constants.CART_LIMIT) {\n\n if (!productIsAlreadyInCart(id, cartProducts))\n cartProducts.add(productDAO.getProduct(id));\n else\n increaseProductCountInCart(id, cartProducts);\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n response.sendRedirect(Constants.PATH_CATALOG);\n } else\n response.getWriter().write(notifyCartIsFull());\n\n } else {\n cartProducts = new ArrayList<>();\n cartProducts.add(productDAO.getProduct(Integer.parseInt(productID)));\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n session.setAttribute(\"cartProducts\", cartProducts);\n response.sendRedirect(Constants.PATH_CATALOG);\n }\n }\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "@Test(groups = \"suite2-2\")\n\tpublic void addItemToCart() {\n\t\tdriver = new FirefoxDriver();\n\n\t\tdriver.get(CART_URL);\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\n\t\ttry {\n\t\t\twait.until(ExpectedConditions.presenceOfElementLocated(By\n\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"newempty\\\"]/DIV\")));\n\t\t} catch (NoSuchElementException e) {\n\t\t\tfail(\"Cart should be empty\");\n\t\t}\n\n\t\t// Find the button to do the search inside treasury objects\n\t\tWebElement searchButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/BUTTON[@id=\\\"search_submit\\\"]\")));\n\n\t\t// Find the text input field to do the search\n\t\tWebElement searchField = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"header\\\"]/DIV[@id=\\\"navigation-group\\\"]/FORM[@id=\\\"search-bar\\\"]/DIV/INPUT[@id=\\\"search-query\\\"]\"));\n\t\t// Search key\n\t\tsearchField.sendKeys(\"hat\");\n\n\t\tsearchButton.click();\n\n\t\tWebElement itemToBuy = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[@id=\\\"primary\\\"]/UL/LI[1]/A\")));\n\n\t\titemToBuy.click();\n\n\t\tWebElement addToCartButton = wait\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV/DIV/DIV/DIV[2]/DIV[1]/DIV[2]/DIV[3]/DIV[1]/FORM/SPAN/SPAN/INPUT\")));\n\n\t\taddToCartButton.click();\n\n\t\tWebElement itemInCartMessage = driver\n\t\t\t\t.findElement(By\n\t\t\t\t\t\t.xpath(\"/HTML/BODY/DIV[@id=\\\"content\\\"]/DIV[@id=\\\"primary\\\"]/DIV[@id=\\\"checkout\\\"]/DIV[@id=\\\"checkout-header\\\"]/H1\"));\n\n\t\tassertEquals(itemInCartMessage.getText().trim().substring(0, 1), \"1\",\n\t\t\t\t\"1 item expected in cart\");\n\t}", "public void adding() {\n\t\t By cr=By.xpath(\"//a[@href=\\\"/cart?add&itemId=EST-2\\\"]\"); \r\n\t\tWebElement we_cr=wt.ElementToBeClickable(cr, 20);\r\n\t\twe_cr.click();\r\n\t}", "@PostMapping(\"/addToCart\")\n @PermissionStoreItemRead\n public String addToCart(@RequestParam long id,\n @RequestParam(required = false) int numberOfItems,\n HttpSession session,\n HttpServletRequest request,\n Model model,\n RedirectAttributes redirectAttributes,\n HttpServletRequest httpServletRequest) {\n String previousPage = PageUtilities.getPreviousPageByRequest(httpServletRequest).orElseThrow(() -> new RuntimeException(\"Previous page not found\"));\n ShoppingCart cart = (ShoppingCart) session.getAttribute(\"cart\");\n var item = itemService.findById(id).orElseThrow(() -> new RuntimeException(\"Item not found\"));\n if ( item.getStock() < numberOfItems ||\n item.getStock() < cart.getItemQuantity(item) + numberOfItems) {\n redirectAttributes.addFlashAttribute(\"error\", \"Not enough items\");\n return previousPage;\n //return \"redirect:/item/\" + id + \"/show\";\n }\n cart.addItem(item, numberOfItems);\n redirectAttributes.addFlashAttribute(\"success\", \"Item added to cart successfully\");\n log.debug(\"Total size of cart : \" + cart.numberOfItems());\n //return \"redirect:/item/\" + id + \"/show\";\n return previousPage;\n\n }", "public void addToSale(ItemDTO item, int quantity){\n this.saleInfo.addItem(item, quantity);\n }", "@Override\n public boolean addItemInCart(final String authToken,\n final CartDto cartDto) throws Exception {\n boolean notPreset = false;\n validate(cartDto);\n String userId = getUserIdByToken(authToken);\n Cart cart = new Cart();\n cart.setUserId(userId);\n\n ProductResponse productResponse =\n getProductDetails(cartDto, authToken);\n setPrices(productResponse, cartDto);\n\n CartItem item = transformCartItem(cartDto);\n item.setCart(cart);\n cart.getCartItems().add(item);\n LOG.info(\"[CART] event prepared to be queued on messaging server.\");\n notPreset = true;\n\n try {\n LOG.info(\"[CART] about to save the event in database.\");\n Cart persistCart = cartRepository.save(cart);\n LOG.info(\"Publishing event to Queue [cartQueue].\");\n rabbitTemplate.convertAndSend(RabbitmqCartConfig.EXCHANGE_NAME_CART,\n RabbitmqCartConfig.ROUTING_KEY_CART,\n cart);\n if (persistCart != null) {\n LOG.info(\"Item persisted successfully into the database.\");\n return true;\n } else {\n LOG.info(\"Item could not be saved into the database.\");\n return false;\n }\n } catch (RuntimeException ex) {\n LOG.error(\"Item cannot be added into the cart. \", ex.getMessage());\n throw new RuntimeException(ex.getMessage());\n }\n\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "ResponseEntity<Cart> addCartItem(CartFormData formData);", "public void add(CartItem cartItem){\n\t\tString book_id = cartItem.getBook().getBook_id();\n\t\tint count = cartItem.getCount();\n\t\t// if book exist in cart , change count\n\t\tif(map.containsKey(book_id)){ \n\t\t\tmap.get(book_id).setCount( map.get(book_id).getCount() + count); \n\t\t\t\t\t\n\t\t}else{\n\t\t\t// book not exist in cart, put it to map\n\t\t\tmap.put(cartItem.getBook().getBook_id(), cartItem);\n\t\t}\n\t\t\n\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic boolean addItemToCart(CartDTO cartItem) throws RetailerException, ConnectException {\n\t\t// function variables\n\t\tboolean itemAddedToCart = false;\n\t\tString retailerId = cartItem.getRetailerId();\n\t\tString productId = cartItem.getProductId();\n\t\tint quantity = cartItem.getQuantity();\n\t\t\n\t\t// hibernate access variables\n\t\tSession session = null;\n\t\tSessionFactory sessionFactory = null;\n\t\tTransaction transaction = null;\n\t\t\n\t\ttry {\n\t\t\t// IOException possible\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\t\n\t\t\tsessionFactory = HibernateUtil.getSessionFactory();\n\t\t\tsession = sessionFactory.getCurrentSession();\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t\n\t\t\tQuery query = session.createQuery(HQLQuerryMapper.CART_ITEM_QTY_FOR_PRODUCT_ID);\n\t\t\tquery.setParameter(\"product_id\", productId);\n\t\t List<CartItemEntity> quant = (List<CartItemEntity>) query.list();\n\t\t \n\t\t Query query1 = session.createQuery(HQLQuerryMapper.GET_PRODUCT_QTY_FROM_DB);\n\t\t query1.setParameter(\"product_id\", productId);\n\t\t List<ProductEntity> availableQuants = (List<ProductEntity>) query1.list();\n\t\t \n\t\t if (quant.size() == 0) {\n\t\t \t// the user is adding this product to the cart for the first time\n\t\t\t if (quantity < availableQuants.get(0).getQuantity()) {\n\t\t\t \t// add this item to cart and reduce the quantity in PRODUCT table by quantity amount\n\t\t\t \tCartItemEntity obj = new CartItemEntity (retailerId, productId, quantity);\n\t\t\t \tsession.save(obj);\n\t\t\t \t\n\t\t\t \tQuery query3 = session.createQuery(HQLQuerryMapper. UPDATE_QTY_IN_PRODUCT);\n\t\t\t \tint availableQuantity = availableQuants.get(0).getQuantity();\n\t\t\t \tquery3.setParameter(\"quantity\", availableQuantity );\n\t\t\t \tquery3.setParameter(\"product_id\", productId);\n\t\t\t \tquery3.executeUpdate();\n\t\t\t \tavailableQuantity -= quantity;\n\t\t\t \titemAddedToCart = true;\n\t\t\t } else {\n\t\t\t \t// the requested number of items is not available\n\t\t\t \titemAddedToCart = false;\n\t\t\t \tGoLog.logger.error(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t\t\tthrow new RetailerException(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t }\n\t\t } else {\n\t\t \t// the user has previously added this item to his cart and is trying to increase quantity\n\t\t \tif (quantity < availableQuants.get(0).getQuantity()) {\n\t\t \t\t// add quantity to that already present in the cart and reduce the quantity in PRODUCT table by quantity amount\n\t\t \t\tQuery query4 = session.createQuery(HQLQuerryMapper.UPDATE_CART);\n\t\t \t\tint quantityPresent = quant.get(0).getQuantity();\n\t\t \t\tquery4.setParameter(\"product_id\", productId);\n\t\t \t\tquery4.executeUpdate();\n\t\t \t\tquantityPresent += quantity;\n\t\t \t\t\t \t\t\n\t\t\t \tQuery query3 = session.createQuery(HQLQuerryMapper. UPDATE_QTY_IN_PRODUCT);\n\t\t\t \tint availableQuantity = availableQuants.get(0).getQuantity();\n\t\t\t \tquery3.setParameter(\"quantity\", availableQuantity );\n\t\t\t \tquery3.setParameter(\"product_id\", productId);\n\t\t\t \tquery3.executeUpdate();\n\t\t\t \tavailableQuantity -= quantity;\n\t\t \t\titemAddedToCart = true;\n\t\t \t\t\n\t\t \t} else {\n\t\t \t\t// the requested quantity of items is not available \t\n\t\t \t\titemAddedToCart = false;\n\t\t \t\tGoLog.logger.error(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t\t\t\tthrow new RetailerException(exceptionProps.getProperty(\"prod_not_available\"));\n\t\t \t}\n\t\t }\t\t \n\t\t} catch (IOException e) {\n\t\t\tGoLog.logger.error(e.getMessage());\n\t\t\tthrow new RetailerException (\"Could not open Error Properties File\");\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t}\n\t\treturn itemAddedToCart;\n\t}", "public void Cart() {\r\n\t\tthis.cart.click();\r\n\t}", "public static String handleAddToCart(Request req, Response res) {\n\n int quantity = Integer.parseInt(req.queryParams(\"quantity\"));\n int productId = Integer.parseInt(req.queryParams(\"product_id\"));\n int userId = req.session().attribute(\"user_id\");\n\n Order order = DaoFactory.getOrderDao().findOpenByUserId(userId);\n if (order == null) {\n order = DaoFactory.getOrderDao().createNewOrder(userId);\n }\n\n Product product = DaoFactory.getProductDao().find(productId);\n if (product == null || quantity < 1 || quantity > 99) {\n return \"invalid_params\";\n }\n\n LineItem lineItemToAdd = DaoFactory.getOrderDao().findLineItemInCart(productId, order);\n if (lineItemToAdd == null) {\n\n lineItemToAdd = new LineItem(\n order.getId(),\n productId,\n product.getName(),\n product.getImageFileName(),\n quantity,\n product.getDefaultPrice(),\n product.getDefaultCurrency()\n );\n\n DaoFactory.getOrderDao().addLineItemToCart(lineItemToAdd, order);\n return \"new_item\";\n }\n\n DaoFactory.getOrderDao().increaseLineItemQuantity(order, lineItemToAdd, quantity);\n return \"quantity_change\";\n }", "@Override\n public void onAddToCart(Product product) {\n }", "@Override\n public void onClick(View v) {\n Context context = getContext();\n SharedPreferences mSharedPreference1 = PreferenceManager.getDefaultSharedPreferences(context);\n float fTotal = mSharedPreference1.getFloat(\"CartTotal\", 0);\n fTotal += (float)Integer.parseInt(product.getPrice());\n\n //throwback in\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor mEdit1 = sp.edit();\n mEdit1.putFloat(\"CartTotal\", fTotal);\n mEdit1.commit();\n\n //add to my cart array if item doesn't exist.\n String prodID = Integer.toString(product.getP_id());\n if(!Arrays.asList(myCartArray).contains(prodID)){\n myCartArray.add(prodID);\n saveArray();\n //display dialog saying added to cart successful\n\n Toast.makeText(getActivity(), \"Succesfully added to your cart!\",\n Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getActivity(), \"This lot was already in your cart!\",\n Toast.LENGTH_LONG).show();\n }\n\n }", "public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public Item add(Item item) {\n Item existing = getItem(item.getItemId());\n if (existing != null) {\n return existing.incrementQuantity(item.getQuantity());\n }\n else {\n items.add(item.setCart(this));\n return item;\n }\n }", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "@RequestMapping(\"/addOrderItem\")\n public OrderItem addOrderItem(@RequestParam(\"order_id\")int order_id,\n @RequestParam(\"cart_id\")int cart_id){\n System.out.println(\"addOrderItem\");\n System.out.println(\"cart_id = \" + cart_id);\n return orderService.addOrderItem(order_id, cart_id);\n }", "public void addItem(Product p) throws IOException, ClassNotFoundException {\n SortByName sortByName = new SortByName();\n Collections.sort(cartContents, sortByName.productSearch());\n\n int m = this.getQuantity(p);\n //check if in cart will exceed available amount\n if (p.getAvailableQuantity() > m)\n {\n cartContents.add(p);\n }\n saveCart();\n }", "public void addToCart(String name, Double price , String image , int quantity)\n {\n if(addToCart==1)\n {\n return;\n }\n addToCart = 1;\n noOfItemQuantities = Integer.parseInt(textQuantity.getText().toString());\n\n if(noOfItemQuantities>quantity ) {\n addToCart=2;\n outOfStockText.setText(\"Out of Stock\");\n return;\n }\n double totalPrice = price * noOfItemQuantities;\n\n\n\n\n\n\n final Cart cart= new Cart(name,totalPrice,image,noOfItemQuantities,currentUri.toString());\n\n\n addToFirebase(cart,ItemEntry.TABLE_NAME_CART);\n dataSnapShot(ItemEntry.TABLE_NAME_CART);\n\n ispresent[0]=0;\n\n\n\n\n\n\n\n }", "@RequestMapping(\"/addcart\")\n\tpublic String doAddCart(@RequestParam(\"id\") int id, HttpSession session) {\n\t\tPrice ip = menuService.fetchPrice(id);\n\t\t// add it into a list in session.\n\t\tList<Price> cart = (List<Price>) session.getAttribute(\"cart\");\n\t\tif(cart == null) {\n\t\t\tcart = new ArrayList<>();\n\t\t\tsession.setAttribute(\"cart\", cart);\n\t\t}\n\t\tcart.add(ip);\n\t\tSystem.out.println(cart);\n\t\treturn \"redirect:menu\";\n\t}", "@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}", "public void addOrderLineToOrderInSession(CartItem item, HttpServletRequest request) {\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\tcart.getOrderLines().add(item);\n\t}", "void addToCart(String user, long id) throws MovieNotFoundException;", "void add(Item item);", "public void addItems(int numberOfItems, double pricePerItem) {\n\n\t\ttotalAmountItems = numberOfItems + totalAmountItems;\n\n\t\ttotalCostCart = (numberOfItems * pricePerItem) + totalCostCart;\n\n\t\tavgPricePerItem = totalCostCart / totalAmountItems;\n\n\t}", "@Override\n\tpublic void sendItemToCart(int itemId, int amount) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tString result=\"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.addToCart(clientId, itemId, amount);\n\t\t\t} else {\n\t\t\t\tWebResource addToCartService = service.path(URI_ADDTOCART).path(clientId+\"/\"+itemId+\"/\"+amount);\n\t\t\t\tresult = addToCartService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\t//retrieves the status code\n\t\t\tStatusMessageObject status = XMLParser.parseStatusMessage(result);\n\t\t\tgui.setStatus(status.getMessage());\n\t\t\t\n\t\t\t//successful status code > 0, get shopping cart from server\n\t\t\tif (status.getStatusCode() > 0){\n\t\t\t\tsendCartRequest();\n\t\t\t}\n\t\t\t//update item list\n\t\t\tsendItemListRequest();\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){ \n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n AddingToCartList();\n }", "public void updateShoppingCart(ShoppingCart cart) {\n\t\t PersistenceManager pm = PMF.get().getPersistenceManager();\r\n\t\t Transaction tx = pm.currentTransaction();\r\n\t\t try{\r\n\t\t\ttx.begin();\r\n\t\t\tShoppingCart cartdb = (ShoppingCart)pm.getObjectById(ShoppingCart.class, cart.getUserId());\r\n\t\t\tcartdb.addItems(cart.getItems());\r\n\t\t\tcartdb.retainItems(cart.getItems());\r\n\t\t\ttx.commit();\r\n\r\n\t\t }\r\n\t\t catch (JDOCanRetryException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t\tlogger.warning(\"Error updating cart \"+ cart);\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t\tcatch(JDOFatalException fx){\r\n\t\t\tlogger.severe(\"Error updating cart :\"+ cart);\r\n\t\t\tthrow fx;\r\n\t\t\t}\r\n\t\t finally{\r\n\t\t\t if (tx.isActive()){\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t }\r\n\t\t\t pm.close();\r\n\t\t }\r\n\t}", "public void addToCart_process(View v) {\n\n addToCart_flag = true;\n // create string\n create_final_string_product();\n // function show message\n ToastMessage();\n // clear all data after adding product into cart\n clear_data();\n }", "@Override\n public String addToCart(TicketDTO buy) throws InvalidQuantityException, ProductNotFoundException {\n\n return catalogueRepository.addToCart(buy);\n }", "public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }", "@Test\n public void addToCart() throws Exception {\n\n ReadableProducts product = super.readyToWorkProduct(\"addToCart\");\n assertNotNull(product);\n\n PersistableShoppingCartItem cartItem = new PersistableShoppingCartItem();\n cartItem.setProduct(product.getId());\n cartItem.setQuantity(1);\n\n final HttpEntity<PersistableShoppingCartItem> cartEntity =\n new HttpEntity<>(cartItem, getHeader());\n final ResponseEntity<ReadableShoppingCart> response =\n testRestTemplate.postForEntity(\n String.format(\"/api/v1/cart/\"), cartEntity, ReadableShoppingCart.class);\n\n // assertNotNull(response);\n // assertThat(response.getStatusCode(), is(CREATED));\n\n }", "public void addBasketItem(BasketItem newItem) {\n \n // If the sku already exists in the basket then update the quantity\n for(BasketItem item : basketItems) {\n if(item.getVariant().getSku().equals(newItem.getVariant().getSku())) {\n item.setQuantity(newItem.getQuantity() + item.getQuantity());\n return;\n }\n }\n \n // If the sku wasn't found above then add it to the basket\n basketItems.add(newItem);\n }", "CatalogItem addCatalogItem(CatalogItem catalogItem);", "@Override\n public void addMenu(Items cartItemToBeAdded) {\n Items menuItem = cartItemToBeAdded.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n mCartAdapter.addToCart(cartItemToBeAdded);\n updateCartMenu();\n }", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void addToShoppingCart(PLUCodedItem pluCodedItem, int quantity) {\n\t\tPLUCodedProduct pluProd = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode());\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tSHOPPING_CART_ARRAY[i][0] = pluProd.getDescription();\n\t\t\tSHOPPING_CART_ARRAY[i][1] = Integer.toString(quantity);\n\t\t\tPLUCODEDITEM_ARRAY[i] = pluCodedItem;\n\t\t\tupdateTotalPayment(pluCodedItem, quantity);\n\t\t\t\n\t\t\ttotalNumOfItems += quantity;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new SimulationException(e);\n\t\t}\n\t\t\n\t\ti++;\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tint tempPosition = 0;\n\t\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlistener.clickAddQuantities(tempPosition,\n\t\t\t\t\t\t\tarrCart.get(tempPosition));\n\t\t\t\t}", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "@RequestMapping(path=\"/shoppingCart/addToCart\", method=RequestMethod.POST)\n\tpublic String addToCart(@RequestParam(\"id\") Long id, @RequestParam(\"quantity\") Integer quantity, HttpSession session) {\n\t\tProduct selectedProduct = productDao.getProductById(id);\n\t\t\n\t\tMap<Product, Integer> shoppingCart = new HashMap<>();\n\t\t\n\t\tif(session.getAttribute(\"shoppingCart\") != null) {\n\t\t\tshoppingCart = (Map<Product, Integer>)session.getAttribute(\"shoppingCart\");\n\t\t} else {\n\t\t\tshoppingCart = new HashMap<>();\n\t\t}\n\t\t\n\t\tif(shoppingCart.containsKey(selectedProduct)) {\n\t\t\tint cartQuantity = shoppingCart.get(selectedProduct);\n\t\t\tcartQuantity += quantity;\n\t\t\tshoppingCart.put(selectedProduct, cartQuantity);\n\t\t} else {\n\t\t\tshoppingCart.put(selectedProduct, quantity);\n\t\t}\n\t\t\n\t\tsession.setAttribute(\"shoppingCart\", shoppingCart);\n\t\t\n\t\treturn \"redirect:/shoppingCart/view\";\n\t}", "@PostMapping(\"/add\")\n public String addToCart(@RequestHeader(\"Authorization\") String authorizationToken,@RequestParam Integer userId,@RequestParam Integer productId,@RequestParam Integer quantity){\n \tProductDTO pDTO = productMS.getProductById(authorizationToken,productId);\n \t CartDTO cartDTO = new CartDTO();\n \tBeanUtils.copyProperties(pDTO,cartDTO);\n \tcartDTO.setUserId(userId);\n \tcartDTO.setQuantity(quantity);\n return cartService.addToCart(cartDTO);\n }", "public void addCart(String shopName, String productName, String Price,String user_ID) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_SHOPNAME,shopName ); // Name\n values.put(KEY_PRODUCTNAME, productName); // Email\n values.put(KEY_PRICE, Price); // Email\n values.put(KEY_USERID, user_ID);\n\n\n // Inserting Row\n long id = db.insert(TABLE_CART, null, values);\n db.close(); // Closing database connection\n\n Log.d(TAG, \"New cart inserted into sqlite: \" + id);\n }", "public void addItemQty(int itemQty) {\n this.itemQty += itemQty;\n }", "public void addChildToShoppingCart() {\n System.out.println(this.offerTable.getSelectionModel().getSelectedItem());\n // TODO [assignment_final] pridani aktualniho vyberu do kosiku\n // - pri pridani prvku do kosiku aktualizuji hodnotu \"budgetu\" v UI\n }", "@Override\n public void addShopcart(int uid) {\n int maxScid;\n if(shopcartsDao.getMaxScid()==null){\n maxScid = 0;\n }\n else{\n maxScid = shopcartsDao.getMaxScid();\n }\n Shopcarts shopcarts = new Shopcarts();\n shopcarts.setScid(maxScid+1);\n shopcarts.setUid(uid);\n shopcartsDao.addShopcarts(shopcarts);\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "public void AddToCartListPage(String Item){\r\n\t\tString Addtocartlistitem = getValue(Item);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Addtocartlist should be Added\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"BylnkFavListAddToCart\"));\r\n\t\t\tclickObjectByMatchingPropertyValue(locator_split(\"BylnkFavListAddToCart\"),propId,Addtocartlistitem);\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"Addtocartlist is Added.\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Addtocartlist is Added\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Addtocartlist is not Added\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"BylnkFavListAddToCart\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tint tempPosition = 0;\n\t\t\t\tfor (ItemCart btem : arrCart) {\n\t\t\t\t\tif (btem.getItem().getId().equals(item.getId())) {\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttempPosition++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlistener.clickAddButton(tempPosition, item);\n\t\t\t}", "public void addItemToSale(String productId, int quantity) {\r\n if (productId.isEmpty()) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id is missing - enter valid product id\");\r\n System.exit(1);\r\n }\r\n if (quantity <= 0) {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"quantity is less than or equal to 0 - enter valid quantity\");\r\n System.exit(1);\r\n }\r\n FakeDatabase db = new FakeDatabase();\r\n Product product = db.findProduct(productId);\r\n\r\n if (product != null) { //product found in database\r\n receipt.addLineItem(product, quantity);\r\n } else {\r\n System.out.println(\"Class CashRegister, method addItemToSale\");\r\n System.out.println(\"product id not found in database - enter valid product id\");\r\n System.exit(1);\r\n }\r\n }", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void add(WebSite website, int nProductID, int nQuantity) {\r\n\t\tfor (int i = 0; i < orderedItems.size(); i++) {\r\n\t\t\tOrderedItem oi = (OrderedItem) orderedItems.elementAt(i);\r\n\t\t\tif (oi.nProductID == nProductID) {\r\n\t\t\t\toi.nQuantity += nQuantity;\r\n\t\t\t\tcalculate(website);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tOrderedItem oi = new OrderedItem();\r\n\t\toi.nProductID = nProductID;\r\n\t\toi.nQuantity = nQuantity;\r\n\t\tProduct product = website.products.get(nProductID);\r\n\t\toi.dblPrice = product.dblPrice;\r\n\t\toi.dblCost = product.dblCost;\r\n\t\torderedItems.addElement(oi);\r\n\r\n\t\tcalculateCart(website);\r\n\t}", "public void buyItem() {\n List<Gnome> cart = user.getCart();\n String message = \"\";\n List<Gnome> bought = shopFacade.buyGnomes(cart);\n if (!bought.isEmpty()) {\n message = bought.size() + \" items bought\";\n } else {\n message = \"Could not buy any items\";\n }\n userFacade.assignBought(user, bought);\n user.getCart().removeAll(bought);\n cart.removeAll(bought);\n userFacade.setCartToUser(user.getUsername(), cart);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Gnomes\", message);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n }", "public void clickAddTopping(int itemIndex, ItemCart item);", "void addGroceryItem(String item) {\n\n\t}", "public void addEntry(String itemName, double itemPrice, boolean addToCart, double itemQuantity) {\n ItemEntry entry = new ItemEntry(itemName, itemPrice, addToCart, itemQuantity);\n itemList.add(entry);\n }", "@Test\r\n\tvoid testaddProductToCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tassertEquals(1,l.size());\r\n\t}", "public void addCartItem(long userId, long menuItemId)\n\t{\n\t\tcartDTORepository.addItemToCart(userId,menuItemId);\n\t\t\n\t}", "@Override\n public void insertIntoAuthBooks(long cartid, long itemid) {\n wishListRepository.insertIntoAuthBooks(cartid, itemid);\n\n }", "public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }", "@Then(\"the product is added to my cart\")\n\t\tpublic void the_product_is_added_to_my_cart() throws Exception {\n\n\t\t\t//Waits for the cart page to load\n\t\t\tdriver.manage().timeouts().implicitlyWait(120, TimeUnit.SECONDS);\n\t\t\tcartElement = driver.findElement(By.xpath(itemSacola)).getText();\n\t\t\t\n\t\t\t//Verify that the product on the shopping cart is the correct one\n\t\t\tAssert.assertEquals(cartElement, TituloFinal);\n\n\t\t\t// Take snapshot as evidence\n\t\t\tFunctions.takeSnapShot(driver, null);\n\t\t}", "public void addItem(Product product, int quantity) {\n\t\t// search the Cartline list for the product\n\t\tfor (CartLine cartLine : getCartLineList()) {\n\t\t\t// check if product in cartline matches the product that we looking for\n\t\t\tif (cartLine.getProduct().equals(product)) {\n\t\t\t\tcartLine.setQuantity(quantity + cartLine.getQuantity());\n\t\t\t\treturn;\t//we found the product, exit the loop and the method\n\t\t\t}\n\t\t}\n\t\t//no cartline is found with the product so add new cart line \n\t\tcartLineList.add(new CartLine(product, quantity));\n\t}", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", "public void setArrayListOfItemsInShoppingCart(WebElement element) {\n UtilityHelper.moveToViewElement(element);\n String name = UtilityHelper.elementGetText(element.findElement(By.xpath(\".//*[@class='mjr-product-name']\")));\n addNameToShoppingCartPgeArrayList(name);\n }", "public void adicionar(ItemProduto item) {\n\t\titens.add(item);\n\t}", "@GetMapping(\"/add/{id}\")\r\n\tpublic String add(@PathVariable(\"id\") int theId, HttpSession theSession, Model theModel,\r\n\t\t\t@RequestParam(value = \"cartPage\", required = false) String cartPage) {\r\n\r\n\t\tProduct theProduct = prodRepo.getOne(theId);\r\n\r\n\t\t/*\r\n\t\t * Check the session whether it exists or not if not setted, then add the\r\n\t\t * product and set the session.\r\n\t\t */\r\n\t\tif (theSession.getAttribute(\"cart\") == null) {\r\n\r\n\t\t\tHashMap<Integer, Cart> cart = new HashMap<>();\r\n\t\t\tcart.put(theId, new Cart(theId, theProduct.getName(), theProduct.getPrice(), 1, theProduct.getImage()));\r\n\t\t\ttheSession.setAttribute(\"cart\", cart);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t/*\r\n\t\t\t * get the session first, if the same product is added again, dont add rather\r\n\t\t\t * increase the quantity. if not, simply add the product to the cart and set the\r\n\t\t\t * session.\r\n\t\t\t */\r\n\t\t\tHashMap<Integer, Cart> cart = (HashMap<Integer, Cart>) theSession.getAttribute(\"cart\");\r\n\r\n\t\t\tif (cart.containsKey(theId)) {\r\n\r\n\t\t\t\tint qty = cart.get(theId).getQuantity();\r\n\t\t\t\tcart.put(theId,\r\n\t\t\t\t\t\tnew Cart(theId, theProduct.getName(), theProduct.getPrice(), ++qty, theProduct.getImage()));\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tcart.put(theId, new Cart(theId, theProduct.getName(), theProduct.getPrice(), 1, theProduct.getImage()));\r\n\t\t\t\ttheSession.setAttribute(\"cart\", cart);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tHashMap<Integer, Cart> cart = (HashMap<Integer, Cart>) theSession.getAttribute(\"cart\");\r\n\r\n\t\tint size = 0;\r\n\t\tdouble total = 0;\r\n\r\n\t\tfor (Cart value : cart.values()) {\r\n\t\t\tsize += value.getQuantity();\r\n\t\t\ttotal += value.getQuantity() * Double.parseDouble(value.getPrice());\r\n\t\t}\r\n\r\n\t\ttheModel.addAttribute(\"size\", size);\r\n\t\ttheModel.addAttribute(\"total\", total);\r\n\r\n\t\tif (cartPage != null) {\r\n\r\n\t\t\treturn \"redirect:/cart/view\";\r\n\r\n\t\t}\r\n\t\treturn \"cart_view\";\r\n\r\n\t}", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "public void addPoItems(List<ShoppingCartItemBean> items, int pid) throws Exception {\n String query = \"INSERT INTO POItem (id, bid, price, quantity) VALUES (?,?,?,?)\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n for (ShoppingCartItemBean item : items) {\n p.setInt(1, pid);\n p.setString(2, item.getBook().getBid());\n p.setInt(3, item.getPrice());\n p.setInt(4, item.getQuantity());\n p.addBatch();\n }\n p.executeBatch();\n p.close();\n con.close();\n }\n }", "@Override\n\tpublic boolean addCart(Cart cart) {\n\t\treturn cartRepository.save(cart)==cart;\n\t}", "void addCpItem(ICpItem item);", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "public void addItem(Product p) {\n\t\t_items.add(p);\n\t}" ]
[ "0.8433316", "0.7698793", "0.75051606", "0.74309486", "0.74244606", "0.7408009", "0.7386124", "0.73443645", "0.72208035", "0.71719116", "0.7076262", "0.7064646", "0.70563483", "0.70442736", "0.7008556", "0.70022166", "0.69827795", "0.6953336", "0.69278497", "0.69267315", "0.68798023", "0.6847847", "0.6822717", "0.6816133", "0.68131936", "0.6807377", "0.67653316", "0.67558295", "0.6727549", "0.6722316", "0.67164403", "0.67044204", "0.66963", "0.6692773", "0.6689292", "0.6671371", "0.6670524", "0.6647518", "0.6630854", "0.66187185", "0.660898", "0.6607058", "0.6589868", "0.6584002", "0.65578514", "0.65561074", "0.6553587", "0.65421224", "0.6534493", "0.6526063", "0.6519669", "0.65077645", "0.64996046", "0.64796233", "0.6478544", "0.6478523", "0.6458583", "0.64578176", "0.6440969", "0.6421243", "0.6416991", "0.6408976", "0.63973", "0.6395665", "0.63939726", "0.63911074", "0.6386954", "0.63858044", "0.63766956", "0.6374072", "0.6366037", "0.6355675", "0.6343698", "0.6340318", "0.63130766", "0.63088274", "0.63030523", "0.6275432", "0.6261934", "0.6251305", "0.6239674", "0.6236749", "0.6233843", "0.6230782", "0.62184423", "0.621508", "0.6213763", "0.6209453", "0.6205849", "0.62013733", "0.6194099", "0.61914515", "0.6178144", "0.61720794", "0.6163729", "0.6163123", "0.6161004", "0.6151901", "0.6148169", "0.6144267" ]
0.63496953
72
We create model class for Comparator because it has INVOKEDYNAMIC
public interface Comparator { default int compare(Object a, Object b) { FeatureExpr ctx = Contexts.model_java_util_Comparator_compare; V<?> compareResult = compare__Ljava_lang_Object_Ljava_lang_Object__I(V.one(ctx, a), V.one(ctx, b), ctx); V<?> selected = compareResult.select(ctx); assert selected.getOne() instanceof java.lang.Integer : "compare returns non-Integer"; return ((java.lang.Integer) selected.getOne()); } V<?> compare__Ljava_lang_Object_Ljava_lang_Object__I(V a, V b, FeatureExpr fe); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected BaseComparator() {}", "private SimplexComparator() {}", "public abstract BoundCodeDt<?> getComparatorElement();", "Comparison createComparison();", "Comparison createComparison();", "protected Comparator getNameComparator()\n {\n if(nameComparator == null)\n {\n nameComparator = new SMComponentNameComparator();\n }\n\n return nameComparator;\n }", "public PriceComparator()\n\t{\n\t\tascending=true;\n\t}", "private static Comparator<Person> comparator(CrudFilter filter) {\n return filter.getSortOrders().entrySet().stream()\n .map(sortClause -> {\n try {\n Comparator<Person> comparator\n = Comparator.comparing(person ->\n (Comparable) valueOf(sortClause.getKey(), person));\n\n if (sortClause.getValue() == SortDirection.DESCENDING) {\n comparator = comparator.reversed();\n }\n\n return comparator;\n } catch (Exception ex) {\n return (Comparator<Person>) (o1, o2) -> 0;\n }\n })\n .reduce(Comparator::thenComparing)\n .orElse((o1, o2) -> 0);\n }", "@Transient\n\tpublic static Comparator<Requerimiento> getComparator(){\n\t\treturn new Comparator<Requerimiento>(){\n\t\t\tpublic int compare(Requerimiento requer1, Requerimiento requer2) {\n\t\t\t\treturn requer1.getIdRequerimiento().compareTo(requer2.getIdRequerimiento());\n\t\t\t}\n\t\t};\n\t}", "public SoilTypeComparator() {\n\t\tthis.descending = true;\n\t}", "Comparator<O> getObjectComparator();", "private IdentifiableComparator() {\n\t\t// This class is not intended to create own objects from it.\n\t}", "protected Comparator<?> getInitialSortOrderComparator() {\n MetaData md = PmTableImpl.this.getOwnMetaDataWithoutPmInitCall();\n return (md.initialBeanSortComparatorClass != null)\n ? (Comparator<?>)ClassUtil.newInstance(md.initialBeanSortComparatorClass)\n : null;\n }", "public DoComparator()\n {\n this(true, false, false);\n }", "public interface ModelProvider <T> {\n\n public Comparator<T> getComparator(T obj);\n\n public T[] getElements();\n\n}", "public compare(){\r\n }", "@Test\n public void testCreateComparatorByName() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByName(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByName(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }", "public PeerGroupAdvComparator() {\n }", "public DefaultJavaElementComparator() {\n // initialize default categories\n this.categories = new int[] { // static type\n 1, // static field\n 2, // static initializer\n 3, // static method\n 7, // type\n 6, // field\n 4, // initializer\n 5, // constructor\n 8, // method\n 9 };\n this.collator = Collator.getInstance();\n }", "private Comparator<Node> getComparator() {\n class QueueCompare implements Comparator<Node> {\n @Override\n public int compare(Node o1, Node o2) {\n if (o1.manPrior > o2.manPrior) return 1;\n else if (o1.manPrior < o2.manPrior) return -1;\n else if (o1.hamPrior > o2.hamPrior) return 1;\n else if (o1.hamPrior < o2.hamPrior) return -1;\n else if (o1.manPrior - o1.movesToBoard > o2.manPrior - o2.movesToBoard) return 1;\n else if (o1.manPrior - o1.movesToBoard < o2.manPrior - o2.movesToBoard) return -1;\n else if (o1.hamPrior - o1.movesToBoard > o2.hamPrior - o2.movesToBoard) return 1;\n else if (o1.hamPrior - o1.movesToBoard < o2.hamPrior - o2.movesToBoard) return -1;\n return 1;\n }\n }\n return new QueueCompare();\n }", "public Comparator<? super K> comparator() {\n/* 102 */ return null;\n/* */ }", "public CollectionComparator(Method attributeCaller, boolean descending)\n\t{\n\t\tthis.attributeCaller = attributeCaller;\n\t\tthis.descending = descending;\n\t}", "public static Comparator method_1283(Comparator var0) {\n return new class_39(var0);\n }", "@Override\n\t\t\tpublic Comparator<HidenMachines> getComparator() {\n\t\t\t\treturn new Comparator<HidenMachines>(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(HidenMachines machine1,\n\t\t\t\t\t\t\tHidenMachines machine2) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\treturn machine1.no-machine2.no;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "private Comparison() {\n }", "protected abstract Comparison getInstance();", "@Override\n public Comparator<? super E> comparator() {\n return comparator;\n }", "Comparator<? super K> comparator();", "protected abstract Comparator<UsageInfo> makeUsageInfoComparator();", "@Override\n\t\t\tpublic Comparator<SkillMachines> getComparator() {\n\t\t\t\treturn new Comparator<SkillMachines>(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(SkillMachines machine1,\n\t\t\t\t\t\t\tSkillMachines machine2) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\treturn machine1.no-machine2.no;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "private Comparator<Integer> getIntegerComparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer integer1, Integer integer2) {\n return integer1 - integer2;\n }\n };\n }", "public static Comparator method_1285(Comparator var0) {\n if (var0 == null) {\n var0 = field_713;\n }\n\n return new class_42(var0, false);\n }", "private static Constructor findComparatorConstructor(Class cls) {\n try {\n return cls.getConstructor(new Class[] { Comparator.class });\n } catch (NoSuchMethodException nsme) {\n return null;\n } catch (Exception e) {\n throw new GeneralException(e);\n }\n }", "public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(null,new Integer(1)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(new Integer(1),null) );\n }", "@Override\n public <U extends Comparable<? super U>> Comparator<Object> thenComparing(final Function<?, ? extends U> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21)\n // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1793)\n // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1790)\n // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21)\n // at com.strobel.assembler.metadata.MetadataHelper.getLowerBound(MetadataHelper.java:1240)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2278)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2222)\n // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2256)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2233)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2246)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2222)\n // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper.adapt(MetadataHelper.java:1312)\n // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2708)\n // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2692)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visitParameterizedType(DefaultTypeVisitor.java:65)\n // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper.asSubType(MetadataHelper.java:720)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:926)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:770)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:766)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2515)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "default EqualityComparator<? super E> getComparator() {\n // Most implementations do not support custom equality comparators,\n // and just use the equals() and hashCode() implementations of the objects by default.\n return EqualityComparator.getDefault();\n }", "public static Comparator<VisualizarEncontroDTO> comparator() {\r\n\t\t\r\n\t\treturn (d1,d2) -> d1.dataInicio.compareTo(d2.dataInicio);\r\n\t}", "public static Comparator method_1286(Comparator var0) {\n if (var0 == null) {\n var0 = field_713;\n }\n\n return new class_42(var0, true);\n }", "public DefaultJavaElementComparator(int staticTypeCategory, int staticFieldCategory, int staticInitializerCategory, int staticMethodCategory, int typeCategory, int fieldCategory, int initializerCategory, int constructorCategory, int methodCategory) {\n this.categories = new int[] { staticTypeCategory, staticFieldCategory, staticInitializerCategory, staticMethodCategory, typeCategory, fieldCategory, initializerCategory, constructorCategory, methodCategory };\n this.collator = Collator.getInstance();\n }", "public PriceComparator(boolean asc)\n\t{\n\t\tascending=asc;\n\t}", "@Override\n\t\t\tpublic Comparator<HidenMachines> getComparator() {\n\t\t\t\treturn new Comparator<HidenMachines>(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(HidenMachines machine1,\n\t\t\t\t\t\t\tHidenMachines machine2) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\treturn machine1.name.compareTo(machine2.name);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public interface Comparator extends ComparisonConstants {\n public int compare(Object a, Object b);\n}", "public static Comparator method_1280() {\n return field_713;\n }", "@Override\n public <U> Comparator<Object> thenComparing(final Function<?, ? extends U> p0, final Comparator<? super U> p1) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21)\n // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1793)\n // at com.strobel.assembler.metadata.MetadataHelper$5.visitWildcard(MetadataHelper.java:1790)\n // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:21)\n // at com.strobel.assembler.metadata.MetadataHelper.getLowerBound(MetadataHelper.java:1240)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2278)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitWildcard(MetadataHelper.java:2222)\n // at com.strobel.assembler.metadata.WildcardType.accept(WildcardType.java:83)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2256)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.adaptRecursive(MetadataHelper.java:2233)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2246)\n // at com.strobel.assembler.metadata.MetadataHelper$Adapter.visitParameterizedType(MetadataHelper.java:2222)\n // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper.adapt(MetadataHelper.java:1312)\n // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2708)\n // at com.strobel.assembler.metadata.MetadataHelper$11.visitClassType(MetadataHelper.java:2692)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visitParameterizedType(DefaultTypeVisitor.java:65)\n // at com.strobel.assembler.metadata.CoreMetadataFactory$UnresolvedGenericType.accept(CoreMetadataFactory.java:653)\n // at com.strobel.assembler.metadata.DefaultTypeVisitor.visit(DefaultTypeVisitor.java:25)\n // at com.strobel.assembler.metadata.MetadataHelper.asSubType(MetadataHelper.java:720)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:926)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:770)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:766)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2515)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public ComparatorExample(){\r\n\t\tcontrolPanel.add(addPerson);\r\n\t\tcontrolPanel.add(removePerson);\r\n\t\tcontrolPanel.add(new AntiAliasJLabel(\"sort by:\"));\r\n\t\tcontrolPanel.add(columnSelect);\r\n\t\tcontrolPanel.add(new AntiAliasJLabel(\"order:\"));\r\n\t\tcontrolPanel.add(sortOrder);\r\n\t\tcontrolPanel.add(sort);\r\n\t\t// make the buttons execute methods in the class when clicked\r\n\t\taddPerson.addActionListener(new ActionListener(){\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \taddPerson();\r\n\t\t }\r\n\t\t});\r\n\t\tremovePerson.addActionListener(new ActionListener(){\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tremovePerson();\r\n\t\t }\r\n\t\t});\r\n\t\tsort.addActionListener(new ActionListener(){\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t \tsort();\r\n\t\t }\r\n\t\t});\r\n\t\t\r\n\t\tdataTable = new JTable(personTableModel);\r\n\t\t// sets a specific renderer for JButtons, which is what is used to display the colored Color cells\r\n\t\tTableCellRenderer defaultRenderer = dataTable.getDefaultRenderer(JButton.class);\r\n\t\tdataTable.setDefaultRenderer(JButton.class,new ExtendedTableRenderer(defaultRenderer));\r\n\t\t// add the pass-through table-to-underlying-buttons listener, which is in\r\n\t\t// ExtendedTableRender.java\r\n\t\tdataTable.addMouseListener(new JTableButtonMouseListener(dataTable));\r\n\t\t// make all the string fields wider, so there's less overlap\r\n\t\tfor (int i=0;i<Person.NUM_FIELDS;i++){\r\n\t\t\tif (i == Person.COL_COLOR)\r\n\t\t\t\tcontinue;\r\n\t\t\tdataTable.getColumnModel().getColumn(i).setPreferredWidth(COLUMN_WIDTH);\r\n\t\t}\r\n\t\t//loads the example people directly so we have something to sort from the getgo\r\n\t\tloadExamplePeople();\r\n\t\t// makes the table scrollable, in case we overflow\r\n\t\tscrollPane = new JScrollPane(dataTable);\r\n\t\t// use an easy-to-use/understand layoutmanager known as borderlayout\r\n\t mainFrame.setLayout(new BorderLayout());\r\n\t\tmainFrame.add(controlPanel,BorderLayout.NORTH);\r\n\t\tmainFrame.add(scrollPane,BorderLayout.CENTER);\r\n\t\ttry{\r\n\t\t\t// make the GUI look like the operating system that it is being run on\r\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n\t\t\tSwingUtilities.updateComponentTreeUI(ccDialog);\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tmainFrame.setSize(800,500);\r\n\t\t// actually close the dialog and the frame when a close command is entered\r\n\t\t// prevents large programs from persisting in memory\r\n\t\tccDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\r\n\t\tmainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tmainFrame.setVisible(true);\r\n\t\t//\t\tmainFrame.pack();\r\n\t}", "public static Comparator method_1287(Comparator var0, class_21 var1) {\n if (var0 == null) {\n var0 = field_713;\n }\n\n return new class_40(var1, var0);\n }", "@Test\n public void testCreateComparatorByBalance() {\n System.out.println(\"createComparatorByName\");\n // in decreasing order\n boolean increasing = false;\n BankAccount instance = new BankAccount(\"Kelly\", 99.99);\n BankAccount instance2 = new BankAccount(\"Nelly\", 199.99);\n int result = BankAccount.createComparatorByBalance(increasing).compare(instance, instance2);\n assertTrue(result > 0);\n int result2 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result2 < 0);\n // in increasing order\n increasing = true;\n int result3 = BankAccount.createComparatorByBalance(increasing).compare(instance2, instance);\n assertTrue(result3 > 0);\n }", "public static JwComparator<AcWebServiceRequestData> getDataComparator()\n {\n return AcWebServiceRequestDataTools.instance.getDataComparator();\n }", "public static SimplexComparator getInstance() {\n\t\treturn instance;\n\t}", "private Sort() { }", "protected Comparator<PhysicalMachine> makeDecreasingPhysicalMachineComparator() {\n return new Comparator<PhysicalMachine>() {\n Comparator<Machine> cap_comp = makeDecreasingMachineComparator();\n public int compare(PhysicalMachine m0, PhysicalMachine m1) {\n int diff = cap_comp.compare(m0, m1);\n if (diff == 0) {\n diff = m0.getID() - m1.getID();\n }\n return diff;\n }\n };\n }", "public interface Comparator<Item>{\n\tpublic int compare(Item a, Item b);\n}", "public static JwComparator<AcCustodySummaryVo> getHashKeyComparator()\n {\n return AcCustodySummaryVoTools.instance.getHashKeyComparator();\n }", "protected Comparator<VirtualMachine> makeDecreasingVirtualMachineComparator() {\n return new Comparator<VirtualMachine>() {\n Comparator<Machine> cap_comp = makeDecreasingMachineComparator();\n public int compare(VirtualMachine m0, VirtualMachine m1) {\n int diff = cap_comp.compare(m0, m1);\n if (diff == 0) {\n diff = m0.getJobID() - m1.getJobID();\n if (diff == 0) {\n diff = m0.getIndex() - m1.getIndex();\n }\n }\n return diff;\n }\n };\n }", "protected abstract Comparator<T> getFallbackComparator();", "public static Comparator BytewiseComparator() {\n\t\treturn new BytewiseComparatorImpl();\n\t}", "@Test\n public void allImplementorsOfComparatorMustNotContainFields() throws Exception {\n Freud.iterateOver(Class.class).\n assertThat(no(subTypeOf(Comparator.class)).or(no(withFields()))).\n in(classOf(asList(\"examples.classobject.StatelessComparator\"))).analyse(listener);\n }", "public Comparator<? super P> comparator();", "public Comparator<Target> getComparator() {\n return new DependencyComparator(flatDependencies);\n }", "static public java.lang.String genComparisons (org.apache.spark.sql.catalyst.expressions.codegen.CodegenContext ctx, scala.collection.Seq<org.apache.spark.sql.catalyst.expressions.SortOrder> ordering) { throw new RuntimeException(); }", "private Comparator<Machine> makeDecreasingMachineComparator() {\n return new Comparator<Machine>() {\n public int compare(Machine m0, Machine m1) {\n BigInteger diff = m1.getCPU().subtract(m0.getCPU());\n if (diff.equals(BigInteger.ZERO)) {\n diff = m1.getMemory().subtract(m0.getMemory());\n }\n return diff.intValue();\n }\n };\n }", "@Override\n\tpublic Comparator<? super K> comparator() {\n\t\treturn null;\n\t}", "public Comparator<Integer> createIntegerComparator() {\n \n return (Integer i1, Integer i2) -> ( i1.intValue() - i2.intValue());\n }", "public HashMapValueComparator() {\n\t\tsuper();\n\t}", "@Override\n public Comparator<Object> thenComparing(final Comparator<?> p0) {\n // This method could not be decompiled.\n // \n // Could not show original bytecode, likely due to the same error.\n // \n // The error that occurred was:\n // \n // java.lang.NullPointerException\n // at com.strobel.assembler.metadata.WildcardType.containsGenericParameters(WildcardType.java:55)\n // at com.strobel.assembler.metadata.TypeReference.containsGenericParameters(TypeReference.java:48)\n // at com.strobel.assembler.metadata.MethodReference.containsGenericParameters(MethodReference.java:79)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferCall(TypeAnalysis.java:2497)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1029)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:778)\n // at com.strobel.decompiler.ast.TypeAnalysis.doInferTypeForExpression(TypeAnalysis.java:1656)\n // at com.strobel.decompiler.ast.TypeAnalysis.inferTypeForExpression(TypeAnalysis.java:803)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:672)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:655)\n // at com.strobel.decompiler.ast.TypeAnalysis.runInference(TypeAnalysis.java:365)\n // at com.strobel.decompiler.ast.TypeAnalysis.run(TypeAnalysis.java:96)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:109)\n // at com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformCall(AstMethodBodyBuilder.java:1162)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:1009)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformByteCode(AstMethodBodyBuilder.java:554)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformExpression(AstMethodBodyBuilder.java:540)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformNode(AstMethodBodyBuilder.java:392)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.transformBlock(AstMethodBodyBuilder.java:333)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:294)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at us.deathmarine.luyten.FileSaver.doSaveJarDecompiled(FileSaver.java:192)\n // at us.deathmarine.luyten.FileSaver.access$300(FileSaver.java:45)\n // at us.deathmarine.luyten.FileSaver$4.run(FileSaver.java:112)\n // at java.lang.Thread.run(Unknown Source)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public Comparator<? super N> getComparator() {\n\t\treturn comparator;\n\t}", "public DMSQueueEntryComparator()\n {\n\n }", "public Comparator<Point> slopeOrder() {\n /* YOUR CODE HERE */\n return new SlopeOrder();\n }", "@Override\n\t\t\tpublic Comparator<SkillMachines> getComparator() {\n\t\t\t\treturn new Comparator<SkillMachines>(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(SkillMachines machine1,\n\t\t\t\t\t\t\tSkillMachines machine2) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\treturn machine1.name.compareTo(machine2.name);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}", "public T caseOperation_Compare(Operation_Compare object)\r\n {\r\n return null;\r\n }", "@Override\n public Comparator loadIntoVariable(Comparator comparator, Function value) {\n if (comparator == null) {\n return Comparator.comparing(value);\n }\n return comparator.thenComparing(value);\n }", "protected Comparator getNestedComparator() {\r\n return nestedComparator;\r\n }", "public DoComparator(boolean classFirst, boolean caseSensitive,\n boolean reverse)\n {\n _classFirst = classFirst;\n _caseSensitive = caseSensitive;\n _reverse = reverse;\n }", "public static void main(String[] args) {\n\n Comparator<Integer> comparator = new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n return o1.compareTo(o2);\n }\n };\n\n System.out.println(\" result of comparator :\" + comparator.compare(3,2));\n\n\n /*\n After java8\n */\n\n Comparator<Integer> comparatorLambda = (a, b)-> a.compareTo(b);\n\n\n System.out.println(\" result of comparator lambda is : \"+ comparatorLambda.compare(3,2));\n\n }", "public static JwComparator<AcCustodySummaryVo> getItemInCustodyComparator()\n {\n return AcCustodySummaryVoTools.instance.getItemInCustodyComparator();\n }", "public SortingFocusTraversalPolicy(Comparator comparator)\n {\n this.comparator = comparator;\n }", "public static SerializableAssert defineComparator(TestCase test, Object object)\n throws Exception {\n\n if (test instanceof SerializableAssert) {\n return (SerializableAssert) test;\n }\n\n Method m = object.getClass().getMethod(\"equals\", new Class[] { Object.class });\n if (m.getDeclaringClass() != Object.class) {\n // one of classes overrides Object.equals(Object) method\n // use default comparator\n return DEFAULT_COMPARATOR;\n }\n\n // TODO use generics to detect comparator\n // instead of 'instanceof' for the first element\n if (object instanceof Throwable) {\n return THROWABLE_COMPARATOR;\n }\n if (object instanceof PermissionCollection) {\n return PERMISSION_COLLECTION_COMPARATOR;\n }\n throw new RuntimeException(\"Failed to detect comparator\");\n }", "public void initializeSortModel()\r\n {\r\n oldSortColumnProperty = sortColumnProperty;\r\n oldAscending = !ascending; // To make sure Sort happens on first render \r\n }", "public LNumberComparatorTest(String name) {\n super(name);\n }", "void updateSortingComparators(Comparator<ReadOnlyEntry> eventComparator,\n Comparator<ReadOnlyEntry> deadlineComparator,\n Comparator<ReadOnlyEntry> floatingTaskComparator);", "public SortObj() {\n super();\n }", "public boolean hasComparatorInputOverride()\r\n/* 283: */ {\r\n/* 284:338 */ return true;\r\n/* 285: */ }", "@Override\n public JsonNode visit(Comparator op, JsonNode input) {\n JsonNode lhsNode = op.getLhsExpr().accept(this, input);\n JsonNode rhsNode = op.getRhsExpr().accept(this, input);\n\n if (op.matches(lhsNode, rhsNode)) {\n return BooleanNode.TRUE;\n }\n return BooleanNode.FALSE;\n }", "@Test\n public void testCompare() {\n AantalGastenComparator instance = new AantalGastenComparator();\n int expResult;\n int result;\n \n //test 1\n Accommodatie a1 = new Accommodatie(\"je moeder\", 30.00, 2, 1);\n Accommodatie a2 = new Accommodatie(\"je vader\", 40.00, 3, 1);\n expResult = -1;\n result = instance.compare(a1, a2);\n assertEquals(expResult, result);\n \n \n //test 2\n Accommodatie a3 = new Accommodatie(\"je moeder2\", 30.00, 2, 1);\n Accommodatie a4 = new Accommodatie(\"je vader2\", 40.00, 2, 1);\n expResult = 0;\n result = instance.compare(a3, a4);\n assertEquals(expResult, result);\n \n \n //test 3\n Accommodatie a5 = new Accommodatie(\"je moeder3\", 30.00, 3, 1);\n Accommodatie a6 = new Accommodatie(\"je vader3\", 40.00, 2, 1);\n expResult = 1;\n result = instance.compare(a5, a6);\n assertEquals(expResult, result);\n }", "void setObjectComparator(final Comparator<O> objectComparator);", "public int getComparatorLevel() {\n return -1;\n }", "public IPAddressComparator(){\n\t\tsuper(IPDatePair.class, true);\n\t}", "public JwComparator<AcActionAutoCorrectedLog> getActualTypeComparatorNullsLower()\n {\n return ActualTypeComparatorNullsLower;\n }", "public static JwComparator<AcUspsInternationalClaim> getContractTypeComparator()\n {\n return AcUspsInternationalClaimTools.instance.getContractTypeComparator();\n }", "public static JwComparator<AcPost> getActiveComparator()\n {\n return AcPostTools.instance.getActiveComparator();\n }", "@Override\n public int compare(IMethodInstance o1, IMethodInstance o2) {\n final int cnd = o1.getMethod().getRealClass().getCanonicalName().compareTo(o2.getMethod().getRealClass().getCanonicalName());\n if (cnd != 0) {\n return -1 * cnd;\n } else {\n return -1 * o1.getMethod().getMethodName().compareTo(o2.getMethod().getMethodName());\n }\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 abstract void compare();", "public BST(Comparator<E> c)// SEE HW#4 FOR WHAT TO CHANGE HERE\n\t{\n\t\tcomparator = c;\n\t}", "public JwComparator<AcUpuTagSummaryVo> getMailClassCodeComparatorNullsLower()\n {\n return MailClassCodeComparatorNullsLower;\n }", "public static JwComparator<AcPost> getCodeComparator()\n {\n return AcPostTools.instance.getCodeComparator();\n }", "public final Comparator<? super Node<N>> comparator() {\n return null;\n }", "public SortingAndPagingDescriptor() {\r\n }", "public static Comparator<Card> createByRankComparator()\n {\n return new Comparator<Card>()\n {\n public int compare(Card pCard1, Card pCard2)\n {\n return pCard1.aRank.compareTo(pCard2.aRank);\n }\n };\n }" ]
[ "0.6779385", "0.6763399", "0.6643154", "0.66354704", "0.66354704", "0.6574286", "0.64690244", "0.6401612", "0.6389891", "0.63292265", "0.6307254", "0.6285872", "0.62194854", "0.61464876", "0.61403227", "0.61324316", "0.6119642", "0.6080777", "0.6051062", "0.6048439", "0.6047442", "0.60435253", "0.6033718", "0.6027535", "0.60254925", "0.6021749", "0.5957224", "0.59499687", "0.59445864", "0.59032935", "0.5899927", "0.5897448", "0.58899766", "0.5885465", "0.58705866", "0.58654124", "0.5856478", "0.58453494", "0.5839857", "0.5819072", "0.58060396", "0.57715625", "0.5770328", "0.5754604", "0.5748485", "0.5739604", "0.57311153", "0.5728519", "0.57265586", "0.57142", "0.56930906", "0.56821674", "0.56738514", "0.56655055", "0.56464183", "0.5637458", "0.56360346", "0.561491", "0.5610681", "0.55968595", "0.55884796", "0.5588291", "0.5586333", "0.55831426", "0.5577785", "0.55611694", "0.55516195", "0.55436385", "0.5534045", "0.5522621", "0.551698", "0.55076504", "0.5501427", "0.54990655", "0.5491132", "0.5489188", "0.5486583", "0.54804105", "0.5474583", "0.54730505", "0.5463416", "0.54587114", "0.5454889", "0.545348", "0.5450601", "0.54369456", "0.543586", "0.5423868", "0.5421174", "0.5420749", "0.54180557", "0.5408096", "0.53902435", "0.53881115", "0.53465897", "0.53453237", "0.5342253", "0.5320424", "0.53196007", "0.5316266" ]
0.69273335
0
We start with the first character of the string, check if the character itself is a word in the dictionary? If yes, then our problem reduces to the smaller problem, that is to check if substring from index 1 to s.length is breakable or not. If not, then we check two characters and then three characters and so on till we can check the whole string. As with every character inclusion, the problem reduces in size but remains the same, so ideal case for recursive implementation. Change wordDict from ArrayList into HashSet as the average time complexity for a search is O(1) as opposed to O(n) for ArrayList Time Complexity : O(2 to the power of n) for the number of recursive calls in conjunction with the number of characters in the string s. In addition there is O(n) for the substrings of the given string. The dominant term is O(2 to the power of n) Space Complexity: O(w) where w is the number of words in the HashSet and further O(r) where r is the number of recursive calls
public boolean wordBreak(String s, List<String> wordDict) { if (s == null || s.length() == 0) { return false; } Set<String> set = new HashSet<>(wordDict); return wordBreakUtil(s,set); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length() + 1];\n\n dp[0] = true;\n\n // Maintaining dp array for all lengths from 1 to n\n for(int i = 1; i <= s.length(); i++) {\n // Checking for all characters till i if earlier sub array is true and if the\n // substring is a dictionary word\n for(int j = 0; j < i; j++) {\n if(dp[j] && wordDict.contains(s.substring(j, i))) {\n dp[i] = true;\n }\n }\n }\n\n return dp[s.length()];\n }", "public static boolean wordBreak(String s, String[] dict) {\n boolean[] memo = new boolean[s.length() + 1];\n memo[0] = true; //set first to be true because we need initial state\n for (int i = 0; i < s.length(); i++) {\n if (!memo[i])\n continue;\n for (String current : dict) {\n int end = i + current.length();\n if (end > s.length())\n continue;\n if (memo[end])\n continue;\n if (s.substring(i, end).equals(current)) {\n memo[end] = true;\n }\n }\n }\n return memo[s.length()];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "public static boolean dp(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n\n // BUG: firstly try i inclusive, but it's harder.\n //start from 0, end at i(exclusive), is that available\n boolean [] board = new boolean [s.length() + 1];\n Arrays.fill(board, false);\n\n board[0] = true;\n for(int i=1; i<=s.length(); i++) {\n boolean flag = false;\n for(int j=0; j<i; j++) {\n\n // BUG: confuse = and ==\n // BUG: confuse substring(j, i) and substring(j+1, i), because define exclusive above\n if(board[j] == true && dic.contains(s.substring(j, i))) {\n flag = true;\n break;\n }\n }\n board[i] = flag;\n }\n\n return board[s.length()];\n }", "public static boolean wordBreakHelper(String s, Set<String> dict, int start) {\r\n if (start == s.length()) {\r\n return true;\r\n }\r\n for (String word : dict) {\r\n int len = word.length();\r\n int end = start + len;\r\n\r\n if (end > s.length()) {\r\n continue;\r\n }\r\n\r\n if (s.substring(start, start + len).equals(word)) {\r\n if (wordBreakHelper(s, dict, start + len)) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public static boolean wordBreak(String s, List<String> wordDict) {\r\n\t \r\n\t char[] ch = s.toCharArray();\r\n\t int left = 0;\r\n\t boolean canSegemented = false;\r\n\t StringBuffer sb = new StringBuffer();\r\n\t while(left<ch.length){\r\n\t sb.append(ch[left]);\r\n\t if(wordDict.contains(sb.toString())){\r\n\t canSegemented = true;\r\n\t sb = new StringBuffer();\r\n\t }\r\n\t else{\r\n\t canSegemented = false;\r\n\t }\r\n\t left++;\r\n\t }\r\n\t return canSegemented;\r\n\t }", "public boolean wordBreak2(String s, List<String> wordDict) {\n int maxL =0;\n Set<String> wordSet = new HashSet<>(wordDict);\n for (String word : wordDict) {\n maxL = Math.max(maxL, word.length());\n }\n boolean[] dp = new boolean[s.length() + 1];\n dp[0] = true;\n for (int i = 1; i <= s.length(); i++) {\n for (int j = i-1; j >=0 && j >= i - maxL; j--) {\n if (dp[j] && wordSet.contains(s.substring(j, i))) {\n dp[i] = true;\n break;\n }\n }\n }\n return dp[s.length()];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public boolean isWordBreak(String s, List<String> wordDict){\n\n\t\tint[] ind = new int[s.length()+1];\n\t\tArrays.fill(ind,-1);\n\t\tind[0]=0;\n\t\t\n\t\tfor (int i = 0; i<s.length(); i++){\n\t\t\tif (ind[i]!=-1){\n\t\t\t\tfor (int j=i+1; j<=s.length(); j++){\n\t\t\t\t\tString word = s.substring(i,j);\n\t\t\t\t\tif (wordDict.contains(word)){\n\t\t\t\t\t\tind[j]=i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ind[s.length()] == -1) return false;\n\t\t\n\t\treturn true;\n\n\t\n\t}", "public boolean wordBreakUtil(String s,Set<String> set){\n\n if (s.length() == 0){\n return true;\n }\n\n for (int i=1; i <= s.length(); i++){\n\n // consider all prefixes of the current string\n String prefix = s.substring(0,i);\n\n // return true if the prefix is present in the dictionary and the\n // remaining string also forms a space-separated sequence of one or\n // more dictionary words\n if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){\n return true;\n }\n }\n\n return false;\n }", "public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}", "public boolean[][] isWord(List<String> wordDict, String s) {\n int n = s.length();\n boolean[][] isWord = new boolean[n][n];\n \n for (int i = 0; i < n; i++) {\n for (int j = i; j < n; j++) {\n isWord[i][j] = wordDict.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n return dfs(s, dic);\n }", "public boolean wordBreakUtilTopDown(String s, Set<String> dict,int[] lookup)\n {\n int n = s.length();\n\n // return true if the end of the string is reached\n if (n == 0) {\n return true;\n }\n\n // if the sub problem is seen for the first time\n if (lookup[n] == -1)\n {\n // mark subproblem as seen (0 initially assuming string\n // can't be segmented)\n lookup[n] = 0;\n\n for (int i = 1; i <= n; i++)\n {\n // consider all prefixes of the current string\n String prefix = s.substring(0, i);\n\n // if the prefix is found in the dictionary, then recur for the suffix\n if (dict.contains(prefix) && wordBreakUtilTopDown(s.substring(i),dict, lookup))\n {\n // return true if the string can be segmented\n lookup[n] = 1;\n return true;\n }\n }\n }\n\n // return solution to the current sub problem\n return lookup[n] == 1;\n }", "public boolean search(String word) {\n // 1. 遍历 每个 字母 去掉 从list 里去出来结果 比较list 每个结果\n for (int i = 0; i < word.length(); i++) {\n String key = word.substring(0, i) + word.substring(i+1);\n List<int[]> indexAndCharList = dictonary.getOrDefault(key, new ArrayList<>());\n for (int[] indexAndChar : indexAndCharList) {\n if (indexAndChar[0] == i && indexAndChar[1] != (word.charAt(i) - 'a')) {\n return true;\n }\n }\n }\n return false;\n }", "private List<String> help(String s, Set<String> wordDict) {\n\t\tList<String> ret = new ArrayList<>();\n\n\t\tif (wordDict.contains(s))\n\t\t\tret.add(s);\n\t\telse\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif (wordDict.contains(s.substring(0, i + 1))) {\n\n//\t\t\t\t\tSystem.out.println(s.substring(0, i + 1));\n\n\t\t\t\t\tList<String> tmp = help(s.substring(i + 1), wordDict);\n\t\t\t\t\tif (tmp.size() > 0) {\n\t\t\t\t\t\tret.add(s.substring(0, i + 1));\n\t\t\t\t\t\tret.addAll(tmp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\treturn ret;\n\t}", "public boolean wordBreakTopDown(String s, List<String> wordDict) {\n\n if (s == null || s.length() == 0) {\n return false;\n }\n\n Set<String> set = new HashSet<>(wordDict);\n // lookup array to store solutions to sub problems\n // `lookup[i]` stores if substring `str[n-i…n)` can be segmented or not\n int[] lookup = new int[s.length() + 1];\n Arrays.fill(lookup,-1);\n\n return wordBreakUtilTopDown(s,set,lookup);\n }", "public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean checkDictionary(String word) {\n Node current = root;\n String check = word.toLowerCase().trim();\n // parse through the String word\n for (int i = 0; i < check.length(); i++) {\n // get the index of the selected character in the node array\n int index = getIndex(check.charAt(i));\n if (index < 0) {\n return false;\n }\n \n // if the iteration is not at the last character\n if (i < check.length() - 1) {\n // get the next node\n Node next = current.nexts[index];\n // if there is a next node, move to it\n if (next != null) {\n current = next;\n }\n // otherwise, the word does not exist as its path is longer than where it went in the dictionary\n else return false;\n }\n // if the iteration is on the last character\n else {\n // return true if the value at the node index is true, false otherwise\n return current.wordExists(index);\n }\n }\n // somehow the loop exitted without a return statement in the middle of it and the word does not exist\n return false;\n }", "static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n if (map.containsKey(s))\n return map.get(s);\n\n LinkedList<String>res = new LinkedList<String>();\n if (s.length() == 0) {\n res.add(\"\");\n return res;\n }\n for (String word : wordDict) {\n if (s.startsWith(word)) {\n List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n for (String sub : sublist)\n res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub);\n }\n }\n map.put(s, res);\n return res;\n }", "private boolean isWordInDictionaryRecursive ( String word, int begin, int end ) {\n\t\tif (begin > end )\n\t\t\treturn false;\n\t\t\n\t\tint half = (begin+end+1) / 2;\n\t\tint comparison = words.get(half).compareToIgnoreCase(word);\n\t\tif ( comparison < 0 )\n\t\t\treturn isWordInDictionaryRecursive( word, half + 1, end );\n\t\telse if ( comparison > 0 )\n\t\t\treturn isWordInDictionaryRecursive( word, begin, half - 1);\n\t\telse\n\t\t\treturn true;\n\t}", "public String function(HashSet<String> Dictionary, String inputString) {\n\n int[] step = new int[inputString.length() + 1];\n\n step[0] = 0;\n\n for (int i = 1; i <= inputString.length(); i++)\n {\n step[i] = -1;\n\n for ( int j = 0 ; j < i ; j++ )\n {\n if ( Dictionary.contains( inputString.substring(j, i) ) && step[j] != -1 )\n {\n step[i] = j;\n break;\n }\n }\n }\n\n // if text can not be made from the whole inputString, return an empty string\n if (step[inputString.length()] == -1)\n return \"\";\n\n // Moving backwards from the end, the words contain words in the reverse order\n ArrayList<String> words = new ArrayList<String>();\n\n for (int x = inputString.length(); x > 0; x = step[x])\n words.add(inputString.substring(step[x], x));\n\n // Create a string using a StringBuilder that contains words in the normal order\n StringBuilder sb = new StringBuilder();\n\n for (int i = words.size()-1; i >= 0; i--)\n sb.append( i > 0 ? words.get(i) + \" \" : words.get(i) );\n\n return sb.toString();\n }", "public boolean dfs(String s, Set<String> dic) {\n if(s.equals(\"\")) return true;\n for(int i=0; i<s.length(); i++) {\n String temp = s.substring(0, i+1);\n if(dic.contains(temp)) {\n if(dfs(s.substring(i+1), dic)) return true;\n }\n }\n return false;\n }", "@Override\n public boolean isWord(String s) {\n // TODO: Implement this method\n char[] c = s.toLowerCase().toCharArray();\n TrieNode predptr = root;\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.getChild(c[i]);\n if (next != null) {\n predptr = next;\n } else {\n return false;\n }\n\n }\n return predptr.endsWord();\n }", "public static List<List<String>> breakIntoWords(String longWord, Collection<String> dict) {\n List<List<String>>[] words = new ArrayList[longWord.length() + 1];\n // words[i] = list of matching words at longWord length i\n // words[longWord.length()] is answer\n Arrays.stream(words).forEach((wl) -> wl = null);\n // contains empty list of lists\n // the first element contains an emtpty list of strings\n words[0] = new ArrayList<List<String>>();\n\n int beginIndx = -1;\n while (beginIndx < longWord.length()) {\n // beginIndx starts from 0 and goes up to length of the word -1\n // start with -1 and first index where the words[beginIndx] != null is 0\n // last value for beingIndx is wordlength -1\n while ((words[++beginIndx] == null) && (beginIndx < longWord.length())) ;\n // non null List of Lists of String\n // for index 0 it will be empty. For subsequent indices it may be non empty\n List<List<String>> beginIndxLists = words[beginIndx];\n // if beginIndx has not reached the end of the word\n // last value of beingIndx is longWord.length-1\n // need to compare the last character for which substring(wordlength-1, wordlength)\n if (beginIndx < longWord.length()) {\n // beginIdx is the start of the word, end Indx is end\n // last value for endIndx is longWord.length\n for (int endIndx = beginIndx + 1; endIndx <= longWord.length(); endIndx++) {\n String matchW = longWord.substring(beginIndx, endIndx);\n if ((matchW != null) && (!matchW.isEmpty())) {\n if (dict.contains(matchW)) {\n // list of list of Strings for getting to the endIndx\n List<List<String>> mwordsList = words[endIndx];\n if (mwordsList == null) {\n mwordsList = new ArrayList<List<String>>();\n }\n if((beginIndxLists==null)||(beginIndxLists.isEmpty())) {\n mwordsList.add(new ArrayList(Arrays.asList(matchW)));\n }\n // words[endIndx] has list of list initialized\n // there is a list at beginIndx\n // get the list of words at begingIndx. It contains at least one empty list\n else {\n for (List<String> beginList : beginIndxLists) {\n // at the matched word in the list at beginIndx and then copy it to mwordsList at endIndx\n beginList.add(matchW);\n mwordsList.add(beginList);\n }\n }\n words[endIndx] = mwordsList;\n }\n }\n }\n\n }\n\n }\n return words[longWord.length()];\n }", "public List<Integer> findSubstring(String s, String[] words) {\n if (s == null || s.isEmpty() || words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n List<Integer> res = new ArrayList<>();\n int size = words.length;\n int length = words[0].length();\n\n if (s.length() < size * length) {\n return new ArrayList<>();\n }\n\n Map<String,Integer> covered = new HashMap<>();\n\n for (int j=0; j<size; j++) {\n if (s.indexOf(words[j]) < 0) {\n return res;\n }\n\n covered.compute(words[j], (k, v) -> v != null ? covered.get(k)+1 : 1);\n }\n\n int i=0;\n int sLength = s.length();\n while(sLength -i >= size * length){\n Map<String, Integer> temp = new HashMap<>(covered);\n\n for (int j=0; j<words.length; j++){\n String testStr = s.substring(i + j*length, i + (j+1)*length);\n\n if (temp.containsKey(testStr)){\n if (temp.get(testStr) == 1)\n temp.remove(testStr);\n else\n temp.put(testStr, temp.get(testStr)-1);\n }\n else {\n break;\n }\n }\n\n if (temp.size() == 0) {\n res.add(i);\n }\n\n i++;\n }\n return res;\n }", "public void computeWords(){\n\n loadDictionary();\n\n CharacterGrid characterGrid = readCharacterGrid();\n\n Set<String> wordSet = characterGrid.findWordMatchingDictionary(dictionary);\n\n System.out.println(wordSet.size());\n for (String word : wordSet) {\n\t System.out.println(word);\n }\n\n // System.out.println(\"Finish scanning character grid in \" + (System.currentTimeMillis() - startTime) + \" ms\");\n }", "private static boolean canBuildWord(HashMap<String, Boolean> cache, String word, boolean isOriginalWord) {\n\t\tif (cache == null || word == null) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!isOriginalWord && cache.containsKey(word)) {\n\t\t\treturn cache.get(word);\n\t\t}\n\t\t\n\t\t/* Divide String into 2 pieces. Recursively try to \"build\" both pieces using smaller words */\n\t\tfor (int i = 1; i < word.length(); i++) {\n\t\t\tString left = word.substring(0, i);\n\t\t\tString right = word.substring(i);\n\t\t\t\n\t\t\tboolean canBuildLeft = canBuildWord(cache, left, false);\n\t\t\tcache.put(word, canBuildLeft);\n\t\t\t\n\t\t\tif (canBuildLeft) {\n\t\t\t\tboolean canBuildRight = canBuildWord(cache, right, false);\n\t\t\t\tcache.put(word, canBuildRight);\n\t\t\t\tif (canBuildLeft && canBuildRight) {\n\t\t\t\t\tcache.put(word, true);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcache.put(word, false);\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\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\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}", "public boolean wordBreakMemo(String s, List<String> wordDict) {\n Set<String> set = new HashSet<>(wordDict);\n Boolean[] memo = new Boolean[s.length()];\n return wordBreakHelper(s, set, memo, 0);\n }", "public boolean wordBreak_1(String s, Set<String> wordDict) {\r\n if(s==null || s.length()==0 || wordDict==null || wordDict.size()==0) return false;\r\n Set<String> wordDelete = new HashSet<String>();\r\n boolean r = divide_1(s,wordDict,wordDelete);\r\n return r;\r\n }", "public boolean canBreak(String input, String[] dict) {\n Set<String> dicSet = toSet(dict);\n // NOTICE: sometimes it will be handy to have such index matching, canBreak[i] represents index(i-1) in input,\n // also can represent the substring(0,i).\n // M[i] 代表前i个字母是否能被分解为一个或多个单词在dict里面。\n // M[j] 相当于左大段,查表, 0 <= j < i。 如果在就是true。\n // 同时 右小段的 string[j,i-1] 必须在dict里面。\n boolean[] canBreak = new boolean[input.length() + 1]; // include 0.\n canBreak[0] = true; // base case , 每个单词用0次。 空字符串 \"\"\n for (int i = 1; i < canBreak.length; i++) {\n // enumerate the rightmost split\n for (int j = 0; j < i; j++) {\n // cut at the left of input[j].\n // check the subproblem and check the rest of the string.\n System.out.println(input);\n System.out.println(\"j: \" + j + \", i:\" + i + \" \" + \"左大段查表:M[j]: \" + canBreak[j] + \", check dic for subString (右小段): \"\n + input.substring(j, i) + \"是否在dic内: \" + dicSet.contains(input.substring(j, i)));\n if (dicSet.contains(input.substring(j, i)) && canBreak[j]) {\n System.out.println(\"enter if, \" + \"j: \" + j + \", i: \" + i);\n canBreak[i] = true;\n break;\n }\n }\n System.out.println(\"======\");\n }\n return canBreak[canBreak.length - 1];\n }", "public static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String>res = new LinkedList<String>(); \n\t if (s.length() == 0) {\n\t res.add(\"\");\n\t return res;\n\t } \n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t return res;\n\t}", "public boolean wordBreakDP(String s, List<String> wordDict) {\n int[] memo = new int[s.length()];\n Arrays.fill(memo, -1);\n return dp(s, wordDict, memo, s.length() - 1);\n }", "public String[][] findSuggestions(String w) {\n ArrayList<String> suggestions = new ArrayList<>();\n String word = w.toLowerCase();\n // parse through the word - changing one letter in the word\n for (int i = 0; i < word.length(); i++) {\n // go through each possible character difference\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n // get the character that will change in the word\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n \n // if the selected character is not the same as the character to change - avoids getting the same word as a suggestion\n if (c != word.charAt(i)) {\n // change the character in the word\n String check = word.substring(0, i) + c.toString() + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - adding one letter to the word\n for (int i = 0; i < word.length(); i++) {\n // if the loop is not on the last charcater\n if (i < word.length() - 1) {\n // check words with one character added between current element and next element\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word.substring(0, i) + c.toString() + ((i < word.length()) ? word.substring(i, word.length()) : \"\");\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n // if the loop is on the last character\n else {\n // check the words with one character added to the end of the word\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word + c;\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - removing one letter from the word\n for (int i = 0; i < word.length(); i++) {\n // remove the chracter at the selected index from the word\n String check = word.substring(0, i) + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n \n String[][] rtn = new String[suggestions.size()][1];\n for (int i = 0, n = suggestions.size(); i < n; i++) {\n rtn[i][0] = suggestions.get(i);\n }\n \n return rtn;\n }", "public boolean hasWord( String s )\n\t{\n\t\tTrieNode cur = root;\n\t\t\n\t\tfor( int i = 0; i < s.length(); i++ )\n\t\t{\n\t\t\tint letterIndex = (int)s.charAt(i) - 97;\n\t\t\t\n\t\t\tif( cur.getLetters()[ letterIndex ] != null )\n\t\t\t\tcur = cur.getLetters()[ letterIndex ];\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn cur.isEndOfWord();\n\t}", "private boolean checkDict(String word, String[] dict){\n int a = 0;\n int b = dict.length-1;\n while (a<=b) {\n int m = (a+b)/2;\n if (word.compareTo(dict[m]) == 0) return true;\n else if (word.compareTo(dict[m])>0) a = m+1;\n else b = m-1;\n }\n return false;\n }", "List<String> DFS(String s, List<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String> res = new LinkedList<String>(); \n\t if (s.length() == 0) { //递归结束条件\n\t res.add(\"\");\n\t return res;\n\t }\n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t \n\t return res;\n\t}", "void contains(String str) {\n dictionary.add(str);\n assertEquals(words.contains(str), trie.contains(str));\n assertEquals(words.size(), trie.size());\n }", "public boolean isStringMadeofAllUniqueChars(String word) {\n if (word.length() > 128) {\n return false;\n }\n boolean[] char_set = new boolean[128];\n for (int i = 0; i < word.length(); i++) {\n int val = word.charAt(i);\n System.out.println(val);\n if (char_set[val]) {\n return false;\n }\n char_set[val] = true;\n }\n return true;\n }", "public boolean wordBreakBottomUp(String s, List<String> wordDict) {\n\n if (s == null || s.length() == 0) {\n return false;\n }\n\n Set<String> set = new HashSet<>(wordDict);\n\n return wordBreakUtilBottomUp(s,set);\n }", "public boolean[][] validateWord(String s, Set<String> set) {\n boolean[][] isWord = new boolean[s.length()][s.length()];\n for (int i = 0; i < s.length(); i++) {\n for (int j = i; j < s.length(); j++) {\n isWord[i][j] = set.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "public static boolean word_memo(int start,String s,Set<String>set,int[]visit){\n if(start==s.length()){//指针越界是ture!!\n return true;\n }\n if(visit[start]==1){\n return true;\n }\n if(visit[start]==2){\n return false;\n }\n for (int end = start; end <=s.length() ; end++) {\n String res=s.substring(start,end);\n if(set.contains(res)&&word_memo(end,s,set,visit)){\n visit[start]=1;\n return true;\n\n }\n }\n visit[start]=2;\n return false;\n }", "private static boolean isValidWord(String s) {\r\n\t\tString valid = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-'\";\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif (valid.indexOf(s.charAt(i)) < 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "public int minLength(String s, Set<String> dict) {\n StringBuilder sb = new StringBuilder();\n sb.append(s);\n sb.delete(sb.indexOf(s), sb.lastIndexOf(s));\n for (String st : dict) {\n s.replaceAll(st, \"\");\n }\n return 1;\n }", "public interface Dictionary {\n\t/**\n\t * Is the provided string a prefix to a word in the dictionary?\n\t * <p>\n\t * Implementations that don't support this operation will always return true, to prevent early termination of\n\t * operations.\n\t * <p>\n\t * An empty string is considered a prefix.\n\t */\n\tboolean isPrefix(String potentialPrefix);\n\n\t/**\n\t * Is the string provided a complete string in the dictionary?\n\t * <p>\n\t * An empty string is not a word.\n\t */\n\tboolean isWord(String potentialWord);\n}", "public boolean wordBreak(String s, Set<String> wordDict) {\n return false;\n }", "public ArrayList<String> FindAllCombinationWord(String str) {\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n int n = str.length();\r\n ArrayList<String> combinationWord = permute(str, 0, n - 1);\r\n\r\n for (String item : combinationWord) {\r\n int j = 0;\r\n for (int i = n; i >= 2; i--) {\r\n String finalString = item.substring(j);\r\n\r\n if (!wordList.contains(finalString)) {\r\n wordList.add(finalString);\r\n }\r\n j++;\r\n }\r\n }\r\n return wordList;\r\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n Map<Integer, Boolean> breakable = new HashMap<>();\n return wordBreakHelper(s, wordDict, s.length() - 1, breakable);\n }", "private boolean isWord(String word) {\n\t\treturn dict.isWord(word);\n\t}", "private boolean checkWord(String str)\n\t{\n\t\tfor (int i = 0; i < words.length(); i++)\n\t\t{\n\t\t\tif (equals(words.get(i), str))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "public boolean contains(String word) {\r\n\r\n return dictionaryMap.containsKey(word.toUpperCase());\r\n\r\n }", "public boolean isInDictionary(String word) {\n return isInDictionary(word, Language.ENGLISH);\n }", "private static int searchStandardDictionary(String word) {\n if (word.length() < 4) {\n return Arrays.binarySearch(STANDARD_DICTIONARY, 0, FOUR_LETTER_WORDS_OFFSET, word.toUpperCase(Locale.ENGLISH));\n } else {\n return Arrays.binarySearch(STANDARD_DICTIONARY, FOUR_LETTER_WORDS_OFFSET, STANDARD_DICTIONARY.length, word.toUpperCase(Locale.ENGLISH));\n }\n }", "public BoggleSolver(String[] dictionary) {\n wordsSoFar = new ArrayList<String>();\n // 1. build the trie tree of the dictionary\n dict = new NewTrieSet();\n for (String s : dictionary) {\n if (s.length() >= MIN_WORD_LENGTH)\n dict.add(s);\n }\n }", "public boolean contains(String s) {\r\n if (s.length() == 0) {//base case\r\n return isValidWord;\r\n }\r\n Character c = s.charAt(0);\r\n TriNode child = children.containsKey(c) ? children.get(c) : null;\r\n if (child == null) {\r\n return false;\r\n }\r\n return child.contains(s.substring(1));\r\n }", "public KeyWordList extractKeyWords(String input);", "public MySet<PageEntry> getPagesWhichContainWord (String str) {\n\t\tMySet<PageEntry> set = new MySet<>();\n\t\t\tMyLinkedList<WordEntry> Words = (MyLinkedList<WordEntry>)(ipData.getipList()[ipData.getHashIndex(str)]);\n\t\t\tWordEntry requiredWordEntry =new WordEntry();\n\t\t\tint i = 0;\n\t\t\tfor ( i = 0 ; i<Words.size() ; i++ ) {\n\t\t\t\tif (Words.getChildat(i).getWord().equals(str)) {\n\t\t\t\t\trequiredWordEntry = Words.getChildat(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i<Words.size()) {\n\t\t\t\tPageEntry p = new PageEntry();\n\t\t\t\tint sizeOPositions = requiredWordEntry.getListOfPositions().size();\n\t\t\t\tfor (int j = 0; j < sizeOPositions; j++) {\n\t\t\t\t\tp = requiredWordEntry.getListOfPositions().getChildat(j).getPageEntry();\n\t\t\t\t\tset.InsertAtFront(p);\n\t\t\t\t}\n\t\t\t}\n\t\treturn set;\n\t}", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "void howManyStartsWithPrefix(String str) {\n dictionary.add(str);\n int count = 0;\n for (String word : words) {\n if (word.length() >= str.length()) {\n boolean isPrefix = true;\n for (int i = 0; i < str.length(); i++) {\n if (word.charAt(i) != str.charAt(i)) {\n isPrefix = false;\n break;\n }\n }\n if (isPrefix) {\n count++;\n }\n\n }\n }\n assertEquals(count, trie.howManyStartsWithPrefix(str));\n }", "public static int ladderLength3(String beginWord, String endWord, Set<String> wordList) {\r\n Set<String> beginSet = new HashSet<String>(), endSet = new HashSet<String>();\r\n\r\n int len = 1;\r\n int strLen = beginWord.length();\r\n HashSet<String> visited = new HashSet<String>();\r\n\r\n beginSet.add(beginWord);\r\n endSet.add(endWord);\r\n while (!beginSet.isEmpty() && !endSet.isEmpty()) {\r\n if (beginSet.size() > endSet.size()) {\r\n Set<String> set = beginSet;\r\n beginSet = endSet;\r\n endSet = set;\r\n }\r\n\r\n Set<String> temp = new HashSet<String>();\r\n for (String word : beginSet) {\r\n char[] chs = word.toCharArray();\r\n\r\n for (int i = 0; i < chs.length; i++) {\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n char old = chs[i];\r\n chs[i] = c;\r\n String target = String.valueOf(chs);\r\n\r\n if (endSet.contains(target)) {\r\n return len + 1;\r\n }\r\n\r\n if (!visited.contains(target) && wordList.contains(target)) {\r\n temp.add(target);\r\n visited.add(target);\r\n }\r\n chs[i] = old;\r\n }\r\n }\r\n }\r\n\r\n beginSet = temp;\r\n len++;\r\n }\r\n\r\n //solution 3: using graph\r\n //https://www.youtube.com/watch?v=h9iTnkgv05E&ab_channel=NeetCode\r\n\r\n return 0;\r\n }", "public String replaceWords(List<String> dict, String sentence) {\n for(String s : dict){\n insert(s);\n }\n //builder to append strings\n StringBuilder sb = new StringBuilder();\n //to get word of the sentence, split it into words\n //and to distinguish, add spaces\n for(String word : sentence.split(\"\\\\s+\")){\n if(sb.length() > 0)\n sb.append(\" \");\n \n TrieNode curr = root;\n //now for each word till its length\n for(int i=0; i<word.length(); i++){\n //get character, compare character with children\n char c = word.charAt(i);\n //if no children found or curr.word is null\n if(curr.children[c-'a'] == null || curr.word != null){\n break;\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //replacement found or not?\n String replacement = curr.word;\n if(replacement == null){\n sb.append(word);\n }else{\n sb.append(replacement);\n }\n }\n return sb.toString();\n }", "static void searchWord(WordNode root, char boggle[][], int i,\n int j, boolean visited[][], String str, ArrayList<String> elements)\n {\n\n // if we found word in trie / dictionary\n if (root.isWord == true){\n// System.out.println(str.toString());\n elements.add(str.toString());\n }\n\n\n // If both I and j in range and we visited\n // that element of matrix first time\n if (isSafe(i, j, visited,boggle))\n {\n // make it visited\n visited[i][j] = true;\n\n // traverse all child of current root\n for (int K =0; K < 26; K++)\n {\n if (root.child[K] != null)\n {\n // current character\n char ch = (char) (K + 'a') ;\n\n // Recursively search reaming character of word\n // in trie for all 8 adjacent cells of\n // boggle[i][j]\n if (isSafe(i+1,j+1,visited,boggle) && Character.toLowerCase(boggle[i+1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i+1,j+1,\n visited,str+ch, elements);\n if (isSafe(i, j+1,visited,boggle) && Character.toLowerCase(boggle[i][j+1])\n == ch)\n searchWord(root.child[K],boggle,i, j+1,\n visited,str+ch, elements);\n if (isSafe(i-1,j+1,visited,boggle) && Character.toLowerCase(boggle[i-1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j+1,\n visited,str+ch, elements);\n if (isSafe(i+1,j, visited,boggle) && Character.toLowerCase(boggle[i+1][j])\n == ch)\n searchWord(root.child[K],boggle,i+1, j,\n visited,str+ch, elements);\n if (isSafe(i+1,j-1,visited,boggle) && Character.toLowerCase(boggle[i+1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i+1, j-1,\n visited,str+ch, elements);\n if (isSafe(i, j-1,visited,boggle)&& Character.toLowerCase(boggle[i][j-1])\n == ch)\n searchWord(root.child[K],boggle,i,j-1,\n visited,str+ch, elements);\n if (isSafe(i-1,j-1,visited,boggle) && Character.toLowerCase(boggle[i-1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j-1,\n visited,str+ch, elements);\n if (isSafe(i-1, j,visited,boggle) && Character.toLowerCase(boggle[i-1][j])\n == ch)\n searchWord(root.child[K],boggle,i-1, j,\n visited,str+ch, elements);\n }\n }\n\n // make current element unvisited\n visited[i][j] = false;\n }\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n return dpMethod(s, wordDict);\n }", "private HashMap<Character, Integer> countAllLetters(String word) {\n WordToolbox otherWord = new WordToolbox(word.toLowerCase());\r\n HashMap<Character, Integer> mapOfWord = new HashMap<>();\r\n for (int i = 0; i < word.length(); i++) {\r\n mapOfWord.put(word.toLowerCase().charAt(i), otherWord.countHowMany(word.toLowerCase().charAt(i)));\r\n }\r\n return mapOfWord;\r\n }", "public boolean isDictionarySafe(String word1, String word2) {\n\t\treturn this.dictionary.contains(word1) && \n\t\t\t\tthis.dictionary.contains(word2) && \n\t\t\t\tword1.toString().length() == word2.toString().length();\n\t}", "public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}", "public boolean[] validatePossibility(String s, Set<String> set, boolean[][] isWord) {\n \t/*\n \tboolean[] valid = new boolean[s.length() + 1];\n \tvalid[s.length()] = true;\n\n \tint maxLeng = getMaxLength(set);\n \tfor (int i = s.length() - 1; i >= 0; i--) {\n \t\tfor (int j = i; j < s.length() && (j - i) <= maxLeng; j++) {\n \t\t\tif (isWord[i][j] && valid[j + 1]) {\n \t\t\t\tvalid[i] = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}*/\n// boolean[] valid = new boolean[s.length() + 1];\n// valid[0] = true;\n// int maxLength = getMaxLength(set);\n// for (int i = 0; i < s.length(); i++) {\n// for (int j = 0; j < i && j < maxLength; j++) {//iterate [0 ~ i]\n// if (isWord[i - j][i] && isValid[i - j + 1])) {\n// valid[i + 1] = true;\n// break;\n// }\n// }\n// }\n//\n// return valid;\n\n boolean[] rst = new boolean[s.length() + 1];\n rst[0] = true;\n if (s == null || set.contains(s)) {\n return rst;\n }\n for (int i = 0; i < s.length(); i++) {\n for (int j = 0; j <= i; j++) {\n if (rst[j] && set.contains(s.substring(j, i + 1))) {\n rst[i + 1] = true;\n break;\n }\n }\n }\n return rst;\n }", "boolean isWord(String potentialWord);", "private static Map<Character, Set<Character>> genLessMap(String[] words) throws Exception {\n Map<Character, Set<Character>> map = new HashMap<>();\n for (int i = 1; i < words.length; i ++) {\n String a = words[i - 1];\n String b = words[i];\n boolean allEqual = true;\n for (int j = 0; j < a.length() && j < b.length(); j ++) {\n if (a.charAt(j) == b.charAt(j))\n continue;\n allEqual = false;\n Set<Character> sb = map.get(a.charAt(j));\n if (sb == null) {\n sb = new HashSet<Character>();\n map.put(a.charAt(j), sb);\n }\n sb.add(b.charAt(j));\n break;\n }\n if (allEqual && a.length() > b.length())\n throw new Exception(\"Invalid.\");\n }\n return map;\n }", "private boolean isSubSequence(String s, String word){\n int startPointer = 0;\n for(int i=0; i<word.length(); i++){\n int location = s.indexOf(word.charAt(i), startPointer);\n if(location < 0)\n return false;\n startPointer = location+1;\n }\n return true;\n }", "public static void main(String[] args) {\n int validPhrases = 0;\n\n // get filepath for the puzzle input\n System.out.print(\"Please provide the filepath of the text document containing the puzzle input: \");\n String filePath = new Scanner(System.in).nextLine();\n\n try {\n // attempt to read each line in the file into a list\n List<String> lines = Files.readAllLines(Paths.get(filePath));\n\n /// PART 1\n for (String line : lines) {\n List<String> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n if (usedWords.contains(word)) {\n validPassphrase = false;\n break;\n } else {\n usedWords.add(word);\n }\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 1 is: \" + validPhrases);\n validPhrases = 0;\n\n /// PART 2\n for (String line : lines) {\n // this time around each word will be a dictionary mapping every character in the word, to how many\n // times that character is used in the word\n List<Map<Character, Integer>> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n Map<Character, Integer> charMap = new HashMap<>();\n for (char c : word.toCharArray()) {\n // if the character has already been used, increment it's value, otherwise add it to the dict\n if (charMap.containsKey(c)) {\n charMap.put(c, charMap.get(c) + 1);\n } else {\n charMap.put(c, 1);\n }\n }\n\n // now we check if the word we're looking at is an anagram of any we've seen before on this line\n for (Map<Character, Integer> usedWord : usedWords) {\n // no need to check characters if the char maps are a different size\n if (usedWord.keySet().size() == charMap.keySet().size()) {\n boolean hasDifferingValues = false;\n for (char c : charMap.keySet()) {\n // we can short circuit checking every single character by breaking as soon as we see\n // any difference between the two words\n if (!usedWord.containsKey(c) || usedWord.get(c) != charMap.get(c)) {\n hasDifferingValues = true;\n break;\n }\n }\n\n if (!hasDifferingValues) {\n validPassphrase = false;\n break;\n }\n }\n }\n\n // we don't need to check the rest of the words if we already know the line is invalid\n if (!validPassphrase)\n break;\n usedWords.add(charMap);\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 2 is: \" + validPhrases);\n } catch (Exception ex) {\n System.out.println(\"An error occurred attempting to read your input file.\");\n }\n }", "@Test\n\tpublic void testValidWord() {\n\t\tAssert.assertTrue(new DictionaryImpl().isValidWord(\"set\"));\n\t}", "private static boolean hasWord(char[][] board, int x, int y, String s) {\n if (x < 0 || x > 4 || y < 0 || y > 4) return false;\n if (s.length() == 0) return true;\n\n // If 1st char of s is different from char at (x, y),\n // hasWord cannot continue to search s.\n if (s.charAt(0) != board[y][x]) return false;\n\n for (int i = 0; i < diffX.length; i++) {\n int newX = x + diffX[i];\n int newY = y + diffY[i];\n if (hasWord(board, newX, newY, s.substring(1))) return true;\n }\n\n return false;\n }", "public boolean check(String s, int start, Map<String, Integer> words, int wn, int wl) {\n words = new HashMap<>(words);\n for(int i=0; i<wn; i++) {\n String cur = s.substring(start + i*wl, start + i*wl + wl);\n if(!words.containsKey(cur) || words.get(cur) <= 0) return false;\n words.put(cur, words.get(cur) - 1);\n }\n return true;\n }", "public boolean isWord(String word) {\n\t\tSystem.out.println(\"Is Word?: \" + word);\n\t\t// - Use this to test iterative implementation rather than binaryCheck implementation (runs better on small wordlists)\n\t\tfor (int i =1; i < table.size() + 1; i++) {\n\t\t\tif (table.get(i).equals(word)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t/*\n\t\treturn isWordBinaryCheck(word);//the binarysearch version which works poorly on the sets 100 words or less\n\t\t*/\n\t}", "private static void findWords(char boggleBoardChars[][], Trie trie, String[] valids) { \r\n\t\tboolean[][] visitedTiles = new boolean[4][4]; \r\n\r\n\t\tString str = \"\"; \r\n\t\t//searches for valid word starting at each die on board\r\n\t\tfor (int row = 0 ; row < 4; row++) { \r\n\t\t\tfor (int col = 0 ; col < 4 ; col++) { \r\n\t\t\t\tif (trie.isInTrie( (boggleBoardChars[row][col] + \"\").toUpperCase())) { \r\n\t\t\t\t\tstr = str+boggleBoardChars[row][col]; \r\n\t\t\t\t\tboggleBoardSearch(trie, boggleBoardChars, row, col, visitedTiles, str, valids); \r\n\t\t\t\t\tstr = \"\"; \r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t} \r\n\t}", "public boolean[] validatePossibility(List<String> wordDict, boolean[][] isWord, String s) {\n //optimize, find maxLength in wordDict to restrict string growth\n int maxLen = 0;\n for (String word : wordDict) {\n maxLen = Math.max(maxLen, word.length());\n }\n\n int n = s.length();\n boolean[] isValid = new boolean[n + 1];\n isValid[n] = true;\n for (int i = n - 1; i >= 0; i--) {\n for (int j = i; j < n; j++) {\n if (isWord[i][j] && isValid[j + 1]) {\n isValid[i] = true;\n break;\n }\n }\n }\n return isValid;\n }", "public boolean findWord ( String word ) {\n\t\tif(this.contains(word))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//return isWordInDictionaryRecursive( word, 0, words.size()-1);\n\n\t}", "private boolean isValidWord(String word){\n if (trie.searchWord(word)){\n return true;\n } else {\n return false;\n }\n }", "public int ladderLength(String start, String end, Set<String> dict) {\n if(dict == null || dict.size() == 0) return 0;\n\n int length = 1;\n Queue<String> queue = new LinkedList<>();\n HashSet<String> set = new HashSet<>();\n queue.offer(start);\n set.add(start);\n\n while(!queue.isEmpty()){\n length++;\n int size = queue.size();\n // 每次判断一层全部的可能性\n for(int i = 0; i < size; ++i){\n String cur = queue.poll();\n for(String nextWord: getNextWord(dict, cur, end)){\n if(set.contains(nextWord)){\n continue;\n }\n if(nextWord.equals(end)){\n return length;\n }\n queue.offer(nextWord);\n set.add(nextWord);\n }\n }\n }\n\n return 0;\n }", "public static Set<String> getUniqueWords(String input) {\r\n HashSet<String> hSet = new HashSet<String>();\r\n ArrayList<String> words = getWords(input);\r\n for(String word: words) {\r\n if(!hSet.contains(word)) {\r\n hSet.add(word);\r\n }\r\n }\r\n return hSet;\r\n }", "public static boolean hasMatch(String s, int dict) {\n if (s.length()==0) {return false;}\n if (isInteger(s)) {return true;}\n //else if (s.length()==1) {return true;}\n else {\n int len = s.length();\n boolean has = false;\n\n try {\n String file = \"../dicts/total/try\"+dict+\"/total.txt\";\n BufferedReader br = new BufferedReader(new FileReader(file));\n String line = br.readLine();\n int count = 0;\n boolean done = false;\n while (line != null && !done) {\n //process lines\n String[] split = line.split(\"\\t\");\n if (s.length()>Integer.parseInt(split[0])) {\n done = true;\n has = false;\n } else if (s.toLowerCase().equals(split[1].toLowerCase())) {\n done = true;\n has = true;\n }\n line = br.readLine();\n count++;\n }\n } catch (FileNotFoundException ex) {\n has = false;\n } catch (IOException ex) {\n has = false;\n }\n\t\n return has;\n }\n }", "static ArrayList<String> findWords(char boggle[][], WordNode root)\n {\n // Mark all characters as not visited\n boolean[][] visited = new boolean[boggle.length][boggle[0].length];\n WordNode pChild = root ;\n\n String str = \"\";\n ArrayList<String> list=new ArrayList<String>();\n\n // traverse all matrix elements\n for (int i = 0 ; i < boggle.length; i++)\n {\n for (int j = 0 ; j < boggle[0].length ; j++)\n {\n // we start searching for word in dictionary\n // if we found a character which is child\n // of Trie root\n if (pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'] != null)\n {\n str = str+Character.toLowerCase(boggle[i][j]);\n\n //String word=str;\n\n searchWord(pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'],\n boggle, i, j, visited, str, list);\n\n\n str = \"\";\n }\n }\n }\n return list;\n }", "public boolean contains(String s) {\n s = s.trim().toLowerCase();\n\n TrieNode current = root;\n\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isLowerCase(c)) {\n TrieNode child = current.children.get(c);\n if (child == null) {\n return false;\n }\n current = child;\n }\n }\n\n return current.isWord;\n }", "public boolean contains(String word) {\r\n\t\treturn dict.contains(word);\r\n\t}", "private boolean contains(Node node, String word, int iter, int size) {\n if (node == null || (iter == size - 1 && !node.leaf))\n return false;\n\n // are we at a leaf node? if so, the trie contains `word`\n if (node.leaf && iter == size - 1)\n return true;\n\n // recursive step\n return contains(node.children.get(word.charAt(iter)), word, iter + 1, size);\n }", "public boolean search(String word) {\n // Write your code here\n Queue<TrieNode> nexts=new LinkedList<>();\n nexts.add(root);\n int index=0;\n while(!nexts.isEmpty()){\n int size=nexts.size();\n char c=word.charAt(index);\n boolean flag=false;\n for(int i=0;i<size;++i){\n TrieNode cur=nexts.poll();\n if(c=='.'){\n for(TrieNode tempNode:cur.children.values()){\n nexts.add(tempNode);\n flag|=tempNode.hasWord;\n }\n } else if(cur.children.containsKey(c)){\n TrieNode nextNode=cur.children.get(c);\n flag|=nextNode.hasWord;\n nexts.add(nextNode);\n }\n }\n index++;\n if(index>=word.length()) return flag;\n }\n return false;\n }", "public boolean wordPattern(String pattern, String str) {\n Map<Character, String> c2s = new HashMap<Character, String>();\n Map<String, Character> s2c = new HashMap<String, Character>();\n String [] sArr = str.split(\" \");\n if(pattern.length() != sArr.length) return false;\n int len = pattern.length();\n for(int i = 0; i <= len - 1; i ++){\n char c = pattern.charAt(i);\n String s = sArr[i];\n // For a given (c, s) pair, we need result to contain two mappings (c->s and s->c), check if \n // mapping from c, s exist and map to different targets (which violates one-one mapping)\n if((c2s.containsKey(c) && !c2s.get(c).equals(s)) || (s2c.containsKey(s) && s2c.get(s) != c))\n return false;\n if(!c2s.containsKey(c)){\n c2s.put(c, s);\n s2c.put(s, c);\n }\n }\n \n return true;\n }", "public static void findUniqueUsingHashMap(String inputString) {\n\n HashMap<Character, Integer> stringHashMap = new HashMap<>();\n for (int i = 0; i < inputString.length(); i++) {\n if (stringHashMap.containsKey(inputString.charAt(i))) {\n System.out.println(\"Input String dont have unique characters:\" + inputString);\n return;\n }\n stringHashMap.put(inputString.charAt(i), i);\n }\n System.out.println(\"Input String has unique characters \" + inputString);\n }", "public Map<String, Integer> wordCount(String string) {\n\t\t//Split the input string by into individual words. Takes out the spaces, commas, apostrophes\n\t\tString[] splitWords = string.split(\"[\\\\s',]\");\n\t\t//Initiate the hashmap to store unique words as keys and incrementing values with repeated keys\n\t\tMap<String, Integer> wordCount = new HashMap<>();\n\t\tfor(int i = 0; i < splitWords.length; i++ ) {\n\t\t\t//increment word count if the word is already in the hashmap. Make a new entry if word is unique to the map.\n\t\t\tif (wordCount.containsKey(splitWords[i])) {\n\t\t\t\twordCount.put(splitWords[i], wordCount.get(splitWords[i])+1);\n\t\t\t}else {\n\t\t\t\twordCount.put(splitWords[i], 1);\n\t\t\t}\t\t\n\t\t}\n\t\t//Remove the empty spaces from the map (to satisfy a test case)\n\t\twordCount.remove(\"\");\n\t\treturn wordCount;\n\t}", "public static boolean canBeAPalindromeUsingMap(String s) {\n Map<Character, Integer> charCounts = new HashMap<>();\n char[] chars = s.toCharArray();\n int lengthWithoutSpaces = 0;\n for (char c : chars) {\n if (c != ' ') {\n lengthWithoutSpaces++;\n charCounts.compute(c, (k, v) -> v == null ? 1 : v + 1);\n }\n }\n boolean isLengthEven = lengthWithoutSpaces % 2 == 0;\n boolean hasUnevenCountOfChar = false;\n for (Integer charCount : charCounts.values()) {\n if (charCount % 2 == 0) {\n continue;\n } else {\n if (isLengthEven) {\n return false;\n } else {\n if (!hasUnevenCountOfChar) {\n hasUnevenCountOfChar = true;\n } else {\n return false;\n }\n }\n }\n }\n return true;\n }", "public List<String> wordBreak(String s, List<String> wordDict){\n\t\tList<String> res = new LinkedList<>();\n\t\tif(wordDict == null || wordDict.size() == 0){\n\t\t\treturn res;\n\t\t}\n\t\tbacktracking(res, s, wordDict, new StringBuilder(), 0);\n\t\treturn res;\n\t}", "private static Map<String, List<String>> getCustomStringStructure(@NotNull String s) {\n String[] arr = s.split(\" \");\n // the storage\n Map<String, List<String>> map = new TreeMap<>();\n // put the first element in the storage\n List<String> l = new ArrayList<>();\n l.add(arr[0]);\n map.put(arr[0].substring(0, 1), l);\n\n for (int i = 1; i < arr.length; i++) {\n String sub = arr[i].substring(0, 1);\n // if map contains key put String arr[i] in the List\n if (map.containsKey(sub)) {\n map.get(sub).add(arr[i]);\n } else {\n // if not put first letter as a key and arr[i] as a value in the map\n List<String> list = new ArrayList<>();\n list.add(arr[i]);\n map.put(sub, list);\n }\n }\n\n // sort by size, by string's length and alphabetically\n Map<String, List<String>> collect = map.entrySet()\n .stream()\n .filter(k -> k.getValue().size() > 1)\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> e.getValue().stream().sorted((o1, o2) -> {\n if (o2.length() != o1.length()) {\n return o2.length() - o1.length();\n } else {\n return o1.compareTo(o2);\n }\n })\n .collect(Collectors.toList())\n ));\n\n // return TreeMap to sort keys\n return new TreeMap<>(collect);\n }", "static boolean isEnglishWord(String str) {\r\n return localDictionary.contains(str);\r\n }", "public boolean wordExists(String word)\n\t{\n\t\t//checks to make sure the word is a word that starts with a lowercase letter, otherwise return false\n\t\tif(word.charAt(0) >= 'a' && word.charAt(0) <= 'z')\n\t\t{\n\t\t\tchar letter = word.charAt(0);\n\t\t\t\n\t\t\treturn (myDictionaryArray[(int)letter - (int)'a'].wordExists(word));\n\t\t}\n\t\t\n\t\treturn false;\t\t\n\t}", "public static void search(String word){\n if(index.containsKey(word)){\n System.out.println(\"word \" + word + \" displays in :\");\n HashSet<String> list = index.get(word);\n for(String str:list){\n System.out.println(str);\n }\n }\n else{\n System.out.println(\"word \" + word + \" doesn't found!\");\n }\n }", "private static String hashWord(String word) {\n int[] counts = new int[26];\n for (char c : word.toCharArray()) { // O(c)\n counts[(int)c-97]++;\n }\n StringBuilder sb = new StringBuilder();\n for (int i : counts) { // O(26)\n sb.append(Integer.toString(i));\n }\n return sb.toString();\n }" ]
[ "0.690339", "0.6848644", "0.67800707", "0.67665184", "0.66863674", "0.6638138", "0.66202307", "0.6460546", "0.64152944", "0.6410003", "0.6409276", "0.63205546", "0.6292283", "0.6263545", "0.61869", "0.6161204", "0.61508507", "0.6146735", "0.61394024", "0.61355567", "0.61234623", "0.6121977", "0.6081625", "0.605567", "0.60550606", "0.6022981", "0.600511", "0.59830743", "0.59631", "0.5960636", "0.59594965", "0.59187436", "0.5908333", "0.5899827", "0.58942705", "0.5879044", "0.58698833", "0.586469", "0.5853077", "0.5838423", "0.5826795", "0.58201444", "0.5814561", "0.58143204", "0.5759957", "0.5745477", "0.57416123", "0.573268", "0.5728761", "0.5705348", "0.5698334", "0.5671216", "0.5663384", "0.5660561", "0.56505734", "0.5643026", "0.5628961", "0.561314", "0.5607656", "0.5605358", "0.5601878", "0.5597264", "0.559628", "0.5594916", "0.5593464", "0.5586976", "0.55853385", "0.55843925", "0.55718935", "0.5562141", "0.5519194", "0.5517288", "0.5516314", "0.55096054", "0.550633", "0.54855096", "0.5468346", "0.54672277", "0.5466487", "0.54456496", "0.54441667", "0.5443437", "0.543988", "0.5438448", "0.543161", "0.5424838", "0.5422113", "0.54200447", "0.54172146", "0.54141814", "0.54138255", "0.54130167", "0.5412288", "0.5406934", "0.5403367", "0.5401105", "0.5400058", "0.5398676", "0.5364969", "0.53638315" ]
0.60232866
25
Return true if the end of the string is reached,
public boolean wordBreakUtil(String s,Set<String> set){ if (s.length() == 0){ return true; } for (int i=1; i <= s.length(); i++){ // consider all prefixes of the current string String prefix = s.substring(0,i); // return true if the prefix is present in the dictionary and the // remaining string also forms a space-separated sequence of one or // more dictionary words if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){ return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isEnd () {\n if (index >= inputCharArray.length) return true;\n else return false;\n }", "private boolean isEnd(String nextVal) throws java.io.IOException {\n\t\tif (Character.toString((char)PREPROCESSING).equals(nextVal)) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal.charAt(0));\n\t\t\tif (next.matches(\"^!end\"))\n\t\t\t\treturn true;\n\t\t\treader.seek(pos);\n\t\t}\n\t\treturn false;\n\n\t}", "private boolean isAtEnd() {\n return peek().type == EOF;\n }", "boolean hasIsEndOfSentence();", "private boolean isEndFound(String line) {\n\t\tif (end != null) {\n\t\t\tif (nothingAfterEnd) {\n\t\t\t\treturn line.endsWith(end);\n\t\t\t} else {\n\t\t\t\treturn line.contains(end);\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAtEnd()\n\t{\n\t\treturn (lineNow >= lineTime);\n\t}", "public boolean endOfInput() {\n \tif((tmpPosition<totalLength)&&(IsOk)){\n \t//\tSystem.out.println(\"Am returnat ok\");\n \t\treturn false;\n\t\t\t\n \t}\n\t\telse\n\t\t\treturn true;\n \t\n }", "public boolean isEOF() {\n return this.index >= this.input.length();\n }", "boolean getIsEndOfSentence();", "private boolean reachedEnd() {\n return current >= source.length();\n }", "@Override\n\tpublic boolean isAtEnd()\n\t{\n\t\tif (right.isEmpty())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "private boolean endsWithSpace(String str) {\r\n\t\treturn str.length() != 0 && str.charAt(str.length() - 1) == ' ';\r\n\t}", "public boolean endOfText () {\n if (index >= blockIn.length()) {\n blockEnded = true;\n textEnded = true;\n }\n return textEnded;\n }", "private boolean endline() {\r\n return (CHAR('\\r') || true) && CHAR('\\n');\r\n }", "public boolean isEOF()\n\t{\n\t\tif (line == null || findTokenStart() == NOTOKENFOUND)\n\t\t{\n\t\t\ts.close();\n\t\t\tSystem.out.println(\"EOF\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasNextToken() {\n\t\treturn !inputString.isEmpty();\n\t}", "private boolean isEndOfCode() {\n return currentIndex >= codeLength;\n }", "public boolean isEOF()\r\n {\r\n Pattern oldDelim = feed.delimiter();\r\n \r\n feed.useDelimiter( MATCH_ALL_DELIMITER );\r\n boolean moreInput = feed.hasNext();\r\n \r\n feed.useDelimiter( oldDelim );\r\n \r\n return !moreInput;\r\n }", "public boolean getHasNext() {\n\t\t\treturn !endsWithIgnoreCase(getCursor(), STARTEND);\n\t\t}", "public boolean eof() {\n\treturn !(tokenizer.hasMoreElements());\n }", "public static boolean hasTrailingChar(char c,String s) {\n \tif(s == null || s.length()==0) {\n \t\treturn false;\n \t}\n \treturn (s.charAt(s.length()-1) == c);\n }", "private final boolean isEnd()\n {\n if (m_bufferOffset_ >= 0) {\n if (m_bufferOffset_ != m_buffer_.length()) {\n return false;\n }\n else {\n // at end of buffer. check if fcd is at the end\n return m_FCDLimit_ == m_source_.getLength();\n }\n }\n return m_source_.getLength() == m_source_.getIndex();\n }", "private boolean STRING(String s) {\r\n int n = input.match(s, in);\r\n in += n;\r\n return (n > 0);\r\n }", "public boolean reachedEnd() {\n return reachedEnd;\n }", "public boolean hasNext()\n {\n return position < text.length;\n }", "public boolean isEndOfHeader() {\n \t\t\tint i = count;\n \t\t\treturn i > 4 && buf[i - 4] == '\\r' && buf[i - 3] == '\\n'\n \t\t\t\t\t&& buf[i - 2] == '\\r' && buf[i - 1] == '\\n';\n \t\t}", "public boolean endsWith(String suffix) {\n/* 371 */ return this.m_str.endsWith(suffix);\n/* */ }", "public boolean atEOF()\r\n\t{\r\n\t\treturn (thisc == EOF);\r\n\t}", "boolean hasEndLineNumber();", "public boolean eos()\n \t{\n \t\tMatcherContext ctx = (MatcherContext) getContext();\n \t\tif (ctx == null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t\t// geting after potential spacing first\n \t\tOptionalMatcher opt=new OptionalMatcher(spacing());\n \t\topt.match(ctx);\n \n \t\t// First check if we just passed a '\\n' (in spacing)\n \t\t//System.out.println(\"EOS> checking afterNL\");\n \t\tif (isAfterNL())\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> checking '}'\");\n \t\t// '}' is eos too, but we should not consume it, so using a test\n \t\tSequenceMatcher seq = (SequenceMatcher) sequence(OPT_SP, test(eoi()));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// test foe end of input, that qualifies too\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, test('}'));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// Otherwise look for upcoming statement ending chars: ';' or '}'\n \t\t//System.out.println(\"EOS> checking ';'\");\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, ';');\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> False\");\n \t\treturn false;\n \t}", "public static boolean goodEnd(String sequence) {\n\t\tint endGCCount = 0;\n\t\tfor (int i = sequence.length() - 5; i < sequence.length(); i++)\n\t\t\tif (sequence.charAt(i) == 'g' || sequence.charAt(i) == 'c') endGCCount++;\n\t\treturn endGCCount <= MAX_GC_END;\n\t}", "@Override\n public boolean hasNext() {\n return this.currIndex < this.circularString.size();\n }", "boolean hasEndPosition();", "boolean hasEndPosition();", "private boolean isEndHereOrNowdoc(String text) {\n String trimedText = text.trim();\n boolean isEnd = false;\n if (trimedText.startsWith(heredoc)) {\n if (trimedText.length() == heredoc.length()) {\n isEnd = true;\n } else if (trimedText.length() > heredoc.length()\n && !isLabelChar(trimedText.charAt(heredoc.length()))) {\n // e.g.\n // $test = <<< END\n // ENDING\n // END\n isEnd = true;\n }\n }\n return isEnd;\n }", "public boolean hasNext() {\n\t\t\t\t\treturn lastReadChar != ']' && lastReadChar != -1;\n\t\t\t\t}", "static int findEndOfString(String sb) {\n/* */ int result;\n/* 216 */ for (result = sb.length(); result > 0 && \n/* 217 */ Character.isWhitespace(sb.charAt(result - 1)); result--);\n/* */ \n/* */ \n/* */ \n/* 221 */ return result;\n/* */ }", "boolean isEndInclusive();", "public boolean endsLy(String str) {\r\n return str.length() > 1 ? str.substring(str.length() - 2, str.length()).equals(\"ly\") : false;\r\n }", "public final boolean atEndOfFile() {\n\t\treturn (m_flags & EndOfFile) != 0 ? true : false;\n\t}", "public Boolean isEnd() {\n\t\t// keep running\n\t\tif (currentNo == -1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// car production for this production line is done\n\t\telse if (currentNo >= expectedNo) {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\n\t\t\treturn true;\n\t\t} else {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\t\t\treturn false;\n\t\t}\n\n\t}", "boolean isEOF() \t\t\tthrows IOException;", "public synchronized boolean hasNext() {\n\t\treturn peek(1) != CharacterIterator.DONE;\n\t}", "boolean isLast() {\n return !hasNext();\n }", "private boolean endsWithWhite(String str) {\r\n if ((str != null) &&\r\n (str.length() > 0) &&\r\n isWhitespace( str.charAt(str.length() - 1))) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean end() {\n\t\ttry {\n\t\t\tbyte[] buffer = \"END\".getBytes();\n\t\t\toos.writeObject(buffer);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean endOfStream()\n {\n return false;\n }", "public boolean isEnd(T msg)\n\t{\n\t\treturn false;\n\t}", "public Boolean safeEnd()\n\t{\n\t\treturn safeEnd;\n\t}", "public boolean getEnd() {\n return end_;\n }", "String getIfEnd();", "public final boolean yyatEOF() {\n return zzAtEOF;\n }", "public final boolean yyatEOF() {\n return zzAtEOF;\n }", "public boolean hasNext() {\n for (int i = 0; i < len; i++) {\n // 0 + 4 - 2 = 2.\n if (index[i] < i + characters.length() - len) {\n return true;\n }\n }\n return false;\n }", "public boolean getEnd() {\n return end_;\n }", "public boolean getEnd(){\n\t\treturn this.isEnd;\n\t}", "protected abstract boolean definitelyNotLastLine(String message);", "public boolean isEnd() {\n\t\t\treturn this == END_STREAM;\n\t\t}", "boolean hasChar();", "private boolean isEndLineSpace(final String message) {\n\t\treturn message.contains(\"A line should not end with blank space\"); //$NON-NLS-1$\n\t}", "public boolean endOfBlock () {\n if (index >= blockIn.length()) {\n blockEnded = true;\n }\n return blockEnded;\n }", "public void endCharacter() {\n\t\tString name = \"Tori\";\n\t\tboolean startWith = name.endsWith(\"ori\");\n\t\tif(startWith) {\n\t\t\tSystem.out.println(\"it ends with the character\");\n\t\t}\n\t}", "public boolean eof() {\n\t\treturn eof;\n\t}", "public boolean getEnd()\n\t{\n\t\treturn getBooleanIOValue(\"End\", true);\n\t}", "boolean hasString();", "@Override\r\n\tpublic boolean matches(String first, String last) {\n\t\treturn false;\r\n\t}", "@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn (this.current<StringArray.this.max);\n\t\t\t}", "@java.lang.Override\n public boolean hasIsEndOfSentence() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "private static boolean checkFirstLastTag(String line) {\n return line.charAt(1) != line.charAt(line.length() - 2);\n }", "private boolean grammar() {\r\n return skip() && rules() && MARK(END_OF_TEXT) && EOT();\r\n }", "public static boolean hasNextChar() {\n \t boolean result = scanner.hasNext();\n \t return result;\n }", "public boolean isLast() {\n\t\treturn (next == null);\n\t}", "@java.lang.Override\n public boolean hasIsEndOfSentence() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "boolean isSetEnd();", "public void testIsAtEnd() {\n assertTrue(test1.isAtEnd());\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertFalse(test1.isAtEnd());\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertTrue(test1.isAtEnd());\n }", "@java.lang.Override\n public boolean getIsEndOfSentence() {\n return isEndOfSentence_;\n }", "@java.lang.Override\n public boolean getIsEndOfSentence() {\n return isEndOfSentence_;\n }", "@Override\n\tpublic boolean tryAgainOnEOF()\n\t{\n\t\treturn false;\n\t}", "public boolean omitEnd() {\n return oEnd;\n }", "static boolean endsWith(StringBuilder sb, String s) {\n if (sb == null && s == null)\n return true;\n if (sb == null && sb != null)\n return false;\n if (sb.length() < s.length())\n return false;\n String end = sb.substring(sb.length() - s.length());\n return end.equals(s);\n }", "int endStatement(String theStr){\n char last = theStr.charAt(theStr.length() - 1);\n // if statement that determines if statement has ended properly\n if(last == ';' || last == '{' || last == '(' || last == ')' || last =='}' ){\n return 1;\n }else {\n JOptionPane optionPane = new JOptionPane(\"The test program cannot be generated by the Demo function.\" +\n \" User is missing an end statement.\",\n JOptionPane.ERROR_MESSAGE);\n JDialog dialog = optionPane.createDialog(\"Failure\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n return 0;\n }\n }", "public boolean hasMoreTokens(){\n return !ended;\n }", "private boolean isLoop() {\n return \"loop\".equalsIgnoreCase(data.substring(tokenStart, tokenStart + 4));\n }", "public static boolean containsOutOfString(String string, char find) {\r\n\t\treturn indexOfOutOfString(string, find) != -1;\r\n\t}", "public boolean isAtEnd() {\n return models.indexOf(activeModel) == (models.size()-1);\n }", "public abstract boolean shouldEnd();", "public boolean hasEndPosition() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public boolean roundEnd()\r\n {\r\n line = gameBoard.findLine();\r\n \r\n return line[0] != -1 || gameBoard.isFull();\r\n }", "public boolean isFull() {\n\t\treturn end != null;\n\t}", "public boolean hasString() {\n/* 800 */ return true;\n/* */ }", "private boolean more() {\n return regEx.length() > 0;\n }", "public boolean hasEndPosition() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public boolean isFullyParsed() {\r\n return textIndex == getTextLength();\r\n }", "String reachedDeadEnd();", "int endStatement(String theStr) {\r\n\t\tif (theStr.equals(\"\") || theStr.equals(\" \")) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\tchar last = theStr.charAt(theStr.length() - 1);\r\n\r\n\t\t\t// if statement that determines if statement has ended properly\r\n\t\t\tif (last == ';' || last == '{' || last == '}') {\r\n\t\t\t\tString d = Character.toString(last);\r\n\t\t\t\tisToken(d);\r\n\t\t\t\treturn 1;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean checkString(){\n createString();\n char[] charsJoinedString=this.joinedTextPalindrome.toCharArray();\n int lengthString=charsJoinedString.length-1;\n for(int i=0;i<charsJoinedString.length;i++){\n if(charsJoinedString[i]!=charsJoinedString[lengthString]){\n return false;\n }\n lengthString--;\n }\n return true;\n \n }", "public synchronized boolean getEnd(){\n\treturn end;\n }", "private static boolean isTailChar(char ch) {\n if(ch == OLD_TAIL_CHAR || ch == NEW_TAIL_CHAR){\n return true;\n }else{\n return false;\n }\n }", "@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n boolean atEndOfLine();", "public boolean stringE(String str) {\n int count = 0;\n \n for (int i=0; i < str.length(); i++) {\n if (str.charAt(i) == 'e') count++;\n }\n \n return (count >= 1 && count <=3);\n}", "private boolean findFullStop(ArrayList<String> parameters) {\n int index = findIndexOfLastWord(parameters);\n if (index == -1) {\n return false;\n }\n return true;\n }" ]
[ "0.75958896", "0.7505018", "0.7495231", "0.7368158", "0.73249245", "0.7160882", "0.710744", "0.7079636", "0.7051253", "0.69663805", "0.6957349", "0.69520056", "0.69469935", "0.6922902", "0.6849994", "0.68448585", "0.68134797", "0.67133325", "0.6698559", "0.6623976", "0.65414", "0.6522384", "0.6496592", "0.64712095", "0.6416137", "0.6414887", "0.64026874", "0.63949627", "0.63710374", "0.6364654", "0.63570255", "0.63491714", "0.6341818", "0.6341818", "0.6335218", "0.63321465", "0.6301385", "0.62889963", "0.6284719", "0.6281672", "0.62809575", "0.6239322", "0.6218388", "0.6214343", "0.6206168", "0.6190426", "0.61852217", "0.61755776", "0.61661077", "0.61565524", "0.6147726", "0.6139519", "0.6139519", "0.6135515", "0.61313415", "0.6123286", "0.6106673", "0.6054457", "0.60519135", "0.6047101", "0.6042843", "0.60366714", "0.6033419", "0.60314566", "0.60222954", "0.6007748", "0.6001366", "0.5994266", "0.59936714", "0.59903026", "0.59902966", "0.59885293", "0.5982097", "0.59808683", "0.5980806", "0.5980049", "0.59573233", "0.59409326", "0.59386575", "0.59351575", "0.59120125", "0.58920467", "0.58860236", "0.58860147", "0.5882836", "0.58752227", "0.5857015", "0.5851022", "0.5844896", "0.584424", "0.58418715", "0.58347565", "0.58322984", "0.5832226", "0.58174366", "0.58170474", "0.5813417", "0.58109885", "0.57996196", "0.57977575", "0.57961047" ]
0.0
-1
The problem can be broken down into smaller sub problem, which can further be broken down into yet smaller sub problem, and so on. The wordbreak problem also exhibits. overlapping sub problems, so we will end up solving the same sub problem over and over again. If we draw the recursion tree, we can see that the same sub problems are getting computed repeatedly. The problems having optimal substructure and overlapping sub problem can be solved by dynamic programming, in which sub problem solutions are memoized rather than computed repeatedly Time Complexity: O(n to the power of 2) Space Complexity: requires O(n+1) extra space, where n is the length of the input string for the int array, another O(w) for the HashSet where w is the number of words. Also O(r) for the number of recursive calls
public boolean wordBreakTopDown(String s, List<String> wordDict) { if (s == null || s.length() == 0) { return false; } Set<String> set = new HashSet<>(wordDict); // lookup array to store solutions to sub problems // `lookup[i]` stores if substring `str[n-i…n)` can be segmented or not int[] lookup = new int[s.length() + 1]; Arrays.fill(lookup,-1); return wordBreakUtilTopDown(s,set,lookup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int minWordBreak(String s, Set<String> dict) {\n Map<String, List<String>> map = new HashMap<String, List<String>>();\n List<String> possibles = wordBreakHelper(s,dict,map);\n int minCut = s.length();\n for (String possible: possibles) {\n int cut = possible.split(\" \").length;\n if (minCut > cut)\n minCut = cut;\n }\n return minCut;\n}", "public boolean wordBreakUtilTopDown(String s, Set<String> dict,int[] lookup)\n {\n int n = s.length();\n\n // return true if the end of the string is reached\n if (n == 0) {\n return true;\n }\n\n // if the sub problem is seen for the first time\n if (lookup[n] == -1)\n {\n // mark subproblem as seen (0 initially assuming string\n // can't be segmented)\n lookup[n] = 0;\n\n for (int i = 1; i <= n; i++)\n {\n // consider all prefixes of the current string\n String prefix = s.substring(0, i);\n\n // if the prefix is found in the dictionary, then recur for the suffix\n if (dict.contains(prefix) && wordBreakUtilTopDown(s.substring(i),dict, lookup))\n {\n // return true if the string can be segmented\n lookup[n] = 1;\n return true;\n }\n }\n }\n\n // return solution to the current sub problem\n return lookup[n] == 1;\n }", "static void searchWord(WordNode root, char boggle[][], int i,\n int j, boolean visited[][], String str, ArrayList<String> elements)\n {\n\n // if we found word in trie / dictionary\n if (root.isWord == true){\n// System.out.println(str.toString());\n elements.add(str.toString());\n }\n\n\n // If both I and j in range and we visited\n // that element of matrix first time\n if (isSafe(i, j, visited,boggle))\n {\n // make it visited\n visited[i][j] = true;\n\n // traverse all child of current root\n for (int K =0; K < 26; K++)\n {\n if (root.child[K] != null)\n {\n // current character\n char ch = (char) (K + 'a') ;\n\n // Recursively search reaming character of word\n // in trie for all 8 adjacent cells of\n // boggle[i][j]\n if (isSafe(i+1,j+1,visited,boggle) && Character.toLowerCase(boggle[i+1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i+1,j+1,\n visited,str+ch, elements);\n if (isSafe(i, j+1,visited,boggle) && Character.toLowerCase(boggle[i][j+1])\n == ch)\n searchWord(root.child[K],boggle,i, j+1,\n visited,str+ch, elements);\n if (isSafe(i-1,j+1,visited,boggle) && Character.toLowerCase(boggle[i-1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j+1,\n visited,str+ch, elements);\n if (isSafe(i+1,j, visited,boggle) && Character.toLowerCase(boggle[i+1][j])\n == ch)\n searchWord(root.child[K],boggle,i+1, j,\n visited,str+ch, elements);\n if (isSafe(i+1,j-1,visited,boggle) && Character.toLowerCase(boggle[i+1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i+1, j-1,\n visited,str+ch, elements);\n if (isSafe(i, j-1,visited,boggle)&& Character.toLowerCase(boggle[i][j-1])\n == ch)\n searchWord(root.child[K],boggle,i,j-1,\n visited,str+ch, elements);\n if (isSafe(i-1,j-1,visited,boggle) && Character.toLowerCase(boggle[i-1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j-1,\n visited,str+ch, elements);\n if (isSafe(i-1, j,visited,boggle) && Character.toLowerCase(boggle[i-1][j])\n == ch)\n searchWord(root.child[K],boggle,i-1, j,\n visited,str+ch, elements);\n }\n }\n\n // make current element unvisited\n visited[i][j] = false;\n }\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public List<Integer> findSubstring(String s, String[] words) {\n if (s == null || s.isEmpty() || words == null || words.length == 0) {\n return new ArrayList<>();\n }\n\n List<Integer> res = new ArrayList<>();\n int size = words.length;\n int length = words[0].length();\n\n if (s.length() < size * length) {\n return new ArrayList<>();\n }\n\n Map<String,Integer> covered = new HashMap<>();\n\n for (int j=0; j<size; j++) {\n if (s.indexOf(words[j]) < 0) {\n return res;\n }\n\n covered.compute(words[j], (k, v) -> v != null ? covered.get(k)+1 : 1);\n }\n\n int i=0;\n int sLength = s.length();\n while(sLength -i >= size * length){\n Map<String, Integer> temp = new HashMap<>(covered);\n\n for (int j=0; j<words.length; j++){\n String testStr = s.substring(i + j*length, i + (j+1)*length);\n\n if (temp.containsKey(testStr)){\n if (temp.get(testStr) == 1)\n temp.remove(testStr);\n else\n temp.put(testStr, temp.get(testStr)-1);\n }\n else {\n break;\n }\n }\n\n if (temp.size() == 0) {\n res.add(i);\n }\n\n i++;\n }\n return res;\n }", "public static void main(String[] args) {\n\n int n = 20;\n int[] input = {0, 6, 0, 6, 4, 0, 6, 0, 6, 0, 4, 3, 0, 1, 5, 1, 2, 4, 2, 4};\n String[] inStr = {\"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"ab\", \"cd\", \"ef\", \"gh\", \"ij\", \"that\", \"be\", \"to\", \"be\", \"question\", \"or\", \"not\", \"is\", \"to\", \"the\"};\n int[] count = new int[100];\n for (int i = 0; i < n; i++) {\n// String line = in.nextLine();\n// String[] elem = line.split(\"\\\\s\");\n// System.out.println(elem[0]+\" - \"+elem[1]);\n// input[i] = Integer.parseInt(elem[0]);\n// inStr[i] = elem[1];\n// count[input[i]] ++;\n }\n\n for (int i = n / 2; i < input.length; i++)\n count[input[i]]++;\n\n// for (int i = 0; i < count.length; i++)\n// System.out.print(count[i]);\n// System.out.println();\n\n int printed = 0;\n int i = 0;\n StringBuffer buffer = new StringBuffer();\n while (count[i] > 0){\n// for (int i = 0; i < count.length; i++) {\n// for (Integer st : findIndex(input, i,count[i])) {\n// System.out.print(findStr(inStr, st) + \" \");\n for (String st : findIndex(input,inStr, i,count[i])) {\n // System.out.print( st + \" \");\n buffer.append(st+\" \");\n printed++;\n }\n i++;\n }\n for (int idx = printed; idx<n;idx++)\n buffer.append(\"- \");\n // System.out.print(\"- \");\n System.out.println(buffer);\n\n\n }", "public static int ladderLength3(String beginWord, String endWord, Set<String> wordList) {\r\n Set<String> beginSet = new HashSet<String>(), endSet = new HashSet<String>();\r\n\r\n int len = 1;\r\n int strLen = beginWord.length();\r\n HashSet<String> visited = new HashSet<String>();\r\n\r\n beginSet.add(beginWord);\r\n endSet.add(endWord);\r\n while (!beginSet.isEmpty() && !endSet.isEmpty()) {\r\n if (beginSet.size() > endSet.size()) {\r\n Set<String> set = beginSet;\r\n beginSet = endSet;\r\n endSet = set;\r\n }\r\n\r\n Set<String> temp = new HashSet<String>();\r\n for (String word : beginSet) {\r\n char[] chs = word.toCharArray();\r\n\r\n for (int i = 0; i < chs.length; i++) {\r\n for (char c = 'a'; c <= 'z'; c++) {\r\n char old = chs[i];\r\n chs[i] = c;\r\n String target = String.valueOf(chs);\r\n\r\n if (endSet.contains(target)) {\r\n return len + 1;\r\n }\r\n\r\n if (!visited.contains(target) && wordList.contains(target)) {\r\n temp.add(target);\r\n visited.add(target);\r\n }\r\n chs[i] = old;\r\n }\r\n }\r\n }\r\n\r\n beginSet = temp;\r\n len++;\r\n }\r\n\r\n //solution 3: using graph\r\n //https://www.youtube.com/watch?v=h9iTnkgv05E&ab_channel=NeetCode\r\n\r\n return 0;\r\n }", "public static void main(String[] args) {\n \n String s = \"aaa bb c ccc ee\";\n String[] wordsT = s.split(\" \");\n List<String> words = new ArrayList<String>();\n for(int i = 0; i < wordsT.length; i++){\n words.add(wordsT[i]);\n }\n \n int[] palavras = {3,2,1,3,2};\n solveWordWrap(palavras,5,6);\n //System.out.println(ss);\n }", "public static void main(String[] args) {\n String s = \"catsanddog\";\n Set<String> dict = new HashSet<>();\n dict.add(\"cat\"); dict.add(\"cats\"); dict.add(\"and\"); dict.add(\"sand\"); dict.add(\"dog\");\n WordBreak solution = new WordBreak();\n List<String> result = solution.wordBreak(s, dict);\n System.out.println(result);\n }", "public static List<List<String>> breakIntoWords(String longWord, Collection<String> dict) {\n List<List<String>>[] words = new ArrayList[longWord.length() + 1];\n // words[i] = list of matching words at longWord length i\n // words[longWord.length()] is answer\n Arrays.stream(words).forEach((wl) -> wl = null);\n // contains empty list of lists\n // the first element contains an emtpty list of strings\n words[0] = new ArrayList<List<String>>();\n\n int beginIndx = -1;\n while (beginIndx < longWord.length()) {\n // beginIndx starts from 0 and goes up to length of the word -1\n // start with -1 and first index where the words[beginIndx] != null is 0\n // last value for beingIndx is wordlength -1\n while ((words[++beginIndx] == null) && (beginIndx < longWord.length())) ;\n // non null List of Lists of String\n // for index 0 it will be empty. For subsequent indices it may be non empty\n List<List<String>> beginIndxLists = words[beginIndx];\n // if beginIndx has not reached the end of the word\n // last value of beingIndx is longWord.length-1\n // need to compare the last character for which substring(wordlength-1, wordlength)\n if (beginIndx < longWord.length()) {\n // beginIdx is the start of the word, end Indx is end\n // last value for endIndx is longWord.length\n for (int endIndx = beginIndx + 1; endIndx <= longWord.length(); endIndx++) {\n String matchW = longWord.substring(beginIndx, endIndx);\n if ((matchW != null) && (!matchW.isEmpty())) {\n if (dict.contains(matchW)) {\n // list of list of Strings for getting to the endIndx\n List<List<String>> mwordsList = words[endIndx];\n if (mwordsList == null) {\n mwordsList = new ArrayList<List<String>>();\n }\n if((beginIndxLists==null)||(beginIndxLists.isEmpty())) {\n mwordsList.add(new ArrayList(Arrays.asList(matchW)));\n }\n // words[endIndx] has list of list initialized\n // there is a list at beginIndx\n // get the list of words at begingIndx. It contains at least one empty list\n else {\n for (List<String> beginList : beginIndxLists) {\n // at the matched word in the list at beginIndx and then copy it to mwordsList at endIndx\n beginList.add(matchW);\n mwordsList.add(beginList);\n }\n }\n words[endIndx] = mwordsList;\n }\n }\n }\n\n }\n\n }\n return words[longWord.length()];\n }", "public static List<Integer> findSubstringWordConcatenation(String str, String[] words) {\n assert str != null;\n assert words != null;\n List<String> wordList = new ArrayList<>();\n List<Integer> wordIndex = new ArrayList<>();\n int noOfWords = words.length, wordLength = words[0].length();\n Map<String,Integer> wordFrequencyMap = new HashMap<>();\n for(String word: words) {\n wordFrequencyMap.put(word,wordFrequencyMap.getOrDefault(word,0)+1);\n }\n\n for(int windowStart=0; windowStart <= (str.length() - (wordLength * noOfWords)); windowStart++) {\n HashMap<String, Integer> wordsSeen = new HashMap<>();\n /*now look for words*/\n for(int wrd=0; wrd<noOfWords; wrd++) {\n int wordStartIndex = windowStart + (wrd * wordLength);\n String word = str.substring(wordStartIndex, wordStartIndex+wordLength);\n if(wordFrequencyMap.containsKey(word)) {\n wordsSeen.put(word, wordsSeen.getOrDefault(word,0)+1);\n } else {\n break;// break for loop\n }\n if(wordsSeen.get(word) > wordFrequencyMap.getOrDefault(word,0)) {\n break;// frequency is more then required\n }\n if(wordsSeen.size() == wordFrequencyMap.size()) {\n wordList.add(str.substring(windowStart, wordStartIndex+wordLength));\n wordIndex.add(windowStart);\n }\n }\n }\n return wordIndex;\n }", "public static List<Integer> findWordConcatenation(String str, String[] words) {\n List<Integer> resultIndices = new ArrayList<Integer>();\n if (str == null || str.isEmpty() || words == null || words.length == 0)\n return resultIndices;\n\n int len = words[0].length();\n Map<String, Integer> freqMap = new HashMap();\n\n for (String word : words)\n freqMap.put(word, freqMap.getOrDefault(word, 0) + 1);\n\n Map<String, Integer> curMap = new HashMap();\n int l = 0, cc = 0;\n int i = 0;\n while (i < str.length() - len + 1) {\n String cur = str.substring(i, i + len);\n if (!freqMap.containsKey(cur)) {\n curMap.clear();\n ++i; l = i;\n continue;\n }\n\n curMap.put(cur, curMap.getOrDefault(cur, 0) + 1);\n if (curMap.get(cur) == freqMap.get(cur))\n cc++;\n\n while(curMap.get(cur) > freqMap.get(cur)) {\n String word1 = str.substring(l, l + len);\n curMap.put(word1, curMap.get(word1) - 1);\n if (curMap.get(word1) < freqMap.get(word1))\n --cc;\n l+=len;\n }\n\n if (cc == freqMap.size())\n resultIndices.add(l);\n i+=len;\n }\n return resultIndices;\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\t//System.out.println(Integer.toBinaryString(31));\r\n\t\tint n = in.nextInt();\r\n\t\tint[] arr = new int[n];\r\n\t\tfor(int i = 0 ;i < n; i++) {\r\n\t\t\tarr[i] = in.nextInt();\r\n\t\t}\r\n\t\tArrays.sort(arr);\r\n\t\tint[] arr1 = new int[n];\r\n\t\tint co = 0;\r\n\t\tfor(int i = n- 1; i >= 0; i--) {\r\n\t\t\tarr1[co++] = arr[i];\r\n\t\t}\r\n\t\tString[] str = new String[n];\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tstr[i] = Integer.toBinaryString(arr1[i]);\r\n\t\t}\r\n\t\tint[] countArr = new int[n];\r\n\t\tint[] countArr1 = new int[n];\r\n\t\tTreeSet<Integer> set = new TreeSet<Integer>(); \r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tcountArr[i] = 0;\r\n\t\t\tfor(int j = 0; j < str[i].length(); j++) {\r\n\t\t\t\tif(String.valueOf(str[i].charAt(j)).equals(\"1\")) {\r\n\t\t\t\t\tcountArr[i]++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tset.add(countArr[i]);\r\n\t\t}\r\n\t\tint[] arrCpy = new int[set.size()];\r\n\t\tint ct = set.size() - 1;\r\n\t\tIterator<Integer> it = set.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tarrCpy[ct--] = it.next();\r\n\t\t}\r\n\t\tfor(int i = 0; i < arrCpy.length; i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif(arrCpy[i] == countArr[j]) {\r\n\t\t\t\t\tSystem.out.println(arr1[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<Integer> partitionLabels(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n int[] lastIndex = new int[26]; //cuz only lower case letters will be given to us\n\n //finding the lastIndexes of all the characters in the given string so that inside the loop start->end, we don't have to\n //do S.lastIndexOf('someCharacter') over & over cuz if we do that than the solution will be O(n^2) cuz string.lastIndexOf loops\n //through the string everytime it needs to find the last occurance & if the character happens to be at the end of the string\n //than it'll string.lastIndexOf would have to loop through the entire string over and over inside the start->end loop\n for(int i=0; i< S.length(); i++) {\n //subtracting the current character from a that's how we can map the lower case letters to an array of 26 Eg. 'a' -'a' = 0, 'b' -'a' = 1 so on and so forth. Otherwise we can also use an array of length 128 and loop from 97->122 but the array slots from 0->97 & 123->128 will be taking memory for nothing\n lastIndex[S.charAt(i) - 'a'] = i;\n }\n\n int start=0, end = 0, extendedEnd = 0;\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = lastIndex[startCharacter - 'a'];\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n //checking if the current character that lies in the window start till end has last occurance index that's greater than current end, than we extend end.\n //NOTE: if we don't check the occurance like lastIndex[S.charAt(i)- 'a'] instead we check it like lastIndex[i], we won't be getting correct answer cuz lastIndex[] contains last occurances of characters from a-z\n //the characters in String S might not occur in the order a-z. They'll be jumbled across the string.\n //therefore in order to get the last occurance of current character, we do it like lastIndex[S.charAt(i)- 'a']\n if(lastIndex[S.charAt(i)- 'a'] > end) {\n extendedEnd = lastIndex[S.charAt(i)- 'a'];\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }", "private int[] _make_words(int[] l,int n,int sparsecount){\n int count=0;\n int[] marker = new int[33];\n int[] r = new int[(sparsecount > 0?sparsecount:n)];\n\n for(int i=0;i<n;i++){\n int length=l[i];\n if(length>0){\n int entry=marker[length];\n \n /* when we claim a node for an entry, we also claim the nodes\n\t below it (pruning off the imagined tree that may have dangled\n\t from it) as well as blocking the use of any nodes directly\n\t above for leaves */\n \n /* update ourself */\n if(length<32 && (entry>>length) != 0){\n\t/* error condition; the lengths must specify an overpopulated tree */\n\treturn null;\n }\n r[count++]=entry;\n\n /* Look to see if the next shorter marker points to the node\n\t above. if so, update it and repeat. */\n {\n\tfor(int j=length;j>0;j--){\n\t \n\t if((marker[j]&1) != 0){\n\t /* have to jump branches */\n\t if(j==1)\n\t marker[1]++;\n\t else\n\t marker[j]=marker[j-1]<<1;\n\t break; /* invariant says next upper marker would already\n\t\t have been moved if it was on the same path */\n\t }\n\t marker[j]++;\n\t}\n }\n \n /* prune the tree; the implicit invariant says all the longer\n\t markers were dangling from our just-taken node. Dangle them\n\t from our *new* node. */\n for(int j=length+1;j<33;j++)\n\tif((marker[j]>>1) == entry){\n\t entry=marker[j];\n\t marker[j]=marker[j-1]<<1;\n\t}else\n\t break;\n }else\n if(sparsecount==0)count++;\n }\n \n /* bitreverse the words because our bitwise packer/unpacker is LSb\n endian */\n int i = 0;\n for(i=0,count=0;i<n;i++){\n int temp=0;\n for(int j=0;j<l[i];j++){\n temp<<=1;\n temp|=(r[count]>>j)&1;\n }\n\n// System.out.println( \"mkwrd \" + temp);\n if(sparsecount != 0){\n if(l[i] != 0)\n\tr[count++]=temp;\n }else\n r[count++]=temp;\n }\n\n return(r);\n}", "private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }", "private void findValidWordsOnBoard(){\n\n //mark each visited cell to ensure it gets used only once while forming a word\n boolean[][] visited = new boolean[boardLength][boardLength];\n String word = \"\";\n\n for(int i = 0; i < boardLength; i++) {\n for(int j = 0; j < boardLength; j++)\n findWordsOnBoard(word, visited, board, i, j);\n }\n }", "public static void findLongestSubPalindramic(String s) {\n\t\tchar[] arr = s.toCharArray();\n\t\tint begin = -1;\n\t\tint end;\n\t\tint temp_begin;\n\t\tint maxLength = -1;\n\t\tboolean[][] table = new boolean[1000][1000];\n\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\ttable[i][i] = true;\n\t\t}\n\t\tfor (int i = 0; i < s.length() - 1; i++) {\n\t\t\tif (arr[i] == arr[i + 1]) {\n\t\t\t\ttable[i][i + 1] = true;\n\t\t\t\tbegin = i;\n\t\t\t\tmaxLength = 2;\n\t\t\t}\n\t\t}\n\t\tfor (int len = 2; len < arr.length; len++) {\n\t\t\tfor (int i = 0; i < arr.length - len + 1; i++) {\n\t\t\t\tint j = len + i - 1;\n\t\t\t\tif (table[i + 1][j - 1] && (arr[i] == arr[j])) {\n\t\t\t\t\ttable[i][j] = true;\n\t\t\t\t\tif (j - i + 1 > maxLength) {\n\t\t\t\t\t\tbegin = i;\n\t\t\t\t\t\tmaxLength = maxLength + 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"begin:\" + begin + \", length:\" + maxLength);\n\t}", "public int minCut2(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n // List<List<String>> res = new ArrayList<>();\n helper2(s, 0, cut, dp, 0);\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }", "public String[] findPath(String[] dictionary, String startWord, String endWord) {\n // Use A queue to save all the words to check and use BFS\n LinkedList<String> queue = new LinkedList<>();\n queue.addFirst(startWord);\n // Use an ArrayList to save the words visited\n ArrayList<String> visited = new ArrayList<>();\n // Use an ArrayList to save the parents of the words (in visited)\n ArrayList<Integer> parent = new ArrayList<>();\n parent.add(-1);\n int index = 0;\n String current;\n boolean founded = false;\n while (!queue.isEmpty()){\n current = queue.removeFirst(); //Remove the first word\n int currentI = visited.size(); // Get index for saving parent\n visited.add(current);\n //Check all available words and save to the arrayList\n for (int i = 0; i < current.length(); i++) {\n //Replace from the first letter\n for (char j = 'A'; j <= 'Z'; j++) {\n char[] neww = current.toCharArray();\n neww[i] = j;\n String newWord = String.valueOf(neww);\n //Check if the new word is a valid word\n if (checkDict(newWord,dictionary)){\n //Check if visited or in queue\n if (visited.contains(newWord)||queue.contains(newWord)) continue;\n //Add into queue\n queue.addLast(newWord);\n //Record parents\n parent.add(currentI);\n //Check if equals to end\n if (newWord.compareTo(endWord)==0) {\n founded = true;\n break;\n }\n }\n }\n if (founded) break;\n }\n if (founded) break;\n }\n if (founded){\n LinkedList<Integer> stack = new LinkedList<>();\n stack.addFirst(parent.get(parent.size()-1));\n while (parent.get(stack.getFirst())!=-1){\n stack.addFirst(parent.get(stack.getFirst()));\n }\n int size = stack.size();\n String result[] = new String[size+1];\n result[0] = startWord;\n stack.removeFirst();\n for (int i = 1; i <size; i++) {\n result[i] = visited.get(stack.removeFirst());\n }\n result[size] = endWord;\n return result;\n }\n return new String[0];\n }", "public boolean[] validatePossibility(String s, Set<String> set, boolean[][] isWord) {\n \t/*\n \tboolean[] valid = new boolean[s.length() + 1];\n \tvalid[s.length()] = true;\n\n \tint maxLeng = getMaxLength(set);\n \tfor (int i = s.length() - 1; i >= 0; i--) {\n \t\tfor (int j = i; j < s.length() && (j - i) <= maxLeng; j++) {\n \t\t\tif (isWord[i][j] && valid[j + 1]) {\n \t\t\t\tvalid[i] = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}*/\n// boolean[] valid = new boolean[s.length() + 1];\n// valid[0] = true;\n// int maxLength = getMaxLength(set);\n// for (int i = 0; i < s.length(); i++) {\n// for (int j = 0; j < i && j < maxLength; j++) {//iterate [0 ~ i]\n// if (isWord[i - j][i] && isValid[i - j + 1])) {\n// valid[i + 1] = true;\n// break;\n// }\n// }\n// }\n//\n// return valid;\n\n boolean[] rst = new boolean[s.length() + 1];\n rst[0] = true;\n if (s == null || set.contains(s)) {\n return rst;\n }\n for (int i = 0; i < s.length(); i++) {\n for (int j = 0; j <= i; j++) {\n if (rst[j] && set.contains(s.substring(j, i + 1))) {\n rst[i + 1] = true;\n break;\n }\n }\n }\n return rst;\n }", "public static void main(String[] args) { String s = \"catsanddog\";\n// List<String> wordDict = new ArrayList<>(Arrays.asList(\"cat\", \"cats\", \"and\", \"sand\", \"dog\"));\n//\n String s = \"pineapplepenappl\";\n List<String> wordDict = new ArrayList<>(Arrays.asList(\"apple\", \"pen\", \"applepen\", \"pine\", \"pineapple\"));\n\n WordBreak140 tmp = new WordBreak140();\n tmp.wordBreak(s, wordDict);\n }", "public int minCut1(String s) {\n boolean[][] dp = new boolean[s.length()][s.length()];\n for (int len = 1; len <= s.length(); len++) {\n for (int i = 0; i <= s.length() - len; i++) {\n int j = i + len - 1;\n dp[i][j] = s.charAt(i) == s.charAt(j) && (len < 3 || dp[i + 1][j - 1]);\n }\n }\n\n int[] cut = new int[1];\n cut[0] = Integer.MAX_VALUE;\n List<List<String>> res = new ArrayList<>();\n helper1(s, 0, cut, dp, res, new ArrayList<>());\n // System.out.format(\"res: %s\\n\", res);\n return cut[0];\n }", "public int countSubstrings(String s) {\n int l = s.length();\n cache = new int[l][l];\n\n for (int[] is : cache) {\n Arrays.fill(is, -1);\n }\n\n for (int i = 0; i < l; i++) {\n cache[i][i] = 1;\n }\n\n for (int i = 0; i < l; i++) {\n for (int j = i + 1; j < l; j++) {\n char c1, c2;\n c1 = s.charAt(i);\n c2 = s.charAt(j);\n if (c1 == c2) {\n if (j == i + 1 && cache[i][j] == -1) {\n cache[i][j] = 1;\n } else if (cache[i][j] == -1) {\n cache[i][j] = solve(s, i + 1, j - 1);\n }\n } else {\n cache[i][j] = 0;\n }\n }\n }\n\n int total = 0;\n\n for (int[] is : cache) {\n for (int i : is) {\n if (i > 0) {\n total += i;\n }\n }\n }\n\n return total;\n }", "static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n if (map.containsKey(s))\n return map.get(s);\n\n LinkedList<String>res = new LinkedList<String>();\n if (s.length() == 0) {\n res.add(\"\");\n return res;\n }\n for (String word : wordDict) {\n if (s.startsWith(word)) {\n List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n for (String sub : sublist)\n res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub);\n }\n }\n map.put(s, res);\n return res;\n }", "public List<String> wordSubsets(String[] A, String[] B) {\n Map<String, Map<Character, Integer>> map = new HashMap<>();\n\n for(String b: B){\n Map<Character, Integer> cur = new HashMap<>();\n for(char c: b.toCharArray()){\n cur.put(c, cur.getOrDefault(c, 0) + 1);\n }\n map.put(b, cur);\n }\n\n List<String> res = new ArrayList<>();\n for(String a: A){\n Map<Character, Integer> aCur = new HashMap<>();\n for(char c: a.toCharArray()){\n aCur.put(c, aCur.getOrDefault(c, 0) + 1);\n }\n boolean isValid = true;\n for(String other: B){\n if(!valid(map, other, aCur)){\n isValid = false;\n break;\n }\n }\n if(isValid) res.add(a);\n }\n return res;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner info = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the phrase:\");\r\n\t\tString sentence = info.nextLine();\r\n\t\t\r\n\t\tsentence = sentence.trim().toUpperCase();\r\n\t\t\r\n\t\tfor (int i = 0; i < sentence.length(); i++) {\r\n\t\t\tif (sentence.charAt(i) <'A' || sentence.charAt(i) > 'Z' ) {\r\n\t\t\t\tsentence = sentence.replace(\"\"+sentence.charAt(i), \"/\");\r\n//\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString[] word = sentence.split(\"/\") ;\r\n\t\t\r\n\t\tint total = 0;\r\n\t\tif (word.length < 1) {\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\tHashMap hMap = new HashMap();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (word[0].length() > 0) {\r\n\t\t\t\thMap.put(word[0].length(), 1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (int i = 1; i < word.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < i; j++) {\r\n\t\t\t\t\tif (word[i].length() == word[j].length()) {\r\n\t\t\t\t\t\tint cnt = (int) hMap.get(word[i].length());\r\n\t//\t\t\t\t\tSystem.out.println(\"cnt==>\"+cnt);\r\n\t\t\t\t\t\thMap.put(word[i].length(),++cnt);\r\n\t\t\t\t\t\t\t\r\n\t//\t\t\t\t\tSystem.out.println(word[i].length()+\"==>\"+hMap.get(word[i].length()));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (j == (i-1)){\r\n\t\t\t\t\t\t\thMap.put(word[i].length(), 1);\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\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSet<Integer> keys1 = hMap.keySet();\r\n\t\r\n\t\t\tfor(int key:keys1) {\r\n\t\t\t\tif (key !=0) {\r\n\t\t\t\t\tSystem.out.println(hMap.get(key)+\" \"+key +\" letter words\");\r\n\t\t\t\t\ttotal += (int)hMap.get(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(total+\" total words\");\r\n\t\t\r\n\t}", "private static void searchWords(boolean[][] check, int row, int col, char[][] boogle, TrieNode root, String str){\n \t\n \tif(root.isLeaf==true) {\n \t\tSystem.out.println(str);\n \t}\n\n \tif(isSafe(check, row, col)){\n \t\tcheck[row][col] = true;\n\n \t\tfor(int i=0; i<SIZE; i++){\n \t\t\tif(root.child[i] != null){\n \t\t\t\tchar c = (char)(i + 'A');\n \t\t\t\tif(isSafe(check, row-1, col) && boogle[row-1][col]==c) searchWords(check, row-1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col+1) && boogle[row-1][col+1]==c) searchWords(check, row-1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col+1) && boogle[row][col+1]==c) searchWords(check, row, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col+1) && boogle[row+1][col+1]==c) searchWords(check, row+1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col) && boogle[row+1][col]==c) searchWords(check, row+1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col-1) && boogle[row+1][col-1]==c) searchWords(check, row+1, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col-1) && boogle[row][col-1]==c) searchWords(check, row, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col-1) && boogle[row-1][col-1]==c) searchWords(check, row-1, col-1, boogle, root.child[i], str+c);\n \t\t\t}\n \t\t}\n \t\tcheck[row][col] = false;\n \t}\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"whereami.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"whereami.out\")));\n\n //reads in and initializes n and k values\n StringTokenizer st = new StringTokenizer(f.readLine());\n int stringSize = Integer.parseInt(st.nextToken());\n\n st = new StringTokenizer(f.readLine());\n //initializes variable for input string\n String string = st.nextToken();\n\n //computes all subsequences and adds to set\n subsequence(string, string.length());\n\n boolean[] checks= new boolean[stringSize];\n\n int smallestSize = 0;\n\n for (int i = 0; i < stringSize; i++) {\n checks[i] = true;\n for (String s : subSequences) {\n if (s.length() == i + 1 && numberOccurrences(string, s) != 1) {\n checks[s.length() - 1] = false;\n }\n }\n if (checks[i] == true) {\n smallestSize = i + 1;\n break;\n }\n }\n\n out.println(smallestSize);\n out.close();\n }", "private ArrayList<String> allWords(int ret, ArrayList<Character> mustIn){\n String mustContain = \"\";\n for (int inde = 0; inde < mustIn.size(); inde++) {\n mustContain+=mustIn.get(inde);\n }\n \n ArrayList<String> allAnagrams = new ArrayList<String>();\n \n for (int inde = 0; inde < combinations.size(); inde++){\n ArrayList<Piece> temp = combinations.get(inde);\n if (temp.size()<=ret){\n String lettersToAdd = \"\";\n \n for (int i = 0; i < temp.size(); i++)\n lettersToAdd +=temp.get(i).theLetter();\n \n allAnagrams.add(mustContain+\"\"+lettersToAdd);\n }\n }\n \n return allAnagrams;\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public boolean wordBreakUtil(String s,Set<String> set){\n\n if (s.length() == 0){\n return true;\n }\n\n for (int i=1; i <= s.length(); i++){\n\n // consider all prefixes of the current string\n String prefix = s.substring(0,i);\n\n // return true if the prefix is present in the dictionary and the\n // remaining string also forms a space-separated sequence of one or\n // more dictionary words\n if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){\n return true;\n }\n }\n\n return false;\n }", "public static void main(String[] args)\n {\n String string = \"101101101\";\n int[][] dp = new int[string.length()+1][string.length() +1];\n int len = string.length();\n for (int i=0 ; i<= len ;i++) {\n for (int j=0 ;j<=len ;j++) {\n dp[i][j] = -1;\n }\n }\n System.out.println(minPartitions(string, 0, string.length() -1, dp));\n }", "public int expressiveWords(String S, String[] words) {\n if (S == null || S.length() == 0) return 0;\n RLE base = new RLE(S);\n int ans = 0;\n for (String w : words) {\n RLE current = new RLE(w);\n if (base.chars.size() != current.chars.size()) continue;\n boolean canExtend = true;\n for (int i = 0; i < base.chars.size(); i++) {\n if (base.chars.get(i) != current.chars.get(i)) {\n canExtend = false;\n break;\n }\n int bc = base.counts.get(i);\n int cc = current.counts.get(i);\n //base count <= 2 , or base count > 2\n if ((bc <= 2 && bc != cc) || (bc > 2 && cc > bc)) {\n canExtend = false;\n break;\n }\n }\n if (canExtend) ans++;\n }\n return ans;\n }", "private String solveProblem(String element) {\r\n int[] count = new int[27];\r\n for(char c : element.toCharArray()) {\r\n count[convChar(c)]++;\r\n }\r\n int[] nums = new int[10];\r\n extra(count, nums, \"FOUR\", count[convChar('U')], 4);\r\n extra(count, nums, \"SIX\", count[convChar('X')], 6);\r\n extra(count, nums, \"EIGHT\", count[convChar('G')], 8);\r\n extra(count, nums, \"ZERO\", count[convChar('Z')], 0);\r\n extra(count, nums, \"TWO\", count[convChar('W')], 2);\r\n extra(count, nums, \"ONE\", count[convChar('O')], 1);\r\n extra(count, nums, \"THREE\", count[convChar('T')], 3);\r\n extra(count, nums, \"FIVE\", count[convChar('F')], 5);\r\n extra(count, nums, \"SEVEN\", count[convChar('S')], 7);\r\n extra(count, nums, \"NINE\", count[convChar('I')], 9);\r\n \r\n for(int i : count) {\r\n if(i > 0) {\r\n throw new RuntimeException(i + \"\");\r\n }\r\n }\r\n\r\n StringBuilder sb = new StringBuilder();\r\n for(int i = 0; i <= 9; i++) {\r\n for(int j = 0; j < nums[i]; j++) {\r\n sb.append(i);\r\n }\r\n }\r\n \r\n \r\n return sb.toString();\r\n }", "public boolean canBreak(String input, String[] dict) {\n Set<String> dicSet = toSet(dict);\n // NOTICE: sometimes it will be handy to have such index matching, canBreak[i] represents index(i-1) in input,\n // also can represent the substring(0,i).\n // M[i] 代表前i个字母是否能被分解为一个或多个单词在dict里面。\n // M[j] 相当于左大段,查表, 0 <= j < i。 如果在就是true。\n // 同时 右小段的 string[j,i-1] 必须在dict里面。\n boolean[] canBreak = new boolean[input.length() + 1]; // include 0.\n canBreak[0] = true; // base case , 每个单词用0次。 空字符串 \"\"\n for (int i = 1; i < canBreak.length; i++) {\n // enumerate the rightmost split\n for (int j = 0; j < i; j++) {\n // cut at the left of input[j].\n // check the subproblem and check the rest of the string.\n System.out.println(input);\n System.out.println(\"j: \" + j + \", i:\" + i + \" \" + \"左大段查表:M[j]: \" + canBreak[j] + \", check dic for subString (右小段): \"\n + input.substring(j, i) + \"是否在dic内: \" + dicSet.contains(input.substring(j, i)));\n if (dicSet.contains(input.substring(j, i)) && canBreak[j]) {\n System.out.println(\"enter if, \" + \"j: \" + j + \", i: \" + i);\n canBreak[i] = true;\n break;\n }\n }\n System.out.println(\"======\");\n }\n return canBreak[canBreak.length - 1];\n }", "public static void main(String[] args) {\n String s = \"applepenapple\";\n List<String> wordDict = new ArrayList<>();\n wordDict.add(\"apple\");\n wordDict.add(\"pen\");\n// String s = \"catsandog\";\n// List<String> wordDict = new ArrayList<>();\n// wordDict.add(\"cats\");\n// wordDict.add(\"dog\");\n// wordDict.add(\"sand\");\n// wordDict.add(\"cat\");\n\n System.out.println(wordBreak2(s, wordDict));\n }", "static int findPPCuts(String str){\n boolean[][] isPalindrome = new boolean[str.length()][str.length()];\n\n for(int i = 0; i<str.length();i++)\n isPalindrome[i][i]=true;\n\n for(int startIndex=str.length()-1;startIndex >=0; startIndex--){\n for(int endIndex=startIndex+1;endIndex<=str.length()-1;endIndex++){\n if(str.charAt(startIndex)==str.charAt(endIndex)){\n // if it's a two character string or if the remaining string is a palindrome too\n if(endIndex - startIndex == 1 || isPalindrome[startIndex+1][endIndex-1]){\n isPalindrome[startIndex][endIndex]=true;\n }\n }\n }\n }\n\n // now lets populate the second table, every index in 'cuts' stores the minimum cuts needed\n // for the substring from that index till the end\n int[] cuts = new int[str.length()];\n for(int startIndex=str.length()-1;startIndex>=0;startIndex--){\n int minCuts = str.length();\n for(int endIndex=str.length()-1; endIndex>=startIndex; endIndex--){\n // we can cut here as we got a palindrome\n // also we dont need any cut if the whole substring is a palindrome\n if(isPalindrome[startIndex][endIndex]){\n minCuts = (endIndex == str.length()-1) ? 0:Math.min(minCuts, 1 + cuts[endIndex+1]);\n }\n }\n cuts[startIndex]=minCuts;\n }\n return cuts[0];\n }", "private void start(Substring sub) {\n\t\tint i=0,j=0,k=0,l=0,m=0,n=0,sum=sub.n;\n\t\tfor(i=1;i<sub.n;i++)\n\t\t{\n\t\t\tfor(j=0,l=i;l<sub.n;j++,l++)\n\t\t\t{\n\t\t\t\t//HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();\n\t\t\t\tint[]count=new int[10000];\n\t\t\t\t\t\tfor(m=j;m<=l;m++) {\n\t\t\t\t\t\t\tcount[sub.arr[m]]++;\n\t\t\t\t\t\t\tif(count[sub.arr[m]]<=1) {continue;}\n\t\t\t\t\t\t\telse break;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tif(m==l+1)sum=sum+i+1;\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "static int sherlockAndAnagrams(String s) {\n int total = 0;\n for (int width = 1; width <= s.length() - 1; width++) {\n\n for(int k = 0 ;k <= s.length() - width; k++){\n\n String sub = s.substring(k, k + width);\n\n int[] subFreq = frequenciesOf(sub);\n for (int j = k + 1; j <= s.length() - width; j++) {\n String target = s.substring(j, j + width);\n if (areAnagrams(subFreq,frequenciesOf(target))) total = total + 1;\n }\n }\n }\n return total;\n }", "static void subsequence(String str)\n {\n // iterate over the entire string\n for (int i = 0; i < str.length(); i++) {\n \n // iterate from the end of the string\n // to generate substrings\n for (int j = str.length(); j > i; j--) {\n String sub_str = str.substring(i, j);\n \n if (!st.contains(sub_str))\n st.add(sub_str);\n \n // drop kth character in the substring\n // and if its not in the set then recur\n for (int k = 0; k < sub_str.length(); k++) {\n StringBuffer sb = new StringBuffer(sub_str);\n \n // drop character from the string\n sb.deleteCharAt(k);\n if (!st.contains(sb)) {\n \tsubsequence(sb.toString());\n }\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public List<List<Integer>> findSubsequences3(int[] nums) {\n //below set is not working\n Set<List<Integer>> ret = new HashSet<>();\n\n ret.add(new ArrayList<>());\n int index = 0;\n while (index < nums.length) {\n //try to add nums[index]\n\n Set<List<Integer>> newly_added_set = new HashSet<>();\n\n for (List<Integer> l : ret) {\n if (l.size() <= 0 || l.get(l.size() - 1) <= nums[index]) {\n List<Integer> newList = new ArrayList<>(l);\n newList.add(nums[index]);\n newly_added_set.add(newList);\n }\n }\n\n ret.addAll(newly_added_set);\n\n ++index;\n }\n\n List<List<Integer>> ret2 = new ArrayList<>();\n for (List<Integer> l : ret) {\n if (l.size() >= 2) {\n ret2.add(l);\n }\n }\n return ret2;\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "static HashMap <Integer, Double>[] getWordId(Row row, List <String> id2Word, int windowSize) {\n\t\tMap <String, Integer> word2Id = new HashMap <>();\n\t\tString str = row.getField(1).toString().replaceAll(\"[\\\\pP+~$`^=|<>~`$^+=|<>¥×]\", \"\");\n\t\tList <String> words = Arrays.asList(str.trim().split(\"\\\\s+\"));\n\t\tInteger ct = 0;\n\t\tfor (String word : words) {\n\t\t\tif (!word2Id.containsKey(word)) {\n\t\t\t\tword2Id.put(word, ct++);\n\t\t\t\tid2Word.add(word);\n\t\t\t}\n\t\t}\n\t\tint len = id2Word.size();\n\t\tHashMap <Integer, Double>[] sets = new HashMap[len];\n\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\tsets[i] = new HashMap <>();\n\t\t}\n\t\tfor (int i = 0; i < words.size(); i++) {\n\t\t\tint end = i + windowSize;\n\t\t\tend = end < words.size() ? end : words.size();\n\t\t\tfor (int j = i + 1; j < end; j++) {\n\t\t\t\tif (!words.get(i).equals(words.get(j))) {\n\t\t\t\t\tsets[word2Id.get(words.get(i))].put(word2Id.get(words.get(j)), 1.0);\n\t\t\t\t\tsets[word2Id.get(words.get(j))].put(word2Id.get(words.get(i)), 1.0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sets;\n\t}", "private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }", "public int minCut(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[][] dp = new int[len][len];\n for (int i = 0; i < len; i++) {\n Arrays.fill(dp[i], len + 1);\n dp[i][i] = 0; // [i,i] is palindome, no need to cut\n }\n for (int l = 2; l <= len; l++) {\n for (int i = 0; i < len - l + 1; i++) {\n int j = l + i - 1;\n if (isPalindrome(i, j, s)) dp[i][j] = 0;\n else {\n for (int k = i; k < j; k++) {\n dp[i][j] = Math.min(dp[i][j], 1 + dp[i][k] + dp[k + 1][j]);\n }\n }\n }\n }\n\n return dp[0][len - 1];\n }", "int countSusbset(int n, int w){\n int dp[][] = new int[n+1][w+1];\n for(int i=0;i<=n;i++){\n for(int j=0;j<=w;j++){\n //when no items are there and target sum is 0, only one empty subset is possible\n if(i == 0 && j == 0){\n dp[i][j] = 1;\n }\n //no items left and target sum is greater than 0, no set is possible\n else if(i == 0 && j > 0){\n dp[i][j] = 0; \n }\n //if target sum is 0, no matter how many items we have , only one empty subset is possible\n else if(j == 0){\n dp[i][j] = 1;\n }\n //since item > target sum, so exclude\n else if(arr[i-1] > j){\n dp[i][j] = dp[i-1][j];\n }else{\n //two cases include and exclude\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }\n }\n }\n return dp[n][w];\n}", "public ArrayList<String> FindAllCombinationWord(String str) {\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n int n = str.length();\r\n ArrayList<String> combinationWord = permute(str, 0, n - 1);\r\n\r\n for (String item : combinationWord) {\r\n int j = 0;\r\n for (int i = n; i >= 2; i--) {\r\n String finalString = item.substring(j);\r\n\r\n if (!wordList.contains(finalString)) {\r\n wordList.add(finalString);\r\n }\r\n j++;\r\n }\r\n }\r\n return wordList;\r\n }", "static void printWordsUtil(int number[], int curr_digit, char output[],\r\n\t\t\tint n) {\n\t\tint i = 0;\r\n\t\tif (curr_digit == n) {\r\n\t\t\tSystem.out.print(output.toString());\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Try all 3 possible characters for current digit in number[]\r\n\t\t// and recur for remaining digits\r\n\t\twhile (curr_digit < n) {\r\n\t\t\twhile (i < hashTable[number[curr_digit]].length()) {\r\n\t\t\t\tif (number[curr_digit] == 0 || number[curr_digit] == 1) {\r\n\t\t\t\t\tcurr_digit++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\toutput[curr_digit] = hashTable[number[curr_digit]].charAt(i);\r\n\t\t\t\tprintWordsUtil(number, curr_digit + 1, output, n);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tcurr_digit++;\r\n\t\t}\r\n\t}", "static int sherlockAndAnagrams(String s){\n // Complete this function\n ArrayList<String> substringArray = new ArrayList<>();\n for(int i=0;i<s.length();i++){\n for(int j=i+1;j<s.length()+1;j++){\n substringArray.add(s.substring(i,j));\n }\n }\n int count = countAnagrams(substringArray);\n return count;\n }", "int max_cut_2(String s)\n {\n\n if(s==null || s.length()<2)\n {\n return 0;\n }\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cut = new int[n];\n for(int i = n-1;i>=0;i++) {\n\n //i represents the 左大段和右小段的左边界\n //j represents the 右小段的右边界\n cut[i] = n - 1 - i;\n\n for (int j = i; j < n; j++) {\n if (s.charAt(i) == s.charAt(j) && (j - i < 2 || dp[i + 1][j - 1]))\n {\n dp[i][j] = true;\n if(j == n-1)\n {\n cut[i]=0;\n }\n else{\n cut[i] = Math.min(cut[i],cut[j+1]+1);\n }\n }\n }\n }\n\n return cut[0];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }", "public static void main(String[] args) {\n\t\tString s=\"22\";\n\t\t\n\t\tif(s.indexOf(\"1\")>=0||s.equals(\"\"))\n\t\t\tSystem.out.println(\"hello\");\n\t\t\t\n\t\tArrayList f=new ArrayList();\n\t\tint stack[]=new int[2*s.length()];\n\t\tint top=-1;\n\t\tchar a[][]=new char[][]{{},{},{'#','a','b','c','#'},{'#','d','e','f','#'},{'#','g','h','i','#'},{'#','j','k','l','#'},{'#','m','n','o','#'},{'#','p','q','r','s','#'},{'#','t','u','v','#'},{'#','w','x','y','z','#'}};\n\t\tint length[]=new int []{0,0,3,3,3,3,3,4,3,4};\n\t\tStringBuilder ans=new StringBuilder();\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tint x=stack[++top]=(int)s.charAt(i)-'0';\n\t\t\tans.append(a[x][1]);\n\t\t\tstack[++top]=1;\n\t\t}\n\t\twhile(stack[1]!=length[(int)s.charAt(0)-'0']+1){\n\t\t\tif(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\tif(s.length()==(top+1)/2){\n\t\t\t\t\twhile(a[stack[top-1]][stack[top]]!='#'){\n\t\t\t\t\t\tint r=(top-1)/2;\n\t\t\t\t\t\tchar r1=a[stack[top-1]][stack[top]];\n\t\t\t\t\t\tans.setCharAt(r, r1);\n\t\t\t\t\t\tString ans1=ans.toString();\n\t\t\t\t\t\tf.add(ans1);\n\t\t\t\t\t\tstack[top]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t\t\ttop+=2;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[top]=1;\n\t\t\t\ttop-=2;\n\t\t\t\tstack[top]++;\n\t\t\t\tans.setCharAt((top-1)/2, a[stack[top-1]][stack[top]]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(f.size());\n\t}", "public static void main (String[]args){\n String[] test = {\"1, 3, 4, 7, 13\", \"1, 2, 4, 13, 15\"};\n Stream<String> testStrings = Arrays.stream(test);\n testStrings.map(s -> s.split(\",\"))\n .flatMap(Arrays::stream).distinct()\n .collect(Collectors.toList())\n .forEach(System.out::print);\n //FindIntersection(test);\n //System.out.println(LongWord(test));\n\n }", "public int countSubstrings(String s) {\n int count =0;\n int n = s.length();\n boolean[][] isPall = new boolean[n][n];\n \n for(int len =0;len<n;len++){\n \n for(int i=0,j=len;j<n;i++,j++){\n if(len == 0){\n isPall[i][j] = true;\n }\n else if(len == 1){\n isPall[i][j] = s.charAt(i) == s.charAt(j);\n }\n else{\n isPall[i][j] = (s.charAt(i) == s.charAt(j) &&\n isPall[i+1][j-1]);\n }\n \n if(isPall[i][j]){\n count++;\n }\n }\n \n } \n return count;\n }", "public static Tree solve() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n Map<Integer, Set<Integer>> map = new HashMap<Integer,Set<Integer>>();\n int[] valArr = new int[n];\n int[] colArr = new int[n];\n for(int i =0;i<n;i++){\n valArr[i] = scan.nextInt();\n }\n for(int i =0;i<n;i++){\n colArr[i] = scan.nextInt();\n }\n for(int i=0;i<n-1;i++){\n //10^10 / 1024/ 1024/1024, 10GB\n int a = scan.nextInt()-1;\n int b = scan.nextInt()-1;\n \n //Tree[] treeArr = new Tree[n];\n if(map.containsKey(a)){\n map.get(a).add(b);\n }else{\n Set<Integer> set = new HashSet<Integer>();\n set.add(b);\n map.put(a,set);\n }\n //case 1-2, 2-1\n if(map.containsKey(b)){\n map.get(b).add(a);\n }else{\n Set<Integer> set = new HashSet<Integer>();\n set.add(a);\n map.put(b,set);\n } \n }\n Set<Integer> visited = new HashSet<Integer>();\n Tree root =buildTree(map,0,0,valArr,colArr);\n return root;\n }", "public Set<List<String>> getCombination(int[] inHand) {\n Set<List<String>> result = new HashSet<>();\n for (int i = 0; i < inHand.length; i++) {\n if (inHand[i] < 1) continue;\n int[] copyHand = copyArray(inHand);\n //possibility of A AA AAA\n for (int j = 1; j <= inHand[i]; j++) {\n if (j == 1) {\n String cSet = \"\";\n\n for (int seq = i; seq <= i + 2; seq++) {\n if (seq >= inHand.length || copyHand[seq] < 1) continue;\n cSet += seq;\n copyHand[seq] -= 1;\n }\n// System.out.println(\"i: \" + i + \" j: \" + j+\"inhand: \" + arrayToString\n// (inHand));\n\n Set<List<String>> a = getCombination(copyHand);\n Set<List<String>> newA = new HashSet<>();\n for (List<String> s : a) {\n s.add(cSet);\n s.sort(Comparator.naturalOrder());\n if (s.equals(\"\")) continue;\n newA.add(s);\n }\n result.addAll(newA);\n continue;\n }\n\n String currentSet = \"\";\n int[] copyOfInHand = copyArray(inHand);\n for (int t = 0; t < j; t++) {\n currentSet += i;\n }\n\n copyOfInHand[i] -= j;\n Set<List<String>> after = getCombination(copyOfInHand);\n Set<List<String>> newAfter = new HashSet<>();\n for (List<String> s : after) {\n s.add(currentSet);\n s.sort(Comparator.naturalOrder());\n newAfter.add(s);\n }\n result.addAll(newAfter);\n }\n }\n if (result.isEmpty()) result.add(new ArrayList<>());\n int min = result.stream().map(set -> set.size()).min(Comparator\n .naturalOrder()).get();\n Set<List<String>> minSets = result.stream().filter(set -> set.size() == min)\n .collect(Collectors\n .toSet());\n// combinationCache.put(inHand, minSets);\n return minSets;\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString input1=sc.nextLine();\r\ninput1=input1.toLowerCase();\r\nint l=input1.length();\r\nchar a[]=input1.toCharArray();\r\nint d[]=new int[1000];\r\nString str=\"\";\r\nint i=0,k1=0,k2=0,m=0,c1=0,c2=0,c3=0,l1=0,u=0,u1=0;\r\nchar b[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\r\nfor(i=0;i<l;i++)\r\n{ c3=0;\r\n\tif(a[i]==' ')\r\n\t{u=i;c3=0;\r\n\t\tfor(k1=u1,k2=i-1;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tu1=i+1;\r\n\t\tc3=0;\r\n\t}\r\n\tif(i==l-1)\r\n\t{\r\n\t\tfor(k1=u+1,k2=i;k1<k2 && k2>k1;k1++,k2--)\r\n\t\t{ c1=0;c2=0;\r\n\t\t\tfor(m=0;m<26;m++)\r\n\t\t\t{\r\n\t\t\t\tif(b[m]==a[k1]) {\r\n\t\t\t\tc1=m+1;}\t\r\n\t\t\t\tif(b[m]==a[k2]) {\r\n\t\t\t\t\tc2=m+1;}\t\r\n\t\t\t}\r\n\t\t\tc3=c3+Math.abs(c1-c2);\r\n\t\t}\r\n\t\tif(k1==k2) {\r\n\t\t\tfor(m=0;m<26;m++) {\r\n\t\t\t\tif(b[m]==a[k1])\r\n\t\t\t\t\tc3=c3+(m+1);\r\n\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\td[l1]=c3;\r\n\t\tl1++;\r\n\t\tk1=i+1;\r\n\t}\r\n}\r\n\r\n for(i=0;i<l1;i++)\r\n {\r\n\t str=str+Integer.toString(d[i]);\r\n }\r\n int ans=Integer.parseInt(str);\r\n System.out.print(ans);\r\n}", "public static void solve(){\n HashMap<Integer,HashMap<Integer,Queue<String>>> wordsByVowels = new HashMap<>();\n \n\n int n = in.nextInt();\n //String[] words = new String[n];\n for(int i=0; i<n;i++){\n String s = in.next();\n //words[i] = s;\n int vowelCount = vowelCount(s);\n int lastV = lastVowel(s);//a=1,e=2,i=3,o=4,u=5\n //vowelFrequency[vowelCount][lastV]++;\n //store index of a word\n if(!wordsByVowels.containsKey(vowelCount)){\n HashMap<Integer,Queue<String>> hm =new HashMap<>(); \n wordsByVowels.put(vowelCount,hm);\n }\n if(!wordsByVowels.get(vowelCount).containsKey(lastV)){\n wordsByVowels.get(vowelCount).put(lastV,new LinkedList<String>());\n }\n //if(wordsByVowels.get(vowelCount))\n wordsByVowels.get(vowelCount).get(lastV).add(s);\n }\n\n //now separate as complete \n Queue<Pairs> complete = new LinkedList<>();\n Queue<Pairs> incomplete = new LinkedList<>();\n for(Map.Entry<Integer , HashMap<Integer,Queue<String>> > entry: wordsByVowels.entrySet()){\n HashMap<Integer,Queue<String>> lastMap = entry.getValue();\n //iterate over Strings with same number of vowels\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n while(st.size()>=2){\n Pairs p = new Pairs();\n p.s1 = st.poll(); \n p.s2 = st.poll(); \n complete.add(p); \n }\n }\n Queue<String> remainings = new LinkedList<>();\n\n for(Map.Entry<Integer,Queue<String>> e: lastMap.entrySet()){\n //take stack which contains elements with similar endVowel\n Queue<String> st = e.getValue();\n if(st.size()>0){\n remainings.add(st.poll());\n }\n }\n while(remainings.size()>=2){\n Pairs p = new Pairs();\n p.s1 = remainings.poll();\n p.s2 = remainings.poll();\n incomplete.add(p); \n }\n }\n \n //System.out.println(\"here\");\n//now we have both complete and incomplete and we can mix them well first mix completes with incompletes then mix completes if left any\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n //System.out.printf(\"com %d inc %d\\n\",complete.size(),incomplete.size());\n int lc = 0;\n if(complete.size()>incomplete.size()){\n lc=incomplete.size()+ (complete.size()-incomplete.size())/2;\n }else{\n lc = complete.size();\n }\n\n System.out.println(lc);\n \n\n while(complete.size()>0 && incomplete.size()>0){\n Pairs inc =incomplete.poll();\n Pairs com =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",inc.s1,com.s1,inc.s2,com.s2);\n }\n\n while(complete.size()>=2){\n Pairs com =complete.poll();\n Pairs com2 =complete.poll();\n System.out.printf(\"%s %s\\n%s %s\\n\",com2.s1,com.s1,com2.s2,com.s2);\n }\n \n\n\n\n }", "public List<List<Integer>> findSubsequences2(int[] nums) {\n List<List<Integer>> ret = new ArrayList<>();\n Arrays.sort(nums);\n //remove set usages\n //let's do a permutation\n\n ret.add(new ArrayList<>());\n int index = 0;\n int new_added_length = 0;\n while (index < nums.length) {\n //try to add nums[index]\n int oldSize = ret.size();\n int cur_added_length = 0;\n\n int cur_start = 0;\n if (index > 0 && nums[index] == nums[index - 1]) {\n cur_start = oldSize - new_added_length;\n }\n for (int i = cur_start; i < oldSize; ++i) {\n List<Integer> pre = ret.get(i);\n if (pre.size() == 0 || pre.get(pre.size() - 1) <= nums[index]) {\n List<Integer> newList = new ArrayList<>(pre);\n newList.add(nums[index]);\n ret.add(newList);\n ++cur_added_length;\n }\n }\n\n new_added_length = cur_added_length;\n ++index;\n }\n\n\n List<List<Integer>> ret2 = new ArrayList<>();\n for (List<Integer> l : ret) {\n if (l.size() >= 2) {\n ret2.add(l);\n }\n }\n return ret2;\n }", "public static void main (String[] args) {\n System.out.println(findIntersection(new String[] {\"1, 3, 4, 7, 13\", \"1, 2, 4, 13, 15\"})); \n System.out.println(findIntersection(new String[] {\"2, 3, 4\", \"3\"})); \n System.out.println(findIntersection(new String[] {\"1, 5, 6, 7, 10, 11, 12\", \"5, 6, 8, 11, 17\"})); \n System.out.println(findIntersection(new String[] {\"1, 2, 3, 4, 5\", \"6, 7, 8, 9, 10\"})); \n System.out.println(findIntersection(new String[] {\"1, 2, 4, 5, 6, 9\", \"2, 3, 4, 8, 10\"})); \n System.out.println(findIntersection(new String[] {\"21, 22, 23, 25, 27, 28\", \"21, 24, 25, 29\"})); \n }", "public List<List<Integer>> palindromePairs(String[] words) {\n\t\t\t\n\t\t\tif(words == null) return null;\n\t\t\tList<List<Integer>> res = new LinkedList<>();\n\t\t\tList<Integer> tempList = new LinkedList<>();\n\t\t\tif(words.length == 0) return res;\n\t\t\t\n\t\t\t// but seems all possible is too many, let try brutal force first, cannot, exceed the time limit.\n//\t\t\tfor(int i = 0; i< words.length ; i++){\n//\t\t\t\ttempList.clear();\n//\t\t\t\ttempList.add(i);\n//\t\t\t\tfor(int j = 0; j < words.length ; j++){\n//\t\t\t\t\tif(j == i) continue;\n//\t\t\t\t\tif(isPalindrome(words[i]+words[j])){\n//\t\t\t\t\t\ttempList.add(j);\n//\t\t\t\t\t\tres.add(new LinkedList<>(tempList));\n//\t\t\t\t\t\ttempList.remove(tempList.size()-1);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\tfor(int i = 0; i<words.length; i++) map.put(words[i], i);\n\t\t\tfor(int i = 0; i<words.length; i++){\n\t\t\t\t\tfor(int j = 0; j <= words[i].length(); j++){\n\t\t\t\t\t\tString pre = words[i].substring(0, j);\n\t\t\t\t\t\tString after = words[i].substring(j);\n\t\t\t\t\t\tif(isPalindrome(pre)){\n\t\t\t\t\t\t\tString afterrev =new StringBuffer(after).reverse().toString();\n\t\t\t\t\t\t\tif(map.containsKey(afterrev) &&map.get(afterrev) != i){\n\t\t\t\t\t\t\t\ttempList.clear();\n\t\t\t\t\t\t\t\ttempList.add(map.get(afterrev));\n\t\t\t\t\t\t\t\ttempList.add(i);\n\t\t\t\t\t\t\t\tres.add(new LinkedList<>(tempList));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(isPalindrome(after)){\n\t\t\t\t\t\t\tString prerev =new StringBuffer(pre).reverse().toString();\n\t\t\t\t\t\t\tif(map.containsKey(prerev) &&map.get(prerev) != i && after.length() != 0){\n\t\t\t\t\t\t\t\ttempList.clear();\n\t\t\t\t\t\t\t\ttempList.add(i);\n\t\t\t\t\t\t\t\ttempList.add(map.get(prerev));\n\t\t\t\t\t\t\t\tres.add(new LinkedList<>(tempList));\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}\n\t\t\treturn res;\n }", "private void enumerateAnagramsUnderBagEHelper(String targetDoNotChange,\n\t\t\tString whatsLeft, HashMap<String, Integer> parent,\n\t\t\tSet<Map<String, Integer>> ret, int runningTotal) {\n\t\tif (whatsLeft.length() == 0\n\t\t\t\t&& runningTotal == targetDoNotChange.length()) {\n\t\t\tret.add(parent);\n\t\t\treturn;\n\t\t} else {\n\t\t\tSet<String> toIter = generateSubwords(whatsLeft);\n\t\t\tfor (String subWord : toIter) {\n\t\t\t\t// Do some pruning\n\t\t\t\tif (runningTotal + subWord.length() <= targetDoNotChange\n\t\t\t\t\t\t.length()) {\n\t\t\t\t\tString moveMadeWhatsLeft = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmoveMadeWhatsLeft = cutOutSubWord(whatsLeft, subWord);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\tHashMap<String, Integer> mapCopy = new HashMap<String, Integer>();\n\t\t\t\t\tfor (String s : parent.keySet()) {\n\t\t\t\t\t\tmapCopy.put(s, parent.get(s));\n\t\t\t\t\t}\n\t\t\t\t\t// Make move\n\t\t\t\t\tif (mapCopy.containsKey(subWord)) {\n\t\t\t\t\t\tmapCopy.put(subWord,\n\t\t\t\t\t\t\t\tmapCopy.get(subWord).intValue() + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapCopy.put(subWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\tenumerateAnagramsUnderBagEHelper(targetDoNotChange,\n\t\t\t\t\t\t\tmoveMadeWhatsLeft, mapCopy, ret, runningTotal\n\t\t\t\t\t\t\t\t\t+ subWord.length());\n\n\t\t\t\t} else {\n\t\t\t\t\t// Do nothing.. too long PRUNING\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static int minLength(String[] words) {\n ArrayList<String> minimized = new ArrayList<>();\n int len = words[0].length() + 1;\n minimized.add(words[0]);\n\n for (int i = 1; i < words.length; i++) {\n for (int j = 0; j < minimized.size(); j++) {\n if (encoded(minimized.get(j), words[i])) {\n break;\n }\n if (encoded(words[i], minimized.get(j))) {\n len -= minimized.get(j).length();\n minimized.remove(j);\n\n len += words[i].length();\n minimized.add(words[i]);\n break;\n }\n\n if (j == minimized.size() - 1) {\n minimized.add(words[i]);\n len += (words[i].length() + 1);\n break;\n }\n }\n }\n\n return len;\n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "private void findWordsOnBoard(String word, boolean[][] visited, char[][] board, int i, int j) {\n\n //mark visited word cell as true so we don't use it again in the formation of a word\n visited[i][j] = true;\n //add the word of cell just visited to the end of the word\n word += board[i][j];\n\n //if word is valid / in dictionary, add it to validWordsOnBoard, else ignore\n if(word.length() >= 3 && dictionary.search(word.toLowerCase()))\n {\n validWordsOnBoard.add(word);\n }\n\n\n for(int row = i - 1; row <= i + 1 && row < board.length; row++) {\n\n for(int column = j - 1; column <= j+ 1 && column < board[0].length; column++) {\n\n if(row >= 0 && column >= 0 && !visited[row][column]){\n\n if(dictionary.hasPrefix(word.toLowerCase())){\n findWordsOnBoard(word, visited, board, row, column);\n }\n }\n }\n }\n\n //take out the last letter (of just visited cell) from word\n String temp = word.substring(0,word.length()-1);\n word = temp;\n visited[i][j] = false;\n }", "private void generateSubwordsHelper(String whatsLeft, String parent,\n\t\t\tSet<String> returnSet, TreeNode dictPointer,\n\t\t\tTreeNode myParent) {\n\n\t\tif (whatsLeft.length() == 0 && dictPointer.getIsWord()) {\n\t\t\treturnSet.add(parent);\n\t\t} else {\n\t\t\tif (dictPointer.getIsWord()) {\n\t\t\t\treturnSet.add(parent);\n\t\t\t}\n\t\t\tHashSet<Character> iveTriedSoFar = new HashSet<Character>();\n\t\t\tfor (int i = 0; i < whatsLeft.length(); i++) {\n\t\t\t\t// Make move\n\t\t\t\t// For each chracter left in whats left, remove that character\n\t\t\t\t// from whats left, and append it to the end of parent\n\t\t\t\tString moveMadeWhatsLeft = whatsLeft;\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tmoveMadeWhatsLeft = moveMadeWhatsLeft.substring(1,\n\t\t\t\t\t\t\tmoveMadeWhatsLeft.length());\n\t\t\t\t} else if (i == moveMadeWhatsLeft.length() - 1) {\n\t\t\t\t\tmoveMadeWhatsLeft = moveMadeWhatsLeft.substring(0,\n\t\t\t\t\t\t\tmoveMadeWhatsLeft.length() - 1);\n\t\t\t\t} else {\n\t\t\t\t\tmoveMadeWhatsLeft = moveMadeWhatsLeft.substring(0, i)\n\t\t\t\t\t\t\t+ moveMadeWhatsLeft.substring(i + 1,\n\t\t\t\t\t\t\t\t\tmoveMadeWhatsLeft.length());\n\t\t\t\t}\n\t\t\t\tString moveMadeParent = parent + whatsLeft.charAt(i);\n\n\t\t\t\t// call recursive\n\t\t\t\tif (dictPointer.getChildContaining(whatsLeft.charAt(i)) != null\n\t\t\t\t\t\t&& !iveTriedSoFar.contains(whatsLeft.charAt(i))) {\n\t\t\t\t\tiveTriedSoFar.add(whatsLeft.charAt(i));\n\t\t\t\t\tgenerateSubwordsHelper(\n\t\t\t\t\t\t\tmoveMadeWhatsLeft,\n\t\t\t\t\t\t\tmoveMadeParent,\n\t\t\t\t\t\t\treturnSet,\n\t\t\t\t\t\t\tdictPointer.getChildContaining(whatsLeft.charAt(i)),\n\t\t\t\t\t\t\tdictPointer);\n\t\t\t\t} else {\n\t\t\t\t\t// Do not call method (skip that subtree) PRUNING! .. like a\n\t\t\t\t\t// boss\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public List<Integer> partitionLabelsSlow(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n boolean endReached = false;\n\n int start=0, end, extendedEnd;\n\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = S.lastIndexOf(startCharacter);\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n if(S.lastIndexOf(S.charAt(i)) > end) {\n extendedEnd = S.lastIndexOf(S.charAt(i));\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }", "public static void findDuplicateWords(String inputString)\r\n\t{\r\n\t\t// split the words in words array \r\n\t\tString words[]= inputString.split(\" \");\r\n\t\t\r\n\t\t//Create HashMap for count the words \r\n\t\tHashMap<String, Integer> wordcount = new HashMap<String, Integer>();\r\n\t\t\r\n\t\t// to check each word in given array \r\n\t\t\r\n\t\tfor(String word: words )\r\n\t\t{\r\n\t\t\t//if word is present \r\n\t\t\tif(wordcount.containsKey(word)) {\r\n\t\t\t\twordcount.put(word.toLowerCase(), wordcount.get(word)+1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twordcount.put(word,1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//extracting all the keys of map : wordcount\r\n\t\tSet<String> wordInString = wordcount.keySet();\r\n\t\t\r\n\t\t// iterate the loop through all the wors in wordCount \r\n\t\tfor(String word : wordInString)\r\n\t\t{\r\n\t\t\tif(wordcount.get(word)>1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(word+ \" : \" + wordcount.get(word));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public String function(HashSet<String> Dictionary, String inputString) {\n\n int[] step = new int[inputString.length() + 1];\n\n step[0] = 0;\n\n for (int i = 1; i <= inputString.length(); i++)\n {\n step[i] = -1;\n\n for ( int j = 0 ; j < i ; j++ )\n {\n if ( Dictionary.contains( inputString.substring(j, i) ) && step[j] != -1 )\n {\n step[i] = j;\n break;\n }\n }\n }\n\n // if text can not be made from the whole inputString, return an empty string\n if (step[inputString.length()] == -1)\n return \"\";\n\n // Moving backwards from the end, the words contain words in the reverse order\n ArrayList<String> words = new ArrayList<String>();\n\n for (int x = inputString.length(); x > 0; x = step[x])\n words.add(inputString.substring(step[x], x));\n\n // Create a string using a StringBuilder that contains words in the normal order\n StringBuilder sb = new StringBuilder();\n\n for (int i = words.size()-1; i >= 0; i--)\n sb.append( i > 0 ? words.get(i) + \" \" : words.get(i) );\n\n return sb.toString();\n }", "public static void main(String[] args){\n \tunsortedWords = new ArrayList<String>();\n sortedWords = new ArrayList<String>();\n \ttry{\n \t\tInputStreamReader in = new InputStreamReader(System.in);\n \t\tBufferedReader input = new BufferedReader(in);\n \t\talphabetString = input.readLine();\n \t\tif (alphabetString == null || alphabetString == \"\"){\n \t\t\tthrow new IllegalArgumentException();\n \t\t}\n\n \t\tstr = input.readLine();\n if (str == null || str == \"\"){\n throw new IllegalArgumentException();\n }\n \n \t\twhile (str != null){\n \t\t\tunsortedWords.add(str);\n \t\t\tstr = input.readLine();\n numberOfWords += 1;\n \t\t}\n\n\n\n \t}\n \tcatch (IOException io){\n \t\tSystem.out.println(\"There are no words given\");\n \t\tthrow new IllegalArgumentException();\n\n \t}\n\n alphabetMap = new HashMap<String, Integer>();\n String[] alphabetLetters = alphabetString.split(\"\");\n \tint j = 0;\n \tString letter;\n \t// String[] alphabetLetters = alphabetString.split(\"\");\n \twhile (j < alphabetLetters.length){\n letter = alphabetLetters[j];\n if (alphabetString.length() - alphabetString.replace(letter, \"\").length() > 1) {\n System.out.println(letter);\n throw new IllegalArgumentException();\n }\n alphabetMap.put(alphabetLetters[j], j);\n j += 1;\n }\n //for checking the last value something is in the outputed list. \n lastArrayIndex = 0;\n\n //sorts words\n int k = 0;\n String chosenWord;\n while (k < unsortedWords.size()){\n chosenWord = unsortedWords.get(k);\n sorting(chosenWord, sortedWords);\n k += 1; \n }\n\n //prints words\n int l = 0;\n String printedWord;\n while (l < sortedWords.size()){\n printedWord = sortedWords.get(l);\n System.out.println(printedWord);\n l += 1;\n }\n\n\n \t//making the trie\n // usedTrie = makeATrie(unsortedWords);\n\n //printing out the order\n // recursiveAlphabetSorting(usedTrie, \"\", alphabetString);\n\n\n }", "public int countSubstrings_dp(String s) {\n\t\tint n = s.length();\n\t\tint res = 0;\n\t\tboolean[][] dp = new boolean[n][n];\n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tdp[i][j] = s.charAt(i) == s.charAt(j) \n\t\t\t\t\t\t&& (j - i + 1 < 3 || dp[i + 1][j - 1]);\n\t\t\t\t\n\t\t\t\tif (dp[i][j])\n\t\t\t\t\t++res;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public boolean wordBreak2(String s, List<String> wordDict) {\n int maxL =0;\n Set<String> wordSet = new HashSet<>(wordDict);\n for (String word : wordDict) {\n maxL = Math.max(maxL, word.length());\n }\n boolean[] dp = new boolean[s.length() + 1];\n dp[0] = true;\n for (int i = 1; i <= s.length(); i++) {\n for (int j = i-1; j >=0 && j >= i - maxL; j--) {\n if (dp[j] && wordSet.contains(s.substring(j, i))) {\n dp[i] = true;\n break;\n }\n }\n }\n return dp[s.length()];\n }", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "public static Set<String> getAllSubSeq(String s) {\n if (s == null || s.isEmpty()) {\n return null;\n }\n\n int n = s.length();\n if (n > 31) {\n throw new IllegalArgumentException(\"max str length is 31\");\n }\n int total = (int) Math.pow(2, n) - 1;\n Set<String> set = new HashSet<String>(total);\n\n boolean[] mask = new boolean[n];\n set.add(s);\n\n // let get all other combinations except of \"all false and all true\" masks\n for (int i = 1; i < total; i++) {\n nextMask(mask);\n String subSeq = getSubseq(s, mask);\n set.add(subSeq);\n }\n return set;\n }", "void processDFS(int offset, String str) {\n if (offset == 0) {\n wordOut.add(str.strip());\n }\n ArrayList<Integer> arr = dp[offset];\n for (int iStart : arr) {\n String strWord = sentence.substring(iStart, offset);\n strWord = strWord + \" \" + str;\n processDFS(iStart, strWord);\n }\n }", "public int arrayNesting(int[] nums) {\n Set<Integer> oneSet = new HashSet<>();\n\n boolean[] flags = new boolean[nums.length];\n\n for(int i=0; i<nums.length; i++) {\n if(!flags[i]) {\n Set<Integer> compete = recursivelyConstructSet(i, flags, nums, new HashSet<>());\n if(compete.size() > oneSet.size()) {\n oneSet = compete;\n }\n }\n }\n\n return oneSet.size();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public String encode(String s) {\n if (s == null || s.length() == 0) {\n return \"\";\n }\n int n = s.length();\n String[][] dp = new String[n][n];\n for (int len = 1; len <= n; len++) {\n if (len == 10) {\n int a = 1;\n }\n for (int i = 0; i + len - 1 < n; i++) {\n int j = i + len - 1;\n String word = s.substring(i, j + 1);\n dp[i][j] = word;\n if (len <= 4) {\n continue;\n }\n for (int k = i; k < j; k++) {\n if (dp[i][k].length() + dp[k + 1][j].length() < dp[i][j].length()) {\n dp[i][j] = dp[i][k] + dp[k + 1][j];\n }\n }\n String tmp = word + word;\n int second = tmp.indexOf(word, 1);\n if (second > 0 && second < len) {\n int times = len / (second);\n String sub = dp[i][i + second - 1];\n String encoded = times + \"[\" + sub + \"]\";\n if (encoded.length() < dp[i][j].length()) {\n dp[i][j] = encoded;\n }\n }\n }\n }\n return dp[0][s.length() - 1];\n }", "public int minCuts(String input) {\n if (input.length() <= 1) {\n return 0;\n }\n int n = input.length();\n char[] arr = input.toCharArray();\n int[] minCut = new int[n + 1];\n\n // preproces, isP[start][end] represent if substring start - 1][end -1] is P\n // a string is P: single char; two char and same; same char at out + inner isP opp direction\n boolean [][] isP = new boolean[n + 1][n + 1];\n for (int e = 1; e < n + 1; e++) {\n minCut[e] = e - 1;\n for (int s = e; s > 0; s--) {\n if (arr[s - 1] == arr[e - 1]) {\n isP[s][e] = e - s < 2 || isP[s + 1][e - 1];\n }\n if (isP[s][e]) {\n minCut[e] = Math.min(minCut[e], minCut[s - 1] + 1);\n }\n }\n }\n return minCut[n];\n\n }", "public int minCutII(String s) {\n if (s == null || s.length() < 2) return 0;\n int len = s.length();\n int[] cut = new int[len];\n boolean[][] palindrome = new boolean[len][len];\n for (int i = 0; i < len; i++) {\n int min = i;\n for (int j = 0; j <= i; j++) {\n if (s.charAt(i) == s.charAt(j) &&\n ((j + 1 > i - 1) || palindrome[j + 1][i - 1])) {\n palindrome[j][i] = true;\n min = j == 0 ? 0 : Math.min(min, cut[j - 1] + 1);\n }\n }\n cut[i] = min;\n }\n return cut[len - 1];\n }", "public static boolean word_memo(int start,String s,Set<String>set,int[]visit){\n if(start==s.length()){//指针越界是ture!!\n return true;\n }\n if(visit[start]==1){\n return true;\n }\n if(visit[start]==2){\n return false;\n }\n for (int end = start; end <=s.length() ; end++) {\n String res=s.substring(start,end);\n if(set.contains(res)&&word_memo(end,s,set,visit)){\n visit[start]=1;\n return true;\n\n }\n }\n visit[start]=2;\n return false;\n }", "public int[] solution(String S, int[] P, int[] Q) {\n \n int[][] result = new int[S.length()][4];\n int[] returnResult = new int[P.length];\n \n //how many different solutions exist?\n //'A' [0], [0] - 1 solution\n //'AG' [0, 0, 1], [0, 1, 1] - 3\n // 'AGT' [0,0,0,1,1,2], [0,1,1,2,2,2] - 6\n // 10\n // 15\n // 21\n \n //Prefix Sum - calculation\n \n for (int i = 1; i< S.length()+1; i++){\n \n if (i == 1){\n switch (S.substring(i-1, i)){\n case \"A\": result[i-1][0] = 1;\n break;\n case \"C\": result[i-1][1] = 1;\n break;\n case \"G\": result[i-1][2] = 1;\n break;\n case \"T\": result[i-1][3] = 1;\n break;\n }\n }else{\n int a = 0;\n switch (S.substring(i-1, i)){\n case \"A\": a = 0;\n break;\n case \"C\": a= 1;\n break;\n case \"G\": a =2;\n break;\n case \"T\": a =3;\n break;\n }\n result[i-1][a] = 1 + result[i-2][a];\n result[i-1][(a+1)%4] = result[i-2][(a+1)%4];\n result[i-1][(a+2)%4] = result[i-2][(a+2)%4];\n result[i-1][(a+3)%4] = result[i-2][(a+3)%4];\n }\n\n }\n \n /*\n for (double i : result){\n System.out.println(i);\n }\n */\n \n //A = 1, G = 2, C = 3, T = 4\n //when A found return 1 and move to next computation.\n // P[k] <= Q[K]\n int lowerBound = 0;\n int upperBound = 0;\n for (int i = 0; i < P.length; i++){\n lowerBound = P[i];\n upperBound = Q[i];\n \n int[] toEvaluate = new int[4];\n\n //System.out.println(lowerBound);\n if (lowerBound == 0){\n toEvaluate[0]= result[upperBound][0];\n toEvaluate[1]= result[upperBound][1];\n toEvaluate[2]= result[upperBound][2];\n toEvaluate[3]= result[upperBound][3];\n }else{\n toEvaluate[0]= result[upperBound][0] - result[lowerBound-1][0]; \n toEvaluate[1]= result[upperBound][1] - result[lowerBound-1][1];\n toEvaluate[2]= result[upperBound][2] - result[lowerBound-1][2];\n toEvaluate[3]= result[upperBound][3] - result[lowerBound-1][3];\n }\n \n /*\n for (int eval : toEvaluate){\n System.out.println(eval);\n \n }\n */\n if (toEvaluate[0] > 0) {returnResult[i] = 1;\n }else if (toEvaluate[1] > 0) {returnResult[i] = 2;\n }else if (toEvaluate[2] > 0) {returnResult[i] = 3;\n }else if (toEvaluate[3] > 0) {returnResult[i] = 4;\n }\n \n }\n \n return returnResult; \n }", "private static String minWindowCaseII(String s, String t) {\n if(s.length() == 0 || t.length() == 0) {\n return \"\";\n }\n\n HashMap<Character, Integer> uniqueCharsInT = new HashMap<>();\n HashMap<Character, Integer> uniqueCharsInCurrWindowInS = new HashMap<>();\n\n for(char c : t.toCharArray()) {\n uniqueCharsInT.put(c, uniqueCharsInT.getOrDefault(c, 0) + 1);\n }\n\n List<Pair<Integer, Character>> filteredS = new ArrayList<>();\n for(int i = 0; i < s.length(); i++) {\n if(uniqueCharsInT.containsKey(s.charAt(i))) {\n filteredS.add(new Pair<>(i, s.charAt(i)));\n }\n }\n int[] ans = new int[] {-1, 0, 0}; // window length, left, right\n int left = 0, right = 0, uniqueCharsInTCount = uniqueCharsInT.size(), uniqueCharsInCurrWindowCount = 0;\n\n\n while(right < filteredS.size()) {\n char rightChar = filteredS.get(right).getValue();\n uniqueCharsInCurrWindowInS.put(rightChar, uniqueCharsInCurrWindowInS.getOrDefault(uniqueCharsInCurrWindowInS, 0) + 1);\n\n if(uniqueCharsInT.get(rightChar).intValue() == uniqueCharsInCurrWindowInS.get(rightChar).intValue()) {\n uniqueCharsInCurrWindowCount++;\n }\n\n while(left <= right && uniqueCharsInCurrWindowCount == uniqueCharsInTCount) {\n char leftChar = filteredS.get(left).getValue();\n\n int start = filteredS.get(left).getKey();\n int end = filteredS.get(right).getKey();\n if(ans[0] == -1 || end - start + 1 < ans[0]) {\n ans[0] = end - start + 1;\n ans[1] = start;\n ans[2] = end;\n }\n\n uniqueCharsInCurrWindowInS.put(leftChar, uniqueCharsInCurrWindowInS.get(leftChar) - 1);\n if(uniqueCharsInT.containsKey(leftChar) && uniqueCharsInT.get(leftChar).intValue() > uniqueCharsInCurrWindowInS.get(leftChar).intValue()) {\n uniqueCharsInCurrWindowCount--;\n }\n\n left++;\n }\n\n right++;\n }\n\n return ans[0] == -1 ? \"\" : s.substring(ans[1], ans[2] + 1);\n }", "public String solve1(String s) {\n Map<String, Integer> frequency = new HashMap<>();\n String maxWord = null;\n String[] split = s.split(\" \");\n\n for (String word : split) {\n int newFrequency = frequency.getOrDefault(word, 0) + 1;\n frequency.put(word, newFrequency);\n if (newFrequency > frequency.getOrDefault(maxWord, 0)) {\n maxWord = word;\n }\n }\n\n return maxWord;\n }", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "public String minWindow(String S, String T) {\r\n\t\t// Note: The Solution object is instantiated only once and is reused by\r\n\t\t// each test case.\r\n\t\tif (T.length() > S.length()) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tMap<Character, Integer> table = new HashMap<Character, Integer>();\r\n\t\tchar[] ss = S.toCharArray();\r\n\t\tchar[] tt = T.toCharArray();\r\n\t\tMap<Character, Integer> ttable = new HashMap<Character, Integer>();\r\n\t\tArrayList<Character> cs = new ArrayList<Character>();\r\n\t\tfor (char c : tt) {\r\n\t\t\tif (ttable.containsKey(c)) {\r\n\t\t\t\tint num = ttable.get(c);\r\n\t\t\t\tttable.put(c, num + 1);\r\n\t\t\t} else {\r\n\t\t\t\tttable.put(c, 1);\r\n\t\t\t}\r\n\t\t\tcs.add(c);\r\n\t\t}\r\n\t\tint start = -1;\r\n\t\tint end = -1;\r\n\t\tString substring = \"\";\r\n\t\tfor (int i = 0; i < ss.length; i++) {\r\n\t\t\tif (ttable.keySet().contains(ss[i])) {\r\n\t\t\t\tif (-1 == start) {\r\n\t\t\t\t\tstart = i;\r\n\t\t\t\t}\r\n\t\t\t\tint num = ttable.get(ss[i]);\r\n\t\t\t\tif (num > 1) {\r\n\t\t\t\t\tttable.put(ss[i], num - 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tttable.remove(ss[i]);\r\n\t\t\t\t}\r\n\t\t\t\tif (ttable.isEmpty()) {\r\n\t\t\t\t\tend = i;\r\n\t\t\t\t\tsubstring = S.substring(start, end + 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else if (cs.contains(ss[i])) {\r\n\t\t\t\tif (table.containsKey(ss[i])) {\r\n\t\t\t\t\tint num = table.get(ss[i]);\r\n\t\t\t\t\ttable.put(ss[i], num + 1);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttable.put(ss[i], 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (-1 == start || -1 == end) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tfor (start = start + 1; start <= ss.length - tt.length\r\n\t\t\t\t&& end < ss.length; start++) {\r\n\t\t\tif (!cs.contains(ss[start - 1])) {\r\n\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tif (table.containsKey(ss[start - 1])) {\r\n\t\t\t\t\tint num = table.get(ss[start - 1]);\r\n\t\t\t\t\tif (num > 1) {\r\n\t\t\t\t\t\ttable.put(ss[start - 1], num - 1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttable.remove(ss[start - 1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (end = end + 1; end < ss.length; end++) {\r\n\t\t\t\t\t\tif (ss[start - 1] == ss[end]) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (cs.contains(ss[end])) {\r\n\t\t\t\t\t\t\tif (table.containsKey(ss[end])) {\r\n\t\t\t\t\t\t\t\tint num = table.get(ss[end]);\r\n\t\t\t\t\t\t\t\ttable.put(ss[end], num + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttable.put(ss[end], 1);\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\tif (end < ss.length) {\r\n\t\t\t\t\t\tString tmp = S.substring(start, end + 1);\r\n\t\t\t\t\t\tif (tmp.length() < substring.length()) {\r\n\t\t\t\t\t\t\tsubstring = tmp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn substring;\r\n\t}", "public static List<String> DFS(String s, Set<String> wordDict, HashMap<String, LinkedList<String>>map) {\n\t if (map.containsKey(s)) \n\t return map.get(s);\n\t \n\t LinkedList<String>res = new LinkedList<String>(); \n\t if (s.length() == 0) {\n\t res.add(\"\");\n\t return res;\n\t } \n\t for (String word : wordDict) {\n\t if (s.startsWith(word)) {\n\t List<String>sublist = DFS(s.substring(word.length()), wordDict, map);\n\t for (String sub : sublist) \n\t res.add(word + (sub.isEmpty() ? \"\" : \" \") + sub); \n\t }\n\t } \n\t map.put(s, res);\n\t return res;\n\t}", "public static String[] rechercheBigrammePlusFrequent(String text) {\n\t\tint n = text.length();\n\t\tArrayList<String> bigrammes = new ArrayList<String>();\n\t\tString[] bigrammesPlusFrequentsCorrespond = new String[5]; // resultat\n\t\tArrayList<String> bigrammesChiffréPlusFrequents = new ArrayList<String>();\n\t\tArrayList<Integer> nbrBigrammesPlusFrequents = new ArrayList<Integer>();\n\n\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\tString bigramme = text.substring(i, i + 2);\n\t\t\tbigrammes.add(bigramme);\n\t\t}\n\t\tfor (int j = 0; j < bigrammes.size(); j++) {\n\t\t\tint inter = 1;\n\t\t\tString bi = bigrammes.get(j);\n\t\t\tif ((!bigrammesChiffréPlusFrequents.contains(bi))) {\n\t\t\t\tfor (int k = j + 1; k < bigrammes.size(); k++) {\n\t\t\t\t\tif (bi.equals(bigrammes.get(k))) {\n\t\t\t\t\t\tinter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbigrammesChiffréPlusFrequents.add(bi);\n\t\t\t\tnbrBigrammesPlusFrequents.add(inter);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tint max = 1, id = 0;\n\t\t\tfor (int j = 0; j < bigrammesChiffréPlusFrequents.size(); j++) {\n\t\t\t\tif (nbrBigrammesPlusFrequents.get(j) >= max) {\n\t\t\t\t\tmax = nbrBigrammesPlusFrequents.get(j);\n\t\t\t\t\tid = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbigrammesPlusFrequentsCorrespond[i] = bigrammesChiffréPlusFrequents\n\t\t\t\t\t.get(id);\n\t\t\tnbrBigrammesPlusFrequents.set(id, 0);\n\t\t}\n\t\t// System.out.println(\"liste des bigrammes les plus fréquents\");\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t// System.out.println(bigrammesPlusFrequentsCorrespond[i]);\n\t\t}\n\t\treturn bigrammesPlusFrequentsCorrespond;\n\t}", "public static void main(String[] args) throws IOException {\n Scanner s = new Scanner(System.in);\n int t = Integer.parseInt(s.nextLine());\n for(int i=1;i<=t;i++){\n int n = Integer.parseInt(s.nextLine());\n Set<String> a = new HashSet<>();\n\n for(int j=0;j<n;j++) {\n String str = s.nextLine();\n if(str.equals(\"easy-medium\"))\n str=\"medium\";\n else if(str.equals(\"medium-hard\"))\n str=\"hard\";\n a.add(str);\n }\n System.out.println(a.size()<5?\"No\":\"Yes\");\n /*int a1=0,a2=0,a3=0,a4=0,a5=0;\n for(int k=0;k<n;k++){\n if(a.contains(\"cakewalk\"))\n a1++;\n if(a.contains(\"simple\"))\n a2++;\n if(a[k].equals(\"easy\"))\n a3++;\n if(a[k].equals(\"easy-medium\") || a[k].equals(\"medium\"))\n a4++;\n if(a[k].equals(\"medium-hard\") || a[k].equals(\"hard\"))\n a5++;\n }\n if(a1==1&&a2==1&&a3==1&&a4==1&&a5==1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n*/\n }\n }", "public List<Integer> findAnagrams(String s, String p) {\n List<Integer> ans = new ArrayList<>();\n if(s == null || \"\".equals(s) || p == null || \"\".equals(p) || p.length() > s.length()) return ans;\n // use map to track chars in p\n Map<Character, Integer> map = new HashMap<>();\n for (int i = 0; i < p.length(); i++) {\n // key is distinct char, value is times of current char appears\n map.put(p.charAt(i) , map.getOrDefault(p.charAt(i) , 0) + 1);\n }\n\n int len = p.length();\n // two pointers indicate window's left boundary and right boundary\n int left = 0;\n int right = 0;\n // counter indicates whether our window contains all chars or not\n int counter = map.size();\n\n while (right < s.length()){\n // pick out current char\n char cur = s.charAt(right);\n // check whether cur in map or not, if in, we find one so decrease counter\n if(map.containsKey(cur)){\n // update map\n map.put(cur, map.get(cur) - 1);\n if(map.get(cur) == 0)\n counter --;\n }\n // move right boundary of window forward\n right ++;\n\n // when counter equals to 0, it means that we have all chars in p in our current window,\n // then we'll try to make the window smaller by moving left pointer\n while (counter == 0){\n // check whether the char to remove is in map or not, if in, we need to increase counter\n char temp = s.charAt(left);\n if(map.containsKey(temp)){\n // update map\n map.put(temp, map.get(temp) + 1);\n if(map.get(temp) > 0)\n counter ++;\n }\n // check whether there is an answer before increase left\n if(right - left == len) ans.add(left);\n left ++;\n }\n }\n\n return ans;\n }", "void solution() {\n\t\t/* Write a RegEx matching repeated words here. */\n\t\tString regex = \"(?i)\\\\b([a-z]+)\\\\b(?:\\\\s+\\\\1\\\\b)+\";\n\t\t/* Insert the correct Pattern flag here. */\n\t\tPattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);\n\n\t\tString[] in = { \"I love Love to To tO code\", \"Goodbye bye bye world world world\",\n\t\t\t\t\"Sam went went to to to his business\", \"Reya is is the the best player in eye eye game\", \"in inthe\",\n\t\t\t\t\"Hello hello Ab aB\" };\n\t\tfor (String input : in) {\n\t\t\tMatcher m = p.matcher(input);\n\n\t\t\t// Check for subsequences of input that match the compiled pattern\n\t\t\twhile (m.find()) {\n\t\t\t\t// /* The regex to replace */, /* The replacement. */\n\t\t\t\tinput = input.replaceAll(m.group(), m.group(1));\n\t\t\t}\n\n\t\t\t// Prints the modified sentence.\n\t\t\tSystem.out.println(input);\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\n Map<String, Integer> nyt;\n nyt = new HashMap<String, Integer>();\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt(), m = scan.nextInt();\n scan.nextLine();\n int cont = 0;\n seen = new boolean[193];\n g = new ArrayList[193];\n\n for (int i = 0; i < 193; i++) {\n g[i] = new ArrayList<Integer>();\n }\n for (int i = 0; i < n; i++) {\n String[] value = scan.nextLine().split(\" are worse than \");\n if (!nyt.containsKey(value[0])) {\n nyt.put(value[0], cont);\n cont++;\n }\n if (!nyt.containsKey(value[1])) {\n nyt.put(value[1], cont);\n cont++;\n }\n\n int u = nyt.get(value[0]);\n int v = nyt.get(value[1]);\n g[u].add(v);\n }\n boolean ok;\n for (int i = 0; i < m; i++) {\n ok = true;\n String[] trump = scan.nextLine().split(\" are worse than \");\n if (!nyt.containsKey(trump[0]) || !nyt.containsKey(trump[1])) {\n System.out.println(\"Pants on Fire\");\n } else {\n\n dfs(nyt.get(trump[0]));\n if (seen[nyt.get(trump[1])]) {\n System.out.println(\"Fact\");\n ok = false;\n }\n\n if (ok) {\n seen = new boolean[193];\n dfs(nyt.get(trump[1]));\n if (seen[nyt.get(trump[0])]) {\n System.out.println(\"Alternative Fact\");\n } else {\n System.out.println(\"Pants on Fire\");\n }\n\n }\n\n }\n seen = new boolean[193];\n\n }\n\n }", "public void checkNeighbours(String word, int id, int x, List<Integer> usedIDs){\n ArrayList<Character> neighbours = charToLower(boggleModel.getNeighbours(id));\n ArrayList<Integer> neighbourIDs = boggleModel.getFieldIDs();\n\n\n // \"while\" word length > X, go into recursion\n if(word.length() > x) {\n // check if the character matches && if it has NOT already been used\n if ((neighbours.contains(word.charAt(x)))) {\n // check whether neighbours has word.charAt(x).. if true, we want to know what letter and where the letter is in the neighbours.\n // With that we can check in the neighboursID whether that ID is already in the usedIDs..\n int check = neighbourIDs.get(neighbours.indexOf(word.charAt(x)));\n\n // When there are more matches...\n if(check != neighbours.lastIndexOf(word.charAt(x))){\n if(usedIDs.contains(check)){\n check = neighbourIDs.get(neighbours.lastIndexOf(word.charAt(x)));\n }\n }\n\n // when check not in usedIDs yet, we can of course use it and find its neighbours..\n if(!usedIDs.contains(check)) {\n // increase X so word.charAt(x) will increase\n x++;\n id = check;\n\n // recursion\n usedIDs.add(check);\n checkNeighbours(word, id, x, usedIDs);\n }\n }\n } else if((word.length() == x)){\n foundWords.add(word);\n } else {\n System.out.println(\"Klaar met zoeken..\");\n\n }\n\n }", "public int allWordsHorizontal(Board board, Dictionary dictionary, Scrabble game, int moves){\n // Initializes variables\n testBoard = board;\n String topHWord = \"\";\n int topHScore = 0;\n int topHRow=0;\n int topHCol=0;\n boolean theWay = true;\n boolean found = false;\n ArrayList<Piece> piecesOfTopWord = new ArrayList<Piece>();\n\n // Goes through ever point on the board\n for (int row = 0; row < 15; row++){\n for (int col = 0; col < 15; col++) {\n if (game.numOfMoves()==0){\n row = 7;\n col = 7;\n }\n \n // The word to make at that point\n mustUse=new ArrayList<Character>();\n mustUseVert=new ArrayList<Character>(); \n int retHorz = anagramAtSquare(row,col,col,0,false, moves);\n int retVert = anagramAtSquareVert(row,col,row,0,false, moves);\n \n // Puts the word on the board and checks to make sure valid word, and if it is top word it stores information about the word for horizontal words\n ArrayList<String> allAnagrams = null;\n if (retHorz!=-1){\n allAnagrams = allWords(retHorz, mustUse);\n for (int inde = 0; inde < allAnagrams.size(); inde++){\n ArrayList<String> test = dictionary.anagram(allAnagrams.get(inde).toLowerCase());\n if(test != null){\n for (int all = 0; all < test.size(); all++) {\n if (addToBoardHor(col, row, all, test, board)) {\n if (game.isValidMove()||moves==0) {\n ArrayList<ArrayList<Piece>> words = new ArrayList<ArrayList<Piece>>();\n words.addAll(board.words());\n if (game.isValidWord(words)){\n int trackScore=0;\n trackScore=board.scoreAI(words);\n if (board.numNonPinned() == 7)\n trackScore+=50;\n if (trackScore>topHScore && game.getStrength()){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n\n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay= true;\n found = true;\n piecesOfTopWord = words.get(0);\n } else if (trackScore>topHScore && trackScore<15){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n\n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay= true;\n found = true;\n piecesOfTopWord = words.get(0);\n }\n }\n \n board.clearNonPinned();\n } else {\n board.clearNonPinned();\n }\n }\n }\n }\n }\n }\n \n // Puts the word on the board and checks to make sure valid word, and if it is top word it stores information about the word for Vertical words\n allAnagrams = null;\n if (retVert!=-1){\n allAnagrams = allWords(retVert, mustUse);\n for (int inde = 0; inde < allAnagrams.size(); inde++){\n ArrayList<String> test = dictionary.anagram(allAnagrams.get(inde).toLowerCase());\n if(test != null){\n for (int all = 0; all < test.size(); all++) {\n if (addToBoardVer(col, row, all, test, board)) {\n if (game.isValidMove()||moves==0) {\n ArrayList<ArrayList<Piece>> words = new ArrayList<ArrayList<Piece>>();\n words.addAll(board.words());\n if (game.isValidWord(words)){\n int trackScore=0;\n trackScore=board.scoreAI(words);\n if (board.numNonPinned() == 7)\n trackScore+=50;\n if (trackScore>topHScore && game.getStrength()){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n \n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay=false;\n found = true;\n piecesOfTopWord = words.get(0);\n } else if (trackScore>topHScore && trackScore<15){\n wordsToDisplay = new ArrayList<String>();\n for (int index = 0; index < words.size(); index++)\n {\n ArrayList<Piece> word = new ArrayList<Piece>();\n word = words.get(index);\n String wordToCheck = \"\";\n for (int indexInner = 0; indexInner < word.size(); indexInner++)\n wordToCheck += word.get(indexInner).theLetter();\n\n if (wordToCheck.length() > 1)\n wordsToDisplay.add(wordToCheck);\n }\n \n topHWord = test.get(all);\n topHScore = trackScore;\n topHRow=row;\n topHCol=col;\n theWay=false;\n found = true;\n piecesOfTopWord = words.get(0);\n }\n }\n \n board.clearNonPinned();\n } else {\n board.clearNonPinned();\n }\n }\n }\n }\n }\n }\n \n if (game.numOfMoves()==0){\n row = 15;\n col = 15;\n }\n \n }\n }\n \n System.out.println(\"Top Word: \" + topHWord + \" Score: \" + topHScore + \" Row: \" + topHRow + \" Col: \" + topHCol+ \" HorOrVert: \" + theWay);\n for (int i = 0; i < piecesOfTopWord.size(); i++) {\n System.out.print(piecesOfTopWord.get(i).theLetter());\n }\n System.out.println();\n \n for (int i = 0; i < playersPieces.size(); i++) {\n System.out.print(playersPieces.get(i).theLetter());\n }\n System.out.println();\n \n // Returns what move to make\n if (found){\n putOnBoard(topHRow, topHCol, theWay,topHWord, piecesOfTopWord, board);\n return 1;\n }\n else if (!game.isBagEmpty()){\n return 2;\n }else\n return 3;\n }", "public void solve(Scanner in) {\n\tint K = in.nextInt();\n\tint L = in.nextInt();\n\tint S = in.nextInt();\n\t\n\tint[] letters = new int[26];\n\t\n\tin.nextLine();\n\n\tString keyboard = in.nextLine(), word = in.nextLine();\n\tchar c;\n\t\n\t\n\n\tfor (int i = 0; i < K; i++) {\n\t\tc = keyboard.charAt(i);\n\t\tletters[c - 'A']++;\n\t}\n\t\n\tdouble chanceOfWord = 1;\n\n\tfor (int i = 0; i < L; i++) {\n\t\tchanceOfWord *= (letters[word.charAt(i)-'A']+0.0)/(K+0.0);\n\t}\n\t\n \tif (chanceOfWord == 0 || chanceOfWord == 1){\n\t\tSystem.out.println (0.0);\n\t\treturn;\n\t}\n\telse if (L == S) {\n\t\tSystem.out.println (1.0-chanceOfWord);\n\t\treturn;\n\t}\t\n\n\tmax = 0;\n\tcol = 0;\n\tdouble result = full (letters,\"\",word,S);\n\tSystem.out.println ((max - (result+0.0)/(col+0.0)));\n}", "public void solver(int id) {\n String boardLetters = boggleModel.getBoardLetters().toLowerCase();\n Character letter = boardLetters.charAt(id);\n\n\n HashSet<String> words = boggleModel.possibleWords;\n\n // for each word check if character[x] is a neighbour if the startLetter - id -\n for (String word : words) {\n int x = 1;\n // When word(0) == \"a\" and letter is \"a\".. check\n if (word.charAt(0) == letter) {\n List<Integer> usedIDs = new ArrayList<>();\n\n\n usedIDs.add(id);\n checkNeighbours(word, id, x, usedIDs);\n }\n }\n }", "public int countPalindromicSubsequences(String s) {\n \n Integer[][][] memo = new Integer[s.length()][s.length()][4];\n \n int ans = 0;\n for (int i = 0; i < 4; i++) {\n ans = (ans + distinct(s, memo, 0, s.length() - 1, i)) % MOD;\n }\n \n return ans;\n }" ]
[ "0.58199346", "0.5747102", "0.5722055", "0.5721193", "0.5716227", "0.56228864", "0.5581384", "0.5577942", "0.5562232", "0.5550715", "0.54764515", "0.54612744", "0.5447499", "0.5426472", "0.53864205", "0.5372491", "0.5370449", "0.53676397", "0.5355587", "0.5350168", "0.53390026", "0.5328631", "0.5321706", "0.52973384", "0.5285225", "0.52846813", "0.5277006", "0.52746177", "0.527431", "0.5272443", "0.5271594", "0.5253948", "0.52534485", "0.5216985", "0.52023685", "0.51890445", "0.5174246", "0.51735616", "0.5165967", "0.51519006", "0.51498586", "0.51470083", "0.51402366", "0.5118299", "0.5111499", "0.5100891", "0.51008046", "0.50885504", "0.5079861", "0.507276", "0.5070453", "0.506685", "0.50594467", "0.50593174", "0.5053961", "0.504049", "0.5039926", "0.5036891", "0.50332916", "0.5023826", "0.5022282", "0.500104", "0.4982463", "0.49801934", "0.49767864", "0.49688494", "0.49643242", "0.4960075", "0.4955505", "0.49545407", "0.49513677", "0.49482083", "0.49436003", "0.49433652", "0.4938419", "0.49335805", "0.49331087", "0.49292642", "0.4926801", "0.49267694", "0.49249002", "0.49198994", "0.49187908", "0.49159962", "0.49131274", "0.49067643", "0.49030837", "0.49017206", "0.48911393", "0.48888573", "0.48869085", "0.4883865", "0.48804393", "0.4872517", "0.48705837", "0.48702198", "0.48689085", "0.4868796", "0.48676947", "0.48658004" ]
0.5180479
36
`n` stores length of the current substring
public boolean wordBreakUtilTopDown(String s, Set<String> dict,int[] lookup) { int n = s.length(); // return true if the end of the string is reached if (n == 0) { return true; } // if the sub problem is seen for the first time if (lookup[n] == -1) { // mark subproblem as seen (0 initially assuming string // can't be segmented) lookup[n] = 0; for (int i = 1; i <= n; i++) { // consider all prefixes of the current string String prefix = s.substring(0, i); // if the prefix is found in the dictionary, then recur for the suffix if (dict.contains(prefix) && wordBreakUtilTopDown(s.substring(i),dict, lookup)) { // return true if the string can be segmented lookup[n] = 1; return true; } } } // return solution to the current sub problem return lookup[n] == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void SubString(String str, int n)\r\n {\r\n\t\tint count = 0;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < n; i++) { \r\n for (int j = i+1; j <= n; j++) {\r\n \t String subs = str.substring(i, j);\r\n \t \r\n \t if((Integer.valueOf(subs)) <= 26) {\r\n \t\t System.out.println(subs);\r\n \t\t sb.append(subs);\r\n \t\t \r\n \t }\r\n }\r\n }\r\n \r\n for(int i = 0; i < sb.length() - 2; i++) {\r\n \t for(int j = i + 1; j < sb.length() - 1; j++) {\r\n \t\t for(int k = j + 1; k < sb.length(); k++) {\r\n \t\t\t StringBuilder temp = new StringBuilder();\r\n \t\t\t temp.append(sb.charAt(i));\r\n \t\t\t temp.append(sb.charAt(j));\r\n \t\t\t temp.append(sb.charAt(k));\r\n \t\t\t //System.out.println(temp.toString());\r\n \t\t\t if(temp.toString().equals(str)) { // !!! have to use equals!!!!\r\n \t\t\t\t count++;\r\n \t\t\t }\r\n \t\t }\r\n \t } \r\n \t}\r\n System.out.println(\"count \" + count);\r\n }", "static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(temp)) {\n result.add(temp);\n }\n }\n }\n }\n return result.size();\n\n }", "static long repeatedString(String s, long n) {\n char[] arr=s.toCharArray();\n int i,count=0,cnt=0;\n for(i=0;i<arr.length;i++){\n if(arr[i]=='a'){\n count++;\n }\n }\n long len=(n/arr.length)*count;\n long extra=n%arr.length;\n if(extra==0){\n return len;\n }else{\n for(i=0;i<extra;i++){\n if(arr[i]=='a'){\n cnt++;\n }\n }\n return len+cnt;\n }\n\n\n }", "public String getSuffixFromN(String line, int n) {\n\t\tint length = line.length();\n\t\tString result = line.substring(length-n,length);\n\t\treturn result;\n\t}", "public String next(int n) throws JSONException {\n if(n == 0) {\n return \"\";\n }\n\n char[] chars = new char[n];\n int pos = 0;\n while(pos < n) {\n chars[pos] = this.next();\n if(this.end()) {\n throw this.syntaxError(\"Substring bounds error\");\n }\n pos += 1;\n }\n\n return new String(chars);\n }", "static long repeatedString(String s, long n) {\n if (s.contains(\"a\")) {\n StringBuilder stringBuilder = new StringBuilder(s);\n String infiniteString = \"\";\n if (stringBuilder.length() < n) {\n //repeat String if length is less than n\n infiniteString = infiniteString(s, n);\n }\n int count = 0;\n char[] stringArray = infiniteString.toCharArray();\n for (int i = 0; i < n; i++) {\n\n char a = 'a';\n if (stringArray[i] == a) {\n count++;\n }\n }\n return count;\n } else {\n return 0;\n }\n }", "public abstract void createLongestRepeatedSubstring();", "private String concatNcopies(int n,String str){\n\t\tString result = \"\";\n\t\tfor (int i=0;i<n;i++){\n\t\t\tresult +=str;\n\t\t}\n\t\treturn result;\n\t}", "public static String nCopies(String s, int n) {\n\t\tif (s == null) {\n\t\t\treturn null;\n\t\t}\n\t\tStringBuilder sb = new StringBuilder(s.length() * n + 8);\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tsb.append(s);\n\t\t}\n\t\treturn sb.toString();\n\t}", "static long repeatedString(String s, long n) {\n\n char[] str = s.toCharArray();\n\n String temp = \"\";\n\n int i=0;\n long count=0;\n\n while(i<str.length){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n long occurance = n/str.length;\n long remainder = n%str.length;\n count = count*occurance;\n\n i=0;\n while(i<remainder){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n return count;\n\n }", "public String nTwice(String str, int n) {\r\n String result = str;\r\n\r\n if (str.length() > n - 1) {\r\n String frontChars = str.substring(0, n);\r\n String backChars = str.substring(str.length() - n, str.length());\r\n\r\n result = frontChars + backChars;\r\n }\r\n\r\n return result;\r\n }", "static long repeatedString(String s, long n) {\n long a_count = 0;\n long total_a_count = 0;\n long modulo_s = 0;\n\n if(n>s.length()){\n for (int i=0; i<s.length(); i++)\n if(s.charAt(i)=='a') a_count++;\n\n total_a_count = a_count*(n/s.length());\n modulo_s = n%s.length();\n\n for (int i=0; i<modulo_s; i++)\n if(s.charAt(i)=='a') total_a_count++;\n\n return total_a_count;\n }\n\n else {\n for (int i=0; i<n; i++)\n if(s.charAt(i)=='a') a_count++;\n return a_count;\n }\n }", "public static String ntimes(String s,int n){\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tbuf.append(s);\n\t\t}\n\t\treturn buf.toString();\n\t}", "public String everyNth(String str, int n) {\n String result = \"\";\n \n for (int i = 0; i < str.length(); i += n) {\n result += str.charAt(i);\n }\n \n return result;\n}", "static long substrCount(int n, String s) {\n \tlong output=0;\n \t\n \tboolean[][] matrix = new boolean[n][n];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tmatrix[i][i] = true;\n \t\toutput++;\n \t}\n \t\n \tfor(int gap=1; gap<n; gap++) {\n \t\tfor(int i=0; i+gap <n; i++) {\n \t\t\tint j = i+gap;\n \t\t\t\n \t\t\tif(gap ==1) {\n \t\t\t\tif(s.charAt(i) == s.charAt(j)) {\n \t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif(s.charAt(i) == s.charAt(j) && matrix[i+1] [j-1]) {\n \t\t\t\t\t\n \t\t\t\t\tif(j-i >= 4 && s.charAt(i)== s.charAt(i+1)) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else if(j-i <4) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn output;\n }", "static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }", "public String everyNth(String str, int n) {\n \n int len = str.length();\n int i = 0, p = 0;\n StringBuffer sb = new StringBuffer();\n while (p <= len - 1) {\n sb.append(str.charAt(p));\n i++;\n p = n * i; \n }\n \n return sb.toString();\n}", "public boolean strCopies(String str, String sub, int n) {\n//Solution to problem coming soon\n}", "public static int nthIndexOf(String str, String substr, int n) {\n int pos = -1;\n while (n > 0) {\n if (pos >= str.length()) {\n return -1;\n }\n if ((pos = str.indexOf(substr, pos + 1)) == -1) {\n break;\n }\n n--;\n }\n return pos;\n }", "public static String moreLenString(int n) {\n\t\tif (n <= 0) {\n\t\t\tthrow new ArgsErrorException();\n\t\t}\n\t\treturn String.format(RString.MORE_LEN_STRING, n);\n\t}", "static long repeatedString(String s, long n) {\n \t\n \tchar first;\n \tfirst = s.charAt(0);\n \t\n \tint count = 0;\n \tlong[] fill = new long[n];\n \t\n \tfor(int i=1; i<n; i++) {\n \t\tif(first == s.charAt(i)) count++;\n \t}\n \t\n \tlong result = ((n / s.length()) * count) + (n % s.length());\n \treturn result;\n\n }", "public abstract String getLongestRepeatedSubstring();", "public String getFullString(int n) {\n\t\treturn strings.get(n);\n\t\n\t}", "static int size_of_sub(String passed){\n\t\treturn 1;\n\t}", "public String countAndSay(int n) {\n if(n == 1){\n return \"1\";\n }else{\n StringBuilder sb = new StringBuilder();\n int k = 0;\n String s = countAndSay(n-1);\n int l = s.length();\n for(int i = 0; i < l; i++){\n if(i == 0){\n k ++;\n }else{\n if(s.charAt(i) == s.charAt(i-1)){\n k ++;\n }else{\n sb.append(k);\n sb.append(s.charAt(i-1));\n k = 1;\n }\n }\n }\n sb.append(k);\n sb.append(s.charAt(l-1));\n return sb.toString();\n }\n }", "public static String getAfterNChar(String text, char ch, int n) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tint chCount = 0;\n\t\tint i=0;\n\t\tfor (; i<chars.length; i++) {\n\t\t\tif (chars[i] == ch) {\n\t\t\t\tchCount++;\n\t\t\t\tif (chCount >= n) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (; i<chars.length; i++) {\n\t\t\tsb.append(chars[i]);\n\t\t}\n\t\tString tokens = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn tokens;\n\t}", "static long substrCount(int n, String s) {\n ArrayList<Point> points = new ArrayList<>();\n\n char current = s.charAt(0);\n int count = 1;\n\n for (int i = 1; i < s.length(); i++) {\n char ch = s.charAt(i);\n if (current == ch) {\n count++;\n } else {\n points.add(new Point(current, count));\n current = ch;\n count = 1;\n }\n }\n points.add(new Point(current, count));\n\n count = 0;\n if (points.size() > 2) {\n\n count += addup(points.get(0).count);\n\n for (int i = 1; i < points.size() - 1; i++) {\n Point prev = points.get(i - 1);\n Point curr = points.get(i);\n Point next = points.get(i + 1);\n\n\n count += addup(curr.count);\n\n if (prev.ch == next.ch && curr.count == 1) {\n int min = Math.min(prev.count, next.count);\n count += min;\n }\n }\n\n count += addup(points.get(points.size() - 1).count);\n\n } else if (points.size() == 1) {\n Point curr = points.get(0);\n count += addup(curr.count);\n } else if (points.size() == 2) {\n Point prev = points.get(0);\n count += addup(prev.count);\n Point next = points.get(1);\n count += addup(next.count);\n }\n\n\n System.out.println(points);\n\n return count;\n\n }", "public static String nTimes(String word, int n) {\n\t\tString concatWord = \"\";\n\t\t\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tconcatWord += word;\n\t\treturn concatWord;\n\t}", "public static String getUntilNChar(String text, char ch, int n) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars = text.toCharArray();\n\t\tint chCount = 0;\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == ch) {\n\t\t\t\tchCount++;\n\t\t\t\tif (chCount >= n) {\n\t\t\t\t\tString tokens = sb.toString();\n\t\t\t\t\tsb.setLength(0);\n\t\t\t\t\treturn tokens;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(chars[i]);\n\t\t}\n\t\tString tokens = sb.toString();\n\t\tsb.setLength(0);\n\t\treturn tokens;\n\t}", "static String infiniteString(String strInput, Long n) {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i <= n; i++) {\n //stringWriter.write( strInput );\n //stringBuilder.append( String.format(strInput));\n stringBuilder.append(strInput);\n System.out.println(\"Length:\" + String.valueOf(stringBuilder).length());\n /*if(stringBuilder.length() == n || stringBuilder.length() > 100)*/\n if (String.valueOf(stringBuilder).length() == n) {\n break;\n }\n }\n\n return String.valueOf(stringBuilder);\n }", "public static int length(int n)\n {\n int w = n;\n if(w == 1)\n {\n return 1;\n } \n else\n {\n return 1 + length(next(w));\n }\n }", "public String repeatFront(String str, int n) {\n StringBuilder result = new StringBuilder(str.length() * n);\n for (int i = n; i > 0; i--) {\n result.append(str.substring(0, i));\n }\n return String.valueOf(result);\n }", "public String countAndSay(int n) {\n\n \tif (n <= 0)\n \t\treturn null;\n \t\n \tString[] retString = new String[n];\n \tfor (int i = 0; i < n; i++){\n \t\tif (i < 1)\n \t\t\tretString[i] = \"1\";\n \t\telse{\n \t\t\tString prev = retString[i-1];\n \t\t\tchar[] prevArray = prev.toCharArray();\n \t\t\tStringBuffer buffer = new StringBuffer();\n \t\t\tchar current = prevArray[0];\n \t\t\tint count = 0;\n \t\t\tfor (int j = 0; j < prevArray.length; j++){\n \t\t\t\tif (prevArray[j] == current){\n \t\t\t\t\tcount ++; \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\tbuffer.append(count);\n \t\t\t\t\tbuffer.append(current);\n \t\t\t\t\tcurrent = prevArray[j];\n \t\t\t\t\tcount = 1;\n \t\t\t\t}\n \t\t\t}\n \t\t\tbuffer.trimToSize();\n \t\t\tif (buffer.length() == 0 || buffer.charAt(buffer.length()-1) != current){\n \t\t\t\tbuffer.append(count);\n \t\t\t\tbuffer.append(current);\n \t\t\t}\n \t\t\tretString[i] = buffer.toString();\n \t\t}\n \t}\n \treturn retString[n-1];\n \t\n }", "private void checkBounds(int n) throws ParseException\n {\n if (pos + n > s.length())\n {\n throw new ParseException(format(\"Requested: %s, Available: %s\", n, remaining()));\n }\n }", "public String countAndSay(int n)\n {\n if(n<=0)\n return \"\";\n String origin=\"1\";\n //we iterate n-1 times\n for(int i=1; i<n; i++)\n {\n //we generate a string for each level\n StringBuffer sb=new StringBuffer();\n int count=1;\n char lastChar=origin.charAt(0);\n for(int j=1; j<origin.length(); j++)\n {\n if(origin.charAt(j)==lastChar)\n count++;\n else\n {\n sb.append(count);\n sb.append(lastChar);\n count=1;\n lastChar=origin.charAt(j);\n }\n }\n sb.append(count);\n sb.append(lastChar);\n origin=sb.toString();\n }\n return origin;\n }", "java.lang.String getN();", "private byte[] setStringSize(StringBuffer s, int n) {\n\n byte b[];\n int i, slen;\n\n slen = s.length();\n\n if (slen >= n) {\n return (s.toString().substring(0, n).getBytes());\n }\n\n b = new byte[n];\n for (i = 0; i < slen; i++) {\n b[i] = (byte) s.charAt(i);\n }\n for (i = slen; i < n; i++) {\n b[i] = 0;\n }\n\n return (b);\n }", "private static String findSubString(int index, int len, String s2) {\n\t\tif ((s2.length() - index) >= len) {\n\t\t\treturn s2.substring(index - len + 1, index) + s2.substring(index, index+len);\n\t\t} else {\n\t\t\treturn s2.substring(index - len + 1, index) + s2.substring(index);\n\t\t}\n\t}", "public String missingChar(String str, int n) {\n String front = str.substring(0, n);\n String back = str.substring(n+1, str.length());\n \n return front + back;\n}", "public String countAndSay(int n) {\n if (n == 1)\n return \"1\";\n String a = \"1\";\n for (int i = 2; i <= n; i++) {\n StringBuilder sb = new StringBuilder();\n int count = 0;\n char[] chars = a.toCharArray();\n char c = chars[0];\n for (int j = 0; j < chars.length; j++) {\n if (chars[j] != c) {\n sb.append(count);\n sb.append(c);\n c = chars[j];\n count = 1;\n } else {\n count++;\n }\n }\n if (count != 0) {\n sb.append(count);\n sb.append(c);\n }\n\n if (i == n) {\n return sb.toString();\n }\n //为下次循环准备\n a = sb.toString();\n\n }\n return null;\n }", "public static void main(String[] args) {\n// x = x + 2;\n// System.out.println(name.substring(x,x+2));\n// x = x + 2;\n// System.out.println(name.substring(x,x+2));\n// x = x + 2;\n// System.out.println(name.substring(x,x+2));\n\n String name = \"Gokyuzum\";\n int charCount = name.length();\n int lastCharIndex = charCount-1;\n\n // my condition is x <= charCount - 2 or lastCharIndex-1\n\n for (int x = 0; x <= lastCharIndex-1; x += 2){\n System.out.println(name.substring(x,x+2));\n }\n\n }", "static String repeat(String s, int n)\n {\n // Copying given string to temparory string.\n String s1 = s;\n\n for (int i = 1; i < n; i++)\n s = s + s1; // Concatenating strings\n\n return s;\n }", "public static void substringtest(){\n }", "public static String getNWordsStr(String text, int n) {\n\t\treturn getUntilNChar(text, ' ', n);\n\t}", "static int countingValleys(int n, String s) {\n int valleyCounter =0;\n byte vorm = 0;\n int curLevel=0;\n for(int i=0;i<s.length();i++){\n String cur = s.substring(i,i+1);\n int posNeg = cur.equals(\"U\")?1:-1;\n curLevel+=posNeg;\n if(curLevel == -1 && posNeg == -1){\n valleyCounter++;\n }\n }\n return valleyCounter;\n }", "static long substrCount(int n, String s) {\nchar arr[]=s.toCharArray();\nint round=0;\nlong count=0;\nwhile(round<=arr.length/2)\n{\nfor(int i=0;i<arr.length;i++)\n{\n\t\n\t\tif(round==0)\n\t\t{\n\t\t//System.out.println(arr[round+i]);\n\t\tcount++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(i-round>=0&&i+round<arr.length)\n\t\t\t{\n\t\t\t\tboolean flag=true;\n\t\t\t\tchar prev1=arr[i-round];\n\t\t\t\tchar prev2=arr[i+round];\n\t\t\t\t\n\t\t\t\tfor(int j=1;j<=round;j++)\n\t\t\t\t{\n\t\t\t\t\tif(prev1!=arr[i+j]||prev1!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif(arr[i+j]!=arr[i-j])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tflag=false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(flag)\n\t\t\t\t{\n\t\t\t\t\t//System.out.print(arr[i-round]);\n\t\t\t\t\t//System.out.print(arr[round+i]);\n\t\t\t\t\t//System.out.println(round);\n\t\t\t\t\t//System.out.println();\n\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n}\nround++;\n}\nreturn count;\n }", "public static String pattern(int n) {\n\t\tif(n < 1) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tString sa[] = new String[n];\n\t\tString s = \"\";\n\n\t\tint x = 0;\n\t\tsa[0] = Integer.toString(n);\n\t\twhile(x < sa.length-1) {\n\t\t\tsa[x+1] = sa[x]+Integer.toString(n-1);\n\t\t\tx++; n--;\n\t\t}\n\t\t\n\n\t\tint i = sa.length;\n\t\t//int i =0;\n\t\twhile(i > 0) {\n\t\t\t//if(s.substring(0, i-1).length() >= m.length()) \n\t\t\t\t//s += \"\\n\"+s.substring(0, i-1);\n\t\t\t//s += \"\\n\"+s.substring(0,i-1);\n\t\t\ts += sa[i-1]+\"\\n\";\n\t\t\ti--;\n\t\t}\t\n\t\t\n\t\t\n\t\treturn s.trim();\n\t}", "public static String replace(String from, String text, int nth) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn \"\"; // Dummy return\r\n\t}", "public String countAndSay(int n) {\n String input = \"1\";\n\n // As per the constraint: 1 <= n <= 30.\n if(n > 0 && n <= 30) {\n // Loop starts from 0. However, counting starts from the second iteration.\n int i = 1;\n // Iterate recursively.\n while(i < n) {\n input = transform(input);\n // Increment i.\n i++;\n }\n }\n\n // If constraint is not satisfied, \"1\" is returned.\n return input; \n }", "public Array<T> copyOfSuffix(int n)\n {\n assert n >= 0 && n <= next;\n\n return copyOfRange(next - n, next);\n }", "private static void stringBuilder(String[] ss, int n) {\n Timer t = new Timer(); \n String res = null;\n StringBuilder buf = new StringBuilder();\n for (int i=0; i<n; i++) \n buf.append(ss[i]);\n res = buf.toString();\n System.out.format(\"Result length:%7d; time:%8.3f sec\\n\" , res.length(), t.Check());\n }", "public static String lenString(int m, int n) {\n\t\tif (m <= 0 || m > n) {\n\t\t\tthrow new ArgsErrorException();\n\t\t}\n\t\treturn String.format(RString.LEN_STRING, m, n);\n\t}", "static int size_of_rnz(String passed){\n\t\treturn 1;\n\t}", "public My_String substring(int start, int end);", "public int strCount(String str, String sub) {\n//Solution to problem coming soon\n}", "private int getLoopLength(int n){\n Uri uri = Uri.parse(mFileName[n]);\n MediaMetadataRetriever mmr = new MediaMetadataRetriever();\n mmr.setDataSource(mContext, uri);\n String durationStr = mmr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);\n return Integer.parseInt(durationStr);\n }", "public String generateTheString(int n) {\n return \"b\" + \"ab\".substring(n % 2, 1 + n % 2).repeat(n - 1);\n }", "public static void main(String[] args) {\n String str = \"aabacbebebe\";\n int k = 3;\n\n int maxLength = getMaxSubstr(str, k);\n System.out.println(maxLength);\n }", "public static void main(String[] args) {\n\n String str = \"abXYabc\"; //abXYabc //prefix means first couple of letters\n int n = 2; // 3\n // abX Yabc // rest of the string means word after the prefix\n\n String prefix = str.substring(0,n); // 0, 2 //here we need multiple characters\n String remaining = str.substring(n); //XYabc\n\n System.out.println(remaining.contains(prefix));\n\n\n }", "static int size_of_inr(String passed){\n\t\treturn 1;\n\t}", "public static String MissingChar(String str, int n) {\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.deleteCharAt(n);\n return sb.toString();\n}", "public static String countAndSay(int n) {\n\t\tStringBuilder curr=new StringBuilder(\"1\");\n\t\tStringBuilder prev;\n\t\tint i =1;\n\t while(i!=n) {\n\t \t\tprev=curr;\n\t curr=new StringBuilder(); \n\t int count=1;\n\t char say=prev.charAt(0);\n\t for (int j=1;j<prev.length();j++){\n\t\t \tif (prev.charAt(j)!=say){\n\t\t \t\tcurr.append(count).append(say);\n\t\t \t\tcount=1;\n\t\t \t\tsay=prev.charAt(j);\n\t\t \t}\n\t\t \telse count++;\n\t\t }\n\t //这句话的作用可以通过n = 5 --> n=6 看出来\n\t curr.append(count).append(say);\n\t i++;\n\t }\t \t \n\t return curr.toString();\n }", "public String countAndSay(int n) {\n if (n<=0)\n return \"\";\n \n int count = 0;\n StringBuilder str = new StringBuilder();\n \n // Append 1 to the string as the sequence start with 1.\n str.append(\"1\");\n \n // In a loop, generate the next string in the sequence 'n'-1 times. \n // Since \"1\" is already the first element in the sequence.\n for(int i=1; i<n; i++){\n \n // Creating the next sequence, looking at the previous one\n int j=0, len=str.length();\n StringBuilder result = new StringBuilder();\n \n // Loop through each element in the current i'th sequence string, and generate the next one.\n // If the j'th and the (j+1)'th element are the same, increase the count. Else, append the \n // string with the count and the j'th element and continue with the next element in the string.\n while(j<len){\n count = 1;\n while(j<len-1 && str.charAt(j) == str.charAt(j+1)){\n count++;\n j++;\n }\n result.append(count);\n result.append(str.charAt(j));\n j++;\n }\n\n // Update the string 'str' to be the result string, as that will be used to create the \n // next string in the sequence.\n str = result;\n }\n \n return str.toString();\n }", "private static String padRight(String s, int n) {\n n = n - (countLength(s) - s.length());//한글이 있는 경우 다시 글수를 줄여준다.\n return String.format(\"%1$-\" + n + \"s\", s);\n }", "private static String findSubString2(int index, int len, String s2) {\n\t\tint wLen = len - 1;\n\t\tint remLen = s2.length() - index;\n\t\tif (remLen <= wLen) {\n\t\t\treturn s2.substring(0, index) + s2.substring(index, index+remLen);\n\t\t} else {\n\t\t\tif (index == 0) {\n\t\t\t\treturn s2.substring(0, index) + s2.substring(index, len);\n\t\t\t}\n\t\t\treturn s2.substring(0, index) + s2.substring(index, len+1);\n\t\t}\n\t}", "static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}", "public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }", "private int cap(long n) {\n\t\t\treturn (int) Math.min(RandomAccessDataFile.this.length - this.position, n);\n\t\t}", "static int countingValleys(int n, String s) {\n int count = 0;\n int altitude = 0;\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == 'U' && altitude == -1) {\n count++;\n }\n altitude += s.charAt(i) == 'U' ? 1 : -1;\n }\n return count;\n }", "public static void main(String[] args) {\n String name = \"Georgesa\";\n int charCount = name.length();\n int lastCharIndex = charCount - 1;\n\n\n // System.out.println( name.substring (0,2));\n // System.out.println( name.substring (2,4));\n // System.out.println( name.substring (4,6));\n //System.out.println( name.substring (6,8));\n\n\n }", "public static String substring(String s, int index, int length) {\r\tString result = \"\";\r\r\tfor (int i = 0; i < length; i++)\r\t result += s.charAt(index + i);\r\r\treturn result;\r\r }", "public IRubyObject group(long n) {\n if (n < 0 || n >= getSize() || matcher.group((int)n) == null) {\n return getRuntime().getNil();\n }\n // Fix for JRUBY-97: Temporary fix pending \n // decision on UTF8-based string implementation.\n // String#substring reuses the storage of the original string\n // <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513622> \n // Wrapping the String#substring in new String prevents this.\n // This wrapping alone was enough to fix the failing test cases in\n // JRUBY-97, but at the same time the testcase remained very slow\n // The additional minor optimizations to RubyString as part of the fix\n // dramatically improve the performance. \n return getRuntime().newString(matcher.group((int)n));\n }", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "public long distinctSubstring() {\n long ans = 1;\n int n = rank.length;\n for (int i = 0; i < n; i++) {\n long len = n - i;\n if (rank[i] < n - 1) {\n len -= lcp[rank[i]];\n }\n ans += len;\n }\n return ans;\n }", "public ILoString removeFirst(int n) {\n if (n > 0) {\n return this.rest.removeFirst(n - 1);\n }\n\n else {\n return this;\n }\n }", "public static String lenabc(int m, int n) {\n\t\tif (m <= 0 || m > n) {\n\t\t\tthrow new ArgsErrorException();\n\t\t}\n\t\treturn String.format(RString.LEN_abc, m, n);\n\t}", "public static void main(String[] args){\n\t\tSystem.out.println(makeThreeSubstr(\"hello\",0,2)); //should be hehehe\n\t\tSystem.out.println(makeThreeSubstr(\"shenanigans\",3,7)); //should be naninaninani\n\t}", "public static String completeChaine(String p_in, char c, int n) {\n\n\t\t\n\t\tString ret=p_in\t;\n\t\tif (ret!=null){\n\t\t\tfor (int i=0;i<n-p_in.length();i++){\n\t\t\t\tret = c + ret;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public int substringWidth(String str, int offset, int length) {\r\n\t\tint w = 0;\r\n\t\tfor (int i = offset; i < offset + length; i++) {\r\n\t\t\tw += charWidth(str.charAt(i));\r\n\t\t}\r\n\t\treturn w;\r\n\t}", "public void addCount(ArrayList<Character> sequence, int n) {\n \tString s = Integer.toString(n);\n \tfor(int i = 0; i < s.length(); i++) {\n \t\tsequence.add(s.charAt(i));\n \t}\n \treturn;\n }", "public static void main(String[] args) {\n\t\t\t\n\t\t\tString input=\"ABCGRETCABCG\";\n\t\t\tint n = 3;\n\t\t\t\n\t\t\tMap<String,Integer> substrMap=new HashMap<String,Integer>();\n\t\t\t\n\t\t\tfor(int i=0;i+n<=input.length();i++){\n\t\t\t\t\n\t\t\t\tString substr=input.substring(i, i+n);\n\t\t\t\t\n\t\t\t\tint frequency=1;\n\t\t\t\t\n\t\t\t\tif(substrMap.containsKey(substr)){\n\t\t\t\t\t\n\t\t\t\t\tfrequency=substrMap.get(substr);\n\t\t\t\t\tfrequency++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsubstrMap.put(substr, frequency);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println(substrMap.toString());\n\t\t}", "static int size_of_rnc(String passed){\n\t\treturn 1;\n\t}", "void repeat(StringBuilder sb, char c, int n)\n\t{\n\t\twhile(n-- > 0)\n\t\t\tsb.append(c);\n\t}", "public static int countingValleys(int n, String s) {\n // Write your code here\n int level = 0;\n int valley = 0;\n for (int i = 0; i < n; i++) {\n if (s.charAt(i) == 'U') {\n level++;\n } else {\n level--;\n }\n //Valley가 되는 기준은 마지막U로 sea level까지 올라와야 완성되니까\n if (s.charAt(i) == 'U' && level == 0) {\n valley++;\n }\n }\n return valley;\n }", "private static void stringConcat(String[] ss, int n) {\n Timer t = new Timer(); \n String res = \"\";\n for (int i=0; i<n; i++) \n res += ss[i];\n System.out.format(\"Result length:%7d; time:%8.3f sec\\n\" , res.length(), t.Check());\n }", "public int findSubstringInWraproundString(String p) {\n if(p == null || p.length() == 0) {\n return 0;\n }\n // count[i] is the maximum unique substring that ends with a...z\n int[] count = new int[26];\n // keep track of the number of consecutive letters ended with current letter\n int consecutiveCount = 1;\n for(int i = 0; i < p.length(); i++) {\n if(i > 0 && isConsecutive(p.charAt(i - 1), p.charAt(i))) {\n consecutiveCount++;\n } else {\n consecutiveCount = 1;\n }\n int index = p.charAt(i) - 'a';\n count[index] = Math.max(count[index], consecutiveCount);\n }\n int result = 0;\n for(int singleCount : count) {\n result += singleCount;\n }\n return result;\n }", "static int size_of_sta(String passed){\n\t\treturn 3;\n\t}", "static int size_of_jnc(String passed){\n\t\treturn 3;\n\t}", "public static String replicate(char c, int n)\n {\n String replicado = \"\";\n for (int i=0;i<n;i++){\n replicado += c;\n }\n return replicado;\n }", "public static void main(String[] args) {\n String str = \"This is text\";\n\n // Returns the substring from index 3 to the end of string.\n String substr = str.substring(3);\n\n System.out.println(\"- substring(3)=\" + substr);\n\n // Returns the substring from index 2 to index 7.\n substr = str.substring(2, 7);\n\n System.out.println(\"- substring(2, 7) =\" + substr);\n\t}", "public static void main(String[] args) {\n String str = \"pwwkew\";\n// System.out.println(str.length());\n System.out.println(lengthOfLongestSubstring(str));\n\n\n }", "public native String substringData(double offset, double count) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\treturn jso.substringData(offset, count);\r\n }-*/;", "public static void main(String [] args) {\n\t\tString str = \"ccacacabccacabaaaabbcbccbabcbbcaccabaababcbcacabcabacbbbccccabcbcabbaaaaabacbcbbbcababaabcbbaa\"\n\t\t\t\t+ \"ababababbabcaabcaacacbbaccbbabbcbbcbacbacabaaaaccacbaabccabbacabaabaaaabbccbaaaab\"\n\t\t\t\t+ \"acabcacbbabbacbcbccbbbaaabaaacaabacccaacbcccaacbbcaabcbbccbccacbbcbcaaabbaababacccbaca\"\n\t\t\t\t+ \"cbcbcbbccaacbbacbcbaaaacaccbcaaacbbcbbabaaacbaccaccbbabbcccbcbcbcbcabbccbacccbacabcaacbcac\"\n\t\t\t\t+ \"cabbacbbccccaabbacccaacbbbacbccbcaaaaaabaacaaabccbbcccaacbacbccaaacaacaaaacbbaaccacbcbaaaccaab\"\n\t\t\t\t+ \"cbccacaaccccacaacbcacccbcababcabacaabbcacccbacbbaaaccabbabaaccabbcbbcaabbcabaacabacbcabbaaabccab\"\n\t\t\t\t+ \"cacbcbabcbccbabcabbbcbacaaacaabb\"\n\t\t\t\t+ \"babbaacbbacaccccabbabcbcabababbcbaaacbaacbacacbabbcacccbccbbbcbcabcabbbcaabbaccccabaa\"\n\t\t\t\t+ \"bbcbcccabaacccccaaacbbbcbcacacbabaccccbcbabacaaaabcccaaccacbcbbcccaacccbbcaaaccccaabacabc\"\n\t\t\t\t+ \"abbccaababbcabccbcaccccbaaabbbcbabaccacaabcabcbacaccbaccbbaabccbbbccaccabccbabbbccbaabcaab\"\n\t\t\t\t+ \"cabcbbabccbaaccabaacbbaaaabcbcabaacacbcaabbaaabaaccacbaacababcbacbaacacccacaacbacbbaacbcbbbabc\"\n\t\t\t\t+ \"cbababcbcccbccbcacccbababbcacaaaaacbabcabcacaccabaabcaaaacacbccccaaccbcbccaccacbcaaaba\";\n\t\tSystem.out.println(substrCount2(1017, str));\n\t}", "private String reduce(String str, int i) {\n\t\tString ret = str;\n\t\tif (i == 8) {\n\t\t\tif (str.length() > 2) {\n\t\t\t\tret = str.substring(str.length()-2);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "@Override\r\n\tpublic String randString(int n, String base) {\n\t\tint bLength = base.length();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tRandom r = new Random();\r\n\t\tint index;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tindex = r.nextInt(bLength);\r\n\t\t\tsb.append(base.charAt(index));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static int subStr(String str)\n\t{\n\t\tif(str.isEmpty()) return 0;\n\t\tint len=0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < str.length(); i++) \n\t\t{\n\t\t\tboolean visited[]=new boolean[256];\n\t\t\t\n\t\t\tfor (int j = i; j < str.length(); j++) \n\t\t\t{\n\t\t\t\t//if current jth character is already visited, break loop and move to next ith \n\t\t\t\tif(visited[str.charAt(j)])\n\t\t\t\t\tbreak;\n\t\t\t\t//take the len and compare with global len and make current char as true\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlen=Math.max(len, j-i+1);\n\t\t\t\t\tvisited[str.charAt(j)]=true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//when element is removed from window, mark it as false\n\t\t\tvisited[str.charAt(i)]=false;\n\t\t\t\n\t\t\t\n\t\t}\n\t\treturn len;\n\t}", "public static void main(String[] args) {\n\t\tint n=3;\n\t\tString s=\"1\";\n\t\tint count =1;\n\t\tint k=1;\n\t\twhile(k<n){\n\t\t\tStringBuilder t=new StringBuilder();\n\t\t\t//t.append(s.charAt(0));\n\t\t\tfor(int i=1;i<=s.length();i++){\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(i==s.length() || s.charAt(i-1)!=s.charAt(i)){\n\t\t\t\t\tt.append(count); t.append(s.charAt(i-1));\n\t\t\t\t\tcount=1;\n\t\t\t\t}\n\t\t\t\telse if(s.charAt(i-1)==s.charAt(i)){count=count+1;}\n\t\t\t }\t\n\t\t\t\ts=t.toString();\n\t\t\t\tk=k+1;\n\t\t\t\tSystem.out.println(\"k:\"+k);\n\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(s);\n\t\t\t\n\t\t\n\t\t\n\t\t\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 }", "public int lengthOfLongestSubstring2(String s) {\n int n = s.length(), ans = 0;\n int[] index = new int[128]; // current index of character\n // try to extend the range [i, j]\n for (int j = 0, i = 0; j < n; j++) {\n i = Math.max(index[s.charAt(j)], i);\n ans = Math.max(ans, j - i + 1);\n index[s.charAt(j)] = j + 1;\n }\n return ans;\n }", "static int size_of_inx(String passed){\n\t\treturn 1;\n\t}" ]
[ "0.6875961", "0.68417114", "0.6810027", "0.67235607", "0.6634423", "0.65867627", "0.6537062", "0.6515448", "0.6505105", "0.64935154", "0.64703953", "0.6424151", "0.63958645", "0.63928723", "0.6313594", "0.6301233", "0.62984943", "0.6286847", "0.6280782", "0.6274796", "0.62221444", "0.6140961", "0.6119126", "0.6116924", "0.61162746", "0.606758", "0.6020634", "0.5992511", "0.5961389", "0.59566605", "0.59467906", "0.59327", "0.5882021", "0.5879455", "0.5878847", "0.5846291", "0.5836066", "0.5833654", "0.5825882", "0.58211976", "0.5802302", "0.58007985", "0.5740427", "0.5730058", "0.57065123", "0.5672922", "0.5670284", "0.56619996", "0.56601626", "0.5644988", "0.5639244", "0.5631795", "0.56288576", "0.56227183", "0.5604633", "0.55936974", "0.55857885", "0.55820566", "0.5579353", "0.5568296", "0.5555291", "0.5555228", "0.5551217", "0.5491396", "0.54777527", "0.54675895", "0.5465824", "0.54635584", "0.5444545", "0.54361796", "0.5434835", "0.5431769", "0.5410481", "0.5393866", "0.538956", "0.5381769", "0.5376824", "0.53745127", "0.53708655", "0.5367478", "0.5363189", "0.53594863", "0.53554946", "0.53548694", "0.5346131", "0.5340372", "0.5339674", "0.53306067", "0.53267723", "0.53266454", "0.5322495", "0.5319351", "0.5318506", "0.5317476", "0.53154993", "0.5311212", "0.53077716", "0.5304814", "0.5304091", "0.5294597", "0.5293791" ]
0.0
-1
How can we do it bottom up? The string before index 0 is alway breakable as empty string. So table[0] can be always true. To check if string till index i is breakable or not, we check from index 0 to index i1 if there is any index j till which string is breakable. If yes, then we just check if substring from index j to i, that will make table[i] as true. Time Complexity: O(n to the power of 2) Space Complexity: requires O(n) extra space, where n is the length of the input string for the boolean array
public boolean wordBreakBottomUp(String s, List<String> wordDict) { if (s == null || s.length() == 0) { return false; } Set<String> set = new HashSet<>(wordDict); return wordBreakUtilBottomUp(s,set); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canBreak(String input, String[] dict) {\n Set<String> dicSet = toSet(dict);\n // NOTICE: sometimes it will be handy to have such index matching, canBreak[i] represents index(i-1) in input,\n // also can represent the substring(0,i).\n // M[i] 代表前i个字母是否能被分解为一个或多个单词在dict里面。\n // M[j] 相当于左大段,查表, 0 <= j < i。 如果在就是true。\n // 同时 右小段的 string[j,i-1] 必须在dict里面。\n boolean[] canBreak = new boolean[input.length() + 1]; // include 0.\n canBreak[0] = true; // base case , 每个单词用0次。 空字符串 \"\"\n for (int i = 1; i < canBreak.length; i++) {\n // enumerate the rightmost split\n for (int j = 0; j < i; j++) {\n // cut at the left of input[j].\n // check the subproblem and check the rest of the string.\n System.out.println(input);\n System.out.println(\"j: \" + j + \", i:\" + i + \" \" + \"左大段查表:M[j]: \" + canBreak[j] + \", check dic for subString (右小段): \"\n + input.substring(j, i) + \"是否在dic内: \" + dicSet.contains(input.substring(j, i)));\n if (dicSet.contains(input.substring(j, i)) && canBreak[j]) {\n System.out.println(\"enter if, \" + \"j: \" + j + \", i: \" + i);\n canBreak[i] = true;\n break;\n }\n }\n System.out.println(\"======\");\n }\n return canBreak[canBreak.length - 1];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n int iIndex = 0;\n int jIndex = 0;\n int sLength = s.length();\n boolean dp[][] = new boolean[sLength][sLength];\n int i = 0;\n int j = 0;\n System.out.println(s.substring(0,0));\n System.out.println(s.substring(0,1));\n while (jIndex < sLength) {\n \ti = iIndex; \n \tj = jIndex;\n \twhile (j < sLength) {\n \t\tif (wordDict.contains(s.substring(i, j + 1))) {\n \t\t\tdp[i][j] = true;\n \t\t} else {\n \t\t\tint firstStart = 0;\n \t\t\tint firstEnd = 0;\n \t\t\tint secondStart = firstEnd + 1;\n \t\t\tint secondEnd = j;\n \t\t\twhile (secondStart <= secondEnd) {\n \t\t\t\tdp[i][j] = dp[firstStart][firstEnd] && dp[secondStart][secondEnd];\n \t\t\t\tif (dp[i][j]) {\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\tfirstEnd++;\n \t\t\t\tsecondStart = firstEnd + 1;\n \t\t\t}\n \t\t}\n \t\ti++;\n \t\tj++;\n \t}\n \tiIndex = 0;\n \tjIndex++;\n }\n\n // for (int x = 0; x < dp.length; x++) {\n // \tfor (int y = 0; y < dp[0].length; y++) {\n // \t\tSystem.out.print(dp[x][y] + \" \");\n // \t}\n // \tSystem.out.println();\n // }\n\n return dp[0][sLength - 1];\n }", "public static boolean isStringInterleafing(String a, String b, String inter) {\n\t\tchar[] ca = a.toCharArray();\r\n\t\tchar[] cb = b.toCharArray();\r\n\t\t\r\n\t\tchar[] ic = inter.toCharArray();\r\n\t\t\r\n\t\t\r\n\t\tboolean DP[][] = new boolean[ca.length+1][cb.length+1];\r\n\t\t\r\n\t\t// initialize the table:\r\n\t\tDP[0][0] = true;\r\n\t\tfor(int i = 1; i < ca.length; i++) {\r\n\t\t\tDP[i][0] = (ic[i-1] == ca[i-1] && DP[i-1][0] == true) ? true : false;\r\n\t\t}\r\n\r\n\t\tfor(int j = 1; j < cb.length; j++) {\r\n\t\t\tDP[0][j] = (ic[j-1] == cb[j-1] && DP[0][j-1] == true) ? true : false;\r\n\t\t}\r\n\t\t\r\n\t\t// now we can fill the table\r\n\t\tfor(int i = 1; i <= ca.length; i++) {\r\n\t\t\tfor(int j = 1; j <= cb.length; j++) {\r\n\t\t\t\tboolean canTakeFromAbove = ic[i+j-1] == ca[i-1] && DP[i-1][j];\r\n\t\t\t\tboolean canTakeFromLeft = ic[i+j-1] == cb[j-1] && DP[i][j-1];\r\n\t\t\t\tDP[i][j] = canTakeFromAbove || canTakeFromLeft;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn DP[ca.length][cb.length];\r\n\t}", "public final boolean contains(StringToStringTable s)\n {\n\n for (int i = 0; i < m_firstFree; i++)\n {\n if (m_map[i].equals(s))\n return true;\n }\n\n return false;\n }", "private boolean[][] createMatrix(String str) {\n\t\t int len = str.length();\n\t\t boolean[][] temp = new boolean[len][len];\n\t\t for (int i = len - 1; i >= 0; i--) {\n\t\t\t for(int j = len - 1; j >= i; j--) {\n\t\t\t\t if (i == j) {\n\t\t\t\t\t temp[i][j] = true;\n\t\t\t\t } else if (i + 1 == j){\n\t\t\t\t\t temp[i][j] = str.charAt(i) == str.charAt(j);\n\t\t\t\t } else {\n\t\t\t\t\t temp[i][j] = (str.charAt(i) == str.charAt(j)) && temp[i + 1][j - 1];\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t return temp;\n\t }", "public int countSubstrings(String s) {\n int count =0;\n int n = s.length();\n boolean[][] isPall = new boolean[n][n];\n \n for(int len =0;len<n;len++){\n \n for(int i=0,j=len;j<n;i++,j++){\n if(len == 0){\n isPall[i][j] = true;\n }\n else if(len == 1){\n isPall[i][j] = s.charAt(i) == s.charAt(j);\n }\n else{\n isPall[i][j] = (s.charAt(i) == s.charAt(j) &&\n isPall[i+1][j-1]);\n }\n \n if(isPall[i][j]){\n count++;\n }\n }\n \n } \n return count;\n }", "public boolean[] validatePossibility(String s, Set<String> set, boolean[][] isWord) {\n \t/*\n \tboolean[] valid = new boolean[s.length() + 1];\n \tvalid[s.length()] = true;\n\n \tint maxLeng = getMaxLength(set);\n \tfor (int i = s.length() - 1; i >= 0; i--) {\n \t\tfor (int j = i; j < s.length() && (j - i) <= maxLeng; j++) {\n \t\t\tif (isWord[i][j] && valid[j + 1]) {\n \t\t\t\tvalid[i] = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}*/\n// boolean[] valid = new boolean[s.length() + 1];\n// valid[0] = true;\n// int maxLength = getMaxLength(set);\n// for (int i = 0; i < s.length(); i++) {\n// for (int j = 0; j < i && j < maxLength; j++) {//iterate [0 ~ i]\n// if (isWord[i - j][i] && isValid[i - j + 1])) {\n// valid[i + 1] = true;\n// break;\n// }\n// }\n// }\n//\n// return valid;\n\n boolean[] rst = new boolean[s.length() + 1];\n rst[0] = true;\n if (s == null || set.contains(s)) {\n return rst;\n }\n for (int i = 0; i < s.length(); i++) {\n for (int j = 0; j <= i; j++) {\n if (rst[j] && set.contains(s.substring(j, i + 1))) {\n rst[i + 1] = true;\n break;\n }\n }\n }\n return rst;\n }", "public static boolean wordBreak(String s, String[] dict) {\n boolean[] memo = new boolean[s.length() + 1];\n memo[0] = true; //set first to be true because we need initial state\n for (int i = 0; i < s.length(); i++) {\n if (!memo[i])\n continue;\n for (String current : dict) {\n int end = i + current.length();\n if (end > s.length())\n continue;\n if (memo[end])\n continue;\n if (s.substring(i, end).equals(current)) {\n memo[end] = true;\n }\n }\n }\n return memo[s.length()];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "public static boolean dp(String s, List<String> wordDict) {\n Set<String> dic = new HashSet(wordDict);\n\n // BUG: firstly try i inclusive, but it's harder.\n //start from 0, end at i(exclusive), is that available\n boolean [] board = new boolean [s.length() + 1];\n Arrays.fill(board, false);\n\n board[0] = true;\n for(int i=1; i<=s.length(); i++) {\n boolean flag = false;\n for(int j=0; j<i; j++) {\n\n // BUG: confuse = and ==\n // BUG: confuse substring(j, i) and substring(j+1, i), because define exclusive above\n if(board[j] == true && dic.contains(s.substring(j, i))) {\n flag = true;\n break;\n }\n }\n board[i] = flag;\n }\n\n return board[s.length()];\n }", "int[] prefix_suffix_tabble(String pattern){\n\n // ABAB\n int[] table = pattern.length;\n\n int M = pattern.length();\n int i=0;\n int j=1;\n\n table[0] = 0;\n\n while(j<M){\n if(pattern.charAt(i) == pattern.charAt(j)){\n table[j] = i+1;\n i++;\n j++;\n }\n else{ // charAt(i) != charAt(j)\n\n\n if(i==0){ // cant go to previous, so just set it to 0 and move on. Almost our base case\n table[j] = 0;\n j++;\n continue;\n }\n\n // set i to the value of the previous and keep doing it\n int valueAtPrevious = table[i-1];\n i = valueAtPrevious;\n }\n }\n return table;\n // ith index indicates a prefix that is also a suffix from 0 including i. Cant be the whole String\n\n\n }", "public static void findLongestSubPalindramic(String s) {\n\t\tchar[] arr = s.toCharArray();\n\t\tint begin = -1;\n\t\tint end;\n\t\tint temp_begin;\n\t\tint maxLength = -1;\n\t\tboolean[][] table = new boolean[1000][1000];\n\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\ttable[i][i] = true;\n\t\t}\n\t\tfor (int i = 0; i < s.length() - 1; i++) {\n\t\t\tif (arr[i] == arr[i + 1]) {\n\t\t\t\ttable[i][i + 1] = true;\n\t\t\t\tbegin = i;\n\t\t\t\tmaxLength = 2;\n\t\t\t}\n\t\t}\n\t\tfor (int len = 2; len < arr.length; len++) {\n\t\t\tfor (int i = 0; i < arr.length - len + 1; i++) {\n\t\t\t\tint j = len + i - 1;\n\t\t\t\tif (table[i + 1][j - 1] && (arr[i] == arr[j])) {\n\t\t\t\t\ttable[i][j] = true;\n\t\t\t\t\tif (j - i + 1 > maxLength) {\n\t\t\t\t\t\tbegin = i;\n\t\t\t\t\t\tmaxLength = maxLength + 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"begin:\" + begin + \", length:\" + maxLength);\n\t}", "static int findPPCuts(String str){\n boolean[][] isPalindrome = new boolean[str.length()][str.length()];\n\n for(int i = 0; i<str.length();i++)\n isPalindrome[i][i]=true;\n\n for(int startIndex=str.length()-1;startIndex >=0; startIndex--){\n for(int endIndex=startIndex+1;endIndex<=str.length()-1;endIndex++){\n if(str.charAt(startIndex)==str.charAt(endIndex)){\n // if it's a two character string or if the remaining string is a palindrome too\n if(endIndex - startIndex == 1 || isPalindrome[startIndex+1][endIndex-1]){\n isPalindrome[startIndex][endIndex]=true;\n }\n }\n }\n }\n\n // now lets populate the second table, every index in 'cuts' stores the minimum cuts needed\n // for the substring from that index till the end\n int[] cuts = new int[str.length()];\n for(int startIndex=str.length()-1;startIndex>=0;startIndex--){\n int minCuts = str.length();\n for(int endIndex=str.length()-1; endIndex>=startIndex; endIndex--){\n // we can cut here as we got a palindrome\n // also we dont need any cut if the whole substring is a palindrome\n if(isPalindrome[startIndex][endIndex]){\n minCuts = (endIndex == str.length()-1) ? 0:Math.min(minCuts, 1 + cuts[endIndex+1]);\n }\n }\n cuts[startIndex]=minCuts;\n }\n return cuts[0];\n }", "public boolean matchesStringTable(String s,String[] sTable)\r\n\t{\r\n\t\tfor (int i = 0; i < sTable.length; i++) {\r\n\t\t\tif (sTable[i].equals(s))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isInterleave(String s1, String s2, String s3) {\n // write your code here\n\n int l1 = s1.length();\n int l2 = s2.length();\n int l3 = s3.length();\n\n // interleaving condition\n if (l1 + l2 != l3)\n return false;\n\n boolean[][] dp = new boolean[l1+1][l2+2];\n dp[0][0] = true;\n\n // initializing the table based on first string\n for (int i = 1; i <= l1; i++){\n if (s3.charAt(i-1) == s1.charAt(i-1) && dp[i-1][0])\n dp[i][0] = true;\n }\n\n // initializing the table based on second string\n for (int i = 1; i <= l2; i++){\n if (s3.charAt(i-1) == s2.charAt(i-1) && dp[0][i-1])\n dp[0][i] = true;\n }\n\n for (int i = 1; i<=l1; i++){\n for (int j=1; j<=l2; j++){\n if (dp[i][j-1] && (s3.charAt(i+j-1) == s2.charAt(j-1)) ||\n dp[i-1][j] && (s3.charAt(i+j-1) == s1.charAt(i-1)))\n dp[i][j] = true;\n }\n\n }\n return dp[l1][l2];\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length() + 1];\n\n dp[0] = true;\n\n // Maintaining dp array for all lengths from 1 to n\n for(int i = 1; i <= s.length(); i++) {\n // Checking for all characters till i if earlier sub array is true and if the\n // substring is a dictionary word\n for(int j = 0; j < i; j++) {\n if(dp[j] && wordDict.contains(s.substring(j, i))) {\n dp[i] = true;\n }\n }\n }\n\n return dp[s.length()];\n }", "public static boolean Solution(String str)\r\n\t{\r\n\t\t\r\n\t\t//Precondition if null, length <0 // Assuming the String Contains ASCII characters\r\n\t\tif(str==null||str.length()<0||str.length()>128)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//example:\tString s1=\"abca@d\";\r\n\t\t\r\n\t\t\r\n\t\tboolean[] check=new boolean[256];\r\n\t\t\r\n\t\tfor(int i=0;i<str.length();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(check[str.charAt(i)]);\r\n\t\t\t\r\n\t\t\tif(check[str.charAt(i)])\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\telse\r\n\t\t\t\tcheck[str.charAt(i)]=true;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "static long substrCount(int n, String s) {\n \tlong output=0;\n \t\n \tboolean[][] matrix = new boolean[n][n];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tmatrix[i][i] = true;\n \t\toutput++;\n \t}\n \t\n \tfor(int gap=1; gap<n; gap++) {\n \t\tfor(int i=0; i+gap <n; i++) {\n \t\t\tint j = i+gap;\n \t\t\t\n \t\t\tif(gap ==1) {\n \t\t\t\tif(s.charAt(i) == s.charAt(j)) {\n \t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif(s.charAt(i) == s.charAt(j) && matrix[i+1] [j-1]) {\n \t\t\t\t\t\n \t\t\t\t\tif(j-i >= 4 && s.charAt(i)== s.charAt(i+1)) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else if(j-i <4) {\n \t\t\t\t\t\tmatrix[i][j] = true;\n \t\t\t\t\toutput++;\n \t\t\t\t\t} else {\n \t\t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t} else {\n \t\t\t\t\tmatrix[i][j] = false;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn output;\n }", "public static boolean startArrFill(String[] strings, int n, char[] chars){\n\t int comp = 0, comp2 = 0, b = fact(n-1), c = n-1, comp3 = 0;\n\t for(int j = comp2; b != 1; j++){\n \t for(int i = 0; i < strings.length; i++){\n \t while(contains(strings[i], chars[comp2])){\n \t comp2++;\n \t if(comp2 == chars.length){\n \t comp2 = 0;\n \t }\n \t }\n \t //System.out.println(\"comp2: \" + comp2 + \", chars[comp2]: \" + chars[comp2]);\n \t strings[i] += chars[comp2];\n \t //System.out.println(\"i: \" + i + \", j: \" + j + \"\\t\" +strings[i]);\n \t comp++;\n \t if(comp == b){\n \t comp2++;\n \t comp = 0;\n \t if(comp2 == chars.length){\n \t comp2 = 0;\n \t }\n \t }\n \t }\n \t c--;\n \t b = fact(c);\n\t }\n\t //System.out.println(\"b: \" + b);\n\t return true;\n\t}", "public boolean wordBreakTopDown(String s, List<String> wordDict) {\n\n if (s == null || s.length() == 0) {\n return false;\n }\n\n Set<String> set = new HashSet<>(wordDict);\n // lookup array to store solutions to sub problems\n // `lookup[i]` stores if substring `str[n-i…n)` can be segmented or not\n int[] lookup = new int[s.length() + 1];\n Arrays.fill(lookup,-1);\n\n return wordBreakUtilTopDown(s,set,lookup);\n }", "boolean hasSplit();", "public String[] inStringtoCheck(String[] stringArray) {\n\t\t\n\t\tstringCheck = stringArray;\n\t\toutArr = new String[stringCheck.length];\n\t\t\n\t\t//System.out.print(\"\\n\");\n\t\t\n\t\t/* Check the Local String Array */\n\t\tfor (int i = 0; i < stringCheck.length; i++) {\n\t\t\tint j = i - 1;\n\t\t\tint k = i - 2;\n\t\t\tint l = i - 3;\n\t\t\t\n\t\t\texitCheck = false; \n\t\t\tpariralaCheck = true;\n\t\t\tpackageCheck = true;\n\t\t\tkomentoCheck = true;\n\t\t\t\n\t\t\tif (searchValue(stringCheck[i])) {\n\t\t\t\t\n\t\t\t\t// String append\n\t\t\t\tif(stringCheck[i].equals(op_parirala_dagdag[0]) && !exitCheck && \n\t\t\t\t\t\t(outArr[j].equals(\"String Declarator (End)\") || outArr[k].equals(\"Append\") || outArr[l].equals(\"Keyword\")/*|| *//* outArr[j].equals(\"Identifier\")\n\t\t\t\t\t\t\t\t||*/ /*outArr[k].equals(\"Delimiter Parenthesis (Start)\")*/)) {\n\t\t\t\t\toutArr[i] = \"Append\";\n\t\t\t\t\texitCheck = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t \t\n\n\n \n\t\t\t \t\n\t\t\t\t\n\t\t\t\t// Keywords\n \t\tfor (int a = 0; a < abakada_mahalaga.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_mahalaga[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"isulat\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"basahin\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"kawalan\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Modifier)\";\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\toutArr[i] = \"Keyword\";\n \t\t\t\t}\n \t\t\t\texitCheck = true;\n \tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Reserved Words\n \t\tfor (int a = 0; a < abakada_nakalaan.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_nakalaan[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Reserved Word\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t\n \t\t// Noise Words\n \t\tif (stringCheck[i].equals(abakada_ingay[0]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Noise Word\";\n \t\t\t\texitCheck = true;\n \t//break;\n }\n \t\t \n \t\t// Data Type\n \t\tfor (int a = 0; a < pang_uri.length; a++) {\n \t\t\tif (stringCheck[i].equals(pang_uri[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"pambuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Integer)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"hatimbuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Float)\";\n \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"bulyan\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Booleanr)\";\t\t\t\t\n\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"titik\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Character)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"parirala\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (String)\";\n\t\t\t\t\t\t\t}\n\t \t\t\t\t\n \t\t\t\t//outArr[i] = \"Keyword (Data Type)\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t// Boolean\n \t\tfor (int a = 0; a < bulyan.length; a++) {\n \t\t\tif (stringCheck[i].equals(bulyan[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"tama\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (True)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"mali\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (False)\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\toutArr[i] = \"Boolean\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t // Operators\n \t\t for (int a = 0; a < op_takda.length; a++) {\t\t\t// Assignment Operator\n \t\t\t if (stringCheck[i].equals(op_takda[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Assignment Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < op_palatuusan.length; a++) {\t\t// Arithmetic Operator\n \t\t\tif (stringCheck[i].equals(op_palatuusan[a]) && !exitCheck) {\n \t\t\t\tif(stringCheck[i].equals(\"+\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Plus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"-\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Minus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"*\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Multiplication\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"/\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Division\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"%\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Modulo\";\n \t\t\t\t}\n \t\t\t\t//outArr[i] = \"Arithmetic Operator\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t for (int a = 0; a < op_yunari.length; a++) {\t\t\t// Unary Operator\n \t\t\t if (stringCheck[i].equals(op_yunari[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Unary Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\t \n \t\t for (int a = 0; a < op_relasyunal.length; a++) {\t\t// Relational Operator\n \t\t\t if (stringCheck[i].equals(op_relasyunal[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\t if(stringCheck[i].equals(\"@\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"$\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(NOT EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\">\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(GREATER THAN)\";\n \t\t\t\t } \n \t\t\t\t else if(stringCheck[i].equals(\"<\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(LESS THAN)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Relational Operator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_lohikal.length; a++) {\t\t\t// Logical Operator\n \t\t\t if (stringCheck[i].equals(op_lohikal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"at\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(AND)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"odikaya\")){\n \t\t\t\t\t outArr[i] = \"Logical Operator(OR)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"hindi\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(INVERSE)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Logical Operator\";\n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_kondisyunal.length; a++) {\t\t// Conditional Operator\n \t\t\t if (stringCheck[i].equals(op_kondisyunal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"?\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(?)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\":\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(:)\";\n \t\t\t\t }\n \t\t\t\t// outArr[i] = \"Conditional Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_pirasong_pantas.length; a++) {\t// Bitwise Operator\n \t\t\t if (stringCheck[i].equals(op_pirasong_pantas[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"&\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(&)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"^\")){\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(^)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"|\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(|)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Bitwise Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t// Comments\n \t\tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\t\t if (stringCheck[i].equals(kom_marami_check[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t outArr[i] = \"Multiple-line Comment (Start)\";\n \t\t\t\t \n \t\t\t\t while(komentoCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(kom_marami_check[0])) {\n \t\t\t\t\t\t outArr[i] = \"Multiple-line Comment (End)\";\n \t\t\t\t\t\t komentoCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Comment\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\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\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t\n \t\t\n \t//[package\n \tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\tif (stringCheck[i].equals(abakada_angkat[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t outArr[i] = \"Keyword (PACKAGE)\";\n \t\t\t\t \n \t\t\t\twhile(packageCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(\";\")) {\n \t\t\t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\t\t\t packageCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Period\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i-1].equals(\".\") && !stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Package Extension\";\n \t\t\t\t\t }\n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Package\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\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\t exitCheck = true;\n \t\t\t\t break;\n }\n \t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t // Delimiters and Brackets\n \t\t for (int a = 0; a < tuldok_kuwit.length; a++) {\t\t// Semicolon\n \t\t\t if (stringCheck[i].equals(tuldok_kuwit[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_separator.length; a++) {\t\t// Separator\n \t\t\t if (stringCheck[i].equals(del_separator[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Separator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n\n \t\t // Character Declarator\n \t\t for (int a = 0; a < del_titik.length; a++) {\t\n \t\t\t oneTitik = false;\n \t\t\t if (stringCheck[i].equals(del_titik[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"Character Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t \n \t\t\t\t\t if(stringCheck[i].equals(del_titik[a])) {\n \t\t\t\t\t\t outArr[i] = \"Character Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if (!oneTitik ){\n \t\t\t\t\t\t if(stringCheck[i].length() == 1) {\n \t\t\t\t\t\t\t oneTitik = true;\n \t\t\t\t\t\t outArr[i] = \"titik\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\t \n \t\t\t\t\t\t else {\n \t\t\t\t\t\t\toutArr[i] = \"Invalid Token\";\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 \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t // String Declarator\n \t\t for (int a = 0; a < del_parirala.length; a++) {\n \t\t\t if (stringCheck[i].equals(del_parirala[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"String Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t System.out.println(stringCheck[i]+\" value of i: \"+i);\n \t\t\t\t\t if(stringCheck[i].equals(del_parirala[a])) {\n \t\t\t\t\t\toutArr[i] = \"String Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"String\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_saklong_una.length; a++) {\t\t// Parenthesis\n \t\t\t if (stringCheck[i].equals(del_saklong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_saklong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_saklong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_kulong_una.length; a++) {\t\t// Curly Bracket\n \t\t\t if (stringCheck[i].equals(del_kulong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_kulong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_kulong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_palong_una.length; a++) {\t\t// Bracket\n \t\t\t if (stringCheck[i].equals(del_palong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_palong_huli.length; a++) {\t\t\t \n \t\t\t if (stringCheck[i].equals(del_palong_huli[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t\n \t\t// Pre-defined Functions\n \t\tfor (int a = 0; a < abakada_pdf_basa.length; a++) {\t\t// Read Function \n \t\t\t if (stringCheck[i].equals(abakada_pdf_basa[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Read function\";\n \t\t\t\t exitCheck = true;\n \t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\tfor (int a = 0; a < abakada_pdf_sulat.length; a++) {\t// Write Function\t \n \t\t\tif (stringCheck[i].equals(abakada_pdf_sulat[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Write function\";\n \t\t\t\texitCheck = true;\n \t break;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(!exitCheck) {\n \t\t\toutArr[i] = \"Constant Number\"; // next line if ever\n \t\t\t\n \t\t}\n \t\t\t\n \t \t}\n \t\n\t\t\telse if (checkConNum(stringCheck[i])) {\n outArr[i] = \"Constant Number\";\n\t\t\t}\n\t\t\t\n\t\t\telse if (checkVar(stringCheck[i])) {\n outArr[i] = \"Identifier\";\n\t\t\t}\n \n\t\t\telse {\n outArr[i] = \"Invalid Identifier\";\n\t\t\t}\n \n\t\t} // for loop\n\t\t\n\t\treturn outArr;\n\t}", "public boolean wordBreakUtilTopDown(String s, Set<String> dict,int[] lookup)\n {\n int n = s.length();\n\n // return true if the end of the string is reached\n if (n == 0) {\n return true;\n }\n\n // if the sub problem is seen for the first time\n if (lookup[n] == -1)\n {\n // mark subproblem as seen (0 initially assuming string\n // can't be segmented)\n lookup[n] = 0;\n\n for (int i = 1; i <= n; i++)\n {\n // consider all prefixes of the current string\n String prefix = s.substring(0, i);\n\n // if the prefix is found in the dictionary, then recur for the suffix\n if (dict.contains(prefix) && wordBreakUtilTopDown(s.substring(i),dict, lookup))\n {\n // return true if the string can be segmented\n lookup[n] = 1;\n return true;\n }\n }\n }\n\n // return solution to the current sub problem\n return lookup[n] == 1;\n }", "@Test\n public void getExtracpy() {\n String input = \"A303:C203:\";\n boolean expected = true;\n boolean output = true;\n String[] input1 = input.split(\":\");\n String[] expectedarray = {\"A303\",\"C203\"};\n\n for (int i = 0; i < input1.length; i++) {\n if(!input1[i].equals(expectedarray[i]))\n {\n output = false;\n break;\n }\n }\n assertEquals(expected,output);\n\n }", "public boolean contains(String string){\r\n if(string == null) {\r\n return false;\r\n }\r\n int i = 0;\r\n int hash = string.hashCode(),index = 0;\r\n boolean found = false;\r\n while(!found){\r\n index = (hash + (i*i+i)/2) & (this.capacity()-1);\r\n if(this.hashTable[index] == null){\r\n return false;\r\n }\r\n else if(this.hashTable[index].equals(string)){\r\n found = true;\r\n }\r\n i++;\r\n }\r\n return true;\r\n }", "public boolean wordBreak2(String s, List<String> wordDict) {\n int maxL =0;\n Set<String> wordSet = new HashSet<>(wordDict);\n for (String word : wordDict) {\n maxL = Math.max(maxL, word.length());\n }\n boolean[] dp = new boolean[s.length() + 1];\n dp[0] = true;\n for (int i = 1; i <= s.length(); i++) {\n for (int j = i-1; j >=0 && j >= i - maxL; j--) {\n if (dp[j] && wordSet.contains(s.substring(j, i))) {\n dp[i] = true;\n break;\n }\n }\n }\n return dp[s.length()];\n }", "private int dp(String s){\n\n int n = s.length();\n boolean[][] dp = new boolean[n][n];\n int[] cuts = new int[n];\n\n for(int i = 0; i < n; i ++){\n int min = i;\n for(int j = 0; j <= i; j ++){\n if(s.charAt(i) == s.charAt(j) && ( i - j < 2 || dp[i - 1][j + 1])){\n // String(j~i) is a palindrom\n //\n dp[i][j] = true;\n min = j == 0? 0 : Math.min(min, cuts[j - 1] + 1);\n }\n }\n cuts[i] = min;\n }\n return cuts[n - 1];\n }", "public static boolean isValid(final String string) {\n int index1;\n for (index1 = 0; index1 < string.length(); index1++) {\n if (string.charAt(index1) == SEPARATOR) {\n boolean found = false;\n int index2;\n for (index2 = index1 + 1; index2 < string.length() && !found; index2++) {\n if (string.charAt(index2) == SEPARATOR) {\n found = true;\n String subStr = string.substring(index1, index2 + 1);\n boolean valid = false;\n for (int k = 0; k < availableTemplateElements.size() && !valid; k++) {\n valid = availableTemplateElements.get(k).isContainedBy(subStr);\n \n }\n if (!valid) {\n return false;\n } \n }\n }\n if (!found) {\n return false;\n }\n index1 = index2 - 1;\n }\n }\n return true;\n }", "private static boolean[][] dataToBoolArray(StringBuilder chunk, int height, int width) {\n boolean[][] bools = new boolean[height][width];\n StringBuilder cleanedChunk = new StringBuilder();\n\n // cleaning chunk\n for (int i = 0; i < chunk.length(); i++) {\n if (chunk.charAt(i) == '0' || chunk.charAt(i) == '1')\n cleanedChunk.append(chunk.charAt(i));\n }\n\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++)\n bools[i][j] = (cleanedChunk.charAt((i * width) + j) != '0');\n }\n\n return bools;\n }", "public boolean[][] validateWord(String s, Set<String> set) {\n boolean[][] isWord = new boolean[s.length()][s.length()];\n for (int i = 0; i < s.length(); i++) {\n for (int j = i; j < s.length(); j++) {\n isWord[i][j] = set.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "public int countSubstrings_dp(String s) {\n\t\tint n = s.length();\n\t\tint res = 0;\n\t\tboolean[][] dp = new boolean[n][n];\n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tfor (int j = i; j < n; j++) {\n\t\t\t\tdp[i][j] = s.charAt(i) == s.charAt(j) \n\t\t\t\t\t\t&& (j - i + 1 < 3 || dp[i + 1][j - 1]);\n\t\t\t\t\n\t\t\t\tif (dp[i][j])\n\t\t\t\t\t++res;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "boolean isSubStr(String s, String t) {\n\t\tint k = 0;\n\t\tfor (int i = 0; i < s.length(); ++i) {\n\t\t\tboolean found = false;\n\t\t\tfor (; k < t.length(); ++k) if (found = (t.charAt(k) == s.charAt(i))) break;\n\t\t\tif (!found) return false;\n\t\t\t++k;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean compareSubstring(List<String> pieces, String s)\n {\n\n boolean result = true;\n int len = pieces.size();\n\n int index = 0;\n\nloop: for (int i = 0; i < len; i++)\n {\n String piece = pieces.get(i);\n\n // If this is the first piece, then make sure the\n // string starts with it.\n if (i == 0)\n {\n if (!s.startsWith(piece))\n {\n result = false;\n break loop;\n }\n }\n\n // If this is the last piece, then make sure the\n // string ends with it.\n if (i == len - 1)\n {\n result = s.endsWith(piece);\n break loop;\n }\n\n // If this is neither the first or last piece, then\n // make sure the string contains it.\n if ((i > 0) && (i < (len - 1)))\n {\n index = s.indexOf(piece, index);\n if (index < 0)\n {\n result = false;\n break loop;\n }\n }\n\n // Move string index beyond the matching piece.\n index += piece.length();\n }\n\n return result;\n }", "public static boolean[] stringToBooleanArray(String s){\n\t\tboolean[] output = new boolean[s.length()];\n\t\tfor (int i=0; i<s.length(); i++){\n\t\t\tif (s.charAt(i) == '0')\n\t\t\t\toutput[i] = false;\n\t\t\telse\n\t\t\t\toutput[i] = true;\n\t\t}\n\t\treturn output;\n\t}", "private boolean isSubSequence(String s, String word){\n int startPointer = 0;\n for(int i=0; i<word.length(); i++){\n int location = s.indexOf(word.charAt(i), startPointer);\n if(location < 0)\n return false;\n startPointer = location+1;\n }\n return true;\n }", "protected boolean isSubString(BSTVertexOfBabyNames T,String subString)\r\n\t{\r\n\t\tString babyName=T.key;\r\n\t\tint stringLength=subString.length();\r\n\t\tboolean identical=false;\r\n\t\t\r\n\t\tfor(int i=0;i<babyName.length();i++)\r\n\t\t{\r\n\t\t\tif(i+stringLength>babyName.length())\r\n\t\t\t\treturn false;\r\n\t\t\tfor(int start=0;start<stringLength;start++)\r\n\t\t\t{\r\n\t\t\t\tif(babyName.charAt(i+start)==subString.charAt(start))\r\n\t\t\t\t\tidentical=true;\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tidentical=false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(identical)\treturn true;\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public static String alexBrokenContest(String s){\n\t\tString[] names={\"Danil\", \"Olya\", \"Slava\", \"Ann\",\"Nikita\"};\n\t\tint count=0;\n\t\tfor (int i=0;i<5 ;i++)\n\t\t{\n\t\t\t\n\t\t\tint index = s.indexOf(name[i]);\n\t\t\twhile (index!=-1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\tindex=s.indexOf(name[i],index+1);\n\t\t\t}\n\t\t}\n\t\tif(count==1)\n\t\t{\n\t\t\n\t\tSystem.out.println(\"YES\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "boolean hasString();", "public boolean isTransformable(String s, String t) {\n if(s==null || t==null || s.length()!=t.length()){\n return false;\n }\n Deque<Integer>[] idx=new Deque[10];\n for(int i=0; i<10; i++){\n idx[i]=new LinkedList<>();\n }\n for(int i=0; i<s.length(); i++){\n idx[s.charAt(i)-'0'].offerLast(i);\n }\n for(char c: t.toCharArray()){\n int id=c-'0';\n if(idx[id].isEmpty()){\n return false;\n } else{\n int cIdx=idx[id].peekFirst();\n for(int i=0; i<id; i++){\n if(!idx[i].isEmpty() && idx[i].peekFirst()<cIdx){\n return false;\n }\n }\n idx[id].pollFirst();\n }\n }\n return true;\n }", "public static boolean isPalin(String s){\n int i = 0;\n boolean con = true;\n\n con = true;\n i = 0;\n while((i <= s.length()/2) && (con)){\n if(s.charAt(i) != s.charAt(s.length()-i-1))\n con = false;\n i++;\n }\n return con;\n }", "public boolean isWordBreak(String s, List<String> wordDict){\n\n\t\tint[] ind = new int[s.length()+1];\n\t\tArrays.fill(ind,-1);\n\t\tind[0]=0;\n\t\t\n\t\tfor (int i = 0; i<s.length(); i++){\n\t\t\tif (ind[i]!=-1){\n\t\t\t\tfor (int j=i+1; j<=s.length(); j++){\n\t\t\t\t\tString word = s.substring(i,j);\n\t\t\t\t\tif (wordDict.contains(word)){\n\t\t\t\t\t\tind[j]=i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ind[s.length()] == -1) return false;\n\t\t\n\t\treturn true;\n\n\t\n\t}", "static boolean is_palindrome(String s) {\n /* using iteration */\n for (int i = 0; i < Math.floor(s.length() / 2); i++) {\n int lastindex = s.length() - 1 - i;\n String endchar = s.substring(lastindex, lastindex + 1);\n String startchar = s.substring(i, i + 1);\n if (!startchar.equals(endchar)) {\n return false;\n }\n }\n return true;\n }", "boolean reachable(String a, String b) {\n\t\t\t\n\t\t\t// Returns false if there are less than two automata\n\t\t\tif (A.length < 2) return false;\n\n\t\t\t// Finds a in every A[i]\n\t\t\tBoolean[] foundb = new Boolean[A.length];\n\t\t\tfor (int i = 0; i < A.length; i++) {\n\t\t\t\t\n\t\t\t\t// Continues if a is not reachable in A[i]\n\t\t\t\tif (!A[i].reachable(a)) continue;\n\t\t\t\t\n\t\t\t\t// Finds b in every A[j], where j != i\n\t\t\t\tfor (int j = 0; j < A.length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tif (j == i) continue;\n\t\t\t\t\t\n\t\t\t\t\t// Looks in buffer first\n\t\t\t\t\tif (foundb[j] != null) {\n\t\t\t\t\t\tif (foundb[j]) return true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Returns true if b is reachable in A[j]\n\t\t\t\t\tfoundb[j] = A[j].reachable(b);\n\t\t\t\t\tif (foundb[j]) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "static String isBalanced(String s) {\n\n Stack<Integer> stackChars = new Stack<Integer>();\n char arr[] = s.toCharArray();\n int topElement= 0;\n for(int i=0;i<s.length();i++){\n if(i>0 && !stackChars.isEmpty()){\n topElement = stackChars.peek();\n }\n stackChars.push((int)arr[i]);\n if(topElement!=0 && stackChars.size() > 1){\n if((topElement==91 && stackChars.peek() ==93) || (topElement==123 && stackChars.peek() ==125) || \n (topElement== 40 && stackChars.peek() ==41)\n ){\n stackChars.pop();\n stackChars.pop();\n }\n }\n }\n String result = \"\";\n if(stackChars.isEmpty()){\n result = \"YES\";\n }else{\n result = \"NO\";\n }\n return result;\n }", "public static int gemstones(List<String> arr) {\n // Write your code here\n boolean[][] found = new boolean[arr.size()][27];\n \n for (int i = 0; i < arr.size(); i++) {\n String str = arr.get(i);\n \n for (int j = 0; j < str.length(); j++) {\n found[i][str.charAt(j) - 'a'] = true;\n }\n }\n \n int result = 0;\n for (int j = 0; j < found[0].length; j++) {\n boolean allFound = true;\n \n for (int i = 0; i < found.length; i++) {\n if (!found[i][j]) {\n allFound = false;\n break;\n }\n }\n \n if (allFound) {\n result++;\n }\n }\n \n return result;\n }", "private static void searchWords(boolean[][] check, int row, int col, char[][] boogle, TrieNode root, String str){\n \t\n \tif(root.isLeaf==true) {\n \t\tSystem.out.println(str);\n \t}\n\n \tif(isSafe(check, row, col)){\n \t\tcheck[row][col] = true;\n\n \t\tfor(int i=0; i<SIZE; i++){\n \t\t\tif(root.child[i] != null){\n \t\t\t\tchar c = (char)(i + 'A');\n \t\t\t\tif(isSafe(check, row-1, col) && boogle[row-1][col]==c) searchWords(check, row-1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col+1) && boogle[row-1][col+1]==c) searchWords(check, row-1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col+1) && boogle[row][col+1]==c) searchWords(check, row, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col+1) && boogle[row+1][col+1]==c) searchWords(check, row+1, col+1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col) && boogle[row+1][col]==c) searchWords(check, row+1, col, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row+1, col-1) && boogle[row+1][col-1]==c) searchWords(check, row+1, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row, col-1) && boogle[row][col-1]==c) searchWords(check, row, col-1, boogle, root.child[i], str+c);\n \t\t\t\tif(isSafe(check, row-1, col-1) && boogle[row-1][col-1]==c) searchWords(check, row-1, col-1, boogle, root.child[i], str+c);\n \t\t\t}\n \t\t}\n \t\tcheck[row][col] = false;\n \t}\n }", "public static boolean isSubsequence(String s, String t) {\n if (s.length() == 0)\n return true;\n else if (t.length() == 0)\n return false;\n\n int indexS = 0;\n int indexT = 0;\n\n // Step2 - Traverse String t\n while (indexT < t.length() && indexS < s.length()) {\n char currentT = t.charAt(indexT);\n char currentS = s.charAt(indexS);\n System.out.println(\"currentS:\" + currentS + \" currentT: \" + currentT );\n\n // Step3 - If match, increment indexS\n if (currentS == currentT) {\n ++indexS;\n }\n\n ++indexT;\n }\n\n return indexS == s.length(); // indexS HAS to the same length as String s for a match\n }", "public boolean hasString() {\n/* 800 */ return true;\n/* */ }", "public static boolean isSubsequence(String s, String t) {\n int pos = -1;\n for(int i=0; i<s.length(); i++){\n pos = t.indexOf(s.charAt(i), pos+1);\n if(pos == -1){\n return false;\n }\n }\n return true;\n }", "private boolean startsWithAFilteredPAttern(String string)\n {\n Iterator<String> iterator = filteredFrames.iterator();\n while (iterator.hasNext())\n {\n if (string.trim().startsWith(iterator.next()))\n {\n return true;\n }\n }\n return false;\n }", "private static boolean dfs(char[][] matrix, String word, int i, int j, int index) {\n if (index == word.length()) {\n return true;\n }\n if (i < 0 || i >= matrix.length || j < 0 || j >= matrix[i].length) {\n // System.out.println(\"out of bound\");\n return false;\n }\n if (word.charAt(index) != matrix[i][j]) {\n // System.out.println(\"char not == \");\n return false;\n }\n if (matrix[i][j] == '$') {\n // System.out.println(\"mark \" + i + \", \" + j + \" as $\");\n return false;\n }\n char ori = matrix[i][j];\n matrix[i][j] = '$';\n if (dfs(matrix, word, i + 1, j, index + 1)|| dfs(matrix, word, i - 1, j, index + 1) ||\n dfs(matrix, word, i, j + 1, index + 1) || dfs(matrix, word, i, j - 1, index + 1)) {\n matrix[i][j] = ori; // backtracking here!!!\n return true;\n }\n matrix[i][j] = ori;\n return false;\n }", "public static boolean isPalindrome(String a)\n { \n boolean flag = true; \n //Iterate the string forward and backward and compare one character at a time \n //till middle of the string is reached \n for(int i = 0; i < a.length()/2; i++)\n { \n if(a.charAt(i) != a.charAt(a.length()-i-1))\n { \n flag = false; \n break; \n } \n } \n return flag; \n }", "public boolean checkIfPermutationPalindrome(String str) {\n\n Hashtable<Character, Integer> table = generateTable(str);\n\n int oneOdd = 0;\n boolean flag;\n for(char ch : table.keySet()) {\n if(table.get(ch)%2 == 1) {\n oneOdd++;\n }\n }\n if(oneOdd <= 1) {\n flag = true;\n }\n else {\n flag = false;\n }\n if(str.length() == 0) {\n flag = false;\n }\n System.out.println(flag);\n return flag;\n }", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "void mo32681a(String str, int i, boolean z);", "public boolean gHappy(String str) {\n for(int x=0; x<str.length(); x++)\n {\n if(str.charAt(x)=='g')\n {\n if(str.length()<2)\n return false;\n else if(x==0 && str.charAt(x+1) != 'g')\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && x+1==str.length())\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && str.charAt(x+1) != 'g')\n return false;\n }\n }\n\n return true;\n}", "private boolean checkString(){\n createString();\n char[] charsJoinedString=this.joinedTextPalindrome.toCharArray();\n int lengthString=charsJoinedString.length-1;\n for(int i=0;i<charsJoinedString.length;i++){\n if(charsJoinedString[i]!=charsJoinedString[lengthString]){\n return false;\n }\n lengthString--;\n }\n return true;\n \n }", "private boolean tailOfCellMatches(int index, String toMatch) {\n int cellOffset = index - toMatch.length();\n if (cellOffset < lineMark) {\n return false;\n }\n // Scan backwards to see if characters before matches. Start at character before current.\n for (int i = toMatch.length() - 2; i >= 0; i--) {\n if (toMatch.charAt(i) != buffer[cellOffset + i])\n return false;\n }\n return true;\n }", "include<stdio.h>\nint main()\n{\n char t[1000]; \n scanf(\"%s\",t); \n \n int i,j,len; \n len=strlen(t); \n i=0; \n j=len-1; \n while(i<=j)\n {\n if(t[i]!=t[j])\n { break; } \n j--; i++;\n } \n \n if(i<j)\n printf(\"%s is not a palindrome\",t); \n else\n printf(\"%s is a palindrome\",t); \n \n return 0;\n}", "public static boolean findDoubledStrings(String text) {\n Set<String> setStrings = new HashSet<>();\n String[] stringArray = text.split(\" \");\n IntStream.range(0, stringArray.length).forEach(t-> setStrings.add(stringArray[t]));\n return setStrings.size()!=stringArray.length;\n }", "public String longestPalindrome_DP(String s) {\n int n = s.length();\n boolean[][] isPa = new boolean[n][n];\n int lo = 0, hi = 0, maxLen = 1;\n for(int l = 1; l <= n; l++) {\n for(int i = 0; i <= n-l; i++) {\n int j = i + l - 1;\n if(i == j) {\n isPa[i][j] = true;\n } else {\n if(s.charAt(i) == s.charAt(j)) {\n if(j-i == 1 || isPa[i+1][j-1]) {\n isPa[i][j] = true;\n int len = j - i + 1;\n if(len > maxLen) {\n lo = i;\n hi = j;\n maxLen = len;\n }\n } else {\n isPa[i][j] = false;\n }\n } else {\n isPa[i][j] = false;\n }\n }\n }\n }\n return s.substring(lo, hi+1);\n }", "public boolean wordBreakUtil(String s,Set<String> set){\n\n if (s.length() == 0){\n return true;\n }\n\n for (int i=1; i <= s.length(); i++){\n\n // consider all prefixes of the current string\n String prefix = s.substring(0,i);\n\n // return true if the prefix is present in the dictionary and the\n // remaining string also forms a space-separated sequence of one or\n // more dictionary words\n if (set.contains(prefix) && wordBreakUtil(s.substring(i),set)){\n return true;\n }\n }\n\n return false;\n }", "private static void findWords(char boggleBoardChars[][], Trie trie, String[] valids) { \r\n\t\tboolean[][] visitedTiles = new boolean[4][4]; \r\n\r\n\t\tString str = \"\"; \r\n\t\t//searches for valid word starting at each die on board\r\n\t\tfor (int row = 0 ; row < 4; row++) { \r\n\t\t\tfor (int col = 0 ; col < 4 ; col++) { \r\n\t\t\t\tif (trie.isInTrie( (boggleBoardChars[row][col] + \"\").toUpperCase())) { \r\n\t\t\t\t\tstr = str+boggleBoardChars[row][col]; \r\n\t\t\t\t\tboggleBoardSearch(trie, boggleBoardChars, row, col, visitedTiles, str, valids); \r\n\t\t\t\t\tstr = \"\"; \r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t} \r\n\t}", "public boolean[][] isWord(List<String> wordDict, String s) {\n int n = s.length();\n boolean[][] isWord = new boolean[n][n];\n \n for (int i = 0; i < n; i++) {\n for (int j = i; j < n; j++) {\n isWord[i][j] = wordDict.contains(s.substring(i, j + 1));\n }\n }\n return isWord;\n }", "private boolean split(String tests) {\n\n//\tSystem.out.println(\"Now in the split function\\nand the tests are \"+tests);\n\tArrayList<String> conditions = new ArrayList<String>();\n\tPattern p_node_name;\n\tMatcher matcher;\n\tint count = 0, start=-1, j, end = -1, quot = 0;\n\tp_node_name = Pattern.compile(\"^\\\\s*([A-Z]|[a-z]|\\\\_)+([A-Z]|[a-z]|[0-9]|\\\\_|\\\\.|\\\\-)*\\\\s*$\");\n\tString childrenStep;\n\tfor(j = 0; j < tests.length(); j++){\n\t\tif(quot == 0 && tests.charAt(j)=='['){\n//\t\t\tSystem.out.println(\"char at \"+j+\" is [\\n\");\n\t\t\tif(count==0){\n\t\t\t\tstart = j+1;\n\t\t\t}\n\t\t\tcount++;\n//\t\t\tSystem.out.println(\"and the count is \"+count);\n\t\t}\n\t\tif(tests.charAt(j)=='\"' && quot == 0){\n//\t\t\tSystem.out.println(\"char at \"+j+\" is \\\"\\n\");\n\t\t\tquot = 1;\n\t\t\tj++;\n\t\t}\n\t\tif(tests.charAt(j)=='\"' && quot == 1){\n\t\t\tif(tests.charAt(j-1)!='\\\\'){\n//\t\t\t\tSystem.out.println(\"char at \"+j+\" is \\\"\\nand it is the second \\\"\");\n\t\t\t\tj++;\n\t\t\t\twhile(j<tests.length() && (tests.charAt(j)==' ')){\n\t\t\t\t\tj++;\t\t\n\t\t\t\t}\n\t\t\t\tif(j== tests.length()) return false;\n\t\t\t\tif(tests.charAt(j)==')'){\n\t\t\t\t\tj++;\n\t\t\t\t\twhile(j<tests.length() && (tests.charAt(j)==' ')){\n\t\t\t\t\t\tj++;\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(j== tests.length()) return false;\n\t\t\t\t}\n\t\t\t\tif(tests.charAt(j)!=']') return false;\n\t\t\t\tquot = 0;\n\t\t\t}\n\t\t}\n\t\tif(quot ==0 && tests.charAt(j)==']'){\n//\t\t\tSystem.out.println(\"char at \"+j+\" is ]\\n\");\n\t\t\tcount--;\n\t\t\tend = j;\n//\t\t\tSystem.out.println(\"and the count is \"+count);\n\t\t}\n\t\tif(tests.charAt(j)=='/' && quot == 0 && end == -1 && start == -1){\n\t\t\tchildrenStep = tests.substring(j+1);\n\t\t\ttests = tests.substring(0,j);\n\t\t\tif(validHelper(tests)){\n\t\t\t\treturn validHelper(childrenStep);\n\t\t\t}\n\t\t}\n\t\tif(start!= -1 && count==0){\n//\t\t\tSystem.out.println(\"the condition is \"+tests.substring(start,end));\n\t\t\tconditions.add(tests.substring(start,end));\n\t\t\tstart=-1;\n\t\t\tend = -1;\n\t\t\tquot = 0;\n\t\t}\n\t}\n//\tSystem.out.println(conditions.size());\n\tif(conditions.size()!=0){\n\t\tfor(j = 0; j <conditions.size(); j++){\n\t\t\tString temp = conditions.get(j);\n\t\t\tif(!validTest(temp)){\n//\t\t\t\tSystem.out.println(\"######1\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"######2\");\n\t\tif(j==conditions.size()) return true;\n\t}\n//\tSystem.out.println(\"######3\");\n\treturn false;\n\t\n}", "public boolean[] mo21a(String str) {\n int length = str.length();\n if (length > 80) {\n try {\n throw new IllegalArgumentException(f337z[2] + length);\n } catch (IllegalArgumentException e) {\n throw e;\n }\n }\n int i;\n int[] iArr = new int[9];\n boolean[] zArr = new boolean[((((str.length() + 2) + 2) * 9) + 1)];\n C0105f.m616a(C0114p.f385f[47], iArr);\n int b = C0105f.m617b(zArr, 0, iArr, true);\n for (i = 0; i < length; i++) {\n C0105f.m616a(C0114p.f385f[f337z[0].indexOf(str.charAt(i))], iArr);\n b += C0105f.m617b(zArr, b, iArr, true);\n }\n i = C0105f.m615a(str, 20);\n C0105f.m616a(C0114p.f385f[i], iArr);\n b += C0105f.m617b(zArr, b, iArr, true);\n C0105f.m616a(C0114p.f385f[C0105f.m615a(str + f337z[0].charAt(i), 15)], iArr);\n i = C0105f.m617b(zArr, b, iArr, true) + b;\n C0105f.m616a(C0114p.f385f[47], iArr);\n zArr[i + C0105f.m617b(zArr, i, iArr, true)] = true;\n return zArr;\n }", "public static boolean isPalindrome( String s ) {\n// two indexes --> front and back to move toowards each other\n if (s.length() == 0 || s.length() == 1)\n return false;\n int i = 0;\n int j = s.length() - 1;\n while (i != j && i < j ) {\n if (s.charAt(i) == s.charAt(j)) {\n i++; j--;\n }\n else\n return false;\n }\n return true;\n }", "private static void subStringNonrepchars(String input) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString s =\"\";\n\n\t\tint j=0,max=0,len=0, i=0;\n\t\tboolean[] flag = new boolean[256];\n\t\tfor(i=0;i<input.length();i++){\n\t\t\tif(!flag[input.charAt(i)]){\n\t\t\t\tSystem.out.println(\"char: \"+input.charAt(i)+\" bool: \"+!flag[input.charAt(i)]);\n\t\t\t\tlen++;\n\t\t\t}else{\n\t\t\t\t//System.out.println(\"coming to else\");\n\t\t\t\tif(len>max){\n\t\t\t\t\tmax= len;len=1;\n\t\t\t\t\tSystem.out.println(j+\" j \"+max +\" :max substring: \"+input.substring(j,i));\n\t\t\t\t}\n\t\t\t\tj = i;\n\t\t\t\tSystem.out.println(\"max len is: \"+max+\" j: \"+j);\n\t\t\t\tflag = new boolean[256];\n\t\t\t}\n\t\t\tflag[input.charAt(i)] = true;\n\n\t\t}\n\t\tif(len>max){\n\t\t\tmax=len;\n\t\t\tj=i;\n\t\t}\n\t\tif(max>j)\n\t\t\tSystem.out.println(input.substring(max-j,max+1));\n\t\telse{\n\t\t\tSystem.out.println(input.substring(j-max,max+1));\n\t\t}\n\n\n\n\t}", "public boolean validPalindrome(String s) {\n int start = 0, end = s.length() - 1;\n int[] delete = new int[3];\n while (start < end) {\n char a = s.charAt(start);\n char b = s.charAt(end);\n \n if (a != b) {\n if (delete[0] == 2) {\n return false;\n }\n if (delete[0] == 1) {\n delete[0] = 2;\n start = delete[1];\n end = delete[2];\n end += 1;\n } else {\n delete[0] = 1;\n delete[1] = start;\n delete[2] = end;\n start -= 1;\n }\n }\n start += 1;\n end -= 1;\n }\n return true;\n }", "private static boolean hasWord(char[][] board, int x, int y, String s) {\n if (x < 0 || x > 4 || y < 0 || y > 4) return false;\n if (s.length() == 0) return true;\n\n // If 1st char of s is different from char at (x, y),\n // hasWord cannot continue to search s.\n if (s.charAt(0) != board[y][x]) return false;\n\n for (int i = 0; i < diffX.length; i++) {\n int newX = x + diffX[i];\n int newY = y + diffY[i];\n if (hasWord(board, newX, newY, s.substring(1))) return true;\n }\n\n return false;\n }", "private boolean detectRepeat(String substring) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tchar actual=substring.charAt(i);\n\t\t\t\n\t\t\tint j=i+1;\n\t\t\t//Los anteriores ya se han comprobado\n\t\t\tfor (; j < substring.length() && actual!=substring.charAt(j) ; j++);\n\t\t\t\n\t\t\tif (j<substring.length()) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public boolean genStringAsCharArray();", "@Test\n public void shouldReturnTrue() {\n\t\tString test1=\"abcdefghi\";\n assertEquals(true,\n sut.binarySearch(test1,'d',0,test1.length()-1));\n }", "public static int canArrangeWords(String arr[])\n {\n // INSERT YOUR CODE HERE\n for(int i=0;i<arr.length;i++){\n for(int j=0;j<arr.length-i-1;j++){\n if(arr[j].charAt(0)>arr[j+1].charAt(0)){\n String temp=arr[j];\n arr[j]=arr[j+1];\n arr[j+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n if(arr[i].charAt(0)!=arr[i-1].charAt(arr[i-1].length()-1)){\n return -1;\n }\n }\n return 1;\n }", "public static boolean backspaceCompare(String S, String T) {\n char[] arr1 = S.toCharArray();\n char[] arr2 = T.toCharArray();\n StringBuilder sb1 = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for(int i = arr1.length - 1; i >= 0; i--){\n if(arr1[i] == '#'){\n arr1[i] = ' ';\n for(int k = i - 1; k >= 0; k--){\n if(arr1[k] != '#' && arr1[k] != ' '){\n arr1[k] = ' ';\n break;\n }\n }\n }else if(arr1[i] != ' '){\n sb1.append(arr1[i]);\n }\n }\n\n for(int i = arr2.length - 1; i >= 0; i--){\n if(arr2[i] == '#'){\n arr2[i] = ' ';\n for(int k = i - 1; k >= 0; k--){\n if(arr2[k] != '#' && arr2[k] != ' '){\n arr2[k] = ' ';\n break;\n }\n }\n }else if(arr2[i] != ' '){\n sb2.append(arr2[i]);\n }\n }\n// System.out.println(\"sb1:\"+sb1.toString()+\"----sb2:\"+sb2.toString());\n return sb1.toString().equals(sb2.toString());\n }", "public boolean isMatch(String s, String p) {\n int sLen = s.length();\n int pLen = p.length();\n\n boolean[][] dp = new boolean[pLen + 1][sLen + 1];\n\n dp[0][0] = true;\n\n for (int i = 1; i <= pLen; i++) {\n if (p.charAt(i - 1) == '*') {\n dp[i][0] = dp[i - 2][0];\n ;\n }\n }\n\n for (int i = 1; i <= pLen; i++) {\n for (int j = 1; j <= sLen; j++) {\n\n if (p.charAt(i - 1) == '*') {\n dp[i][j] = dp[i - 2][j];\n\n if (s.charAt(j - 1) == p.charAt(i - 2) || p.charAt(i - 2) == '.') {\n dp[i][j] = dp[i][j] || dp[i][j - 1];\n }\n } else if (p.charAt(i - 1) == '.' || p.charAt(i - 1) == s.charAt(j - 1)) {\n dp[i][j] = dp[i - 1][j - 1];\n } else {\n dp[i][j] = false;\n }\n }\n }\n\n return dp[pLen][sLen];\n }", "private String parseBoolean () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n char chr=next();//get next character\r\n assert \"ft\".indexOf(chr)>=0;//assert valid boolean start character\r\n switch (chr) {//switch on first character\r\n case 'f': skip(4);//skip to last character\r\n return \"false\";\r\n case 't': skip(3);//skip to last character\r\n return \"true\";\r\n default: assert false;//assert that we do not reach this statement\r\n return null;\r\n }//switch on first character\r\n \r\n }", "private final boolean cons(int i)\n\t { switch (b[i])\n\t { case 'a': case 'e': case 'i': case 'o': case 'u': return false;\n\t case 'y': return (i==0) ? true : !cons(i-1);\n\t default: return true;\n\t }\n\t }", "private boolean isNoun(int i)\n\t{\n\t\tif (text.get(i).length() > 1) // Ensures word is more than one character\n\t\t{\n\t\t\tString prior = text.get(i-1);\n\t\t\tif (prior.charAt(0) == '\\\"' || prior.charAt(0) == '-' || prior.charAt(0) == '“') // Checks if \" or - is the char next to the word\n\t\t\t{\n\t\t\t\tif (text.get(i-2).charAt(0) == 10) // Checks if the char 2 spaces before the word is a newline character\n\t\t\t\t{\n\t\t\t\t\tfullStops.add(i); // Saves location for second pass\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (text.get(i-2).length() == 1 && text.get(i-3).length() == 1) // Checks if there is a one letter word before the space before the word\n\t\t\t\t{\n\t\t\t\t\tfullStops.add(i); // Saves location for second pass\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (text.get(i-3).charAt(0) == 13)\n\t\t\t\t{\n\t\t\t\t\tfullStops.add(i); // Saves location for second pass\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t\tif (prior.charAt(0) == ' ' && text.get(i-2).length() == 1 && text.get(i-2).charAt(0) != 'I') // Checks that word prior to word is not a type of full stop\n\t\t{\n\t\t\tfullStops.add(i); // Saves location for second pass\n\t\t\treturn false;\n\t\t}\n\t\tif (prior.charAt(0) == 10) //If char before word is a newline character then it is saved for another iteration\n\t\t{\n\t\t\tfullStops.add(i);\n\t\t\treturn false;\n\t\t}\n\n\t\tif (text.get(i).charAt(0) > 64 && text.get(i).charAt(0) < 91) // If starting character is uppercase then it is assumed to be a noun\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean isNilScansArray(int i);", "static String twoStrings(String s1, String s2) {\n String bigstr = s1.length() > s2.length() ? s1 : s2;\n String smallstr = s1.length() > s2.length() ? s2 : s1;\n int bigstrSize = bigstr.length();\n int smallstrSize = smallstr.length();\n\n boolean string_check[] = new boolean[1000];\n\n for (int i = 0; i < bigstrSize; i++) {\n string_check[bigstr.charAt(i) - 'A'] = true;\n }\n // if at least one char is present in boolean array\n for (int i = 0; i < smallstrSize; i++) {\n if (string_check[smallstr.charAt(i) - 'A'] == true) {\n return \"YES\";\n }\n }\n return \"NO\";\n }", "private void findValidWordsOnBoard(){\n\n //mark each visited cell to ensure it gets used only once while forming a word\n boolean[][] visited = new boolean[boardLength][boardLength];\n String word = \"\";\n\n for(int i = 0; i < boardLength; i++) {\n for(int j = 0; j < boardLength; j++)\n findWordsOnBoard(word, visited, board, i, j);\n }\n }", "public static boolean isPal(String s)\n {\n if(s.length() == 0 || s.length() == 1){\n return true; \n }\n //recursive call\n if(s.charAt(0) == s.charAt(s.length()-1))\n /* check for first and last char of String:\n * if they are same then do the same thing for a substring\n * with first and last char removed. and carry on this\n * until you string completes or condition fails\n * Function calling itself: Recursion\n */\n {\n return isPal(s.substring(1, s.length()-1));\n }\n /* If program control reaches to this statement it means\n * the String is not palindrome hence return false.\n */\n return false;\n }", "protected boolean isSubstring(String substring, String word) {\r\n//\t\tboolean isSub = true;\r\n\t\treturn word.contains(substring);\r\n//\t\treturn isSub;\r\n\t}", "public boolean isStrobogrammatic(String num) {\n char input[] = num.toCharArray();\n int p1 = 0, p2 = num.length() - 1;//pointers\n while(p1 <= p2) {\n if(input[p1] == '6') {\n if(input[p2] != '9') return false;\n } else if (input[p1] == '9') {\n if(input[p2] != '6') return false;\n } else if (input[p1] == '1' || input[p1] == '8'||input[p1] == '0') {\n if (input[p2] != input[p1]) return false;\n } else {\n return false;\n }\n p1++;\n p2--;\n }\n return true;\n }", "public boolean canHandleString(String s){\n\t\tArrayList<State> curStates=new ArrayList<State>(startStates);\n\t\tboolean ret=false;\n\t\t//System.err.println(\"Begin Processing \"+s);//+\" with:\\n\"+curStates);\n\n\t\t\tfor(char c :s.toCharArray()){\n\t\t\t\t//copy into new array so we aren't messing with original\n\t\t\t\tArrayList<Integer> addStateIdxs = new ArrayList<Integer>();\n\t\t\t\tArrayList<Integer> removeStateIdxs = new ArrayList<Integer>();\n\t\t\t\t\n\t\t\t\t//Step 1: check all curStates for char\n\t\t\t\tfor(int i=0;i<curStates.size();i++){\n\t\t\t\t\t//Step 1.1: if curStates[i] can move to a new state,\n\t\t\t\t\tArrayList<Integer> goesTo=curStates.get(i).goesTo(\"\"+c);\n\t\t\t\t\tif(goesTo!=null && goesTo.size()>0){\n\t\t\t\t\t\t//1.1.1: add to removeStateIdxs\n\t\t\t\t\t\tremoveStateIdxs.add(i);\n\t\t\t\t\t\t//1.1.2: append to newStateIdxs\n\t\t\t\t\t\taddStateIdxs.addAll(curStates.get(i).goesTo(\"\"+c));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//1.1.3: add to removeStateIdxs if we can't go anywhere\n\t\t\t\t\t\tremoveStateIdxs.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(removeStateIdxs);\n\t\t\t\t//Step 2: remove currentStates[removeStateIdxs]\n\t\t\t\tfor(int i=removeStateIdxs.size()-1;i>=0;i--){\n\t\t\t\t\tif(curStates. get(i)!=null)\n\t\t\t\t\t\tcurStates.remove(i);\n\t\t\t\t}\n\t\t\t\t//Step 3: append addStateIdxs to curState\n\t\t\t\tfor(int i:addStateIdxs){\n//\t\t\t\t\tif(theStates.get(i)!=null)\n\t\t\t\t\t\tcurStates.add(theStates.get(i));\n\t\t\t\t}\n\n\t\t\t\t//System.err.println(\"at \"+c+\": \"+curStates);\n\t\t\t}\n\t\t\t\n\t\t\tfor(State S:curStates){\n\t\t\t\tif(S.getAccept()){\n\t\t\t\t\tret=true;\n\t\t\t\t\t//System.out.println(\"ACCEPTS!\");\n\t\t\t\t}\n\t\t\t}\n//\t\t\tSystem.out.println((ret?\"ACCEPTS!\":\"REJECTS!\"));\n\t\t\n\t\treturn ret;\n\t}", "public boolean isMatch(String s, String p) {\n boolean[][] dp = new boolean[s.length()+1][p.length()+1];\n dp[0][0] = true;\n for(int i = 0; i < p.length(); i++) {\n if(p.charAt(i) == '*' && dp[0][i-1]) {\n dp[0][i+1] = true;\n }\n }\n for(int i = 0; i < s.length(); i++) {\n for(int j = 0; j < p.length(); j++) {\n char sc = s.charAt(i);\n char pc = p.charAt(j);\n if(sc == pc) {\n dp[i+1][j+1] = dp[i][j];\n } else if(pc == '.') {\n dp[i+1][j+1] = dp[i][j];\n } else if(pc == '*') {\n if(p.charAt(j-1) != '.' && p.charAt(j-1) != s.charAt(i)) {\n dp[i+1][j+1] = dp[i+1][j-1];\n } else {\n dp[i+1][j+1] = (dp[i+1][j] || dp[i+1][j-1] || dp[i][j+1]);\n }\n } else if(pc == '+') {\n if(p.charAt(j-1) == '.' || p.charAt(j-1) == s.charAt(i)) {\n dp[i+1][j+1] = (dp[i][j+1] || dp[i+1][j]);\n }\n }\n }\n }\n return dp[s.length()][p.length()];\n }", "boolean hasMid();", "boolean hasMid();", "boolean isBetweenCorrect(int currentIndex, List<String> words);", "public static boolean canBeAPalindromeUsingMap(String s) {\n Map<Character, Integer> charCounts = new HashMap<>();\n char[] chars = s.toCharArray();\n int lengthWithoutSpaces = 0;\n for (char c : chars) {\n if (c != ' ') {\n lengthWithoutSpaces++;\n charCounts.compute(c, (k, v) -> v == null ? 1 : v + 1);\n }\n }\n boolean isLengthEven = lengthWithoutSpaces % 2 == 0;\n boolean hasUnevenCountOfChar = false;\n for (Integer charCount : charCounts.values()) {\n if (charCount % 2 == 0) {\n continue;\n } else {\n if (isLengthEven) {\n return false;\n } else {\n if (!hasUnevenCountOfChar) {\n hasUnevenCountOfChar = true;\n } else {\n return false;\n }\n }\n }\n }\n return true;\n }", "@Test\n public void shouldFindSubstringAtTheEndOfTheStringAfterOneCharacterPartialMatch() {\n // Given\n String string = \"AABc\";\n CharSequence charSequence = new StringBuilder(\"ABc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertTrue(containsCharSequence);\n }", "public boolean startHi(String str) {\n if (str.length() < 2) return false;\n \n String front;\n if (str.length() == 2) {\n front = str;\n } else {\n front = str.substring(0, 2);\n }\n \n return (front.equals(\"hi\"));\n \n}", "boolean hasScStr();", "@Test\n public void whenNotStartWithPrefixThenFalse() {\n ArrayChar word = new ArrayChar(\"Hello\");\n boolean result = word.startWith(\"Hi\");\n assertThat(result, is(false));\n }", "public static boolean contains(final String string, final String sub) {\n final int tl = sub.length();\n if(tl == 0) return true;\n final int sl = string.length() - tl;\n for(int s = 0; s <= sl; s++) {\n int t = 0;\n while(equals(string.charAt(s + t), sub.charAt(t))) {\n if(++t == tl) return true;\n }\n }\n return false;\n }", "static boolean possibility(HashMap<Integer,\n Integer> m,\n int length, String s)\n{\n // counts the occurrence of number\n // which is odd\n int countodd = 0;\n \n for (int i = 0; i < length; i++)\n {\n // if occurrence is odd\n if (m.get(s.charAt(i) - '0') % 2 == 1)\n countodd++;\n \n // if number exceeds 1\n if (countodd > 1)\n return false;\n }\n \n return true;\n}", "public static boolean[] split2bools(String src, String sep) {\n String[] strs = split(src, sep);\n boolean[] booleans0 = new boolean[strs.length];\n int nn = 0;\n for (int i = 0, n = strs.length; i < n; i++) {\n if (!strs[i].equals(\"\")) {\n try {\n booleans0[nn] = new Boolean(strs[i]).booleanValue();\n } catch (Exception e) {\n booleans0[nn] = false;\n }\n nn++;\n }\n }\n boolean[] booleans1 = new boolean[nn];\n System.arraycopy(booleans0, 0, booleans1, 0, nn);\n return booleans1;\n }", "public static boolean goodRuns(String sequence) {\n\t\tString run = sequence.charAt(0) + \"\";\n\t\tint longestRun = 0;\n\t\tfor (int i = 1; i < sequence.length(); i++) {\n\t\t\tif (run.contains(sequence.charAt(i) + \"\")) run += sequence.charAt(i);\n\t\t\telse {\n\t\t\t\tif (longestRun < run.length()) longestRun = run.length();\n\t\t\t\trun = sequence.charAt(i) + \"\";\n\t\t\t}\n\t\t}\n\t\treturn longestRun <= MAX_RUN;\n\t}", "public static boolean is(CharSequence in, CharPred pred) {\n int max = in.length();\n switch (max) {\n case 0:\n return false;\n case 1:\n return pred.test(in.charAt(0));\n case 2:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(1));\n case 3:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 4:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 5:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(4))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(1))\n && pred.test(in.charAt(2));\n default:\n boolean odd = (max % 2) != 0;\n int mid = max / 2;\n if (odd) {\n if (pred.test(in.charAt(mid))) {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n } else {\n return false;\n }\n } else {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n }\n return true;\n\n }\n }" ]
[ "0.6112754", "0.5759252", "0.5692811", "0.56150573", "0.5589129", "0.5477475", "0.5409434", "0.5347068", "0.5287028", "0.5267638", "0.52669317", "0.5249985", "0.52441806", "0.52392125", "0.52387834", "0.5150582", "0.50936997", "0.50730586", "0.50627524", "0.5056718", "0.5052535", "0.50372565", "0.50298244", "0.5025496", "0.50213397", "0.501631", "0.50031036", "0.49862027", "0.49797323", "0.4975007", "0.49612576", "0.49605152", "0.49567148", "0.49548253", "0.49509802", "0.49399313", "0.49342382", "0.49139458", "0.4907372", "0.49059588", "0.4881795", "0.4879321", "0.48783642", "0.4857637", "0.4853373", "0.484588", "0.4828656", "0.482343", "0.4815676", "0.4811788", "0.48064765", "0.4802888", "0.47890016", "0.47889817", "0.4787999", "0.47763795", "0.4755103", "0.47521493", "0.47516716", "0.47269163", "0.47200683", "0.47166276", "0.47092703", "0.46996817", "0.46993873", "0.4697855", "0.46949446", "0.4687729", "0.46868914", "0.46849504", "0.4682093", "0.46770936", "0.4674556", "0.46701744", "0.466782", "0.46657437", "0.4663573", "0.4662284", "0.46551022", "0.46493536", "0.46397346", "0.4628982", "0.46275893", "0.46164253", "0.46159983", "0.46097547", "0.46097508", "0.4583111", "0.45818123", "0.45818123", "0.4576467", "0.4573756", "0.4564643", "0.45570356", "0.45558164", "0.45500538", "0.45439687", "0.4543366", "0.4538497", "0.45378748", "0.4534717" ]
0.0
-1
Used currently of ACK messages
public static org.springframework.messaging.Message<Message> encode(String registrationID, String messageId, String messageType) { GcmEntity gcmPayload = new GcmEntity(messageId, registrationID, messageType); return constructGcmMessage(gcmPayload); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ack() {\n }", "boolean getAck();", "boolean needsAck() { return true; }", "messages.Ackinterface.AckInterface getAck();", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "public void handleAck() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\t\n\t\tint userCnt = users.size();\n\t\tSystem.out.println(\"handling ack in Server\");\n\t\twhile(CommitDecision.size() != 0){\n\t\t\tif(end - start >= 3000) {\n\t\t\t\tfor(String user: CommitDecision.keySet()) {\n\t\t\t\t\tSystem.out.println(\"resend ack to \"+ user+ \" for task \"+ filename);\n\t\t\t\t\tPL.sendMessage(CommitDecision.get(user));\n\t\t\t\t}\n\t\t\t\tstart = end;\n\t\t\t}else {\n\t\t\t\tMsg tmp = notYetAck.poll();\n\t\t\t\tif(tmp != null && CommitDecision.containsKey(tmp.user)) {\n\t\t\t\t\tCommitDecision.remove(tmp.user);\n\t\t\t\t\tSystem.out.println(tmp.user+\" 's ack has been received\");\n\t\t\t\t}\n\t\t\t\tend = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n protected boolean shouldAck() {\n return true;\n }", "public boolean ack() {\n return ack;\n }", "boolean hasAck();", "void onAckReceived(int source);", "public boolean getAck() {\n return ack_;\n }", "public int AckReceivedFor(){//For a group call, should take an input ID, should be UPDATED\n return this.packet_ack;\n }", "public boolean getAck() {\n return ack_;\n }", "public messages.Ackinterface.AckInterface getAck() {\n return ack_;\n }", "public boolean getAck() {\n\t\t\t\treturn ack_;\n\t\t\t}", "public boolean getAck() {\n\t\t\treturn ack_;\n\t\t}", "protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }", "boolean getLockstepAck();", "public long getMessageAckCount() {\n return messageMetrics.acks.get();\n }", "@JsonProperty(PROP_TCP_FLAGS_ACK)\n private int getJsonTcpFlagsAck() {\n return _tcpFlags != null && _tcpFlags.getAck() ? 1 : 0;\n }", "public void ack() {\n //disable current awaiting handler\n testFuture.cancel(false);\n //reset number of tryies;\n tryCount = 0;\n //shcedule next ping\n testFuture = mtpTimer.schedule(this, Mtp3.TIMEOUT_T2_SLTM, TimeUnit.SECONDS);\n if (logger.isDebugEnabled()) {\n \tlogger.debug(String.format(\"(%s) Test message acknowledged, Link test passed\", link.name));\n }\n }", "@Override\r\n\tpublic short getFlag() {\r\n\t\treturn FLAG_MESSAGE_SERVER_CONNECTION_ACKNOWLEDGE;\r\n\t}", "void receiveAcknowledgement() {\n byte[] receiveBuffer = new byte[2048];\n DatagramPacket receivePacket = new DatagramPacket(receiveBuffer, receiveBuffer.length);\n try {\n recSocket.receive(receivePacket);\n String dataReceived = new String(receivePacket.getData()).trim();\n System.out.println(\"\\n\" + dataReceived);\n\n } catch (IOException e) {\n System.out.println(\"\\nAcknowledgement not received!\");\n }\n }", "public int getAcknowledgeMode() {\n return acknowledgeMode;\n }", "public interface Ack {\n\t/**\n\t * Determines whether the response is success\n\t * @return\n\t */\n\tpublic boolean isSuccess();\n\t\n\t/**\n\t * Get the message response\n\t * @return\n\t */\n\tpublic String getMessage();\n\t\n\t/**\n\t * Get player's uuid response\n\t * @return\n\t */\n\tpublic UUID getUuid();\n\t\n\t/**\n\t * Set whether response is success or not\n\t * @param success\n\t */\n\tpublic void setSuccess(boolean success);\n\t\n\t/**\n\t * Set message response\n\t * @param message\n\t */\n\tpublic void setMessage(String message);\n\t\n\t/**\n\t * Set player's uuid response\n\t * @param uuid\n\t */\n\tpublic void setUuid(UUID uuid);\n}", "public LsAcknowledge() {\n }", "boolean hasReceived();", "public boolean hasAck() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "boolean hasJsonAckMsg();", "private void sendACKPacket()\n{\n \n //the values are unpacked into bytes and stored in outBufScratch\n //outBufScrIndex is used to load the array, start at position 0\n \n outBufScrIndex = 0;\n \n outBufScratch[outBufScrIndex++] = Notcher.ACK_CMD;\n \n //the byte is placed right here in this method\n outBufScratch[outBufScrIndex++] = lastPacketTypeHandled;\n \n //send header, the data, and checksum\n sendByteArray(outBufScrIndex, outBufScratch);\n \n}", "public boolean isAcknowledge() {\n return (msgType == MessageType.ACKNOWLEDGE);\n }", "@Override\n\tpublic void msgAtCook() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\t\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tMessagerec[0]=1;\n\t\t\t\t\t\tstate2=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t}", "public boolean hasAck() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "void getack(int datagram_id){\r\n\t\tSftpDatagram the_datagram = sendings.get(new Integer(datagram_id));\r\n\t\t//indeed ack\r\n\t\tif(the_datagram != null){\r\n\t\t\tthe_datagram.cancel_timer();\r\n\t\t\tsendings.remove(new Integer(datagram_id));\r\n\t\t\tnot_ack_yet--;\r\n\t\t\tcheck_and_send();\r\n\t\t}\r\n\t}", "public byte[] nextMsg() {\n return null;\r\n }", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tk++;\n\t\t\t\t\t\n\t\t\t\t\tif(k>=10) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\teeipClient.ForwardClose();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\ttimerflag1=false;\n\t\t\t\t\t\tstatus_write=true;\n\t\t\t\t\t\tstate=3;\n\t\t\t\t\t\tk=0;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "public SendAck(int id_message){\r\n\t\tsuper();\r\n\t\tthis.id_message = id_message ;\r\n\t}", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\n\t\t\t\t\tif((AA_Bit==0)&&(AE_Bit==0)) {\n\t\t\t\t\t\tstate2=2;\n\t\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "private void ackit(String queryId){\n ResponseSender sender = responseSenderQueueForQuery.get(queryId).remove();\n sender.send(new Response(RpcType.ACK, Acks.OK));\n }", "@Override\n\tpublic void msgAtCooking() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\t\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\t\n\t\t\t\t\tif(AE_Bit==1) {\n\t\t\t\t\t\tstate=2;\n\t\t\t\t\t\ttimerflag3=false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "void beforeAckMessages(Collection<Message> messages, MutationBatch mb);", "@Override\r\n\tpublic int ack(int x, int y) {\n\t\treturn 0;\r\n\t}", "boolean hasUnReceived();", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder();", "public boolean finAcked() { return (flags & FIN_ACKED) != 0; }", "protected void aOutput(Message message)\r\n {\r\n \t//rdt_send(data)\r\n \tcount_original_packets_transmitted_by_A++;\r\n \tSystem.out.println(\"|aOutput| : message received from above.\");\r\n \tmessageCongestionBuffer.add(message);\r\n \tSystem.out.println(\"|aOutput| : messageCongestionBuffer add new message, buffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n \tif(next_seq_num<window_base+WindowSize)\r\n \t{\r\n \t\t/*\r\n \t\tif(messageCongestionBuffer.size()>0) //something has already been in the buffer\r\n \t\t{\r\n \t\t\tSystem.out.println(\"something has already been in the buffer\");\r\n \t\t\tmessageCongestionBuffer.add(message);\r\n \t\t\tmessage = messageCongestionBuffer.get(0);\r\n \t\t\tmessageCongestionBuffer.remove(0);\r\n \t\t}\r\n \t\t*/\r\n \t\tString data = messageCongestionBuffer.get(0).getData();\r\n \t\tmessageCongestionBuffer.remove(0);\r\n \t\t\r\n \t\t//public Packet(int seq, int ack, int check, String newPayload)\r\n \t\t\r\n \t\tint seq = next_seq_num % LimitSeqNo;\r\n \t\tint ack = ACK_NOT_USED;\r\n \t\tint check = makeCheckSum(seq,ack,data);\r\n \t\tpacketBufferAry[next_seq_num % LimitSeqNo] = new Packet(seq,ack,check,data);\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is made\");\r\n \t\ttoLayer3(0,packetBufferAry[next_seq_num % LimitSeqNo]); //udt_send\r\n \t\tSystem.out.println(\"|aOutput| : packet with seq number:\"+Integer.toString(next_seq_num)+\" is sent\");\r\n \t\t\r\n \t\tif(next_seq_num==window_base) \r\n \t\t{\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"|aOutput| : timer is started\");\r\n \t\t}\r\n \t\t\r\n \t\t\r\n \t\tnext_seq_num = (next_seq_num+1) % LimitSeqNo;\t\r\n \t\tSystem.out.println(\"|aOutput| : next_seq_num now becomes: \"+next_seq_num+\".\");\r\n \t\t\r\n \t}\r\n \telse\r\n \t{\r\n \t\tSystem.out.println(\"|aOutput| : windows is full, it is saved in a buffer.\");\r\n \t\tSystem.out.println(\"|aOutput| : messageCongestionBuffer size now is: \"+Integer.toString(messageCongestionBuffer.size()));\r\n\r\n \t}\r\n \t\r\n //\tpublic Packet(int seq, int ack, int check,int[] sackAry)\r\n \t/*\r\n \t\tif(state_sender == STATE_WAIT_FOR_CALL_0_FROM_ABOVE)\r\n \t\t{\r\n \t\t\t\r\n \t\t\tint seq = 0; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_0;\r\n \t\t\tSystem.out.println(\"aOutput: packet0 successfully send.\");\r\n \t\t\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start timer\");\r\n \t\t\t\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t\telse if (state_sender == STATE_WAIT_FOR_CALL_1_FROM_ABOVE)\r\n \t\t{\r\n \t\t\tint seq = 1; //seq = 0\r\n \t\t\tint ack = ACK_NOT_USED; //0 for not using\r\n \t\t\tString dataStr = message.getData();\r\n \t\t\tint check;\r\n \t\t\tcheck = makeCheckSum(seq,ack,dataStr); //checksum\r\n \t\t\tPacket p = new Packet(seq,ack,check,message.getData()); //make_pkt\r\n \t\t\t\r\n \t\t\tpacketBuffer = p; //save packets for resend\r\n \t\t\t\r\n \t\t\ttoLayer3(0,p); //udt_send\r\n \t\t\tstate_sender = STATE_WAIT_FOR_ACK_OR_NAK_1;\r\n \t\t\tSystem.out.println(\"aOutput: packet1 successfully send.\");\t\r\n \t\t\tstartTimer(0,RxmtInterval);\r\n \t\t\tSystem.out.println(\"aOutput: start sender timer\");\r\n \t\t}\r\n \t\t*/\r\n }", "void acked(boolean timedOutMessage);", "public boolean isOKToRemove(){\n return ( this == Acked || this == Expired || this == DLCMessage);\n }", "long incrementInMsgs() {\n return inMsgs.incrementAndGet();\n }", "private void handleDataPacket(TcpPacket packet) {\n\n // Invariants\n\n // For the sender, if the ACK message did not arrive, it will receive\n // another ACK+SYN message, which it will then again confirm.\n if (!this.isReceiver()) {\n assert(packet.isSYN() && packet.isACK());\n sendWithoutResend(\n ((FullExtTcpPacket) createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0)), // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n return;\n }\n\n // The receiver is always at FIRST_SEQ_NUMBER+1, having sent only the ACK+SYN message\n assert(this.sendUnackNumber == FIRST_SEQ_NUMBER + 1);\n\n // Locally store sequence numbers\n long seqNumber = packet.getSequenceNumber();\n long ackNumber = (packet.getSequenceNumber() + packet.getDataSizeByte() + (packet.isSYN() ? 1 : 0));\n\n // Only advance if it is the packet on the left side of the receiver window\n if (receiveNextNumber == seqNumber) {\n receiveNextNumber = selectiveAckSet.determineReceiveNextNumber(ackNumber);\n\n // If it is not on the left side, we selectively acknowledge it\n } else if (seqNumber > receiveNextNumber) {\n selectiveAckSet.add(seqNumber, ackNumber);\n }\n\n // Send out the acknowledgment\n sendWithoutResend(\n ((FullExtTcpPacket) ((FullExtTcpPacket) (createPacket(\n 0, // Data size (byte)\n sendNextNumber, // Sequence number\n receiveNextNumber, // Ack number\n true, // ACK\n false, // SYN\n packet.getECN() // ECE\n ).setEchoFlowletId(packet.getFlowletId())))\n .setSelectiveAck(selectiveAckSet.createSelectiveAckData()))\n .setEchoDepartureTime(packet.getDepartureTime())\n );\n\n }", "public boolean hasAck() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public boolean hasAck() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }", "protected void handleECEMarkedPacket() {\n //halveCongestionWindow();\n }", "public messages.Ackinterface.AckInterface getAck() {\n if (ackBuilder_ == null) {\n return ack_;\n } else {\n return ackBuilder_.getMessage();\n }\n }", "void messageSent();", "public boolean sdp200AckEnabled();", "public void updateACMsg(OL_Message msg) {\n FSM_Extension e = ((FSM_Extension) msg.getFirstExtensionByType(Extension.FSM));\n switch(myState) {\n case NoPayload_Recover:\n {\n switch(e.getType()) {\n case DONT_HAVE_IT:\n {\n myState = NoPayload_NoRecover;\n messageStore.setTimer(this, REC_TIMER_INDEX, timeout_REC);\n }\n break;\n case HAVE_IT:\n {\n neighboraddress = msg.getSourceAddress();\n sendToNode(NACK_SYNC, msg.getSourceAddress());\n myState = WaitforPayload;\n messageStore.setTimer(this, NACK_TIMER_INDEX, timeout_NACK);\n messageStore.setTimer(this, MAXNACK_TIMER_INDEX, max_NACK);\n }\n break;\n case NACK_SYNC:\n case QUERY_MSG_SYNC:\n {\n sendToNode(DONT_HAVE_IT, msg.getSourceAddress());\n myState = NoPayload_NoRecover;\n messageStore.setTimer(this, REC_TIMER_INDEX, timeout_REC);\n }\n break;\n }\n }\n break;\n case NoPayload_NoRecover:\n {\n switch(e.getType()) {\n case HAVE_IT:\n {\n neighboraddress = msg.getSourceAddress();\n sendToNode(NACK_SYNC, msg.getSourceAddress());\n myState = WaitforPayload;\n messageStore.setTimer(this, NACK_TIMER_INDEX, timeout_NACK);\n messageStore.setTimer(this, MAXNACK_TIMER_INDEX, max_NACK);\n }\n break;\n case NACK_SYNC:\n case QUERY_MSG_SYNC:\n {\n sendToNode(DONT_HAVE_IT, msg.getSourceAddress());\n }\n break;\n }\n }\n break;\n case WaitforPayload:\n {\n switch(e.getType()) {\n case DONT_HAVE_IT:\n {\n if (neighboraddress != msg.getSourceAddress() && neighboraddress != null) {\n sendToNode(NACK_SYNC, neighboraddress);\n } else {\n myState = NoPayload_NoRecover;\n messageStore.setTimer(this, REC_TIMER_INDEX, timeout_REC);\n }\n }\n break;\n case HAVE_IT:\n {\n neighboraddress = msg.getSourceAddress();\n }\n break;\n case NACK_SYNC:\n case QUERY_MSG_SYNC:\n {\n sendToNode(DONT_HAVE_IT, msg.getSourceAddress());\n }\n break;\n }\n }\n break;\n case HavePayload:\n {\n if (e.getType() == NACK_SYNC) {\n OL_Message payload = (OL_Message) socket.createMessage(data);\n ;\n msg.setHopLimit((short) 1);\n FSM_Extension ee = new FSM_Extension(MessageStore.FSM_SYNCHRONIZATION, PAYLOAD, messageid);\n payload.addExtension(ee);\n payload.setDeliveryMode(OL_Message.DELIVERY_MODE_UNICAST);\n payload.setDestinationAddress(msg.getSourceAddress());\n socket.forwardToParent(payload);\n } else if (e.getType() == QUERY_MSG_SYNC) {\n sendToNode(HAVE_IT, msg.getSourceAddress());\n }\n }\n break;\n }\n }", "public int unacked() { return unackSize; }", "@Override\n\t\t\tpublic void run() {\n//\t\t\t\t\n//\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\n\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\n\t\t\t\tif((TO_Bit_old!=TO_Bit)&&(AA_Bit==1)) {\n\t\t\t\t\tTO_Bit_old=TO_Bit;\n\t\t\t\t\tstate=1;\n\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }", "private Packet handleAckRequestedAction(Packet request) {\n boolean noStateUpdate = (rc.configuration.getInternalRmFeature() != null);\n\n AcknowledgementData ackData = rc.protocolHandler.getAcknowledgementData(request.getMessage());\n rc.destinationMessageHandler.processAcknowledgements(ackData, noStateUpdate);\n\n return rc.protocolHandler.createEmptyAcknowledgementResponse(rc.destinationMessageHandler.getAcknowledgementData(ackData.getAckReqestedSequenceId(), true, noStateUpdate), request);\n }", "@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}", "public messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder() {\n return ack_;\n }", "private void viewPendingRequests() {\n\n\t}", "@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }", "private void sendReceiveRes(){\n\t}", "public void sendAck(DatagramPacket p, long timeStamp,int flag, boolean lastPacket) throws IOException{\r\n\t\tnumPackets++;\r\n\t\tclientIp = p.getAddress();\r\n\t\tclientPort = p.getPort();\r\n\r\n\t\t//Create a message buffer of MTU size\r\n\t\tbyte[] data = new byte[20];\r\n\t\tByteBuffer bb = ByteBuffer.wrap(data);\r\n\r\n\t\tbb.putInt(0); //Sequence number\r\n\t\tif(lastPacket){\r\n\t\t\tbb.putInt(lastByteRead + 1); //this is the ACK number\r\n\t\t}\r\n\t\telse{\r\n\t\t\tbb.putInt(lastByteRead); //this is the ACK number\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tbb.putLong(timeStamp); //put in the time stamp, to calculate RTT\r\n\r\n\t\t// send a SYN + ACK segment\r\n\t\tString mask = null;\r\n\r\n\t\t// ACK\r\n\t\tif(flag == 2){\r\n\t\t\tmask = \"0000000000000000000000000000010\";\r\n\t\t}\r\n\t\t// SYN + ACK\r\n\t\telse if(flag == 3 ) {\r\n\t\t\tmask = \"0000000000000000000000000001010\";\r\n\t\t}\r\n\t\t// Fin\r\n\t\telse if(flag == 5) {\r\n\t\t\tmask = \"00000000000000000000000000000100\";\r\n\t\t}\r\n\r\n\t\tint maskValue = new BigInteger(mask, 2).intValue();\r\n\t\tbb.putInt(maskValue);\r\n\r\n\t\tDatagramPacket synAckPacket = new DatagramPacket(data, data.length, clientIp, clientPort);\r\n\t\tin_channel.send(synAckPacket);\r\n\t\t\r\n\r\n\t}", "private void checkResult() {\n if (parent != -1 && (numOfAck == (outgoingLinks.size() - 1))) {\n if (setOfAck.add(this.maxId)) {\n Message message = new Message(this.uid, this.maxId, \"ack\");\n sendTo(message, this.parent);\n }\n if (!termination) {\n marker.addNumOfTerminatedProc();\n termination = true;\n }\n } else if (parent == -1 && (numOfAck == outgoingLinks.size())) {\n System.out.println(this.uid + \" is the leader.\");\n marker.addNumOfTerminatedProc();\n }\n }", "private short receive_ACK(DatagramSocket socket) throws IOException, InterruptedException {\n\n byte[] ACKbuf = new byte[4]; //ACK packet is 4 bytes long (RFC1350)\n DatagramPacket receivePacket = new DatagramPacket(ACKbuf, ACKbuf.length);\n try {\n\n // Set timeout limit so we don't wait until forever.\n socket.setSoTimeout(WAITING_LIMIT);\n socket.receive(receivePacket);\n\n byte[] ACK = receivePacket.getData();\n ByteBuffer wrap= ByteBuffer.wrap(ACK);\n\n short opcode = wrap.getShort(), //parse opcode\n blockNumber = wrap.getShort(); //parse block number\n\n if(opcode == OP_ACK) {\n return blockNumber;\n }\n else if (opcode == OP_ERR)\n {\n throw new InterruptedException(\"ERROR-MESSAGE RECEIVED FROM CLIENT, CLOSING CONNECTION.\");\n }\n else\n {\n throw new InvalidDataException(\"RECEIVED PACKET NOT OF TYPE ACK\");\n }\n\n }\n catch (SocketTimeoutException e) {\n throw new SocketTimeoutException(\"NO ACK RECEIVED WITHIN REASONABLE TIME\");\n }\n catch (IOException e) {\n throw new IOException(\"CONNECTION PROBLEM\");\n }\n\n }", "public int getTotalNumOfMsg(){ return allmessage.size();}", "public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }", "public messages.Ackinterface.AckInterfaceOrBuilder getAckOrBuilder() {\n if (ackBuilder_ != null) {\n return ackBuilder_.getMessageOrBuilder();\n } else {\n return ack_;\n }\n }", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n//\t\t\t\t\tSystem.out.println(TO_Bit_old);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\n\t\t\t\t\tif((TO_Bit_old!=TO_Bit)&&(AA_Bit==1)&&(AE_Bit==1)) {\t\t\t\n\t\t\t\t\t\tstate2=1;\n\t\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }", "@Override\n\t\tboolean needsAck() {\n\t\t\treturn byteChunks.length > 0; // don't retry empty ack\n\t\t}", "Message getCurrentMessage();", "public static Packet waitForACK() throws Exception {\r\n System.out.println(\"Waiting for ACK\");\r\n byte[] receiveData = new byte[Packet.maxPacketSize];\r\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\r\n serverSocket.receive(receivePacket);\r\n receiveData = receivePacket.getData();\r\n \r\n Packet ACKvector = new Packet(receiveData);\r\n \r\n return ACKvector;\r\n }", "private void sendAcknoledmentOfReceipt() {\n\t\ttry {\n\t\t\tthis.receiver.sendLetter(new AcknowledgmentOfReceipt(this.receiver, this.sender, this.getDescription()));\n\t\t} catch (NoSuchMoneyException e) {}\n\t}", "private void sendPendingData() {\n assert(sendNextNumber >= sendUnackNumber);\n\n // Calculate congestion window difference\n long lastUnackNumber = sendUnackNumber + (long) Math.min(congestionWindow, MAX_WINDOW_SIZE);\n long difference = lastUnackNumber - sendNextNumber; // Available window\n\n // Send packets until either the congestion window is full\n // or there is no longer any flow to send\n long amountToSendByte = getFlowSizeByte(sendNextNumber);\n while (difference >= amountToSendByte && amountToSendByte > 0) {\n\n // If it has not yet been confirmed,actually send out the packet\n if (!acknowledgedSegStartSeqNumbers.contains(sendNextNumber)) {\n sendOutDataPacket(sendNextNumber, amountToSendByte);\n\n // If it has already been confirmed by selective acknowledgments, just move along\n } else {\n sendNextNumber += amountToSendByte;\n }\n\n // Determine next amount to send\n difference -= amountToSendByte;\n amountToSendByte = getFlowSizeByte(sendNextNumber);\n\n }\n\n }", "void beforeAckMessage(Message message, MutationBatch mb);", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "@Override\n public void run() {\n\n CongestionWindow cw;\n\n // checking if we have the destination in our outgping connections list\n if (tcp.getOutGoingConnections().containsKey(ack.source.getAddress())){\n\n // Get the congestion window details for the given connection\n cw = tcp.getOutGoingConnections().get(ack.getSource().getAddress());\n\n // make sure you are the only one editing the congestion window\n // There can be many ACK handlers working at the same time\n synchronized (cw){\n\n // check no of dupAckCounts\n if(ack.getDupAckCount() == 0){\n\n // if no of dupAck counts are 0 then we may be in slow start mode or just came out of fast recovery mode\n if(cw.getFlowControlStatus().matches(\"fastrecovery\")){\n\n // drop the ssthresh to CWND/2\n cw.setSsthresh(Math.max(2,(int)cw.getCwndSize()/2));\n\n // drop the cwnd to CWND/2\n cw.setCwndSize(cw.getCwndSize()/2);\n\n // update the status to slow start again\n // will change it to congestionAvoidance after wards\n cw.setFlowControlStatus(\"slowstart\");\n\n // get the first packet which has not yet received the ACK\n Packet topPakcet = (Packet)cw.getCwndInPackets().get(0);\n\n // move the window depending on the current ACK id and Top Packet sequence number difference\n cw.moveWindow(ack.getAckID() - topPakcet.getSequenceNumber());\n\n }\n\n // increase cwnd depending on number of ACKS received\n cw.increaseCWNDsize();\n\n // decide what the status should be depending on cwnd size\n // I think this part can be removed :)\n if(cw.getCwndSize() >= cw.getSsthresh() &&\n !cw.getFlowControlStatus().matches(\"fastrecovery\")){\n cw.setFlowControlStatus(\"congestionAvoidance\");\n }else{\n cw.setFlowControlStatus(\"slowstart\");\n }\n\n }else{\n // If dupAck counts are less than 3 and greater than 0 then do nothing\n if(ack.getDupAckCount() < 3){\n // do nothing\n\n }else if(ack.getDupAckCount() == 3){\n // enter fast recovery\n cw.setFlowControlStatus(\"fastrecovery\");\n\n // ssthresh = cwnd / 2\n cw.setSsthresh((int)cw.getCwndSize()/2);\n\n // CWND = CWND+3\n cw.setCwndSize(cw.getCwndSize()/2 + 3);\n\n // retransmit the packet\n cw.retransmitPacket(ack.getAckID());\n\n }else{\n\n // we are already in fast recovery mode and just increase the window size for each dupACK > 3\n cw.increaseCWNDsize();\n }\n }\n\n // Update the ACK status of the Packet with \"sequence ID = ACK ID - 1\"\n cw.updateAckStatus(ack.getAckID() - 1, true);\n\n // slide the window -> remove ACKed packets and add new packets in the available space\n cw.slideWindow();\n\n // update cwnd contents\n cw.updateCongestionWindow();\n\n }\n\n }else{\n // We have recieved ACK from a connection which is not currently in our outgoing connection list\n }\n\n }", "@Override\r\n public void handleMessage(Message msg) {\n }", "protected void reply_ok() throws java.io.IOException {\n byte[] ok = PushCacheProtocol.instance().okPacket();\n _socket.getOutputStream().write(ok, 0, ok.length);\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "private void postMessages() {\n List<models.MessageProbe> probes = new Model.Finder(String.class, models.MessageProbe.class).where().ne(\"curr_status\", 1).findList();\n for (models.MessageProbe currProbe : probes) {\n if ((currProbe.curr_status == models.MessageProbe.STATUS.WITH_ERROR) || (currProbe.curr_status == models.MessageProbe.STATUS.NEW)) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToPost());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.POSTED;\n currProbe.curr_error = null;\n postCounter++;\n }\n currProbe.update();\n }\n }\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.DELETED) {\n currProbe.delete();\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.EDITED) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToModify());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.WAIT_CONFIRM;\n currProbe.curr_error = null;\n editCounter++;\n }\n currProbe.update();\n }\n }\n }\n }\n }", "abstract public SentinelHttpMessageAtk getLastAttackMessage();", "public void clearReceived() {\n\t\t_received = false;\n\t}", "private void handleAcknowledgment(FullExtTcpPacket packet) {\n\n // Invariant: receiver can *only* receive a duplicate third handshake acknowledgment\n long ack = packet.getAcknowledgementNumber();\n if (this.isReceiver()) {\n assert(ack == sendNextNumber && sendNextNumber == sendUnackNumber && packet.getDataSizeByte() == 0 && !packet.isSYN());\n return;\n }\n\n // Flowlet recording\n if (packet.getEchoFlowletId() < currentFlowlet) {\n SimulationLogger.increaseStatisticCounter(\"TCP_FLOWLET_OUT_OF_ORDER\");\n } else {\n currentFlowlet = packet.getEchoFlowletId();\n tcpLogger.logMaxFlowlet(currentFlowlet);\n }\n\n // If all flow is confirmed, we do not handle any more acknowledgments as sender\n if (isAllFlowConfirmed()) {\n return;\n }\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Round-trip time estimation; follows RFC 6298\n double RAcc = (Simulator.getCurrentTime() - packet.getEchoDepartureTime());\n if (firstRttMeasurement) {\n smoothRoundTripTime = RAcc;\n roundTripTimeVariation = smoothRoundTripTime / 2;\n firstRttMeasurement = false;\n } else {\n roundTripTimeVariation = 0.75 * roundTripTimeVariation + 0.25 * Math.abs(smoothRoundTripTime - RAcc);\n smoothRoundTripTime = 0.875 * smoothRoundTripTime + 0.125 * RAcc;\n }\n roundTripTimeout = (long) Math.max(MINIMUM_ROUND_TRIP_TIMEOUT, (2 * smoothRoundTripTime + 4 * roundTripTimeVariation));\n\n int newPacketsAcked = 0;\n\n // FLOW ACKNOWLEDGMENT: SELECTIVE ACKNOWLEDGMENT RANGES\n Set<Long> outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers);\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n\n // Check if an outstanding segment falls within the selective acknowledgment ranges\n for (AckRange r : packet.getSelectiveAck()) {\n if (r.isWithin(segSeq, segAck)) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n }\n\n // FLOW ACKNOWLEDGMENT: CUMULATIVE ACKNOWLEDGMENT\n outstandingSegmentSeqs = new HashSet<>(sentOutUnacknowledgedSegStartSeqNumbers); // Set<Long>\n for (Long segSeq : outstandingSegmentSeqs) {\n long size = getFlowSizeByte(segSeq);\n long segAck = segSeq + size;\n if (segAck <= ack) {\n confirmSegment(segSeq);\n newPacketsAcked++;\n }\n }\n\n // MOVE WINDOW AS FAR AS POSSIBLE\n // Continue on with the other packets that have also have been\n // received already\n long acknowledgedBytes = 0;\n while (acknowledgedSegStartSeqNumbers.contains(sendUnackNumber)) {\n acknowledgedSegStartSeqNumbers.remove(sendUnackNumber);\n\n // Retrieve size of the already out-of-order (selectively) acknowledged packet\n long size = getFlowSizeByte(sendUnackNumber);\n\n // A packet's data is thus acknowledged\n this.confirmFlow(size);\n\n // Consume the window further\n sendUnackNumber += size;\n acknowledgedBytes += size;\n\n }\n\n // The window that we want to send can't start at already acknowledged numbers\n sendNextNumber = Math.max(sendNextNumber, sendUnackNumber);\n\n // Handle the action if it is marked with ECE\n if (packet.isECE()) {\n handleECEMarkedPacket();\n }\n\n // Increment window for every packet acknowledged by this acknowledgement\n for (int i = 0; i < newPacketsAcked; i++) {\n phaseIncrementCongestionWindow();\n }\n\n // Update alpha\n updateAlpha(packet, acknowledgedBytes);\n\n // Send out as much as possible\n sendPendingData();\n\n // Log current congestion window\n tcpLogger.logCongestionWindow(this.congestionWindow);\n\n // Flow is finished if nothing is sent and everything\n // has been acknowledged\n if (sendUnackNumber == sendNextNumber) {\n assert(isAllFlowConfirmed());\n assert(sentOutUnacknowledgedSegStartSeqNumbers == null || sentOutUnacknowledgedSegStartSeqNumbers.isEmpty());\n assert(acknowledgedSegStartSeqNumbers == null || acknowledgedSegStartSeqNumbers.isEmpty());\n assert(seqNumbToResendEventMap == null || seqNumbToResendEventMap.isEmpty());\n this.sentOutUnacknowledgedSegStartSeqNumbers = null;\n this.acknowledgedSegStartSeqNumbers = null;\n this.seqNumbToResendEventMap = null;\n this.selectiveAckSet = null;\n }\n\n }", "private void receiveNack(Evt e) {\n\t\tif (!nackReceived && e.getMessage()!= currentlyOptimisticallyTransmitted) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t//\tthrow new IllegalStateException(\"A nack corresponding to a message that isn't the one in the buffer has been received. This means that something is wrong (at time \" + e.getTimeNS() + \")\");\r\n\t\t}\r\n\t\t\r\n\t\tif (currentlyOptimisticallyTransmitted == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (nackReceived == false) {\r\n\t\t\tif (lwSimExperiment.isWithTimeLine())\r\n\t\t\t\ttimeline.addJobPhase(lastPacketStart, e.getTimeNS(), currentlyOptimisticallyTransmitted.origin + \"->\" + currentlyOptimisticallyTransmitted.dest + \"\\n\" + currentlyOptimisticallyTransmitted.index + \":NACK\", Color.RED);\t\t\r\n\t\t\t// immediately resend\t\t\t\r\n\t\t\tnackReceived = true;\r\n\t\t\t// correct transmission time in the case of NACK Mode\r\n\t\t\tif (!this.ACKMode)\r\n\t\t\t\tlwSimExperiment.reportTransTime(index, e.getTimeNS() - lastPacketStart - packetDuration, currentlyOptimisticallyTransmitted);\r\n\t\t\t\r\n\t\t\tSpinetMessage dupl = currentlyOptimisticallyTransmitted.getCopy();\r\n\t\t\tgetQueue(dupl.dest).remove(currentlyOptimisticallyTransmitted);\r\n\t\t\tgetQueue(dupl.dest).addFirst(dupl);\r\n\t\t\tmainQueue.addFirst(dupl);\r\n\t\t\tdefineSpinetMessage(dupl);\r\n\t\t\tlwSimExperiment.packetRetransmitted(dupl);\r\n\t\t\tcurrentlyOptimisticallyTransmitted = null;\r\n\t\t}\t\t\r\n\t}", "private void clearMsg() {\n msg_ = emptyProtobufList();\n }", "private void clearMsg() {\n msg_ = emptyProtobufList();\n }" ]
[ "0.6648938", "0.65812457", "0.65395796", "0.6427859", "0.6418449", "0.63957745", "0.6314399", "0.6273459", "0.62547094", "0.62293124", "0.60938966", "0.60210514", "0.6000788", "0.5987714", "0.59577024", "0.59272", "0.59255296", "0.59061116", "0.58940035", "0.58719534", "0.58705693", "0.58487386", "0.58356667", "0.5807626", "0.57905084", "0.5761056", "0.5747649", "0.57242906", "0.5717191", "0.56975627", "0.56863856", "0.5681115", "0.56801033", "0.5679809", "0.5677179", "0.56705785", "0.5645943", "0.56443644", "0.56358993", "0.5628958", "0.56212294", "0.5610241", "0.56074566", "0.56070477", "0.5602007", "0.5600402", "0.55954283", "0.558283", "0.5580782", "0.5580145", "0.5575917", "0.5572578", "0.55649537", "0.5563815", "0.556241", "0.55610585", "0.5554746", "0.55475754", "0.55459005", "0.554056", "0.55400974", "0.55382854", "0.5530199", "0.5519293", "0.5517936", "0.55175644", "0.5512695", "0.54996675", "0.54981035", "0.5498063", "0.5494603", "0.5489438", "0.5485071", "0.54762006", "0.5475767", "0.5475098", "0.5468426", "0.5459534", "0.54593176", "0.5456509", "0.5456001", "0.5454668", "0.54504883", "0.54436755", "0.5440147", "0.5439062", "0.54353374", "0.5432299", "0.5432299", "0.5421445", "0.5416634", "0.54162204", "0.5415597", "0.5415597", "0.5412964", "0.5407672", "0.5407641", "0.54021156", "0.5395405", "0.5390957", "0.5390957" ]
0.0
-1
System.out.print("patintInfo="+ patintInfo+"\t\t\t"); System.out.print("doctorInfo="+ doctorInfo+"\t\t\t");
@Override public String toString() { System.out.print("the Reserve id:"+getId()+"\t\t\t"); System.out.print("the Reserve Date :"+getReservrDate()+"\t\t"); System.out.print("the Reserve Price:"+getPrice()+"\t\t\n\n"); System.out.println("*******************************NEW RESERVATION*********************************\n"); return null; // return "" + patintInfo + ", doctorInfo=" + doctorInfo + ", id=" + id + ", reserveDate=" + reserveDate + ", price=" + price + '}'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\n\tSystem.out.println(\"student id is \"+studentid+\"\\t\"+\"student name is \"+studentName+\"\\t\"+\"marks is \"+marks);\r\n}", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "void show() {\r\n System.out.println(\"regno:\"+regno + \"\\n name\"+ name + \"\\n marks :\" + m1+\",\"+m2+\",\"+m3);\r\n }", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s %10s %10s %10s %10s %10s %10s %10s\\n\", \n\t\t\t\t\"N\", \"lambda\", \"success\", \"failed\", \"total\", \"avg\", \"max\", \"number\", \"avg\", \"max\");\n\t}", "public void printOutput(String [] temp){\n\t\tSystem.out.print(\"\\n\");\n\t\tSystem.out.print(\"LEXEME\\t\\t\\t\\t\\t TOKEN\\n\");\n\t\tString formatline = \"%-40s %-40s %n\";\n\t for(int i = 0; i < temp.length;i++){\n\t System.out.format(formatline, stringCheck[i], temp[i]);\n\t }\n\t \n\t}", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "public static void tstatSheet(){\n\t\tSystem.out.println(\"\\tStats\");\n\t\tSystem.out.println(\"--------------------------\");\n\t\tSystem.out.println(\"Strength - \" + tstr + \"\\tMagic Power - \" + tmag);\n\t\tSystem.out.println(\"Luck - \" + tluc + \" \\tAccuaracy - \" + tacc);\n\t\tSystem.out.println(\"Defense - \" + tdef + \" \\tSpeed - \" + tspe);\n\t\tSystem.out.println(\"Health - \" + tHP + \" \\tMystic Energy - \" + tMP);\n\t}", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public void printt() {\n for (int i=0 ; i<number ; i++) {\n System.out.println(\"LAB\" + (i+1) + \" ON \" + labs[i].getDay() + \" TEACHING BY: \" + labs[i].getTeacher());\n for (int j=0 ; j<labs[i].getCurrentSize() ; j++) {\n System.out.println(labs[i].getStudents()[j].getFirstName() + \" \" + labs[i].getStudents()[j].getLastName() + \" \" + labs[i].getStudents()[j].getId() + \" \" +labs[i].getStudents()[j].getGrade());\n }\n System.out.println(\"THE CAPACITY OF THE LAB IS: \" + labs[i].getCapacity());\n System.out.println(\"THE AVERAGE IS : \" + labs[i].getAvg());\n System.out.println();\n }\n }", "private void printInfo() {\n System.out.println(\"\\nThis program reads the file lab4.dat and \" +\n \"inserts the elements into a linked list in non descending \"\n + \"order.\\n\" + \"The contents of the linked list are then \" +\n \"displayed to the user in column form.\\n\");\n }", "public String printFileConsultationDetail() {\n String consultationDetail = \"\";\n for (String symptom : symptoms) {\n consultationDetail += symptom + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.SYMPTOM_DELIMITER;\n for (String diagnosis : diagnoses) {\n consultationDetail += diagnosis + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.DIAGNOSIS_DELIMITER;\n for (String prescription : prescriptions) {\n consultationDetail += prescription + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.PRESCRIPTION_DELIMITER;\n return consultationDetail;\n }", "public static void printIDTable () {\n System.out.println(); \n System.out.println(\"Identifier Cross Reference Table\");\n System.out.println(\"--------------------------------\"); \n for(String key : idCRT.keySet()) {\n // if id string length is > 30,\n // replace excess characters with a '+' character\n if(key.length() > 30) {\n String temp = key.substring(0, 30);\n temp += \"+\";\n System.out.printf(\"%-30s\",temp); \n } else {\n System.out.printf(\"%-30s\",key);\n }\n // prints the line numbers, creating a new line\n // if number of line numbers exceeds 7\n int count = 0;\n for(Integer lno : idCRT.get(key)) {\n if(count == 7) {\n System.out.printf(\"\\n%30s\", \" \");\n count = 0;\n }\n System.out.printf(\"%6d\",lno);\n count++;\n }\n System.out.println();\n }\n }", "@Override\r\n\t\tpublic String toString() {\n\t\t\treturn (this.n + \"\\t\" + this.t);\r\n\t\t}", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public void print (){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(Attributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "public void dataView(String nom, String apell1, String apell2, String dni,\n String num, String inttype){\n\n System.out.println(\"Datos personales\");\n System.out.println(\"\");\n System.out.println(\"Nombre: \"+nom);\n System.out.println(\"Primer Apellido: \"+apell1);\n System.out.println(\"Segundo Apellido: \"+apell2);\n System.out.println(\"Dni: \"+dni);\n System.out.println(\"Numero de cuenta: \"+num);\n System.out.println(\"Tipo de interes: \"+inttype);\n System.out.println(\"\");\n}", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "public static void main(String[] args) {\n\tstudent stu= new student();\r\nSystem.out.println(stu.sno+\"\\t\"+stu.sname+\"\\t\"+stu.sfee+\"\\t\"+stu.sresult+\"\\t\"+stu.flag);\r\n }", "public void print(){\n System.out.println(\"(\"+a.getAbsis()+\"_a,\"+a.getOrdinat()+\"_a)\");\n System.out.println(\"(\"+b.getAbsis()+\"_b,\"+b.getOrdinat()+\"_b)\");\n System.out.println(\"(\"+c.getAbsis()+\"_b,\"+c.getOrdinat()+\"_c)\");\n }", "public void achoo(){\n for(int i = 0;i<12;i++){\n for(int j = 0;j<12;j++){\n System.out.print(\"\\t\"+(i+1)*(j+1));\n }\n System.out.print(\"\\n\");\n }\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "public static void main(String[] args) {\n\t\tPersonInfo person1 = new PersonInfo(\"Abc\", \"123456\", \"Chinese\");\r\n\t\tperson1.displayInfo();\r\n\t\t\r\n\t\tSystem.out.println(\" \");\r\n\t\t\r\n\t\tPersonInfo person2 = new PersonInfo(\"Shiyu\", \"00000000\", \"Nepalese\");\r\n\t\tperson2.displayInfo();\r\n\t\t\r\n\t\tSystem.out.println(\"Thuis is test change\");System.out.println(\"Thuis is test change\");System.out.println(\"Thuis is test change\");\r\n\t}", "@Override //indicates that this method overrides a superclass method\n public String toString(){\n\n return String.format(\"%s: %s %s%n%s : %s%n%s: %.2f%n%s: %.2f\",\"commission employee\",firstName,lastName,\n \"pan number\",panCardNumber,\"gross sales\",grossSales,\"commission rate\",commissionRate);\n }", "public static void status(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n System.out.printf(\"\\nNOMBRE:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.printf(\"\\nPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.printf(\"\\nPuntos De mana (MP):\\t\"+puntosDeMana);\n System.out.printf(\"\\nNivel: \\t\\t\\t\"+nivel);\n\tSystem.out.printf(\"\\nExperiencia:\\t\\t\"+experiencia);\n\tSystem.out.printf(\"\\nOro: \\t\\t\"+oro);\n System.out.printf(\"\\nPotion:\\t\\t\\t\"+articulo1);\n System.out.printf(\"\\nHi-Potion:\\t\\t\"+articulo2);\n System.out.printf(\"\\nM-Potion:\\t\\t\"+articulo3);\n System.out.printf(\"\\n\\tEnemigos Vencidos:\\t\");\n\tSystem.out.printf(\"\\nNombre:\\t\\t\\tNo.Derrotas\");\n System.out.printf(\"\\nDark Wolf:\\t\\t\"+enemigoVencido1);\n\tSystem.out.printf(\"\\nDragon:\\t\\t\\t\"+enemigoVencido2);\n System.out.printf(\"\\nMighty Golem:\\t\\t\"+enemigoVencido3);\t\n }", "@Override\n public String toString()\n {\n return String.format(\"%-20s\\t\\t%-30s%-30s\",number, name, party);\n}", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "public void printSchedule(){\n String\n format =\n \"%-20s%-10s%-15s%\" +\n \"-20s%-25s%-10s%\" +\n \"-15s%-15s%-15s%n\";\n\n System.out.printf(format,\n \"Водитель\", \"Номер А/М\",\"Машина\", \"Дата и время\",\n \"Задание\", \"Кол-во\",\n \"Расстояние\", \"Цена\", \"Примечание\");\n System.out.println();\n\n\n\n List<TimeTable> l = driverScheduleReaderDAO.getTimeTable();\n TimeTable tPrev =l.get(0);\n for (TimeTable t: l){\n\n if (!t.getDriverName().equals(tPrev.getDriverName())) {\n\n System.out.println(\"***\");\n tPrev = t;\n\n } else if (t!=l.get(0))t.setDriverName(\" \");\n\n\n\n\n System.out.printf(format,\n t.getDriverName(), t.getCarId(), t.getCarBrand(),\n t.getBusyTime(), t.getOrder(), t.getNumOfEl(),\n t.getDistance(), t.getPrice(), t.getNote()\n );\n\n }\n\n //int\n\n\n\n\n //вывести на экран\n //отельным классом посчитать шанс поломки и предупредить\n }", "@Override\n\tpublic void showPatientDetails() {\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"S.No Patient's name ID Mobile Age\");\n\t\tfor (int i = 1; i <= UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i - 1);\n\t\t\tSystem.out.print(\" \" + i + \" \" + jsnobj.get(\"Patient's name\") + \" \" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t+ \" \" + jsnobj.get(\"Mobile\") + \" \" + jsnobj.get(\"Age\") + \"\\n\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void set_info() {\n System.out.println(\"The name of the donor is \" + donor_name);\n System.out.println(\"The rating of the donor is \" + donor_rating); //display\n }", "public static void MostrarMatriz(){\n int IFila=0;\n System.out.println(\"Nombre\\t\\tNOta\\t\\tGano/Perdio\");\n for(IFila=0;IFila<10;IFila++)\n {\n System.out.println(StrNotas[IFila][0]+\"\\t\\t\"+StrNotas[IFila][1]+\"\\t\\t\"+StrNotas[IFila][2]);\n }\n }", "public static void p_show_info_program() {\n System.out.println(\"╔══════════════════════════════╗\");\n System.out.println(\"║ SoftCalculator V1.2 ║\");\n System.out.println(\"║ Oscar Javier Cardozo Diaz ║\");\n System.out.println(\"║ 16/04/2021 ║\");\n System.out.println(\"╚══════════════════════════════╝\");\n }", "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "private void printMyRoutingTable()\n {\n\tString str;\n\tmyGUI.println(\"My Distance table and routes\");\n str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n str = F.format(\"cost |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(myDistTable[i], 15);\n }\n myGUI.println();\n myGUI.println(str);\n str = F.format(\"route |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(route[i], 15);\n }\n myGUI.println(str);\n myGUI.println();\n myGUI.println(\"--------------------------------------------\");\n myGUI.println();\n\n }", "public static void main(String[] args) {\n String name=\"이효리\";\r\n String department=\"개발부\";\r\n String position=\"대리\";\r\n int sal=1500000;\r\n \r\n System.out.println(\"이름:\"+name);\r\n System.out.printf(\"부서:\"+department+\"\\n\");\r\n System.out.print(\"대리:\"+position+\"\\n\"+\"급여:\"+sal+\"원\");\r\n \r\n \t\t\r\n\t}", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "static void outputComparisonTable(double [][]satisfactionRate) {\n \tSystem.out.print(\"\\t\");\n \tfor (int i = 0; i < satisfactionRate[0].length; i++) {\n\t\t\tSystem.out.print(\"run \" + (i+1) + \"\\t \");\n\t\t}\n \tSystem.out.println();\n \tfor (int i = 0; i < satisfactionRate.length; i++) {\n \t\tSystem.out.print((i+1) + \" vans\\t \");\n\t\t\tfor (int j = 0; j < satisfactionRate[i].length; j++) {\n\t\t\t\tSystem.out.print(((int)satisfactionRate[i][j]) + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n }", "private void printAllStudentInDB(){\n ArrayList studentInformation = AdminManager.loadDBStudentInformation();\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"USERNAME STUDENT NAME MATRIC NUMBER GENDER NATIONALITY\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n\n for(int i=0; i<studentInformation.size();i++){\n String st = (String)studentInformation.get(i);\n StringTokenizer star = new StringTokenizer(st, \",\");\n System.out.print(String.format(\"%7s \",star.nextToken().trim()));\n String printPassword = star.nextToken().trim();\n System.out.println(String.format(\"%20s %9s %6s %s\",star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim()));\n }\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "void printInfo();", "public void torpedoInfo() {\r\n System.out.println(\"[\" + TiePilot.sep + \"]\");\r\n System.out.println(\"Cannon Model: \" + ModelNumber);\r\n System.out.println(\"Max Fire Range: \" + MaxFiringRange);\r\n System.out.println(\"Torpedo Cap: \" + TorpedoCapacity);\r\n System.out.println(\"Current Torpedo Count: \" + this.getCurrentTorpedoCount());\r\n System.out.println(\"[\" + TiePilot.sep + \"]\");\r\n }", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public static void main(String[] args) {\n\tString car =\"Maruti\";\r\n\tString model =\t \"Suzuki\";\r\n\t\r\n\r\n\t// primitve Datatype\r\n\tchar color ='W';\r\n\tint price =40000;\r\n\tbyte memory =120;\r\n\tfloat carsize = 20.5f;\r\n\tboolean isAutomatic =true;\r\n\tlong registerednumber =834393934934L;\r\n\t\r\n\tSystem.out.println(\"Brandname is \" + car);\r\n\tSystem.out.println(\"CarPrice is \" + price );\r\n\tSystem.out.println(\"Carmemory is \" + memory );\r\n\tSystem.out.println(\"Carsize is \" +carsize );\r\n\tSystem.out.println(\"Carregistered number is \" + price +memory +carsize +registerednumber);\r\n\tSystem.out.println(\"Cargeratype is Automatic \" + true);\r\n\r\n}", "void putdata()\n {\n System.out.printf(\"Book Title \\\"%s\\\", written by \\\"%s\\\" has %d pages and of %d rupees.\",title,writer,pages,price);\n }", "public String display(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\" +\n \"\\tTeacher(s): \" + teacherString() + \"\\n\";\n }", "public void empdetails() {\r\n\t\tSystem.out.println(\"name : \"+ name);\r\n\t}", "@Override\r\n\tpublic void Print() {\r\n\t\tSystem.out.print(this.tav+\" \");\r\n\t\t\r\n\t}", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }", "public String toString(){\r\n\t\tString output = \"\";\r\n\t\tfor(String s: this.data){\r\n\t\t\toutput = output + s + \"\\t\";\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}", "public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}", "public void test(){\n\t\tfor(int i =0; i< this.position.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tfor(int p = 0 ; p<this.position.length;p++){\n\t\t\t\tSystem.out.print(this.position[i][p]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\" \");\n\t\tfor(int i =0; i< this.position.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tfor(int p = 0 ; p<this.position.length;p++){\n\t\t\t\tSystem.out.print(this.Ari[i][p]);\n\t\t\t}\n\t\t}\n\t}", "public void displayCustomerDetails(){\n\t\tStringBuffer fullname = new StringBuffer();//Creates new string buffer\n\t\tStringBuffer fulladdress = new StringBuffer();//Creates new string buffer\n\t\tfullname.append(\"Full Name: \" + fname + \" \" + lname);\n\t\tfulladdress.append(\"Full Address: \" + address1 + \", \" + address2 + \", \" + postcode);\n\t\tSystem.out.println(fullname);\n\t\tSystem.out.println(fulladdress);\n\t\tSystem.out.println(\"Account No: \" + linkedacc);\n\t\tSystem.out.println(\"Customer Ref: \" + custref);\n\t}", "public String printInfo()\n\t{\n\t\tStringBuilder builder = new StringBuilder();\n\t\t\n\t\tbuilder.append(AppID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(updateID);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(aggregatedRating - appRatingBeforeDeployment);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(twoStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(threeStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fourStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(fiveStar);\n\t\tbuilder.append(\",\");\n\t\tbuilder.append(oneStar + twoStar + threeStar + fourStar + fiveStar);\n\t\treturn builder.toString();\n\t}", "private void printInfo() {\n for (Coordinate c1 : originCells) {\n System.out.println(\"Origin: \" + c1.toString());\n }\n for (Coordinate c2 : destCells) {\n System.out.println(\"destination: \" + c2.toString());\n }\n for (Coordinate c3 : waypointCells) {\n System.out.println(\"way point: \" + c3.toString());\n }\n }", "public void printAnc() {\n\tSystem.out.println(\"numOfControl: \" + numOfControl);\n\tfor (int ii = 0; ii < numOfControl; ii++ ) {\n\t paramFile[ii].printDevice();\n\t paramFile[ii].printUserParameters();\n\t paramFile[ii].printInstParameters();\n\t}\n }", "public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }", "public void parseAndPrintRecords() {\n ArrayList<Employee> employees;\n\n employees = parseData(data);\n\n System.out.printf(\"%10s%10s%10s\\n\", \"Last\", \"First\", \"Salary\");\n for(Employee employee : employees) {\n System.out.printf(\"%10s%10s%10d\\n\", employee.lName, employee.fName, employee.salary);\n }\n\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "private static void afftabSymb() { \r\n\t\tSystem.out.println(\" code categorie type info\");\r\n\t\tSystem.out.println(\" |--------------|--------------|-------|----\");\r\n\t\tfor (int i = 1; i <= it; i++) {\r\n\t\t\tif (i == bc) {\r\n\t\t\t\tSystem.out.print(\"bc=\");\r\n\t\t\t\tEcriture.ecrireInt(i, 3);\r\n\t\t\t} else if (i == it) {\r\n\t\t\t\tSystem.out.print(\"it=\");\r\n\t\t\t\tEcriture.ecrireInt(i, 3);\r\n\t\t\t} else\r\n\t\t\t\tEcriture.ecrireInt(i, 6);\r\n\t\t\tif (tabSymb[i] == null)\r\n\t\t\t\tSystem.out.println(\" référence NULL\");\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" \" + tabSymb[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "private void printCodeTable() {\n System.out.println(\"\\nPrinting the code table:\");\n for(int i = 0; i < codeTable.length; i++) {\n if(codeTable[i] != null) {\n if(i == 10) {\n System.out.println(\"\\\\n \" + codeTable[i]);\n } else {\n System.out.println(((char) i) + \" \" + codeTable[i]);\n }\n }\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.ticketid+\"\\t\"+this.eatid+\"\\t\"+this.eatnum;\n\t}", "public void skrivUt(){\n System.out.println(this.fornavn + \" \" + this.etternavn + \" \" + this.adresse + \" \" + this.telefonnr + \" \" + this.alder);\n }", "private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "public void display(){\r\n System.out.println(\"_____________________valuues of__[th]__constuctor_________________________\");\r\n System.out.println(\"No_of_people = \"+NO_OF_PEOPLE);\r\n System.out.println(\"EVENT_NUBMBER = \"+EVENT_NUMBER);}", "public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }", "private void printAsTable(String command, String description){\r\n\t\tSystem.out.printf(\"%-30.30s %-60.60s%n\", command, description);\r\n\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "public static void printInfo(){\n }", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "public String toString()\n\t{\n\t\tString output = \"\";\n\t\tfor(String[] at:atMat){\n\t\t\tfor(String a:at){\n\t\t\t\toutput += a+ \" \";\n\t\t\t}\n\t\t\toutput += \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "@Override\n\tpublic String toString(){ //returns only the non 0 fields.\n\t\tStringBuilder temp = new StringBuilder(\"\");\n\t\tif(victoryPoints!=0)\n\t\t\t\t temp.append(victoryPoints + \" victory points \");\n\t\tif(militaryPoints!=0)\n\t\t\ttemp= temp.append(militaryPoints + \" military points \");\n\t\tif(faithPoints!=0)\n\t\t\ttemp= temp.append(faithPoints + \" faith points \");\n\t\tif(councilPrivileges!=0)\n\t\t\ttemp= temp.append(councilPrivileges + \" council privileges \");\n\t\treturn temp.toString(); \n\t}", "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "public void DisplayAllEmployees(){\r\n String format = \"%-20s %-20s %-9s\";\r\n System.out.println(\"\\n\");\r\n System.out.printf(format, \"|\"+\" Name \", \"|\"+\" Department \", \"|\"+\" phone number|\"+\"\\n\");\r\n System.out.println(\"----------------------------------------------------------\");\r\n for(Employee employee: listOfEmployees){\r\n System.out.format(format,\"|\"+employee.name,\"|\"+employee.departmentName,\"|\"+employee.contactNumber+\" |\"+ \"\\n\");\r\n }\r\n }", "public void printAccountInfo(){\n System.out.printf(\"%5d %-20s %8.2f\\n\",accountNum,customerName,balance);\n }", "void print() {\n\n\t\t// Print \"Sym Table\"\n\t\tSystem.out.print(\"\\nSym Table\\n\");\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tHashMap<String, Sym> M = list.get(i);\n\t\t\t// Print each HashMap in list\n\t\t\tSystem.out.print(String.format(M.toString() + \"\\n\"));\n\t\t}\n\n\t\t// Print New Line\n\t\tSystem.out.println();\n\t}", "void printMST();", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public static void printDP(){\r\n for (int i = 0; i < sequence.length(); i++) {\r\n for (int j = 0; j < sequence.length(); j++) {\r\n System.out.print(DPMatrix[i][j] + \" \");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }", "public void printTypeInfo(){\n\t\tSystem.out.println(\"This type of computer is suitable for massive usage, when it comes to portability.\");\n\t\tSystem.out.println(\"Main thing at these computers is portability and funcionality.\");\n\t\t\n\t}", "public void print ( InstanceAttributes instAttributes ){\r\n\t\tSystem.out.print(\" > Inputs (\"+numInputAttributes+\"): \");\r\n\r\n\t\tfor (int i=0; i<numInputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_INPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getInputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_INPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_INPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.print(\" > Outputs (\"+numOutputAttributes+\"): \");\r\n\t\tfor (int i=0; i<numOutputAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_OUTPUT][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getOutputAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_OUTPUT][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_OUTPUT][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\r\n\t\tSystem.out.print(\" > Undefined (\"+numUndefinedAttributes+\"): \");\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (missingValues[Instance.ATT_NONDEF][i]){\r\n\t\t\t\tSystem.out.print(\"?\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tswitch(instAttributes.getUndefinedAttribute(i).getType()){\r\n\t\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\t\tSystem.out.print(nominalValues[Instance.ATT_NONDEF][i]); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.INTEGER:\r\n\t\t\t\t\tSystem.out.print((int)realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Attribute.REAL:\r\n\t\t\t\t\tSystem.out.print(realValues[Instance.ATT_NONDEF][i]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public void printResults() {\n\t System.out.println(\"BP\\tBR\\tBF\\tWP\\tWR\\tWF\");\n\t System.out.print(NF.format(boundaryPrecision) + \"\\t\" + NF.format(boundaryRecall) + \"\\t\" + NF.format(boundaryF1()) + \"\\t\");\n\t System.out.print(NF.format(chunkPrecision) + \"\\t\" + NF.format(chunkRecall) + \"\\t\" + NF.format(chunkF1()));\n\t System.out.println();\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "@Override\n public String toString() {\n \treturn this.getUsername()+\"\\t\\t\"+this.getTel()+\"\\t\\t\"+this.getPassword()+\"\\t\"+this.getMembertypeid()+\"\\t\\t\"+this.getIntegral()+\"\\t\\t\"+this.getAddress();\n }" ]
[ "0.6632014", "0.6552749", "0.653255", "0.6344568", "0.62354416", "0.6232106", "0.62111384", "0.6152384", "0.6147346", "0.61343396", "0.6131125", "0.60178137", "0.60037017", "0.59758866", "0.597454", "0.5955032", "0.5953625", "0.59526855", "0.59480613", "0.59440607", "0.59394974", "0.59238863", "0.58964306", "0.58878577", "0.58878577", "0.5876747", "0.5875015", "0.5869764", "0.58601564", "0.5858988", "0.5851701", "0.5848666", "0.5831791", "0.5827004", "0.5818359", "0.5811937", "0.57788074", "0.57706213", "0.5756395", "0.5731377", "0.5722337", "0.5719764", "0.5703078", "0.5698896", "0.56984174", "0.5697953", "0.5694947", "0.5692688", "0.5676911", "0.56720155", "0.56686056", "0.5666544", "0.5665231", "0.56380326", "0.56377614", "0.5631059", "0.5601661", "0.56012684", "0.5601258", "0.5600902", "0.56006193", "0.55979", "0.5596915", "0.55944395", "0.55837464", "0.55828685", "0.5578624", "0.55719054", "0.5568493", "0.5567107", "0.55613285", "0.5560843", "0.55542725", "0.55525357", "0.55482566", "0.55454147", "0.55450517", "0.55432487", "0.5542333", "0.5536163", "0.55302405", "0.5528524", "0.55272794", "0.5526228", "0.55245763", "0.5522458", "0.5511654", "0.55109644", "0.5510823", "0.55093753", "0.55091155", "0.5505316", "0.5501526", "0.5489485", "0.5485146", "0.548418", "0.5481598", "0.5479904", "0.547989", "0.5471167", "0.5469844" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { try { TransactionType command; if (args.length > 0) { command = TransactionType.valueOf(args[0]); } else { command = TransactionType.User; } UserService us = new UserServiceImpl(); switch (command) { case Withdrawal: if (us.Withdrawal(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) { System.out.println("Withdrawal \n" + us.getUser(Long.valueOf(args[1])) + "\n Completed"); } else { System.out.println("Withdrawal \n" + us.getUser(Long.valueOf(args[1])) + "\n Faild"); } break; case Deposit: if (us.deposit(us.getUser(Long.valueOf(args[1])), BigDecimal.valueOf(Long.valueOf(args[2])))) { System.out.println("Deposit \n" + us.getUser(Long.valueOf(args[1])) + "\n Completed"); } else { System.out.println("Deposit \n" + us.getUser(Long.valueOf(args[1])) + "\n Faild"); } break; case Transfer: if (us.transfer(us.getUser(Long.valueOf(args[1])), us.getUser(Long.valueOf(args[2])), BigDecimal.valueOf(Long.valueOf(args[3])))) { System.out.println("Transfer \n" + "From user" + us.getUser(Long.valueOf(args[1])) + "To user" + us.getUser(Long.valueOf(args[2])) + "\n Completed"); } else { System.out.println("Transfer \n" + "From user" + us.getUser(Long.valueOf(args[1])) + "To user" + us.getUser(Long.valueOf(args[2])) + "\n Faild"); } break; case History: UserTransactionService ut = new UserTransactionServiceImpl(); System.out.println(ut.getHistory(Long.valueOf(args[1])).stream().map(item->item.toString()).collect(Collectors.joining("\n"))); break; default: User u = new User(); u.setName("Test Egy"); u.setDebit(BigDecimal.valueOf(0L)); System.out.println(us.saveUser(u)); u = new User(); u.setName("Test Ketto"); u.setDebit(BigDecimal.valueOf(0L)); System.out.println(us.saveUser(u)); u = new User(); u.setName("Test Harom"); u.setDebit(BigDecimal.valueOf(0L)); System.out.println(us.saveUser(u)); break; } } finally { MyEntityManager.closeEntyyManaggerFactroy(); } }
{ "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
Sends tasks until there is no tasks or threads left
private void delegateTasks() { logger.debug("task delegation started"); untilTasksAndThreadsAreAvailable: while (true) { Optional<Node> selectedNode; Optional<WorkerPoolTask> task = workerPool.pollTask(); if (!task.isPresent()) { while (true) { State prevState = state.get(); State nextState; if (prevState == DURING_DELEGATION) { // No more tasks and free threads appeared nextState = NO_DELEGATION; } else { //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION nextState = DURING_DELEGATION; } if (state.compareAndSet(prevState, nextState)) { logger.debug("changed from " + prevState + " to " + nextState); if (prevState == DURING_DELEGATION) { return; } else { //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION continue untilTasksAndThreadsAreAvailable; } } logger.debug("state change missed in delegateTasks when task wasn't present"); } } synchronized (nodes) { // Synchronization with HeartBeat nodes.updateAfterHeartBeat method. selectedNode = nodes.drainThreadFromNodeHavingHighestPriority(); if (!selectedNode.isPresent()) { workerPool.submitTask(task.get(), true); State nextState = AWAITING_FREE_THREADS; State prevState = state.getAndSet(nextState); logger.debug("changed from " + prevState + " to " + nextState); return; } } if (!delegateTask(selectedNode.get(), task.get())) { //If delegation failed we release the thread to keep proper number of free threads up-to-date //If HeartBeat happened between draining a thread and returning it, this operation will take no effect //as we are working on invalidated version of node. nodes.returnThread(selectedNode.get()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void submitAndWaitForAll(Iterable<Runnable> tasks);", "@Override\n\tpublic synchronized void waitAllTasks() throws ExecutionException, InterruptedException {\n\t\twaitTasks(key -> true);\n\t}", "public final void execute() {\n thread = Thread.currentThread();\n while (!queue.isEmpty()) {\n if (currentThreads.get() < maxThreads) {\n queue.remove(0).start();\n currentThreads.incrementAndGet();\n } else {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }\n while (currentThreads.get() > 0) {\n try {\n Thread.sleep(Long.MAX_VALUE);\n } catch (InterruptedException ex) {}\n }\n }", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "public void runTasks() {\n promoteBlockedTasks();\n\n final AtomicInteger counter = new AtomicInteger(0);\n\n ExecutorService runners = threadPerCpuExecutor(stderr, \"TaskQueue\");\n\n for (int i = 0; i < Runtime.getRuntime().availableProcessors(); i++) {\n runners.execute(() -> {\n while (runOneTask()) {\n // running one task at a time\n counter.getAndIncrement();\n }\n });\n }\n\n runners.shutdown();\n\n try {\n runners.awaitTermination(FOREVER, TimeUnit.SECONDS);\n\n stdout.println(String.format(\"Executed tasks: %d\", counter.get()));\n\n } catch (InterruptedException e) {\n stdout.println(\"failed task: \" + e.getMessage());\n e.printStackTrace(stderr);\n throw new AssertionError();\n }\n }", "public void awaitPendingTasksFinished() throws IgniteCheckedException {\n GridCompoundFuture pendingFut = this.pendingTaskFuture;\n\n this.pendingTaskFuture = new GridCompoundFuture();\n\n if (pendingFut != null) {\n pendingFut.markInitialized();\n\n pendingFut.get();\n }\n }", "private void initialBlockOnMoarRunners() throws InterruptedException\n {\n lock.lock();\n try\n {\n if (taskQueue.isEmpty() && runners > 1)\n {\n runners--;\n needMoreRunner.await();\n runners++;\n }\n }\n finally\n {\n lock.unlock();\n }\n }", "private void waitUntilAllThreadsAreFinished() {\n int index = 1;\n\n while (true) {\n while (index <= noThread) {\n if (carry[index] == -1) {\n index = 1;\n } else {\n index++;\n }\n }\n break;\n }\n }", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\tIterator<Future<Integer>> iter = runningThreadsList.iterator();\n\t\t\tif (iter.hasNext()) {\n\t\t\t\tFuture<Integer> future = (Future<Integer>) iter.next();\n\t\t\t\tif (future.isDone()) {\n\t\t\t\t\trunningThreadsList.remove(future);\n\t\t\t\t\t\n\t\t\t\t\tif (allocator.getInventory().isEmpty()) {\n\t\t\t\t\t\tallocator.shutdown();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread.yield();\n\t\t}\n\t\t\t\n\t\t\n\t}", "public void waitAllNodesCompleteProcessingTask() {\n // check coordinator finished task\n while (!txnCoordinator.hasNoRunningJobs()) {\n Thread.yield();\n }\n // check each participant finished task and resolve unfinished task\n for (Participant p : txnCoordinator.getParticipants()) {\n while (!((Node) p).hasNoRunningJobs()) {\n Thread.yield();\n }\n p.resolveUnfinishedTask();\n }\n }", "public void run() {\n\t\tfor (ConConsumer consumer : _consumers) {\n\t\t\tconsumer.register();\n\t\t}\n\t\t// commit the channels <\n\t\t// wait for the tasks finish >\n\t\t_monitor.checkFinish();\n\t\t// wait for the tasks finish <\n\t\t_threadPool.shutdown();\n\t}", "private void mainLoop() {\n while (!isShutdown()) {\n Runnable t = pollTask();\n if (t != null || (t = pollSubmission()) != null)\n t.run();\n else if (tryInactivate())\n pool.sync(this);\n }\n }", "protected abstract long waitOnQueue();", "@Override\n\tpublic void run() {\n\t\tNewDeliverTaskManager ndtm = NewDeliverTaskManager.getInstance();\n\t\tif(ndtm != null && ndtm.isNewDeliverTaskAct) {\n\t\t\tNewDeliverTaskManager.logger.error(\"[旧的任务库删除线程启动成功][\" + this.getName() + \"]\");\n\t\t\twhile(isStart) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tint count2 = 0;\n\t\t\t\tif(needRemoveList != null && needRemoveList.size() > 0) {\n\t\t\t\t\tList<DeliverTask> rmovedList = new ArrayList<DeliverTask>();\n\t\t\t\t\tfor(DeliverTask dt : needRemoveList) {\n\t\t\t\t\t\tDeliverTaskManager.getInstance().notifyDeleteFromCache(dt);\n\t\t\t\t\t\trmovedList.add(dt);\n\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\tif(count1 >= 300) {\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\tsynchronized (this.needRemoveList) {\n\t\t\t\t\t\tfor(DeliverTask dt : rmovedList) {\n\t\t\t\t\t\t\tneedRemoveList.remove(dt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(heartBeatTime);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错1:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(teRemoveList != null && teRemoveList.size() > 0) {\n\t\t\t\t\tList<TaskEntity> teRemovedList = new ArrayList<TaskEntity>();\n\t\t\t\t\tfor(TaskEntity te : teRemoveList) {\n\t\t\t\t\t\tTaskEntityManager.getInstance().notifyDeleteFromCache(te);\n\t\t\t\t\t\tteRemovedList.add(te);\n\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\tif(count2 >= 100) {\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\tsynchronized (this.teRemoveList) {\n\t\t\t\t\t\tfor(TaskEntity te : teRemovedList) {\n\t\t\t\t\t\t\tteRemoveList.remove(te);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(30000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错2:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tTransitRobberyManager.logger.error(\"[旧的任务库删除线程关闭][\" + this.getName() + \"]\");\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tTask t = bq.take();\n\n\t\t\t\t\n\t\t\t\tThread.sleep(t.getProcessTime() * 1000);\n\t\t\t\twaitingTime.addAndGet((-1) * t.getProcessTime());\n\t\t\t\tSimulator.getFrame().displayData(\"Client \"+t.getNr()+\" left. \\n\");\n\t\t\t\tsize--;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void executWaiting() {\n for (Runnable action : this.todo) {\n runAction( action );\n }\n }", "public void doAllTasks() throws Exception {\n final GenericInitializer<E,T> initializer = config.getInitializer();\n final TaskFactory<E,T,GenericInitializer<E,T>> initTaskFac = config.getInitFactory();\n final ObjectCache<GenericInitializer<E,T>> initCache = new ObjectCache<>(2*threads,initializer);\n \n final long sT = System.currentTimeMillis();\n List<Task<T>> initTasks = comm.getInitialTasks(maxTasks,myID);\n final long mT = System.currentTimeMillis();\n initFetchTimeMS += mT-sT;\n initChunksGotten++;\n \n do{\n noInits = initTasks.size();\n if(noInits == 0){\n // nothing to be done, kinda weird.\n System.out.println(\"WARNING: No tasks gotten for threading backend \" + myID + \" continuing but wondering...\");\n break;\n }\n // kind of subptimal but we need to get the ID offset\n currIDStart = (int) initTasks.get(0).getDummyAnswer(myID).getResult().getID();\n \n if(DEBUG){System.out.println(\"DEBUG: Starting with ID \" + currIDStart + \" we have \" + initTasks.size() + \" tasks to init.\");}\n\n final long tOff = System.currentTimeMillis();\n doXXX(threads, initTaskFac, initCache, initTasks);\n final long tMid = System.currentTimeMillis();\n initWorkTimeMS += (tMid-tOff);\n \n final boolean doneYet = synchronizePools(true);\n if(!doneYet){\n initTasks = comm.getInitialTasks(maxTasks,myID);\n initChunksGotten++;\n } else {\n initTasks.clear(); // not strictly necessary, I think\n }\n final long tEnd = System.currentTimeMillis();\n initFetchTimeMS += (tEnd-tMid);\n \n } while(!initTasks.isEmpty());\n \n // merge pools, technically this should have happened before already. However, this does not hurt and synchronizes even further.\n synchronizePools(false);\n \n ISINIT = false;\n \n // then do globopt tasks (setup task factory and cachers)\n final GenericGlobalOptimization<E,T> globopt = config.getGlobalOptimization();\n final ObjectCache<GenericGlobalOptimization<E,T>> globCache = new ObjectCache<>(2*threads,globopt);\n TaskFactory<E,T,GenericGlobalOptimization<E,T>> globTasks = new GlobTaskFactory<>();\n\n while(!comm.isEverythingDone()){\n \n final long tOff = System.currentTimeMillis();\n doXXX(threads, globTasks, globCache, (int) currIDStart, (int) tasksGotten);\n final long tMid = System.currentTimeMillis();\n optWorkTimeMS += (tMid-tOff);\n \n final boolean done = synchronizePools(false);\n final long tEnd = System.currentTimeMillis();\n optFetchTimeMS += (tEnd-tMid);\n \n if(done) {break;}\n }\n }", "private void run() {\n log.log(Level.INFO, \"Starting multiple evaluation of {0} tasks\", tasks.size());\n boolean done = tasks.isEmpty();\n while (!done) {\n boolean hasFreeTasks = true;\n while (hasCapacity() && hasFreeTasks) {\n File task = getFreeTask();\n if (task == null) {\n hasFreeTasks = false;\n } else {\n EvaluatorHandle handle = new EvaluatorHandle();\n if (handle.createEvaluator(task, log, isResume)) {\n log.fine(\"Created new evaluation handler\");\n evaluations.add(handle);\n }\n }\n }\n\n log.log(Level.INFO, \"Tasks in progress: {0}, Unfinished tasks: {1}\", new Object[]{evaluations.size(), tasks.size()});\n try {\n Thread.sleep(5000);\n } catch (InterruptedException ex) {\n //Bla bla\n }\n checkRunningEvaluations();\n done = tasks.isEmpty();\n }\n\n }", "public void run (){\n String currThrdId = new String (\"\");\n try {\n stats.getAndAdd(ConcurrentTest.cb.getNumberWaiting());\n currThrdId = new Long(Thread.currentThread().getId()).toString(); \n tArray.add(currThrdId);\n ConcurrentTest.cb.await(); \n } catch (InterruptedException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 1!\");\n ConcurrentTest.failed = true;\n } catch (BrokenBarrierException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 1!\");\n ConcurrentTest.failed = true;\n }\n \n if (ConcurrentTest.cb.isBroken()){\n ConcurrentTest.log.add(\"Failed to wait all starting threads!\");\n ConcurrentTest.failed = true;\n }\n \n // The task for thread: try to find its name for 100 exchange operations\n int counter = rm.nextInt(300)+100;\n try {\n Thread.sleep(rm.nextInt(100)+1);\n } catch (InterruptedException e1) {\n ConcurrentTest.failed = true;\n }\n String thrdId = tArray.remove(0); \n while (counter > 0){\n if (thrdId == currThrdId){\n break;\n }\n try {\n thrdId = exch.exchange(thrdId, rm.nextInt(100)+1, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n ConcurrentTest.failed = true;\n } catch (TimeoutException e) {\n // Expected\n }\n counter--;\n }\n //System.out.println(counter);\n\n try {\n stats.getAndAdd(ConcurrentTest.cb.getNumberWaiting());\n ConcurrentTest.cb.await();\n } catch (InterruptedException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 1!\");\n ConcurrentTest.failed = true;\n } catch (BrokenBarrierException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 1!\");\n ConcurrentTest.failed = true;\n }\n\n // Stage 2: test PriorityBlockingQueue \n //devide threads to sending and receiving\n // to thread: Who are you - sender or receiver?\n counter = rm.nextInt(100);\n int threadChoice = rm.nextInt(2);\n if (threadChoice == 0){\n while (counter > 0){\n //emit into queue\n String toQue = \"Que_\" + new Long(Thread.currentThread().getId()).toString() + \"_\" + rm.nextInt(100);\n if (counter == 50){\n // process one exception\n toQue = null;\n }\n try{\n bQue.put(toQue);\n }catch(NullPointerException e){\n // Expected\n }\n counter--;\n //System.out.println(\"Emmited \" + counter);\n }\n } else{\n while (counter > 0){\n //read from queue\n try {\n bQue.poll(rm.nextInt(100)+1, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n ConcurrentTest.failed = true;\n }\n counter--;\n //System.out.println(\"Read \" + counter);\n }\n }\n \n try {\n stats.getAndAdd(ConcurrentTest.cb.getNumberWaiting());\n ConcurrentTest.cb.await();\n } catch (InterruptedException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 2!\");\n ConcurrentTest.failed = true;\n } catch (BrokenBarrierException e) {\n ConcurrentTest.log.add(\"Failed to wait all starting threads, stage 2!\");\n ConcurrentTest.failed = true;\n }\n\n // Stage 3: test Semaphore \n // limit Semathor with 1/3 of number of threads\n // replaced doing something with rundomized time thread sleep\n // sm is located in ConcurrentTest bacause we need to initialize it\n // with 1/3 number of threads\n counter = 1000;\n while (counter > 0){\n try {\n stats.getAndAdd(ConcurrentTest.sm.availablePermits());\n ConcurrentTest.sm.acquire();\n //System.out.println(\"in\");\n } catch (InterruptedException e) {\n ConcurrentTest.log.add(\"Some thread is interrupted, stage 3!\");\n ConcurrentTest.failed = true;\n }\n \n try {\n Thread.currentThread().sleep(rm.nextInt(5)+1);\n } catch (InterruptedException e) {\n ConcurrentTest.log.add(\"Some thread is interrupted, stage 3!\");\n //ConcurrentTest.failed = true;\n }\n \n stats.getAndAdd(ConcurrentTest.sm.getQueueLength());\n ConcurrentTest.sm.release();\n //System.out.println(\"out\");\n counter--; \n }\n\n // final actions\n if (ConcurrentTest.cb.isBroken()){\n ConcurrentTest.log.add(\"Failed to wait all starting threads, final!\");\n ConcurrentTest.failed = true;\n }\n \n ConcurrentTest.cb.reset();\n }", "private static void await_execution(Thread[] threads) {\n for (Thread t: threads)\n {\n if (t.isAlive()) {\n try {\n t.join();\n }\n catch (InterruptedException ie) { \n ie.printStackTrace();\n }\n }\n }\n }", "private void mainLoop() {\n while (!isShutdown()) {\n ForkJoinTask<?> t = pollTask();\n if (t != null || (t = pollSubmission()) != null)\n t.quietlyExec();\n else if (tryInactivate())\n pool.sync(this);\n }\n }", "private void waitForFree() throws InterruptedException {\n // Still full?\n while (isFull()) {\n // Park me 'till something is removed.\n block.await();\n }\n }", "public synchronized void waitingToThraeds()\n\t{\n\t\twhile (countOfThreads<numberOfThreads)\n\t\t\n\t\ttry \n\t\t{\n\t\t\twait();\n\t\t}\n\t\tcatch(InterruptedException e)\n\t\t{\n\t\t\tSystem.out.println(\"Interrupted while waiting\");\n\t\t}\n\t \t\n\t\t\n \t\n\t}", "private void sendQueuedNotifications() {\n Notification n;\n while ((n = pendingNotifs.poll()) != null) {\n broadcaster.sendNotification(n);\n }\n }", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "private void awaitItems() throws IgniteInterruptedCheckedException {\n U.await(takeLatch);\n }", "@Override\n\t\tpublic void run() {\n\t\t\twhile (true) {\n\n\t\t\t\ttry {\n\t\t\t\t\tfor (Message message : pending) {\n\t\t\t\t\t\tif (canLCBdeliver(message)) {\n\t\t\t\t\t\t\tfifoBC.canDeliver(message);\n\t\t\t\t\t\t\tp.Pendinglock.lock();\n\t\t\t\t\t\t\tpending.remove(message);\n\t\t\t\t\t\t\tp.Pendinglock.unlock();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(100);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Failed to sleep in deliver thread.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void run() {\n\twhile (true) {\n\t synchronized(_taskQueue) {\n\t\twhile (_taskQueue.size() > 0) {\n\t\t Version v = (Version) _taskQueue.firstElement();\n\t\t _taskQueue.remove(0);\n\t\t executeRemoteTask(v);\n\t\t}\n\t }\n\t try {\n\t\tThread.sleep(_SLEEP_TIME);\n\t } catch (InterruptedException e) {\n\t\tlog(e.toString());\n\t }\n\t}\n }", "@Override\r\n public void handleMessage(Message msg) {\n mThreadPool.execute(getTask());\r\n try {\r\n mSemaphoreThreadPool.acquire();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\twhile (running) {\n\t\t\tif (debug)\n\t\t\t\tSystem.out.println(\"WORKER THREAD \" + threadID + \" Waiting for new task\");\n\n\t\t\t// get the next task from the blocking queue\n\t\t\tSelectionKey newTask = manager.nextTask();\n\n\t\t\t// if(debug)\n\t\t\t// System.out.println(\"Worker Thread \" + threadID + \" received new task\");\n\n\t\t\tif (newTask != null) {\n\t\t\t\tif (debug)\n\t\t\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \" received new task: \" + newTask.toString());\n\t\t\t\tSocketChannel channel = (SocketChannel) newTask.channel();\n\t\t\t\tByteBuffer buffer = ByteBuffer.allocate(8000);\n\t\t\t\ttry {\n\t\t\t\t\tchannel.read(buffer);\n\t\t\t\t\tbyte[] packet = buffer.array();\n\t\t\t\t\tif (debug)\n\t\t\t\t\t\tSystem.out.println(\"Worker Thread \" + threadID + \" received new message: \" + packet.toString());\n\t\t\t\t\tMessage message = Serializer.deserializeMessage(packet);\n\t\t\t\t\tif (debug)\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Worker Thread \" + threadID + \" received new message: \" + message.toString());\n\t\t\t\t\tString messageCode = message.getType();\n\t\t\t\t\tbuffer.flip();\n\t\t\t\t\tbuffer.clear();\n\t\t\t\t\tnewTask.interestOps(SelectionKey.OP_WRITE);\n\t\t\t\t\tswitch (messageCode) {\n\t\t\t\t\t/**\n\t\t\t\t\t * This switch statement should be the only thing that has to get edited from\n\t\t\t\t\t * here on out. When we want to add functionality, it should always either be\n\t\t\t\t\t * adding a new case, if a new wireform is needed, or by altering code in the\n\t\t\t\t\t * case of the message being responded to.\n\t\t\t\t\t */\n\t\t\t\t\tcase (USER_REGISTRATION): {\n\t\t\t\t\t\tUserRegistration registrationMessage = (UserRegistration) message;\n\t\t\t\t\t\tString username = registrationMessage.getUsername();\n\t\t\t\t\t\tString password = registrationMessage.getPasswordHash();\n\n\t\t\t\t\t\tboolean created = sql.addUser(new Account(username, password));\n\t\t\t\t\t\tMessage outgoing = null;\n\n\t\t\t\t\t\tif (created) {\n\t\t\t\t\t\t\toutgoing = new UserRegistrationResponse(true, \"User was created successfully\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutgoing = new UserRegistrationResponse(false,\n\t\t\t\t\t\t\t\t\t\"Most likely a duplicated username, could also be a failed SQL connection\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsend(outgoing, buffer, channel, debug);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tcase (USER_LOGON): {\n\t\t\t\t\t\tUserLogon logonMessage = (UserLogon) message;\n\n\t\t\t\t\t\tString username = logonMessage.getUsername();\n\t\t\t\t\t\tString password = logonMessage.getPasswordHash();\n\t\t\t\t\t\t// Returns true if the user is validated\n\t\t\t\t\t\tboolean loggedIn = sql.checkLogin(username, password);\n\t\t\t\t\t\tMessage outgoing = null;\n\n\t\t\t\t\t\tif (loggedIn) {\n\t\t\t\t\t\t\tAccount acc = sql.getAccount(username, password);\n\t\t\t\t\t\t\toutgoing = new UserLogonResponse(true, \"User was verified and logged in\", acc);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutgoing = new UserLogonResponse(false, \"User was not Verified.\", null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Outgoing is the reply to the client program\n\t\t\t\t\t\tsend(outgoing, buffer, channel, debug);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase (RECORDS_REQUEST): {\n\t\t\t\t\t\tRecordsRequest requestMessage = (RecordsRequest) message;\n\t\t\t\t\t\tString requestUser = requestMessage.getUsername();\n\n\t\t\t\t\t\t// done, but relies on methods that are themselves TODO\n\t\t\t\t\t\tAccount update = sql.getAccount(requestUser);\n\t\t\t\t\t\tSystem.out.println(\"ACC: \" + update.getUsername());\n\t\t\t\t\t\tList<Game> games = sql.getGames(update);\n\n\t\t\t\t\t\tfor (Game g : games) {\n\t\t\t\t\t\t\tSystem.out.println(g.toString());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsend(new RecordsRequestResponse(games, update), buffer, channel, debug);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase (CREATE_INVITATION): {\n\t\t\t\t\t\tCreateInvitation inviteMessage = (CreateInvitation) message;\n\t\t\t\t\t\tString inviter = inviteMessage.getInviter();\n\t\t\t\t\t\tString invitee = inviteMessage.getInvitee();\n\n\t\t\t\t\t\tAccount inviteeAccount = sql.getAccount(invitee);\n\t\t\t\t\t\tinviteeAccount.addInvite(new Invitation(inviter, invitee));\n\t\t\t\t\t\tsql.setAccount(inviteeAccount);\n\n\t\t\t\t\t\tsend(new CreateInvitationResponse(true, \"Invitation Sent\"), buffer, channel, debug);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase (RESPOND_TO_INVITATION): {\n\t\t\t\t\t\tRespondToInvitation respondMessage = (RespondToInvitation) message;\n\t\t\t\t\t\tInvitation acceptedInvite = respondMessage.getInvitation();\n\t\t\t\t\t\tString recipient = acceptedInvite.getRecipient();\n\t\t\t\t\t\tString sender = acceptedInvite.getSender();\n\t\t\t\t\t\tAccount updateRecipient = sql.getAccount(recipient);\n\t\t\t\t\t\tAccount updateSender = sql.getAccount(sender);\n\n\t\t\t\t\t\tif (updateRecipient.getInvites().remove(acceptedInvite)) {\n\t\t\t\t\t\t\tSystem.out.println(\"----------------------------- Removed invite from account: \" + updateRecipient.getUsername());\n\t\t\t\t\t\t\tsql.setAccount(updateRecipient);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (respondMessage.isAccept()) {\n\t\t\t\t\t\t\tPlayer attacker = new Player(updateSender, \"black\");\n\t\t\t\t\t\t\tPlayer defender = new Player(updateRecipient, \"white\");\n\n\t\t\t\t\t\t\tupdateSender.addPlayer(attacker);\n\t\t\t\t\t\t\tupdateRecipient.addPlayer(defender);\n\n\t\t\t\t\t\t\tsql.setAccount(updateSender);\n\t\t\t\t\t\t\tsql.setAccount(updateRecipient);\n\n\t\t\t\t\t\t\tGame g1 = new Game(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\").toString(), attacker,\n\t\t\t\t\t\t\t\t\tdefender);\n\t\t\t\t\t\t\tsql.addGame(sender, recipient, g1);\n\n\t\t\t\t\t\t\tsend(new RespondToInvitationResponse(true, \"Game Added to Account\"), buffer, channel,\n\t\t\t\t\t\t\t\t\tdebug);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsend(new RespondToInvitationResponse(true, \"Invited Rejected\"), buffer, channel, debug);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase (SUBMIT_MOVE): {\n\t\t\t\t\t\tSubmitMove moveMessage = (SubmitMove) message;\n\t\t\t\t\t\tGame gameUpdate = moveMessage.getGameUpdate();\n\t\t\t\t\t\tGame oldGame = sql.getGame(gameUpdate.getAttacker(), gameUpdate.getDefender());\n\n\t\t\t\t\t\tGameResult status;\n\t\t\t\t\t\tif(gameUpdate.getResult() ==GameResult.CONTINUE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgameUpdate = rules.processCaptures(oldGame, gameUpdate);\n\t\t\t\t\t\t\tstatus = rules.gameHasEnded(gameUpdate);\n\t\t\t\t\t\t\tgameUpdate.setResult(status);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tstatus = gameUpdate.getResult();\n\t\t\t\t\t\tif (status != GameResult.CONTINUE) {\n\t\t\t\t\t\t\tgameUpdate.setEndTime(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\").toString());\n\t\t\t\t\t\t\tAccount defender = gameUpdate.getDefender().getAccount();\n\t\t\t\t\t\t\tAccount attacker = gameUpdate.getAttacker().getAccount();\n\t\t\t\t\t\t\tif (status == GameResult.WHITE) {\n\t\t\t\t\t\t\t\tattacker.getStats().addLoss();\n\t\t\t\t\t\t\t\tdefender.getStats().addWin();\n\t\t\t\t\t\t\t} else if (status == GameResult.BLACK) {\n\t\t\t\t\t\t\t\tattacker.getStats().addWin();\n\t\t\t\t\t\t\t\tdefender.getStats().addLoss();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tattacker.getStats().addLoss();\n\t\t\t\t\t\t\t\tdefender.getStats().addLoss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsql.setAccount(defender);\n\t\t\t\t\t\t\tsql.setAccount(attacker);\n\t\t\t\t\t\t\tsql.deleteGame(attacker, defender);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\tgameUpdate.changeTurns();\n\t\t\t\t\t\tsql.updateGame(gameUpdate.getAttacker(), gameUpdate.getDefender(), gameUpdate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsend(new SubmitMoveResponse(true, \"Move Submitted\"), buffer, channel, debug);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbuffer.flip();\n\t\t\t\t\tbuffer.clear();\n\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tnewTask.cancel();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchannel.close();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewTask.interestOps(SelectionKey.OP_READ);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"THREAD \" + threadID + \" terminating\");\n\t}", "private void waitUntilReady() {\n\t\t\twhile (deque.isEmpty() && loadThread.isAlive()) {\n//\t\t\t\ttry {\n//\t\t\t\t\tThread.sleep(100);\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\tExceptionUtils.throwAsRuntimeException(e);\n//\t\t\t\t}\n\t\t\t}\n\t\t}", "public synchronized void waitForDone() {\n\twhile (!done) myWait();\n }", "public void await() {\n for (final Future<Void> future : futures) {\n try {\n future.get();\n } catch (final Throwable e) {\n LOGGER.error(\"Scheduled blob storage job threw an exception.\", e);\n }\n }\n futures.clear();\n }", "public void run() {\r\n PooledConnection pConn;\r\n do {\r\n while (needAddConnSize.get() > 0) {\r\n needAddConnSize.decrementAndGet();\r\n if (!waitQueue.isEmpty()) {\r\n try {\r\n if ((pConn = createPooledConn(CONNECTION_USING)) != null)\r\n recycle(pConn);\r\n } catch (Throwable e) {\r\n if (e instanceof SQLException) {\r\n transferException((SQLException) e);\r\n } else {\r\n transferException(new SQLException(e));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (needAddConnSize.get() == 0 && createConnThreadState.compareAndSet(THREAD_WORKING, THREAD_WAITING))\r\n park(this);\r\n if (createConnThreadState.get() == THREAD_DEAD) break;\r\n } while (true);\r\n }", "public void RunSync() {\n\t\tInteger numThreads = Runtime.getRuntime().availableProcessors() + 1;\n\t\tExecutorService executor = Executors.newFixedThreadPool(numThreads);\n\t\tSystem.out.println(\"Num Threads: \" + numThreads.toString());\t\n\t\t\n\t\t// Set rate limits so sync will pause and avoid errors\n\t\tRequestLimitManager.addLimit(new Limit(TimeUnit.SECONDS.toNanos(1), 100));\n\t\tRequestLimitManager.addLimit(new Limit(TimeUnit.HOURS.toNanos(1), 36000));\n\n\t\t// Initialize start time for request limits\n\t\tItemSync.initialize();\n\t\tItemSync.setMaxRecords(200000); // @todo Detect the end of valid IDs if possible\n\n\t\t// Add callable instance to list so they can be managed during execution phase\n\t\tArrayList<Callable<ItemSync>> tasks = new ArrayList<Callable<ItemSync>>();\n\t\tfor(int i = 0; i < numThreads; i++) {\n\t\t\ttasks.add(new ItemSync());\n\t\t}\n\n\n\t\t/**\n\t\t * EXECUTION STAGE: Start all sync threads, loop until all threads are finished.\n\t\t * Sleeps at end of check so we aren't hammering the CPU.\n\t\t */\n\t\ttry {\n\t\t\t// Start callables for every ItemSync instance\n\t\t\tList<Future<ItemSync>> futures = executor.invokeAll(tasks);\n\n\t\t\t// Main loop, checks state of thread (future)\n\t\t\tboolean loop = true;\n\t\t\twhile(loop) {\n\t\t\t\tloop = false;\n\t\t\t\tfor(Future<ItemSync> future : futures) {\n\t\t\t\t\tSystem.out.println(future.isDone());\n\t\t\t\t\tif(!future.isDone()) {\n\t\t\t\t\t\tloop = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Waiting...\");\n\t\t\t\tThread.sleep(TimeUnit.SECONDS.toMillis(1));\n\t\t\t}\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\n\t\t/**\n\t\t * CLEAN UP STAGE: Threads are done running, clean up\n\t\t */\n\t\tSystem.out.println(\"Shutting down threads\");\n\t\texecutor.shutdown();\n\t\twhile(!executor.isTerminated()) {\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Finished\");\n\t}", "private void awaitDone() throws IgniteInterruptedCheckedException {\n U.await(doneLatch);\n }", "public void run() {\n\t\twhile (!isShutdown()) {\n\t\t\tlong threadId = Thread.currentThread().getId(); \n\t\t\tSystem.out.println(\"Thread \" + threadId + \" is trying to dequeue from queue of size \" + taskQueue.size());\n\t\t\tRunnable task = taskQueue.dequeue();\n\t\t\ttask.run(); \n\t\t}\n\t}", "public void readTaskComplete() {\n\t\tnode.incrementNodesCompleted();\n\t\tif(node.getNodesCompleted() ==node.getCurrentMessagingNodesList().getSize()) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"going to sleep\");\n\t\t\t\tThread.sleep(1000*15);\n\t\t\t\tfor(NodeLink n : node.getCurrentMessagingNodesList().getList()) {\n\t\t\t\t\tMessage message = new PullTrafficRequest();\t\t\t\t\n\t\t\t\t\tSocket senderSocket = node.getConnections().getSocketWithName(n.ipAddress);\n\t\t\t\t\tnew TCPSender(senderSocket, message);\n\t\t\t\t}\n\t\t\t} catch (IOException e) {e.printStackTrace();\n\t\t\t} catch (InterruptedException e) {e.printStackTrace();}\n\t\t}\n\t}", "public static void iterate() {\n\t\tif( !threadQueue.isEmpty() ) {\n\t\t\temptyReported = false;\n\t\t\tLogger.debug(\"Threads in queue: \" + threadQueue.size(), true);\n\t\t\ttry {\n\t\t\t\tthreadQueue.remove(0).start();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse if( !emptyReported ) {\n\t\t\tLogger.debug(\"Thread queue empty.\", true);\n\t\t\temptyReported = true;\n\t\t}\n\t}", "public void run() {\n\t\tZMQ.Socket sender = context.socket(ZMQ.PUSH);\n\t\tsender.bind(\"tcp://*:5557\");\n\t\t\n\t\t//this lets you go to another machine to start a worker\n\t\tSystem.out.println(\"Press Enter when the workers are ready: \");\n\t\ttry {\n\t\t\tSystem.in.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Messaging sending loop\n\t\tSystem.out.println(\"Sending tasks to workers\\n\");\n\t\twhile (!Thread.interrupted()) {\n\t\t\ttry {\n\t\t\t\t// If there are jobs to be sent, send them\n\t\t\t\t// Synchronize access to workParts structure before accessing it\n\t\t\t\tsynchronized (Master.lock) {\n\t\t\t\t\tif (!workParts.isEmpty()) {\t\n\t\t\t\t\t\tfor (Computation comp : workParts.values()) {\n\t\t\t\t\t\t\t// Submit only unsubmitted jobs\n\t\t\t\t\t\t\tif (!comp.isSubmitted()) {\n\t\t\t\t\t\t\t\tfor (int i=0; i < comp.getNumOfSubmissions(); i++) {\n\t\t\t\t\t\t\t\t\tsendJob(sender, comp);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Set submitted flag\n\t\t\t\t\t\t\t\tcomp.setSubmitted(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Take a short break before reading the job list again\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void completionService() {\n ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numberOfThreadsInThePool));\n ExecutorCompletionService<String> completionService = new ExecutorCompletionService<String>(executor);\n for (final String printRequest : printRequests) {\n// ListenableFuture<String> printer = completionService.submit(new Printer(printRequest));\n completionService.submit(new Printer(printRequest));\n }\n try {\n for (int t = 0, n = printRequests.size(); t < n; t++) {\n Future<String> f = completionService.take();\n System.out.print(f.get());\n }\n } catch (InterruptedException | ExecutionException e) {\n Thread.currentThread().interrupt();\n } finally {\n// if (executor != null) {\n executor.shutdownNow();\n// }\n }\n\n }", "public void run() {\r\n while(true) { // outer loop\r\n if(first) // we already have the queue CAS acquired\r\n first=false;\r\n else {\r\n if(!queue.acquire())\r\n return;\r\n }\r\n\r\n try {\r\n Message msg_to_deliver;\r\n while((msg_to_deliver=queue.remove()) != null) { // inner loop\r\n try {\r\n up_prot.up(new Event(Event.MSG, msg_to_deliver));\r\n }\r\n catch(Throwable t) {\r\n log.error(\"couldn't deliver message \" + msg_to_deliver, t);\r\n }\r\n }\r\n }\r\n finally {\r\n queue.release();\r\n }\r\n\r\n // although ConcurrentLinkedQueue.size() iterates through the list, this is not costly,\r\n // as at this point, the queue is almost always empty, or has only a few elements\r\n if(queue.size() == 0) // prevents a concurrent add() (which returned) to leave a dangling message in the queue\r\n break;\r\n }\r\n }", "public void doIdleTasks();", "@Override\n\tpublic void run() {\n\t\tif (queue.size() > 0) {\n\t\t\tITask task = queue.poll();\n\t\t\tpool.execute(task);\n\t\t} else {\n\t\t\tqueue.setTaskRunning(false);\n\t\t}\n\t}", "public void run() {\n for (CrawlTask newTask = queue.pop(level); newTask != null; newTask = queue.pop(level))\n /*while (queue.getQueueSize(currentLevel)>0)*/ {\n//\t\t\tObject newTask = queue.pop(currentLevel);\n // Tell the message receiver what we're doing now\n mainCrawler.receiveMessage(newTask, id);\n // Process the newTask\n process(newTask);\n // If there are less threads running than it could, try\n // starting more threads\n if (tc.getMaxThreads() > tc.getRunningThreads()) {\n try {\n tc.startThreads();\n } catch (Exception e) {\n System.err.println(\"[\" + id + \"] \" + e.toString());\n }\n }\n }\n // Notify the ThreadController that we're done\n tc.finished(id);\n }", "private void tryDoingTasksInQueue() {\n var list = queue.exceptionsList;\n var t2 = new Thread(() -> {\n Retry.Operation op = (list1) -> {\n if (!list1.isEmpty()) {\n LOG.warn(\"Error in accessing queue db to do tasks, trying again..\");\n throw list1.remove(0);\n }\n doTasksInQueue();\n };\n Retry.HandleErrorIssue<QueueTask> handleError = (o, err) -> {\n };\n var r = new Retry<>(op, handleError, numOfRetries, retryDuration,\n e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));\n try {\n r.perform(list, null);\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n });\n t2.start();\n }", "public long runScheduledPendingTasks() {\n/* */ try {\n/* 597 */ return this.loop.runScheduledTasks();\n/* 598 */ } catch (Exception e) {\n/* 599 */ recordException(e);\n/* 600 */ return this.loop.nextScheduledTask();\n/* */ } \n/* */ }", "@Override\n protected void schedule() throws Exception {\n try {\n List<Slave> slaves = getSlaves();\n for (Slave slave : slaves) {\n int tc = tasksNode.getNumAssignedTasks(slave.getId());\n if (tc < 10) {\n for (int i = tc; i < 10; i++) {\n int k = counter.incrementAndGet();\n final String j = \"task-\" + k;\n Task t = new Task() {\n @Override\n public String getId() {\n return j;\n }\n\n @Override\n public byte[] getData() throws Exception {\n return new byte[0];\n }\n };\n\n tasksNode.addTask(t, slave.getId());\n if (k >= TOTAL_RECORDS){\n System.out.println(\"Stopping server [\" + getServerId() + \"]\");\n break;\n }\n }\n }\n }\n } catch (Exception e) {\n\n }\n tasksNode.watch(monitor);\n synchronized (monitor) {\n monitor.wait(PAUSE_BETWEEN_TASK_SCHEDULE);\n }\n }", "public void run ()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep (ageLimit);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tif (threads.size () > threadMinimum)\n\t\t\t\t{\n\t\t\t\t\tint theThreadCount = threads.size ();\n\t\t\t\t\tthreads.filteredRemoval (new I_QueueFilter ()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublic boolean filter (Object aPayload)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tboolean retVal = false;\n\t\t\t\t\t\t\t\tif (threadCount > threadMinimum &&\n\t\t\t\t\t\t\t\t\taPayload != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tA_MessageThread theThread = (A_MessageThread) aPayload;\n\t\t\t\t\t\t\t\t\tretVal = theThread.tryThreadShutdown (ageLimit);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn retVal;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\tif (theThreadCount != threads.size ())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotifyThreadListeners (threadCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void collectAsync() throws IOException {\n rmiAcceptor = new RMIAcceptor(rmiPort);\n socketAcceptor = new SocketAcceptor(socketPort);\n // We prepare the task to get our first Future, it will then be overwritten once we get the promised result\n currentRMITask = threadPool.submit(rmiAcceptor);\n currentSocketTask = threadPool.submit(socketAcceptor);\n\n threadPool.execute(this::scheduledTask);\n }", "@Override\n\t\tpublic void run() {\n\n\t\t\twhile (isRun) {\n\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(500);\n\n\t\t\t\t\tisRun = false;\n\t\t\t\t\thandler.sendEmptyMessage(2);\n\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void run() {\n while (true) {\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if (connectionsPool < 10) {\n NotificationService.getInstance().sendEmail(\"[email protected]\", \"BaseStation \" + id + \" is really busy\", \"We're running out of free connection on base station!\");\n } else {\n System.out.println(\"connection pool ok\");\n }\n }\n }", "private void flushOutbound0() {\n/* 454 */ runPendingTasks();\n/* */ \n/* 456 */ flush();\n/* */ }", "private void runScheduleTasks() {\r\n // To minimize the time the lock is held, make a copy of the array\r\n // with the tasks while holding the lock then release the lock and\r\n // execute the tasks\r\n List<Runnable> tasksCopy;\r\n synchronized (taskLock) {\r\n if (tasks.isEmpty()) { return; } \r\n tasksCopy = tasks;\r\n tasks = new ArrayList<Runnable>(4);\r\n }\r\n for (Runnable task : tasksCopy) {\r\n task.run();\r\n } \r\n }", "private void normalExecutorService() {\n ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numberOfThreadsInThePool));\n try {\n Set<Future<String>> printTaskFutures = new HashSet<Future<String>>();\n for (final String printRequest : printRequests) {\n// Future<String> printer = executor.submit(new Printer(printRequest));\n ListenableFuture<String> printer = executor.submit(new Printer(printRequest));\n printTaskFutures.add(printer);\n// Futures.addCallback(printer, new FutureCallback<String>() {\n// // we want this handler to run immediately after we push the big red button!\n// public void onSuccess(String explosion) {\n//// walkAwayFrom(explosion);\n// }\n//\n// public void onFailure(Throwable thrown) {\n//// battleArchNemesis(); // escaped the explosion!\n// }\n// });\n }\n for (Future<String> future : printTaskFutures) {\n System.out.print(future.get());\n\n }\n } catch (Exception e) {\n Thread.currentThread().interrupt();\n } finally {\n// if (executor != null) {\n executor.shutdownNow();\n// }\n }\n }", "public void waitForFinish() {\n for(Future future : futures){\n try {\n future.get();\n } catch (InterruptedException | ExecutionException e) {\n LOGGER.error(\"ERROR\",e);\n }\n }\n }", "Task poll();", "private void waitForBackgroupTasks() {\n this.objectStore.getAllObjectIDs();\n this.objectStore.getAllEvictableObjectIDs();\n this.objectStore.getAllMapTypeObjectIDs();\n }", "public void executeAll()\n {\n this.queue.clear();\n this.queue_set = false;\n this.resetComputation();\n while(executeNext()) {}\n }", "@Override\n\t\tpublic void run() {\n\t\t\twhile (evictionThread.get() == this) {\n\t\t\t\tStoreRequest r = null;\n\t\t\t\ttry {\n\t\t\t\t\twhile (requestsBeingSending.get() >= getMaxSenderThreads()) {\n\t\t\t\t\t\tsynchronized(this) {\n\t\t\t\t\t\t\tif (requestsBeingSending.get() >= getMaxSenderThreads()) {\n\t\t\t\t\t\t\t\tthis.waiting = true;\n\t\t\t\t\t\t\t\tthis.wait(100);\n\t\t\t\t\t\t\t\tthis.waiting = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tr = writeQueue.poll(3, TimeUnit.SECONDS);\n\t\t\t\t\t\n\t\t\t\t\tif (r == null) {\n\t\t\t\t\t\tif (writeQueue.isEmpty() && requestsBeingSending.get() == 0 && writeQueue.isEmpty()) {\n\t\t\t\t\t\t\t// Preparing this thread to stop and stating a new one should be started\n\t\t\t\t\t\t\tevictionThread.compareAndSet(this, null);\n\t\t\t\t\t\t\tif (!writeQueue.isEmpty() || requestsBeingSending.get() != 0)\n\t\t\t\t\t\t\t\tevictionThread.compareAndSet(null, this);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\t// Requests in preparation of sending are marked twice so that a \"0\" is\n\t\t\t\t\t\t// a bit less likely to be a false 0\n\t\t\t\t\t\trequestsBeingSending.incrementAndGet();\n\t\t\t\t\t\tr.send(this.sender, false);\n\t\t\t\t\t\trequestsBeingSending.decrementAndGet();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\tif (r == null) {\n\t\t\t\t\t\tlogger.log(Level.WARNING, \"Problem waiting for request out of write cache: \" + e.getMessage(), e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlogger.log(Level.SEVERE, \"Problem while sending request out of write cache ; request \" + r + \" lost: \" + e.getMessage(), e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Stopping\n\t\t\tthis.running = false;\n\t\t\tthis.sender.shutdown();\n\t\t\ttry {\n\t\t\t\tthis.sender.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlogger.log(Level.SEVERE, \"Problem while shutting down n-orm write retention cache: \" + e.getMessage(), e);\n\t\t\t}\n\t\t}", "private void safeWaitTasks(Set<Future<?>> activeTasks, CompletionService<?> completionService)\n throws IOException {\n // Wait until backup tasks are completed.\n while (activeTasks.size() > 0) {\n try {\n Future<?> resultFuture = completionService.take();\n activeTasks.remove(resultFuture);\n resultFuture.get();\n } catch (InterruptedException ie) {\n // Cancel pending tasks.\n activeTasks.forEach((future) -> future.cancel(true));\n // Continue interrupt chain.\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while waiting for backup threads.\", ie);\n } catch (ExecutionException ee) {\n // Cancel pending tasks.\n activeTasks.forEach((future) -> future.cancel(true));\n // Throw.\n Throwable cause = ee.getCause();\n if (cause instanceof IOException) {\n throw (IOException) cause;\n } else {\n throw new IOException(cause);\n }\n }\n }\n }", "public static void shutdown() {\n\t\trunning = false;\n\t\texecutor.shutdown();\n\t\tlog.info(\"### All threads shutdown requested ###\");\n\t\t\n\t\ttry {\n\t\t\tfor (int i = 0; !executor.awaitTermination(10, TimeUnit.SECONDS); i++) {\n\t\t\t\tlog.info(\"### Awaiting for pending task pool termination... ({}) ###\", i);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tlog.warn(\"### Exception awaiting for pending task pool termination: {} ###\", e.getMessage());\n\t\t}\n\t\t\n\t\tlog.info(\"### All threads have finished ###\");\n\t}", "@Override\n public void run() {\n while (isRun) {\n count--;\n handler.sendEmptyMessage(10);\n try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n }", "public void startThread() \n { \n ExecutorService taskList = \n Executors.newFixedThreadPool(2); \n for (int i = 0; i < 5; i++) \n { \n // Makes tasks available for execution. \n // At the appropriate time, calls run \n // method of runnable interface \n taskList.execute(new Counter(this, i + 1, \n \"task \" + (i + 1))); \n } \n \n // Shuts the thread that's watching to see if \n // you have added new tasks. \n taskList.shutdown(); \n }", "void waitAll();", "private synchronized void process()\n{\n boolean waiter = process_set.isEmpty();\n\n while (waiter || process_set.size() > 0) {\n try {\n\t wait(0);\n }\n catch (InterruptedException e) { }\n if (process_set.size() > 0) waiter = false;\n dumpProcesses();\n }\n}", "@Override\r\n\tpublic void run() {\n\t\twhile (true) {\r\n\t\t\tif (MatchReqPool.size() == 0) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tmatchReqDao = new MatchReqDaoImpl();\r\n\r\n\t\t\t\t\tList<MatchReq> list = matchReqDao.getAllNewReq();\r\n\r\n\t\t\t\t\tIterator<MatchReq> iterator = list.iterator();\r\n\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\t\t\tLogger.info(\"Has New Request....\");\r\n\r\n\t\t\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\t\t\tMatchReq req = iterator.next();\r\n\t\t\t\t\t\t\treq.setPoint(\"[0:0]\");\r\n\t\t\t\t\t\t\treq.setStatus(MatchStatus.START);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatchReqDao.update(list);\r\n\t\t\t\t\t\tMatchReqPool.put(list);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (MatchException em) {\r\n\t\t\t\t\tem.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tsleep(5000);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void awaitCleanUp() {\n\n // Get the first transaction awaiting clean up.\n StmTransaction firstTransAwaitingCleanUp = firstTransactionAwaitingCleanUp.get();\n\n // Link this transaction into the head of the list.\n this.nextTransactionAwaitingCleanUp.set( firstTransAwaitingCleanUp );\n\n // Spin until we do both atomically.\n while ( !firstTransactionAwaitingCleanUp.compareAndSet( firstTransAwaitingCleanUp, this ) ) {\n firstTransAwaitingCleanUp = firstTransactionAwaitingCleanUp.get();\n this.nextTransactionAwaitingCleanUp.set( firstTransAwaitingCleanUp );\n }\n\n }", "@Override\n public synchronized void run() {\n while (true) {\n int nodesInQueue = 0;\n //find nodes for jobs to run on\n Iterator<AmuseJob> iterator = queue.iterator();\n while (iterator.hasNext()) {\n AmuseJob job = iterator.next();\n\n if (job.isPending()) {\n //find nodes to run this job on. Always only a single pilot, but may contain multiple nodes per pilot.\n PilotManager target = pilots.getSuitablePilot(job);\n\n //If suitable nodes are found\n if (target != null) {\n job.start(target);\n //remove this job from the queue\n iterator.remove();\n } else {\n nodesInQueue++;\n }\n } else {\n //remove this job from the queue\n iterator.remove();\n }\n }\n\n if (nodesInQueue > 0) {\n logger.info(\"Now \" + nodesInQueue + \" waiting in queue\");\n }\n \n try {\n wait(5000);\n } catch (InterruptedException e) {\n logger.debug(\"Scheduler thread interrupted, time to quit\");\n return;\n }\n \n \n }\n }", "public void joinAll() {\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif (this.get(i).getClient() != null) {\n\t\t\t\ttry {\n\t\t\t\t\tthis.get(i).join();\n\t\t\t\t\tSystem.out.println(\"Thread \" + i + \" wurde beendet!\");\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tthis.get(i).interrupt();\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Serializable asyncPop() {//can move on to another task before it finishes.\n Serializable temp = null;\n boolean finished = false;\n while(!finished){\n if(taskQueue.isEmpty()){\n try {\n Thread.sleep(1000);//1 second\n } catch (InterruptedException ex) {\n Logger.getLogger(BasicMsgQ.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n temp = taskQueue.removeFirst();\n finished = true;\n } \n }\n return temp;\n }", "public void run() {\n\t\t\t\twhile (queue.size() > 0) {\n\t\t\t\t\tJobQueue urlList = queue.poll();\n\t\t\t\t\tdoRequests(urlList);\n\t\t\t\t}\n\t\t\t}", "@Test\n public void testPoll1() {\n \tBoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n try {\n Assert.assertNull(ecs.poll());\n Callable<String> c = new StringTask();\n ecs.submit(c);\n Thread.sleep(SHORT_DELAY_MS);\n for (;;) {\n Future<String> f = ecs.poll();\n if (f != null) {\n Assert.assertTrue(f.isDone());\n break;\n }\n }\n } catch (Exception ex) {\n unexpectedException();\n }\n }", "protected void execute() {\n super.execute ();\n \n // processTasks is ordinarily only called when tasks have accumulated\n // in the buffer and the buffer dispatch condition has been met.\n // \n // This ensures that if there are delayed tasks, they are re-examined,\n // whether there's something in the buffer or not.\n //\n // Fix for bug #13455\n\n if (!delayedTasks.isEmpty ()) {\n processTasks (new ArrayList());\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLOGGER.info(\"***************************************邮件发送服务启动******************************************************\");\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10000);\n//\t\t\t\t\t\tlog.debug(\"************************************ Email task check******************************************************\");\n\t\t\t\t\t\tEmail email = emailCollection.poll();\n\t\t\t\t\t\tif (null != email) {\n\t\t\t\t\t\t\tLOGGER.info(\"************************************ Email begin send******************************************************\");\n\t\t\t\t\t\t\trealSendMailReal(email);\n\t\t\t\t\t\t\tLOGGER.info(\"************************************ Email end send******************************************************\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tLOGGER.error(\"{}\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void startTaskTriggerCheckerThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n canRunEnqueueTaskThread.set(true);\n while(canRunEnqueueTaskThread.get()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(taskEnqueued.get() || canRunTaskThread.get()) { //do not enqueue the task if an instance of that task is already enqueued or running.\n continue;\n //log(PrioritizedReactiveTask.this.getClass().getSimpleName() + \" already in queue or is currently executing\");\n } else if(shouldTaskActivate()) {\n System.out.println(\"Thread \" + Thread.currentThread().getId() + \" enqueued task: \" + this.getClass().getSimpleName());\n taskQueue.add(PrioritizedReactiveTask.this);\n activeTasks.add(PrioritizedReactiveTask.this);\n taskEnqueued.set(true);\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }).start();\n }", "public void run() {\n Thread.currentThread().setPriority(Thread.NORM_PRIORITY);\n while( true ) {\n long currentTime = System.currentTimeMillis();\n for(H2ONode n: H2O.CLOUD._memary) {\n if (n == H2O.SELF) continue;\n for (RPC t : n.tasks()) {\n if (H2O.CLOUD.contains(t._target) ||\n // Also retry clients who do not appear to be shutdown\n (t._target._heartbeat._client && t._retry < HeartBeatThread.CLIENT_TIMEOUT)) {\n if (currentTime > (t._started + t._retry) && !t.isDone() && !t._nack) {\n if (++t._resendsCnt % 10 == 0)\n Log.warn(\"Got \" + t._resendsCnt + \" resends on task #\" + t._tasknum + \", class = \" + t._dt.getClass().getSimpleName());\n t.call();\n }\n } else { // Target is dead, nobody to retry to\n t.cancel(true);\n }\n }\n }\n long timeElapsed = System.currentTimeMillis() - currentTime;\n if(timeElapsed < 1000)\n try {Thread.sleep(1000-timeElapsed);} catch (InterruptedException e) {}\n }\n }", "@Override\n public void run() {\n try{\n for(int n = 0;n < 20; n++){\n //This simulates 1sec of busy activity\n Thread.sleep(1000);\n //now talk to the ain thread\n myHandler.post(foregroundTask);\n }\n }catch (InterruptedException e){\n e.printStackTrace();\n }\n }", "private SSLEngineResult.HandshakeStatus doTasks() {\r\n\r\n Runnable runnable;\r\n\r\n /*\r\n * We could run this in a separate thread, but do in the current for now.\r\n */\r\n while ((runnable = tlsEngine.getDelegatedTask()) != null) {\r\n runnable.run();\r\n }\r\n return tlsEngine.getHandshakeStatus();\r\n }", "public void run() {\n\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"准备。。。\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tp.await();//等待\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"已接受。。。\");\n\t\t\t\t\t\tThread.sleep((long)(Math.random()*10000));\n\t\t\t\t\t\tSystem.out.println(Thread.currentThread().getName()+\"完成。。。\");\n\t\t\t\t\t\ts.countDown();//三次后为0 释放主线程中的等待\n\t\t\t\t\t} catch (InterruptedException 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}", "private synchronized void startPendingRequests() {\n for (InvocationRequest invocationRequest : pendingRequests) {\n if (!invocationRequest.aborted) {\n ThreadUtil.execute(invocationRequest);\n }\n }\n\n pendingRequests.clear();\n }", "private static boolean basicTest() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\t// send all rquests sequentially\r\n\t\tlogger.finest(\"sending requests sequentially\");\r\n\t\tfor (URL url : urlList) { \r\n\t\t\tHttpClient client = new HttpClient(url);\r\n\t\t\texecutor.execute(client);\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.fine(\"waiting for requests to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.fine(\"all requests completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public void waitForClients() {\n\n\t\twhile (!Thread.interrupted()) {\n\t\t\tacceptClient();\n\t\t}\n\n\t}", "@Override\n\tpublic void run() {\n\t\tString result = null;\n\t\twhile (checkToStart()) {\n\t\t\tresult = doRun();\n\t\t\tsendResult(result);\n\t\t}\n\t\t// System.out.println(\"Thread - \" + name + \" is dead\");\n\t}", "public void blockOnQueuedTasks() throws InterruptedException\n {\n final ReentrantLock lock = new ReentrantLock();\n final Condition waitingCompleteCondition = lock.newCondition();\n \n //Create a runnable which will signal the condition when it is run\n Runnable waitRunnable = new Runnable()\n {\n @Override\n public void run()\n {\n lock.lock();\n try\n {\n waitingCompleteCondition.signal();\n }\n finally\n {\n lock.unlock();\n }\n }\n };\n \n //Acquire the lock, submit the runnable, and then wait for the runnable to be run by the worker thread where the\n //condition that is being waited on will be signaled\n lock.lock();\n try\n {\n this.submit(null, waitRunnable);\n waitingCompleteCondition.await();\n }\n finally\n {\n lock.unlock();\n }\n }", "@Override\r\n\tpublic void run() {\n\t\twhile(true) {\r\n\t\t\tfor(String data:queueData) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public synchronized void execute() {\n\t\tthis.timeoutFuture = SCHEDULER.schedule(this::processTimeout, 5, TimeUnit.SECONDS);\n\t\tthis.statuses.put(this.localNode.getInfo(), NodeStatus.Unasked);\n\t\tcheckFinishAndProcess();\n\t}", "public int queue() \n { return waiting; }", "void flushBlocking();", "public final void waitFor() {\r\n for (;;) {\r\n synchronized (this) {\r\n if (this.m_b)\r\n return;\r\n try {\r\n this.wait();\r\n } catch (Throwable tt) {\r\n tt.printStackTrace();\r\n }\r\n }\r\n }\r\n }", "void await() throws InterruptedException\n {\n while (streams.containsKey(context))\n Thread.sleep(10);\n }", "@Test\n void test3() {\n ThreadPoolExecutor executor = new ThreadPoolExecutor(1,1,10L, TimeUnit.SECONDS,new LinkedBlockingDeque<>(2),new ThreadPoolExecutor.DiscardPolicy());\n for (int i = 0; i < 10; i++) {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n System.out.println(Thread.currentThread().getName()+\"输出\");\n }\n });\n }\n }", "@Override\n protected void afterExecute(final Runnable r, final Throwable t) {\n mActiveTasks.remove(r);\n\n // Perform a quick check to see if there are any remaining requests in\n // the blocked queue. Peek the head and check for duplicates in the \n // active and task queues. If no duplicates exist, add the request to\n // the task queue. Repeat this until a duplicate is found\n synchronized (mBlockedTasks) {\n while(mBlockedTasks.peek()!=null && \n !mTaskQueue.contains(mBlockedTasks.peek()) && \n !mActiveTasks.contains(mBlockedTasks.peek())){\n Runnable runnable = mBlockedTasks.poll();\n if(runnable!=null){\n mThreadPool.execute(runnable);\n }\n }\n }\n super.afterExecute(r, t);\n }", "private void scheduleNext() {\n lock.lock();\n try {\n active = tasks.poll();\n if (active != null) {\n executor.execute(active);\n terminating.signalAll();\n } else {\n //As soon as a SerialExecutor is empty, we remove it from the executors map.\n if (lock.isHeldByCurrentThread() && isEmpty() && this == serialExecutorMap.get(identifier)) {\n serialExecutorMap.remove(identifier);\n terminating.signalAll();\n if (state == State.SHUTDOWN && serialExecutorMap.isEmpty()) {\n executor.shutdown();\n }\n }\n }\n } finally {\n lock.unlock();\n }\n }", "@Override\n public void run() {\n while (!bShutDown || !messageCache.isEmpty()) {\n try {\n while (!messageCache.isEmpty()) {\n HttpMessage httpMessage = messageCache.poll();\n if (httpMessage != null) {\n SendResult result = sendMessageWithHostInfo(\n httpMessage.getBodies(), httpMessage.getGroupId(),\n httpMessage.getStreamId(), httpMessage.getDt(),\n httpMessage.getTimeout(), httpMessage.getTimeUnit());\n httpMessage.getCallback().onMessageAck(result);\n }\n }\n TimeUnit.MILLISECONDS.sleep(proxyClientConfig.getAsyncWorkerInterval());\n } catch (Exception exception) {\n logger.error(\"exception caught\", exception);\n }\n }\n }", "private boolean isExhausted() {\n return runnableTasks.isEmpty()\n && runnableActions.isEmpty() && runningTasks == 0;\n }", "public void executeQueue() {\n\tLog.d(TaskExecutor.class.getName(), \"Execute \" + mQueue.size() + \" Tasks\");\n\tfor (Task task : mQueue) {\n\t if (!mTaskExecutor.getQueue().contains(task))\n\t\texecuteTask(task);\n\t}\n }", "private static void wait(List<Thread> threads, boolean backoff) throws InterruptedException {\n while(threads.stream().allMatch(Thread::isAlive)) {\n Thread.sleep(1000);\n }\n threads.clear();\n if(backoff) {\n System.out.println();\n System.out.println(\"Backing off...\");\n Thread.sleep(10000);\n }\n }", "public boolean signalAllWaiters()\n {\n int w=waiting.get();\n if (w>0) return signal(w);\n return false;\n }", "private void scheduledTask() {\n connectToNewViews();\n removeDisconnectedViews();\n try {\n Thread.sleep(SCHEDULED_TASK_PERIOD);\n // Scheduling future execution\n\n synchronized (threadPool) {\n if (!threadPool.isShutdown()) {\n threadPool.execute(this::scheduledTask);\n }\n }\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }" ]
[ "0.65899867", "0.6522766", "0.64141774", "0.63729525", "0.63349056", "0.6295911", "0.6273991", "0.6208091", "0.6192115", "0.6094065", "0.6044483", "0.5988089", "0.59783995", "0.59725857", "0.5965837", "0.5965009", "0.59272456", "0.59148437", "0.5890386", "0.5865494", "0.585454", "0.58053666", "0.5746711", "0.573818", "0.57367057", "0.57289433", "0.5722226", "0.5719828", "0.57006663", "0.5698605", "0.568484", "0.56597394", "0.5657282", "0.56367", "0.5634989", "0.5623083", "0.56122744", "0.56109583", "0.56106585", "0.5607605", "0.56009114", "0.5598583", "0.5594911", "0.558632", "0.55860937", "0.55755574", "0.5566404", "0.55663794", "0.556019", "0.5549226", "0.5535451", "0.55265236", "0.55176574", "0.5501324", "0.5481219", "0.5476615", "0.5475501", "0.5463891", "0.5459945", "0.5455701", "0.5455614", "0.5445125", "0.54391503", "0.54355943", "0.5434995", "0.5427282", "0.5421748", "0.5409529", "0.54021084", "0.5398379", "0.53918856", "0.5387952", "0.5387861", "0.5383932", "0.53838027", "0.53783184", "0.5354381", "0.53480405", "0.5340767", "0.53295875", "0.53258115", "0.5321374", "0.5319552", "0.53173476", "0.531157", "0.52836037", "0.52831334", "0.5271118", "0.5270306", "0.5268332", "0.5259024", "0.52575195", "0.5257459", "0.5255083", "0.52431285", "0.5237964", "0.52345175", "0.5228799", "0.5223688", "0.5213094" ]
0.6410014
3
Delegate single task to other node.
private boolean delegateTask(Node destinationNode, WorkerPoolTask task) { String destinationNodeId = destinationNode.getNodeId(); String taskId = task.getTaskId(); if (task.isExternal()) { ExternalTask externalTask = (ExternalTask) task; if (!externalTaskRegistry.remove(externalTask)) { logger.info("There is no entry for given " + externalTask); logger.info("Not sending any Sry or Redirect message for " + externalTask); return false; } if (externalTask.isOriginatedAt(destinationNode)) { taskService.sry(destinationNodeId, taskId); } else { taskService.redirectTask(externalTask, destinationNodeId); } } else { taskService.delegateTask(task, destinationNodeId); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void delegateTask(Long taskId, String sourceUserId, String targetUserId);", "public abstract void task();", "public Task task()\n {\n return _link.first;\n }", "@Override\r\n\tvoid execute(Runnable task);", "@Override\r\n\tpublic void doTask() {\n\t}", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}", "String addTask(Task task);", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "void addTask(Task task);", "public void notify(DelegateTask delegateTask)\n {\n }", "public abstract void execute(Task t);", "void perform(T node);", "void executeStraight(Runnable task);", "public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}", "void addDoneTask(Task task);", "TaskNode getNode(Task task);", "@Override\r\n\tpublic void subTask(String name) {\n\t}", "public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }", "public void updateTask() {}", "void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );", "public void triggerServerTask(TransferrableObject to) throws IOException {\n\t\tna.message(\"-------------------------------\");\n\t\tString ip = serverAddress.getHostAddress();\n\t\tMainWindow.mw.addConnection(UsefulMethods.getShortNameOfIP(ip), ip,\n\t\t\t\tportNumber);\n\t\tconnectToServer();\n\t\tprocessTransferrableObject(to);\n\t\tMainWindow.mw.removeConnection(ip, portNumber);\n\t}", "public void startTask() {\n\t}", "public interface TaskDelegate {\n public void taskComplete(Object object);\n}", "@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}", "@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}", "@Test\n public void testDelegateTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n Assert.assertEquals(Status.READY, t.getStatus());\n\n this.services.delegateTask(t.getId(), \"user1\", \"user2\");\n t = this.services.getTaskInfo(t.getId());\n\n Assert.assertEquals(Status.RESERVED, t.getStatus());\n Assert.assertEquals(\"user2\", t.getActualOwner().getName());\n }", "boolean addTask(Task newTask);", "private TransferTaskParent doParentStepOne(TransferTaskParent parentTask) throws ServiceException, ForbiddenException\n {\n log.debug(\"***** Starting ParentStepOne ****\");\n log.debug(parentTask.toString());\n\n // Extract some values for convenience and clarity\n String taskTenant = parentTask.getTenantId();\n String taskUser = parentTask.getUsername();\n // Keep these Integer and not int. When type int the logger puts in commas which makes it harder to search the log.\n Integer parentId = parentTask.getId();\n Integer topTaskId = parentTask.getTaskId();\n UUID parentUuid = parentTask.getUuid();\n String tag = parentTask.getTag();\n\n // Update the top level task and then the parent task\n try\n {\n // Update top level task.\n TransferTask topTask = dao.getTransferTaskByID(topTaskId);\n if (topTask.getStartTime() == null)\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_TASK_START\", taskTenant, taskUser, \"doParentStepOneA04\", topTask.getId(), parentId, parentUuid, tag));\n topTask.setStartTime(Instant.now());\n // Update status unless already in a terminal state (such as cancelled)\n if (!topTask.isTerminal()) topTask.setStatus(TransferTaskStatus.IN_PROGRESS);\n dao.updateTransferTask(topTask);\n }\n\n // If top task in terminal state then return\n if (topTask.isTerminal())\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_TOP_TASK_TERM\", taskTenant, taskUser, \"doParentStepOneA03\", topTaskId, topTask.getStatus(), parentId, parentTask.getStatus(), parentUuid, tag));\n topTask.setEndTime(Instant.now());\n dao.updateTransferTask(topTask);\n return parentTask;\n }\n\n // Update parent task\n log.trace(LibUtils.getMsg(\"FILES_TXFR_PARENT_START\", taskTenant, taskUser, \"doParentStepOneA05\", parentId, parentUuid, tag));\n parentTask.setStartTime(Instant.now());\n // Update status unless already in a terminal state (such as cancelled)\n if (!parentTask.isTerminal()) parentTask.setStatus(TransferTaskStatus.IN_PROGRESS);\n parentTask = dao.updateTransferTaskParent(parentTask);\n\n // If already in a terminal state then set end time and return\n if (parentTask.isTerminal())\n {\n log.warn(LibUtils.getMsg(\"FILES_TXFR_PARENT_TERM\", taskTenant, taskUser, \"doParentStepOneA01\", topTaskId, parentId, parentTask.getStatus(), parentUuid, tag));\n parentTask.setEndTime(Instant.now());\n parentTask.setFinalMessage(LibUtils.getMsg(\"FILES_TXFR_PARENT_END_TERM\", tag, parentTask.getStatus()));\n parentTask = dao.updateTransferTaskParent(parentTask);\n return parentTask;\n }\n }\n catch (DAOException ex)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_ERR1\", taskTenant, taskUser, \"doParentStepOneA06\",\n parentId, tag, parentUuid, ex.getMessage());\n log.error(msg, ex);\n throw new ServiceException(msg, ex);\n }\n\n // =======================================================================\n // Now for the main work of creating the child tasks and publishing them\n // =======================================================================\n // Create a ResourceRequestUser. Some library calls use this, mainly as convenient wrapper for logging identity info\n AuthenticatedUser aUser = new AuthenticatedUser(taskUser, taskTenant, TapisThreadContext.AccountType.user.name(),\n null, taskUser, taskTenant, null, null, null);\n ResourceRequestUser rUser = new ResourceRequestUser(aUser);\n\n // Process the source URI\n TransferURI srcUri = parentTask.getSourceURI();\n TransferURI dstUri = parentTask.getDestinationURI();\n TapisSystem srcSystem, dstSystem;\n IRemoteDataClient srcClient;\n String srcId = srcUri.getSystemId();\n String srcPath = srcUri.getPath();\n String dstId = dstUri.getSystemId();\n String srcSharedCtxGrantor = parentTask.getSrcSharedCtxGrantor();\n String dstSharedCtxGrantor = parentTask.getDestSharedCtxGrantor();\n String impersonationIdNull = null;\n\n try\n {\n // Handle tapis: and http/s: protocols separately\n if (srcUri.isTapisProtocol())\n {\n // Handle protocol tapis://\n // Destination must also be tapis protocol. Checked early on, but check again in case it slipped through.\n if (!dstUri.isTapisProtocol())\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_DST_NOTSUPPORTED\", srcUri, dstUri, tag);\n log.error(msg);\n throw new ServiceException(msg);\n }\n // Fetch systems, they are needed during child task creation. Also, this ensures they exist and are available\n srcSystem = LibUtils.getSystemIfEnabled(rUser, systemsCache, srcId, impersonationIdNull, srcSharedCtxGrantor);\n dstSystem = LibUtils.getSystemIfEnabled(rUser, systemsCache, dstId, impersonationIdNull, dstSharedCtxGrantor);\n boolean srcIsS3 = SystemTypeEnum.S3.equals(srcSystem.getSystemType());\n boolean srcIsGlobus = SystemTypeEnum.GLOBUS.equals(srcSystem.getSystemType());\n boolean dstIsS3 = SystemTypeEnum.S3.equals(dstSystem.getSystemType());\n\n // Establish client\n srcClient = remoteDataClientFactory.getRemoteDataClient(taskTenant, taskUser, srcSystem);\n\n // Check that src path exists. If not found it is an error.\n FileInfo fileInfo = srcClient.getFileInfo(srcPath, true);\n if (fileInfo == null)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_SRCPATH_NOTFOUND\", taskTenant, taskUser, parentId, parentUuid, srcPath, tag);\n log.error(msg);\n throw new ServiceException(msg);\n }\n\n // Get a listing of all files to be transferred\n //TODO: Retries will break this, should delete anything in the DB if it is a retry?\n List<FileInfo> fileListing;\n // NOTE Treat all source system types the same. For S3 it will be all objects matching the srcPath as a prefix.\n log.trace(LibUtils.getMsg(\"FILES_TXFR_LSR1\", taskTenant, taskUser, \"doParentStepOneA07\", parentId, parentUuid, srcId, srcPath, tag));\n fileListing = fileOpsService.lsRecursive(srcClient, srcPath, false, FileOpsService.MAX_RECURSION);\n if (fileListing == null) fileListing = Collections.emptyList();\n log.trace(LibUtils.getMsg(\"FILES_TXFR_LSR2\", taskTenant, taskUser, \"doParentStepOneA08\", parentId, parentUuid, srcId, srcPath, fileListing.size(), tag));\n\n // If no items to transfer then no child tasks, so we are done.\n // In theory this should be very unlikely since we just checked that source path exists.\n // In practice, it could happen if source path is deleted around the same time.\n // Also, in practice it has happened due to listing improperly returning an empty list.\n // If we do not handle it here we can end up with tasks stuck in the IN_PROGRESS state.\n if (fileListing.isEmpty())\n {\n parentTask.setEndTime(Instant.now());\n parentTask.setStatus(TransferTaskStatus.COMPLETED);\n parentTask.setFinalMessage(LibUtils.getMsg(\"FILES_TXFR_PARENT_COMPLETE_NO_ITEMS\", srcId, srcPath, tag));\n parentTask = dao.updateTransferTaskParent(parentTask);\n return parentTask;\n }\n\n // Create child tasks for each file or object to be transferred.\n List<TransferTaskChild> children = new ArrayList<>();\n long totalBytes = 0;\n for (FileInfo f : fileListing)\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_ADD_CHILD1\", taskTenant, taskUser, \"doParentStepOneA09\", parentId, parentUuid, f, tag));\n // If destination is of type S3 we skip directories\n if (dstIsS3 && f.isDir())\n {\n log.trace(LibUtils.getMsg(\"FILES_TXFR_SKIP_DIR\", taskTenant, taskUser, \"doParentStepOneA10\", parentId, parentUuid, srcId, srcPath, dstId, f.getPath(), tag));\n continue;\n }\n // Only include the bytes from entries that are not directories. Posix folders are --usually-- 4bytes but not always, so\n // it can make some weird totals that don't really make sense.\n if (!f.isDir()) totalBytes += f.getSize();\n TransferTaskChild child = new TransferTaskChild(parentTask, f, srcSystem);\n children.add(child);\n log.trace(LibUtils.getMsg(\"FILES_TXFR_ADD_CHILD2\", taskTenant, taskUser, \"doParentStepOneA11\", parentId, parentUuid, child, tag));\n }\n // Update parent task status and totalBytes to be transferred\n log.trace(LibUtils.getMsg(\"FILES_TXFR_PARENT_STAGE\", taskTenant, taskUser, \"doParentStepOneA12\", parentId, parentUuid, totalBytes, tag));\n parentTask.setTotalBytes(totalBytes);\n parentTask.setStatus(TransferTaskStatus.STAGED);\n parentTask = dao.updateTransferTaskParent(parentTask);\n dao.bulkInsertChildTasks(children);\n children = dao.getAllChildren(parentTask);\n transfersService.publishBulkChildMessages(children);\n }\n else\n {\n // Handle all non-tapis protocols. These are http:// and https://\n // Create a single child task and update parent task status\n TransferTaskChild task = new TransferTaskChild();\n task.setTag(tag);\n task.setSourceURI(parentTask.getSourceURI());\n task.setParentTaskId(parentId);\n task.setTaskId(topTaskId);\n task.setDestinationURI(parentTask.getDestinationURI());\n task.setStatus(TransferTaskStatus.ACCEPTED);\n task.setTenantId(parentTask.getTenantId());\n task.setUsername(parentTask.getUsername());\n task = dao.insertChildTask(task);\n transfersService.publishChildMessage(task);\n parentTask.setStatus(TransferTaskStatus.STAGED);\n parentTask = dao.updateTransferTaskParent(parentTask);\n }\n }\n catch (DAOException | TapisException | IOException e)\n {\n String msg = LibUtils.getMsg(\"FILES_TXFR_SVC_ERR1\", taskTenant, taskUser, \"doParentStepOneB\",\n parentId, tag, parentUuid, e.getMessage());\n log.error(msg, e);\n throw new ServiceException(msg, e);\n }\n return parentTask;\n }", "abstract void doTaskOnRun();", "@Override\n public void execute(final Task<T> task) {\n }", "private static void runDelegatedTasks(SSLEngineResult result,\n SSLEngine engine) throws Exception {\n\n if (result.getHandshakeStatus() == HandshakeStatus.NEED_TASK) {\n Runnable runnable;\n while ((runnable = engine.getDelegatedTask()) != null) {\n log(\"\\trunning delegated task...\");\n runnable.run();\n }\n HandshakeStatus hsStatus = engine.getHandshakeStatus();\n if (hsStatus == HandshakeStatus.NEED_TASK) {\n throw new Exception(\n \"handshake shouldn't need additional tasks\");\n }\n log(\"\\tnew HandshakeStatus: \" + hsStatus);\n }\n }", "@Override\n\tpublic void execute(DelegateExecution execution) throws Exception {\n\t\tLOG.info(\"\\n\\n\\n Start cewate task \"+\"\\n\\n\\n\");\n\n\t\t// IdentityService identityService = Context.getProcessEngineConfiguration().getIdentityService();\n\t // User user = identityService.createUserQuery().userId(assignee).singleResult();\n\t \n\t // check if the first task listener was executed\n\t List<String> assigneeList = new ArrayList<>();//InformAssigneeTaskListener.assigneeList;\n\t assigneeList.add(\"demo\");\n\t assigneeList.add(\"test\");\n\t execution.setVariable(\"assigns\", assigneeList);\n\t LOG.info(\"\\n\\n\\n Start cewate task \"+assigneeList.toString() +\"\\n\\n\\n\");\n\t //assertThat(assigneeList.size(), is(1));\n\t //assertThat(assigneeList.get(0), is(\"Kermit\"));\n\n\t execution.setVariable(\"thisOk_new\", \"123456\");\n\t // complete first user task\n\t //Task task = taskService.createTaskQuery().singleResult();\n\t //taskService.complete(task.getId());\n\n\t}", "public void subTask(String name) {\n\r\n\t}", "int createParentTask();", "public void subTask(String tr) {\n\t\t\n\t}", "public void postponeNext()\n {\n\tif (toDo.size() > 0)\n\t {\n\t\tTask t = toDo.get(0);\n\t\ttoDo.remove(0);\n\t\ttoDo.add(t);\n\t }\n }", "private static void executeTask02() {\n }", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "void add(final Task task);", "public interface SocketTask extends Task\n{\n\t/**\n\t * Method sets to object socketWrapper object to allow task to use this socket.\n\t * @param socket socket wrapper object.\n\t */\n\tpublic void setSocket(SocketWrapper socket);\n}", "private void assignWork(String worker, String task) {\n System.out.println(\"assign work and create node \" + worker + \"/task\");\n zk.setData(worker, task.getBytes(), -1,\n (rc, path, ctx, data) -> {\n System.out.println(KeeperException.Code.get(rc));\n logger.info(\"DISTMASTER: task \" + task + \" has been created\");\n }, null);\n }", "void addSubTask(AuctionTask task);", "public abstract void executeOnNetwork(@NonNull Runnable runnable);", "public JBombardierAntTask(Task owner) {\r\n bindToOwner(owner);\r\n }", "public void startExecuting() {\n this.taskOwner.setAttackTarget(this.target);\n super.startExecuting();\n }", "Task createTask();", "Task createTask();", "Task createTask();", "public void setOther( Node other ) {\n Change change;\n if ( other.isConnector() && getFlow().hasConnector() ) {\n Connector connector = (Connector) other;\n Flow need = isSend() ? connector.getInnerFlow() : getFlow();\n Flow capability = isSend() ? getFlow() : connector.getInnerFlow();\n change = doCommand( new SatisfyNeed( getUser().getUsername(), need,\n capability,\n SatisfyNeed.KEEP_CAPABILITY,\n SatisfyNeed.KEEP_NEED ) );\n } else {\n change = doCommand( new RedirectFlow( getUser().getUsername(), getFlow(), other, isSend() ) );\n }\n Flow newFlow = (Flow) change.getSubject( getQueryService() );\n if ( newFlow != null ) { // TODO Find out why this has happened...\n // requestLockOn( newFlow );\n setFlow( newFlow );\n }\n }", "public void task() {\n try {\n Socket peerSocket = listeningSocket.accept(); // waits here until something tries to connect\n if (peerSocket != null) { addPeer(peerSocket); }\n } catch (IOException e) {\n throw new RuntimeException(\"Error accepting client connection\", e);\n }\n }", "void executeTask(org.apache.ant.common.antlib.Task task) throws org.apache.ant.common.util.ExecutionException;", "public TaskReturnType Run();", "boolean setTask(UUID uuid, IAnimeTask task);", "public Task getTask(Integer tid);", "public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }", "public abstract Task markAsDone();", "protected abstract TaskNode verify();", "@Override\r\n public void nodeActivity() {\n }", "boolean updateActiveTask(Task task);", "@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}", "public void submitSyncDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncDeviceTrafficTask()...\");\n\t\taddTask(new SyncDeviceTrafficTask());\n\t}", "public void setTask(Task task) {\n this.task = task;\n }", "public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttask();\n\t\t}", "public abstract void doExecute(A a, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException;", "public interface MapTask extends Task {\n\t\n\tpublic void map(MapRunner mapRunner, String toDo);\n}", "@Override\n\tpublic boolean jumpToNeighbour(final EvolutionState state,\n\t\t\tfinal int subpopulation,\n\t\t\tfinal int currentTask,\n\t\t\tfinal int neighbourTask,\n\t\t\tfinal JasimaMultitaskIndividual ind,\n\t\t\tfinal int threadnum) {\n\t\tdouble taskFitness = ind.getTaskFitness(currentTask);\n\t\tdouble minFitness = getBestIndsPerTask()[subpopulation][currentTask].getTaskFitness(currentTask);\n\t\tdouble maxFitness = getWorstIndsPerTask()[subpopulation][currentTask].getTaskFitness(currentTask);\n\n\t\tdouble prob = 1.0 - (taskFitness - minFitness) / (maxFitness - minFitness);\n\n\t\tprobabilityOutput(state, prob, taskFitness, maxFitness, minFitness);\n\n\t\treturn getRand().nextBoolean(prob);\n\t}", "public T caseTask(Task object) {\n\t\treturn null;\n\t}", "public final void run() {\n\t\ttask();\n\t\t_nextTaskHasRan = true;\n\t}", "public void submitMonitorDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"MonitorDeviceTrafficTask()...\");\n\t\taddTask(new MonitorDeviceTrafficTask());\n\t}", "public void add(final Task task) {\n }", "void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;", "@Override\n public void run() {\n task.run();\n }", "@Override\n\tpublic void answer(Task t) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tanswers.put(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "private void delegateTasks() {\n logger.debug(\"task delegation started\");\n\n untilTasksAndThreadsAreAvailable:\n while (true) {\n Optional<Node> selectedNode;\n Optional<WorkerPoolTask> task = workerPool.pollTask();\n\n if (!task.isPresent()) {\n while (true) {\n State prevState = state.get();\n State nextState;\n if (prevState == DURING_DELEGATION) {\n // No more tasks and free threads appeared\n nextState = NO_DELEGATION;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n nextState = DURING_DELEGATION;\n }\n if (state.compareAndSet(prevState, nextState)) {\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n if (prevState == DURING_DELEGATION) {\n return;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n continue untilTasksAndThreadsAreAvailable;\n }\n }\n logger.debug(\"state change missed in delegateTasks when task wasn't present\");\n }\n }\n\n synchronized (nodes) { // Synchronization with HeartBeat nodes.updateAfterHeartBeat method.\n selectedNode = nodes.drainThreadFromNodeHavingHighestPriority();\n if (!selectedNode.isPresent()) {\n workerPool.submitTask(task.get(), true);\n State nextState = AWAITING_FREE_THREADS;\n State prevState = state.getAndSet(nextState);\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n return;\n }\n }\n\n if (!delegateTask(selectedNode.get(), task.get())) {\n //If delegation failed we release the thread to keep proper number of free threads up-to-date\n //If HeartBeat happened between draining a thread and returning it, this operation will take no effect\n //as we are working on invalidated version of node.\n nodes.returnThread(selectedNode.get());\n }\n }\n }", "protected void setupTask(Task task) {\n }", "void setDelegate(Delegate delegate);", "public Task getNext()\n {\n\treturn new Task(toDo.get(0));\n }", "public void add(Task task){ this.tasks.add(task);}", "public interface DeviceBasedTask {\n\n\tpublic Device getDevice();\n\n\tpublic void setDevice(Device device);\n}", "@Override\n\tpublic void migrateTask(ITask task, Element element) {\n\n\t}", "void transact(Runnable work) {\n transact(\n () -> {\n work.run();\n return null;\n });\n }", "@Override\n public void activateFlower(@NonNull String taskId) {\n }", "void addTask(Task<?> task) {\n tasks.addFirst(task);\n }", "public abstract void persistAndRunTaskHandler() throws IOException;", "private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }", "@Override\n\tpublic void execute() {\n\t\tThreadPool pool=ThreadPool.getInstance();\n\t\tpool.beginTaskRun(this);\n\t}", "@Override\n public void activateTask(@NonNull String taskId) {\n }", "void notifyMessage(Task task);", "@Override\n\tpublic void doExecute(Runnable action) {\n\t\t\n\t}", "public interface SingletonTask extends Task {\n}", "public void setTaskInstance(Task taskInstance) {\n\t\tthis.taskInstance = taskInstance;\n\t}", "public void doTask(Entity e) {\r\n\t\tif (getTask().equals(\"heal\")) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tint healing = rand.nextInt(50) + 1;\r\n\t\t\tif (getNumTasks() > 0) {\r\n\t\t\t\tuseTask();\r\n\t\t\t\tif (Jedi.class.isInstance(e)) {\r\n\t\t\t\t\tJedi healMe = (Jedi) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t} else if (Rebel.class.isInstance(e)) {\r\n\t\t\t\t\tRebel healMe = (Rebel) e;\r\n\t\t\t\t\thealMe.heal(healing);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Medical droid heals \" + e.getName()\r\n\t\t\t\t\t\t+ \" with \" + healing + \" hp.\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out\r\n\t\t\t\t\t\t.println(\"Medical Droid \"\r\n\t\t\t\t\t\t\t\t+ getName()\r\n\t\t\t\t\t\t\t\t+ \" has run out of number of tasks available to perform.\");\r\n\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Medical Droid \" + getName()\r\n\t\t\t\t\t+ \" has no tasks upon which to perform.\");\r\n\t\t}\r\n\t}", "@Override public final void dinvoke(H2ONode sender) {\n setupLocal(); // Local setup\n compute2(); // Do The Main Work\n // nothing here... must do any post-work-cleanup in onCompletion\n }", "public void recoverTask(int index, Task task) {\n tasks.add(index, task);\n }", "@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}", "@Override\n public Class<? extends Task> taskClass() {\n return AmpoolSourceTask.class;\n }", "public Task getTask() { return task; }" ]
[ "0.6964148", "0.581851", "0.56871754", "0.56404626", "0.55850744", "0.54939556", "0.54892457", "0.5486838", "0.5474199", "0.5456094", "0.54399204", "0.54395044", "0.5427222", "0.54270816", "0.5417444", "0.5387991", "0.5365731", "0.535712", "0.53564984", "0.53497964", "0.5347366", "0.5332172", "0.5308904", "0.5299097", "0.5283004", "0.5280853", "0.52451605", "0.52317345", "0.5228242", "0.52042156", "0.51990104", "0.51761055", "0.51591027", "0.51563585", "0.51473933", "0.5133419", "0.51295626", "0.5125566", "0.51114804", "0.508371", "0.5054053", "0.50484806", "0.5026921", "0.5019266", "0.5018658", "0.5017424", "0.5015311", "0.5015311", "0.5015311", "0.5013815", "0.5010537", "0.50058025", "0.5002161", "0.4999643", "0.49790606", "0.49776283", "0.49758142", "0.49733734", "0.49690124", "0.49661916", "0.49589834", "0.49438694", "0.49423754", "0.49293455", "0.492501", "0.49218786", "0.49113142", "0.49042356", "0.49039346", "0.4898515", "0.48981398", "0.4897422", "0.48967323", "0.48915642", "0.48893684", "0.48864412", "0.48828095", "0.48773563", "0.48755434", "0.48741758", "0.48635176", "0.4861884", "0.48582324", "0.48554567", "0.48532948", "0.4846042", "0.48456827", "0.48450324", "0.48437488", "0.48395878", "0.48260096", "0.48256108", "0.48123017", "0.481208", "0.48111865", "0.48110828", "0.4809048", "0.4807807", "0.4806875", "0.48036727" ]
0.67139137
1
defines the interface of a Warzone player strategy
public interface IPlayerStrategy { IOrder createOrder() throws Exception; IPlayerStrategy cloneStrategy(IPlayerModel p_player) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Player {\n\n\n /**\n * Represents the attack result of random strategy.\n *\n * @return an attack result\n */\n AttackResult randomAttack();\n\n /**\n * Represents the attack result of user strategy.\n *\n * @return an attack result\n */\n AttackResult userAttack();\n\n /**\n * Represents the attack result of smart strategy.\n *\n * @return an attack result\n */\n AttackResult smartAttack();\n\n /**\n * Tells if one of the players has win the game.\n *\n * @return true if wins the game and false otherwise\n */\n boolean winGame();\n\n /**\n * Prints the fleet map.\n *\n * @param printer the printer to print the map\n */\n void printFleet(ConsolePrinter printer);\n\n /**\n * Prints the battle map.\n *\n * @param printer the printer to print the map\n */\n void printBattle(ConsolePrinter printer);\n\n /**\n * Creates a user player.\n *\n * @param randPlace true if place the ship randomly and false to place the ship by the player\n * @param fleetMap the fleet map of the player\n * @param battleMap the battle map of the player\n * @return a new user player\n */\n static Player createUserPlayer(boolean randPlace, FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, randPlace);\n }\n\n /**\n * Creates a robot player.\n *\n * @param fleetMap the fleet map of the player\n * @param battleMap the battle map of the player\n * @return a new robot player\n */\n static Player createRobotPlayer(FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, true);\n }\n}", "public interface AttackStrategy {\n public double attack(Player player);\n\n}", "public interface WinnerStrategy {\n\n public Player checkWinner(Game game);\n\n public void increaseAttackCounter(Game game);\n}", "public interface PlayerInterface{\n\n public void setCreditBalance(double balance);\n\n public double getCreditBalance();\n\n public String getPlayersName();\n\n public URI getPicturePath();\n\n public String getStringDescription();\n\n public JPanel getGUIView();\n\n public Image getScaledPicture(int width);\n\n public Game getGame();\n\n public void setSelectable(boolean selectable);\n\n public boolean canMakeTransfer(Transfer transfer);\n\n public void makeTransfer(Transfer transfer) throws Transfer.InvalidTransferException;\n\n public void receiveTransfer(Transfer transfer);\n\n}", "public interface PythonWolfInterface {\n public void initialize(WolfPlayer myself);\n public Move move();\n public void isEating();\n public void isAttacked(); \n}", "interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_TYPE_HARE = 100;\n\n /**\n * player playing as hound\n */\n int PLAYER_TYPE_HOUND = 101;\n }", "public interface IPlayer {\n\n /**\n * Nick Sifniotis u5809912\n * 3/9/2015\n *\n * Create whatever is necessary to link the player submission to the tournament.\n *\n * @param path_name - the path/file name of the code, the classname, and the method within the class\n * @return true if the player has loaded successfully, false if there was a problem connecting\n * to the submission\n */\n boolean InitialisePlayer (String path_name);\n\n\n /**\n * Nick Sifniotis u5809912\n * 2/9/2015\n *\n * You are given the current state of the game. Make your next move son.\n * Note that you (the academic / tutor) are responsible for properly casting\n * these objects into whatever data structures your assignment specs\n * have indicated need to be used\n *\n * @param game_state - the current state of the game\n * @return the move that the player wishes to make\n */\n Object GetMove (Object game_state);\n\n\n /**\n * Nick Sifniotis u5809912\n * 18/09/2015\n *\n * The student submission failed to return a valid move.\n * But we don't want to abort the game and ruin things for everyone else.\n * So instead, we skip the players turn. This method returns the\n * 'null / skip move' turn for this game.\n *\n * The use of this method is strictly optional and is a tournament rule that\n * can be configured in the tournament manager. In games like Kalaha where there\n * is no skip turn move, just return a null.\n *\n * @return an object that represents a 'no move' move.\n */\n Object NullMove ();\n}", "public interface AircraftColleague {\n public void startLanding();\n public void finishLanding();\n}", "public interface Player {\n /**\n * has to be implemented\n * wird von update() in Game aufgerufen.\n * @return eine der Actions aus Rules.getActionsTileMove()\n */\n GameState requestActionTile();\n /**\n * has to be implemented\n * wird von update() in Game aufgerufen.\n * @return eine der Actions aus Rules.getActionsGamePieceMove()\n */\n GameState requestActionGamePiece();\n\n /**\n * has to be implemented\n * wird von update() aufgerufen.\n * @param gameState aktueller GameState\n */\n void updateGameState(GameState gameState);\n\n GameState getGameState();\n\n /**\n * has to be implemented\n * @return the color of the Player\n */\n Color getColor();\n\n void setRules(Rules rules);\n Rules getRules();\n\n void setName(String name);\n String getName();\n\n void setThread(ThreadUpdate thread);\n void setSynchronizer(Object synchronizer);\n\n /**\n * wird von update aufgerufen, sobald ein anderer Spieler eine Karte gewinnt.\n * @param color Farbe des Spielers, der eine Karte gewonnen hat\n * @param symbol auf dieser Karte\n */\n void notifyWonCards(Color color, Symbol symbol);\n\n /**\n * legt die Karte ganz oben auf dem Stapel, die der Spieler als nächstes gewinnen muss fest.\n * Wird von Game_Impl aufgerufen um dem Player seine Karte mitzuteilen\n * @param symbol neue zu erreichende Karte/Symbol\n */\n void setActiveCard(Symbol symbol);\n\n /**\n * has to be implemented\n * @return the activeCard, that was set by Game_Impl\n */\n Symbol getActiveCard();\n\n\n /**\n * creates new instance of chosen player\n *\n * Correct place to add new and more KI players!\n *\n * @param className name of the class to create an instance of\n * @param color chosen color for a player\n * @return new instance of playerclass\n */\n static Player createNewPlayer(String className, Color color) throws IllegalArgumentException {\n switch (className) {\n case \"PlayerKI\":\n return new PlayerKI(color);\n case \"PlayerKI2\":\n return new PlayerKI2(color);\n case \"PlayerKI3\":\n return new PlayerKI3(color);\n case \"PlayerKI4\":\n return new PlayerKI4(color);\n case \"PlayerHuman\":\n return new PlayerPhysical(color);\n default:\n throw new IllegalArgumentException(\"createNewPlayer in Player.java doesn't know how to handle this!\");\n }\n }\n}", "public interface IStrategy {\n\n\t\t\n\t\t\t\n\t/** \n\t * calculate the next position of the pacman. Gets the curent position and returns the new position.\n\t */\n\tpublic abstract Point move(Point position);\n\t\t\t\n\t\t\n\n}", "public interface Arbiter {\n\n boolean areYouHandleThis(String fieldNumber);\n\n boolean isTheMapFull();\n\n /**\n * At the beggining the game choose one or the first player will be choosen by default\n *\n * @param shape\n */\n void letToPlay(Shape shape);\n\n /**\n * getting the current player\n * @return\n */\n Shape whoIsPlaying();\n\n boolean wantsToContinue();\n\n Shape whoIsTheWinner();\n}", "public interface PlayerWDS {\n\n /**\n * 根据球队缩写列表和当前赛季年份 爬取球员基本数据.html表\n *\n * @param abbr 球队缩写\n * @param year 当前赛季年份\n * @return List<StringBuffer> 爬取球员基本数据.html表\n */\n public StringBuffer getPlayerInfo(String abbr,int year);\n\n /**\n * 根据路径 爬取球员职业生涯的数据\n *\n * @param path 球员数据路径\n * @return StringBuffer 爬取球员职业生涯的数据\n */\n public StringBuffer getPlayerImg(String path);\n}", "public interface HockeyPlayer\n{\n public void skatesRun();\n public void kickTheDisc();\n public void train();\n}", "public interface BattleSwitcher {\r\n public void switchBattle();\r\n}", "public interface MyPlayerInterface extends Playerinterface {\n\n /**\n * returns number of stones player has on the board.\n *\n * @return number of stones player has on the board\n */\n int getNumberOfStonesOnBoard();\n\n /**\n * returns number of stones player can still place on the board.\n *\n * @return number of stones player can still place on the board\n */\n int getNumberOfStonesLeftToPlace();\n\n /**\n * lowers number of stones player has on the board by one.\n */\n void lowerNumberOfStonesOnBoard();\n\n /**\n * raises number of stones player has on the board by one.\n */\n void raiseNumberOfStonesOnBoard();\n\n /**\n * lowers number of stones player can still place on the board.\n */\n void lowerNumberOfStonesLeftToPlace();\n}", "public interface TravelStrategy {\r\n\t/**\r\n\t * Returns the floor number of the passenger's current destination, so that other strategies can base their\r\n\t * decisions on where the passenger is trying to get to.\r\n\t */\r\n\tint getDestination();\r\n\t\r\n\t/**\r\n\t * Called when it is time to schedule a PassengerNextDestinationEvent according to the rules of this travel strategy.\r\n\t * Typically this occurs when the passenger departs the elevator on the correct floor, but that is not guaranteed.\r\n\t * @param currentFloor the floor that the passenger got off.\r\n\t */\r\n\tvoid scheduleNextDestination(Passenger passenger, Floor currentFloor);\r\n}", "public interface Player {\n Point move();\n}", "public interface PlayerInterface {\n\tpublic void open(); \n\tpublic void play(); \n\tpublic void pause(); \n\tpublic void stop();\n}", "public interface BowlingGameEngine {\n\n /**\n * Adds the next play to the engine.\n *\n * @param play Play to be added\n */\n void addPlay(BowlingPlayVO play) throws IllegalPlayException;\n\n /**\n * Prepares the engine\n */\n void start();\n\n List<String> getPlayerList();\n\n List<BowlingFrame> getFrames(String player);\n\n List<BowlingPlay> getPlays(String player, BowlingFrame frame);\n}", "public interface IMoveStrategy \n{\n /**\n * sets the actor on which strategy needs to be applied.\n */\n public void setActor(Actor actor);\n \n /**\n * moves the actor forward.\n */\n public void moveActor();\n \n /**\n * rotates the actor\n */\n public void rotateActor();\n \n /**\n * chages the moving speed of actor\n */\n public void changeSpeed(int speed);\n}", "public interface FighterFactory {\n /**\n * Create a PlayerFighter from a game player\n *\n * @param player The player\n *\n * @return The PlayerFighter\n */\n public PlayerFighter create(GamePlayer player);\n}", "public interface Player {\n abstract void setVideoUri(String path);\n abstract void playVideo();\n abstract void pauseVideo();\n abstract void initVideo();\n abstract void ffwd();\n abstract void frwd();\n abstract void release();\n abstract void setFirstSubtitle(String path);\n abstract void setSecoundSubtitle(String path);\n abstract void seekTo(int millisec);\n abstract void sinkSubtitle();\n abstract void toggleTopPanel();\n abstract boolean isPlaying();\n abstract int getCurrentPosition();\n}", "@Override\n public void landedOn(Player player) {}", "public abstract boolean isPlayer();", "public interface Player {\r\n\r\n\t/**\r\n\t * <p>\r\n\t * Returns the name of this player.\r\n\t * \r\n\t * @return name of the player\r\n\t */\r\n\tpublic String name();\r\n}", "public abstract void activatedBy(Player player);", "public interface IController {\n\n void startPlayer();\n void pausePlayer();\n}", "public interface PlayerCreator {\n\n // Factory method for creating a player\n public PlayerHandler create(String type, PlayerInfo playerInfo, List<Integer> otherPlayerIds);\n \n public List<String> getPlayerTypes();\n}", "public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}", "public interface GameSupervisor {\n\n void startMatch(Player player);\n\n void sendGuess(Guess guess);\n\n String getCurrentMatchName();\n\n Player getCurrentPlayer();\n\n boolean isCurrentMatchMultiplayer();\n\n}", "public interface Game\n{\n void startGame();\n void endGame();\n Player getWinner();\n}", "@Override\npublic Action actionChoosed(Player joueur) {\n WarPlayer player = this.castPlayer(joueur);\n int index = ((WarStrategy)(player.getStrategy())).skipOrDeploy();\n Action action = new SkipAction(player);\n if (index == 0) {\n Army army = this.inputArmy(player);\n Tile tile = ((WarStrategy)player.getStrategy()).inputTileStrategy();\n if(army != null && tile != null) {\n if (army.getArmySize() > 3 && tile.equals(new MountainTile(0, 0, 1, 0))) {\n System.out.println(\" Army of size \" + army.getArmySize() + \" can't be deployed on a mountain tile ! \");\n player.addWarrior(army.getArmySize());\n } else {\n action = new WarActionDeploy(player, this.board, tile.getPosX(), tile.getPosY(), army);\n }\n } else if (army != null && tile == null) {\n player.addWarrior(army.getArmySize());\n }\n }\n return action;\n}", "public interface Player {\r\n /**\r\n * The player chooses how many marbles to take from pile\r\n * @param pileSize the size of the pile\r\n * @return The number of marbles taken\r\n */\r\n int move(int pileSize) ;\r\n \r\n /**\r\n * Returns the players name\r\n * @return the players name\r\n */\r\n String getName() ;\r\n}", "public interface Aircraft {\n public String flyForwards();\n}", "public interface Warrior {\n public void info();\n}", "public interface BoardGameBrain {\n\n void init(Board board);\n\n boolean playerHasWon();\n\n boolean draw();\n\n boolean isWinningMinorDiagonal();\n boolean isWinningMajorDiaogonal();\n boolean isWinningRow();\n boolean isWinningColumn();\n}", "void addPlayer(IPlayer player);", "public abstract Player getWinner();", "public interface PlayerFactory {\r\n Player create(GUI gui);\r\n}", "public void OnPlayer(Joueur joueur);", "void win(Player player);", "public interface WorldSwitchListener {\n\n /**\n * Called when player switched world\n *\n * @param changed\n * Player who changed world\n * @param from\n * Name of previous world\n * @param to\n * Name of new world\n */\n void onWorldChange(@NotNull TabPlayer changed, @NotNull String from, @NotNull String to);\n}", "public interface Players {\n\n /*\n Method to Find how many Marbles the Player takes\n */\n int getMarbles(int remainingMarbles) ;\n\n String getName() ;// Method that returns the Name of the Player Object\n\n}", "public interface ControllerInterface {\n\t/**\n\t * Move the player to next cell based on the direction passed.\n\t * @param direction indicates which direction an agent move to. \n\t */\n\tpublic void move(String direction);\n\t/**\n\t * Reload the maze map based on user supplied difficulty level and theme.\n\t * @param difficultyLevel indicates which difficulty level user has selected.\n\t * @param theme indicates which theme user selected. Theme mainly refers to the appearance of elements of game, such as image of the player, \n\t * background of the cell. \n\t */\n\tpublic void reStartGame(String difficultyLevel, String theme);\n\t\n\tpublic void startTimer(int timeLimit);\n}", "public abstract void isUsedBy(Player player);", "public interface ShipMode {\n\n\tpublic void shipMode();\n\t\n}", "Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}", "public abstract void accept(Player player, String component);", "public interface Place {\n\n public boolean canMoveAbove();\n public boolean canMoveBelow();\n public boolean canMoveLeft();\n public boolean canMoveRight();\n public boolean canMoveDiagonal();\n\n public void setAbove(Place h);\n public void setBelow(Place h);\n public void setLeft(Place h);\n public void setRight(Place h);\n public void setDiagonal(Place h);\n\n public void setPixel(int x, int y);\n public int getX();\n public int getY();\n public void setLabel(String l);\n public String getLabel();\n public Place getAbove();\n public Place getBelow();\n public Place getLeft();\n public Place getRight();\n public Room getDiagonal();\n\n public void setPlayer(Player p);\n public boolean occupiedByPlayer();\n public void removePlayer();\n}", "public interface PlayersHelper {\n\n void goToTeamPage();\n void goToAddPlayer();\n boolean ifNoPlayers(String text);\n boolean ifPlayerAdded(String text);\n boolean nameError(String text);\n boolean phoneError(String text);\n boolean emailError(String text);\n void noDeletePlayer();\n void deletePlayer();\n void editPlayer(PlayerModel playerModel);\n boolean ifPlayerEdited(String text);\n boolean ifPlayerDeleted(String text);\n void sendAnotherInvitation();\n boolean ifInvitationSent(String text);\n void closeInvitationAlert();\n\n void getFromContacts();\n void addManuallyPlayer(PlayerModel playerModel);\n void addPlayer();\n}", "public abstract void attackPlayer(Player p);", "public abstract void onLand(Player player);", "public interface GameHelperPlugin {\n\n public ScoreBoard getScoreBoard();\n\n public void getRules();\n\n public void displayMenu();\n\n\n}", "protected abstract boolean isPlayerActivatable(PlayerSimple player);", "Player getDormantPlayer();", "Player createPlayer();", "public interface ITurnAdmin {\n /**\n * Tells the view (user) to try a move.\n * @param requestor The requestor used by the view to communicate which move it wishes to try.\n */\n public void takeTurn(IViewRequestor requestor);\n}", "public BoardInterface(){\n\t\tsetupLayouts();\n\t\tsetPlayerChoice();\n\t}", "public interface GameControllerInterface {\n\n /**\n * Adds a {@link solution.interfaces.GameUIInterface} to the\n * implementation of {@link solution.interfaces.GameControllerInterface}\n *\n * @param listener the listener to be added\n */\n public void addUpdateListener(GameUIInterface listener);\n\n /**\n * removes a {@link solution.interfaces.GameUIInterface} from the\n * implementation of {@link solution.interfaces.GameControllerInterface}\n *\n * @param listener the listener to be removed\n */\n public void removeUpdateListener(GameUIInterface listener);\n\n /**\n * The following are a list of convenience data methods for the views\n */\n\n /**\n *\n * @return a list of all players in the current game\n */\n public List<Colour> getPlayerList();\n\n /**\n *\n * @return the player whose turn it currently is\n */\n public Colour getCurrentPlayer();\n\n /**\n * This method is used to get the current player's real position.\n * It's useful when displaying Mr X's real location on his turn.\n *\n * @return the current player's real position\n */\n public int getCurrentPlayerRealPosition();\n\n /**\n * This method gets the specified player's visible position,\n * that is, their last known position.\n *\n * @param colour the player whose position is required\n * @return the player's last known position\n */\n public int getPlayerVisiblePosition(Colour colour);\n\n /**\n *\n * @param currentPlayer the player whose tickets are required\n * @return a list of the player's tickets\n */\n public Map<Ticket,Integer> getPlayerTickets(Colour currentPlayer);\n\n /**\n * This method gets the list of valid moves the specified player may\n * perform from their location\n *\n * @param player the player whose moves are required\n * @param location the player's current location\n * @return a list of possible moves for the player from the specified location\n */\n public List<MoveTicket> getValidSingleMovesAtLocation(Colour player, int location);\n\n /**\n * This method gets the list of valid moves the specified player may\n * perform from their location after a first move has been performed.\n * The move type is specified by firstTicket and taken into account when\n * calculating the valid moves.\n *\n * @param player the player whose moves are required\n * @param location the player's current location\n * @param firstTicket the {@link scotlandyard.Ticket} used in the first move.\n * @return a list of possible moves for the player from the specified location\n */\n public List<MoveTicket> getValidSecondMovesAtLocation(Colour player, int location, Ticket firstTicket);\n\n /**\n *\n * @return a list of Mr X's moves\n */\n public List<MoveTicket> getMrXHistory();\n\n /**\n * This method will return the list of winning players,\n * or an empty list if there are currently none.\n *\n * @return the set of winning players if there are\n */\n public Set<Colour> getWinningPlayers();\n\n /**\n *\n * @return true if the game is over\n */\n public boolean isGameOver();\n\n /**\n * This method loads a game from file\n *\n * @param fileLocation the location of the saved file\n * @param replay whether or not the game should be animated back move by move\n */\n public void loadGame(File fileLocation, boolean replay);\n\n /**\n *\n * @return true if Mr X is currently visible\n */\n public boolean isMrXVisible();\n\n\n /**\n * This method saves the current game to file\n *\n * @param fileLocation the lactation to save the file to\n */\n public void saveGame(File fileLocation);\n\n\n\n /**\n * The following are a list of notify methods which allow view components\n * to inform the implementation of {@link solution.interfaces.GameControllerInterface} of changes\n */\n\n\n\n\n /**\n * This notifies the interface implementation that all players have been added to the\n * game\n * @param count the number of players that have been added\n */\n public void notifyAllPlayersAdded(final int count);\n\n /**\n * This notifies the interface implementation that the Game Map has been loaded\n * and hence further actions relying on load can begin.\n */\n public void notifyMapLoaded();\n\n /**\n * This notifies the interface implementation that the current move animation has\n * finished.\n */\n public void notifyMoveAnimationFinished();\n\n /**\n * This notifies the interface implementation that a move has been selected\n *\n * @param move the selected move\n */\n public void notifyMoveSelected(final Move move);\n\n\n\n\n\n}", "public PlayerImplementation(String name) {\n super(name);\n p1 = this; // hack for easy access to player\n\n // TODO find a better place to put these\n this.getDispatcher().getRole().addBehaviorTemplate(FrankKillsVictim.makeLatent());\n\n // prevent player from making toasts or random approaches\n removeBehavior(GroupChat.class);\n removeBehavior(ApproachBehavior.class);\n removeBehavior(RandomizedMoveTo.class);\n removeBehavior(UseRandomAnnotatedItem.class);\n }", "public interface GameTypeWrapper {\n\n\t/**\n\t * This is expected to play an entire game.\n\t * \n\t * @return the played game\n\t */\n\tpublic GameTypeWrapper playGame();\n\n\tpublic List<Player> getPlayers();\n\n\tpublic Score getScore();\n\n\tpublic Player getWinner();\n\n}", "void createPlayer(Player player);", "Player getPlayer();", "private WarPlayer castPlayer (Player player) {\n return (WarPlayer)player;\n }", "public interface Heuristic {\n}", "public interface IPlayer {\n public PlayerIdentity getIdentity();\n}", "public interface iGame {\n\n public abstract ArrayList<UUID> getListOfPlanets();\n\n public abstract String getName(UUID uuid);\n\n public abstract String getDescription(UUID uuid);\n\n public abstract int getPid(UUID uuid);\n\n public abstract String getImgPath(UUID uuid);\n\n public abstract String getImgPath(UUID uuid, boolean bool);\n\n public abstract ArrayList<UUID> getInventory();\n\n public abstract void startConversation(UUID uuid);\n\n public abstract ArrayList<UUID> getAvailableNpcs(UUID uuid);\n\n public abstract UUID getPlayerPosition();\n\n public abstract ArrayList<UUID> getPossiblePlanets();\n\n public abstract void travelToPlanet(UUID planet);\n\n public abstract int getFuel();\n\n public abstract int getWarpFuel();\n\n public abstract boolean canWarp();\n\n public abstract int getReputation();\n\n public abstract int getInGameTime();\n\n public abstract UUID getMoonId(UUID uuid);\n\n public abstract String getDashboardUpdate();\n\n public abstract void dropItem(UUID uuid);\n\n public abstract void processWarp(UUID nextPosition);\n\n public abstract void processAnswer(String userAns);\n\n public abstract String[] getAnswers();\n\n public abstract int[] getPositionCoordinates(UUID uuid);\n\n public abstract ArrayList<UUID> getPossibleScenarios();\n\n public abstract void setScenario(UUID uuid);\n\n public abstract long getPlayedMillis();\n\n public abstract void startGame(UUID scenario, String playerName);\n\n public abstract String getDeliveryPlanet(UUID uuid);\n\n public abstract String getDeliveryNpc(UUID uuid);\n\n public abstract boolean isWar(UUID uuid);\n\n public abstract ArrayList<String> quitGame();\n\n public abstract boolean isDead();\n\n public abstract int getItemDeliveryTime(UUID itemUuid);\n\n public abstract boolean getItemPapers(UUID itemUuid);\n\n public abstract UUID getStartNpc();\n}", "public interface Flyable\n{\n public void updateConditions();\n public void registerTower(WeatherTower weatherTower);\n public void unregisterTower(WeatherTower weatherTower);\n}", "public interface IOptimisableTile {\n\n public OptimiserPacket getPacket();\n public void addPacket(OptimiserPacket packet);\n\n}", "public interface HostPlayer {\n /**\n * the client shall register itself as the client to the host\n * the host shall return its reference\n * @param client reference of the client\n */\n HostPlayer registerClient(ClientPlayer client);\n /**\n *the client needs to acknowledge the ready flag called by the host\n */\n void clientReady();\n /**\n * the client should recieve and evaluate the results received from the host\n * acknowledge true if results match, ack false if result mismatch with local calculation\n * @param resultMatch true if the received the calculations matched\n */\n void ackResult(boolean resultMatch);\n\n /**\n *acknowledge the request for a new game if requested\n * @param isAccepted true if the request for new game accepted\n */\n void newGame(boolean isAccepted);\n}", "public interface GameInterface {\n public void whatIsHere();\n\n public void whatIsInTheNorth();\n\n public void enterNorth();\n\n public void whatIsInTheEast();\n\n public void enterEast();\n\n public void whatIsInTheSouth();\n\n public void enterSouth();\n\n public void whatIsInTheWest();\n\n public void enterWest();\n}", "public interface Weapon {\n\n /**\n * method which is used when one war participant attacks other\n *\n * @param target target war participant\n * @param attacker attacker war participant\n */\n void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);\n\n}", "public interface Game {\n String playGame();\n Team getHomeTeam();\n Team getAwayTeam();\n void setAwayTeam(Team z);\n void setHomeTeam(Team w);\n}", "public interface LeagueManager {\n\tpublic boolean deleteClub(String name);\n\n\tpublic void addTheClub(FootballClub club, String name, String location, int wins, int draws, int defeats,\n\t\t\tint goalsReceived, int defeatsScored, int points, int mathces);\n\n\tpublic void addTheClub(FootballClub club, String name, String location);\n\n\tpublic void showTheClubs();\n\n\tpublic void showTheClubs(String name);\n\n\tpublic void displayPremierLeague();\n\n\tpublic void updateScore(String name, int score);\n\n}", "abstract void updatePlayer();", "public interface GameControllerFactory {\n\n /**\n * Creates a new game controller that will be hosted by the given lobby controller.\n */\n GameController makeGameController(LobbyController lobbyController);\n\n}", "public interface Attacker {\n String attack(Vehicle vehicle);\n}", "public abstract void execute(Player p);", "public void welcomePlayer(Player p);", "public abstract void attack(Player p);", "public interface PlayerCharacter extends Entity {\n Moves move();\n}", "public interface SharedStrategy extends InstitutionalStatement, Sanction {\n}", "public interface Participant {\r\n\tpublic void update();\r\n\tpublic void start();\r\n\tpublic void gameOver();\r\n\tpublic String getPlayerName();\r\n}", "public abstract void makePlayer(Vector2 origin);", "public PlayerFighter create(GamePlayer player);", "protected abstract void takeTurn(int player);", "public void use(Player player) {\n\n\t}", "public interface BuildStrategy {\n\n public void execute(GameSession session, int village) throws InterruptedException;\n\n}", "public interface GameListener {\n\n /**\n * Called when a player makes a move in the game.\n * @param playerIndex Player identifier\n * @param move Move made\n */\n void moveAdded(int playerIndex, Move move);\n\n /**\n * Called when a move is undone.\n */\n void moveRemoved(Move move);\n\n /**\n * Called when a haslam.blackstone.players turn has started.\n * @param playerIndex Player identifier\n */\n void turnStarted(int playerIndex);\n\n /**\n * Called when the game has started.\n */\n void gameStarted();\n\n /**\n * Called when a previous game is resumed.\n */\n void gameResumed();\n\n /**\n * Called when the game has finished.\n */\n void gameFinished();\n\n /**\n * Called when the game requests a move from the user.\n */\n void userMoveRequested(int playerIndex);\n\n /**\n * Called when a new position is loaded by the user.\n * @param orderedMoves A list of moves made, in order, to assemble the new\n * position.\n */\n void positionLoaded(List<Move> orderedMoves);\n\n /**\n * Called when a position is cleared by the user.\n */\n void positionCleared();\n\n /**\n * Called when the user adds an external player.\n */\n void playerAdded();\n\n}", "public interface MarbleSolitaireController {\n\n /**\n * This method play a new game of Marble Solitaire using the provided model.\n *\n * @param model represents the model of the marble solitaire game.\n * @throws IllegalArgumentException if the provided model is null\n * @throws IllegalStateException if the controller is unable to successfully receive input or\n * transmit output.\n */\n void playGame(MarbleSolitaireModel model) throws IllegalArgumentException, IllegalStateException;\n}", "@Override\n\tpublic void setPlayer(Player player) {\n\n\t}", "public interface BoardAdapter {\n\n\tString getTitle(Player player);\n\n\tList<String> getLines(Player player);\n\n\tBoardStyle getBoardStyle(Player player);\n}", "public interface ISocialMediaStrategy {\n public void connectTo(String friendName);\n}", "public interface Strategy {\n\n\n\tpublic void operation();\n\n}", "Strategy createStrategy();", "public interface IGame {\n\t\n\tpublic void startTheGame();\n\t\n\tpublic boolean setProperties();\n\t\n\tpublic void printWelcome();\n\t\n\tpublic void initGame();\n\t\n}", "public Player getPlayer();", "public Player getPlayer();", "public interface IGameController {\n\n void onNewGameStart();\n\n void onAnswerPicked(String answer);\n\n void onShowCurrectQuestionfinished();\n\n void onShowIncurrectQuestionfinished();\n\n void onPrizeReadyPrize(int prize);\n\n void forceEndGame();\n\n void onVideoStart();\n\n ArrayList<String> getOptionsToFiftyFifty();\n\n void onVideoEnd();\n\n void fiftyFiftyReward();\n\n int getQuestionNum();\n\n\n}", "public AbstractPlayer() {\r\n }" ]
[ "0.7320039", "0.71384865", "0.70425594", "0.66076404", "0.6585281", "0.65475494", "0.6512806", "0.64991385", "0.6474224", "0.64235806", "0.6420641", "0.6416862", "0.6404971", "0.63933116", "0.6292553", "0.62920856", "0.6264102", "0.6262135", "0.6213605", "0.62027806", "0.6185855", "0.6185745", "0.6153309", "0.6131263", "0.6118426", "0.61174726", "0.6083063", "0.6072911", "0.60720676", "0.6056984", "0.6048285", "0.60423124", "0.60403615", "0.6022005", "0.6016661", "0.5988601", "0.5980322", "0.59710413", "0.59701556", "0.5963228", "0.59509647", "0.5943576", "0.59176856", "0.5908928", "0.59069824", "0.5897642", "0.58946425", "0.5878035", "0.5874003", "0.5862131", "0.58578175", "0.58358866", "0.5834096", "0.5831195", "0.58308876", "0.58257246", "0.58247465", "0.5823261", "0.58105004", "0.5810225", "0.580677", "0.5805093", "0.5796509", "0.5796151", "0.57898676", "0.5784709", "0.5773372", "0.5769405", "0.57682663", "0.57576555", "0.5756567", "0.57558465", "0.57557166", "0.57538867", "0.5750893", "0.5737964", "0.57327616", "0.5725069", "0.5724806", "0.57204485", "0.57131827", "0.57103246", "0.5699795", "0.5686631", "0.56852204", "0.56842786", "0.56781715", "0.5676285", "0.56738925", "0.56682813", "0.5664186", "0.5663553", "0.5659625", "0.5655815", "0.56507075", "0.5649674", "0.5649407", "0.5649407", "0.5642914", "0.56346554" ]
0.7118413
2
Repeat a String repeat times to form a new String. StringUtils.repeat(null, 2) = null StringUtils.repeat("", 0) = "" StringUtils.repeat("", 2) = "" StringUtils.repeat("a", 3) = "aaa" StringUtils.repeat("ab", 2) = "abab" StringUtils.repeat("a", 2) = ""
public static String repeat(String str, int repeat) { // Performance tuned for 2.0 (JDK1.4) if (str == null) { return null; } if (repeat <= 0) { return EMPTY; } int inputLength = str.length(); if (repeat == 1 || inputLength == 0) { return str; } if (inputLength == 1 && repeat <= PAD_LIMIT) { return padding(repeat, str.charAt(0)); } int outputLength = inputLength * repeat; switch (inputLength) { case 1 : char ch = str.charAt(0); char[] output1 = new char[outputLength]; for (int i = repeat - 1; i >= 0; i--) { output1[i] = ch; } return new String(output1); case 2 : char ch0 = str.charAt(0); char ch1 = str.charAt(1); char[] output2 = new char[outputLength]; for (int i = repeat * 2 - 2; i >= 0; i--, i--) { output2[i] = ch0; output2[i + 1] = ch1; } return new String(output2); default : StringBuilder buf = new StringBuilder(outputLength); for (int i = 0; i < repeat; i++) { buf.append(str); } return buf.toString(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String repeatString(String string, int repeats)\n {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < repeats; i++) {\n stringBuilder.append(string);\n }\n return stringBuilder.toString();\n }", "static String repeat(String s, int n)\n {\n // Copying given string to temparory string.\n String s1 = s;\n\n for (int i = 1; i < n; i++)\n s = s + s1; // Concatenating strings\n\n return s;\n }", "public static String repeat(String str, int count) {\n\t\tfinal StringBuilder result = new StringBuilder();\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tresult.append(str);\n\t\t}\n\t\t\n\t\treturn result.toString();\n\t}", "public static String repeatTextNTimes(int nTimes, String text) {\n return String.join(EMPTY, nCopies(nTimes, text));\n }", "public static final String repeat(char key, int count) {\n return repeat(String.valueOf(key), count);\n }", "private static String repeat(String str, int size) {\n // We cache the last call in case they are making repeated calls for the same thing\n if (CACHE_REPEAT_STR != null &&\n CACHE_REPEAT_STR.equals(str) &&\n CACHE_REPEAT_SIZE.equals(size)) {\n return (CACHE_REPEAT_RESULT);\n }\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size; i++) sb.append(str);\n CACHE_REPEAT_RESULT = sb.toString();\n CACHE_REPEAT_STR = str;\n CACHE_REPEAT_SIZE = size;\n return (CACHE_REPEAT_RESULT);\n }", "public static String repeat(final String string, final int howManyTimes) {\n\t\tfinal StringBuilder stringBuilder = new StringBuilder();\n\n\t\tfor (int i = 0; i < howManyTimes; i++) {\n\t\t\tstringBuilder.append(string);\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\t}", "public static String repeat1(char character, int repeats) {\n String answer = \"\";\n for (int j = 0; j < repeats; j++) {\n answer += character;\n }\n return answer;\n }", "private String repeatM(int count){\n return new String(new char[count]).replace('\\0','M');\n }", "public static String ntimes(String s,int n){\n\t\tStringBuffer buf = new StringBuffer();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tbuf.append(s);\n\t\t}\n\t\treturn buf.toString();\n\t}", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public static String repeat2(char character, int repeats) {\n java.lang.StringBuilder stringBuilder = new StringBuilder();\n for (int j = 0; j < repeats; j++) {\n stringBuilder.append(character);\n }\n return stringBuilder.toString();\n }", "public String repeatFront(String str, int n) {\n StringBuilder result = new StringBuilder(str.length() * n);\n for (int i = n; i > 0; i--) {\n result.append(str.substring(0, i));\n }\n return String.valueOf(result);\n }", "static long repeatedString(String s, long n) {\n if (s.contains(\"a\")) {\n StringBuilder stringBuilder = new StringBuilder(s);\n String infiniteString = \"\";\n if (stringBuilder.length() < n) {\n //repeat String if length is less than n\n infiniteString = infiniteString(s, n);\n }\n int count = 0;\n char[] stringArray = infiniteString.toCharArray();\n for (int i = 0; i < n; i++) {\n\n char a = 'a';\n if (stringArray[i] == a) {\n count++;\n }\n }\n return count;\n } else {\n return 0;\n }\n }", "private void repeatKey(String text) {\n\t\tint inputLength = text.length();\n\t\tint delta = inputLength - key.length();\n\t\tString temp = key;\n\t\t\n\t\tif(delta > key.length()) {\t\t\t\n\t\t\t//TODO: Could potentially be refactored to be a bit more efficient when the key becomes longer than the text\n\t\t\tfor(int i = 0; i < (delta / key.length()) + 1; i++) {\n\t\t\t\tkey += temp;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tString charToShift = key.substring(0, delta);\n\t\t\tkey += charToShift;\n\t\t}\n\t}", "public static String repeater(char value,int times){\n String res=\"\";\n for (int i = 0; i < times; i++) {\n res= res+value;\n }\n return res;\n }", "void repeat(StringBuilder sb, char c, int n)\n\t{\n\t\twhile(n-- > 0)\n\t\t\tsb.append(c);\n\t}", "public static String replicate(char c, int n)\n {\n String replicado = \"\";\n for (int i=0;i<n;i++){\n replicado += c;\n }\n return replicado;\n }", "public static String nTimes(String word, int n) {\n\t\tString concatWord = \"\";\n\t\t\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tconcatWord += word;\n\t\treturn concatWord;\n\t}", "static long repeatedString(String s, long n) {\n \t\n \tchar first;\n \tfirst = s.charAt(0);\n \t\n \tint count = 0;\n \tlong[] fill = new long[n];\n \t\n \tfor(int i=1; i<n; i++) {\n \t\tif(first == s.charAt(i)) count++;\n \t}\n \t\n \tlong result = ((n / s.length()) * count) + (n % s.length());\n \treturn result;\n\n }", "public static String nCopies(String s, int n) {\n\t\tif (s == null) {\n\t\t\treturn null;\n\t\t}\n\t\tStringBuilder sb = new StringBuilder(s.length() * n + 8);\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tsb.append(s);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String repeatCharacters(String word) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n sb.append(c);\n if (random.nextFloat() <= 0.5) {\n for (int j = 0; j < random.nextInt(MAX_REPEAT_TIMES); j++) {\n sb.append(c);\n }\n }\n }\n return sb.toString();\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str = scan.nextLine();\n\t\tint n = scan.nextInt();\n\t\t\n\t\tRepeated repeated = new Repeated();\n\t\t\n\t\tSystem.out.println(repeated.repeatFront(str, n));\n\t}", "public static String replicate(char c,int n)\r\n\t{\r\n\t\tStringBuilder result = new StringBuilder();\r\n\t\tfor (int i = 0; i < n; ++i) {\r\n\t\t\tresult.append(c);\r\n\t\t}\r\n\t\treturn result.toString();\r\n\t}", "static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }", "public static void main(String[] args) {\n System.out.println(nonRepeating(\"abcab\")); // should return 'c'\n System.out.println(nonRepeating(\"abab\")); // should return null\n System.out.println(nonRepeating(\"aabbbc\")); // should return 'c'\n System.out.println(nonRepeating(\"aabbdbc\")); // should return 'd'\n }", "static long repeatedString(String s, long n) {\n\n char[] str = s.toCharArray();\n\n String temp = \"\";\n\n int i=0;\n long count=0;\n\n while(i<str.length){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n long occurance = n/str.length;\n long remainder = n%str.length;\n count = count*occurance;\n\n i=0;\n while(i<remainder){\n if(str[i]=='a'){\n count++;\n }\n i++;\n }\n\n return count;\n\n }", "static long repeatedString(String s, long n) {\n char[] arr=s.toCharArray();\n int i,count=0,cnt=0;\n for(i=0;i<arr.length;i++){\n if(arr[i]=='a'){\n count++;\n }\n }\n long len=(n/arr.length)*count;\n long extra=n%arr.length;\n if(extra==0){\n return len;\n }else{\n for(i=0;i<extra;i++){\n if(arr[i]=='a'){\n cnt++;\n }\n }\n return len+cnt;\n }\n\n\n }", "public static String expandString(int count, String s){\n String ss = \"\";\n for(int i=0; i<count; i++)\n ss += s;\n return ss;\n }", "public String generateTheString(int n) {\n return \"b\" + \"ab\".substring(n % 2, 1 + n % 2).repeat(n - 1);\n }", "private String concatNcopies(int n,String str){\n\t\tString result = \"\";\n\t\tfor (int i=0;i<n;i++){\n\t\t\tresult +=str;\n\t\t}\n\t\treturn result;\n\t}", "public static String fill(String what, BigDecimal nbTimes)\n {\n\n if(nbTimes == null || what == null)\n {\n\t return what;\n }\n \n StringBuffer toRet = new StringBuffer();\n for(int i = 0; i < nbTimes.intValue(); i++)\n {\n \ttoRet.append(what);\n }\n // substring if constructed result length larger than nbTimes provided\n if(toRet.length() > nbTimes.intValue() && nbTimes.intValue() >= 0)\n {\n\t toRet.setLength(nbTimes.intValue());\n }\n return toRet.toString();\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "CompositionBuilder<T> setRepeat2(int repeats, int startrep, int endrep);", "CompositionBuilder<T> setRepeat1(int repeats);", "private String pad(String s, int l){ String p=\"\"; for(int i=0; i<l-s.length();i++)p+=\" \"; return \" \"+p+s; }", "public static String padLeftSpaces(final String s, final int n) {\n\t\treturn String.format(\"%1$#\" + n + \"s\", s);\n\t}", "public String padLeft(String s, int n) {\n\t\t\tif (n < 0) { n = 0; }\n\t\t\tif (s.equals(null)) { s = \"\"; }\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\ts = \" \" + s;\n\t\t\t}\n\t\treturn s;\n\t\t}", "static long repeatedString(String s, long n) {\n long a_count = 0;\n long total_a_count = 0;\n long modulo_s = 0;\n\n if(n>s.length()){\n for (int i=0; i<s.length(); i++)\n if(s.charAt(i)=='a') a_count++;\n\n total_a_count = a_count*(n/s.length());\n modulo_s = n%s.length();\n\n for (int i=0; i<modulo_s; i++)\n if(s.charAt(i)=='a') total_a_count++;\n\n return total_a_count;\n }\n\n else {\n for (int i=0; i<n; i++)\n if(s.charAt(i)=='a') a_count++;\n return a_count;\n }\n }", "private static String fillStr(String str, int len) throws IllegalArgumentException\n {\n // String buffer containing the leading zeros.\n StringBuffer leaders;\n\n // The requested length must be greater or equal to the\n // string length.\n if (len <= str.length()) {\n throw new IllegalArgumentException(\"len less than length of string\");\n }\n\n // Make the string buffer with leading zeros and fill it.\n leaders = new StringBuffer(len - str.length());\n for (int iChar = 0; iChar < (len - str.length()); iChar++) {\n leaders.append('0');\n }\n\n // Construct and return the resulting string.\n return (leaders.toString() + str);\n }", "static String infiniteString(String strInput, Long n) {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i <= n; i++) {\n //stringWriter.write( strInput );\n //stringBuilder.append( String.format(strInput));\n stringBuilder.append(strInput);\n System.out.println(\"Length:\" + String.valueOf(stringBuilder).length());\n /*if(stringBuilder.length() == n || stringBuilder.length() > 100)*/\n if (String.valueOf(stringBuilder).length() == n) {\n break;\n }\n }\n\n return String.valueOf(stringBuilder);\n }", "public final flipsParser.repeat_return repeat() throws RecognitionException {\n flipsParser.repeat_return retval = new flipsParser.repeat_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal78=null;\n Token string_literal79=null;\n Token string_literal81=null;\n Token string_literal82=null;\n Token string_literal83=null;\n Token string_literal86=null;\n flipsParser.statement_return statement80 = null;\n\n flipsParser.repeatCondition_return repeatCondition84 = null;\n\n flipsParser.statement_return statement85 = null;\n\n\n CommonTree string_literal78_tree=null;\n CommonTree string_literal79_tree=null;\n CommonTree string_literal81_tree=null;\n CommonTree string_literal82_tree=null;\n CommonTree string_literal83_tree=null;\n CommonTree string_literal86_tree=null;\n RewriteRuleTokenStream stream_138=new RewriteRuleTokenStream(adaptor,\"token 138\");\n RewriteRuleTokenStream stream_136=new RewriteRuleTokenStream(adaptor,\"token 136\");\n RewriteRuleTokenStream stream_137=new RewriteRuleTokenStream(adaptor,\"token 137\");\n RewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,\"rule statement\");\n RewriteRuleSubtreeStream stream_repeatCondition=new RewriteRuleSubtreeStream(adaptor,\"rule repeatCondition\");\n try {\n // flips.g:204:2: ( ( 'rpt' | 'repeat' ) ( statement )* 'end' -> ^( REPEAT ^( CONDITION FOREVER ) ^( EXECUTE ( statement )* ) ) | ( 'rpt' | 'repeat' ) repeatCondition ( statement )* 'end' -> ^( REPEAT ^( CONDITION repeatCondition ) ^( EXECUTE ( statement )* ) ) )\n int alt34=2;\n int LA34_0 = input.LA(1);\n\n if ( (LA34_0==136) ) {\n int LA34_1 = input.LA(2);\n\n if ( (LA34_1==For||(LA34_1>=BinaryLiteral && LA34_1<=HexLiteral)||LA34_1==142) ) {\n alt34=2;\n }\n else if ( (LA34_1==Identifier||(LA34_1>=136 && LA34_1<=138)||(LA34_1>=143 && LA34_1<=148)) ) {\n alt34=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 34, 1, input);\n\n throw nvae;\n }\n }\n else if ( (LA34_0==137) ) {\n int LA34_2 = input.LA(2);\n\n if ( (LA34_2==For||(LA34_2>=BinaryLiteral && LA34_2<=HexLiteral)||LA34_2==142) ) {\n alt34=2;\n }\n else if ( (LA34_2==Identifier||(LA34_2>=136 && LA34_2<=138)||(LA34_2>=143 && LA34_2<=148)) ) {\n alt34=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 34, 2, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 34, 0, input);\n\n throw nvae;\n }\n switch (alt34) {\n case 1 :\n // flips.g:204:4: ( 'rpt' | 'repeat' ) ( statement )* 'end'\n {\n // flips.g:204:4: ( 'rpt' | 'repeat' )\n int alt30=2;\n int LA30_0 = input.LA(1);\n\n if ( (LA30_0==136) ) {\n alt30=1;\n }\n else if ( (LA30_0==137) ) {\n alt30=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 30, 0, input);\n\n throw nvae;\n }\n switch (alt30) {\n case 1 :\n // flips.g:204:5: 'rpt'\n {\n string_literal78=(Token)match(input,136,FOLLOW_136_in_repeat1007); \n stream_136.add(string_literal78);\n\n\n }\n break;\n case 2 :\n // flips.g:204:11: 'repeat'\n {\n string_literal79=(Token)match(input,137,FOLLOW_137_in_repeat1009); \n stream_137.add(string_literal79);\n\n\n }\n break;\n\n }\n\n // flips.g:204:21: ( statement )*\n loop31:\n do {\n int alt31=2;\n int LA31_0 = input.LA(1);\n\n if ( (LA31_0==Identifier||(LA31_0>=136 && LA31_0<=137)||(LA31_0>=143 && LA31_0<=148)) ) {\n alt31=1;\n }\n\n\n switch (alt31) {\n \tcase 1 :\n \t // flips.g:204:21: statement\n \t {\n \t pushFollow(FOLLOW_statement_in_repeat1012);\n \t statement80=statement();\n\n \t state._fsp--;\n\n \t stream_statement.add(statement80.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop31;\n }\n } while (true);\n\n string_literal81=(Token)match(input,138,FOLLOW_138_in_repeat1015); \n stream_138.add(string_literal81);\n\n\n\n // AST REWRITE\n // elements: statement\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 205:2: -> ^( REPEAT ^( CONDITION FOREVER ) ^( EXECUTE ( statement )* ) )\n {\n // flips.g:205:5: ^( REPEAT ^( CONDITION FOREVER ) ^( EXECUTE ( statement )* ) )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REPEAT, \"REPEAT\"), root_1);\n\n // flips.g:205:14: ^( CONDITION FOREVER )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(CONDITION, \"CONDITION\"), root_2);\n\n adaptor.addChild(root_2, (CommonTree)adaptor.create(FOREVER, \"FOREVER\"));\n\n adaptor.addChild(root_1, root_2);\n }\n // flips.g:205:35: ^( EXECUTE ( statement )* )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EXECUTE, \"EXECUTE\"), root_2);\n\n // flips.g:205:45: ( statement )*\n while ( stream_statement.hasNext() ) {\n adaptor.addChild(root_2, stream_statement.nextTree());\n\n }\n stream_statement.reset();\n\n adaptor.addChild(root_1, root_2);\n }\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:206:4: ( 'rpt' | 'repeat' ) repeatCondition ( statement )* 'end'\n {\n // flips.g:206:4: ( 'rpt' | 'repeat' )\n int alt32=2;\n int LA32_0 = input.LA(1);\n\n if ( (LA32_0==136) ) {\n alt32=1;\n }\n else if ( (LA32_0==137) ) {\n alt32=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 32, 0, input);\n\n throw nvae;\n }\n switch (alt32) {\n case 1 :\n // flips.g:206:5: 'rpt'\n {\n string_literal82=(Token)match(input,136,FOLLOW_136_in_repeat1041); \n stream_136.add(string_literal82);\n\n\n }\n break;\n case 2 :\n // flips.g:206:11: 'repeat'\n {\n string_literal83=(Token)match(input,137,FOLLOW_137_in_repeat1043); \n stream_137.add(string_literal83);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_repeatCondition_in_repeat1046);\n repeatCondition84=repeatCondition();\n\n state._fsp--;\n\n stream_repeatCondition.add(repeatCondition84.getTree());\n // flips.g:206:37: ( statement )*\n loop33:\n do {\n int alt33=2;\n int LA33_0 = input.LA(1);\n\n if ( (LA33_0==Identifier||(LA33_0>=136 && LA33_0<=137)||(LA33_0>=143 && LA33_0<=148)) ) {\n alt33=1;\n }\n\n\n switch (alt33) {\n \tcase 1 :\n \t // flips.g:206:37: statement\n \t {\n \t pushFollow(FOLLOW_statement_in_repeat1048);\n \t statement85=statement();\n\n \t state._fsp--;\n\n \t stream_statement.add(statement85.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop33;\n }\n } while (true);\n\n string_literal86=(Token)match(input,138,FOLLOW_138_in_repeat1051); \n stream_138.add(string_literal86);\n\n\n\n // AST REWRITE\n // elements: statement, repeatCondition\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 207:2: -> ^( REPEAT ^( CONDITION repeatCondition ) ^( EXECUTE ( statement )* ) )\n {\n // flips.g:207:5: ^( REPEAT ^( CONDITION repeatCondition ) ^( EXECUTE ( statement )* ) )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(REPEAT, \"REPEAT\"), root_1);\n\n // flips.g:207:14: ^( CONDITION repeatCondition )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(CONDITION, \"CONDITION\"), root_2);\n\n adaptor.addChild(root_2, stream_repeatCondition.nextTree());\n\n adaptor.addChild(root_1, root_2);\n }\n // flips.g:207:43: ^( EXECUTE ( statement )* )\n {\n CommonTree root_2 = (CommonTree)adaptor.nil();\n root_2 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(EXECUTE, \"EXECUTE\"), root_2);\n\n // flips.g:207:53: ( statement )*\n while ( stream_statement.hasNext() ) {\n adaptor.addChild(root_2, stream_statement.nextTree());\n\n }\n stream_statement.reset();\n\n adaptor.addChild(root_1, root_2);\n }\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "final public void repeat() throws ParseException {\n jj_consume_token(REPEAT);\n numero();\n label_4:\n while (true) {\n if (jj_2_37(4)) {\n ;\n } else {\n break label_4;\n }\n jj_consume_token(34);\n }\n jj_consume_token(37);\n label_5:\n while (true) {\n if (jj_2_38(4)) {\n ;\n } else {\n break label_5;\n }\n jj_consume_token(34);\n }\n if (jj_2_39(4)) {\n command(salidaS);\n } else {\n ;\n }\n basicCommand();\n jj_consume_token(38);\n }", "public void Repeat(boolean repeat);", "public String padRight(String s, int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tif (s.equals(null)) { s = \"\"; }\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}", "private String LeftPad(String str, int length)\n {\n //pad and return String\n return String.format(\"%1$\" + length + \"s\", str);\n }", "public static void permuteString(String prefix, String remaining) {\n // System.out.println(prefix + \"-->\" + remaining);\n int n = remaining.length();\n if (n == 0) {\n System.out.println(prefix);\n return;\n }\n for (int i = 0; i < n; i++) {\n permuteString(prefix + remaining.charAt(i),\n remaining.substring(0, i) + remaining.substring(i + 1));\n }\n }", "public static void main(String[] args) {\n System.out.println(repeatedString(\"ojowrdcpavatfacuunxycyrmpbkvaxyrsgquwehhurnicgicmrpmgegftjszgvsgqavcrvdtsxlkxjpqtlnkjuyraknwxmnthfpt\", 685118368975L));\n\n }", "private static String padRight(String s, int n) {\n n = n - (countLength(s) - s.length());//한글이 있는 경우 다시 글수를 줄여준다.\n return String.format(\"%1$-\" + n + \"s\", s);\n }", "public void setRepeat(boolean repeat) {\n this.repeat = repeat;\n }", "private static void printRepeated(String str, int times, boolean newLine){\n for(int i = 0; i < times; i++){\n System.out.print(str);\n }\n if(newLine){\n System.out.println();\n }\n }", "public static String fillZero(String string) {\n\t\tif(string.length() == 2) {\n\t\t\treturn string;\n\t\t}else {\n\t\t\treturn \"0\" + string;\n\t\t}\n\t}", "public String padSpace(int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tString s = \"\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}", "@Test\n\tvoid testLongestRepeatingCharacterReplacement() {\n\t\tLongestRepeatingCharacterReplacement tester = new LongestRepeatingCharacterReplacement();\n\t\tassertEquals(4, tester.characterReplacement(\"ABAB\", 2));\n\t\tassertEquals(4, tester.characterReplacement(\"AABABBA\", 1));\n\t\tassertEquals(4, tester.characterReplacement(\"ABBB\", 2));\n\t\tassertEquals(1, tester.characterReplacement(\"A\", 2));\n\t\tassertEquals(0, tester.characterReplacement(\"\", 2));\n\t}", "public void nonRepeatingCharacter(String s)\n\t{\n\t\tMap<Character, Integer> charMap = new LinkedHashMap<>();\n\t\tCharacter unique = null;\n\t\tchar[] stringArray = s.toCharArray();\n\t\tint repeat =0;\n\t\tfor(int i=0; i< stringArray.length; i++ )\n\t\t{\n\t\t\tif(!charMap.keySet().contains(stringArray[i]))\n\t\t\t{\n\t\t\t\tcharMap.put(stringArray[i], 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tInteger value = charMap.get(stringArray[i]);\n\t\t\t\tvalue++;\n\t\t\t\tcharMap.put(stringArray[i], value);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(charMap.toString());\n\t\tfor(Character i : charMap.keySet())\n\t\t{\n\t\t\tint value = charMap.get(i);\n\t\t\tif(value == 1)\n\t\t\t{\n\t\t\t\tunique = i;\n\t\t\t\t//System.out.println(\"found unique \"+ unique);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0; i< stringArray.length; i++ )\n\t\t{\n\t\t\tif(unique!= null && stringArray[i] == unique)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static String padRight(String s, int n) {\n\t\treturn String.format(\"%1$-\" + n + \"s\", s);\n\t}", "public String multipleEndings(String str) {\n int length = str.length();\n return str.substring(length -2).repeat(3);\n }", "public String nTwice(String str, int n) {\r\n String result = str;\r\n\r\n if (str.length() > n - 1) {\r\n String frontChars = str.substring(0, n);\r\n String backChars = str.substring(str.length() - n, str.length());\r\n\r\n result = frontChars + backChars;\r\n }\r\n\r\n return result;\r\n }", "public static int repeats (String sent) {\n throw new UnsupportedOperationException();\n }", "public static String generateString(int count) {\r\n String ALPHA_NUMERIC_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n StringBuilder builder = new StringBuilder();\r\n while (count-- != 0) {\r\n int character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length());\r\n builder.append(ALPHA_NUMERIC_STRING.charAt(character));\r\n }\r\n return builder.toString();\r\n }", "@Override\n\tpublic int withRepeatCount() {\n\t\treturn 0;\n\t}", "public static String padRightSpaces(final String s, final int n) {\n\t\treturn String.format(\"%1$-\" + n + \"s\", s);\n\t}", "public static String fill3(String valueStr) {\n\t\t\r\n\t\tif (valueStr.length()==1) return valueStr+\"00\";\r\n\t\tif (valueStr.length()==2) return valueStr+\"0\";\r\n\t\t//if (valueStr.length()==6) return valueStr+\"00000\";\r\n\t\t\r\n\t\treturn valueStr;\r\n\t}", "public void setRepeat(Boolean repeat)\n\t{\n\t\tthis.repeat = repeat;\n\t}", "public static String lpad(String s, int n, char c)\n {\n String lpad = replicate(c,n-s.length())+s;\n return lpad;\n }", "public Builder clearRepeatCount() {\n bitField0_ = (bitField0_ & ~0x00000004);\n repeatCount_ = 0;\n onChanged();\n return this;\n }", "public static Character nonRepeating(String s) {\n Map<Character, Integer> charCount = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (charCount.containsKey(c)) {\n charCount.put(c, charCount.get(c) + 1);\n } else {\n charCount.put(c, 1);\n }\n }\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (charCount.get(c) == 1) {\n return c;\n }\n }\n return null;\n }", "public Builder setRepeatCount(int value) {\n\n repeatCount_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public String addEmptySpace(int spaces) {\n\n String stringOfEmptySpace = \"\";\n\n for (int i = 0; i < spaces; i++)\n stringOfEmptySpace += \" \";\n\n return stringOfEmptySpace;\n }", "private static char firstNonRepeatingCharacterV2(String str) {\n if(str == null) return '_';\n Map<Character, Integer> charCountMap = new HashMap<>();\n Set<Character> linkedHashSet = new LinkedHashSet<>();\n\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountMap.containsKey(ch)) {\n charCountMap.put(ch, charCountMap.get(ch) + 1); // do not need this step\n linkedHashSet.remove(ch);\n } else {\n charCountMap.put(ch, 1);\n linkedHashSet.add(ch);\n }\n }\n //The first character in the linkedHashSet will be the firstNonRepeatingCharacter.\n Iterator<Character> itr = linkedHashSet.iterator();\n if(itr.hasNext()){\n return itr.next();\n } else {\n return '_';\n }\n }", "RepeatStatement createRepeatStatement();", "@Nonnull\r\n\tpublic static <T> Observable<T> repeat(\r\n\t\t\tfinal T value,\r\n\t\t\tfinal int count) {\r\n\t\treturn repeat(value, count, scheduler());\r\n\t}", "public static String pattern(int n) {\n\t\tif(n < 1) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tString sa[] = new String[n];\n\t\tString s = \"\";\n\n\t\tint x = 0;\n\t\tsa[0] = Integer.toString(n);\n\t\twhile(x < sa.length-1) {\n\t\t\tsa[x+1] = sa[x]+Integer.toString(n-1);\n\t\t\tx++; n--;\n\t\t}\n\t\t\n\n\t\tint i = sa.length;\n\t\t//int i =0;\n\t\twhile(i > 0) {\n\t\t\t//if(s.substring(0, i-1).length() >= m.length()) \n\t\t\t\t//s += \"\\n\"+s.substring(0, i-1);\n\t\t\t//s += \"\\n\"+s.substring(0,i-1);\n\t\t\ts += sa[i-1]+\"\\n\";\n\t\t\ti--;\n\t\t}\t\n\t\t\n\t\t\n\t\treturn s.trim();\n\t}", "public static String padR(String s, int width) {\n\t\tif (s == null) {\n\t\t\ts = \"null\";\n\t\t}\n\t\twhile (s.length() < width) {\n\t\t\ts += \" \";\n\t\t}\n\t\treturn s;\n\t}", "public static String findRepetitivePattern(String s) {\n if (s.isEmpty()) {\n return s;\n }\n int n = 0;\n int pLength = 1;\n\n int i = 1;\n char[] arr = s.toCharArray();\n while (i < arr.length) {\n\n boolean patternMatched = true;\n for (int j = 0; j < pLength && i + j < arr.length; ++j) {\n int k = i + j;\n if (k >= arr.length || arr[j] != arr[k]) {\n patternMatched = false;\n break;\n }\n }\n if (patternMatched) {\n n++;\n i += pLength;\n } else {\n i += 1;\n pLength = i;\n n = 0;\n }\n }\n return String.copyValueOf(arr, 0, pLength);\n }", "private static void stringConcat(String[] ss, int n) {\n Timer t = new Timer(); \n String res = \"\";\n for (int i=0; i<n; i++) \n res += ss[i];\n System.out.format(\"Result length:%7d; time:%8.3f sec\\n\" , res.length(), t.Check());\n }", "public boolean repeatedSubstringPattern(String s) {\n int len = s.length();\n for (int i = len / 2; i >= 1; i--) {\n if (len % i == 0) {\n int num = len / i;\n String substr = s.substring(0, i);\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < num; j++) {\n sb.append(substr);\n }\n if (sb.toString().equals(s)) {\n return true;\n }\n }\n }\n\n return false;\n }", "private static String leftPadZeroes(String s, int nZeroes){\r\n if (s.indexOf(\".\") == -1) {\r\n s = String.format(\"%\" + String.valueOf(nZeroes) +\"s\", s);\r\n } else {\r\n s = String.format(\"%\" + String.valueOf(s.length() - s.indexOf(\".\") + nZeroes) +\"s\", s);\r\n }\r\n s = s.replace(\" \", \"0\");\r\n\r\n return s;\r\n }", "public static String lpad(String s, int n, char c)\r\n\t{\r\n\t\tint charsToAdd = n - s.length();\r\n\t\treturn replicate(c, charsToAdd) + s;\r\n\t}", "public static String tabsNTimes(int tabsNumber) {\n return repeatTextNTimes(tabsNumber, TAB);\n }", "public static String findRepeatingSequence(String input){\n\t char [] inputArray = input.toCharArray();\n\t StringBuffer sequence = new StringBuffer();\n\t\tfor (int i = 0; i < inputArray.length - 1; i++) {\n\t\t\tif (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\n\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\n\t\t\t\t\twhile (Character.toString(inputArray[i]).equals(Character.toString(inputArray[i + 1]))) {\n\t\t\t\t\t\tsequence.append(Character.toString(inputArray[i]));\n\t\t\t\t\t\tif (i + 1 < inputArray.length - 1) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\tif (sequence.length()>0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t }\n\t\n\treturn sequence.toString();\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Input: abXYabc, 1\");\r\n\t\tSystem.out.println(\"Output: \" + doesRepeat(\"abXYabc\", 1));\r\n\t\t\r\n\t\tSystem.out.println(\"Input: abXYabc, 2\");\r\n\t\tSystem.out.println(\"Output: \" + doesRepeat(\"abXYabc\", 2));\r\n\t\t\r\n\t\tSystem.out.println(\"Input: abXYabc, 3\");\r\n\t\tSystem.out.println(\"Output: \" + doesRepeat(\"abXYabc\", 3));\r\n\t\t\r\n\r\n\t}", "public boolean strCopies(String str, String sub, int n) {\n//Solution to problem coming soon\n}", "public abstract void createLongestRepeatedSubstring();", "void writeRepetitionCount(int count);", "public int getRepeat() {\n return repeat;\n }", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "public static void permutation(String str) { \n permutation(\"\", str); \n}", "public static String moreLenString(int n) {\n\t\tif (n <= 0) {\n\t\t\tthrow new ArgsErrorException();\n\t\t}\n\t\treturn String.format(RString.MORE_LEN_STRING, n);\n\t}", "static String padToLength(String s, int len) {\n\t\tStringBuffer sb = new StringBuffer(len);\n\t\tsb.append(s);\n\t\tfor (int i = s.length(); i < len; i++) sb.append(' ');\n\t\treturn sb.toString();\n\t}", "@Test\n\tpublic void testData1() {\t\n\t\tSystem.out.println(\"TestData1\");\n//\t\tString input = \"Teammate\";\n\t\tString input = \"paypal\";\n\t\trepeatingCharacter(input);\n\t}", "public String createPassword() {\n while (i < length){\n temp += abc.charAt(random.nextInt(26));\n i++;\n }\n\n this.password = this.temp;\n this.temp = \"\";\n this.i = 0;\n return password;\n }", "private static String padString(String source) {\r\n\r\n String paddedString = source;\r\n char paddingChar = ' ';\r\n int size = 16;\r\n int x = paddedString.length() % size;\r\n int padLength = size - x;\r\n for (int i = 0; i < padLength; i++) {\r\n paddedString += paddingChar;\r\n }\r\n\r\n return paddedString;\r\n }", "public static void repeatSome() {\n ComposableFutures.repeat(5, \"initial value\", ComposableFuturesHelpers::someIo);\n\n // .retry(times, [optional timeout], action) will retry your async operation N times, and will\n // stop on first successful returned value\n ComposableFutures.retry(5, ComposableFuturesHelpers::randomIo);\n }", "private String createAlphabeticalIndex(int replicateIndex) {\n StringBuilder builder = new StringBuilder();\n while (replicateIndex >= 26) {\n builder.append((char) (97 + (replicateIndex % 26)));\n replicateIndex /= 26;\n replicateIndex--;\n }\n builder.append((char) (97 + replicateIndex));\n return builder.reverse().toString();\n\n }", "private static String pad(String s, int len, char j) {\n\n\t\tif (s.length() >= len) {\n\t\t\treturn s;\n\t\t}\n\n\t\tStringBuffer sb = new StringBuffer();\n\n\t\tfor (int i = 0; i < len - s.length(); ++i) {\n\t\t\tsb.append(j);\n\t\t}\n\t\tsb.append(s);\n\n\t\treturn sb.toString();\n\t}", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "static char nonrepeatingCharacter(String S)\n {\n int arr[]=new int[256];\n for(int i=0;i<S.length();i++){\n arr[S.charAt(i)]++;\n }\n for(int i=0;i<S.length();i++){\n if(arr[S.charAt(i)]==1)\n return S.charAt(i);\n }\n return '$';\n }", "private static char firstNonRepeatingCharacterV1(String str) {\n if(str == null) return '_';\n Map<Character, Integer> charCountMap = new HashMap<>();\n Set<Character> linkedHashSet = new LinkedHashSet<>();\n\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountMap.containsKey(ch)) {\n charCountMap.put(ch, charCountMap.get(ch) + 1); // do not need this step\n } else {\n charCountMap.put(ch, 1);\n }\n }\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountMap.get(ch) == 1) {\n return ch;\n }\n }\n return '_';\n }", "public static String formString(int n)\n {\n String temp=\"\";\n for(int i=0;i<n;i++)\n {\n temp=temp+'c';\n }\n return temp;\n }" ]
[ "0.735822", "0.7318258", "0.7216907", "0.69211984", "0.67610914", "0.6755033", "0.66883445", "0.668296", "0.66726726", "0.6631913", "0.66300076", "0.6621891", "0.6347565", "0.62698954", "0.62338066", "0.62048995", "0.618322", "0.6041881", "0.6036378", "0.59948105", "0.59709823", "0.5948814", "0.59150815", "0.58587015", "0.57884526", "0.578005", "0.57794493", "0.57674766", "0.5713539", "0.56640726", "0.5620942", "0.5610412", "0.56061244", "0.5583608", "0.55177563", "0.54881865", "0.5460409", "0.54580986", "0.5434265", "0.54329056", "0.542632", "0.54228437", "0.53776026", "0.53663087", "0.531539", "0.5291575", "0.5284941", "0.5252865", "0.52528083", "0.525232", "0.5245176", "0.5229937", "0.5222565", "0.5218284", "0.52033997", "0.5197548", "0.51623946", "0.5152181", "0.51416844", "0.5136027", "0.51247966", "0.5122071", "0.5105636", "0.5097887", "0.50709033", "0.50698525", "0.50662583", "0.5056594", "0.50244206", "0.502222", "0.5018558", "0.5013026", "0.50109196", "0.499347", "0.49917373", "0.4986033", "0.4968595", "0.49636048", "0.4963602", "0.49626622", "0.49452245", "0.4941104", "0.49382368", "0.49378118", "0.49378076", "0.49232817", "0.4916032", "0.49064425", "0.4896975", "0.4894418", "0.48943955", "0.48894867", "0.48798263", "0.48739788", "0.48714927", "0.4866993", "0.48644713", "0.48594543", "0.48533732", "0.485085" ]
0.7741939
0
Create instances of all configuration model elements.
public interface ConfigModelFactory { /** * Create an instance of the <code>ConfigModel</code> * * @return an instance of the configuration model */ ConfigModel createInstanceOfConfigModel(); /** * Create an instance of the <code>InstanceModel</code> * * @return an instance of the instance model */ InstanceModel createInstanceOfInstanceModel(); /** * Create an instance of the <code>CsticModel</code> * * @return an instance of the characteristic model */ CsticModel createInstanceOfCsticModel(); /** * Create an instance of the <code>CsticValueModel</code> * * @param valueType * The containing Cstic value type * @return an instance of the characteristic value model */ CsticValueModel createInstanceOfCsticValueModel(int valueType); /** * Create an instance of the <code>CsticGroupModel</code> * * @return an instance of the characteristic group model */ CsticGroupModel createInstanceOfCsticGroupModel(); /** * Create an instance of the <code>PriceModel</code> * * @return an instance of the price model */ PriceModel createInstanceOfPriceModel(); /** * Create an instance of the <code>SolvableConflictModel</code> * * @return an instance of the Solvable Conflict Model */ SolvableConflictModel createInstanceOfSolvableConflictModel(); /** * Create an instance of the <code>ConflictingAssumptionModel</code> * * @return an instance of the Conflicting Assumption Model */ ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel(); /** * Create an instance of the <code>PriceModel</code> * * @return an instance of the price model */ PriceModel getZeroPriceModel(); /** * Create an instance of the <code>PriceSummaryModel</code> * * @return an instance of the price summary model */ PriceSummaryModel createInstanceOfPriceSummaryModel(); /** * @return a builder to construct {@link ProductConfigMessage} objects */ default ProductConfigMessageBuilder createProductConfigMessageBuilder() { return new ProductConfigMessageBuilder(); } /** * Create an instance of the <code>ProductConfigMessage</code><br> * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType * * @param message * localized message * @param key * message key, should be unique together with message source * @param severity * message severity * @param source * message source, should be unique together with message key * @return a message instance * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead */ @Deprecated(since = "1808", forRemoval=true) default ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key, final ProductConfigMessageSeverity severity, final ProductConfigMessageSource source) { return createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT); } /** * Create an instance of the <code>ProductConfigMessage</code><br> * * @param message * localized message * @param key * message key, should be unique together with message source * @param severity * message severity * @param source * message source, should be unique together with message key * @param subType * optional sub type of the message source * @return a message instance * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead */ @Deprecated(since = "1808", forRemoval=true) ProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity, ProductConfigMessageSource source, ProductConfigMessageSourceSubType subType); /** * Create an instance of the <code>VariantConditionModel</code> * * @return an instance of the variant condition model */ VariantConditionModel createInstanceOfVariantConditionModel(); /** * @return class name of the {@link PriceSummaryModel} implementation */ String getTargetClassNamePriceSummaryModel(); /** * @return class name of the {@link PriceModel} implementation */ String getTargetClassNamePriceModel(); /** * @return class name of the {@link CsticGroupModel} implementation */ String getTargetClassNameCsticGroupModel(); /** * @return class name of the {@link CsticValueModel} implementation */ String getTargetClassNameCsticValueModel(); /** * @return class name of the {@link CsticModel} implementation */ String getTargetClassNameCsticModel(); /** * @return class name of the {@link InstanceModel} implementation */ String getTargetClassNameInstanceModel(); /** * @return class name of the {@link ConfigModel} implementation */ String getTargetClassNameConfigModel(); /** * @return class name of the {@link SolvableConflictModel} implementation */ String getTargetClassNameSolvableConflictModel(); /** * @return class name of the {@link ConflictingAssumptionModel} implementation */ String getTargetClassNameConflictingAssumptionModel(); /** * @return class name of the {@link VariantConditionModel} implementation */ String getTargetClassNameVariantConditionModel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }", "ConfigModel createInstanceOfConfigModel();", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }", "public abstract CONFIG build();", "public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }", "public GameConfigure()\n {\n trackItems = new Stack<String>();\n random = new Random();\n visits = new Stack<Room>();\n items = new ArrayList<Item>(); \n rooms = new ArrayList<Room>(); \n characters = new ArrayList<Person>();\n\n // Creates all the items, people, rooms and the player.\n resetGame();\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "protected Configuration() {\r\n }", "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 }", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "private AppConfigContent() {}", "final private void setupAttributes() {\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_DPI, DEFAULT_BASE_DPI));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_DENSITY, DEFAULT_BASE_DENSITY));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_SCREEN, DEFAULT_BASE_SCREEN));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_PROPORTION_FROM, DEFAULT_PROPORTION_FROM));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_PROPORTION_MODE, DEFAULT_PROPORTION_MODES));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_CALIBRATE_DPI, DEFAULT_CALIBRATE_DPI));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_RESTORER_NOTIFICATION, new Object()));\r\n\t}", "public abstract Configuration configuration();", "private Config() {\n }", "public SimulationConfig() {\r\n\t}", "public void loadConfigs() {\n\t configYML = new ConfigYML();\n\t configYML.setup();\n }", "public List<ATNConfig> elements() { return configs; }", "private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "private ConfigurationKeys() {\n // empty constructor.\n }", "private CollectionPOJODescriptorGenerator(List<MongoElement> elements) {\n this.genElements = elements;\n }", "public NBodiesConfigurationView() {\n\t\tinitializeGUI();\n\t}", "private ConfigProperties() {\n\n }", "public Element getConfig() {\n Element out = new Element(getElementName(),MarsModel.NAMESPACE);\n out.setAttribute(\"enabled\",String.valueOf(enabled));\n out.setAttribute(\"xmlfile\",xmlfile.getPath());\n out.setAttribute(\"period\",String.valueOf(period));\n out.setAttribute(\"xslthref\",xslthref);\n return out;\n }", "public IheConfiguration() {\n }", "private Configuration getConfig() {\n final Configuration config = new Configuration();\n for (final Field field : getClass().getDeclaredFields()) {\n try {\n final Field configField = Configuration.class.getDeclaredField(field.getName());\n field.setAccessible(true);\n configField.setAccessible(true);\n\n final Object value = field.get(this);\n if (value != null) {\n configField.set(config, value);\n getLog().debug(\"using \" + field.getName() + \" = \" + value);\n }\n } catch (final NoSuchFieldException nsfe) {\n // ignored\n } catch (final Exception e) {\n getLog().warn(\"can't initialize attribute \" + field.getName());\n }\n\n }\n if (containerProperties != null) {\n final Properties props = new Properties();\n props.putAll(containerProperties);\n config.setProperties(props);\n }\n if (forceJspDevelopment) {\n if (config.getProperties() == null) {\n config.setProperties(new Properties());\n }\n config.getProperties().put(\"tomee.jsp-development\", \"true\");\n }\n return config;\n }", "@BeforeClass\r\n public static void generateConfigurationOfClassifiersAndLoadData() {\r\n\r\n //one classifier in the ensemble will be ClassifierModel (Model for enach output class)\r\n GaussianMultiModelConfig gmc = new GaussianMultiModelConfig();\r\n gmc.setTrainerClassName(\"QuasiNewtonTrainer\");\r\n gmc.setTrainerCfg(new QuasiNewtonConfig());\r\n LinearModelConfig lmcpso = new LinearModelConfig();\r\n lmcpso.setTrainerClassName(\"PSOTrainer\");\r\n lmcpso.setTrainerCfg(new PSOConfig());\r\n ClassifierModelConfig clc = new ClassifierModelConfig();\r\n clc.setClassModelsDef(BaseModelsDefinition.RANDOM);\r\n clc.addClassModelCfg(lmcpso);\r\n clc.addClassModelCfg(gmc);\r\n clc.setClassRef(ClassifierModel.class);\r\n\r\n //todo second classifier in the ensemble will be Weka decision tree\r\n\r\n ClassifierBaggingConfig bagc = new ClassifierBaggingConfig();\r\n bagc.setClassifiersNumber(2);\r\n bagc.setBaseClassifiersDef(BaseModelsDefinition.UNIFORM);\r\n bagc.addBaseClassifierCfg(clc);\r\n\r\n generatedCfg = bagc;\r\n ConfigurationFactory.saveConfiguration(generatedCfg, cfgfilename);\r\n\r\n data = new FileGameData(datafilename);\r\n\r\n }", "public MecBasicsConfig()\n {\n\n }", "public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }", "public ApplicationDefinitionProperties() {\n }", "@SuppressWarnings(\"unchecked\")\n private void initElements() {\n\n try {\n\n Elements marker = null;\n\n for (Annotation annotation : this.getClass().getDeclaredAnnotations()) {\n if(annotation instanceof Elements) {\n marker = (Elements) annotation;\n }\n }\n\n if(marker == null) {\n String msg = \"Expected @Elements annotation on Screen class\";\n log.error(msg);\n throw new FrameworkException(msg);\n }\n\n PlatformType platform = DriverWrapper.getActivePlatform();\n Validate.notNull(platform);\n\n Class<? extends BaseElements> elementsClass = null;\n\n if(marker.elements().equals(BaseElements.class)) {\n // do we have individual iOS or Android elements?\n if(PlatformType.ANDROID == platform) {\n elementsClass = marker.androidElements();\n\n } else if(PlatformType.IOS == platform) {\n elementsClass = marker.iosElements();\n } else {\n throw new IllegalArgumentException(\"Un-supported platform\");\n }\n\n } else {\n // just take combined merged elements\n elementsClass = marker.elements();\n }\n\n if(marker.elements().equals(BaseElements.class)) {\n throw new IllegalArgumentException(\"Expected that you provide an elements class\");\n }\n\n Constructor<? extends BaseElements> constructor = elementsClass.getConstructor();\n this.elements = constructor.newInstance();\n\n PageFactory.initElements(new AppiumFieldDecorator(driver), elements);\n\n this.elements.init(driver);\n\n } catch(Exception e) {\n\n log.error(\"Failed to initialize page elements\", e);\n throw new FrameworkException(e);\n }\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "private void initPortSettings() {\n\n\t\tList<PortSpecification> portSpecification = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getPort().getPortSpecification();\n\n\t\tportDetails = new ArrayList<PortDetails>();\n\t\tports = new HashMap<String, Port>();\n\t\tPortTypeEnum pEnum = null;\n\t\tPortAlignmentEnum pAlignEnum = null;\n\n\t\tfor (PortSpecification p : portSpecification) {\n\t\t\tpAlignEnum = PortAlignmentEnum.fromValue(p.getPortAlignment().value());\n\t\t\tsetPortCount(pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically());\n\t\t\tfor(PortInfo portInfo :p.getPort()){\n\t\t\t\tString portTerminal = portInfo.getPortTerminal();\n\t\t\t\tpEnum = PortTypeEnum.fromValue(portInfo.getTypeOfPort().value());\n\t\t\t\t\n\t\t\t\tPort port = new Port(portInfo.getLabelOfPort(),\n\t\t\t\t\t\tportTerminal, this, getNumberOfPortsForAlignment(pAlignEnum), pEnum\n\t\t\t\t\t\t\t\t, portInfo.getSequenceOfPort(), p.isAllowMultipleLinks(), p.isLinkMandatory(), pAlignEnum);\n\t\t\t\tlogger.trace(\"Adding portTerminal {}\", portTerminal);\n\t\t\t\t\n\t\t\t\tports.put(portTerminal, port);\n\t\t\t}\n\t\t\tPortDetails pd = new PortDetails(ports, pAlignEnum, p.getNumberOfPorts(), p.isChangePortCountDynamically(), p.isAllowMultipleLinks(), p.isLinkMandatory());\n\t\t\tportDetails.add(pd);\n\t\t}\n\t\t\n\t}", "public void setDependencyGeneratorElement(IConfigurationElement element);", "public GeneralModel() {\n initThemes();\n initProperties();\n }", "private void initUIElements() \n\t{\n\t\t// Init UI element collections.\n\t\tbarcharts\t\t= new HashMap<String, BarChart>();\n\t\t//spinners\t\t= new HashMap<String, Spinner<Float>>();\n\t\trangeSliders\t= new HashMap<String, RangeSlider>();\n\t\tvBoxes\t\t\t= new HashMap<String, VBox>();\n\t\t\n\t\t// Remove deprecated UI elements in parameter configuration grid pane.\n\t\tint vboxCount = 0;\n\t\tfor (Object child : parameterConfiguration_gridPane.getChildren().toArray()) {\n\t\t\tNode node = (Node)child;\n\t\t\t\n\t\t\t//System.out.println(node.getClass().getName());\n\t\t\tswitch (node.getClass().getName()) \n\t\t\t{\n\t \t\t// Replace TextFields with numeric steppers / spinners.\n\t \t\tcase \"javafx.scene.control.TextField\":\n\t \t\t\t// Set initial values.\n\t \t\t\tif (node.getId().contains(\"min\"))\n\t \t\t\t\t((TextField)node).setText(\"0\");\n\t \t\t\telse\n\t \t\t\t\t((TextField)node).setText(\"100\");\n\t \t\tbreak;\n\t \t\t\n\t \t\tcase \"javafx.scene.layout.VBox\":\n\t \t\t\tVBox currentVBox = ((VBox)node);\n\t \t\t\t// Look for Sliders in VBox nodes; replace with RangeSliders.\n\t \t\t\tfor (Object vboxChild : currentVBox.getChildren().toArray()) {\n\t \t\t\t\tNode vboxNode = (Node)vboxChild;\n\t \t\t\t\t\n\t \t\t\t\tif (vboxNode.getClass().getName() == \"javafx.scene.control.Slider\") {\n\t \t\t\t\t\tcurrentVBox.getChildren().remove(vboxNode);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t// Store references to VBoxes.\n\t \t\t\tswitch(vboxCount++)\n\t \t\t\t{\n\t \t\t\t\tcase 0:\n\t \t\t\t\t\tvBoxes.put(\"alpha\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 1:\n\t \t\t\t\t\tvBoxes.put(\"eta\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 2:\n\t \t\t\t\t\tvBoxes.put(\"kappa\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\tbreak;\n\t \t}\n\t }\n\t\t\n\t\t// Init barcharts.\n\t\tinitBarcharts();\n\t\t\n\t\t// Init range sliders.\n\t\tinitRangeSliders();\n\t\t\n\t\t// Init textfields.\n\t\tinitTextFields();\n\t\t\n\t\t// Init combobox.\n\t\tinitComboBoxes();\n\t}", "public void instantiateTomes(){\n for (String tomeKey : this.getConfig().getConfigurationSection(\"tomes\").getKeys(false)){\n\n if (this.getConfig().getBoolean(\"tomes.\" + tomeKey + \".enabled\") == false){\n continue;\n }\n\n ArrayList<IQuest> questsToAddToTome = new ArrayList<IQuest>();\n for (String questKey : this.getConfig().getConfigurationSection(\"tomes.\" + tomeKey + \".quests\").getKeys(false)){\n for (IQuest quest : quests){\n if (questKey.equalsIgnoreCase(quest.getQuestName())){\n questsToAddToTome.add(quest);\n }\n }\n }\n\n //Fetch rewards of each tome\n ConfigurationSection itemsSection = Tomes.getInstance().getConfig().getConfigurationSection(\"tomes.\" + tomeKey + \".rewards.items\");\n ConfigurationSection weightsSection = Tomes.getInstance().getConfig().getConfigurationSection(\"tomes.\" + tomeKey + \".rewards.weights\");\n\n ArrayList<ItemStack> rewardsArray = new ArrayList<ItemStack>();\n\n if (itemsSection != null) {\n for (String key : itemsSection.getKeys(false)) {\n ItemStack item = itemsSection.getItemStack(key);\n\n for (int i = 0; i < Integer.parseInt(weightsSection.getString(key)); i++) {\n rewardsArray.add(item);\n }\n }\n }\n\n ConfigurationSection tomeConfig = this.getConfig().getConfigurationSection(\"tomes.\" + tomeKey);\n tomes.add(new Tome(\n tomeKey,\n tomeConfig.getString(\"displayName\"),\n tomeConfig.getInt(\"numberOfQuests\"),\n tomeConfig.getInt(\"cost\"),\n questsToAddToTome,\n rewardsArray\n ));\n\n\n }\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbaseElementEClass = createEClass(BASE_ELEMENT);\n\t\tcreateEReference(baseElementEClass, BASE_ELEMENT__KEY_VALUE_MAPS);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__ID);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__NAME);\n\t\tcreateEAttribute(baseElementEClass, BASE_ELEMENT__DESCRIPTION);\n\n\t\tkeyValueMapEClass = createEClass(KEY_VALUE_MAP);\n\t\tcreateEAttribute(keyValueMapEClass, KEY_VALUE_MAP__KEY);\n\t\tcreateEReference(keyValueMapEClass, KEY_VALUE_MAP__VALUES);\n\n\t\tvalueEClass = createEClass(VALUE);\n\t\tcreateEAttribute(valueEClass, VALUE__TAG);\n\t\tcreateEAttribute(valueEClass, VALUE__VALUE);\n\n\t\t// Create enums\n\t\ttimeUnitEEnum = createEEnum(TIME_UNIT);\n\t}", "private void init() {\n\t\tthis.model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\tthis.model.setNsPrefixes(INamespace.NAMSESPACE_MAP);\n\n\t\t// create classes and properties\n\t\tcreateClasses();\n\t\tcreateDatatypeProperties();\n\t\tcreateObjectProperties();\n\t\t// createFraktionResources();\n\t}", "protected IotdmSimpleConfigBuilder(PluginSimpleConfig config) {\n this.builder = new PluginSimpleConfigBuilder();\n List<KeyValList> copy = new LinkedList<>();\n for (KeyValList kv : config.getKeyValList()) {\n KeyValListBuilder builder = new KeyValListBuilder();\n builder.setCfgKey(kv.getCfgKey());\n builder.setCfgVal(kv.getCfgVal());\n copy.add(builder.build());\n }\n\n this.builder.setKeyValList(copy);\n }", "@Override\n public void initialize()\n {\n super.initialize();\n log.info(\"Initialize \" + name);\n Map<String, Collection<?>> beans;\n generator = service.getRandomSeedRepo().\n getRandomSeed(\"EvSocialClass-\" + name, 1, \"initialize\");\n\n Config.recycle();\n config = Config.getInstance();\n config.configure(service.getServerConfiguration());\n\n beans = config.getBeans();\n unpackBeans(beans);\n\n // Create and set up the customer instances\n evCustomers = new ArrayList<EvCustomer>();\n if (null == customerAttributeList) {\n // boot session - dynamic configuration\n configureForBoot(beans);\n }\n else {\n // sim session - restore from boot record\n configureForSim(beans);\n }\n }", "private void parseConfigurations() {\n\t\ttry {\n\t\t\tJsonNode propertiesNode = rawConfig.getProperties();\n\t\t\t\n\t\t\tif(propertiesNode != null && propertiesNode.size() > 0) {\n\t\t\t\tBeanInfoWrapper wrapper = new BeanInfoWrapper(this.beanClazz);\n\t\t\t\tIterator<Map.Entry<String, JsonNode>> it = propertiesNode.fields();\n\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, JsonNode> entry = it.next();\n\t\t\t\t\tString propName = entry.getKey();\n\t\t\t\t\tPropertyDescriptor propDesc = wrapper.getPropertyDesc(propName);\n\t\t\t\t\tif(propDesc == null) {\n\t\t\t\t\t\tthrow new ConfigException(\"Failed to found the property name='\" + propName + \", in class '\" + beanClazz + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tProperty prop = new Property(this.beanClazz, propDesc);\n\t\t\t\t\tValueNode valueNode = getNodeValue(prop.getType(), entry.getValue(), prop.getContentParamType(), prop.getKeyParamType());\n\t\t\t\t\t\n\t\t\t\t\tproperties.put(prop, valueNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getDestroyMethod())) {\n\t\t\t\tdestroyMethod = beanClazz.getMethod(rawConfig.getDestroyMethod());\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getInitMethod())) {\n\t\t\t\tinitMethod = beanClazz.getMethod( rawConfig.getInitMethod());\n\t\t\t}\n\t\t} catch (NoSuchMethodException e) {\n\t\t\tthrow new ConfigException(\"Failed to found the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t\t\n\t\t} catch (SecurityException e) {\n\t\t\tthrow new ConfigException(\"Failed to access the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t}\n\t\t\n\t}", "public void createPackageContents() {\n if(isCreated) {\n return;\n }\n isCreated = true;\n\n // Create classes and their features\n namedElementEClass = createEClass(NAMED_ELEMENT);\n createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n modularizationModelEClass = createEClass(MODULARIZATION_MODEL);\n createEReference(modularizationModelEClass, MODULARIZATION_MODEL__MODULES);\n createEReference(modularizationModelEClass, MODULARIZATION_MODEL__CLASSES);\n\n moduleEClass = createEClass(MODULE);\n createEReference(moduleEClass, MODULE__CLASSES);\n\n classEClass = createEClass(CLASS);\n createEReference(classEClass, CLASS__MODULE);\n createEReference(classEClass, CLASS__DEPENDS_ON);\n createEReference(classEClass, CLASS__DEPENDED_ON_BY);\n }", "@Override\n public void generateSingle(ConfigModel model, DomDocument domDocument) {\n configModelVisited(model);\n //processRedirectsAnnotation(model); // TODO need to extract info from RestRedirect Annotations\n\n String serverConfigName = ResourceUtil.getUnqualifiedTypeName(model.targetTypeName);\n String beanName = getBeanName(serverConfigName);\n String className = getClassName(beanName);\n\n if (alreadyGenerated(className)) {\n return;\n }\n\n String baseClassName = \"TemplateRestResource\";\n String resourcePath = null;\n\n if (beanName.equals(\"Domain\")) {\n baseClassName = \"org.glassfish.admin.rest.resources.GlassFishDomainResource\";\n resourcePath = \"domain\";\n }\n\n ClassWriter classWriter = getClassWriter(className, baseClassName, resourcePath);\n \n if (classWriter != null) {\n generateCommandResources(beanName, classWriter);\n\n generateGetDeleteCommandMethod(beanName, classWriter);\n\n generateCustomResourceMapping(beanName, classWriter);\n\n for (String elementName : model.getElementNames()) {\n ConfigModel.Property childElement = model.getElement(elementName);\n if (elementName.equals(\"*\")) {\n ConfigModel.Node node = (ConfigModel.Node) childElement;\n ConfigModel childModel = node.getModel();\n List<ConfigModel> subChildConfigModels = ResourceUtil.getRealChildConfigModels(childModel, domDocument);\n for (ConfigModel subChildConfigModel : subChildConfigModels) {\n if (ResourceUtil.isOnlyATag(childModel) || ResourceUtil.isOnlyATag(subChildConfigModel) || subChildConfigModel.getAttributeNames().isEmpty() || hasSingletonAnnotation(subChildConfigModel)) {\n String childResourceClassName = getClassName(ResourceUtil.getUnqualifiedTypeName(subChildConfigModel.targetTypeName));\n String childPath = subChildConfigModel.getTagName();\n classWriter.createGetChildResource(childPath, childResourceClassName);\n generateSingle(subChildConfigModel, domDocument);\n } else {\n processNonLeafChildConfigModel(subChildConfigModel, childElement, domDocument, classWriter);\n\n }\n }\n } else if (childElement.isLeaf()) {\n if (childElement.isCollection()) {\n //handle the CollectionLeaf config objects.\n //JVM Options is an example of CollectionLeaf object.\n String childResourceBeanName = getBeanName(elementName);\n String childResourceClassName = getClassName(childResourceBeanName);\n classWriter.createGetChildResource(elementName, childResourceClassName);\n\n //create resource class\n generateCollectionLeafResource(childResourceBeanName);\n } else {\n String childResourceBeanName = getBeanName(elementName);\n String childResourceClassName = getClassName(childResourceBeanName);\n classWriter.createGetChildResource(elementName, childResourceClassName);\n\n //create resource class\n generateLeafResource(childResourceBeanName);\n }\n } else { // => !childElement.isLeaf()\n processNonLeafChildElement(elementName, childElement, domDocument, classWriter);\n }\n }\n\n classWriter.done();\n }\n }", "public void selfRegister() {\n builder.factory(Configuration.class, MockConfiguration.class, Scope.SINGLETON);\n LocatableProperties props = new LocatableProperties();\n new StrutsDefaultConfigurationProvider().register(builder, props);\n builder.constant(StrutsConstants.STRUTS_DEVMODE, \"false\");\n builder.constant(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, \"true\");\n builder.constant(StrutsConstants.STRUTS_OGNL_ENABLE_EXPRESSION_CACHE, \"true\");\n builder.constant(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION, \"false\");\n container = builder.create(true);\n }", "ConfigurationEntity loadFullConfigurations() {\n\n\t\tConfigurationEntity config;\n\t\tconfig = getPartiallyLoadedConfigEntity();\n\t\tconfig.setCanvasLayout(getCanvasLayoutMatrix());\n\t\treturn config\n\t}", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "private void instantiateProbes() {\n\t\tString probe_str = this.config.getProperty(\"probes.include\", \"all\");\n\t\tString probe_exclude_str = this.config.getProperty(\"probes.exclude\", \"\");\n\t\tString probe_external = this.config.getProperty(\"probes.external\", \"\");\n\t\t\t\t\n\t\ttry {\n\t\t\tArrayList<String> availableProbeList = this.listAvailableProbeClasses();\n\t\t\t//user wants to instantiate all available probes with default params\n\t\t\t//TODO - allow user to parameterize probes when selecting to add all probes\n\t\t\tif (probe_str.equals(\"all\")) {\n\t\t\t\tfor(String s : availableProbeList) \n\t\t\t\t\tthis.probes.put(s, null);\n\t\t\t\t\n\t\t\t\t//user wants to instantiate all available probes except the ones specified for exclusion\n\t\t\t\tif (!probe_exclude_str.equals(\"\")) {\n\t\t\t\t\tString[] probe_list = probe_exclude_str.split(\";\");\n\t\t\t\t\tfor(String s:probe_list)\n\t\t\t\t\t\tthis.probes.remove(s.split(\",\")[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//instantiate\n\t\t\t\tfor(Entry<String,IProbe> p:this.probes.entrySet()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH, p.getKey());\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tp.setValue(tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//user wants to instantiate specific probes (and may set custom params)\n\t\t\telse{\n\t\t\t\tString[] probe_list = probe_str.split(\";\");\n\t\t\t\tfor(String s:probe_list) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tIProbe tempProbe = JCProbeFactory.newInstance(PROBE_LIB_PATH,params[0]);\n\t\t\t\t\t\ttempProbe.attachQueue(this.queue);\n\t\t\t\t\t\ttempProbe.attachLogger(this.logger);\n\t\t\t\t\t\tif(params.length > 1) //user wants to define custom collecting period\n\t\t\t\t\t\t\ttempProbe.setCollectPeriod(Integer.parseInt(params[1]));\n\t\t\t\t\t\tthis.probes.put(params[0], tempProbe);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (CatascopiaException e) {\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//activate Agent probes\n\t\t\tthis.activateAllProbes();\n\t\t\t\n\t\t\t//deploy external probes located in a custom user-defined path\n\t\t\tif (!probe_external.equals(\"\")) {\n\t\t\t\tString[] probe_list = probe_external.split(\";\");\n\t\t\t\tfor(String s:probe_list){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tString[] params = s.split(\",\");\n\t\t\t\t\t\tString pclass = params[0];\n\t\t\t\t\t\tString ppath = params[1];\n\t\t\t\t\t\tthis.deployProbeAtRuntime(ppath, pclass);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\t\tthis.writeToLog(Level.SEVERE, \"External Probe deployment error. Either the probe class name of classpath are not correctly provided\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t//log probe list added to Agent\n\t\t\tString l = \" \";\n\t\t\tfor(Entry<String,IProbe> entry:this.probes.entrySet())\n\t\t\t\tl += entry.getKey() + \",\";\n\t\t\tthis.writeToLog(Level.INFO,\"Probes Activated: \"+l.substring(0, l.length()-1));\n\t\t}\n\t\tcatch (CatascopiaException e){\n\t\t\tthis.writeToLog(Level.SEVERE, e);\n\t\t}\n\t}", "public static Config createJeruslaemConfig() {\n\t\tConfig config = ConfigUtils.createConfig();\n\n\t\tconfig.network().setInputFile(INPUT_NETWORK);\n\t\tconfig.plans().setInputFile(INPUT_POPULATION);\n\t\tconfig.facilities().setInputFile(INPUT_FACILITES);\n\t\tconfig.households().setInputFile(INPUT_HOUSEHOLDS);\n\n\t\t// modify controler\n\t\tconfig.controler().setWriteEventsInterval(25);\n\t\tconfig.controler().setWritePlansInterval(25);\n\t\tconfig.controler().setEventsFileFormats(EnumSet.of(EventsFileFormat.xml));\n\t\tconfig.controler().setOutputDirectory(OUTPUT_FOLDER + RUN_ID + \"/\");\n\t\tconfig.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);\n\t\tconfig.controler().setFirstIteration(0);\n\t\tconfig.controler().setLastIteration(300);\n\t\tconfig.controler().setMobsim(\"qsim\");\n\t\tconfig.controler().setRoutingAlgorithmType(RoutingAlgorithmType.FastAStarLandmarks);\n\t\tconfig.controler().setRunId(RUN_ID);\n\t\t\n\t\t// modify Qsim\n\t\tconfig.qsim().setStartTime(0.0);\n\t\tconfig.qsim().setEndTime(30 * 3600);\n\t\tconfig.qsim().setFlowCapFactor(0.3);\n\t\tconfig.qsim().setStorageCapFactor(Math.pow(0.3, 0.75));\n\t\tconfig.qsim().setNumberOfThreads(12);\n\t\tconfig.qsim().setSnapshotPeriod(1);\n\t\tconfig.qsim().setStuckTime(10);//30,60 or multiply by 60\n\t\tconfig.qsim().setRemoveStuckVehicles(false);\n\t\tconfig.qsim().setTimeStepSize(1);\n\t\tconfig.qsim().setTrafficDynamics(TrafficDynamics.kinematicWaves);// kinematic waves\n\t\tconfig.qsim().setMainModes(Arrays.asList(TransportMode.car));\n\t\tconfig.qsim().setInsertingWaitingVehiclesBeforeDrivingVehicles(true);\n\n\t\t// modify global\n\t\tconfig.global().setCoordinateSystem(\"EPSG:2039\");\n\t\tconfig.global().setNumberOfThreads(16);\n\t\t// ?? random seed?<param name=\"randomSeed\" value=\"4711\" />\n\t\t\n\t\t// Add transit\n\t\tconfig.transit().setUseTransit(true);\n\t\tconfig.transit().setTransitScheduleFile(INPUT_TRANSIT_SCHEDULE);\n\t\tconfig.transit().setVehiclesFile(INPUT_TRANSIT_VEHICLES);\n\t\t\n\n\n//\t\t// Add sub-tour mode choice\n//\t\tconfig.subtourModeChoice()\n//\t\t\t\t.setModes(new String[] { TransportMode.car, TransportMode.pt, TransportMode.walk, TransportMode.bike });\n//\t\t// TODO check that bike is biycle\n//\t\tconfig.subtourModeChoice().setChainBasedModes(new String[] { TransportMode.car });\n//\n\t\t// Add sub-tour mode choice\n\t\tconfig.timeAllocationMutator().setMutationRange(3600);\n\n\t\t// Add strategy\n\t\tconfig.strategy().setMaxAgentPlanMemorySize(5);\n\t\tconfig.strategy().setFractionOfIterationsToDisableInnovation(0.8);\n\n\t\t// Add strategy - plan selector\n\t\tStrategySettings changeExpStrategy = new StrategySettings();\n\t\tchangeExpStrategy.setDisableAfter(-1);\n\t\tchangeExpStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultSelector.ChangeExpBeta.toString());\n\t\tchangeExpStrategy.setWeight(0.8);\n\t\tconfig.strategy().addStrategySettings(changeExpStrategy);\n\n//\t\t Add strategy - time-mutation\n\t\tStrategySettings timeMutatorStrategy = new StrategySettings();\n\t\ttimeMutatorStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.TimeAllocationMutator.toString());\n\t\ttimeMutatorStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(timeMutatorStrategy);\n\n\t\t// Add strategy - re-route\n\t\tStrategySettings reRouteStrategy = new StrategySettings();\n\t\treRouteStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.ReRoute.toString());\n\t\treRouteStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(reRouteStrategy);\n\n//\t\t Add strategy - Sub-tour strategy\n\t\tStrategySettings subTourModeChoiceStrategy = new StrategySettings();\n\t\tsubTourModeChoiceStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.SubtourModeChoice.toString());\n\t\tsubTourModeChoiceStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(subTourModeChoiceStrategy);\n\n\t\t// add car Availability after adding attributes to popualtion\n\t\t config.subtourModeChoice().setConsiderCarAvailability(true);\n\n\t\t// add network modes which are simulated on network in future add more modes\n\t\t// config.plansCalcRoute().setNetworkModes(Arrays.asList(TransportMode.car));\n\t\t// config.plansCalcRoute().setInsertingAccessEgressWalk(true);\n\n\t\t// // just a place hodler\n\t\t// ModeRoutingParams taxiModeRoute = new ModeRoutingParams();\n\t\t// taxiModeRoute.setMode(TransportMode.taxi);\n\t\t// taxiModeRoute.setTeleportedModeSpeed(100.0);\n\t\t// config.plansCalcRoute().addModeRoutingParams(taxiModeRoute);\n\n\t\t// global scoring values taken from TLVM model = SF 14\n\t\tconfig.planCalcScore().setEarlyDeparture_utils_hr(0.0);\n\t\tconfig.planCalcScore().setLateArrival_utils_hr(0);\n\t\tconfig.planCalcScore().setMarginalUtilityOfMoney(0.062);\n\t\tconfig.planCalcScore().setPerforming_utils_hr(0.96);\n\t\tconfig.planCalcScore().setUtilityOfLineSwitch(0);\n\t\tconfig.planCalcScore().setMarginalUtlOfWaitingPt_utils_hr(-0.18);\n\n\t\t// car scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams carCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.car);\n\t\tcarCalcScoreParams.setConstant(-0.562);\n\t\tcarCalcScoreParams.setMode(\"car\");\n\t\tcarCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(carCalcScoreParams);\n\n\t\t// PT scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams ptCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.pt);\n\t\tptCalcScoreParams.setConstant(-0.124);\n\t\tptCalcScoreParams.setMode(\"pt\");\n\t\tptCalcScoreParams.setMarginalUtilityOfTraveling(-0.18);\n\t\tconfig.planCalcScore().addModeParams(ptCalcScoreParams);\n\n\t\t// Walk scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams walkCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.walk);\n\t\twalkCalcScoreParams.setMode(\"walk\");\n\t\twalkCalcScoreParams.setMarginalUtilityOfTraveling(-1.14);\n\t\tconfig.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO get values for Taxi scoring\n\t\t// Taxi scoring functions place holder (taken from car)\n\t\t// PlanCalcScoreConfigGroup.ModeParams TaxiCalcScoreParams = new\n\t\t// PlanCalcScoreConfigGroup.ModeParams(TransportMode.taxi);\n\t\t// TaxiCalcScoreParams.setConstant(-0.562);\n\t\t// TaxiCalcScoreParams.setMode(\"taxi\");\n\t\t// TaxiCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\t// config.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO add ride as network mode remove from modechoice\n\t\t// Ride scoring functions place holder taken from Berlin MATSim model -\n\t\t// monetaryDistanceRate same as car -0.0004\n\t\tPlanCalcScoreConfigGroup.ModeParams rideCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.ride);\n\t\trideCalcScoreParams.setMode(\"ride\");\n\t\trideCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(rideCalcScoreParams);\n\n\t\t// TODO check with JLM bike - bicyle\n\t\t// bike scoring functions place holder taken from Berlin MATSim model of bicyke\n\t\tPlanCalcScoreConfigGroup.ModeParams bikeCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.bike);\n\t\tbikeCalcScoreParams.setConstant(-1.9);\n\t\tbikeCalcScoreParams.setMode(\"bike\");\n\t\tconfig.planCalcScore().addModeParams(bikeCalcScoreParams);\n\n\t\t// TODO get activities open hours\n\t\tActivityParams home = new ActivityParams(\"home\");\n\t\thome.setTypicalDuration(16 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(home);\n\n\t\tActivityParams work = new ActivityParams(\"work\");\n\t\twork.setOpeningTime(6 * 3600);\n\t\twork.setClosingTime(20 * 3600);\n\t\twork.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(work);\n\n\t\tActivityParams school = new ActivityParams(\"school\");\n\t\tschool.setOpeningTime(8 * 3600);\n\t\tschool.setClosingTime(14 * 3600);\n\t\tschool.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(school);\n\n\t\tActivityParams leisure = new ActivityParams(\"leisure\");\n\t\tleisure.setOpeningTime(9 * 3600);\n\t\tleisure.setClosingTime(24 * 3600);\n\t\tleisure.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(leisure);\n\n\t\tActivityParams other = new ActivityParams(\"other\");\n\t\tother.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(other);\n\n\t\treturn config;\n\n\t}", "public ObjetosBeans() {\n this.init();\n }", "private void procesarConfiguracion() {\n try {\n\n\n IXMLParser parser = XMLParserFactory.createDefaultXMLParser();\n IXMLReader reader = StdXMLReader.fileReader(Servidor.path_config);\n parser.setReader(reader);\n IXMLElement xml = (IXMLElement) parser.parse();\n Enumeration e = xml.enumerateChildren();\n\n Vector v, c;\n IXMLElement proc, caso;\n\n\n while (e.hasMoreElements()) {\n proc = (IXMLElement) e.nextElement();\n v = proc.getChildren();\n int n = 0;\n LinkedList<Caso> list = new LinkedList<>();\n while (n < v.size()) {\n caso = (IXMLElement) v.get(n);\n\n Caso ca = new Caso(((IXMLElement) caso.getChildrenNamed(\"solucion\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"normal\").get(0)).getContent(), ((IXMLElement) caso.getChildrenNamed(\"error\").get(0)).getContent());\n list.add(ca);\n n++;\n\n }\n config.put(proc.getName(), list);\n }\n\n\n\n\n\n } catch (XMLException | IOException | ClassNotFoundException | InstantiationException | IllegalAccessException ex) {\n Servidor.logger.severe(ex.toString());\n }\n\n\n }", "@Override\n\t\tprotected void configure() {\n\t\t\tbind(NamedItem.class).annotatedWith(Names.named(\"Mariano\")).to(Mariano.class).asEagerSingleton();\n\t\t\tbind(NamedItem.class).annotatedWith(Names.named(\"Francisco\")).to(Francisco.class).asEagerSingleton();\n\t\t}", "public ServerConfigImpl() {\n this.expectations = new ExpectationsImpl(globalEncoders, globalDecoders);\n this.requirements = new RequirementsImpl();\n }", "void setConfiguration();", "public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}", "private void config() {\n\t}", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "public AntConfiguration(){\n this.channelID1 = new ChannelID(); //initially set all parameters of Channel ID to 0\n this.channelID2 = new ChannelID(); //initially set all parameters of Channel ID to 0\n\n this.channelAssigned1 = new Channel(); //initially do not assign any cha\n this.channelAssigned2 = new Channel(); //initially do not assign any channel\n\n this.channelPeriod = 4; //set to 4Hz by default\n this.level = PowerLevel.NEGTWENTY; //set to -20dB as default\n this.state1 = ChannelState.UNASSIGNED;\n this.state2 = ChannelState.UNASSIGNED;\n\n }", "public java.util.List<Configuration> getConfigurations() {\n if (configurations == null) {\n configurations = new com.amazonaws.internal.ListWithAutoConstructFlag<Configuration>();\n configurations.setAutoConstruct(true);\n }\n return configurations;\n }", "protected void initializeInstances() {\n if (mUser == null) {\n mUser = new User(getApplicationContext());\n }\n if (mUserCache == null) {\n mUserCache = new UserCache();\n }\n if(mGlobalGroupContainer == null) {\n mGlobalGroupContainer = new GroupContainer(getApplicationContext());\n }\n if(mGlobalHistoryContainer == null) {\n mGlobalHistoryContainer = new HistoryContainer(getApplicationContext());\n }\n\n if(mGlobalContactContainer == null) {\n mGlobalContactContainer = new ContactContainer(getApplicationContext());\n mGlobalContactContainer.setContactSortKey(Contact.UserSortKey.USER_FIRST_NAME);\n }\n }", "public ConfigExample() {\n }", "public static final void prepareInstance() {\r\n prepareInstance(new XmlFactory());\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tsutEClass = createEClass(SUT);\n\t\tcreateEAttribute(sutEClass, SUT__HOSTNAME);\n\t\tcreateEAttribute(sutEClass, SUT__IP);\n\t\tcreateEAttribute(sutEClass, SUT__HARDWARE);\n\t\tcreateEReference(sutEClass, SUT__SUT);\n\t\tcreateEReference(sutEClass, SUT__METRICMODEL);\n\t\tcreateEAttribute(sutEClass, SUT__TYPE);\n\n\t\tloadGeneratorEClass = createEClass(LOAD_GENERATOR);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HOSTNAME);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IP);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IS_MONITOR);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__SUT);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__METRICMODEL);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HARDWARE);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__MONITOR);\n\n\t\tmonitorEClass = createEClass(MONITOR);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HOSTNAME);\n\t\tcreateEAttribute(monitorEClass, MONITOR__IP);\n\t\tcreateEReference(monitorEClass, MONITOR__SUT);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HARDWARE);\n\t\tcreateEAttribute(monitorEClass, MONITOR__DESCRIPTION);\n\n\t\tmetricModelEClass = createEClass(METRIC_MODEL);\n\t\tcreateEAttribute(metricModelEClass, METRIC_MODEL__NAME);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__CRITERIA);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__THRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__ASSOCIATIONCOUNTERCRITERIATHRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__METRIC);\n\n\t\t// Create enums\n\t\tsuT_TYPEEEnum = createEEnum(SUT_TYPE);\n\t\thardwareEEnum = createEEnum(HARDWARE);\n\t}", "public config() {\n initComponents();\n }", "public static void configUMLModelManager() throws Exception {\n // clean the ConfigManager.\n clearConfig();\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"Config.xml\");\n UMLModelManager manager = UMLModelManager.getInstance();\n ProjectConfigurationManager configManager = new ProjectConfigurationManager(manager);\n manager.setProjectConfigurationManager(configManager);\n manager.setProjectLanguage(\"Java\");\n // clean the UMLModelManager for test.\n manager.clearActivityGraphs();\n manager.clearDiagrams();\n clearConfig();\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__ELEMENTS);\n\n elementEClass = createEClass(ELEMENT);\n createEReference(elementEClass, ELEMENT__STATE);\n createEReference(elementEClass, ELEMENT__TRANSITION);\n\n stateEClass = createEClass(STATE);\n createEAttribute(stateEClass, STATE__NAME);\n createEReference(stateEClass, STATE__STATES_PROPERTIES);\n\n statesPropertiesEClass = createEClass(STATES_PROPERTIES);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__COLOR);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__THICKNESS);\n createEAttribute(statesPropertiesEClass, STATES_PROPERTIES__POSITION);\n\n transitionEClass = createEClass(TRANSITION);\n createEReference(transitionEClass, TRANSITION__START);\n createEReference(transitionEClass, TRANSITION__END);\n createEReference(transitionEClass, TRANSITION__TRANSITION_PROPERTIES);\n createEReference(transitionEClass, TRANSITION__LABEL);\n createEAttribute(transitionEClass, TRANSITION__INIT);\n\n labelEClass = createEClass(LABEL);\n createEAttribute(labelEClass, LABEL__TEXT);\n createEAttribute(labelEClass, LABEL__POSITION);\n\n coordinatesStatesTransitionEClass = createEClass(COORDINATES_STATES_TRANSITION);\n createEAttribute(coordinatesStatesTransitionEClass, COORDINATES_STATES_TRANSITION__STATE_TRANSITION);\n\n transitionPropertiesEClass = createEClass(TRANSITION_PROPERTIES);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__COLOR);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__THICKNESS);\n createEAttribute(transitionPropertiesEClass, TRANSITION_PROPERTIES__CURVE);\n }", "public void initialise() {\n\r\n for (String myview : Config.appStruct) {\r\n int i = 0;\r\n String[] str = myview.split(\":\");\r\n if (str[0].trim().equals(\"MyAppList\")) {\r\n i++;\r\n addAppList(str[1].trim(), str[2].trim(), str[3].trim(), i);\r\n\r\n } else if (str[0].trim().equals(\"MyBanner\")) {\r\n i++;\r\n addBanner(str[1].trim(), i);\r\n\r\n } else if (str[0].trim().equals(\"MyCollection\")) {\r\n i++;\r\n addCollection(str[1].trim(), str[2].trim(), i);\r\n\r\n }\r\n else if(str[0].trim().equals(\"VeryBestApps\")){\r\n\r\n i++;\r\n addVeryBestApps(str[1].trim(), i);\r\n\r\n }\r\n\r\n }\r\n }", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public WorkflowConfiguration() {\n\t\t\n\t}", "public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }", "private static List<Configuration> configure() {\n Map<String, Configuration> configurations = new HashMap<String, Configuration>();\n try {\n Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"jorm.properties\");\n \n while (resources.hasMoreElements()) {\n URL url = resources.nextElement();\n \n Database.get().log.debug(\"Found jorm configuration @ \" + url.toString());\n \n Properties properties = new Properties();\n InputStream is = url.openStream();\n properties.load(is);\n is.close();\n \n String database = null;\n String destroyMethodName = null;\n String dataSourceClassName = null;\n Map<String, String> dataSourceProperties = new HashMap<String, String>();\n int priority = 0;\n \n for (Entry<String, String> property : new TreeMap<String, String>((Map) properties).entrySet()) {\n String[] parts = property.getKey().split(\"\\\\.\");\n if (parts.length < 3 || !parts[0].equals(\"database\")) {\n continue;\n }\n if (database != null && !parts[1].equals(database)) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n database = parts[1];\n destroyMethodName = null;\n dataSourceClassName = null;\n dataSourceProperties = new HashMap<String, String>();\n priority = 0;\n }\n\n if (parts.length == 3 && parts[2].equals(\"destroyMethod\")) {\n destroyMethodName = property.getValue();\n } else if (parts.length == 3 && parts[2].equals(\"priority\")) {\n try {\n priority = Integer.parseInt(property.getValue().trim());\n } catch (Exception ex) {\n \n }\n } else if (parts[2].equals(\"dataSource\")) {\n if (parts.length == 3) {\n dataSourceClassName = property.getValue();\n } else if (parts.length == 4) {\n dataSourceProperties.put(parts[3], property.getValue());\n } else {\n Database.get().log.warn(\"Invalid DataSource property '\" + property.getKey() + \"'\");\n }\n } else {\n Database.get().log.warn(\"Invalid property '\" + property.getKey() + \"'\");\n }\n }\n \n if (database != null) {\n try {\n Configuration conf = configurations.get(database);\n if (conf == null || conf.priority < priority) {\n conf = new Configuration(database, dataSourceClassName, dataSourceProperties, destroyMethodName, priority);\n configurations.put(database, conf);\n Database.get().log.debug(\"Configured \" + conf);\n }\n } catch (Exception ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage());\n }\n }\n }\n \n for (Entry<String, Configuration> entry : configurations.entrySet()) {\n entry.getValue().apply();\n Database.get().log.debug(\"Configured \" + configuration);\n }\n } catch (IOException ex) {\n Database.get().log.warn(\"Failed to configure database: \" + ex.getMessage()); \n }\n \n return new ArrayList<Configuration>(configurations.values());\n }", "private void bootstrap() {\n\t\t// configure default values\n\t\t// maxPoolSize = 5;\n\t\tthis.parserPool.setMaxPoolSize(50);\n\t\t// coalescing = true;\n\t\tthis.parserPool.setCoalescing(true);\n\t\t// expandEntityReferences = false;\n\t\tthis.parserPool.setExpandEntityReferences(false);\n\t\t// ignoreComments = true;\n\t\tthis.parserPool.setIgnoreComments(true);\n\t\t// ignoreElementContentWhitespace = true;\n\t\tthis.parserPool.setIgnoreElementContentWhitespace(true);\n\t\t// namespaceAware = true;\n\t\tthis.parserPool.setNamespaceAware(true);\n\t\t// schema = null;\n\t\tthis.parserPool.setSchema(null);\n\t\t// dtdValidating = false;\n\t\tthis.parserPool.setDTDValidating(false);\n\t\t// xincludeAware = false;\n\t\tthis.parserPool.setXincludeAware(false);\n\n\t\tMap<String, Object> builderAttributes = new HashMap<>();\n\t\tthis.parserPool.setBuilderAttributes(builderAttributes);\n\n\t\tMap<String, Boolean> parserBuilderFeatures = new HashMap<>();\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/disallow-doctype-decl\", TRUE);\n\t\tparserBuilderFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, TRUE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-general-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/validation/schema/normalized-value\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-parameter-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/dom/defer-node-expansion\", FALSE);\n\t\tthis.parserPool.setBuilderFeatures(parserBuilderFeatures);\n\n\t\ttry {\n\t\t\tthis.parserPool.initialize();\n\t\t}\n\t\tcatch (ComponentInitializationException x) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3 ParserPool\", x);\n\t\t}\n\n\t\ttry {\n\t\t\tInitializationService.initialize();\n\t\t}\n\t\tcatch (InitializationException e) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3\", e);\n\t\t}\n\n\t\tXMLObjectProviderRegistry registry;\n\t\tsynchronized (ConfigurationService.class) {\n\t\t\tregistry = ConfigurationService.get(XMLObjectProviderRegistry.class);\n\t\t\tif (registry == null) {\n\t\t\t\tregistry = new XMLObjectProviderRegistry();\n\t\t\t\tConfigurationService.register(XMLObjectProviderRegistry.class, registry);\n\t\t\t}\n\t\t}\n\n\t\tregistry.setParserPool(this.parserPool);\n\t}", "private void setupconfigIpCPoints() {\n for (int i = 1; i <= 3; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n configIpCPoints.add(connectPoint);\n }\n }", "public CrawlerConfiguration() {\n\t\tinitConfiguration();\n\t}", "private void configureForBoot (Map<String, Collection<?>> beans)\n {\n customerAttributeList = new ArrayList<String>();\n population = minCount + generator.nextInt(Math.abs(maxCount - minCount));\n log.info(\"Configuring \" + population + \" customers for class \"\n + this.getName());\n\n // Prepare for the joins\n ArrayList<SocialGroup> groupList =\n new ArrayList<SocialGroup>(groups.values());\n double cgProbability = 0.0;\n for (SocialGroup group : groupList) {\n cgProbability += classGroups.get(group.getId()).getProbability();\n }\n ArrayList<CarType> carList = new ArrayList<CarType>(carTypes.values());\n double ccProbability = 0.0;\n for (CarType car : carList) {\n ClassCar cc = classCars.get(car.getName());\n if (null != cc) {\n ccProbability += cc.getProbability();\n }\n else {\n log.info(\"Car type {} not configured for {}\",\n car.getName(), this.getName());\n }\n }\n\n for (int i = 0; i < population; i++) {\n // pick a random social group\n SocialGroup thisGroup = pickGroup(groupList, cgProbability);\n ClassGroup groupDetails = classGroups.get(thisGroup.getId());\n // pick a gender\n String gender = \"female\";\n if (generator.nextDouble() < groupDetails.getMaleProbability()) {\n gender = \"male\";\n }\n // pick a random car\n CarType car = pickCar(carList, ccProbability);\n // name format is class.groupId.gender.carName.index\n String customerName = this.name + \"_\" + i;\n // The extra character at the end of the attribute string is padding,\n // due to the fact that XStream seems to drop the last character\n // of the last attribute.\n String attributes = thisGroup.getId() + \".\" + gender\n + \".\" + car.getName() + \".x\";\n customerAttributeList.add(attributes);\n instantiateCustomer(beans, thisGroup, gender, car, customerName);\n }\n }", "Pair<T, U> build() throws IOException, ConfigurationException;", "private @Nonnull Map<String, Configuration> generateVxlanConfigs() {\n NetworkFactory nf = new NetworkFactory();\n Configuration.Builder cb =\n nf.configurationBuilder().setConfigurationFormat(ConfigurationFormat.CISCO_IOS);\n _s1 = cb.setHostname(S1_NAME).build();\n _s2 = cb.setHostname(S2_NAME).build();\n _h1 = cb.setHostname(H1_NAME).build();\n _h2 = cb.setHostname(H2_NAME).build();\n Vrf.Builder vb = nf.vrfBuilder().setName(Configuration.DEFAULT_VRF_NAME);\n Vrf h1Vrf = vb.setOwner(_h1).build();\n Vrf h2Vrf = vb.setOwner(_h2).build();\n Vrf s1Vrf = vb.setOwner(_s1).build();\n Vrf s2Vrf = vb.setOwner(_s2).build();\n Interface.Builder l3Builder =\n Interface.builder().setType(InterfaceType.PHYSICAL).setActive(true);\n l3Builder.setName(E1_NAME).setAddresses(H1_ADDRESS).setOwner(_h1).setVrf(h1Vrf).build();\n l3Builder.setName(E2_NAME).setAddresses(H2_ADDRESS).setOwner(_h2).setVrf(h2Vrf).build();\n l3Builder.setName(E12_NAME).setAddresses(S1_ADDRESS).setOwner(_s1).setVrf(s1Vrf).build();\n l3Builder.setName(E21_NAME).setAddresses(S2_ADDRESS).setOwner(_s2).setVrf(s2Vrf).build();\n Interface.Builder l2Builder =\n Interface.builder()\n .setType(InterfaceType.PHYSICAL)\n .setActive(true)\n .setAccessVlan(VLAN)\n .setSwitchport(true)\n .setSwitchportMode(SwitchportMode.ACCESS);\n l2Builder.setName(SWP1_NAME).setOwner(_s1).setVrf(s1Vrf).build();\n l2Builder.setName(SWP2_NAME).setOwner(_s2).setVrf(s2Vrf).build();\n\n VniSettings.Builder vsb =\n VniSettings.builder()\n .setBumTransportMethod(BumTransportMethod.UNICAST_FLOOD_GROUP)\n .setUdpPort(UDP_PORT)\n .setVlan(VLAN)\n .setVni(VNI);\n s1Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S2_ADDRESS.getIp()))\n .setSourceAddress(S1_ADDRESS.getIp())\n .build());\n s2Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S1_ADDRESS.getIp()))\n .setSourceAddress(S2_ADDRESS.getIp())\n .build());\n return ImmutableMap.of(H1_NAME, _h1, H2_NAME, _h2, S1_NAME, _s1, S2_NAME, _s2);\n }", "public TemplateController() {\n super();\n // get distance sensors and save them in array\n _distanceSensors = new DistanceSensor[] {\n getDistanceSensor(\"ps5\"),\n getDistanceSensor(\"ps6\"),\n getDistanceSensor(\"ps7\"),\n getDistanceSensor(\"ps0\"),\n getDistanceSensor(\"ps1\"),\n getDistanceSensor(\"ps2\"),\n };\n // get light sensors and save them in array\n _lightSensors = new LightSensor[]{\n getLightSensor(\"ls5\"),\n getLightSensor(\"ls6\"),\n getLightSensor(\"ls7\"),\n getLightSensor(\"ls0\"),\n getLightSensor(\"ls1\"),\n getLightSensor(\"ls2\")\n };\n\n //enable the sensors\n for (int i = 0; i < 6; i++){\n _distanceSensors[i].enable(10);\n _lightSensors[i].enable(10);\n }\n }", "private void createSeed(Element temp) {\n\n Seed seed = new Seed();\n for(int i = 0; i < temp.getAttributeCount(); i++) { //same principle as createGrape\n Attribute attribute = temp.getAttribute(i);\n String name = attribute.getQualifiedName();\n String value = attribute.getValue();\n\n switch (name) {\n case (\"name\"):\n seed.setId(value);\n break;\n\n case (\"type\"):\n try {\n seed.setSeedClass(Class.forName(\"Examples.\"+value));\n } catch (ReflectiveOperationException e) {\n Class className = this.isPrimitive(value);\n if(className == null)\n e.printStackTrace();\n else\n seed.setSeedClass(className);\n }\n break;\n\n case(\"constructor\"):\n seed.setIsConstructor(Boolean.valueOf(value));\n break;\n\n case (\"isReferenced\"):\n seed.setRef(Boolean.valueOf(value)); //TODO considerar que se hace si es true\n break;\n\n case (\"value\"):\n if(seed.getSeedClass() != null) {\n if(seed.isRef()){//Debo saber si meter un objeto o un valor\n String k =seed.getSeedClass().getSimpleName();\n Object h = singletonGrapes.get(k);\n if(h==null){\n h = this.isPrimitive(seed.getSeedClass().getSimpleName());\n }\n seed.setValue(h);\n }else{\n seed.setValue(value);\n }\n } else {\n System.err.print(\"Objects.Seed parameters not in correct order. Type should be before values.\");\n }\n break;\n\n default:\n System.err.print(\"Invalid parameter \" + name);\n break;\n }\n }\n\n Element parent = (Element) temp.getParent();\n Grape parentGrape = grapes.get(parent.getAttributeValue(\"id\"));\n super.dependencies.computeIfAbsent(parentGrape.getId(), V-> new LinkedList<>());\n super.dependencies.get(parentGrape.getId()).add(seed); //map should store seeds that belong to the same grape TODO revisar estructura\n\n if(seed.isConstructor())\n buildWithConstructors(parentGrape.getId());\n else\n buildWithSetters(parentGrape.getId());\n }", "public static void generateDefaults() {\n Building temp = BuildingList.getBuilding(0);\n SubAreas temp2 = temp.getSubArea(1);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(2);\n temp2.createMotionSensor();\n temp2 = temp.getSubArea(3);\n temp2.createMotionSensor();\n temp2.createFireSensor();\n temp2 = temp.getSubArea(5);\n temp2.createFireSensor();\n temp2 = temp.getSubArea(6);\n temp2.createFireSensor();\n temp2.createMotionSensor();\n }", "public ComplexConfigDTO() {\n \t\tlistProperties = new HashMap<String, ConfigListDTO>();\n \t\tsimpleProperties = new HashMap<String, ConfigSimpleValueDTO>();\n \t\tsetProperties = new HashMap<String, ConfigSetDTO>();\n \t\tmapProperties = new HashMap<String, ConfigMapDTO>();\n \t\tcomplexProperties = new HashMap<String, ComplexConfigDTO>();\n \t}", "public ConfigCuenta() {\n initComponents();\n }", "public static void main(String[] args) throws Exception {\n \tString filename = \"boGen.conf.xml\";\n\n \ttry{\n\t\t\tSAXReader saxReader = new SAXReader();\n\t\t\tDocument document = saxReader.read(filename);\n\n\t\t\tList<Node> boList = document.selectNodes(\"//bo\");\n\n\t \tfor(Node bo : boList)\n\t \t{\n\t \t\tString boName = bo.selectSingleNode(\"@name\").getStringValue();\n\t\t String className = bo.selectSingleNode(\"@class\").getStringValue();\n\n\t\t Class<? extends BusinessObject> boClass = (Class<? extends BusinessObject>)Class.forName( className );\n\t\t PropertyDescriptor[] props = PropertyUtils.getPropertyDescriptors( boClass );\n\n\t\t StringBuffer sb = new StringBuffer( 4000 );\n\t\t sb.append( \"<beans xmlns=\\\"http://www.springframework.org/schema/beans\\\"\\r\\n\" +\n\t\t \t\t\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\\r\\n\" +\n\t\t \t\t\" xmlns:p=\\\"http://www.springframework.org/schema/p\\\"\\r\\n\" +\n\t\t \t\t\" xsi:schemaLocation=\\\"http://www.springframework.org/schema/beans\\r\\n\" +\n\t\t \t\t\" http://www.springframework.org/schema/beans/spring-beans-2.0.xsd\\\">\\r\\n\" +\n\t\t \t\t\"\\r\\n\" +\n\t\t \t\t\" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"\\\" parent=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-parentBean\\\" />\\r\\n\" +\n\t\t \t\t\"\\r\\n\" +\n\t\t \t\t\" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-parentBean\\\" abstract=\\\"true\\\" parent=\\\"BusinessObjectEntry\\\"\\r\\n\" +\n\t\t \t\t\" p:businessObjectClass=\\\"\" );\n\t\t sb.append( boClass.getName() );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:titleAttribute=\\\"\" );\n\t\t sb.append( \"FILL ME IN\" );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:objectLabel=\\\"\" );\n\t\t sb.append( camelCaseToString( boClass.getSimpleName() ) );\n\t\t sb.append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:inquiryDefinition-ref=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-inquiryDefinition\\\"\\r\\n\" );\n\t\t sb.append( \" p:lookupDefinition-ref=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-lookupDefinition\\\" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"attributes\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append( \" <ref bean=\\\"\" ).append( boClass.getSimpleName() ).append( '-' );\n\t\t sb.append( p.getName() );\n\t\t sb.append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\"\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\n\t\t if ( p.getName().equals( \"versionNumber\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"AttributeReferenceDummy-versionNumber\" ) );\n\n\t\t } /*else if ( p.getName().endsWith(\"chartOfAccountsCode\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Chart-chartOfAccountsCode\" ) );\n\n\t\t } else if ( p.getName().endsWith(\"organizationCode\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Org-organizationCode\" ) );\n\n\t\t } else if ( p.getName().endsWith(\"accountNumber\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"Account-accountNumber\" ) );\n\n\t\t } else if ( p.getName().equals(\"active\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"GenericAttributes-activeIndicator\" ) );\n\n\t\t } else if ( p.getName().equals(\"codeAndDescription\" ) ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"CommonField-CodeAndDescription\", camelCaseToString(boClass.getSimpleName()) ) );\n\n\t\t } else if ( p.getPropertyType() == Boolean.TYPE ) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBean(boClass, p.getName(), \"GenericAttributes-genericBoolean\" ) );\n\n\t\t } else if ( p.getPropertyType() == Date.class && !p.getName().equals(\"lastUpdateDate\")) {\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"GenericAttributes-genericDate\", camelCaseToString(p.getName()) ) );\n\n\t\t } else if( p.getName().equals(\"lastUpdateDate\")) {\n\t\t \tsb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t sb.append( getSimpleAbstractInheritanceBeanWithLabel(boClass, p.getName(), \"GenericAttributes-genericTimestamp\", camelCaseToString(p.getName()) ) );\n\t\t }\n\t\t */else {\n\t\t // attribute bean\n\t\t sb.append( getSimpleParentBeanReference( boClass, p.getName() ) );\n\t\t // attribute parent bean\n\t\t sb.append( \" <bean id=\\\"\" ).append( boClass.getSimpleName() ).append( '-' );\n\t\t sb.append( p.getName() ).append( \"-parentBean\\\" parent=\\\"AttributeDefinition\\\" abstract=\\\"true\\\"\\r\\n\" );\n\t\t sb.append( \" p:name=\\\"\" ).append( p.getName() ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:forceUppercase=\\\"false\\\"\\r\\n\" );\n\t\t sb.append( \" p:label=\\\"\" ).append( camelCaseToString(p.getName()) ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:shortLabel=\\\"\" ).append( camelCaseToString(p.getName()) ).append( \"\\\"\\r\\n\" );\n\t\t sb.append( \" p:maxLength=\\\"10\\\"\\r\\n\" );\n\t\t sb.append( \" p:required=\\\"false\\\" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"validationPattern\\\" >\\r\\n\" +\n\t\t \" <bean parent=\\\"AnyCharacterValidationPattern\\\"\\r\\n\" +\n\t\t \" p:allowWhitespace=\\\"true\\\" />\\r\\n\" +\n\t\t \" </property>\\r\\n\" +\n\t\t \" <property name=\\\"control\\\" >\\r\\n\");\n\t\t if(p.getName().equals(\"lastUpdateDate\"))\t{\n\t\t \tsb.append( \" <bean parent=\\\"HiddenControlDefinition\\\" />\\r\\n\");\n\t\t }\n\t\t else if (p.getName().equals(\"lastUpdateId\"))\t{\n\t\t \tsb.append( \" <bean parent=\\\"HiddenControlDefinition\\\" />\\r\\n\");\n\t\t }\n\t\t else {\n\t\t \tsb.append( \" <bean parent=\\\"TextControlDefinition\\\"\\r\\n\" +\n\t\t \t\" p:size=\\\"10\\\" />\\r\\n\");\n\t\t }\n\t\t sb.append( \" </property>\\r\\n\" +\n\t\t \" </bean>\\r\\n\" );\n\n\t\t }\n\t\t sb.append( \"\\r\\n\" );\n\t\t }\n\t\t }\n\t\t // inquiry definition\n\t\t sb.append(\"<!-- Business Object Inquiry Definition -->\\r\\n\");\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( getSimpleParentBeanReference( boClass, \"inquiryDefinition\" ) );\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( \" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-inquiryDefinition-parentBean\\\" abstract=\\\"true\\\" parent=\\\"InquiryDefinition\\\"\\r\\n\" +\n\t\t \t\t\" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Inquiry\\\" >\\r\\n\" +\n\t\t \t\t\" <property name=\\\"inquirySections\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" +\n\t\t \t\t\" <bean parent=\\\"InquirySectionDefinition\\\"\\r\\n\" +\n\t\t \t\t\" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Attributes\\\"\\r\\n\" +\n\t\t \t\t\" p:numberOfColumns=\\\"1\\\" >\\r\\n\" +\n\t\t \t\t\" <property name=\\\"inquiryFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\"\\r\\n\" );\n\n\t\t sb.append(\"<!-- Business Object Lookup Definition -->\");\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( getSimpleParentBeanReference( boClass, \"lookupDefinition\" ) );\n\t\t sb.append( \"\\r\\n\" );\n\t\t sb.append( \" <bean id=\\\"\" );\n\t\t sb.append( boClass.getSimpleName() );\n\t\t sb.append( \"-lookupDefinition-parentBean\\\" abstract=\\\"true\\\" parent=\\\"LookupDefinition\\\"\\r\\n\" +\n\t\t \" p:title=\\\"\" );\n\t\t sb.append( camelCaseToString(boClass.getSimpleName() ) );\n\t\t sb.append( \" Lookup\\\" \\r\\n\" );\n\t\t sb.append( \" >\\r\\n\" );\n\t\t sb.append( \" <property name=\\\"defaultSort\\\" >\\r\\n\" +\n\t\t \t\t\" <bean parent=\\\"SortDefinition\\\">\\r\\n\" +\n\t\t \t\t\" <property name=\\\"attributeNames\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" +\n\t\t \t\t\" <value>FILL ME IN</value>\\r\\n\" +\n\t\t \t\t\" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"sortAscending\\\" value=\\\"true\\\" />\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"lookupFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" <property name=\\\"resultFields\\\" >\\r\\n\" +\n\t\t \t\t\" <list>\\r\\n\" );\n\t\t for ( PropertyDescriptor p : props ) {\n\t\t if ( isNormalProperty(p) ) {\n\t\t sb.append(\" <bean parent=\\\"FieldDefinition\\\" p:attributeName=\\\"\" );\n\t\t sb.append( p.getName() ).append( \"\\\" />\\r\\n\" );\n\t\t }\n\t\t }\n\t\t sb.append( \" </list>\\r\\n\" +\n\t\t \t\t\" </property>\\r\\n\" +\n\t\t \t\t\" </bean>\\r\\n\" );\n\t\t sb.append( \"\\r\\n</beans>\" );\n\n\t\t FileWriter outputfile = null;\n\t\t try\n\t\t {\n\t\t \toutputfile = new FileWriter(getOutputFilePath(className, false) + boName + \".xml\");\n\t\t \toutputfile.write(sb.toString());\n\t\t }\n\t\t catch(IOException e)\n\t\t {\n\t\t \tSystem.err.println(\"Error writing bean data to file.\");\n\t\t }\n\t\t finally {\n\t\t \toutputfile.close();\n\t\t }\n\t \t}\n \t}\n \tcatch(DocumentException e)\n \t{\n \t\tSystem.err.println(\"Error parsing xml document.\");\n \t}\n }", "public void initialConfig() {\n }", "public StorageConfig() {\n }", "private void createTopology() {\n deviceService = createMock(DeviceService.class);\n linkService = createMock(LinkService.class);\n\n deviceService.addListener(anyObject(DeviceListener.class));\n linkService.addListener(anyObject(LinkListener.class));\n\n createDevices(NUM_DEVICES, NUM_PORTS_PER_DEVICE);\n createLinks(NUM_DEVICES);\n addIntfConfig();\n popluateEdgePortService();\n }", "protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }", "protected void configure() {\n\t \n\t Configuration.BASE=true;\n\t Configuration.BASEMENUBAR=true;\n\t Configuration.BASETOOLBAR=true;\n\t Configuration.EDITMENUBAR=true;\n\t Configuration.EDITTOOLBAR=true;\n\t Configuration.FORMATMENUBAR=true;\n\t Configuration.FORMATTOOLBAR=true;\n\t Configuration.PERSISTENCEMENUBAR=true;\n\t Configuration.PERSISTENCETOOLBAR=true;\n\t Configuration.PRINTMENUBAR=true;\n\t Configuration.PRINTTOOLBAR=true;\n\t Configuration.SEARCHMENUBAR=true;\n\t Configuration.SEARCHTOOLBAR=true;\n\t Configuration.UNDOREDOMENUBAR=true;\n\t \t Configuration.UNDOREDOTOOLBAR=true;\n\t //\n\t Configuration.WORDCOUNTMENUBAR=true;\n\t Configuration.WORDCOUNTTOOLBAR=true;\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public void setCommandLineGeneratorElement(IConfigurationElement element);", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\telementEClass = createEClass(ELEMENT);\n\t\tcreateEOperation(elementEClass, ELEMENT___GET_ONTOLOGY);\n\t\tcreateEOperation(elementEClass, ELEMENT___EXTRA_VALIDATE__DIAGNOSTICCHAIN_MAP);\n\n\t\tannotationEClass = createEClass(ANNOTATION);\n\t\tcreateEReference(annotationEClass, ANNOTATION__PROPERTY);\n\t\tcreateEReference(annotationEClass, ANNOTATION__LITERAL_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__REFERENCE_VALUE);\n\t\tcreateEReference(annotationEClass, ANNOTATION__OWNING_ELEMENT);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_VALUE);\n\t\tcreateEOperation(annotationEClass, ANNOTATION___GET_ANNOTATED_ELEMENT);\n\n\t\tidentifiedElementEClass = createEClass(IDENTIFIED_ELEMENT);\n\t\tcreateEReference(identifiedElementEClass, IDENTIFIED_ELEMENT__OWNED_ANNOTATIONS);\n\t\tcreateEOperation(identifiedElementEClass, IDENTIFIED_ELEMENT___GET_IRI);\n\n\t\timportEClass = createEClass(IMPORT);\n\t\tcreateEAttribute(importEClass, IMPORT__KIND);\n\t\tcreateEAttribute(importEClass, IMPORT__NAMESPACE);\n\t\tcreateEAttribute(importEClass, IMPORT__PREFIX);\n\t\tcreateEReference(importEClass, IMPORT__OWNING_ONTOLOGY);\n\t\tcreateEOperation(importEClass, IMPORT___GET_IRI);\n\t\tcreateEOperation(importEClass, IMPORT___GET_SEPARATOR);\n\n\t\tinstanceEClass = createEClass(INSTANCE);\n\t\tcreateEReference(instanceEClass, INSTANCE__OWNED_PROPERTY_VALUES);\n\n\t\taxiomEClass = createEClass(AXIOM);\n\t\tcreateEOperation(axiomEClass, AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tassertionEClass = createEClass(ASSERTION);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(assertionEClass, ASSERTION___GET_OBJECT);\n\n\t\tpredicateEClass = createEClass(PREDICATE);\n\t\tcreateEReference(predicateEClass, PREDICATE__ANTECEDENT_RULE);\n\t\tcreateEReference(predicateEClass, PREDICATE__CONSEQUENT_RULE);\n\n\t\targumentEClass = createEClass(ARGUMENT);\n\t\tcreateEAttribute(argumentEClass, ARGUMENT__VARIABLE);\n\t\tcreateEReference(argumentEClass, ARGUMENT__LITERAL);\n\t\tcreateEReference(argumentEClass, ARGUMENT__INSTANCE);\n\n\t\tliteralEClass = createEClass(LITERAL);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_STRING_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(literalEClass, LITERAL___GET_TYPE_IRI);\n\n\t\tontologyEClass = createEClass(ONTOLOGY);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__NAMESPACE);\n\t\tcreateEAttribute(ontologyEClass, ONTOLOGY__PREFIX);\n\t\tcreateEReference(ontologyEClass, ONTOLOGY__OWNED_IMPORTS);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_IRI);\n\t\tcreateEOperation(ontologyEClass, ONTOLOGY___GET_SEPARATOR);\n\n\t\tmemberEClass = createEClass(MEMBER);\n\t\tcreateEAttribute(memberEClass, MEMBER__NAME);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___IS_REF);\n\t\tcreateEOperation(memberEClass, MEMBER___RESOLVE);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_IRI);\n\t\tcreateEOperation(memberEClass, MEMBER___GET_ABBREVIATED_IRI);\n\n\t\tvocabularyBoxEClass = createEClass(VOCABULARY_BOX);\n\n\t\tdescriptionBoxEClass = createEClass(DESCRIPTION_BOX);\n\n\t\tvocabularyEClass = createEClass(VOCABULARY);\n\t\tcreateEReference(vocabularyEClass, VOCABULARY__OWNED_STATEMENTS);\n\n\t\tvocabularyBundleEClass = createEClass(VOCABULARY_BUNDLE);\n\n\t\tdescriptionEClass = createEClass(DESCRIPTION);\n\t\tcreateEReference(descriptionEClass, DESCRIPTION__OWNED_STATEMENTS);\n\n\t\tdescriptionBundleEClass = createEClass(DESCRIPTION_BUNDLE);\n\n\t\tstatementEClass = createEClass(STATEMENT);\n\n\t\tvocabularyMemberEClass = createEClass(VOCABULARY_MEMBER);\n\n\t\tdescriptionMemberEClass = createEClass(DESCRIPTION_MEMBER);\n\n\t\tvocabularyStatementEClass = createEClass(VOCABULARY_STATEMENT);\n\t\tcreateEReference(vocabularyStatementEClass, VOCABULARY_STATEMENT__OWNING_VOCABULARY);\n\n\t\tdescriptionStatementEClass = createEClass(DESCRIPTION_STATEMENT);\n\t\tcreateEReference(descriptionStatementEClass, DESCRIPTION_STATEMENT__OWNING_DESCRIPTION);\n\n\t\ttermEClass = createEClass(TERM);\n\n\t\truleEClass = createEClass(RULE);\n\t\tcreateEReference(ruleEClass, RULE__REF);\n\t\tcreateEReference(ruleEClass, RULE__ANTECEDENT);\n\t\tcreateEReference(ruleEClass, RULE__CONSEQUENT);\n\n\t\tbuiltInEClass = createEClass(BUILT_IN);\n\t\tcreateEReference(builtInEClass, BUILT_IN__REF);\n\n\t\tspecializableTermEClass = createEClass(SPECIALIZABLE_TERM);\n\t\tcreateEReference(specializableTermEClass, SPECIALIZABLE_TERM__OWNED_SPECIALIZATIONS);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\n\t\ttypeEClass = createEClass(TYPE);\n\n\t\trelationBaseEClass = createEClass(RELATION_BASE);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__SOURCES);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__TARGETS);\n\t\tcreateEReference(relationBaseEClass, RELATION_BASE__REVERSE_RELATION);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__INVERSE_FUNCTIONAL);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__SYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__ASYMMETRIC);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__REFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__IRREFLEXIVE);\n\t\tcreateEAttribute(relationBaseEClass, RELATION_BASE__TRANSITIVE);\n\n\t\tspecializablePropertyEClass = createEClass(SPECIALIZABLE_PROPERTY);\n\t\tcreateEReference(specializablePropertyEClass, SPECIALIZABLE_PROPERTY__OWNED_EQUIVALENCES);\n\n\t\tclassifierEClass = createEClass(CLASSIFIER);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_EQUIVALENCES);\n\t\tcreateEReference(classifierEClass, CLASSIFIER__OWNED_PROPERTY_RESTRICTIONS);\n\n\t\tscalarEClass = createEClass(SCALAR);\n\t\tcreateEReference(scalarEClass, SCALAR__REF);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_ENUMERATION);\n\t\tcreateEReference(scalarEClass, SCALAR__OWNED_EQUIVALENCES);\n\n\t\tentityEClass = createEClass(ENTITY);\n\t\tcreateEReference(entityEClass, ENTITY__OWNED_KEYS);\n\n\t\tstructureEClass = createEClass(STRUCTURE);\n\t\tcreateEReference(structureEClass, STRUCTURE__REF);\n\n\t\taspectEClass = createEClass(ASPECT);\n\t\tcreateEReference(aspectEClass, ASPECT__REF);\n\n\t\tconceptEClass = createEClass(CONCEPT);\n\t\tcreateEReference(conceptEClass, CONCEPT__REF);\n\t\tcreateEReference(conceptEClass, CONCEPT__OWNED_ENUMERATION);\n\n\t\trelationEntityEClass = createEClass(RELATION_ENTITY);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__REF);\n\t\tcreateEReference(relationEntityEClass, RELATION_ENTITY__FORWARD_RELATION);\n\n\t\tannotationPropertyEClass = createEClass(ANNOTATION_PROPERTY);\n\t\tcreateEReference(annotationPropertyEClass, ANNOTATION_PROPERTY__REF);\n\n\t\tsemanticPropertyEClass = createEClass(SEMANTIC_PROPERTY);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___IS_FUNCTIONAL);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(semanticPropertyEClass, SEMANTIC_PROPERTY___GET_RANGE_LIST);\n\n\t\tscalarPropertyEClass = createEClass(SCALAR_PROPERTY);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__REF);\n\t\tcreateEAttribute(scalarPropertyEClass, SCALAR_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__DOMAINS);\n\t\tcreateEReference(scalarPropertyEClass, SCALAR_PROPERTY__RANGES);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(scalarPropertyEClass, SCALAR_PROPERTY___GET_RANGE_LIST);\n\n\t\tstructuredPropertyEClass = createEClass(STRUCTURED_PROPERTY);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__REF);\n\t\tcreateEAttribute(structuredPropertyEClass, STRUCTURED_PROPERTY__FUNCTIONAL);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__DOMAINS);\n\t\tcreateEReference(structuredPropertyEClass, STRUCTURED_PROPERTY__RANGES);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_DOMAIN_LIST);\n\t\tcreateEOperation(structuredPropertyEClass, STRUCTURED_PROPERTY___GET_RANGE_LIST);\n\n\t\trelationEClass = createEClass(RELATION);\n\t\tcreateEOperation(relationEClass, RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(relationEClass, RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(relationEClass, RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(relationEClass, RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAINS);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGES);\n\t\tcreateEOperation(relationEClass, RELATION___GET_INVERSE);\n\t\tcreateEOperation(relationEClass, RELATION___GET_DOMAIN_LIST);\n\t\tcreateEOperation(relationEClass, RELATION___GET_RANGE_LIST);\n\n\t\tforwardRelationEClass = createEClass(FORWARD_RELATION);\n\t\tcreateEReference(forwardRelationEClass, FORWARD_RELATION__RELATION_ENTITY);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_REF);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_RANGES);\n\t\tcreateEOperation(forwardRelationEClass, FORWARD_RELATION___GET_INVERSE);\n\n\t\treverseRelationEClass = createEClass(REVERSE_RELATION);\n\t\tcreateEReference(reverseRelationEClass, REVERSE_RELATION__RELATION_BASE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_REF);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_INVERSE_FUNCTIONAL);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_SYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_ASYMMETRIC);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_REFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_IRREFLEXIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___IS_TRANSITIVE);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_RANGES);\n\t\tcreateEOperation(reverseRelationEClass, REVERSE_RELATION___GET_INVERSE);\n\n\t\tunreifiedRelationEClass = createEClass(UNREIFIED_RELATION);\n\t\tcreateEReference(unreifiedRelationEClass, UNREIFIED_RELATION__REF);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_DOMAINS);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_RANGES);\n\t\tcreateEOperation(unreifiedRelationEClass, UNREIFIED_RELATION___GET_INVERSE);\n\n\t\tnamedInstanceEClass = createEClass(NAMED_INSTANCE);\n\t\tcreateEReference(namedInstanceEClass, NAMED_INSTANCE__OWNED_TYPES);\n\n\t\tconceptInstanceEClass = createEClass(CONCEPT_INSTANCE);\n\t\tcreateEReference(conceptInstanceEClass, CONCEPT_INSTANCE__REF);\n\n\t\trelationInstanceEClass = createEClass(RELATION_INSTANCE);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__REF);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__SOURCES);\n\t\tcreateEReference(relationInstanceEClass, RELATION_INSTANCE__TARGETS);\n\n\t\tstructureInstanceEClass = createEClass(STRUCTURE_INSTANCE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__TYPE);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_AXIOM);\n\t\tcreateEReference(structureInstanceEClass, STRUCTURE_INSTANCE__OWNING_ASSERTION);\n\n\t\tkeyAxiomEClass = createEClass(KEY_AXIOM);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__PROPERTIES);\n\t\tcreateEReference(keyAxiomEClass, KEY_AXIOM__OWNING_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_KEYED_ENTITY);\n\t\tcreateEOperation(keyAxiomEClass, KEY_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tspecializationAxiomEClass = createEClass(SPECIALIZATION_AXIOM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__SUPER_TERM);\n\t\tcreateEReference(specializationAxiomEClass, SPECIALIZATION_AXIOM__OWNING_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_SUB_TERM);\n\t\tcreateEOperation(specializationAxiomEClass, SPECIALIZATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tinstanceEnumerationAxiomEClass = createEClass(INSTANCE_ENUMERATION_AXIOM);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__INSTANCES);\n\t\tcreateEReference(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM__OWNING_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_ENUMERATED_CONCEPT);\n\t\tcreateEOperation(instanceEnumerationAxiomEClass, INSTANCE_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRestrictionAxiomEClass = createEClass(PROPERTY_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__PROPERTY);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEReference(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM__OWNING_AXIOM);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_RESTRICTING_DOMAIN);\n\t\tcreateEOperation(propertyRestrictionAxiomEClass, PROPERTY_RESTRICTION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tliteralEnumerationAxiomEClass = createEClass(LITERAL_ENUMERATION_AXIOM);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__LITERALS);\n\t\tcreateEReference(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM__OWNING_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_ENUMERATED_SCALAR);\n\t\tcreateEOperation(literalEnumerationAxiomEClass, LITERAL_ENUMERATION_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tclassifierEquivalenceAxiomEClass = createEClass(CLASSIFIER_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__SUPER_CLASSIFIERS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNED_PROPERTY_RESTRICTIONS);\n\t\tcreateEReference(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM__OWNING_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_SUB_CLASSIFIER);\n\t\tcreateEOperation(classifierEquivalenceAxiomEClass, CLASSIFIER_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tscalarEquivalenceAxiomEClass = createEClass(SCALAR_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__SUPER_SCALAR);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__OWNING_SCALAR);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_LENGTH);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__PATTERN);\n\t\tcreateEAttribute(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__LANGUAGE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MIN_EXCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_INCLUSIVE);\n\t\tcreateEReference(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM__MAX_EXCLUSIVE);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_SUB_SCALAR);\n\t\tcreateEOperation(scalarEquivalenceAxiomEClass, SCALAR_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyEquivalenceAxiomEClass = createEClass(PROPERTY_EQUIVALENCE_AXIOM);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__SUPER_PROPERTY);\n\t\tcreateEReference(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM__OWNING_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_SUB_PROPERTY);\n\t\tcreateEOperation(propertyEquivalenceAxiomEClass, PROPERTY_EQUIVALENCE_AXIOM___GET_CHARACTERIZED_TERM);\n\n\t\tpropertyRangeRestrictionAxiomEClass = createEClass(PROPERTY_RANGE_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__KIND);\n\t\tcreateEReference(propertyRangeRestrictionAxiomEClass, PROPERTY_RANGE_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyCardinalityRestrictionAxiomEClass = createEClass(PROPERTY_CARDINALITY_RESTRICTION_AXIOM);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__KIND);\n\t\tcreateEAttribute(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__CARDINALITY);\n\t\tcreateEReference(propertyCardinalityRestrictionAxiomEClass, PROPERTY_CARDINALITY_RESTRICTION_AXIOM__RANGE);\n\n\t\tpropertyValueRestrictionAxiomEClass = createEClass(PROPERTY_VALUE_RESTRICTION_AXIOM);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM__NAMED_INSTANCE_VALUE);\n\t\tcreateEOperation(propertyValueRestrictionAxiomEClass, PROPERTY_VALUE_RESTRICTION_AXIOM___GET_VALUE);\n\n\t\tpropertySelfRestrictionAxiomEClass = createEClass(PROPERTY_SELF_RESTRICTION_AXIOM);\n\n\t\ttypeAssertionEClass = createEClass(TYPE_ASSERTION);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__TYPE);\n\t\tcreateEReference(typeAssertionEClass, TYPE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(typeAssertionEClass, TYPE_ASSERTION___GET_OBJECT);\n\n\t\tpropertyValueAssertionEClass = createEClass(PROPERTY_VALUE_ASSERTION);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__PROPERTY);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__LITERAL_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__STRUCTURE_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__NAMED_INSTANCE_VALUE);\n\t\tcreateEReference(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION__OWNING_INSTANCE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_VALUE);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_SUBJECT);\n\t\tcreateEOperation(propertyValueAssertionEClass, PROPERTY_VALUE_ASSERTION___GET_OBJECT);\n\n\t\tunaryPredicateEClass = createEClass(UNARY_PREDICATE);\n\t\tcreateEReference(unaryPredicateEClass, UNARY_PREDICATE__ARGUMENT);\n\n\t\tbinaryPredicateEClass = createEClass(BINARY_PREDICATE);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT1);\n\t\tcreateEReference(binaryPredicateEClass, BINARY_PREDICATE__ARGUMENT2);\n\n\t\tbuiltInPredicateEClass = createEClass(BUILT_IN_PREDICATE);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__BUILT_IN);\n\t\tcreateEReference(builtInPredicateEClass, BUILT_IN_PREDICATE__ARGUMENTS);\n\n\t\ttypePredicateEClass = createEClass(TYPE_PREDICATE);\n\t\tcreateEReference(typePredicateEClass, TYPE_PREDICATE__TYPE);\n\n\t\trelationEntityPredicateEClass = createEClass(RELATION_ENTITY_PREDICATE);\n\t\tcreateEReference(relationEntityPredicateEClass, RELATION_ENTITY_PREDICATE__TYPE);\n\n\t\tpropertyPredicateEClass = createEClass(PROPERTY_PREDICATE);\n\t\tcreateEReference(propertyPredicateEClass, PROPERTY_PREDICATE__PROPERTY);\n\n\t\tsameAsPredicateEClass = createEClass(SAME_AS_PREDICATE);\n\n\t\tdifferentFromPredicateEClass = createEClass(DIFFERENT_FROM_PREDICATE);\n\n\t\tquotedLiteralEClass = createEClass(QUOTED_LITERAL);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__VALUE);\n\t\tcreateEAttribute(quotedLiteralEClass, QUOTED_LITERAL__LANG_TAG);\n\t\tcreateEReference(quotedLiteralEClass, QUOTED_LITERAL__TYPE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_LEXICAL_VALUE);\n\t\tcreateEOperation(quotedLiteralEClass, QUOTED_LITERAL___GET_TYPE_IRI);\n\n\t\tintegerLiteralEClass = createEClass(INTEGER_LITERAL);\n\t\tcreateEAttribute(integerLiteralEClass, INTEGER_LITERAL__VALUE);\n\t\tcreateEOperation(integerLiteralEClass, INTEGER_LITERAL___GET_TYPE_IRI);\n\n\t\tdecimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n\t\tcreateEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__VALUE);\n\t\tcreateEOperation(decimalLiteralEClass, DECIMAL_LITERAL___GET_TYPE_IRI);\n\n\t\tdoubleLiteralEClass = createEClass(DOUBLE_LITERAL);\n\t\tcreateEAttribute(doubleLiteralEClass, DOUBLE_LITERAL__VALUE);\n\t\tcreateEOperation(doubleLiteralEClass, DOUBLE_LITERAL___GET_TYPE_IRI);\n\n\t\tbooleanLiteralEClass = createEClass(BOOLEAN_LITERAL);\n\t\tcreateEAttribute(booleanLiteralEClass, BOOLEAN_LITERAL__VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___IS_VALUE);\n\t\tcreateEOperation(booleanLiteralEClass, BOOLEAN_LITERAL___GET_TYPE_IRI);\n\n\t\t// Create enums\n\t\tseparatorKindEEnum = createEEnum(SEPARATOR_KIND);\n\t\trangeRestrictionKindEEnum = createEEnum(RANGE_RESTRICTION_KIND);\n\t\tcardinalityRestrictionKindEEnum = createEEnum(CARDINALITY_RESTRICTION_KIND);\n\t\timportKindEEnum = createEEnum(IMPORT_KIND);\n\n\t\t// Create data types\n\t\tunsignedIntEDataType = createEDataType(UNSIGNED_INT);\n\t\tunsignedIntegerEDataType = createEDataType(UNSIGNED_INTEGER);\n\t\tdecimalEDataType = createEDataType(DECIMAL);\n\t\tidEDataType = createEDataType(ID);\n\t\tnamespaceEDataType = createEDataType(NAMESPACE);\n\t}", "public void buildModel() {\n space = new RabbitsGrassSimulationSpace(gridSize);\n space.setModel(this);\n space.spreadGrass(numInitGrass);\n\n for (int i = 0; i < numInitRabbits; i++) {\n addNewRandomRabbit();\n }\n }", "private void createSharedSingletons(Context applicationContext) {\n\t\t// Create Active User\n\t\tActiveUserModel.createInstance(applicationContext);\n\n\t\t// Create Favorites List\n\t\tFavoriteTopicModelList.createInstance(applicationContext);\n\t\tFavoriteCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Read Later list\n\t\tReadLaterTopicModelList.createInstance(applicationContext);\n\t\tReadLaterCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Location Provider\n\t\tLocationProvider.getInstance(applicationContext);\n\t}", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}" ]
[ "0.6130365", "0.592811", "0.5848438", "0.5750414", "0.5714975", "0.5569811", "0.55297905", "0.55286896", "0.5496889", "0.54852456", "0.54849386", "0.5484186", "0.5413867", "0.54130816", "0.53773797", "0.536477", "0.53260976", "0.5317418", "0.5311075", "0.53010446", "0.5279718", "0.523503", "0.52250004", "0.52220476", "0.52168995", "0.5172434", "0.5162061", "0.5151963", "0.5150402", "0.5141906", "0.5133057", "0.5122147", "0.51210266", "0.51102024", "0.51080585", "0.510679", "0.5106156", "0.5101837", "0.509728", "0.5092729", "0.5090595", "0.50774086", "0.5070426", "0.50699854", "0.50690293", "0.50666445", "0.5065358", "0.50573915", "0.5056168", "0.5053251", "0.5045147", "0.50407517", "0.5040067", "0.50395423", "0.503184", "0.50311244", "0.5029284", "0.50271004", "0.5024959", "0.5024333", "0.5017533", "0.50165373", "0.5012773", "0.5009094", "0.4998092", "0.49971074", "0.49864006", "0.498003", "0.49654576", "0.49613467", "0.4958449", "0.4957132", "0.4953952", "0.49502087", "0.49494624", "0.4949134", "0.49478805", "0.4942625", "0.49386394", "0.49243236", "0.49227336", "0.49141768", "0.49141407", "0.49120927", "0.49097586", "0.49090755", "0.4908786", "0.49072316", "0.49058405", "0.4905701", "0.4896567", "0.48901102", "0.4888774", "0.48810485", "0.48752046", "0.48706746", "0.48673165", "0.48648977", "0.48645532", "0.48642218" ]
0.544567
12
Create an instance of the ConfigModel
ConfigModel createInstanceOfConfigModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ConfigurationModel() {\r\n\tloadConfiguration();\r\n }", "public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "private Config() {\n }", "public abstract CONFIG build();", "public Config createConfig(String filename);", "public ConfigExample() {\n }", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public Config() {\n this(System.getProperties());\n\n }", "abstract public Config createConfig(String path);", "public MecBasicsConfig()\n {\n\n }", "public FlightGearModel(Config config) {\n\t\tsuper();\n\t\tthis.config = config;\n\t}", "CsticModel createInstanceOfCsticModel();", "EisModel createEisModel();", "private ConfigProperties() {\n\n }", "public WorkflowConfiguration() {\n\t\t\n\t}", "protected JSFConfigModel createModel(FileObject fo) {\n if (fo.isFolder()) {\n LOG.log(Level.WARNING, \"Creation of faces-config model for directory: {0}\", fo.getPath());\n return null;\n }\n JSFConfigModel model = getCachedModel(fo);\n if (model == null) {\n try {\n ModelSource source = Utilities.createModelSource(fo, true);\n Lookup lookup = source.getLookup();\n lookup = new ProxyLookup(lookup, Lookups.singleton(this));\n source = new ModelSource(lookup, true);\n model = JSFConfigModelFactory.getInstance().getModel(source);\n Node rootElement = model.getDocument().getDocumentElement();\n if (rootElement == null || !JSFConfigQNames.areSameQName(JSFConfigQNames.FACES_CONFIG, (Element) rootElement)) {\n return null;\n } else {\n putCachedModel(fo, model);\n }\n } catch (CatalogModelException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n return model;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public ManagedConfiguration createConfiguration() throws SmartFrogException, RemoteException {\n return ManagedConfiguration.createConfiguration(this, true, isClusterRequired(), false);\n }", "@NonNull\n\t\tConfig build();", "InstanceModel createInstanceOfInstanceModel();", "public StorageConfig() {\n }", "public SimulationConfig() {\r\n\t}", "private ConfigurationObject createObject(String name, String type) throws Exception {\r\n ConfigurationObject object = new DefaultConfigurationObject(name);\r\n object.setPropertyValue(PROPERTY_TYPE, type);\r\n\r\n return object;\r\n }", "public ConfigManager() {\n // Nobody here.\n }", "protected Configuration() {\r\n }", "DomainModel createDomainModel();", "public Model() {\n\t}", "public Model() {\n\t}", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "Map<String, Object> createConfig(Request request, String configtype);", "private OptimoveConfig() {\n }", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "private ProjectConfigurationFactory()\n {}", "void init(Config config);", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "public static Config getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tGson gson = new Gson();\r\n\t\t\ttry {\r\n\t\t\t\tinstance = gson.fromJson(FileUtil.getResourceContent(\"config.data\"), Config.class);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getMessage());\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn instance;\r\n\t}", "ZenModel createZenModel();", "public static AppTest create(Config config) {return null;}", "public PanoramaConfig() {\n }", "CsticGroupModel createInstanceOfCsticGroupModel();", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public Model() {\n\n }", "public OServerConfiguration() {}", "public abstract Configuration configuration();", "void create(Model model) throws Exception;", "Build_Model() {\n\n }", "abstract public Config createConfigFromString(String data);", "public AbstractRepositoryImplConfig() {\n\t}", "DataGenModel()\n {\n }", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "SystemParamModel createSystemParamModel();", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }", "Pair<T, U> build() throws IOException, ConfigurationException;", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public KafkaConfig() { }", "public Completable init() {\n\t\tLocalConfigModel localConfigModel = new LocalConfigModel()\n\t\t\t.setReadOnly(meshOptions.isStartInReadOnly());\n\t\treturn setActiveConfig(localConfigModel).ignoreElement();\n\t}", "public M create(P model);", "public Configuration(Config config){\n String error = fromConfig(config);\n if(errors){\n throw new RuntimeException(error);\n }\n }", "private AppConfigContent() {}", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "private GameConfig() {}", "public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }", "abstract public Config createConfigWithFactory(String path, String factoryPath);", "public SourceTypeConfiguration() {\n\n\t}", "ImportConfig createImportConfig();", "public static SettingsModel getInstance() {\n return SETTINGS_MODEL;\n }", "public StorageConfiguration() {\n }", "DataModel createDataModel();", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "@Override\n public void init() throws Exception {\n config = new Config();\n }", "public static Config createJeruslaemConfig() {\n\t\tConfig config = ConfigUtils.createConfig();\n\n\t\tconfig.network().setInputFile(INPUT_NETWORK);\n\t\tconfig.plans().setInputFile(INPUT_POPULATION);\n\t\tconfig.facilities().setInputFile(INPUT_FACILITES);\n\t\tconfig.households().setInputFile(INPUT_HOUSEHOLDS);\n\n\t\t// modify controler\n\t\tconfig.controler().setWriteEventsInterval(25);\n\t\tconfig.controler().setWritePlansInterval(25);\n\t\tconfig.controler().setEventsFileFormats(EnumSet.of(EventsFileFormat.xml));\n\t\tconfig.controler().setOutputDirectory(OUTPUT_FOLDER + RUN_ID + \"/\");\n\t\tconfig.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);\n\t\tconfig.controler().setFirstIteration(0);\n\t\tconfig.controler().setLastIteration(300);\n\t\tconfig.controler().setMobsim(\"qsim\");\n\t\tconfig.controler().setRoutingAlgorithmType(RoutingAlgorithmType.FastAStarLandmarks);\n\t\tconfig.controler().setRunId(RUN_ID);\n\t\t\n\t\t// modify Qsim\n\t\tconfig.qsim().setStartTime(0.0);\n\t\tconfig.qsim().setEndTime(30 * 3600);\n\t\tconfig.qsim().setFlowCapFactor(0.3);\n\t\tconfig.qsim().setStorageCapFactor(Math.pow(0.3, 0.75));\n\t\tconfig.qsim().setNumberOfThreads(12);\n\t\tconfig.qsim().setSnapshotPeriod(1);\n\t\tconfig.qsim().setStuckTime(10);//30,60 or multiply by 60\n\t\tconfig.qsim().setRemoveStuckVehicles(false);\n\t\tconfig.qsim().setTimeStepSize(1);\n\t\tconfig.qsim().setTrafficDynamics(TrafficDynamics.kinematicWaves);// kinematic waves\n\t\tconfig.qsim().setMainModes(Arrays.asList(TransportMode.car));\n\t\tconfig.qsim().setInsertingWaitingVehiclesBeforeDrivingVehicles(true);\n\n\t\t// modify global\n\t\tconfig.global().setCoordinateSystem(\"EPSG:2039\");\n\t\tconfig.global().setNumberOfThreads(16);\n\t\t// ?? random seed?<param name=\"randomSeed\" value=\"4711\" />\n\t\t\n\t\t// Add transit\n\t\tconfig.transit().setUseTransit(true);\n\t\tconfig.transit().setTransitScheduleFile(INPUT_TRANSIT_SCHEDULE);\n\t\tconfig.transit().setVehiclesFile(INPUT_TRANSIT_VEHICLES);\n\t\t\n\n\n//\t\t// Add sub-tour mode choice\n//\t\tconfig.subtourModeChoice()\n//\t\t\t\t.setModes(new String[] { TransportMode.car, TransportMode.pt, TransportMode.walk, TransportMode.bike });\n//\t\t// TODO check that bike is biycle\n//\t\tconfig.subtourModeChoice().setChainBasedModes(new String[] { TransportMode.car });\n//\n\t\t// Add sub-tour mode choice\n\t\tconfig.timeAllocationMutator().setMutationRange(3600);\n\n\t\t// Add strategy\n\t\tconfig.strategy().setMaxAgentPlanMemorySize(5);\n\t\tconfig.strategy().setFractionOfIterationsToDisableInnovation(0.8);\n\n\t\t// Add strategy - plan selector\n\t\tStrategySettings changeExpStrategy = new StrategySettings();\n\t\tchangeExpStrategy.setDisableAfter(-1);\n\t\tchangeExpStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultSelector.ChangeExpBeta.toString());\n\t\tchangeExpStrategy.setWeight(0.8);\n\t\tconfig.strategy().addStrategySettings(changeExpStrategy);\n\n//\t\t Add strategy - time-mutation\n\t\tStrategySettings timeMutatorStrategy = new StrategySettings();\n\t\ttimeMutatorStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.TimeAllocationMutator.toString());\n\t\ttimeMutatorStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(timeMutatorStrategy);\n\n\t\t// Add strategy - re-route\n\t\tStrategySettings reRouteStrategy = new StrategySettings();\n\t\treRouteStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.ReRoute.toString());\n\t\treRouteStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(reRouteStrategy);\n\n//\t\t Add strategy - Sub-tour strategy\n\t\tStrategySettings subTourModeChoiceStrategy = new StrategySettings();\n\t\tsubTourModeChoiceStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.SubtourModeChoice.toString());\n\t\tsubTourModeChoiceStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(subTourModeChoiceStrategy);\n\n\t\t// add car Availability after adding attributes to popualtion\n\t\t config.subtourModeChoice().setConsiderCarAvailability(true);\n\n\t\t// add network modes which are simulated on network in future add more modes\n\t\t// config.plansCalcRoute().setNetworkModes(Arrays.asList(TransportMode.car));\n\t\t// config.plansCalcRoute().setInsertingAccessEgressWalk(true);\n\n\t\t// // just a place hodler\n\t\t// ModeRoutingParams taxiModeRoute = new ModeRoutingParams();\n\t\t// taxiModeRoute.setMode(TransportMode.taxi);\n\t\t// taxiModeRoute.setTeleportedModeSpeed(100.0);\n\t\t// config.plansCalcRoute().addModeRoutingParams(taxiModeRoute);\n\n\t\t// global scoring values taken from TLVM model = SF 14\n\t\tconfig.planCalcScore().setEarlyDeparture_utils_hr(0.0);\n\t\tconfig.planCalcScore().setLateArrival_utils_hr(0);\n\t\tconfig.planCalcScore().setMarginalUtilityOfMoney(0.062);\n\t\tconfig.planCalcScore().setPerforming_utils_hr(0.96);\n\t\tconfig.planCalcScore().setUtilityOfLineSwitch(0);\n\t\tconfig.planCalcScore().setMarginalUtlOfWaitingPt_utils_hr(-0.18);\n\n\t\t// car scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams carCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.car);\n\t\tcarCalcScoreParams.setConstant(-0.562);\n\t\tcarCalcScoreParams.setMode(\"car\");\n\t\tcarCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(carCalcScoreParams);\n\n\t\t// PT scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams ptCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.pt);\n\t\tptCalcScoreParams.setConstant(-0.124);\n\t\tptCalcScoreParams.setMode(\"pt\");\n\t\tptCalcScoreParams.setMarginalUtilityOfTraveling(-0.18);\n\t\tconfig.planCalcScore().addModeParams(ptCalcScoreParams);\n\n\t\t// Walk scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams walkCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.walk);\n\t\twalkCalcScoreParams.setMode(\"walk\");\n\t\twalkCalcScoreParams.setMarginalUtilityOfTraveling(-1.14);\n\t\tconfig.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO get values for Taxi scoring\n\t\t// Taxi scoring functions place holder (taken from car)\n\t\t// PlanCalcScoreConfigGroup.ModeParams TaxiCalcScoreParams = new\n\t\t// PlanCalcScoreConfigGroup.ModeParams(TransportMode.taxi);\n\t\t// TaxiCalcScoreParams.setConstant(-0.562);\n\t\t// TaxiCalcScoreParams.setMode(\"taxi\");\n\t\t// TaxiCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\t// config.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO add ride as network mode remove from modechoice\n\t\t// Ride scoring functions place holder taken from Berlin MATSim model -\n\t\t// monetaryDistanceRate same as car -0.0004\n\t\tPlanCalcScoreConfigGroup.ModeParams rideCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.ride);\n\t\trideCalcScoreParams.setMode(\"ride\");\n\t\trideCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(rideCalcScoreParams);\n\n\t\t// TODO check with JLM bike - bicyle\n\t\t// bike scoring functions place holder taken from Berlin MATSim model of bicyke\n\t\tPlanCalcScoreConfigGroup.ModeParams bikeCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.bike);\n\t\tbikeCalcScoreParams.setConstant(-1.9);\n\t\tbikeCalcScoreParams.setMode(\"bike\");\n\t\tconfig.planCalcScore().addModeParams(bikeCalcScoreParams);\n\n\t\t// TODO get activities open hours\n\t\tActivityParams home = new ActivityParams(\"home\");\n\t\thome.setTypicalDuration(16 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(home);\n\n\t\tActivityParams work = new ActivityParams(\"work\");\n\t\twork.setOpeningTime(6 * 3600);\n\t\twork.setClosingTime(20 * 3600);\n\t\twork.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(work);\n\n\t\tActivityParams school = new ActivityParams(\"school\");\n\t\tschool.setOpeningTime(8 * 3600);\n\t\tschool.setClosingTime(14 * 3600);\n\t\tschool.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(school);\n\n\t\tActivityParams leisure = new ActivityParams(\"leisure\");\n\t\tleisure.setOpeningTime(9 * 3600);\n\t\tleisure.setClosingTime(24 * 3600);\n\t\tleisure.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(leisure);\n\n\t\tActivityParams other = new ActivityParams(\"other\");\n\t\tother.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(other);\n\n\t\treturn config;\n\n\t}", "abstract public Core createCoreWithConfig(Config config, Object systemContext);", "public Model(){\r\n try{\r\n File file = new File(\"./config.ini\");\r\n boolean firstRun = file.createNewFile();\r\n\r\n //If this is the first run for the application\r\n if (firstRun){\r\n //Ask user the amount of hours he wants to work per day\r\n dailyWorkload = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of hours you want to work per day\"));\r\n numDayWorkWeek = Integer.parseInt(JOptionPane.showInputDialog(\"Enter number of days you want to work per week\"));\r\n\r\n //Allocate memory for data structures\r\n unfinished = new TreeSet<>();\r\n finished = new ArrayList<>();\r\n activities = new ArrayList<>();\r\n\r\n FileWriter fw = new FileWriter(file);\r\n PrintWriter pw = new PrintWriter(fw);\r\n\r\n pw.println(dailyWorkload);\r\n pw.println(numDayWorkWeek);\r\n pw.close();\r\n fw.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n }\r\n //Else if this is not the first run of the application\r\n else{\r\n FileReader fr = new FileReader(file);\r\n BufferedReader br = new BufferedReader(fr);\r\n dailyWorkload = Integer.parseInt(br.readLine());\r\n numDayWorkWeek = Integer.parseInt(br.readLine());\r\n br.close();\r\n fr.close();\r\n\r\n weeklySchedule = new ArrayList<>(numDayWorkWeek);\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.add(new TreeSet<Task>());\r\n loadFromDatabase();\r\n }\r\n\r\n }\r\n catch (Exception e){\r\n System.out.println(\"Stress is constructor: \" + e.getMessage());\r\n }\r\n }", "public static void configUMLModelManager() throws Exception {\n // clean the ConfigManager.\n clearConfig();\n ConfigManager cm = ConfigManager.getInstance();\n cm.add(\"Config.xml\");\n UMLModelManager manager = UMLModelManager.getInstance();\n ProjectConfigurationManager configManager = new ProjectConfigurationManager(manager);\n manager.setProjectConfigurationManager(configManager);\n manager.setProjectLanguage(\"Java\");\n // clean the UMLModelManager for test.\n manager.clearActivityGraphs();\n manager.clearDiagrams();\n clearConfig();\n }", "public static ParsedmodelFactory init() {\n\t\ttry {\n\t\t\tParsedmodelFactory theParsedmodelFactory = (ParsedmodelFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://parsedmetadata/1.0\"); \n\t\t\tif (theParsedmodelFactory != null) {\n\t\t\t\treturn theParsedmodelFactory;\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 ParsedmodelFactoryImpl();\n\t}", "PriceModel createInstanceOfPriceModel();", "public ConfigMetadataProcessor() {\n }", "private Model(){}", "public static <T> T construct(String classname, String readable) throws ConfigurationException\n {\n Class<T> cls = FBUtilities.classForName(classname, readable);\n return construct(cls, classname, readable);\n }", "public static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}", "private ConfigHelper() {\n //does nothing\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "public IheConfiguration() {\n }", "public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }", "static RatAppModel getInstance() {return model;}" ]
[ "0.68790805", "0.6873237", "0.65752834", "0.63041687", "0.6247902", "0.6226948", "0.62068045", "0.6162284", "0.6162284", "0.6162284", "0.6162284", "0.6162284", "0.6162284", "0.6162284", "0.61381423", "0.61332935", "0.6091215", "0.6059605", "0.6038187", "0.60307914", "0.59936917", "0.5924838", "0.5908168", "0.58978385", "0.5881476", "0.587405", "0.586278", "0.58129793", "0.5761712", "0.5757428", "0.5744056", "0.5700727", "0.5694859", "0.5690161", "0.5690161", "0.56768274", "0.5667353", "0.56512165", "0.56299627", "0.56250376", "0.5616697", "0.5613979", "0.56094384", "0.56052786", "0.56006664", "0.556367", "0.5551975", "0.554785", "0.5542176", "0.55354464", "0.55354464", "0.55354464", "0.5528684", "0.5507039", "0.5498802", "0.54927844", "0.54854727", "0.5481603", "0.54800385", "0.5462145", "0.54497916", "0.54393977", "0.5432117", "0.5429176", "0.54266083", "0.5419256", "0.5409297", "0.54036504", "0.5393641", "0.5381896", "0.5339315", "0.53252244", "0.53191096", "0.53030944", "0.5301837", "0.53013957", "0.5294725", "0.52857435", "0.52731705", "0.5270264", "0.5268482", "0.5268316", "0.52631855", "0.5262506", "0.5261677", "0.5256787", "0.52550656", "0.5248563", "0.5242986", "0.52429247", "0.523177", "0.52196085", "0.5210384", "0.52101", "0.52095133", "0.5208761", "0.51924443", "0.5189394", "0.5187377", "0.5184465" ]
0.8473132
0
Create an instance of the InstanceModel
InstanceModel createInstanceOfInstanceModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "public Instance() {\n }", "void create(Model model) throws Exception;", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "public M create(P model);", "EisModel createEisModel();", "CsticModel createInstanceOfCsticModel();", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "DomainModel createDomainModel();", "public VersionModel() {\n }", "public Model() {\n\t}", "public Model() {\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "void create(T instance) throws IOException;", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "GameModel createGameModel(GameModel gameModel);", "public Model() {\n\n }", "public void createInstance(String className, String instanceName)\r\n\t{\r\n\t\t\r\n\t\tOntClass c = obtainOntClass(className);\r\n\t\t\r\n\t\tString longName;\r\n\t\tif(instanceName.contains(\"#\"))\r\n\t\t\tlongName = instanceName;\r\n\t\tif(instanceName.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(instanceName);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + instanceName;\r\n\t\t\r\n\t\tc.createIndividual(longName);\r\n\t}", "PriceModel createInstanceOfPriceModel();", "ZenModel createZenModel();", "ConfigModel createInstanceOfConfigModel();", "public void create(){}", "private static void spawnInstance(){\n\t\tString instanceType = null;\n\t\tString imageId = null; \n\t\tint numInstances = 0;\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Name of key to use?\");\n\t\tkeyname = in.next();\n\t\t\n\t\tSystem.out.println(\"Instance type? (use d for default: t2.micro)\");\n\t\tinstanceType = in.next();\n\t\t\n\t\tif(instanceType.equals(\"d\")){\n\t\t\tinstanceType = INSTANCE_TYPE;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Image id? (use d for default: ami-b5a7ea85, Amazon Linux AMI)\");\n\t\timageId = in.next();\n\t\t\n\t\tif(imageId.equals(\"d\")){\n\t\t\timageId = IMAGE_ID; \n\t\t}\n\t\t\n\t\tSystem.out.println(\"Number of instances?\");\n\t\tnumInstances = in.nextInt();\n\n\t\tin.close();\n\t\n\t\tRunInstancesRequest req = new RunInstancesRequest();\n\t\t\n\t String group = GROUP;\n\t \n\t req.withImageId(imageId)\n\t .withInstanceType(instanceType)\n\t .withMinCount(numInstances)\n\t .withMaxCount(numInstances)\n\t .withKeyName(keyname)\n\t .withSecurityGroups(group);\n\t \n\t RunInstancesResult reqRes = ec2.runInstances(req);\n\t Reservation res = reqRes.getReservation();\n\t System.out.println(\"Reservation number is \" + res.getReservationId());\n\t try {\n \t\tSystem.out.println(\"Just a moment while the instance is spun up...\");\n\t\t\tTimeUnit.SECONDS.sleep(10);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Instantiation failed!\");\n\t\t}\n \t\tString ip = listLiveInstances();\n \t\tSystem.out.println(\"\");\n \t\tSystem.out.println(\"Connect with 'ssh -i \" + keyname + \".pem ec2-user@\" + ip +\"'\");\n \t\tSystem.out.println(\"If connection fails, run with -l option and check status.\");\n \t\tSystem.exit(0);\n\t}", "public <T> T createModel(T referenceModel) throws CreateModelException {\n return createModel(referenceModel, true);\n }", "CsticGroupModel createInstanceOfCsticGroupModel();", "private Model(){}", "public boolean create(ModelObject obj);", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "public static synchronized Model getInstance() {\n if (instance == null) {\n instance = new Model();\n }\n return instance;\n }", "DataModel createDataModel();", "DynamicInstance createDynamicInstance();", "MetricModel createMetricModel();", "private boolean createInstance( View view, final EntityInstanceImpl ei )\n {\n final EntityDef entityDef = ei.getEntityDef();\n\n // Try to set the FKs for this instance. It will fail (return false) if one the source EI\n // for one of the FKs hasn't been created yet. This means it doesn't have a key.\n if ( ! setForeignKeys( ei ) )\n return false;\n\n // If we get here than all the FK's were copied successfully and we can create this instance.\n // We'll retrieve the generated key from the DB after the row has been inserted.\n try\n {\n if ( entityDef.getDbCreatedTimestamp() != null )\n {\n AttributeInstanceImpl timestamp = ei.getAttribute( entityDef.getDbCreatedTimestamp() );\n if ( timestamp.isNull() )\n {\n ZonedDateTime now = ZonedDateTime.now();\n timestamp.setValue( now );\n\n if ( entityDef.getDbUpdatedTimestamp() != null )\n ei.getAttribute( entityDef.getDbUpdatedTimestamp() ).setValue( now );\n }\n }\n\n // We need to handle multiple entities being created.\n List<EntityInstance> list = new ArrayList<EntityInstance>();\n list.add( ei );\n dbHandler.insertEntity( view, list );\n\n AttributeDef genkey = entityDef.getGenKey();\n if ( genkey != null )\n {\n List<Object> keys = dbHandler.getKeysGeneratedByDb();\n if ( keys.size() != 1 )\n throw new ZeidonException(\"Unexpected number of keys found: %s\", keys );\n\n AttributeDef keyAttrib = entityDef.getKeys().get( 0 );\n ei.getAttribute( keyAttrib ).setInternalValue( keys.get( 0 ), false );\n }\n\n // Indicate that--for now--we won't need to update later because of a FK.\n ei.dbhForeignKey = false;\n\n // Set the dbhCreated flag for ei and all its linked instances. This\n // will prevent us from trying to insert it again.\n for ( EntityInstanceImpl linked : ei.getAllLinkedInstances() )\n {\n linked.dbhCreated = true;\n\n // If the linked instance is flagged as created then we need\n // to set its included flag on so that the *relationship*\n // is still created.\n if ( linked.isCreated() )\n linked.dbhNeedsInclude = true;\n }\n }\n catch ( Exception e )\n {\n throw ZeidonException.wrapException( e ).prependEntityInstance( ei );\n }\n\n return true;\n }", "public CMObject newInstance();", "public Instance(Instance inst){\r\n\t\tthis.isTrain = inst.isTrain;\r\n\t\tthis.numInputAttributes = inst.numInputAttributes;\r\n\t\tthis.numOutputAttributes = inst.numOutputAttributes;\r\n\t\tthis.numUndefinedAttributes = inst.numUndefinedAttributes;\r\n\r\n\t\tthis.anyMissingValue = Arrays.copyOf(inst.anyMissingValue, inst.anyMissingValue.length);\r\n\r\n\t\tthis.nominalValues = new String[inst.nominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.nominalValues[i] = Arrays.copyOf(inst.nominalValues[i],inst.nominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.intNominalValues = new int[inst.intNominalValues.length][];\r\n\t\tfor(int i=0;i<nominalValues.length;i++){\r\n\t\t\tthis.intNominalValues[i] = Arrays.copyOf(inst.intNominalValues[i],inst.intNominalValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.realValues = new double[inst.realValues.length][];\r\n\t\tfor(int i=0;i<realValues.length;i++){\r\n\t\t\tthis.realValues[i] = Arrays.copyOf(inst.realValues[i],inst.realValues[i].length);\r\n\t\t}\r\n\r\n\t\tthis.missingValues = new boolean[inst.missingValues.length][];\r\n\t\tfor(int i=0;i<missingValues.length;i++){\r\n\t\t\tthis.missingValues[i] = Arrays.copyOf(inst.missingValues[i],inst.missingValues[i].length);\r\n\t\t}\r\n\t}", "Instance createInstance(Instances instances, Metamorph m)\n {\n double[] attrValues = new double[instances.numAttributes()];\n int a = 0;\n for (int i = 0; i < m.morphognostic.NUM_NEIGHBORHOODS; i++)\n {\n int n = m.morphognostic.neighborhoods.get(i).sectors.length;\n for (int x = 0; x < n; x++)\n {\n for (int y = 0; y < n; y++)\n {\n Morphognostic.Neighborhood.Sector s = m.morphognostic.neighborhoods.get(i).sectors[x][y];\n for (int d = 0; d < m.morphognostic.eventDimensions; d++)\n {\n for (int j = 0; j < s.typeDensities[d].length; j++)\n {\n attrValues[a] = s.typeDensities[d][j];\n a++;\n }\n }\n }\n }\n }\n attrValues[a] = instances.attribute(a).indexOfValue(m.response + \"\");\n a++;\n return(new Instance(1.0, attrValues));\n }", "public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "public Model createModel(ModelNode modelNode) {\n \tif (modelNode == null)\n \t\tthrow new NullPointerException();\n return new ModelImpl(modelNode);\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 }", "PriceSummaryModel createInstanceOfPriceSummaryModel();", "public ComputeInstanceVersion() {\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }", "RoomModel createRoomModel(RoomModel roomModel);", "GoalModel createGoalModel();", "@Override\n\tpublic IAlgoInstance createInstance(String id,\n\t\t\tIGenlabWorkflowInstance workflow) {\n\t\treturn null;\n\t}", "VM createVM();", "public CreateInstancesResponse CreateInstances(CreateInstancesRequest req) throws TencentCloudSDKException{\n JsonResponseModel<CreateInstancesResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<CreateInstancesResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"CreateInstances\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public static ModelLearnable newInstancebyClassName(Class modelClassName) {\r\n try {\r\n return (ModelLearnable) modelClassName.newInstance();\r\n } catch (InstantiationException e) {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public SSModel createSSObject() {\n\t\tSSModel ssModel = new SSModel();\n\t\tssModel.create(mol);\n\t\t\n\t\treturn ssModel;\n\t}", "public TaskBoardModel() {\n\n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "DataGenModel()\n {\n }", "@SuppressWarnings({\"rawtypes\", \"unchecked\"})\n public <T> T createModel(T referenceModel, boolean withPolicies) throws CreateModelException {\n Erector erector = erectors.get(referenceModel.getClass());\n\n if (erector == null) {\n throw new CreateModelException(\"Unregistered class: \" + referenceModel.getClass());\n }\n\n return createModel(erector, referenceModel, withPolicies);\n }", "public T newInstance();", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "public ViewObject(ActivityInstance instance)\n {\n // Populate fields\n this.templateId = instance.getTemplate().getId();\n this.name = instance.getName();\n this.description = instance.getDescription();\n this.paramValues = instance.getParameterValues();\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "static RatAppModel getInstance() {return model;}", "Vehicle createVehicle();", "Vehicle createVehicle();", "public InvoiceModel() {\n \n }", "protected abstract IModel<T> createModel(T object);", "private Instantiation(){}", "protected CreateMachineNodeModel() {\r\n super(0,1);\r\n }", "HdbdtiModel createHdbdtiModel();", "@Override\n\tpublic HomeModel create(HomeModel model) {\n\t\treturn null;\n\t}", "Entity createEntity();", "public Device createObject(String brand, String model, Integer price, String photo, String date);", "SystemParamModel createSystemParamModel();", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public ModelResource() {\n }", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }", "public static Resource createDummyInstance(Model model, OntClass clazz)\n\t{\n\t\tDummyInstanceCreator creator = new DummyInstanceCreator(model);\n\t\tnew VisitingDecomposer(creator, creator).decompose(clazz);\n\t\treturn creator.getInstance();\n\t}", "protected CameraInstance createCameraInstance() {\n CameraInstance cameraInstance = new CameraInstance(getContext());\n cameraInstance.setCameraSettings(cameraSettings);\n return cameraInstance;\n }", "private void createNewDynamicModel(){\n\t\tDynamicModel dModel = new DynamicModel(currentView.getViewModel().getName());\r\n\r\n\t\t// Add the new graph to the view\r\n\t\tint modelWidth = DynamicModelView.minimumWidth; \r\n\t\tint modelHeight = DynamicModelView.minimumHeight; \r\n\t\tint viewHeight = currentView.getHeight();\r\n\t\tint pad = 8;\r\n\t\tcurrentView.addModelView(new DynamicModelView(new EntityViewConfig(pad, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t viewHeight - (modelHeight + pad), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelWidth, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t modelHeight, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t EntityViewConfig.Type.DYNAMIC_MODEL), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdModel, this, currentView));\r\n\t\tcurrentView.repaint();\r\n\t}", "public void create() {\n\t\t\n\t}", "public static Model createEntity(EntityManager em) {\n\t\tModel model = new Model().name(DEFAULT_NAME).type(DEFAULT_TYPE).algorithm(DEFAULT_ALGORITHM)\n\t\t\t\t.status(DEFAULT_STATUS).owner(DEFAULT_OWNER).performanceMetrics(DEFAULT_PERFORMANCE_METRICS)\n\t\t\t\t.modelLocation(DEFAULT_MODEL_LOCATION).featureSignificance(DEFAULT_FEATURE_SIGNIFICANCE)\n\t\t\t\t.builderConfig(DEFAULT_BUILDER_CONFIG).createdDate(DEFAULT_CREATED_DATE)\n\t\t\t\t.deployedDate(DEFAULT_DEPLOYED_DATE).trainingDataset(DEFAULT_TRAINING_DATASET)\n .library(DEFAULT_LIBRARY).project(DEFAULT_PROJECT).version(DEFAULT_VERSION);\n\t\treturn model;\n\t}", "Build_Model() {\n\n }", "public void test_ctor() {\n assertNotNull(\"instance should be created.\", instance);\n }" ]
[ "0.69354236", "0.6852859", "0.6842841", "0.6806089", "0.6806089", "0.6806089", "0.6806089", "0.6806089", "0.6806089", "0.6806089", "0.6684592", "0.6591086", "0.6477545", "0.6389888", "0.6218472", "0.6190598", "0.6103778", "0.60689646", "0.60352916", "0.5974136", "0.5972932", "0.59309125", "0.59304225", "0.5912133", "0.5912133", "0.5908181", "0.59064966", "0.5896439", "0.5895548", "0.5895548", "0.5895548", "0.58925056", "0.587943", "0.58440125", "0.57848734", "0.5784064", "0.57643354", "0.5744075", "0.57382977", "0.57135874", "0.5712905", "0.5703291", "0.57003707", "0.56290144", "0.56190616", "0.5616555", "0.5614629", "0.5608514", "0.5600024", "0.559805", "0.5586376", "0.5565796", "0.5564597", "0.5559537", "0.5522595", "0.55055887", "0.54942846", "0.5489638", "0.5487476", "0.5472719", "0.5455733", "0.5449011", "0.544745", "0.5445901", "0.5427348", "0.54244477", "0.5422899", "0.5419036", "0.54171413", "0.5403778", "0.5402666", "0.5387717", "0.5355418", "0.53552216", "0.5348058", "0.53456765", "0.5321616", "0.53163546", "0.53163546", "0.53145975", "0.53055793", "0.5297711", "0.5295684", "0.52943015", "0.5282848", "0.5269891", "0.52650625", "0.5259184", "0.5256543", "0.52560425", "0.5255221", "0.52469665", "0.52452904", "0.52448493", "0.52384233", "0.5235412", "0.52317446", "0.5225906", "0.5224877", "0.5215174" ]
0.8278118
0
Create an instance of the CsticModel
CsticModel createInstanceOfCsticModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CsticGroupModel createInstanceOfCsticGroupModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public Model() {\n\t}", "public Model() {\n\t}", "EisModel createEisModel();", "ZenModel createZenModel();", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public Model() {\n\n }", "public Carmodel() {\n this(\"CarModel\", null);\n }", "Build_Model() {\n\n }", "InstanceModel createInstanceOfInstanceModel();", "private Model(){}", "public SSModel createSSObject() {\n\t\tSSModel ssModel = new SSModel();\n\t\tssModel.create(mol);\n\t\t\n\t\treturn ssModel;\n\t}", "public VancarrierModel() {\r\n\t\tthis(null, \"VCModel\", true, true);\r\n\t}", "PriceModel createInstanceOfPriceModel();", "public DieteticBrotherModel() {\n database = new Database();\n availableFood = database.initializeAvailableFood();\n recipes = database.initializeRecipes(availableFood);\n\n recipe = new Recipe(0, \"My Recipe\");\n }", "public InvoiceModel() {\n \n }", "DataGenModel()\n {\n }", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public CareerModel() {\n this(\"Career\",\n Riasec.Artistic,\n \"field\",\n \"category\",\n \"description from .csv\",\n CareerModelLoader.DEFAULT_IMAGE_PATH);\n }", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "void create(Model model) throws Exception;", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "public FareModel() {\n }", "protected PricingModel() {\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "ConfigModel createInstanceOfConfigModel();", "private CardExchangeModel() {\n\t}", "PriceSummaryModel createInstanceOfPriceSummaryModel();", "DataModel createDataModel();", "DomainModel createDomainModel();", "public void createModel() {\n\t\tmyShop = ShopFactory.eINSTANCE.createShop();\n\n\t\tfinal Country dk = ShopFactory.eINSTANCE.createCountry();\n\t\tdk.setName(\"Denmark\");\n\t\tdk.setAbbreviation(\"DK\");\n\t\tmyShop.getCountries().add(dk);\n\n\t\tfinal Country se = ShopFactory.eINSTANCE.createCountry();\n\t\tse.setName(\"Sweden\");\n\t\tse.setAbbreviation(\"SE\");\n\t\tmyShop.getCountries().add(se);\n\n\t\tfinal Contact a = ShopFactory.eINSTANCE.createContact();\n\t\ta.setName(\"a\");\n\t\ta.setCity(\"A\");\n\t\ta.setCountry(dk);\n\t\tmyShop.getContacts().add(a);\n\n\t\tfinal Contact b = ShopFactory.eINSTANCE.createContact();\n\t\tb.setName(\"b\");\n\t\tb.setCity(\"A\");\n\t\tb.setCountry(se);\n\t\tmyShop.getContacts().add(b);\n\t}", "@Generated\n public NewsModel() {\n }", "public TargetGeneratorModel()\n {\n }", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "HdbdtiModel createHdbdtiModel();", "public M create(P model);", "public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }", "private void generateModel() {\n // Initialize a new model object\n mCm = new CategoryModel[nodes.length];\n\n for (int i = 0; i < nodes.length; i++) {\n mCm[i] = new CategoryModel(nodes[i].id, nodes[i].title);\n }\n }", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public static BacSi createEntity() {\n BacSi bacSi = new BacSi()\n .mabacsi(DEFAULT_MABACSI)\n .hoten(DEFAULT_HOTEN)\n .gioitinh(DEFAULT_GIOITINH)\n .ngaysinh(DEFAULT_NGAYSINH)\n .noilamviec(DEFAULT_NOILAMVIEC)\n .chuyenkhoa(DEFAULT_CHUYENKHOA)\n .giayphephanhnghe(DEFAULT_GIAYPHEPHANHNGHE);\n return bacSi;\n }", "public ModelBolting(){}", "GoalModel createGoalModel();", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public Model createModel(ModelNode modelNode) {\n \tif (modelNode == null)\n \t\tthrow new NullPointerException();\n return new ModelImpl(modelNode);\n }", "public VersionModel() {\n }", "public Car createCar(String name, String modelName, String type) {\r\n return new Car(name, modelName, type);\r\n }", "private ColumnDefinitionModel createModel()\r\n {\r\n ColumnDefinitionModel model = new ColumnDefinitionModel();\r\n\r\n List<String> columnNames = Arrays.asList(ColumnHeaders.TIME.toString(), ColumnHeaders.LAT.toString(),\r\n ColumnHeaders.LON.toString(), ColumnHeaders.NAME.toString(), ColumnHeaders.NAME2.toString());\r\n\r\n CSVParseParameters parameters = new CSVParseParameters();\r\n parameters.setColumnNames(columnNames);\r\n\r\n parameters.setColumnsToIgnore(New.<Integer>list(4));\r\n\r\n SpecialColumn timeColumn = new SpecialColumn();\r\n timeColumn.setColumnIndex(0);\r\n timeColumn.setColumnType(ColumnType.TIMESTAMP);\r\n timeColumn.setFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\r\n\r\n SpecialColumn latColumn = new SpecialColumn();\r\n latColumn.setColumnIndex(1);\r\n latColumn.setColumnType(ColumnType.LAT);\r\n latColumn.setFormat(\"Decimal\");\r\n\r\n SpecialColumn lonColumn = new SpecialColumn();\r\n lonColumn.setColumnIndex(2);\r\n lonColumn.setColumnType(ColumnType.LON);\r\n lonColumn.setFormat(\"Decimal\");\r\n\r\n parameters.getSpecialColumns().add(timeColumn);\r\n parameters.getSpecialColumns().add(latColumn);\r\n parameters.getSpecialColumns().add(lonColumn);\r\n\r\n model.setSelectedParameters(parameters);\r\n\r\n return model;\r\n }", "public <T> T createModel(Class<T> clazz) throws CreateModelException {\n return createModel(clazz, true);\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "public personnelMedicalModel(){\n\n }", "public HeatingModuleModel(){\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public UserModel()\r\n\t{\r\n\t}", "public static Model newOf(Model model) {\n\t\tModel newModel = Model.newOf();\n\t\tnewModel.setTitle(model.getTitle());\n\t\tnewModel.setTableCode(model.getTableCode());\n\t\tnewModel.setDescription(model.getDescription());\n\t\treturn newModel;\n\t}", "public Contract create(){\n\t\treturn new Contract();\n\t}", "public UserModel() {\n }", "public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }", "MetricModel createMetricModel();", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "public TaskBoardModel() {\n\n }", "public WeightingModel(){}", "public FoodModel()\n\t{\n\t\tgenerateRandomPosition();\n\t}", "public ChatModel() {\n\t}", "public DataModel()\r\n {\r\n System.out.println(\"New DataModel created\");\r\n \r\n languageList = new LanguageList();\r\n }", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "public ModelResource() {\n }", "public ModelSourceFile() {\n\t\t\n\t}", "public WorldModel(){\t\n\t}", "public void buildModel() {\n }", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "public org.oep.usermgt.model.Citizen create(long citizenId);", "public Controller(Model model) {\n this.model = model; // Initializing the Model\n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }", "private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }", "public ClassModelDao() {\n super(ClassModel.CLASS_MODEL, com.platform.chorus.db.tables.pojos.ClassModel.class);\n }", "public Curso model2entity (CursoModel cursoModel) {\r\n\t\tCurso curso = new Curso();\r\n\t\tcurso.setNombre(cursoModel.getNombre());\r\n\t\tcurso.setDescripcion(cursoModel.getDescripcion());\r\n\t\tcurso.setHoras(cursoModel.getHoras());\r\n\t\tcurso.setPrecio(cursoModel.getPrecio());\r\n\t\treturn curso;\r\n\t\t\r\n\t}", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "public TableDefinition(Class<T> model){\n this.singleton = this;\n this.model = model;\n try {\n OBJECT = Class.forName(model.getName());\n createTableDefinition();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public ComputerDataModel() {\n\n }", "private TechniqueStatesModels() {\n // Private constructor to prevent instantiation\n }", "public PersistenciaCMT() {\n\n }", "public PacienteModel(CidadeModel cidadeModel, BairroModel bairroModel) {\r\n this.cidadeModel = cidadeModel;\r\n this.bairroModel = bairroModel;\r\n }", "GameModel createGameModel(GameModel gameModel);", "public CCuenta()\n {\n }", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public CyanSus() {\n\n }", "public void create(){}", "public CMN() {\n\t}" ]
[ "0.7512577", "0.704001", "0.704001", "0.704001", "0.704001", "0.704001", "0.704001", "0.704001", "0.6822378", "0.6822378", "0.6732564", "0.6713492", "0.6699078", "0.6699078", "0.6699078", "0.66849524", "0.6593318", "0.6506617", "0.65018773", "0.64474887", "0.64299893", "0.6407046", "0.63672394", "0.63569367", "0.63476735", "0.633165", "0.63275576", "0.63195443", "0.62982136", "0.62925136", "0.6287091", "0.62386733", "0.61838776", "0.6171288", "0.6131891", "0.6109336", "0.61024946", "0.6073675", "0.6059734", "0.6033738", "0.6030605", "0.60159826", "0.5996398", "0.59931695", "0.5989108", "0.5973553", "0.5969279", "0.5964839", "0.59355855", "0.59339577", "0.5913952", "0.58950037", "0.5884656", "0.58839816", "0.5877089", "0.5849435", "0.58173954", "0.580692", "0.5797741", "0.57919705", "0.578372", "0.5759891", "0.5741549", "0.5727358", "0.57218647", "0.57072395", "0.5705008", "0.56820416", "0.56759167", "0.56752294", "0.567478", "0.5670434", "0.56535554", "0.5651973", "0.5651525", "0.56497407", "0.564385", "0.56358767", "0.5626848", "0.56257695", "0.5624323", "0.56208867", "0.5601814", "0.55924135", "0.5576107", "0.5572251", "0.5565111", "0.555596", "0.5547001", "0.5543246", "0.5539849", "0.5534575", "0.55299276", "0.5519654", "0.5519555", "0.5518787", "0.55147254", "0.55115914", "0.5492281", "0.5491653" ]
0.8513221
0
Create an instance of the CsticValueModel
CsticValueModel createInstanceOfCsticValueModel(int valueType);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CsticModel createInstanceOfCsticModel();", "public Value() {\n }", "public Value(){}", "CsticGroupModel createInstanceOfCsticGroupModel();", "public Value() {}", "public void createValue() {\r\n value = new com.timeinc.tcs.epay2.EPay2DTO();\r\n }", "PriceModel createInstanceOfPriceModel();", "private void initValueModels()\n {\n myCriterionValue.setName(\"Value\");\n myCriterionMaxValue.setNameAndDescription(\"Maximum value\", \"The maximum value\");\n\n addModel(myCriterionValue);\n addModel(myCriterionMaxValue);\n\n Conditional cond = myOperator.get();\n myCriterionValue.setVisible(cond != Conditional.EMPTY && cond != Conditional.NOT_EMPTY);\n myCriterionMaxValue.setVisible(cond == Conditional.BETWEEN);\n }", "PriceSummaryModel createInstanceOfPriceSummaryModel();", "public FactoryValue( ) \r\n {\r\n }", "public VancarrierModel() {\r\n\t\tthis(null, \"VCModel\", true, true);\r\n\t}", "Values createValues();", "public CarValue(double value) {\n this.value = value;\n }", "Model(String _name, int _value, int _id) {\n this.name = _name;\n this.value = _value;\n this.id = _id;\n }", "InstanceModel createInstanceOfInstanceModel();", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "MetricModel createMetricModel();", "public BabbleValue() {}", "private Valuable makeValuable(double value) {\n if (currency.equals(\"Baht\")) {\n if (value == 1 || value == 2 || value == 5 || value == 10)\n return new Coin(value, currency);\n else if (value == 20 || value == 50 || value == 100 || value == 500 || value == 1000) {\n return new BankNote(value, currency);\n }\n } else if (currency.equals(\"Ringgit\")) {\n if (value == 0.05 || value == 0.1 || value == 0.2 || value == 0.5)\n return new Coin(value, currency);\n else if (value == 1 || value == 2 || value == 5 || value == 10 || value == 20 || value == 50 || value == 100)\n return new BankNote(value, currency);\n }\n throw new IllegalArgumentException(\"Cannot create \" + value + \" \" + currency);\n }", "private Value() {\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Build_Model() {\n\n }", "VariantConditionModel createInstanceOfVariantConditionModel();", "public Carmodel() {\n this(\"CarModel\", null);\n }", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "EisModel createEisModel();", "protected PricingModel() {\n }", "private Values(){}", "public Model() {\n\t}", "public Model() {\n\t}", "public VersionModel() {\n }", "public BwValue mkValue() {\n\t\treturn new BwValue(this.sT);\n\t}", "public MVCModelo(int capacidad)\n\t{\n\t\tllave = \"\";\n\t\tvalue = 0.0;\n\t}", "public static BacSi createEntity() {\n BacSi bacSi = new BacSi()\n .mabacsi(DEFAULT_MABACSI)\n .hoten(DEFAULT_HOTEN)\n .gioitinh(DEFAULT_GIOITINH)\n .ngaysinh(DEFAULT_NGAYSINH)\n .noilamviec(DEFAULT_NOILAMVIEC)\n .chuyenkhoa(DEFAULT_CHUYENKHOA)\n .giayphephanhnghe(DEFAULT_GIAYPHEPHANHNGHE);\n return bacSi;\n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "ConfigModel createInstanceOfConfigModel();", "public InvoiceModel() {\n \n }", "public Model() {\n\n }", "public Value(DataType t, Class c) {\n type = t;\n itemClass = c;\n }", "ZenModel createZenModel();", "@Test\n public void test_constructor_1(){\n \tSystem.out.println(\"Testing MeasuredRatioModel's MeasuredRatioModel(String Name,BigDecimal value,String uncertaintyType,BigDecimal oneSigma,boolean FracCorr,boolean OxideCorr)\"); \n //Tests if default values are correct\n MeasuredRatioModel instance=new MeasuredRatioModel(\"r207_339\",new BigDecimal(\"-12.34567890\"),\"PCT\",new BigDecimal(\".9876543210\"),false,true); \n String expResult=\"r207_339\";\n String result=instance.getName();\n assertEquals(expResult,result);\n expResult=\"PCT\";\n result=instance.getUncertaintyType();\n assertEquals(expResult,result);\n BigDecimal expectedResult=new BigDecimal(\"-12.34567890\");\n BigDecimal actualResult=instance.getValue();\n assertEquals(expectedResult,actualResult);\n actualResult=instance.getOneSigma();\n expectedResult=new BigDecimal(\".9876543210\");\n assertEquals(expectedResult,actualResult);\n assertEquals(false,instance.isFracCorr()); \n assertEquals(true,instance.isOxideCorr()); \n }", "public void createValue() {\n value = new GisInfoCaptureDO();\n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "FromValues createFromValues();", "public ValorVariavel() {\r\n }", "public Valvula(){}", "DataGenModel()\n {\n }", "abstract Valuable createMoney(double value);", "protected IndigoValenceCheckerNodeModel()\r\n {\r\n super(1, 3);\r\n }", "public FareModel() {\n }", "private CardExchangeModel() {\n\t}", "public SSModel createSSObject() {\n\t\tSSModel ssModel = new SSModel();\n\t\tssModel.create(mol);\n\t\t\n\t\treturn ssModel;\n\t}", "private Model(){}", "public static RatingModel create(int value, BeerModel beerModel, UserModel userModel) {\n \t\treturn new RatingModel(value, beerModel, userModel);\n \t}", "public TrueValue (){\n }", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public final Statistic newInstance() {\n Statistic s = new Statistic();\n s.myNumMissing = myNumMissing;\n s.firstx = firstx;\n s.max = max;\n s.min = min;\n s.myConfidenceLevel = myConfidenceLevel;\n s.myJsum = myJsum;\n s.myValue = myValue;\n s.setName(getName());\n s.num = num;\n s.sumxx = sumxx;\n s.moments = Arrays.copyOf(moments, moments.length);\n if (getSaveOption()) {\n s.save(getSavedData());\n s.setSaveOption(true);\n }\n return (s);\n }", "ManageValueSetSearchModel createClone(String id);", "public HeatingModuleModel(){\n\t}", "public Currency(String country,double value, double valueUSD){\n this.country = country;\n this.value = value;\n this.valueUSD = valueUSD;\n}", "public FinancialAssessmentEntityValuesView() {\n this(DSL.name(\"financial_assessment_entity_values_view\"), null);\n }", "NumberValue createNumberValue();", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing MeasuredRatioModel's MeasuredRatioModel()\");\n //Tests if default values are correct\n MeasuredRatioModel instance=new MeasuredRatioModel();\n String expResult=\"NONE\";\n String result=instance.getName();\n assertEquals(expResult,result);\n result=instance.getUncertaintyType();\n assertEquals(expResult,result);\n BigDecimal expectedResult=new BigDecimal(\"0\");\n BigDecimal actualResult=instance.getValue();\n assertEquals(expectedResult,actualResult);\n actualResult=instance.getOneSigma();\n assertEquals(expectedResult,actualResult);\n assertEquals(false,instance.isFracCorr());\n assertEquals(false,instance.isOxideCorr());\n }", "@Override\r\n\tpublic int create(Object value) throws Exception {\r\n\t\t\t\t\t\r\n\t\t//Default error\r\n\t\tint result = Errors.NO_ERROR;\r\n\t\t\t\t\t\t\r\n\t\t//Verify class\t\t\r\n\t\tif (value.getClass()!=CentroVO.class) \r\n\t\t\tthrow (new Exception(\"Not valid class\")); \r\n\t\t\t\t\t\r\n\t\tCentroVO center = (CentroVO)value;\r\n\t\t\t\t\r\n\t\t// Verify used licenses\r\n\t\tLOG.info(\"Verifying licenses\");\r\n\t\t\r\n\t\t//Verificamos que existan suficientes licencias disponibles para \r\n\t\t//la solicitud realizada\t\t\r\n\t\tif (licenseService.getEnabledLicensesCenter(Constants.NOT_CREATED)<center.getLicencias()) {\r\n\t\t\tresult = Errors.MAX_LICENSES;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (result >=0){\r\n\t\t\tLOG.debug(\"Calling create center\");\r\n\t \r\n\t //Calling service\r\n\t result = service.insertCentro(center);\r\n\t\t}\r\n\t\t\t\t \t\t\t\t\t\t\t\t\r\n\t\treturn result;\t\t\t\t\t\t\t\t\r\n\t}", "public CareerModel() {\n this(\"Career\",\n Riasec.Artistic,\n \"field\",\n \"category\",\n \"description from .csv\",\n CareerModelLoader.DEFAULT_IMAGE_PATH);\n }", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "public WeightingModel(){}", "ObjectValue createObjectValue();", "private ColumnDefinitionModel createModel()\r\n {\r\n ColumnDefinitionModel model = new ColumnDefinitionModel();\r\n\r\n List<String> columnNames = Arrays.asList(ColumnHeaders.TIME.toString(), ColumnHeaders.LAT.toString(),\r\n ColumnHeaders.LON.toString(), ColumnHeaders.NAME.toString(), ColumnHeaders.NAME2.toString());\r\n\r\n CSVParseParameters parameters = new CSVParseParameters();\r\n parameters.setColumnNames(columnNames);\r\n\r\n parameters.setColumnsToIgnore(New.<Integer>list(4));\r\n\r\n SpecialColumn timeColumn = new SpecialColumn();\r\n timeColumn.setColumnIndex(0);\r\n timeColumn.setColumnType(ColumnType.TIMESTAMP);\r\n timeColumn.setFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\r\n\r\n SpecialColumn latColumn = new SpecialColumn();\r\n latColumn.setColumnIndex(1);\r\n latColumn.setColumnType(ColumnType.LAT);\r\n latColumn.setFormat(\"Decimal\");\r\n\r\n SpecialColumn lonColumn = new SpecialColumn();\r\n lonColumn.setColumnIndex(2);\r\n lonColumn.setColumnType(ColumnType.LON);\r\n lonColumn.setFormat(\"Decimal\");\r\n\r\n parameters.getSpecialColumns().add(timeColumn);\r\n parameters.getSpecialColumns().add(latColumn);\r\n parameters.getSpecialColumns().add(lonColumn);\r\n\r\n model.setSelectedParameters(parameters);\r\n\r\n return model;\r\n }", "DataModel createDataModel();", "HdbdtiModel createHdbdtiModel();", "public PricingModel(Game game) {\n this.game = game;\n this.currentPrice = SavingCard.INITIAL_COST;\n this.invokedCount = 0;\n \n\t}", "public void buildModel() {\n }", "public void createValue() {\r\n value = new qa.gov.mol.ProcessAcknowledgment();\r\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "public TargetGeneratorModel()\n {\n }", "DomainModel createDomainModel();", "@Generated\n public NewsModel() {\n }", "public ByValue() {}", "public TournamentAdaptativeModel()\n {\n this(0.10, 0.15, 0.20);\n }", "public PacienteModel() {\r\n this.codigo = new SimpleIntegerProperty();\r\n this.nome = new SimpleStringProperty();\r\n this.nascimento = new SimpleStringProperty();\r\n this.endereco = new SimpleStringProperty();\r\n this.telefone = new SimpleStringProperty();\r\n this.cep = new SimpleStringProperty();\r\n this.documento = new SimpleStringProperty();\r\n this.sexo = new SimpleStringProperty();\r\n this.data_cliente = new SimpleStringProperty();\r\n this.tipo = new SimpleStringProperty();\r\n this.email = new SimpleStringProperty();\r\n this.obs = new SimpleStringProperty();\r\n this.status = new SimpleBooleanProperty();\r\n }", "SystemParamModel createSystemParamModel();", "public void setCValue(V value);", "void create(Model model) throws Exception;", "private void generateModel() {\n // Initialize a new model object\n mCm = new CategoryModel[nodes.length];\n\n for (int i = 0; i < nodes.length; i++) {\n mCm[i] = new CategoryModel(nodes[i].id, nodes[i].title);\n }\n }", "public UserModel()\r\n\t{\r\n\t}", "public static ValueResolvingBuilder valueResolving() {\n return new ValueResolvingBuilder();\n }", "public DieteticBrotherModel() {\n database = new Database();\n availableFood = database.initializeAvailableFood();\n recipes = database.initializeRecipes(availableFood);\n\n recipe = new Recipe(0, \"My Recipe\");\n }", "public Logic(Model m){\r\n model = m;\r\n }", "public CategoryBuilder()\n {\n fUpperInclusive = true;\n fValue = \"\";\n }" ]
[ "0.69850993", "0.6376699", "0.6373766", "0.6318889", "0.6210637", "0.6173505", "0.6126496", "0.60858524", "0.60684294", "0.5950768", "0.5855114", "0.5841221", "0.5806323", "0.57644963", "0.5750209", "0.57481927", "0.57380587", "0.5735687", "0.57351375", "0.57179743", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.5671103", "0.5665941", "0.5614449", "0.5612496", "0.55919385", "0.55907756", "0.55855066", "0.556514", "0.556514", "0.5561821", "0.5539221", "0.55024415", "0.54932827", "0.54583895", "0.54420114", "0.54420114", "0.54420114", "0.54362315", "0.5416119", "0.5400422", "0.53878736", "0.53873503", "0.538036", "0.5371302", "0.5365657", "0.53649086", "0.53565264", "0.5324127", "0.5282743", "0.52818274", "0.52607137", "0.5252298", "0.5229275", "0.5229055", "0.5213192", "0.51956403", "0.5190302", "0.5183948", "0.5180024", "0.5178422", "0.5168136", "0.516305", "0.51618624", "0.51604515", "0.51577723", "0.5149015", "0.51295996", "0.51286435", "0.5114069", "0.50820595", "0.50803596", "0.5065401", "0.5061416", "0.50565743", "0.50448376", "0.503279", "0.50270545", "0.50259006", "0.50246274", "0.50245386", "0.5024194", "0.50233495", "0.5018434", "0.50137883", "0.50106865", "0.5007856", "0.5007765", "0.49989623", "0.49976674", "0.49959722", "0.49913475", "0.4980286", "0.49780077" ]
0.78739107
0
Create an instance of the CsticGroupModel
CsticGroupModel createInstanceOfCsticGroupModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.ext.portlet.model.ModelInputGroup create(long modelInputGroupPK);", "public Group() {\n\n }", "public Group() {\r\n\t}", "public Group(){\n\n }", "public CreateGroup() {\n initComponents();\n start();\n }", "public static Group initGroupObject(){\n Group test_group = new Group(\"testGroup\");\n return test_group;\n }", "public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }", "CsticModel createInstanceOfCsticModel();", "GroupType createGroupType();", "GroupType createGroupType();", "public ServiceGroup create(String shortName, String title, int cid) throws Exception;", "UserGroup createGroup(String companyId, String name);", "public boolean createGroup(GroupsGen group) {\n \n super.create(group);\n return true;\n }", "public GroupCreateBean() {\n\t\tsuper();\n\t\tthis.initializeNumbers();\t\t\n\t}", "public AddNewContactGroupAction() {\r\n\t\tsuper();\r\n\t}", "public TGroupGoods() {\n }", "UserGroup createGroup(String companyId, String name, String groupLead);", "ID create(NewRoamingGroup group);", "GroupsType createGroupsType();", "public static ModelInputGroupDisplayItem create(Simulation s, String name, String description, \n ModelInputGroupType type, Long parentGroupPK) throws SystemException, IOException {\n Long pk = CounterLocalServiceUtil.increment(ModelInputGroup.class.getName());\n ModelInputGroup group = ModelInputGroupLocalServiceUtil.createModelInputGroup(pk);\n group.setName(name);\n group.setDescription(description);\n group.setModelId(s.getId());\n group.setGroupType(type.name());\n \n if (parentGroupPK != null && parentGroupPK > 0) {\n group.setParentGroupPK(parentGroupPK);\n }\n \n ModelInputGroupLocalServiceUtil.addModelInputGroup(group);\n\n return new ModelInputGroupDisplayItem(group);\n\n }", "public void addGroup(Group group) {\r\n System.out.println(\"conectado con model ---> metodo addGroup\");\r\n //TODO\r\n }", "public static KindGroupVo getInstance(KindGroup entity,boolean cascadable) throws Exception{\n\t KindGroupVo vo = new KindGroupVo();\n\t\n\t if(null == entity)\n\t\t throw new Exception(\"Unable to create KindGroupVo from null KindGroup entity.\");\n\t\n\t vo.setId(entity.getId());\n\n\t /*\n\t * Only populate fields outside of the entity Id if needed\n\t */\n\t if(cascadable){\n\t\t vo.setCode(entity.getCode());\n\t\t vo.setDescription(entity.getDescription());\n\t\t vo.setStandard(entity.isStandard());\n\t }\n\t \n\t return vo;\n }", "@POST\n @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n public BlockConsistencyGroupRestRep createConsistencyGroup(\n final BlockConsistencyGroupCreate param) {\n checkForDuplicateName(param.getName(), BlockConsistencyGroup.class);\n\n // Validate name\n ArgValidator.checkFieldNotEmpty(param.getName(), \"name\");\n\n // Validate name not greater than 64 characters\n ArgValidator.checkFieldLengthMaximum(param.getName(), CG_MAX_LIMIT, \"name\");\n\n // Validate project\n ArgValidator.checkFieldUriType(param.getProject(), Project.class, \"project\");\n final Project project = _dbClient.queryObject(Project.class, param.getProject());\n ArgValidator\n .checkEntity(project, param.getProject(), isIdEmbeddedInURL(param.getProject()));\n // Verify the user is authorized.\n verifyUserIsAuthorizedForRequest(project);\n\n // Create Consistency Group in db\n final BlockConsistencyGroup consistencyGroup = new BlockConsistencyGroup();\n consistencyGroup.setId(URIUtil.createId(BlockConsistencyGroup.class));\n consistencyGroup.setLabel(param.getName());\n consistencyGroup.setProject(new NamedURI(project.getId(), project.getLabel()));\n consistencyGroup.setTenant(project.getTenantOrg());\n // disable array consistency if user has selected not to create backend replication group\n consistencyGroup.setArrayConsistency(param.getArrayConsistency());\n\n _dbClient.createObject(consistencyGroup);\n\n return map(consistencyGroup, null, _dbClient);\n\n }", "public static ModelInputGroupDisplayItem create(Simulation s, MetaData md, ModelInputGroupType type, Long parentGroupPK) throws SystemException, IOException {\n Long pk = CounterLocalServiceUtil.increment(ModelInputGroup.class.getName());\n ModelInputGroup group = ModelInputGroupLocalServiceUtil.createModelInputGroup(pk);\n group.setModelId(s.getId());\n group.setNameAndDescriptionMetaDataId(md.getId());\n group.setGroupType(type.name());\n if (parentGroupPK != null && parentGroupPK > 0) {\n group.setParentGroupPK(parentGroupPK);\n }\n ModelInputGroupLocalServiceUtil.updateModelInputGroup(group);\n \n return new ModelInputGroupDisplayItem(group);\n }", "PlayerGroup createPlayerGroup();", "public void newGroup() {\n addGroup(null, true);\n }", "public GroupAccessBean constructGroups() throws Exception {\n\n\tif (groups == null) {\t\n\t\t// Construct groups bean\n\t\tif (getGroupcode() != null) {\n\t\t\tgroups = new GroupAccessBean();\n\t\t\tgroups.setInitKey_division(getGroupcode().intValue());\n\t\t\tgroups.refreshCopyHelper();\n\t\t}\n\t}\n\treturn groups;\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult createGroup = mFacePlus.createGroup(groupname.getText().toString(), groupname.getText().toString(), null);\n\t\t\t\tif(createGroup.type == Result.TYPE.FAILED){\n\t\t\t\t\tDebug.debug(TAG, \"err msg = \" + createGroup.data);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tGroup group = (Group) createGroup.data;\n\t\t\t\tLog.e(TAG,\"groupid = \"+group.getId());\n\t\t\t\tLog.e(TAG,group.toString());\n\t\t\t}", "@Transactional\n public synchronized GroupEntity createGroup(String groupName, GroupType groupType) {\n // create an admin principal to represent this group\n PrincipalTypeEntity principalTypeEntity = principalTypeDAO.findById(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n if (principalTypeEntity == null) {\n principalTypeEntity = new PrincipalTypeEntity();\n principalTypeEntity.setId(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE);\n principalTypeEntity.setName(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE_NAME);\n principalTypeDAO.create(principalTypeEntity);\n }\n PrincipalEntity principalEntity = new PrincipalEntity();\n principalEntity.setPrincipalType(principalTypeEntity);\n principalDAO.create(principalEntity);\n\n final GroupEntity groupEntity = new GroupEntity();\n groupEntity.setGroupName(groupName);\n groupEntity.setPrincipal(principalEntity);\n groupEntity.setGroupType(groupType);\n\n groupDAO.create(groupEntity);\n return groupEntity;\n }", "public GroupResponse(){\n\t\t\n\t}", "@PostMapping(\"/class-groups\")\n @Timed\n public ResponseEntity<ClassGroupDTO> createClassGroup(@Valid @RequestBody ClassGroupDTO classGroupDTO) throws URISyntaxException {\n log.debug(\"REST request to save ClassGroup : {}\", classGroupDTO);\n if (classGroupDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new classGroup cannot already have an ID\")).body(null);\n }\n ClassGroupDTO result = classGroupService.save(classGroupDTO);\n return ResponseEntity.created(new URI(\"/api/class-groups/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public Group()\n\t{\n\t\tthis.members = new ArrayList<>();\n\t\tthis.groupID= idCounter;\n\t\tidCounter++;\n\t}", "public FacetRequestGroup createGroup(String groupName) {\n FacetRequestGroup group = new FacetRequestGroup(\n groupName, order, reverse, locale, maxTags, minCount, offset, prefix,\n hierarchical, levels, delimiter, startPath);\n groups.add(group);\n return group;\n }", "public static GroupCd createEntity(EntityManager em) {\n GroupCd groupCd = new GroupCd()\n .groupCd(DEFAULT_GROUP_CD);\n return groupCd;\n }", "public final void rule__AstConstructor__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7231:1: ( rule__AstConstructor__Group__0__Impl rule__AstConstructor__Group__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7232:2: rule__AstConstructor__Group__0__Impl rule__AstConstructor__Group__1\n {\n pushFollow(FOLLOW_rule__AstConstructor__Group__0__Impl_in_rule__AstConstructor__Group__014976);\n rule__AstConstructor__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstConstructor__Group__1_in_rule__AstConstructor__Group__014979);\n rule__AstConstructor__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:871:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // InternalCsv.g:872:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_4);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Model__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void createNewGroup() {\r\n if(selectedNode != null) { \r\n DefaultMutableTreeNode nextNode = (DefaultMutableTreeNode)selectedNode.getNextNode();\r\n if(selectedNode.isLeaf() && !selectedNode.getAllowsChildren()) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1254\"));\r\n return;\r\n } else if(selTreePath.getPathCount() == 10) {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1255\"));\r\n return;\r\n }else if (nextNode != null && nextNode.isLeaf()) {\r\n CoeusOptionPane.showInfoDialog(\"The group '\"+selectedNode.toString()+\"' has sponsors assigned to it. \\nCannot create subgroups for this group.\");\r\n return;\r\n }else {\r\n nextNode = new DefaultMutableTreeNode(\"New Group - \"+(selectedNode.getLevel()+1)+\".\"+selectedNode.getChildCount(),true);\r\n model.insertNodeInto(nextNode, selectedNode, selectedNode.getChildCount());\r\n TreePath newSelectionPath = selTreePath.pathByAddingChild(nextNode);\r\n sponsorHierarchyTree.clearSelection();\r\n sponsorHierarchyTree.addSelectionPath(newSelectionPath);\r\n sponsorHierarchyTree.startEditingAtPath(newSelectionPath);\r\n newGroup = true;\r\n saveRequired = true;\r\n }\r\n }\r\n }", "@Override\n\tpublic LinkGroup create(long linkgroupId) {\n\t\tLinkGroup linkGroup = new LinkGroupImpl();\n\n\t\tlinkGroup.setNew(true);\n\t\tlinkGroup.setPrimaryKey(linkgroupId);\n\n\t\tlinkGroup.setCompanyId(companyProvider.getCompanyId());\n\n\t\treturn linkGroup;\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public static com.glority.qualityserver.model.TestGroup convertToServerModel(\n com.glority.quality.model.TestGroup testGroup) {\n com.glority.qualityserver.model.TestGroup sTestGroup = new com.glority.qualityserver.model.TestGroup();\n\n if (testGroup != null) {\n if (testGroup.getId() != null) {\n sTestGroup.setId(Long.valueOf(testGroup.getId()).longValue());\n }\n }\n\n return sTestGroup;\n }", "public Group(String id) {\n super(id);\n setConstructor(SvgType.GROUP);\n }", "@Test\n public void createSubjectGroupTest() throws Exception\n {\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n SubjectGroup subjectGroup = new SubjectGroup();\n subjectGroup.setSubjectGroupName(\"network\");\n subjectGroup.setSubjectType(\"IP\");\n subjectGroup.setApplyToAll(Boolean.valueOf(true));\n subjectGroup.setApplyToEach(Boolean.valueOf(true));\n \n SubjectGroupEditObject sgEditObj = new SubjectGroupEditObject();\n List<Long> addList = sgEditObj.getAddSubjectList();\n addList.add(ip.getSubjectByName(\"workstation\").keySet().toArray(new Long[1])[0]);\n addList.add(ip.getSubjectByName(\"gateway\").keySet().toArray(new Long[1])[0]);\n \n SubjectGroupKey groupKey = ip.createSubjectGroup(subjectGroup, sgEditObj, userKey);\n \n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup savedSubjectGroup =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.SubjectGroup.class, \n groupKey.getSubjectGroupId());\n assertNotNull(savedSubjectGroup);\n } finally {\n EntityManagerContext.close();\n }\n }", "protected abstract Group createIface ();", "public void createGroup(String group_name){\r\n\t\t/* \r\n\t\t * Create a new entry in group database using the information\r\n\t\t * given by the parameters\r\n\t\t */\r\n\t\tSQLiteDatabase db = this.getWritableDatabase();\r\n \tContentValues values = new ContentValues();\r\n \t\r\n\t\tvalues.put(DBHelper.COLUMN_GROUPNAME, group_name);\r\n\t\t\r\n\t\tdb.insert(DBHelper.GROUP_TABLE_NAME, null, values);\r\n\t\tdb.close();\r\n\t}", "public final void rule__Model__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:883:1: ( ( () ) )\n // InternalCsv.g:884:1: ( () )\n {\n // InternalCsv.g:884:1: ( () )\n // InternalCsv.g:885:2: ()\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelAccess().getModelAction_0()); \n }\n // InternalCsv.g:886:2: ()\n // InternalCsv.g:886:3: \n {\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelAccess().getModelAction_0()); \n }\n\n }\n\n\n }\n\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "protected void createGroup(int id, int parentGroupID) {\n\t\tsendMessage(\"/g_new\", new Object[] { id, 0, parentGroupID });\n\n\t}", "public static GroupMembers createEntity() {\n GroupMembers groupMembers = new GroupMembers()\n .groupId(DEFAULT_GROUP_ID)\n .subscriptionId(DEFAULT_SUBSCRIPTION_ID)\n .msisdn(DEFAULT_MSISDN)\n .groupRole(DEFAULT_GROUP_ROLE)\n .endReasonCode(DEFAULT_END_REASON_CODE)\n .remarks(DEFAULT_REMARKS)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .createdDate(DEFAULT_CREATED_DATE)\n .createdBy(DEFAULT_CREATED_BY)\n .lastUpdatedDate(DEFAULT_LAST_UPDATED_DATE)\n .lastUpdatedBy(DEFAULT_LAST_UPDATED_BY)\n .tenantId(DEFAULT_TENANT_ID);\n return groupMembers;\n }", "protected void createGroup(int id) {\n\t\tcreateGroup(id, _motherGroupID);\n\t}", "public GLineGroup() {\n\t\t// empty\n\t}", "Group(String name) {\n this(name, new ArrayList<>());\n }", "public void createGroup() {\n\t\tString name = JOptionPane\n\t\t\t\t.showInputDialog(\"Please Enter a new group name:\");\n\t\tif (name.equals(\"\"))\n\t\t\treturn;\n\n\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent();\n\t\tEllowFile pfile = (EllowFile) node.getUserObject(), file;\n\t\tif (pfile.isDirectory()) {\n\t\t\tfile = new EllowFile(pfile.getAbsolutePath() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\t\t\t\t\tnode.getChildCount());\n\t\t} else {\n\t\t\tfile = new EllowFile(pfile.getParent() + \"\\\\\\\\\" + name);\n\t\t\tfile.mkdirs();\n\t\t\tnode = ((DefaultMutableTreeNode) node.getParent());\n\t\t\tmodel.insertNodeInto(new DefaultMutableTreeNode(file), node,\n\n\t\t\tnode.getChildCount());\n\t\t}\n\t\tfile.parentProject = pfile.parentProject;\n\t\tpfile.parentProject.rebuild();\n\t\tmodel.nodeChanged(root);\n\t}", "public static Group newDeck() {\n\t\tGroup g = new Group();\n\t\tfor (Suit s : Suit.values()) {\n\t\t\tfor (Rank r : Rank.values()) {\n\t\t\t\tCard c = new Card(r,s);\n\t\t\t\tg.add(c);\n\t\t\t}\n\t\t}\n\t\treturn g;\n\t}", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2538:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2539:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__04997);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__05000);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Group createGroup( Group group ) {\n String path = template.urlFor( UrlTemplate.GROUPS_PATH ).build();\n com.silanis.esl.api.model.Group apiGroup = new GroupConverter(group).toAPIGroupWithoutMembers();\n try {\n String stringResponse = client.post( path, Serialization.toJson( apiGroup ) );\n com.silanis.esl.api.model.Group apiResponse = Serialization.fromJson( stringResponse, com.silanis.esl.api.model.Group.class );\n Group resultGroup = new GroupConverter(apiResponse).toSDKGroup();\n for ( GroupMember groupMember : group.getMembers() ) {\n addMember(resultGroup.getId(), groupMember);\n }\n return resultGroup;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Unable to create Group.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Unable to create Group.\", e );\n }\n }", "@Override\r\n\tpublic void addProductGroup() {\r\n\t\tString newProductGroupName = getView().getProductGroupName();\r\n\t\tString supplyValue = getView().getSupplyValue();\r\n\t\tSizeUnits supplyUnit = getView().getSupplyUnit();\r\n\t\t\r\n\t\tProductGroup pg = new ProductGroup();\r\n\t\tpg.setName(newProductGroupName);\r\n\t\tUnitSize threeMounthSup = null;\r\n\t\ttry {\r\n\t\t\tthreeMounthSup = new UnitSize(supplyValue, supplyUnit.toString() );\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"fail in addProductGroupController\");\r\n\t\t}\r\n\t\t\r\n\t\tpg.setThreeMonthSup(threeMounthSup);\r\n\t\t\r\n\t\tpg.setContainer(_parent);\r\n\t\t\r\n\t\t_productGroupFacade.addProductGroup(pg);\r\n\t\t\r\n\t\tPersistor persistor = Configuration.getInstance().getPersistor();\r\n\t\tpersistor.insertProductContainer(pg);\r\n\t}", "public void setGroup(entity.Group value);", "protected PSGroupProviderInstance()\n {\n }", "public Group(GroupManager gm, String groupName) {\n this.groupManager = gm;//GroupManager.getInstance();\n this.groupName = groupName;\n }", "public MicrosoftGraphGroupSetting() {\n }", "protected VoltexGroup() {\n\t\tsuper();\n\t}", "public final void rule__Model__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:910:1: ( ( 'package' ) )\n // InternalCsv.g:911:1: ( 'package' )\n {\n // InternalCsv.g:911:1: ( 'package' )\n // InternalCsv.g:912:2: 'package'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getModelAccess().getPackageKeyword_1()); \n }\n match(input,13,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getModelAccess().getPackageKeyword_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private GroupFactory() {\n /*UserFactory userFactory = UserFactory.getInstance();\n \n Group gruppo1 = new Group();\n gruppo1.setNomeGruppo(\"Gruppo\");\n gruppo1.setId(0);\n gruppo1.setIscritti(userFactory.getUserById(0));\n gruppo1.setIscritti(userFactory.getUserById(1));\n gruppo1.setIscritti(userFactory.getUserById(2));\n gruppo1.setIscritti(userFactory.getUserById(3));\n \n Group gruppo2 = new Group();\n gruppo2.setNomeGruppo(\"Gruppo2\");\n gruppo2.setId(0);\n gruppo2.setIscritti(userFactory.getUserById(0));\n gruppo2.setIscritti(userFactory.getUserById(3));\n \n Group gruppo3 = new Group();\n gruppo3.setNomeGruppo(\"Gruppo3\");\n gruppo3.setId(0);\n gruppo3.setIscritti(userFactory.getUserById(2));\n gruppo3.setIscritti(userFactory.getUserById(3));\n \n Group gruppo4 = new Group();\n gruppo4.setNomeGruppo(\"Gruppo4\");\n gruppo4.setId(0);\n gruppo4.setIscritti(userFactory.getUserById(1));\n gruppo4.setIscritti(userFactory.getUserById(3));\n \n listaGruppi.add(gruppo1);\n listaGruppi.add(gruppo2);\n listaGruppi.add(gruppo3);\n listaGruppi.add(gruppo4);*/\n }", "@Override\n public Group buildEntity(ResultSet resultSet) throws DAOExceptions {\n Group group = new Group();\n\n try{\n int id = resultSet.getInt(ID_COLUMN_LABEL);\n group.setId(id);\n\n int adminId = resultSet.getInt(ADMIN_ID_COLUMN_LABEL);\n group.setAdminId(adminId);\n\n String name = resultSet.getString(NAME__COLUMN_LABEL);\n group.setGroupName(name);\n\n Date dateCreate = resultSet.getDate(DATE_CREATED_COLUMN_LABEL);\n group.setDateCreated(dateCreate);\n\n String groupDescription = resultSet.getString(GROUP_DESCRIPTION_COLUMN_LABEL);\n group.setGroupDescription(groupDescription);\n }\n catch (SQLException exception){\n throw new DAOExceptions(exception.getMessage(), exception);\n }\n return group;\n }", "@ApiOperation(\"Create a new chapter group. The new chapter group is returned w/ new, \" +\n\t\t\t\"generated id and its starting date.\")\n\t@PostMapping()\n\tpublic ChapterGroup post(\n\t\t\t@PathVariable int chapterId,\n\t\t\t@RequestBody @Valid ChapterGroupCreateDto chapterGroupDto) {\n\t\tChapterGroup chapterGroup = new ChapterGroup();\n\t\tchapterGroup.setChapterId(chapterId);\n\t\tchapterGroup.setName(chapterGroupDto.getName());\n\t\tint chapterGroupId = chapterGroupDao.insertAndGetId(chapterGroup);\n\n\t\t// The chapter group has to be retrieved from the database. This is because several fields\n\t\t// are generated by the database.\n\t\treturn chapterGroupDao.findByChapterGroupIdAndChapterId(chapterGroupId, chapterId);\n\t}", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:898:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // InternalCsv.g:899:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_5);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Model__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Group saveGroup(Group group);", "public Group(String name) {\n super(name);\n this.members = new HashSet<>();\n }", "protected DynamicDeviceGroup() {\n\t}", "private Group createTopLevelGroup(Group specifiedGroup) {\n SequentialGroup group = createSequentialGroup();\n if (getAutoCreateContainerGaps()) {\n group.addSpring(new ContainerAutoPreferredGapSpring());\n group.addGroup(specifiedGroup);\n group.addSpring(new ContainerAutoPreferredGapSpring());\n } else {\n group.addGroup(specifiedGroup);\n }\n return group;\n }", "public final void rule__AstConstructor__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7260:1: ( rule__AstConstructor__Group__1__Impl rule__AstConstructor__Group__2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7261:2: rule__AstConstructor__Group__1__Impl rule__AstConstructor__Group__2\n {\n pushFollow(FOLLOW_rule__AstConstructor__Group__1__Impl_in_rule__AstConstructor__Group__115036);\n rule__AstConstructor__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstConstructor__Group__2_in_rule__AstConstructor__Group__115039);\n rule__AstConstructor__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Group(){\n\t\tstartTime =-1;\n\t\ttempNumber = 0;\n\t}", "Build_Model() {\n\n }", "SkyGroup() {\n }", "private void createGroup(View view) {\r\n\r\n // Creates necessary elements of the dialog with input limit of length 30\r\n final int MAX_LENGTH = 30;\r\n AlertDialog.Builder dialogGroup = new AlertDialog.Builder(getActivity());\r\n dialogGroup.setTitle(\"Create group\");\r\n final EditText editGroupName = new EditText(getActivity());\r\n editGroupName.setHint(\"Group name\");\r\n editGroupName.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);\r\n InputFilter[] FilterArray = new InputFilter[1];\r\n FilterArray[0] = new InputFilter.LengthFilter(MAX_LENGTH);\r\n editGroupName.setFilters(FilterArray);\r\n\r\n // Creates padding for the dialog (for aesthetic)\r\n final int AMOUNT_PADDING = 20;\r\n editGroupName.setSingleLine();\r\n FrameLayout container = new FrameLayout(getActivity());\r\n FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);\r\n params.topMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.bottomMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.leftMargin = convertDpToPx(AMOUNT_PADDING);\r\n params.rightMargin = convertDpToPx(AMOUNT_PADDING);\r\n editGroupName.setLayoutParams(params);\r\n container.addView(editGroupName);\r\n\r\n dialogGroup.setView(container);\r\n\r\n // Create group in database if they click \"create\"\r\n dialogGroup.setPositiveButton(\"Create\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n groupName = editGroupName.getText().toString().trim();\r\n\r\n AsyncHttpClient client = new AsyncHttpClient();\r\n\r\n JSONObject group;\r\n StringEntity entity;\r\n try {\r\n group = new JSONObject();\r\n group.put(\"action\", \"create\");\r\n group.put(\"groupName\", groupName);\r\n group.put(\"owner\", currentUser);\r\n entity = new StringEntity(group.toString(), \"UTF-8\");\r\n }\r\n catch (JSONException e) {\r\n throw new IllegalArgumentException(\"unexpected error\", e);\r\n }\r\n\r\n client.post(getActivity().getApplicationContext(), myURL, entity, \"application/json\", new AsyncHttpResponseHandler() {\r\n @Override\r\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence message = \"Success!\";\r\n Toast.makeText(getActivity().getApplicationContext(), message, duration).show();\r\n\r\n // Refresh page so that it updates when you create group\r\n FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n ft.detach(GroupsFragment.this).attach(GroupsFragment.this).commit();\r\n }\r\n\r\n @Override\r\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\r\n int duration = Toast.LENGTH_SHORT;\r\n CharSequence text;\r\n\r\n if (statusCode == 400) {\r\n text = \"Invalid group\";\r\n }\r\n else {\r\n text = \"Error \" + statusCode + \": \" + error;\r\n }\r\n Toast.makeText(getActivity().getApplicationContext(), text, duration).show();\r\n }\r\n });\r\n }\r\n });\r\n\r\n dialogGroup.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.cancel();\r\n }\r\n });\r\n\r\n dialogGroup.show();\r\n }", "CreateParameterGroupResult createParameterGroup(CreateParameterGroupRequest createParameterGroupRequest);", "public Sitecontentgroup() {\n this(\"SiteContentGroup\", null);\n }", "private void createRpBlockConsistencyGroups() {\n DbClient dbClient = this.getDbClient();\n List<URI> protectionSetURIs = dbClient.queryByType(ProtectionSet.class, false);\n\n Iterator<ProtectionSet> protectionSets =\n dbClient.queryIterativeObjects(ProtectionSet.class, protectionSetURIs);\n\n while (protectionSets.hasNext()) {\n ProtectionSet ps = protectionSets.next();\n Project project = dbClient.queryObject(Project.class, ps.getProject());\n\n BlockConsistencyGroup cg = new BlockConsistencyGroup();\n cg.setId(URIUtil.createId(BlockConsistencyGroup.class));\n cg.setLabel(ps.getLabel());\n cg.setDeviceName(ps.getLabel());\n cg.setType(BlockConsistencyGroup.Types.RP.toString());\n cg.setProject(new NamedURI(project.getId(), project.getLabel()));\n cg.setTenant(project.getTenantOrg());\n\n dbClient.createObject(cg);\n\n log.debug(\"Created ConsistencyGroup (id={}) based on ProtectionSet (id={})\",\n cg.getId().toString(), ps.getId().toString());\n\n // Organize the volumes by replication set\n for (String protectionVolumeID : ps.getVolumes()) {\n URI uri = URI.create(protectionVolumeID);\n Volume protectionVolume = dbClient.queryObject(Volume.class, uri);\n protectionVolume.addConsistencyGroup(cg.getId().toString());\n\n dbClient.persistObject(protectionVolume);\n\n log.debug(\"Volume (id={}) added to ConsistencyGroup (id={})\",\n protectionVolume.getId().toString(), cg.getId().toString());\n }\n }\n }", "private void prepareChecklistFormModel() \n\t{\n\t\tchecklistGroup.clear();\n\t\tSet<ChecklistGroup> groupCollection = checklistService.loadGroups();\n\t\tIterator it = groupCollection.iterator();\n\t\twhile(it.hasNext())\n\t\t{\t\t\t\n\t\t\tChecklistGroup group = (ChecklistGroup) it.next();\n\t\t\tchecklistGroup.add(new ChecklistGroupModel(Integer.toString(group.getId()),\n\t\t\t\t\t\t\t\t\t\t\t\tgroup.getGroupName(),\n\t\t\t\t\t\t\t\t\t\t\t\tchecklistService.loadActivityCollection(Integer.toString(group.getId()))));\t\t \t\n\t\t}\n\t}", "DomainModel createDomainModel();", "public GroupManager createGroupManager() throws ServiceException {\r\n initialize();\r\n return new GroupManager(multiDomainMetaService, multiDomainService); \r\n\t}", "ConsumerGroup createConsumerGroup(String name) throws RegistrationException;", "public interface GroupService {\n\n ImGroup createGroup();\n\n}", "@objid (\"7f09cb5a-1dec-11e2-8cad-001ec947c8cc\")\n public GmResizableGroup() {\n // Nothing to do.\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2574:1: ( rule__Model__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2575:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__15074);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstConstructor__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7358:1: ( rule__AstConstructor__Group_2__0__Impl rule__AstConstructor__Group_2__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7359:2: rule__AstConstructor__Group_2__0__Impl rule__AstConstructor__Group_2__1\n {\n pushFollow(FOLLOW_rule__AstConstructor__Group_2__0__Impl_in_rule__AstConstructor__Group_2__015226);\n rule__AstConstructor__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstConstructor__Group_2__1_in_rule__AstConstructor__Group_2__015229);\n rule__AstConstructor__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public EnemyGroup(){\r\n\t\t\r\n\t}", "public SimpleGroup(final String name) {\n super(name);\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:440:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:441:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__0890);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__0893);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "GroupRefType createGroupRefType();", "public final void rule__AstConstructor__Group_2_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7419:1: ( rule__AstConstructor__Group_2_1__0__Impl rule__AstConstructor__Group_2_1__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7420:2: rule__AstConstructor__Group_2_1__0__Impl rule__AstConstructor__Group_2_1__1\n {\n pushFollow(FOLLOW_rule__AstConstructor__Group_2_1__0__Impl_in_rule__AstConstructor__Group_2_1__015348);\n rule__AstConstructor__Group_2_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstConstructor__Group_2_1__1_in_rule__AstConstructor__Group_2_1__015351);\n rule__AstConstructor__Group_2_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public ProductGroup beProductGroup();", "public GcGroupLevelExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public UUID createGroup(Group group) throws JsonProcessingException, IOException, NdexException{\n\t\tJsonNode postData = objectMapper.valueToTree(group);\n\t\treturn ndexRestClient.createNdexObjectByPost(NdexApiVersion.v2 + \"/group\", postData);\n\t}", "public SmilGroup() {\n\t\tsmilFiles = new LinkedList<D202SmilFile>();\n\t\tdiskUsage = -1;\n\t\tallFiles = new HashSet<FilesetFile>();\n\t\t//System.err.println(\"new group\");\n\t}" ]
[ "0.6834892", "0.67623335", "0.6707187", "0.66135144", "0.65963364", "0.65330136", "0.6353332", "0.6279134", "0.61827123", "0.61827123", "0.60902286", "0.60846907", "0.5996427", "0.5911234", "0.59105814", "0.5892235", "0.579223", "0.5762978", "0.57587916", "0.57515216", "0.5721863", "0.5718083", "0.5655588", "0.5648216", "0.5611802", "0.5602625", "0.5595474", "0.5583615", "0.5574991", "0.55714804", "0.55332726", "0.55115104", "0.5504932", "0.54867023", "0.5473861", "0.5467547", "0.54651", "0.5463235", "0.5462774", "0.5462774", "0.5462774", "0.5462774", "0.5462774", "0.5462774", "0.5462774", "0.54545456", "0.54537433", "0.5440273", "0.54325247", "0.54191786", "0.5407168", "0.53545564", "0.5338105", "0.53367686", "0.5329954", "0.5328943", "0.5320542", "0.5313884", "0.530895", "0.5300436", "0.53002733", "0.52919835", "0.5285135", "0.5270528", "0.52649945", "0.526357", "0.5260209", "0.5244413", "0.52302265", "0.5228581", "0.5224991", "0.5223193", "0.5217565", "0.5216568", "0.521537", "0.5214299", "0.52100533", "0.52047044", "0.52036005", "0.52024704", "0.519858", "0.51938105", "0.51842296", "0.5180683", "0.5178699", "0.51751834", "0.5173657", "0.51527256", "0.5150849", "0.5148422", "0.5144108", "0.51428634", "0.5142061", "0.513512", "0.51258653", "0.5125228", "0.5119351", "0.51177156", "0.5113661", "0.5108581" ]
0.8736136
0
Create an instance of the PriceModel
PriceModel createInstanceOfPriceModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PriceSummaryModel createInstanceOfPriceSummaryModel();", "protected PricingModel() {\n }", "@Valid\n\tvoid create(Price Price);", "public ItemPrice() {\n }", "PriceModel getZeroPriceModel();", "public VKApiPrice() {\n\n }", "public PriceBreakdown() {\n }", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public static Price fromProto(CreateRequest proto) {\n Price price = new Price();\n price.setPrice(proto.getPrice());\n price.setProduct_id(proto.getProductId());\n return price;\n }", "public PricingModel(Game game) {\n this.game = game;\n this.currentPrice = SavingCard.INITIAL_COST;\n this.invokedCount = 0;\n \n\t}", "InstanceModel createInstanceOfInstanceModel();", "public com.vodafone.global.er.decoupling.binding.request.PriceType createPriceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PriceTypeImpl();\n }", "public Pricing()\n\t{\n\t\tprice = INITIALPRICE;\n\t}", "public MF_Price() {\r\n\t\tthis.price = 0.00;\r\n\t\tthis.date = (Date) Calendar.getInstance().getTime();\r\n\t\tthis.company = null;\r\n\t}", "CsticModel createInstanceOfCsticModel();", "public com.vodafone.global.er.decoupling.binding.request.BasePrice createBasePrice()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasePriceImpl();\n }", "public M create(P model);", "public InvoiceModel() {\n \n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "@Override\r\n\tpublic int createPrice(ProductRaw_Price price) {\n\t\tprice.setStatus(0);\r\n\t\treturn productRaw_PriceDao.insert(price);\r\n\t}", "public PriceModelException() {\n\n }", "public PricingModel getPricingModel()\r\n\t{\r\n\t\treturn pricingModel;\r\n\t}", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "@Transactional\n public PriceCalculationViewModel createPriceCalculation(PriceCalculationViewModel priceCalculationViewModel) //BUSINESS LOGIC REQUIREMENT NO. 1\n {\n Product product = new Product();\n product.setProductId(priceCalculationViewModel.getProductid());\n product.setProductDescription(priceCalculationViewModel.getDescription());\n product.setPricePerUnit(priceCalculationViewModel.getPricePerUnit());\n product.setCategory(productApi.);\n product = productApi.createPriceCalculation(product);\n priceCalculationViewModel.setPriceCalculationId(product.getId());\n List<Tax> taxList = priceCalculationViewModel.getComments();\n\n taxList = taxApi.getCommentsByPriceCalculationId(product.getId());\n priceCalculationViewModel.setComments(taxList);\n return priceCalculationViewModel;\n }", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "private WSPricingModel(String inDescription, PricingModel inPricingModel)\r\n\t{\r\n\t\tdescription = inDescription;\r\n\t\tpricingModel = inPricingModel;\r\n\t}", "ResponseEntity<Price> createPrice(String cartId);", "public Product(final LocalDateTime createdAt,final String name,final BigDecimal price,final Status status) {\r\n\t\tthis.name=name;\r\n\t\tthis.price=price;\r\n\t\tthis.status=status;\r\n\t\tthis.createdAt=createdAt;\r\n\t}", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public Carmodel() {\n this(\"CarModel\", null);\n }", "public void createModel() {\n\t\tmyShop = ShopFactory.eINSTANCE.createShop();\n\n\t\tfinal Country dk = ShopFactory.eINSTANCE.createCountry();\n\t\tdk.setName(\"Denmark\");\n\t\tdk.setAbbreviation(\"DK\");\n\t\tmyShop.getCountries().add(dk);\n\n\t\tfinal Country se = ShopFactory.eINSTANCE.createCountry();\n\t\tse.setName(\"Sweden\");\n\t\tse.setAbbreviation(\"SE\");\n\t\tmyShop.getCountries().add(se);\n\n\t\tfinal Contact a = ShopFactory.eINSTANCE.createContact();\n\t\ta.setName(\"a\");\n\t\ta.setCity(\"A\");\n\t\ta.setCountry(dk);\n\t\tmyShop.getContacts().add(a);\n\n\t\tfinal Contact b = ShopFactory.eINSTANCE.createContact();\n\t\tb.setName(\"b\");\n\t\tb.setCity(\"A\");\n\t\tb.setCountry(se);\n\t\tmyShop.getContacts().add(b);\n\t}", "void create(Model model) throws Exception;", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "public Market() {\n }", "public Model() {\n\t}", "public Model() {\n\t}", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "public Product(String name, double price) {\r\n this.name = name;\r\n this.price = price;\r\n quantity = 0;\r\n }", "static public Product create(String name, String description, double price) {\n\t\t\n\t\tProduct p = new Product();\n\t\tp.name = name;\n\t\tp.description = description;\n\t\tp.price = price;\n\t\t\n\t\treturn p;\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public ModelData modelData()\n\t{\n\t\treturn new PriceChangeEditModelData(this);\n\t}", "public Vehicle(int year, String make, String model, BigDecimal msrp) {\n\t\tthis.year = year; \n\t\tthis.make = cleanMake(make);\n\t\tthis.model = cleanModel(model);\n\t\tthis.msrp = msrp; \n\t}", "public Car createListings(int year, String brand, String model, int mileage, int bidPrice) {\r\n\r\n car = new Car(year, brand, model, mileage, bidPrice);\r\n\r\n cars.addCar(car);\r\n\r\n return car;\r\n\r\n }", "public Model() {\n\n }", "public Product() {}", "public FareModel() {\n }", "public GetPriceCmd() {\n\n\t}", "public Publication create(String name, String description, Float price) throws PersistException {\n try (Connection connection = pool.getConnection()) {\n MySqlPublicationDao publicationDao = (MySqlPublicationDao) factory.getDao(Publication.class, connection);\n\n Publication publication = new Publication();\n publication.setName(name);\n publication.setPrice(price);\n publication.setDescription(description);\n\n return publicationDao.persist(publication);\n } catch (Exception e) {\n throw new PersistException(e);\n }\n }", "public Stock() {\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "public MF_Price(double price, String company) {\r\n\t\tthis.price = price;\r\n\t\tthis.company = company;\r\n\t\tthis.date = Calendar.getInstance().getTime();\r\n\t}", "private Model(){}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "@JsonCreator\n public Price(@JsonProperty(\"value\") Double value, @JsonProperty(\"currency_code\") Currency currency) {\n this.value = value;\n this.currencyCode = currency;\n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public Product() { }", "public Product() { }", "public VersionModel() {\n }", "public MF_Price(double price, Date date) {\r\n\t\tthis.price = price;\r\n\t\tthis.date = date;\r\n\t\tthis.company = null;\r\n\t}", "public Product() {\n }", "public Product() {\n }", "EisModel createEisModel();", "public Product() {\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "protected StockPrice() {\n\t\t// just for serializers\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "void createItem (String name, String description, double price);", "public Price priceType(String priceType) {\n this.priceType = priceType;\n return this;\n }", "public Object clone() throws CloneNotSupportedException\n {\n PriceAdjustmentModel dest = null;\n if (getPriceAdjustmentStruct() != null)\n {\n PriceAdjustmentStruct clonedStruct = ProductStructBuilder.clonePriceAdjustmentStruct(getPriceAdjustmentStruct());\n dest = PriceAdjustmentFactory.createPriceAdjustmentModel(clonedStruct);\n }\n return dest;\n }", "DomainModel createDomainModel();", "public Car createCar(String name, String modelName, String type) {\r\n return new Car(name, modelName, type);\r\n }", "public com.vodafone.global.er.decoupling.binding.request.GetPricepointRequest createGetPricepointRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetPricepointRequestImpl();\n }", "public WeightingModel(){}", "protected static PricePlan readFromModel(Resource resource, Model model)\n\t{\n\t\tPricePlan pp = null;\n\t\tif(resource.getLocalName() != null && resource.getNameSpace() != null){\n\t\t\t\n\t\t\tpp = new PricePlan(resource.getLocalName().replaceAll(\"_\", \" \"), resource.getNameSpace());\n\t\t\t\n\t\t\t//populate the PricePlan\n\t\t\tif(resource.hasProperty(RDFSEnum.LABEL.getProperty(model)))\n\t\t\t\tpp.setName(resource.getProperty(RDFSEnum.LABEL.getProperty(model)).getString());\n\n\t\t\tif(resource.hasProperty(RDFSEnum.COMMENT.getProperty(model)))\n\t\t\t\tpp.setComment(resource.getProperty(RDFSEnum.COMMENT.getProperty(model)).getString());\n\t\t\t\n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_CAP.getProperty(model)))//if the resource has a pricecap\n\t\t\t{\n\t\t\t\tResource pricecap = resource.getProperty(USDLPriceEnum.HAS_PRICE_CAP.getProperty(model)).getResource();\n\t\t\t\tPriceSpec priceCap = PriceSpec.readFromModel(pricecap,model);\n\t\t\t\tif(priceCap != null){\n\t\t\t\t\tpp.setPriceCap(priceCap);//read it and add it to the price plan\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_FLOOR.getProperty(model)))//if the resource has a price floor\n\t\t\t{\n\t\t\t\tResource pricefloor = resource.getProperty(USDLPriceEnum.HAS_PRICE_FLOOR.getProperty(model)).getResource();\n\t\t\t\tPriceSpec priceFloor = PriceSpec.readFromModel(pricefloor,model);\n\t\t\t\tif(priceFloor != null){\n\t\t\t\t\tpp.setPriceFloor(priceFloor);//read it and add it to the price plan\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_COMPONENT.getProperty(model)))//if the price plan has components\n\t\t\t{\n\t\t\t\t//get PriceComponents\n\t\t\t\tStmtIterator iter = resource.listProperties(USDLPriceEnum.HAS_PRICE_COMPONENT.getProperty(model));\n\t\t\t\twhile (iter.hasNext()) {//while there's price components left\n\t\t\t\t\tResource pricecomp = iter.next().getObject().asResource();\n\t\t\t\t\tPriceComponent priceComp = PriceComponent.readFromModel(pricecomp,model);\n\t\t\t\t\tif(priceComp != null){\n\t\t\t\t\t\tpp.addPriceComponent(priceComp);//read it and add it to the price plan\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pp;\n\t}", "DataModel createDataModel();", "public void setPrice(double price)\n {\n this.price = price;\n }", "MetricModel createMetricModel();", "public com.vodafone.global.er.decoupling.binding.request.PricePointType createPricePointType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PricePointTypeImpl();\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}", "public void setPrice(double price)\n {\n this.price = price;\n }", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public Producto() {\r\n }", "public void setPrice(Money price) {\n this.price = price;\n }", "public FoodModel()\n\t{\n\t\tgenerateRandomPosition();\n\t}", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }" ]
[ "0.78785515", "0.7312293", "0.71757805", "0.6896648", "0.6786506", "0.651517", "0.6389959", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.6291634", "0.6276572", "0.62289035", "0.6222028", "0.61676025", "0.6148518", "0.61193013", "0.6103926", "0.60743994", "0.60563195", "0.60505575", "0.5977048", "0.5969744", "0.5964337", "0.5948152", "0.5937393", "0.593349", "0.58923835", "0.58884555", "0.5873597", "0.58656293", "0.5864257", "0.58331805", "0.5826356", "0.5822964", "0.5815483", "0.581213", "0.58073217", "0.58073217", "0.58036536", "0.5775702", "0.57746476", "0.57675225", "0.5758406", "0.5758406", "0.5758406", "0.57424986", "0.573996", "0.57251865", "0.5697381", "0.5692388", "0.56749636", "0.5669524", "0.5664917", "0.5638698", "0.5631711", "0.5629009", "0.5627552", "0.56234145", "0.56151354", "0.5608656", "0.56079876", "0.56073403", "0.56073403", "0.560692", "0.55991554", "0.5593837", "0.5593837", "0.5592804", "0.55911225", "0.55904907", "0.55814165", "0.557268", "0.5566394", "0.5561112", "0.5556723", "0.5545649", "0.55440414", "0.55350256", "0.55330944", "0.55211204", "0.5508124", "0.5499942", "0.5494936", "0.5486217", "0.5464319", "0.54524356", "0.5450679", "0.5447558", "0.5444588", "0.5435483", "0.5432704", "0.54323554", "0.54187393", "0.54187393", "0.54187393" ]
0.85631895
0
Create an instance of the SolvableConflictModel
SolvableConflictModel createInstanceOfSolvableConflictModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();", "public ConflictDetector() {\n\t\tthis(getStrategy());\n\t}", "GoalModel createGoalModel();", "InstanceModel createInstanceOfInstanceModel();", "public ModelBolting(){}", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public TaskBoardModel() {\n\n }", "Constraint createConstraint();", "Constraint createConstraint();", "RoomModel createRoomModel(RoomModel roomModel);", "public Model implementCreateModelOver( String name ) {\n return new OntModelImpl( this, maker.createModel( name, false ) );\n }", "public VersionModel() {\n }", "EisModel createEisModel();", "@Override\n\tprotected boolean hasConflictClause(ConstraintNetwork metaValue) {\n\t\treturn false;\n\t}", "public Diploma createDiploma(final String name, final String yearOfResult) {\n\t\tif (this.diplomaRepository.findByNameAndYearOfResult(name, yearOfResult).isPresent()) {\n\t\t\tthrow new ConflictException();\n\t\t}\n\t\tDiploma newDiploma = new Diploma();\n\t\tnewDiploma.setName(name);\n\t\tnewDiploma.setYearOfResult(yearOfResult);\n\t\ttry {\n\t\t\tnewDiploma = this.diplomaRepository.save(newDiploma);\n\t\t} catch (final DuplicateKeyException dke) {\n\t\t\tthrow new ConflictException();\n\t\t} catch (final Exception e) {\n\t\t\tLoggerFactory.getLogger(DiplomaEntityController.class).info(e.getStackTrace().toString());\n\t\t\tthrow new InternalServerErrorException();\n\t\t}\n\t\treturn newDiploma;\n\t}", "void create(Model model) throws Exception;", "public LeaveModel() {\n }", "public static IssueModel createIssueModel(String projectId) throws Exception, IOException {\n try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {\n // Construct a parent resource.\n LocationName parent = LocationName.of(projectId, \"us-central1\");\n\n // Construct an issue model.\n IssueModel issueModel =\n IssueModel.newBuilder()\n .setDisplayName(\"my-model\")\n .setInputDataConfig(\n IssueModel.InputDataConfig.newBuilder().setFilter(\"medium=\\\"CHAT\\\"\").build())\n .build();\n\n // Call the Insights client to create an issue model.\n IssueModel response = client.createIssueModelAsync(parent, issueModel).get();\n System.out.printf(\"Created %s%n\", response.getName());\n return response;\n }\n }", "public abstract ArchECoreRequirementModel newRequirementModel(ArchEVersionVO version) throws ArchEException;", "public Contract create(){\n\t\treturn new Contract();\n\t}", "CsticGroupModel createInstanceOfCsticGroupModel();", "public LinearConstraint() {\n\n }", "GameModel createGameModel(GameModel gameModel);", "public GPProblem() {\n\n }", "Reservation createReservation();", "DomainModel createDomainModel();", "@CheckResult\n public static UpdateConflictAlgorithm withConflictAlgorithm(@ConflictAlgorithm int conflictAlgorithm) {\n return new UpdateConflictAlgorithm(new Update(), conflictAlgorithm);\n }", "CsticModel createInstanceOfCsticModel();", "private ConflictResolution(int value, String name, String literal)\n {\n this.value = value;\n this.name = name;\n this.literal = literal;\n }", "protected Problem() {/* intentionally empty block */}", "public SSModel createSSObject() {\n\t\tSSModel ssModel = new SSModel();\n\t\tssModel.create(mol);\n\t\t\n\t\treturn ssModel;\n\t}", "PlayerInRoomModel createPlayerInRoomModel(PlayerInRoomModel playerInRoomModel);", "ConstraintModelFactory getConstraintModelFactory();", "ConfigModel createInstanceOfConfigModel();", "GameScoreModel createGameScoreModel(GameScoreModel gameScoreModel);", "PastReservation createPastReservation();", "public void conflict(Object arg0) {\n\n\t}", "public synchronized Resource createUniqueResource() throws ModelException {\n\n ensureCanCreateUnique();\n\n int id = getUnusedNodeID();\n BlankResourceImpl r = new BlankResourceImpl(this, id);\n return r;\n }", "AchievementModel createAchievementModel(AchievementModel achievementModel);", "public SudokuModel() {\n board = new Board();\n\t\tisEditing = false;\n\t\teditIndex = new int[2];\n }", "protected abstract C newComponent(String id, IModel<M> model);", "public ConflictDetector(ConflictDetectionStrategy conflictDetectionStrategy) {\n\t\tthis.conflictDetectionStrategy = conflictDetectionStrategy;\n\t}", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "public Model() {\r\n\t\t\tsuper();\r\n\t\t\tdao=new SerieADAO();\r\n\t\t\tthis.mapSeason=new HashMap<>();\r\n\t\t\tthis.mapTeam=new HashMap<>();\r\n\t\t\tthis.mapTeamBySeason=new HashMap<>();\r\n\t\t\tthis.mapMatch=new HashMap<>();\r\n\t\t\tthis.mapMatchBySeason=new HashMap<>();\r\n\r\n\t\r\n\t\t}", "public Position create() {\n\t\tfinal Actor actorLogged = this.actorService.findActorLogged();\n\t\tAssert.notNull(actorLogged);\n\t\tthis.actorService.checkUserLoginCompany(actorLogged);\n\n\t\tPosition result;\n\n\t\tresult = new Position();\n\t\tfinal Collection<Problem> problems = new HashSet<>();\n\t\tfinal Collection<Application> applications = new HashSet<>();\n\n\t\t// R4\n\t\tfinal String ticker = \"\"; //Será generado en el reconstruct\n\n\t\tresult.setTicker(ticker);\n\t\tresult.setProblems(problems);\n\t\tresult.setApplications(applications);\n\t\tresult.setIsFinalMode(false);\n\t\tresult.setIsCancelled(false);\n\n\t\treturn result;\n\t}", "public NoSolutionException() {\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "public DeadModel( final LifeformModel lifeform ) {\n super( lifeform );\n }", "public M create(P model);", "JobResponse create();", "protected static List<Conflict> getConflicts(){\n\t\treturn setOfConflicts;\n\t}", "public AnnualLease(AnnualLeaseModel model)\t\t{ super(model);\t\t}", "private void executeImportClone() {\n if (objectsToClone.size() == 0) {\n clearCachedAssignedVmNames();\n executeImport();\n return;\n }\n ImportCloneModel entity = new ImportCloneModel();\n Object object = objectsToClone.iterator().next();\n entity.setEntity(object);\n entity.setTitle(getImportConflictTitle());\n entity.setHelpTag(HelpTag.import_conflict);\n entity.setHashName(\"import_conflict\"); //$NON-NLS-1$\n entity.getCommands().add(UICommand.createDefaultOkUiCommand(\"onClone\", this)); //$NON-NLS-1$\n entity.getCommands().add(UICommand.createCancelUiCommand(\"closeClone\", this)); //$NON-NLS-1$\n\n setConfirmWindow(entity);\n }", "DataModel createDataModel();", "public Model() {\n\t}", "public Model() {\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public PriceModelException() {\n\n }", "private static String newModel() {\n\n End end = new End(0,0);\n Start start = new Start(0,0);\n End end1 = new End(0,0);\n Start start1 = new Start(0,0);\n End end2 = new End(0,0);\n Start start2 = new Start(0,0);\n Start start3 = new Start(0,0);\n End end3 = new End(0,0);\n Start start4 = new Start(0,0);\n End end4 = new End(0,0);\n\n Start start5 = new Start(2,2);\n End end5 = new End(2,7);\n Start start6 = new Start(2,8);\n End end6 = new End(6,8);\n Start start7 = new Start(4,1);\n End end7 = new End(4,4);\n Start start8 = new Start(7,3);\n End end8 = new End(7,5);\n Start start9 = new Start(9,6);\n End end9 = new End(9,8);\n\n\n\n AircraftCarrier aircraftCarrier = new AircraftCarrier(\"AircraftCarrier\",5,start,end);\n Battleship battleship = new Battleship(\"Battleship\",4,start1,end1);\n Cruiser cruiser = new Cruiser(\"Cruiser\",3,start2,end2);\n Destroyer destroyer = new Destroyer(\"Destroyer\",2,start3,end3);\n Submarine submarine = new Submarine(\"Submarine\",2,start4,end4);\n\n ComputerAircraftCarrier computer_aircraftCarrier = new ComputerAircraftCarrier(\"Computer_AircraftCarrier\",5,start5,end5);\n ComputerBattleship computer_battleship = new ComputerBattleship(\"Computer_Battleship\",4,start6,end6);\n ComputerCruiser computer_cruiser = new ComputerCruiser(\"Computer_Cruiser\",3,start7,end7);\n ComputerDestroyer computer_destroyer = new ComputerDestroyer(\"Computer_Destroyer\",2,start8,end8);\n ComputerSubmarine computer_submarine = new ComputerSubmarine(\"Computer_Submarine\",2,start9,end9);\n ArrayList<Hits>playerHits = new ArrayList<Hits>();\n ArrayList<Misses>playerMisses = new ArrayList<Misses>();\n ArrayList<Misses>computerMisses = new ArrayList<Misses>();\n ArrayList<Hits>computerHits = new ArrayList<Hits>();\n\n BattleshipModel battleshipModel = new BattleshipModel(aircraftCarrier,battleship,cruiser,destroyer,submarine,\n computer_aircraftCarrier,computer_battleship,computer_cruiser,computer_destroyer,computer_submarine,\n playerHits,playerMisses,computerHits,computerMisses);\n\n Gson gson = new Gson();\n String battleshipModelWithJson = gson.toJson(battleshipModel);\n return battleshipModelWithJson;\n }", "public suiluppo_equip_allocation create(long equip_allocat_id);", "public ModelResource() {\n }", "BehaviouralModelFactory getBehaviouralModelFactory();", "public void createModel() {\r\n\t\t\r\n\t\tEObject input;\r\n\t\tURI resourceURI = EditUIUtil.getURI(getEditorInput());\r\n\t\tIEditorInput editorInput = getEditorInput();\r\n\r\n\t\tView v = getAllView(editorInput);\r\n\t\t\r\n\t\tif (editorInput instanceof ValueEditorInputAppFeature) {\r\n\t\t\tValueEditorInputAppFeature featureInput = (ValueEditorInputAppFeature) editorInput;\r\n\t\t\tinput = featureInput.getFeature();\r\n\t\t} else if (editorInput instanceof ValueEditorInputAppGroup){\r\n\t\t\tValueEditorInputAppGroup groupInput = (ValueEditorInputAppGroup) editorInput;\r\n\t\t\tinput = groupInput.getGroup();\r\n\t\t} else {\r\n\t\t\tEAppNamedItem namedInput = (EAppNamedItem) getInputObjectFromWorkspace(((URIEditorInput) editorInput)\r\n\t\t\t\t\t.getURI());\r\n\t\t\tsetPartName(namedInput.getName());\r\n\t\t\tinput = namedInput;\r\n\t\t}\r\n\r\n\t\tAppModel2EditorModelConverter instance = AppModel2EditorModelConverter.getInstance();\r\n\t\teditorModel = instance.createEditorModel(input, v);\r\n\t\t\r\n\t\tResource resource = new XMIResourceImpl(resourceURI);\r\n\t\tresource.getContents().add(editorModel);\r\n\t\teditingDomain.getResourceSet().getResources().add(resource);\r\n\t\t\r\n\t\tSettingEvaluator.initRelevantForWholeModel(v, true);\r\n\t\t\r\n\t\t//S60CTBuilder.setEditor(this);\r\n\t}", "private Frame initFrameExternalConstraintForCompatible() {\n return new NonOverlappingFrame();\n }", "PriceModel createInstanceOfPriceModel();", "public AbstractStateModel() {\n }", "private HabitContract() {\n }", "public FMISComLocal create() throws javax.ejb.CreateException;", "public static BII createEntity() {\n BII bII = new BII()\n .name(DEFAULT_NAME)\n .type(DEFAULT_TYPE)\n .biiId(DEFAULT_BII_ID)\n .detectionTimestamp(DEFAULT_DETECTION_TIMESTAMP)\n .sourceId(DEFAULT_SOURCE_ID)\n .detectionSystemName(DEFAULT_DETECTION_SYSTEM_NAME)\n .detectedValue(DEFAULT_DETECTED_VALUE)\n .detectionContext(DEFAULT_DETECTION_CONTEXT)\n .etc(DEFAULT_ETC)\n .etcetc(DEFAULT_ETCETC);\n return bII;\n }", "public InvalidProjectTypeException () {\r\n \t\tsuper();\r\n \t}", "CurrentReservation createCurrentReservation();", "ModelRule createModelRule();", "HdbdtiModel createHdbdtiModel();", "public void setAsConflict(String errorMessage){\n setStatus(409);\n }", "public Model() {\n\n }", "public PresenceModel createPresenceModel();", "InstanceModel build(String[] behavFiles) throws IOException, InvalidBehaviourException, IncQueryException, InvalidMissionException {\n\t\tfor (String behavFile : behavFiles) {\n\t\t\tFile f = new File(behavFile);\n\t\t\tif (f.exists()) {\n\t\t\t\tif (behavFile.endsWith(\".behaviour\")) {\n\t\t\t\t\tURI fileURI = URI.createFileURI(f.getAbsolutePath());\n\t\t\t\t\tresSet.getResource(fileURI, true);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new FileNotFoundException(\"The file at \" + behavFile + \" is not of type .behaviour\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new FileNotFoundException(\"The file at \" + behavFile + \" does not exist\");\n\t\t\t}\n\t\t}\n\n\t\t// Resolve proxies in all loaded behavior instances (creates Mission instance in the resource set)\n\t\tEcoreUtil.resolveAll(this.resSet);\n\t\t\n\t\t// Extract instances from the resource set and validate them\n\t\tboolean missionAlreadyLoaded = false;\n\t\tfor (Resource resource : resSet.getResources()) {\n\t\t\tif (resource.getContents().get(0) instanceof DroneBehaviour) {\n\t\t\t\tDroneBehaviour droneBehav = (DroneBehaviour) resource.getContents().get(0);\n\t\t\t\tIncQueryHelper.validateBehaviour(droneBehav, resSet);\n\t\t\t\tthis.behaviouralModels.add(droneBehav);\n\t\t\t} else if (resource.getContents().get(0) instanceof Mission) {\n\t\t\t\tif (!missionAlreadyLoaded) {\n\t\t\t\t\tMission mission = (Mission) resource.getContents().get(0);\n\t\t\t\t\tIncQueryHelper.validateMission(mission);\n\t\t\t\t\tthis.staticModel = mission;\n\t\t\t\t\tmissionAlreadyLoaded = true;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new InvalidBehaviourException(\"Behaviour instances shouldn't reference multiple Mission instances\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tInstanceModel instance = new InstanceModel();\n\n\t\tinstance.setDronePrograms(this.behaviouralModels);\n\t\tinstance.setMission(this.staticModel);\n\n\t\treturn instance;\n\t}", "public Model() {\n\t\tthis.map = new Map(37, 23);\n\t}", "public WorkspacePatch() {\n }", "Not createNot();", "Not createNot();", "public RefAlertRuleModel createRefAlertRule(RefAlertRuleModel model) throws AAException, RemoteException;", "E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;", "private ProjectContract() {\n }", "public RefAlertMessageModel createRefAlertMessage(RefAlertMessageModel model) throws AAException, RemoteException;", "private static String newModel(Request req) {\n\n if( req.params(\"Version\").equals(\"Updated\") ) {\n\n // make new model, make gson object, convert model to json using gson\n BattleshipModelUpdated game = new BattleshipModelUpdated();\n Gson gson = new Gson();\n return gson.toJson( game );\n\n }else{\n\n // make new model, make gson object, convert model to json using gson\n BattleshipModelNormal game = new BattleshipModelNormal();\n Gson gson = new Gson();\n return gson.toJson( game );\n\n }\n }", "@ExceptionHandler(DataIntegrityViolationException.class)\n\t@ResponseStatus(HttpStatus.CONFLICT)\n\t@ResponseBody\n\tprotected ErrorModel handleConflict(final Exception ex, final WebRequest request) {\n\t\tResourceNotFoundException rnfex = (ResourceNotFoundException) ex;\n\t\tlogger.error(ex);\n\t\treturn new ErrorModel(\"resource_exists\", \"The resource already exists in \" + rnfex.getResourceName());\n\t}", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "public static AbstractStrategy lastKConflicts(Solver SOLVER, int K, AbstractStrategy STRAT) {\n return new LastConflict(SOLVER, STRAT, K);\n }", "private CardExchangeModel() {\n\t}" ]
[ "0.7275953", "0.6050192", "0.54182374", "0.53022903", "0.51863414", "0.5144709", "0.50851536", "0.5057132", "0.5057132", "0.5057132", "0.5057132", "0.5057132", "0.5057132", "0.5057132", "0.5024381", "0.5019217", "0.5019217", "0.50167", "0.5015178", "0.49658954", "0.4952766", "0.49444056", "0.49372032", "0.49325514", "0.49316883", "0.49309504", "0.49274686", "0.49225494", "0.4913687", "0.49029428", "0.48965687", "0.48778966", "0.48747757", "0.4869511", "0.4828881", "0.48271558", "0.4822435", "0.48178354", "0.48157856", "0.48152936", "0.4805", "0.48021463", "0.4792703", "0.4784425", "0.4783817", "0.4749684", "0.47203693", "0.4712458", "0.47069818", "0.46968663", "0.4693521", "0.46909752", "0.46834362", "0.4679261", "0.46780702", "0.46755478", "0.4674745", "0.46694958", "0.46674874", "0.46666205", "0.46456242", "0.4645359", "0.46369678", "0.46369678", "0.4635728", "0.4635728", "0.4635728", "0.46308967", "0.46251923", "0.46158975", "0.45947376", "0.45895758", "0.45878223", "0.45862824", "0.4580607", "0.457995", "0.45779037", "0.45756623", "0.45689654", "0.45671046", "0.45643634", "0.45530686", "0.45505807", "0.45463228", "0.45438838", "0.45384538", "0.4532948", "0.4527796", "0.45266187", "0.45238194", "0.45238194", "0.45220664", "0.45168376", "0.45115817", "0.45065975", "0.45065072", "0.45055836", "0.4504041", "0.45036745", "0.4495601" ]
0.88941646
0
Create an instance of the ConflictingAssumptionModel
ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SolvableConflictModel createInstanceOfSolvableConflictModel();", "GoalModel createGoalModel();", "public Ambulance() {\n\t}", "public ModelBolting(){}", "AchievementModel createAchievementModel(AchievementModel achievementModel);", "InstanceModel createInstanceOfInstanceModel();", "@Test\r\n public void testCreateInvalid() throws PAException {\r\n thrown.expect(PAException.class);\r\n thrown.expectMessage(\"Missing Disease/Condition. \");\r\n StudyProtocol studyProtocol = TestSchema.createStudyProtocolObj();\r\n Ii spIi = IiConverter.convertToStudyProtocolIi(studyProtocol.getId());\r\n StudyDiseaseDTO studyDiseaseDTO = new StudyDiseaseDTO();\r\n studyDiseaseDTO.setStudyProtocolIdentifier(spIi);\r\n studyDiseaseDTO.setCtGovXmlIndicator(BlConverter.convertToBl(true));\r\n bean.create(studyDiseaseDTO);\r\n }", "@Override\n public void testAssumptionFailure(Failure failure) {\n exception = new AssumptionViolatedException(failure.getException().getMessage());\n exception.setStackTrace(failure.getException().getStackTrace());\n ;\n }", "private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }", "public AnnualLease(AnnualLeaseModel model)\t\t{ super(model);\t\t}", "public void createFailure() {\n\t\tgetController().changeFree(true);\t\t\n\t\tdisplayAdvertisement(\"opponent failure\");\n\t\tvalidate();\n\t}", "OperationalizingSoftgoal createOperationalizingSoftgoal();", "public TheoryBuilder2<A, B> assuming(BiPredicate<A, B> newAssumption) {\n return new TheoryBuilder2<A, B>(this.state, this.as, this.bs,\n this.assumptions.and(newAssumption));\n }", "QualityRisk createQualityRisk();", "public Assigment createAssigment(Assigment newAssigment){\n Assigment tempAssigment = null;\n if (assigmentRepo.findAssigmentsByClientId(newAssigment.getClientId()).size()<newAssigment.getCoupon().getMaxPerUser() && newAssigment.getCoupon().getStock()>0){\n // Create Assigment\n tempAssigment = assigmentRepo.save(newAssigment);\n\n // Update Coupon Stock\n Coupon tempCoupon = newAssigment.getCoupon();\n tempCoupon.setStock(tempCoupon.getStock()-1);\n couponRepo.save(tempCoupon);\n }\n return tempAssigment;\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void testCreateAndSaveNegative1() {\r\n\t\tBrotherhood brotherhood;\r\n\r\n\t\tauthenticate(\"brother5\");\r\n\r\n\t\tbrotherhood = brotherhoodService.create();\r\n\r\n\t\tbrotherhood.setName(\"Test\");\r\n\t\tbrotherhood.setFoundationYear(1900);\r\n\t\tbrotherhood.setHistory(\"Test\");\r\n\r\n\t\tbrotherhoodService.save(brotherhood);\r\n\r\n\t\tunauthenticate();\r\n\t}", "public GPProblem() {\n\n }", "public AttributeAlreadyExistsException() {\n super();\n }", "public abstract ArchECoreRequirementModel newRequirementModel(ArchEVersionVO version) throws ArchEException;", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void testCreateAndSaveNegative3() {\r\n\t\tBrotherhood brotherhood;\r\n\r\n\t\tauthenticate(\"viewer\");\r\n\r\n\t\tbrotherhood = brotherhoodService.create();\r\n\r\n\t\tbrotherhood.setName(\"Test\");\r\n\t\tbrotherhood.setFoundationYear(1900);\r\n\t\tbrotherhood.setHistory(\"Test\");\r\n\r\n\t\tbrotherhoodService.save(brotherhood);\r\n\r\n\t\tunauthenticate();\r\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void testCreateAndSaveNegative2() {\r\n\t\tBrotherhood brotherhood;\r\n\r\n\t\tauthenticate(\"admin\");\r\n\r\n\t\tbrotherhood = brotherhoodService.create();\r\n\r\n\t\tbrotherhood.setName(\"Test\");\r\n\t\tbrotherhood.setFoundationYear(1900);\r\n\t\tbrotherhood.setHistory(\"Test\");\r\n\r\n\t\tbrotherhoodService.save(brotherhood);\r\n\r\n\t\tunauthenticate();\r\n\t}", "@Test(expected = TrainException.class)\n\tpublic void testCreateLocomotiveWithInvalidSpecification() throws TrainException\n\t{\n\t\tString invalidSpecification = \"3Z\";\n\t\tInteger validGrossWeight = 5;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock locomotiveWithInvalidSpecification = \n\t\t\t\tnew asgn2RollingStock.Locomotive(validGrossWeight , invalidSpecification);\n\t}", "public ME_Model() {\n _nheldout = 0;\n _early_stopping_n = 0;\n _ref_modelp = null;\n }", "public ApplicationDeltaHealthPolicy() {\n }", "ClaimSoftgoal createClaimSoftgoal();", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public ConflictDetector() {\n\t\tthis(getStrategy());\n\t}", "org.hl7.fhir.ObservationReliability addNewReliability();", "public EANAlreadyExists() {\n }", "ModelRule createModelRule();", "public synchronized Resource createUniqueResource() throws ModelException {\n\n ensureCanCreateUnique();\n\n int id = getUnusedNodeID();\n BlankResourceImpl r = new BlankResourceImpl(this, id);\n return r;\n }", "public LeaveModel() {\n }", "EisModel createEisModel();", "ConfigModel createInstanceOfConfigModel();", "public DuplicateSensorException(){\n }", "public WeightingModel(){}", "public Good() {\n }", "public BhiEnvironmentalAssessmentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public Loyalty() {}", "RentalAgency createRentalAgency();", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "public InterpolationModel() {\n\tUnigram = new UnigramModel();\n\tBigram = new BigramModel();\n\tTrigram = new TrigramModel();\n }", "CsticGroupModel createInstanceOfCsticGroupModel();", "MetricModel createMetricModel();", "private void initModel() {\n\t\tList<Issue> issues = negotiationSession.getUtilitySpace().getDomain().getIssues();\n\n\t\tthis.issueEvaluationList = new IssueEvaluationList(issues.size());\n\n\t\t// Create an empty issueEvaluation object for each issue in the domain.\n\t\t// This will later contain all information we can gather on the\n\t\t// negotiator.\n\t\tfor (int index = 0; index < issues.size(); index++) {\n\t\t\tIssue issue = issues.get(index);\n\t\t\tAIssueEvaluation issueEvaluation = null;\n\n\t\t\tif (issue instanceof IssueDiscrete)\n\t\t\t\tissueEvaluation = new IssueEvaluationDiscrete((IssueDiscrete) issue);\n\t\t\telse if (issue instanceof IssueInteger) {\n\t\t\t\t// We use the range in which our utility is non-zero to estimate\n\t\t\t\t// the distribution of the opponent.\n\t\t\t\tIssueInteger issueI = (IssueInteger) issue;\n\t\t\t\tRange ourNonZeroUtilityRange = new Range(issueI.getLowerBound(), issueI.getUpperBound());\n\t\t\t\tissueEvaluation = new IssueEvaluationInteger((IssueInteger) issue, ourNonZeroUtilityRange);\n\t\t\t} else if (issue instanceof IssueReal) {\n\t\t\t\t// We use the range in which our utility is non-zero to estimate\n\t\t\t\t// the distribution of the opponent.\n\t\t\t\tIssueReal issueR = (IssueReal) issue;\n\t\t\t\tRange ourNonZeroUtilityRange = new Range(issueR.getLowerBound(), issueR.getUpperBound());\n\t\t\t\tissueEvaluation = new IssueEvaluationReal((IssueReal) issue, ourNonZeroUtilityRange);\n\t\t\t} else\n\t\t\t\tthrow new UnsupportedOperationException(\"There is no implementation for that issueType.\");\n\n\t\t\t// Add the new issueEvaluation to the list.\n\t\t\tthis.issueEvaluationList.addIssueEvaluation(issueEvaluation);\n\t\t}\n\t}", "UsabilityRequirement createUsabilityRequirement();", "public AirCondition(){}", "public Intake() {\n\n }", "public HeatingModuleModel(){\n\t}", "public InvalidBrainException() {\n }", "@Test\n public void testPositiveAllocation() {\n Allocation allocation = new Allocation(\n doctors.get(0),\n surgeryRooms.get(0),\n (new Period(50, 10, 15))\n );\n boolean expected = true;\n boolean actual = hospital.allocate(allocation);\n assertEquals(expected, actual);\n }", "@Test(expected = IllegalArgumentException.class)\r\n\tpublic void testCreateAndSaveNegative4() {\r\n\t\tBrotherhood brotherhood;\r\n\r\n\t\tunauthenticate();\r\n\r\n\t\tbrotherhood = brotherhoodService.create();\r\n\r\n\t\tbrotherhood.setName(\"Test\");\r\n\t\tbrotherhood.setFoundationYear(1900);\r\n\t\tbrotherhood.setHistory(\"Test\");\r\n\r\n\t\tbrotherhoodService.save(brotherhood);\r\n\t}", "public void initWithOutReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM);\r\n\t}", "public Absence() {\n this(DSL.name(\"Absence\"), null);\n }", "public Potencial() {\r\n }", "@Test(expected = TrainException.class)\n\tpublic void testCreateLocomotiveWithInvalidGrossWeight() throws TrainException\n\t{\n\t\tString validClassification = \"5E\";\n\t\tInteger invalidGrossWeight = -1;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock locomotiveWithInvalidGrossWeight = \n\t\t\t\tnew asgn2RollingStock.Locomotive(invalidGrossWeight , validClassification);\n\t}", "VariantConditionModel createInstanceOfVariantConditionModel();", "DenialReasonDto create(DenialReasonDto denialReason);", "ArtefactModel getArtefactModel();", "private FullyObservableProblem(int[] initialValuation,\n\t\t\tExplicitCondition goal, ArrayList<String> variableNames,\n\t\t\tList<List<String>> propositionNames,\n\t\t\tArrayList<Integer> domainSizes, ArrayList<Integer> axiomLayer,\n\t\t\tArrayList<Integer> defaultAxiomValues,\n\t\t\tLinkedHashSet<Operator> causativeOperators, Set<OperatorRule> axioms)\n\t{\n\t\tsuper(goal, variableNames, propositionNames, domainSizes, axiomLayer,\n\t\t\t\tdefaultAxiomValues, causativeOperators, axioms, true);\n\t\tGlobal.problem = this;\n\t\tperformSanityCheck();\n\t\tList<Integer> defaultValues = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < initialValuation.length; i++)\n\t\t{\n\t\t\tdefaultValues.add(i, initialValuation[i]);\n\t\t}\n\t\texplicitAxiomEvaluator = new ExplicitAxiomEvaluator();\n\t\tinitialState = new ExplicitState(initialValuation,\n\t\t\t\texplicitAxiomEvaluator);\n\t}", "public static Ailment createEntity(EntityManager em) {\n Ailment ailment = new Ailment()\n .name(DEFAULT_NAME)\n .symptoms(DEFAULT_SYMPTOMS)\n .treatments(DEFAULT_TREATMENTS);\n return ailment;\n }", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "Assignment createAssignment();", "Assignment createAssignment();", "public personnelMedicalModel(){\n\n }", "public static IssueModel createIssueModel(String projectId) throws Exception, IOException {\n try (ContactCenterInsightsClient client = ContactCenterInsightsClient.create()) {\n // Construct a parent resource.\n LocationName parent = LocationName.of(projectId, \"us-central1\");\n\n // Construct an issue model.\n IssueModel issueModel =\n IssueModel.newBuilder()\n .setDisplayName(\"my-model\")\n .setInputDataConfig(\n IssueModel.InputDataConfig.newBuilder().setFilter(\"medium=\\\"CHAT\\\"\").build())\n .build();\n\n // Call the Insights client to create an issue model.\n IssueModel response = client.createIssueModelAsync(parent, issueModel).get();\n System.out.printf(\"Created %s%n\", response.getName());\n return response;\n }\n }", "public TournamentAdaptativeModel()\n {\n this(0.10, 0.15, 0.20);\n }", "private CardExchangeModel() {\n\t}", "@Test\n\tpublic void testValidInvalidEstimtes() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(-1);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "@Test\n\tpublic void RecommendationModelMaintest() {\n\t\tRecommendationModel object3 = new RecommendationModel();\n\t\tassertNotNull(object3);\n\t}", "public X837Ins_2320_MOA_MedicareOutpatientAdjudicationInformation() {}", "protected VendorCheck createVendorCheck() {\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(new Long(99999));\r\n return vendorCheck;\r\n }", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public DieteticBrotherModel() {\n database = new Database();\n availableFood = database.initializeAvailableFood();\n recipes = database.initializeRecipes(availableFood);\n\n recipe = new Recipe(0, \"My Recipe\");\n }", "@Transactional(propagation=Propagation.REQUIRES_NEW)\r\n\tpublic void createError(){\r\n\t\tOrder newOrder = new Order( );\r\n\t\tnewOrder.setDescription(\"Service layer added \"+Calendar.getInstance().getTime());\r\n\t\tspringOrderDao.errorSave(newOrder);\r\n\t}", "protected abstract T create(final double idealStartTime);", "public AlarmEntity(){}", "public LPGInconsistency chooseInconsistency() {\n\t\t\n\t\tLPGInconsistency chosenInconsistency = null; \n\t\tint inconsistencyCounter;\n\t\t\n\t\t/* rare instances where inconsistency count is 0 */\n\t\tif (inconsistencyCount <= 0 ) {\n\t\t\tcountInconsistencies();\n\t\t\tif (inconsistencyCount <= 0)\n\t\t\t\treturn null;\n\t\t}\n\t\t\t\n\t\t/* check to see if we will prefer earlier inconsistencies or not */\n\t\tif (rand.nextFloat() <= INCONSISTENCY_WEIGHT) \n\t\t\tinconsistencyCounter = rand.nextInt((int) Math.ceil(inconsistencyCount*INCONSISTENCY_WEIGHT));\n\t\t\n\t\t/* choose a random number and iterate until we get to that inconsistency */\n\t\telse\n\t\t\tinconsistencyCounter = rand.nextInt(inconsistencyCount);\n\t\t\t\n\t\t\tfor(InconsistencyIterator iterator = this.new InconsistencyIterator(); iterator.hasNext();){\n\t\t\t\tif (inconsistencyCounter > 0 ) {\n\t\t\t\t\titerator.next();\n\t\t\t\t\tinconsistencyCounter--;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tchosenInconsistency = iterator.next();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(chosenInconsistency == null){\n\t\t\t\tchosenInconsistency = countInconsistencies();\n\t\t\t}\n\t\t\t\n\t\treturn chosenInconsistency;\n\t}", "@Test\n public void create_NotAnAssignment_ShouldReturn400Error() throws Exception {\n final String invalidRequestJSON = \"{\\\"not\\\": \\\"an assignment\\\"}\";\n\n // When we post an invalid request\n // then we get a Bad Request error\n mockMvc.perform(post(ENDPOINT)\n .contentType(MediaType.APPLICATION_JSON)\n .content(invalidRequestJSON))\n .andExpect(status().isBadRequest());\n }", "public AppliedHoldInfo() {\n }", "@Test(expected = TrainException.class)\n\tpublic void testCreatePassengerCarWithInvalidGrossWeight() throws TrainException\n\t{\n\t\tInteger validNumberOfSeats = 5;\n\t\tInteger invalidGrossWeight = -1;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock passengerCarWithInvalidGrossWeight = \n\t\t\t\tnew asgn2RollingStock.PassengerCar((Integer)invalidGrossWeight, (Integer)validNumberOfSeats);\n\t}", "public Competence() {\r\n\t\tsuper();\r\n\t}", "public void testCreationWithInvalidArguments() throws Exception {\n try {\n new Experiment(null, 1L, Arrays.asList(1L));\n fail(\"Expected exception.\");\n } catch (NullPointerException expectedSoIgnore) {}\n\n try {\n new Experiment(experimentDb, 0L, Arrays.asList(1L));\n fail(\"Expected IllegalArgumentException.\");\n } catch (IllegalArgumentException expectedSoIgnore) {}\n\n try {\n new Experiment(experimentDb, 1L, null);\n fail(\"Expected IllegalArgumentException.\");\n } catch (IllegalArgumentException expectedSoIgnore) {}\n\n try {\n new Experiment(experimentDb, 1L, Collections.<Long>emptyList());\n fail(\"Expected IllegalArgumentException.\");\n } catch (IllegalArgumentException expectedSoIgnore) {}\n }", "public Education() {}", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement createSpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement();", "protected Problem() {/* intentionally empty block */}", "public suiluppo_equip_allocation create(long equip_allocat_id);", "public PriceModelException() {\n\n }", "UsabilityGoal createUsabilityGoal();", "public ValidationModel getValidationModel() {\n \n Logger logger = Logger.getLogger(AvdSupport.class.getName());\n \n\n logger.log(Level.SEVERE, \"Creatig valiation model\");\n logger.log(Level.SEVERE, \"Reading file: \");\n FileObject fo = avdDataObject.getPrimaryFile();\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(fo.getInputStream()));\n \n String line = null;\n while ((line = br.readLine()) != null) {\n logger.log(Level.SEVERE, \"line: {0}\", line);\n }\n \n } catch (FileNotFoundException ex) {\n Exceptions.printStackTrace(ex);\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n \n // TODO: implement\n // throw new UnsupportedOperationException(\"Not supported yet.\");\n \n \n \n return null;\n }", "public TaskBoardModel() {\n\n }", "@Test\n void ignoreDifferentPlacement () throws ParserConfigurationException,\n SAXException, IOException, XPathExpressionException {\n\n Model base = new Model(\"./tests/TestModels/TravelAgency\" +\n \"/BaseModelForTA.bpmn.xml\");\n //the model against which all others will be tested.\n\n Model onlyPositionsAreDifferent = new Model(\"./tests/TestModels\" +\n \"/TravelAgency/onlyPositionsAreDifferent.bpmn.xml\");\n assertFalse(TravelAgency.modelsAreDifferent(base,\n onlyPositionsAreDifferent));\n //The position of the BPMN symbols should not matter. As such, it\n // should be equal to the base model.\n\n }", "public TimeDependent_Strategy(NegotiationSession negoSession, OpponentModel model, OMStrategy oms, double e, double k, double max, double min) {\r\n this.e = e;\r\n this.k = k;\r\n this.Umax = max;\r\n this.Umin = min;\r\n this.negotiationSession = negoSession;\r\n this.outcomespace = new SortedOutcomeSpace(this.negotiationSession.getUtilitySpace());\r\n this.negotiationSession.setOutcomeSpace(this.outcomespace);\r\n this.opponentModel = model;\r\n this.omStrategy = oms;\r\n this.deadLine = new Deadline();\r\n this.newDeadline = 0.0;\r\n try {\r\n this.init(negoSession, model, oms, new HashMap<>());\r\n } catch (Exception e1) {\r\n e1.printStackTrace();\r\n }\r\n }", "public static AbsTime factory() throws Time.Ex_TimeNotAvailable\n {\n return new AbsTime();\n }" ]
[ "0.6796718", "0.54348385", "0.529072", "0.52351034", "0.5178598", "0.50555855", "0.50438315", "0.5006445", "0.49960417", "0.49540675", "0.49507508", "0.4936338", "0.49192274", "0.4893745", "0.487424", "0.48712873", "0.4864446", "0.47914708", "0.47861695", "0.47849068", "0.47791255", "0.47686273", "0.47662127", "0.47622654", "0.47481063", "0.47399682", "0.47223943", "0.4718932", "0.46962497", "0.46938112", "0.46873114", "0.46793497", "0.46772477", "0.46754122", "0.46728832", "0.4660238", "0.46556255", "0.46426326", "0.4639362", "0.46273997", "0.4623426", "0.4617837", "0.46177706", "0.4612683", "0.46006143", "0.46003297", "0.45921293", "0.45880628", "0.45703673", "0.4569471", "0.45684132", "0.45638376", "0.45590913", "0.455901", "0.45426515", "0.45392743", "0.4537917", "0.45271498", "0.45203915", "0.45166275", "0.45116276", "0.45072287", "0.4505585", "0.4505585", "0.4500236", "0.44979057", "0.44934782", "0.44916368", "0.44860554", "0.44851762", "0.44788316", "0.44743136", "0.44653338", "0.44653338", "0.44653338", "0.44653338", "0.44653338", "0.44653338", "0.44653338", "0.4461472", "0.44614062", "0.44581357", "0.4453258", "0.44482058", "0.44471338", "0.44450548", "0.44432148", "0.44298175", "0.44294062", "0.4422339", "0.44150183", "0.44132954", "0.44099644", "0.44097555", "0.44095427", "0.44092646", "0.4397932", "0.4397384", "0.4396619", "0.43952268" ]
0.87994486
0
Create an instance of the PriceModel
PriceModel getZeroPriceModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PriceModel createInstanceOfPriceModel();", "PriceSummaryModel createInstanceOfPriceSummaryModel();", "protected PricingModel() {\n }", "@Valid\n\tvoid create(Price Price);", "public ItemPrice() {\n }", "public VKApiPrice() {\n\n }", "public PriceBreakdown() {\n }", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public static Price fromProto(CreateRequest proto) {\n Price price = new Price();\n price.setPrice(proto.getPrice());\n price.setProduct_id(proto.getProductId());\n return price;\n }", "public PricingModel(Game game) {\n this.game = game;\n this.currentPrice = SavingCard.INITIAL_COST;\n this.invokedCount = 0;\n \n\t}", "InstanceModel createInstanceOfInstanceModel();", "public com.vodafone.global.er.decoupling.binding.request.PriceType createPriceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PriceTypeImpl();\n }", "public Pricing()\n\t{\n\t\tprice = INITIALPRICE;\n\t}", "public MF_Price() {\r\n\t\tthis.price = 0.00;\r\n\t\tthis.date = (Date) Calendar.getInstance().getTime();\r\n\t\tthis.company = null;\r\n\t}", "CsticModel createInstanceOfCsticModel();", "public com.vodafone.global.er.decoupling.binding.request.BasePrice createBasePrice()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasePriceImpl();\n }", "public M create(P model);", "public InvoiceModel() {\n \n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "@Override\r\n\tpublic int createPrice(ProductRaw_Price price) {\n\t\tprice.setStatus(0);\r\n\t\treturn productRaw_PriceDao.insert(price);\r\n\t}", "public PriceModelException() {\n\n }", "public PricingModel getPricingModel()\r\n\t{\r\n\t\treturn pricingModel;\r\n\t}", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "@Transactional\n public PriceCalculationViewModel createPriceCalculation(PriceCalculationViewModel priceCalculationViewModel) //BUSINESS LOGIC REQUIREMENT NO. 1\n {\n Product product = new Product();\n product.setProductId(priceCalculationViewModel.getProductid());\n product.setProductDescription(priceCalculationViewModel.getDescription());\n product.setPricePerUnit(priceCalculationViewModel.getPricePerUnit());\n product.setCategory(productApi.);\n product = productApi.createPriceCalculation(product);\n priceCalculationViewModel.setPriceCalculationId(product.getId());\n List<Tax> taxList = priceCalculationViewModel.getComments();\n\n taxList = taxApi.getCommentsByPriceCalculationId(product.getId());\n priceCalculationViewModel.setComments(taxList);\n return priceCalculationViewModel;\n }", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "private WSPricingModel(String inDescription, PricingModel inPricingModel)\r\n\t{\r\n\t\tdescription = inDescription;\r\n\t\tpricingModel = inPricingModel;\r\n\t}", "ResponseEntity<Price> createPrice(String cartId);", "public Product(final LocalDateTime createdAt,final String name,final BigDecimal price,final Status status) {\r\n\t\tthis.name=name;\r\n\t\tthis.price=price;\r\n\t\tthis.status=status;\r\n\t\tthis.createdAt=createdAt;\r\n\t}", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public Carmodel() {\n this(\"CarModel\", null);\n }", "public void createModel() {\n\t\tmyShop = ShopFactory.eINSTANCE.createShop();\n\n\t\tfinal Country dk = ShopFactory.eINSTANCE.createCountry();\n\t\tdk.setName(\"Denmark\");\n\t\tdk.setAbbreviation(\"DK\");\n\t\tmyShop.getCountries().add(dk);\n\n\t\tfinal Country se = ShopFactory.eINSTANCE.createCountry();\n\t\tse.setName(\"Sweden\");\n\t\tse.setAbbreviation(\"SE\");\n\t\tmyShop.getCountries().add(se);\n\n\t\tfinal Contact a = ShopFactory.eINSTANCE.createContact();\n\t\ta.setName(\"a\");\n\t\ta.setCity(\"A\");\n\t\ta.setCountry(dk);\n\t\tmyShop.getContacts().add(a);\n\n\t\tfinal Contact b = ShopFactory.eINSTANCE.createContact();\n\t\tb.setName(\"b\");\n\t\tb.setCity(\"A\");\n\t\tb.setCountry(se);\n\t\tmyShop.getContacts().add(b);\n\t}", "void create(Model model) throws Exception;", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "public Market() {\n }", "public Model() {\n\t}", "public Model() {\n\t}", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "public Product(String name, double price) {\r\n this.name = name;\r\n this.price = price;\r\n quantity = 0;\r\n }", "static public Product create(String name, String description, double price) {\n\t\t\n\t\tProduct p = new Product();\n\t\tp.name = name;\n\t\tp.description = description;\n\t\tp.price = price;\n\t\t\n\t\treturn p;\n\t}", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public ModelData modelData()\n\t{\n\t\treturn new PriceChangeEditModelData(this);\n\t}", "public Vehicle(int year, String make, String model, BigDecimal msrp) {\n\t\tthis.year = year; \n\t\tthis.make = cleanMake(make);\n\t\tthis.model = cleanModel(model);\n\t\tthis.msrp = msrp; \n\t}", "public Car createListings(int year, String brand, String model, int mileage, int bidPrice) {\r\n\r\n car = new Car(year, brand, model, mileage, bidPrice);\r\n\r\n cars.addCar(car);\r\n\r\n return car;\r\n\r\n }", "public Model() {\n\n }", "public Product() {}", "public FareModel() {\n }", "public GetPriceCmd() {\n\n\t}", "public Publication create(String name, String description, Float price) throws PersistException {\n try (Connection connection = pool.getConnection()) {\n MySqlPublicationDao publicationDao = (MySqlPublicationDao) factory.getDao(Publication.class, connection);\n\n Publication publication = new Publication();\n publication.setName(name);\n publication.setPrice(price);\n publication.setDescription(description);\n\n return publicationDao.persist(publication);\n } catch (Exception e) {\n throw new PersistException(e);\n }\n }", "public Stock() {\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "public MF_Price(double price, String company) {\r\n\t\tthis.price = price;\r\n\t\tthis.company = company;\r\n\t\tthis.date = Calendar.getInstance().getTime();\r\n\t}", "private Model(){}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "@JsonCreator\n public Price(@JsonProperty(\"value\") Double value, @JsonProperty(\"currency_code\") Currency currency) {\n this.value = value;\n this.currencyCode = currency;\n }", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public Product() { }", "public Product() { }", "public VersionModel() {\n }", "public MF_Price(double price, Date date) {\r\n\t\tthis.price = price;\r\n\t\tthis.date = date;\r\n\t\tthis.company = null;\r\n\t}", "public Product() {\n }", "public Product() {\n }", "EisModel createEisModel();", "public Product() {\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "protected StockPrice() {\n\t\t// just for serializers\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "void createItem (String name, String description, double price);", "public Price priceType(String priceType) {\n this.priceType = priceType;\n return this;\n }", "public Object clone() throws CloneNotSupportedException\n {\n PriceAdjustmentModel dest = null;\n if (getPriceAdjustmentStruct() != null)\n {\n PriceAdjustmentStruct clonedStruct = ProductStructBuilder.clonePriceAdjustmentStruct(getPriceAdjustmentStruct());\n dest = PriceAdjustmentFactory.createPriceAdjustmentModel(clonedStruct);\n }\n return dest;\n }", "DomainModel createDomainModel();", "public Car createCar(String name, String modelName, String type) {\r\n return new Car(name, modelName, type);\r\n }", "public com.vodafone.global.er.decoupling.binding.request.GetPricepointRequest createGetPricepointRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.GetPricepointRequestImpl();\n }", "public WeightingModel(){}", "protected static PricePlan readFromModel(Resource resource, Model model)\n\t{\n\t\tPricePlan pp = null;\n\t\tif(resource.getLocalName() != null && resource.getNameSpace() != null){\n\t\t\t\n\t\t\tpp = new PricePlan(resource.getLocalName().replaceAll(\"_\", \" \"), resource.getNameSpace());\n\t\t\t\n\t\t\t//populate the PricePlan\n\t\t\tif(resource.hasProperty(RDFSEnum.LABEL.getProperty(model)))\n\t\t\t\tpp.setName(resource.getProperty(RDFSEnum.LABEL.getProperty(model)).getString());\n\n\t\t\tif(resource.hasProperty(RDFSEnum.COMMENT.getProperty(model)))\n\t\t\t\tpp.setComment(resource.getProperty(RDFSEnum.COMMENT.getProperty(model)).getString());\n\t\t\t\n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_CAP.getProperty(model)))//if the resource has a pricecap\n\t\t\t{\n\t\t\t\tResource pricecap = resource.getProperty(USDLPriceEnum.HAS_PRICE_CAP.getProperty(model)).getResource();\n\t\t\t\tPriceSpec priceCap = PriceSpec.readFromModel(pricecap,model);\n\t\t\t\tif(priceCap != null){\n\t\t\t\t\tpp.setPriceCap(priceCap);//read it and add it to the price plan\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_FLOOR.getProperty(model)))//if the resource has a price floor\n\t\t\t{\n\t\t\t\tResource pricefloor = resource.getProperty(USDLPriceEnum.HAS_PRICE_FLOOR.getProperty(model)).getResource();\n\t\t\t\tPriceSpec priceFloor = PriceSpec.readFromModel(pricefloor,model);\n\t\t\t\tif(priceFloor != null){\n\t\t\t\t\tpp.setPriceFloor(priceFloor);//read it and add it to the price plan\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\tif(resource.hasProperty(USDLPriceEnum.HAS_PRICE_COMPONENT.getProperty(model)))//if the price plan has components\n\t\t\t{\n\t\t\t\t//get PriceComponents\n\t\t\t\tStmtIterator iter = resource.listProperties(USDLPriceEnum.HAS_PRICE_COMPONENT.getProperty(model));\n\t\t\t\twhile (iter.hasNext()) {//while there's price components left\n\t\t\t\t\tResource pricecomp = iter.next().getObject().asResource();\n\t\t\t\t\tPriceComponent priceComp = PriceComponent.readFromModel(pricecomp,model);\n\t\t\t\t\tif(priceComp != null){\n\t\t\t\t\t\tpp.addPriceComponent(priceComp);//read it and add it to the price plan\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn pp;\n\t}", "DataModel createDataModel();", "public void setPrice(double price)\n {\n this.price = price;\n }", "MetricModel createMetricModel();", "public com.vodafone.global.er.decoupling.binding.request.PricePointType createPricePointType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PricePointTypeImpl();\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "private ProductData(int id, String name, double price) {\n\t\t\tthis.id = id;\n\t\t\tthis.name = name;\n\t\t\tthis.price = price;\n\t\t}", "public void setPrice(double price)\n {\n this.price = price;\n }", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public Producto() {\r\n }", "public void setPrice(Money price) {\n this.price = price;\n }", "public FoodModel()\n\t{\n\t\tgenerateRandomPosition();\n\t}", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }", "public void setPrice(double price) {\n this.price = price;\n }" ]
[ "0.85631895", "0.78785515", "0.7312293", "0.71757805", "0.6896648", "0.651517", "0.6389959", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.63255906", "0.6291634", "0.6276572", "0.62289035", "0.6222028", "0.61676025", "0.6148518", "0.61193013", "0.6103926", "0.60743994", "0.60563195", "0.60505575", "0.5977048", "0.5969744", "0.5964337", "0.5948152", "0.5937393", "0.593349", "0.58923835", "0.58884555", "0.5873597", "0.58656293", "0.5864257", "0.58331805", "0.5826356", "0.5822964", "0.5815483", "0.581213", "0.58073217", "0.58073217", "0.58036536", "0.5775702", "0.57746476", "0.57675225", "0.5758406", "0.5758406", "0.5758406", "0.57424986", "0.573996", "0.57251865", "0.5697381", "0.5692388", "0.56749636", "0.5669524", "0.5664917", "0.5638698", "0.5631711", "0.5629009", "0.5627552", "0.56234145", "0.56151354", "0.5608656", "0.56079876", "0.56073403", "0.56073403", "0.560692", "0.55991554", "0.5593837", "0.5593837", "0.5592804", "0.55911225", "0.55904907", "0.55814165", "0.557268", "0.5566394", "0.5561112", "0.5556723", "0.5545649", "0.55440414", "0.55350256", "0.55330944", "0.55211204", "0.5508124", "0.5499942", "0.5494936", "0.5486217", "0.5464319", "0.54524356", "0.5450679", "0.5447558", "0.5444588", "0.5435483", "0.5432704", "0.54323554", "0.54187393", "0.54187393", "0.54187393" ]
0.6786506
5
Create an instance of the PriceSummaryModel
PriceSummaryModel createInstanceOfPriceSummaryModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PriceModel createInstanceOfPriceModel();", "protected PricingModel() {\n }", "PriceModel getZeroPriceModel();", "public ItemPrice() {\n }", "public PriceBreakdown() {\n }", "public ItemSummary() {\n }", "@Valid\n\tvoid create(Price Price);", "MetricModel createMetricModel();", "public PricingModel(Game game) {\n this.game = game;\n this.currentPrice = SavingCard.INITIAL_COST;\n this.invokedCount = 0;\n \n\t}", "public PersonSummary() {}", "@Transactional\n public PriceCalculationViewModel createPriceCalculation(PriceCalculationViewModel priceCalculationViewModel) //BUSINESS LOGIC REQUIREMENT NO. 1\n {\n Product product = new Product();\n product.setProductId(priceCalculationViewModel.getProductid());\n product.setProductDescription(priceCalculationViewModel.getDescription());\n product.setPricePerUnit(priceCalculationViewModel.getPricePerUnit());\n product.setCategory(productApi.);\n product = productApi.createPriceCalculation(product);\n priceCalculationViewModel.setPriceCalculationId(product.getId());\n List<Tax> taxList = priceCalculationViewModel.getComments();\n\n taxList = taxApi.getCommentsByPriceCalculationId(product.getId());\n priceCalculationViewModel.setComments(taxList);\n return priceCalculationViewModel;\n }", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "public MF_Price() {\r\n\t\tthis.price = 0.00;\r\n\t\tthis.date = (Date) Calendar.getInstance().getTime();\r\n\t\tthis.company = null;\r\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "public InvoiceModel() {\n \n }", "public SSModel createSSObject() {\n\t\tSSModel ssModel = new SSModel();\n\t\tssModel.create(mol);\n\t\t\n\t\treturn ssModel;\n\t}", "public VKApiPrice() {\n\n }", "public Prize()\n {\n name = \"\";\n worth = 0;\n cost = 0;\n }", "public M create(P model);", "public Pricing()\n\t{\n\t\tprice = INITIALPRICE;\n\t}", "InstanceModel createInstanceOfInstanceModel();", "private WSPricingModel(String inDescription, PricingModel inPricingModel)\r\n\t{\r\n\t\tdescription = inDescription;\r\n\t\tpricingModel = inPricingModel;\r\n\t}", "CsticGroupModel createInstanceOfCsticGroupModel();", "public com.vodafone.global.er.decoupling.binding.request.BasePrice createBasePrice()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.BasePriceImpl();\n }", "public DetailPrice(DetailPrice source) {\n if (source.PriceTitle != null) {\n this.PriceTitle = new String(source.PriceTitle);\n }\n if (source.PriceName != null) {\n this.PriceName = new String(source.PriceName);\n }\n if (source.OriginalPrice != null) {\n this.OriginalPrice = new Float(source.OriginalPrice);\n }\n if (source.DiscountPrice != null) {\n this.DiscountPrice = new Float(source.DiscountPrice);\n }\n if (source.UnitPrice != null) {\n this.UnitPrice = new Float(source.UnitPrice);\n }\n if (source.UnitPriceDiscount != null) {\n this.UnitPriceDiscount = new Float(source.UnitPriceDiscount);\n }\n if (source.ChargeUnit != null) {\n this.ChargeUnit = new String(source.ChargeUnit);\n }\n if (source.OriginalPriceHigh != null) {\n this.OriginalPriceHigh = new String(source.OriginalPriceHigh);\n }\n if (source.DiscountPriceHigh != null) {\n this.DiscountPriceHigh = new String(source.DiscountPriceHigh);\n }\n if (source.UnitPriceHigh != null) {\n this.UnitPriceHigh = new String(source.UnitPriceHigh);\n }\n if (source.UnitPriceDiscountHigh != null) {\n this.UnitPriceDiscountHigh = new String(source.UnitPriceDiscountHigh);\n }\n }", "public Publication create(String name, String description, Float price) throws PersistException {\n try (Connection connection = pool.getConnection()) {\n MySqlPublicationDao publicationDao = (MySqlPublicationDao) factory.getDao(Publication.class, connection);\n\n Publication publication = new Publication();\n publication.setName(name);\n publication.setPrice(price);\n publication.setDescription(description);\n\n return publicationDao.persist(publication);\n } catch (Exception e) {\n throw new PersistException(e);\n }\n }", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "public Market() {\n }", "CsticModel createInstanceOfCsticModel();", "public Supermarket() {\n }", "public PriceModelException() {\n\n }", "public com.vodafone.global.er.decoupling.binding.request.PriceType createPriceType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PriceTypeImpl();\n }", "public ModelData modelData()\n\t{\n\t\treturn new PriceChangeEditModelData(this);\n\t}", "public Stock() {\n }", "public Supermarket() {\n }", "public WeightingModel(){}", "public Supermarket()\n {\n }", "public HealthModel() {\n healthMetrics = new ArrayList<HealthMetric>();\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n this.fetchHealthMetrics();\n }", "public Model() {\n\t}", "public Model() {\n\t}", "public CalcPriceTest() {\n goods = new ArrayList<>(NUM_PLANETS);\n planets = new ArrayList<>(NUM_PLANETS);\n for (int i = 0; i < planets.size(); i++) {\n planets.add(new Planet());\n goods.add(new ArrayList<>(NUM_GOODS));\n }\n for (int i = 0; i < planets.size(); i++) {\n Planet thisPlanet = planets.get(i);\n ArrayList<TradeGood> theseGoods = goods.get(i);\n for (TradeGood.GoodType type : TradeGood.GoodType.values()) {\n TradeGood newGood = new TradeGood(type, thisPlanet);\n theseGoods.add(newGood);\n }\n }\n }", "Item(DukatAmount price){\r\n\t\tthis(0, new Weight(5), price);\r\n\t}", "public Portfolio() {\n}", "public Portfolio(){}", "public com.vodafone.global.er.decoupling.binding.request.PricingModelFullType createPricingModelFullType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PricingModelFullTypeImpl();\n }", "List<PriceRow> getPriceInformationsForProduct(ProductModel model);", "public ProductTestReport() {}", "public Book create(String title,double price, Author author)\r\n {\r\n return new Book(title,price,author);\r\n }", "void createItem (String name, String description, double price);", "public static Model newOf(Model model) {\n\t\tModel newModel = Model.newOf();\n\t\tnewModel.setTitle(model.getTitle());\n\t\tnewModel.setTableCode(model.getTableCode());\n\t\tnewModel.setDescription(model.getDescription());\n\t\treturn newModel;\n\t}", "public Portfolio(){\n }", "public Product(final LocalDateTime createdAt,final String name,final BigDecimal price,final Status status) {\r\n\t\tthis.name=name;\r\n\t\tthis.price=price;\r\n\t\tthis.status=status;\r\n\t\tthis.createdAt=createdAt;\r\n\t}", "EisModel createEisModel();", "public ModelPayment(double payment) {\n this.payment = payment;\n }", "public Product(String name, double price) {\r\n this.name = name;\r\n this.price = price;\r\n quantity = 0;\r\n }", "DataModel createDataModel();", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "private Model(){}", "public Series () {\n super();\n this.price = RandomFill.generateNumber(5,15);\n this.listSeason = RandomFill.generateListSeason();\n }", "public RevenueList() {\n }", "public PricingModel getPricingModel()\r\n\t{\r\n\t\treturn pricingModel;\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.CatalogFullPricepointRequest createCatalogFullPricepointRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.CatalogFullPricepointRequestImpl();\n }", "public TotalRevenueView() {\n\t\t\ttotalPrice = new Amount(0);\n\t}", "@Override\r\n\tpublic int createPrice(ProductRaw_Price price) {\n\t\tprice.setStatus(0);\r\n\t\treturn productRaw_PriceDao.insert(price);\r\n\t}", "@Generated\n public NewsModel() {\n }", "public ProfitDistribTpViewImpl() {\n }", "public PieChartView(Model model) {\n\t\tsuper(model);\n\t}", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "public Model() {\n\n }", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "public void createModel() {\n\t\tmyShop = ShopFactory.eINSTANCE.createShop();\n\n\t\tfinal Country dk = ShopFactory.eINSTANCE.createCountry();\n\t\tdk.setName(\"Denmark\");\n\t\tdk.setAbbreviation(\"DK\");\n\t\tmyShop.getCountries().add(dk);\n\n\t\tfinal Country se = ShopFactory.eINSTANCE.createCountry();\n\t\tse.setName(\"Sweden\");\n\t\tse.setAbbreviation(\"SE\");\n\t\tmyShop.getCountries().add(se);\n\n\t\tfinal Contact a = ShopFactory.eINSTANCE.createContact();\n\t\ta.setName(\"a\");\n\t\ta.setCity(\"A\");\n\t\ta.setCountry(dk);\n\t\tmyShop.getContacts().add(a);\n\n\t\tfinal Contact b = ShopFactory.eINSTANCE.createContact();\n\t\tb.setName(\"b\");\n\t\tb.setCity(\"A\");\n\t\tb.setCountry(se);\n\t\tmyShop.getContacts().add(b);\n\t}", "void create(Model model) throws Exception;", "@Test\n public void test_constructor_0(){\n\tSystem.out.println(\"Testing MeasuredRatioModel's MeasuredRatioModel()\");\n //Tests if default values are correct\n MeasuredRatioModel instance=new MeasuredRatioModel();\n String expResult=\"NONE\";\n String result=instance.getName();\n assertEquals(expResult,result);\n result=instance.getUncertaintyType();\n assertEquals(expResult,result);\n BigDecimal expectedResult=new BigDecimal(\"0\");\n BigDecimal actualResult=instance.getValue();\n assertEquals(expectedResult,actualResult);\n actualResult=instance.getOneSigma();\n assertEquals(expectedResult,actualResult);\n assertEquals(false,instance.isFracCorr());\n assertEquals(false,instance.isOxideCorr());\n }", "List<PriceInformation> getPriceForProduct(ProductModel product);", "public Product() { \n initComponents();\n table();\n \n }", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "Quantity createQuantity();", "public Product()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.price = 0.0;\n\t\tthis.imported = false;\n\t\tthis.quantity = 0;\n\t\tthis.taxedCost = 0.0;\n\t}", "GameScoreModel createGameScoreModel(GameScoreModel gameScoreModel);", "public ProductListContract() {}", "public SaleOffPriceCreatorPanel() {\n initComponents();\n\n lookup = new AbstractLookup(content);\n\n saleOff = new SaleOff();\n promotion = new Promotion();\n\n tblSaleOffPrice.setRowHeight(26);\n\n tableCell = new SaleOffPiceTableCell(this);\n tblSaleOffPrice.getColumnModel().getColumn(0).setCellEditor(tableCell);\n tblSaleOffPrice.getColumnModel().getColumn(0).setCellRenderer(tableCell);\n\n tblSaleOffPrice.getColumnModel().getColumn(1).setCellEditor(tableCell);\n tblSaleOffPrice.getColumnModel().getColumn(1).setCellRenderer(tableCell);\n\n tblSaleOffPrice.getColumnModel().getColumn(2).setCellEditor(tableCell);\n tblSaleOffPrice.getColumnModel().getColumn(2).setCellRenderer(tableCell);\n\n tblSaleOffPrice.getColumnModel().getColumn(3).setCellEditor(tableCell);\n tblSaleOffPrice.getColumnModel().getColumn(3).setCellRenderer(tableCell);\n\n btnExit.addActionListener(this);\n btnNew.addActionListener(this);\n btnSave.addActionListener(this);\n btnSaveList.addActionListener(this);\n\n resetColorRowTable();\n\n }", "public personnelMedicalModel(){\n\n }", "ResponseEntity<Price> createPrice(String cartId);", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "ShipmentCostEstimate createShipmentCostEstimate();", "public SeriesModel(String title, int startYear, int endYear) {\n\t\tsuper(title, startYear, endYear);\n\t}", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }", "public GetPriceCmd() {\n\n\t}", "protected StockPrice() {\n\t\t// just for serializers\n\t}", "public SummaryDetail(SummaryDetail source) {\n if (source.GroupKey != null) {\n this.GroupKey = new String(source.GroupKey);\n }\n if (source.GroupValue != null) {\n this.GroupValue = new String(source.GroupValue);\n }\n if (source.TotalCost != null) {\n this.TotalCost = new String(source.TotalCost);\n }\n if (source.RealTotalCost != null) {\n this.RealTotalCost = new String(source.RealTotalCost);\n }\n if (source.CashPayAmount != null) {\n this.CashPayAmount = new String(source.CashPayAmount);\n }\n if (source.IncentivePayAmount != null) {\n this.IncentivePayAmount = new String(source.IncentivePayAmount);\n }\n if (source.VoucherPayAmount != null) {\n this.VoucherPayAmount = new String(source.VoucherPayAmount);\n }\n if (source.TransferPayAmount != null) {\n this.TransferPayAmount = new String(source.TransferPayAmount);\n }\n if (source.Business != null) {\n this.Business = new BusinessSummaryInfo[source.Business.length];\n for (int i = 0; i < source.Business.length; i++) {\n this.Business[i] = new BusinessSummaryInfo(source.Business[i]);\n }\n }\n }", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "public Product() {\n\t}" ]
[ "0.7284837", "0.65168685", "0.6135063", "0.6060886", "0.60581094", "0.59478754", "0.5799281", "0.5778334", "0.57105404", "0.5649648", "0.55782896", "0.55423707", "0.5521151", "0.5482774", "0.5482774", "0.5482774", "0.5482774", "0.5482774", "0.5482774", "0.5482774", "0.54533905", "0.5447416", "0.5421791", "0.5367589", "0.5356623", "0.5316878", "0.52814835", "0.5254808", "0.52517277", "0.5237672", "0.5230272", "0.5215257", "0.51923025", "0.51889044", "0.51874566", "0.5180017", "0.5171035", "0.51646584", "0.5163199", "0.5143776", "0.51403254", "0.5137342", "0.51186955", "0.51173484", "0.51093525", "0.51093525", "0.5104333", "0.5100984", "0.50980645", "0.5090828", "0.5089769", "0.5075919", "0.50718856", "0.50674313", "0.5067161", "0.5059014", "0.5030935", "0.502588", "0.50228053", "0.5013396", "0.50098103", "0.50076413", "0.4995756", "0.4995756", "0.4995756", "0.49935898", "0.49908784", "0.49904332", "0.4988371", "0.49770162", "0.49759156", "0.49738207", "0.49619856", "0.49561062", "0.49550632", "0.49517187", "0.49331927", "0.49265444", "0.4923883", "0.491935", "0.4916537", "0.49080506", "0.49048558", "0.49040502", "0.48985776", "0.4897777", "0.48905593", "0.48903564", "0.4884938", "0.48847467", "0.48840803", "0.4875426", "0.48725042", "0.48694852", "0.4862813", "0.48589346", "0.48585775", "0.48560387", "0.48478144", "0.48455748" ]
0.87182736
0
Create an instance of the VariantConditionModel
VariantConditionModel createInstanceOfVariantConditionModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Condition createCondition();", "LogicCondition createLogicCondition();", "BaseCondition createBaseCondition();", "public SimpleCondition() {\n\n\t}", "public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}", "public BTGConditionDTO()\n\t{\n\t\tsuper();\n\t}", "public VancarrierModel() {\r\n\t\tthis(null, \"VCModel\", true, true);\r\n\t}", "FilterCondition createFilterCondition(int clueNum);", "ConditionFactory getConditionFactory();", "public SearchConditionSB() {\r\n }", "public final TestConditionModel getTestConditionModel() {\r\n\t\treturn testConditionModel;\r\n\t}", "public ConditionModelSwitch()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = ConditionModelPackage.eINSTANCE;\r\n }\r\n }", "public VersionModel() {\n }", "public ConditionModelAdapterFactory()\r\n {\r\n if (modelPackage == null)\r\n {\r\n modelPackage = ConditionModelPackage.eINSTANCE;\r\n }\r\n }", "public Logic(Model m){\r\n model = m;\r\n }", "protected void initSpecSpecificConditions() {\r\n // THESE ARE ALL FOR MAF SPEC 1.0 ONLY\r\n\r\n //If variant_Type is \"ins\" Reference_Allele should always be \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"[^\\\\-]\"), \"contain anything but '-' characters\", true));\r\n // and either of Tumor_Seq_Allele1 and Tumor_Seq_Allele2 should have \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantInsSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n //If variant_Type is \"del\", then Reference_Allele can't contain \"-\",\r\n conditions.add(new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_REFERENCE_ALLELE, Pattern.compile(\"-\"), \"contain any '-' characters\", true));\r\n // and either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should contain \"-\".\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE1, Pattern.compile(\"-\"), \"contain at least one '-'\", false),\r\n new ConditionalRequirement(FIELD_VARIANT_TYPE, getVariantTypeDelSymbol(), FIELD_TUMOR_SEQ_ALLELE2, Pattern.compile(\"-\"), \"contain at least one '-'\", false)));\r\n\r\n //If validation_status is \"wildtype\", then Tumor_Seq_Allele1=Tumor_Seq_Allele2\r\n //and Tumor_Seq_Allele1=Reference_Allele)\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(FIELD_VALIDATION_STATUS, VALIDATION_STATUS_WILDTYPE, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, false));\r\n\r\n // if mutation_status is germline, tumor_seql_allele1 must be equal to match_norm_seq_allele1\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE1,\r\n FIELD_MATCH_NORM_SEQ_ALLELE1, false));\r\n conditions.add(new ConditionalRequirement(FIELD_MUTATION_STATUS, MUTATION_STATUS_GERMLINE, FIELD_TUMOR_SEQ_ALLELE2,\r\n FIELD_MATCH_NORM_SEQ_ALLELE2, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele1 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then Match_Norm_Validation_Allele2 should equal Reference_Allele\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE2,\r\n FIELD_REFERENCE_ALLELE, false));\r\n // if mutation_status is somatic and validation status is valid, then either Tumor_Seq_Allele1 or Tumor_Seq_Allele2 should NOT match Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true), // not\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_SOMATIC, VALIDATION_STATUS_VALID}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true))); // not\r\n\r\n //If Mutation_Status == LOH AND Validation_Status==Unknown, then\r\n //Tumor_Seq_Allele1 == Tumor_Seq_Allele2 and\r\n //Match_Norm_Seq_Allele1 != Match_Norm_Seq_Allele2 and\r\n //Tumor_Seq_Allele1 = (Match_Norm_Seq_Allele1 or Match_Norm_Seq_Allele2)\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_TUMOR_SEQ_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_MATCH_NORM_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_UNKNOWN}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_MATCH_NORM_SEQ_ALLELE2, false)));\r\n //If Mutation_Status == LOH AND Validation_Status==Valid, then\r\n //Tumor_Validation_Allele1 == Tumor_Validation_Allele2 and\r\n //Match_Norm_Validation_Allele1 != Match_Norm_Validation_Allele2 and\r\n //Tumor_Validation_Allele1 == (Match_Norm_Validation_Allele1 or Match_Norm_Validation_Allele2).\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_TUMOR_VALIDATION_ALLELE2, false));\r\n conditions.add(new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_MATCH_NORM_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, true)); // not\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE1, false),\r\n new ConditionalRequirement(new String[]{FIELD_MUTATION_STATUS, FIELD_VALIDATION_STATUS}, new String[]{MUTATION_STATUS_LOH, VALIDATION_STATUS_VALID}, FIELD_TUMOR_VALIDATION_ALLELE1, FIELD_MATCH_NORM_VALIDATION_ALLELE2, false)));\r\n // Tumor_Seq_Allele1 != Reference_Allele OR Tumor_Seq_Allele2 != Reference_Allele\r\n conditions.add(new ConditionalRequirement(ConditionalOperator.OR,\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE1, FIELD_REFERENCE_ALLELE, true),\r\n new ConditionalRequirement(new String[]{}, new String[]{}, FIELD_TUMOR_SEQ_ALLELE2, FIELD_REFERENCE_ALLELE, true)));\r\n\r\n }", "public AirCondition(){}", "public interface ICondition\n{\n\n /**\n * called when we are sure we are done with this condition\n */\n public void dispose();\n\n /**\n * attempt to clone this condition before it will be bound in the\n * instantiation phase. We pass the current bindings so that the condition can\n * do an early rejection if possible.\n * \n * @param model\n * @param variableBindings\n * @return a writable copy of the condition that will be bound\n * @throws CannotMatchException\n * if there is no way this condition can be matched\n */\n public ICondition clone(IModel model, Map<String, Object> variableBindings)\n throws CannotMatchException;\n\n /**\n * Iteratively perform the resolution and binding for this condition. If this\n * condition defines any variables, they are placed into the bindings map for\n * other conditions to exploit. Similarly, it will resolve any bindings that\n * it needs in order to be matched. If at any point the condition determines\n * that it cannot be matched, the exception is to be thrown. Similarly, if\n * isIterative is false, and there are unresolved bindings, the exception\n * should be thrown. <br>\n * Otherwise, the number of unresolved bindings is returned which allows the\n * instantiation calculation determine if another resolution round is\n * required.\n * \n * @return number of unresolved variables\n */\n public int bind(IModel model, Map<String, Object> variableBindings,\n boolean isIterative) throws CannotMatchException;\n}", "public interface ConditionFactory {\n\n Condition createNewCondition(List<List<Object>> arguments);\n\n}", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "public SeqConditionSet() {\n\t}", "Conditional createConditional();", "public static Condition makeCondition(TreeNode root) {\n return new Condition(root);\n }", "public final void setTestConditionModel(TestConditionModel testConditionModel) {\r\n\t\tthis.testConditionModel = testConditionModel;\r\n\t}", "public Condition() {\n _rawProperties = new HashSet<>();\n _usedLookupIds = new HashSet<>();\n _potentialContextEntries = new HashSet<>();\n }", "public abstract ArchECoreRequirementModel newRequirementModel(ArchEVersionVO version) throws ArchEException;", "public ICondition clone(IModel model, Map<String, Object> variableBindings)\n throws CannotMatchException;", "public Condition newCondition() {\r\n throw new java.lang.UnsupportedOperationException();\r\n }", "@Override\n\tpublic VehicleCondition getCondition() {\n\t\treturn condition;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "CsticValueModel createInstanceOfCsticValueModel(int valueType);", "@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}", "public ContextConditionImpl() {\n\t\tsuper();\n\t}", "public Condition loadCondition( ObjectId id_condition ) throws KettleException {\n Condition condition = new Condition();\n\n try {\n RowMetaAndData r = getCondition( id_condition );\n if ( r != null ) {\n condition.setNegated( r.getBoolean( \"NEGATED\", false ) );\n condition.setOperator( Condition.getOperator( r.getString( \"OPERATOR\", null ) ) );\n\n long conditionId = r.getInteger( \"ID_CONDITION\", -1L );\n if ( conditionId > 0 ) {\n condition.setObjectId( new LongObjectId( conditionId ) );\n } else {\n condition.setObjectId( null );\n }\n\n ObjectId[] subids = repository.getSubConditionIDs( condition.getObjectId() );\n if ( subids.length == 0 ) {\n condition.setLeftValuename( r.getString( \"LEFT_NAME\", null ) );\n condition.setFunction( Condition.getFunction( r.getString( \"CONDITION_FUNCTION\", null ) ) );\n condition.setRightValuename( r.getString( \"RIGHT_NAME\", null ) );\n\n long id_value = r.getInteger( \"ID_VALUE_RIGHT\", -1L );\n if ( id_value > 0 ) {\n ValueMetaAndData v = repository.loadValueMetaAndData( new LongObjectId( id_value ) );\n condition.setRightExact( v );\n }\n } else {\n for ( int i = 0; i < subids.length; i++ ) {\n condition.addCondition( loadCondition( subids[i] ) );\n }\n }\n\n return condition;\n } else {\n throw new KettleException( \"Condition with id_condition=\"\n + id_condition + \" could not be found in the repository\" );\n }\n } catch ( KettleException dbe ) {\n throw new KettleException(\n \"Error loading condition from the repository (id_condition=\" + id_condition + \")\", dbe );\n }\n }", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public Condition newCondition() {\n throw new java.lang.UnsupportedOperationException();\n }", "public IfCondition() {\r\n super();\r\n }", "Eq createEq();", "private void initValueModels()\n {\n myCriterionValue.setName(\"Value\");\n myCriterionMaxValue.setNameAndDescription(\"Maximum value\", \"The maximum value\");\n\n addModel(myCriterionValue);\n addModel(myCriterionMaxValue);\n\n Conditional cond = myOperator.get();\n myCriterionValue.setVisible(cond != Conditional.EMPTY && cond != Conditional.NOT_EMPTY);\n myCriterionMaxValue.setVisible(cond == Conditional.BETWEEN);\n }", "public static ProductVariant of(final ProductVariant template) {\n ProductVariantImpl instance = new ProductVariantImpl();\n instance.setProduct(template.getProduct());\n instance.setStaged(template.getStaged());\n instance.setVariantId(template.getVariantId());\n return instance;\n }", "public SCondition(Node node) {\n super(node);\n }", "Build_Model() {\n\n }", "public AirConditioner()\n\t{\n\t\tinit();\n\t}", "PriceModel createInstanceOfPriceModel();", "CsticModel createInstanceOfCsticModel();", "public Condition getCondition() {\n return condition;\n }", "@Override\n\tpublic Condition convertToCondition() {\n\t\tRelation r = (type == EffectType.DISCARD)? Relation.UNEQUAL : Relation.EQUAL;\n\t\treturn new TemplateCondition(labelTemplate, valueTemplate, r);\n\t}", "public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);", "public static Condition createCondition(Patient patient, Encounter encounter, String conditionTypeCode,\n String conditionTypeDisplay, String date){\n // Create a condition object\n Condition condition = new Condition();\n\n // Set Identifier of the condition object\n condition.addIdentifier()\n .setSystem(\"http://www.kh-uzl.de/fhir/condition\")\n .setValue(UUID.randomUUID().toString());\n\n // Set clinical status of the condition\n condition.setClinicalStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"active\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-clinical\")\n .setDisplay(\"Active\")));\n\n // Set verification status of the condition\n condition.setVerificationStatus(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(\"confirmed\")\n .setSystem(\"http://terminology.hl7.org/CodeSystem/condition-ver-status\")\n .setDisplay(\"Confirmed\")));\n\n // Set Identification of the condition, problem or diagnosis\n condition.setCode(new CodeableConcept()\n .addCoding(new Coding()\n .setCode(conditionTypeCode)\n .setSystem(\"http://snomed.info/sct\")\n .setDisplay(conditionTypeDisplay)));\n\n // Set reference to a patient, that the condition belongs to\n condition.setSubject(new Reference()\n .setIdentifier(patient.getIdentifierFirstRep())\n .setReference(patient.fhirType() + \"/\" + patient.getId()));\n\n // Set reference to an encounter, the condition was part of\n condition.setEncounter(new Reference()\n .setIdentifier(encounter.getIdentifierFirstRep())\n .setReference(encounter.fhirType() + \"/\" + encounter.getId()));\n\n // Set date when the condition was first recorded\n condition.setRecordedDateElement(new DateTimeType(date));\n\n return condition;\n }", "public static ProductVariantBuilder builder(final ProductVariant template) {\n return ProductVariantBuilder.of(template);\n }", "private Variant setVariantsFromApi(VariantsModel variantsModel, Long id, Long productID) {\n return new Variant(id,\n variantsModel.getId(),\n productID,\n variantsModel.getColor(),\n variantsModel.getSize(),\n variantsModel.getPrice()\n );\n }", "public Logic() {\n }", "public AdvConditionParser()\n{\n //nothing to do\n}", "@Override\r\n protected void initModel() {\n model = new Sphere(\"projectil Model\", 5, 5, 0.2f);\r\n model.setModelBound(new BoundingBox());\r\n model.updateModelBound();\r\n }", "InstanceModel createInstanceOfInstanceModel();", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public RecipeCondition(String recipeKey) {\n this.recipeKey = recipeKey;\n }", "private JComboBox getCondition() {\n\t\tif (condition == null) {\n\t\t\tcondition = new JComboBox();\n\t\t\tcondition.setModel(new DefaultComboBoxModel(new String [] {\"<\", \"=\", \">\"}));\n\t\t\tcondition.setSelectedIndex(1);\n\t\t\t\n\t\t}\n\t\treturn condition;\n\t}", "public Cond newCond() {\n return new Cond();\n }", "com.google.protobuf.ByteString getConditionBytes();", "OclExpression getCondition();", "public CarVo(String band, int size) {\n this.band = band;\n this.size = size;\n }", "protected FilterCondition(final FilterCondition rhs) {\n }", "public Carmodel() {\n this(\"CarModel\", null);\n }", "@DISPID(17)\n\t// = 0x11. The runtime will prefer the VTID if present\n\t@VTID(28)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject conditionFactory();", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public PromotionVoucherModel()\n\t{\n\t\tsuper();\n\t}", "protected VendorCheck createVendorCheck() {\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(new Long(99999));\r\n return vendorCheck;\r\n }", "public void initialize(Model model){\r\n\t\tArrayList<String> elements = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < model.getElements().size(); i++){\r\n\t\t\telements.add(model.getElements().get(i).getId());\r\n\t\t}\r\n\t\t\r\n\t\tFeature base = new Feature(\"base\", \"mandatory\", \"root\", elements);\r\n\t\tthis.mandatoryFeatures.add(base);\r\n\t\tFeatureGroup variants = new FeatureGroup(\"variants\", \"alternative\", \"root\");\r\n\t\tthis.alternativeFeatureGroup.add(variants);\r\n\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newVariant = new Feature(model.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t}", "public static ProductVariantBuilder builder() {\n return ProductVariantBuilder.of();\n }", "public Vehicle(int year, String make, String model, BigDecimal msrp) {\n\t\tthis.year = year; \n\t\tthis.make = cleanMake(make);\n\t\tthis.model = cleanModel(model);\n\t\tthis.msrp = msrp; \n\t}", "@Override\n\tpublic void create(ConditionalCharacteristicSpecification acs) {\n\n\t}", "public SimilarProduct build() {\n return new SimilarProductImpl(product, variantId, meta);\n }", "public Object getCondition();", "public Product(String productName, ProductCondition productCondition, String productCode, int stockLevel) {\n this.productName = productName;\n this.productCondition = productCondition;\n this.productCode = productCode;\n this.stockLevel = stockLevel;\n }", "@Override\n public Wrapper<Brand> buildConditions() {\n return null;\n }", "public String getCondition() {\n return condition;\n }", "public String getCondition() {\n\treturn condition;\n}", "protected Condition parseSequenceFlowCondition(XmlElement seqFlowElement) {\n\n XmlElement conditionExprElement = seqFlowElement.getElement(\"conditionExpression\");\n\n if (conditionExprElement == null) {\n return null;\n }\n\n String expression = conditionExprElement.getText().trim();\n // Condition expressionCondition = new CheckVariableTrueCondition(expression);\n Condition expressionCondition = new JuelExpressionCondition(expression);\n return expressionCondition;\n }", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public NotCondition() {\r\n\t\tsuper();\r\n\t}", "CsticGroupModel createInstanceOfCsticGroupModel();", "public WeightingModel(){}", "public DynamicModelPart build() {\n return this.rotateModelPart(this.rotation).addCuboids();\n }", "public ConditionerTemplate newConditionerBase(String name, String description, String category)\n\t{\n\t\tConditionerTemplate cb = new ConditionerTemplate(name, description, category);\n\t\treturn cb;\n\t}", "@Override\r\n public VizModels create(String name, Model source) throws SlotAlreadyRegisteredException {\n StyleSetModel palette =\r\n StyleSetFactory.prototype.create(\r\n name + \"style palette\",\r\n SimpleExplicitSlotFactory.prototype);\r\n\r\n // Create the attribute model for the ForestModel\r\n PredicateModel predModel = SimplePredicateViewFactory.prototype.create(name + \"fa\", source);\r\n predModel =\r\n StyledPredicateViewFactory.prototype.configure(\r\n predModel,\r\n palette,\r\n SimpleSlotFactory.prototype);\r\n\r\n // Init Visibility Model for nodes in the Forest\r\n VisibilityModel visModel =\r\n PredicateBasedVisibilityViewFactory.prototype.create(\r\n name + \"Viz Model\",\r\n source,\r\n predModel);\r\n \r\n VizModels vm = new VizModels();\r\n vm.init(palette, predModel, visModel);\r\n return vm;\r\n }", "public Condition(Compendium compendium) {\n\t\tgrn_ = compendium.getGrn();\n\t\tcompendium_ = compendium;\n\t}", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "public Vehicle(String vin, VehicleType vehicleType, String model, Double amount) {\r\n if (vin == null || vin.length() < 1 || vin.length() > 17 || vehicleType == null || model == null || model.length() < 1 || amount < 0) {\r\n throw new RuntimeException(\"Constructor Vehicle: insertion not valid.\");\r\n }\r\n this.vin = vin;\r\n this.vehicleType = vehicleType;\r\n this.model = model;\r\n this.amount = amount;\r\n }", "io.grpc.user.task.PriceCondition getCondition();", "SystemParamModel createSystemParamModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();" ]
[ "0.64135975", "0.6255076", "0.59978634", "0.59540504", "0.5931892", "0.5816871", "0.5779516", "0.56628215", "0.56506777", "0.56427026", "0.555005", "0.5524201", "0.5506605", "0.5465134", "0.5392762", "0.5371446", "0.536557", "0.5326111", "0.5280561", "0.523718", "0.5228593", "0.52208424", "0.5207636", "0.51493925", "0.5142237", "0.5133384", "0.50995535", "0.50952727", "0.5092418", "0.5084304", "0.5084304", "0.50617474", "0.5040546", "0.49948728", "0.49904275", "0.49852455", "0.49800298", "0.49787104", "0.49753866", "0.4974583", "0.4934994", "0.4933957", "0.4930794", "0.49276257", "0.4924721", "0.49207324", "0.49207214", "0.49077332", "0.48992172", "0.48947516", "0.4883197", "0.48798293", "0.48786524", "0.48751518", "0.4862669", "0.48495722", "0.48461816", "0.48419604", "0.48400396", "0.482557", "0.48227146", "0.48142073", "0.47986606", "0.47916108", "0.4785738", "0.47671515", "0.47662565", "0.47405732", "0.47148204", "0.4714817", "0.47024986", "0.47018567", "0.47017193", "0.46880853", "0.4683825", "0.46694824", "0.46683577", "0.46668962", "0.46486095", "0.46479443", "0.46464404", "0.46417576", "0.46322647", "0.46260223", "0.45900342", "0.45786747", "0.45666143", "0.45606136", "0.45600632", "0.45595154", "0.45594707", "0.45517242", "0.45491672", "0.45487216", "0.45487216", "0.45487216", "0.45487216", "0.45487216", "0.45487216", "0.45487216" ]
0.8548586
0
TODO Autogenerated method stub
@Override public List<Player> getPlayersByAge(int age) throws BusinessException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Player> getPlayersByCity(String city) throws BusinessException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Player> getPlayersByGender(String gender) throws BusinessException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Command)) { return false; } Command other = (Command) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
Returns the expected keyword.
public org.eclipselabs.simpleocl.resource.simpleocl.grammar.SimpleoclSyntaxElement getSymtaxElement() { return keyword; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getKeyword();", "String getKeyword();", "public java.lang.String getKeyword()\n {\n return keyword;\n }", "public String getKeyword() {\r\n return keyword;\r\n }", "public String getKeyword() {\n return keyword;\n }", "public String getExpected() {\n return expected;\n }", "public String getKeyword() {\n return keyword; \n }", "public String getKeyword()\n {\n switch (keywordType)\n {\n case ASTokenTypes.TOKEN_KEYWORD_FUNCTION:\n return IASKeywordConstants.FUNCTION;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_EXTENDS:\n return IASKeywordConstants.EXTENDS;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_IMPLEMENTS:\n return IASKeywordConstants.IMPLEMENTS;\n \n case ASTokenTypes.TOKEN_KEYWORD_VAR:\n return IASKeywordConstants.VAR;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_GET:\n return IASKeywordConstants.GET;\n \n case ASTokenTypes.TOKEN_RESERVED_WORD_SET:\n return IASKeywordConstants.SET;\n \n case ASTokenTypes.TOKEN_KEYWORD_NEW:\n return IASKeywordConstants.NEW;\n \n case ASTokenTypes.TOKEN_KEYWORD_CONST:\n return IASKeywordConstants.CONST;\n \n case ASTokenTypes.TOKEN_KEYWORD_CLASS:\n return IASKeywordConstants.CLASS;\n \n case ASTokenTypes.TOKEN_KEYWORD_INTERFACE:\n return IASKeywordConstants.INTERFACE;\n \n case ASTokenTypes.TOKEN_DIRECTIVE_DEFAULT_XML:\n return IASKeywordConstants.DEFAULT_XML_NAMESPACE;\n }\n\n assert false : \"Unknown keyword type \" + keywordType;\n return \"\";\n }", "public String getKeyword() {\n return (String)getAttributeInternal(KEYWORD);\n }", "private String keywordFound(){\r\n\t\tString rtn = \"\";\r\n\t\tString tmp = \"\";\r\n\t\tint carr_pos = getCaretPosition();\r\n\t\t//estract part of text for keyword search\r\n\t\ttry { \r\n\t\tif(carr_pos>50)\r\n\t\t\ttmp = doc.getText(carr_pos-50,50);\r\n\t\telse\r\n\t\t\ttmp = doc.getText(0,carr_pos);\r\n\t\t}catch(BadLocationException a){\r\n\t\t\tSystem.out.println(\"exception\");\r\n\t\t\treturn rtn;\r\n\t\t};\r\n\t\t//Start check\r\n\t\tint i = 0;\r\n\t\tif(tmp.length() >= 2)i = tmp.length()-2;\t\r\n\t\twhile(checkOperator(tmp.charAt(i)) && i > 0){\r\n\t\t\trtn += tmp.charAt(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t\tif(i == 0)rtn += tmp.charAt(i);\t\t\r\n\t\treturn mirrorString(rtn);\r\n\t}", "public String getKeyword()\r\n {\r\n return this.keyword;\r\n }", "public String getKeyword() {\n return this.keyword;\n }", "public java.lang.String getKeyword() {\n java.lang.Object ref = keyword_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n keyword_ = s;\n }\n return s;\n }\n }", "public abstract boolean isKeyword();", "public java.lang.String getKeyword() {\n java.lang.Object ref = keyword_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n keyword_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "boolean hasKeyword();", "public String getKeywordValue(String keywordName) {\n/* 382 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void keywordSearchTest() throws InterruptedException {\n SearchNavigation.gotoSearchResultsPage(index,\"\\\"\"+exact_searchTerm+\"\\\"\");\n System.out.println(AssistanceListingSearchPage.title());\n assertEquals(\"Assistance Title does not match with Search term\",AssistanceListingSearchPage.title(), exact_searchTerm);\n }", "public void testFindByKeyword() {\n }", "@Test\r\n public void testGetKeyword() throws Exception {\r\n LOG.info(\"getKeyword\");\r\n Keyword result = tmdb.getKeyword(ID_KEYWORD);\r\n assertEquals(\"fight\", result.getName());\r\n }", "@Override\n public String getKeyword() {\n return null;\n }", "@Override\n public String getKeyword() {\n return null;\n }", "public static String getKeyword(String input) throws MissingKeywordException{\n String[] strArr = input.split(\" \", 2);\n if (strArr.length < 2) {\n Ui.showWarningMissingKeyword();\n Response.showWarningMissingKeyword();\n throw new MissingKeywordException();\n } else {\n return strArr[1];\n }\n }", "@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }", "public static String getDisplayKeyword(String keyword) {\n/* 694 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract boolean isKeyword(@Nullable String text);", "public KEYWORD keyWord(){\n\n if (currentTokenType == TYPE.KEYWORD){\n\n return keyWordMap.get(currentToken);\n\n }else {\n\n throw new IllegalStateException(\"Current token is not a keyword!\");\n }\n }", "com.google.protobuf.ByteString\n getKeywordBytes();", "public String getDisplayKeywordValue(String keyword) {\n/* 723 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public com.google.protobuf.ByteString\n getKeywordBytes() {\n java.lang.Object ref = keyword_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n keyword_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getKeywordBytes() {\n java.lang.Object ref = keyword_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n keyword_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Test\n\tpublic void testSearchResultUsingValidKeyword() {\n\t\tString keyword = \"Dress\";\n\n\t\t// The expected result\n\t\tString expected = \"\\\"\" + keyword.toUpperCase() + \"\\\"\";\n\n\t\t// Find the Search box element by its name\n\t\telement = driver.findElement(By.name(\"search_query\"));\n\n\t\t// Enter keyword to search for\n\t\telement.sendKeys(keyword);\n\n\t\t// Now submit the form\n\t\telement.submit();\n\n\t\t// Find the Search result\n\t\telement = driver.findElement(By.className(\"lighter\"));\n\n\t\t// Get the text from Search result\n\t\tString actual = element.getText();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}", "private int scoreFor(String keyword) {\n return keyword.length();\n }", "boolean isKeywordExact() {\n return exactRadioButton.isSelected();\n }", "public String getExpect() {\n return expect;\n }", "public boolean isKeyword(String keyword) {\n return this.keyword.equals(keyword); \n }", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\r\n\t\t\tpublic boolean hasKeyword(String name) {\n\t\t\t\treturn false;\r\n\t\t\t}", "public String findKeywordFromString(String command) {\n // Split String command to find the intention of the user (first word)\n String[] commandWords = command.split(\"\\\\s\");\n return commandWords[0];\n }", "public static Keywords getKeyword(String s) {\n \tKeywords keyword = keywords.get(s.toLowerCase());\n \tif(keyword == null) {\n \t\treturn Keywords.ERROR;\n \t}\n \treturn keyword;\n }", "Keyword findKeywordByName(String name);", "@Disabled\n @Test void testKeywords() {\n final String[] reserved = {\"AND\", \"ANY\", \"END-EXEC\"};\n final StringBuilder sql = new StringBuilder(\"select \");\n final StringBuilder expected = new StringBuilder(\"SELECT \");\n for (String keyword : keywords(null)) {\n // Skip \"END-EXEC\"; I don't know how a keyword can contain '-'\n if (!Arrays.asList(reserved).contains(keyword)) {\n sql.append(\"1 as \").append(keyword).append(\", \");\n expected.append(\"1 as `\").append(keyword.toUpperCase(Locale.ROOT))\n .append(\"`,\\n\");\n }\n }\n sql.setLength(sql.length() - 2); // remove ', '\n expected.setLength(expected.length() - 2); // remove ',\\n'\n sql.append(\" from t\");\n expected.append(\"\\nFROM t\");\n sql(sql.toString()).ok(expected.toString());\n }", "private Keyword basicType()\r\n {\r\n Keyword x = Keyword.NONESY;\r\n\r\n if (typeKW.contains(nextSymbol))\r\n {\r\n x = nextSymbol;\r\n lookAhead();\r\n }\r\n\r\n return x;\r\n }", "private boolean isKeyword(String value) {\n return Keywords.isKeyword(value);\n }", "@Override\n public String getExpectedInputName() {\n return \"tokens input\";\n }", "public String getSearchKeyword() {\n return SharedPrefsUtils.getStringPreference(application.getApplicationContext(), \"KEY\");\n }", "public final boolean isExpected () {\n return expected;\n }", "@Test\n\tpublic void testSearchResultUsingEmptyKeyword() {\n\t\tdriver.get(\"http://automationpractice.com\");\n\n\t\t// The expected result\n\t\tString expected = \"Please enter a search keyword\";\n\n\t\t// Find the Search button element by its name\n\t\telement = driver.findElement(By.name(\"submit_search\"));\n\n\t\t// Perform click event\n\t\telement.click();\n\n\t\t// Find the Search result\n\t\telement = driver.findElement(By.className(\"alert-warning\"));\n\n\t\t// Get the text from Search result\n\t\tString actual = element.getText();\n\n\t\t// Compare the expected VS actual result\n\t\tAssert.assertEquals(expected, actual);\n\t}", "public DescriptionBuilder setExpected(String expectedContent) {\n descriptor.setExpected(expectedContent);\n return this;\n }", "@Test\r\n public void testSearchKeyword() throws Exception {\r\n LOG.info(\"searchKeyword\");\r\n String query = \"action\";\r\n int page = 0;\r\n List<Keyword> result = tmdb.searchKeyword(query, page);\r\n assertFalse(\"No keywords found\", result == null);\r\n assertTrue(\"No keywords found\", result.size() > 0);\r\n }", "@SuppressWarnings ({\"ConstantConditions\"})\n private int getKeyword(String line, String key) {\n boolean inq1 = false;\n boolean inq2 = false;\n boolean invar = false;\n int keylen = key.length();\n int endch = line.length() - keylen;\n\n for (int i = _endChar; i < endch; i++) {\n char ch = line.charAt(i);\n\n if (ch == _constants.SINGLE_QUOTE_CHAR && !inq2 && !invar) {\n inq1 = !inq1;\n } else if (ch == _constants.DOUBLE_QUOTE_CHAR && !inq1 && !invar) {\n inq2 = !inq2;\n } else if (ch == _constants.USERVAR_CHAR && !inq1 && !inq2) {\n invar = !invar;\n } else if (ch == ' ' && !inq1 && !inq2 && !invar) {\n if (line.startsWith(key, i + 1)) {\n if (line.charAt(i + 1 + keylen) == ' ') {\n return i + 1; // Found it!\n }\n }\n }\n }\n\n return -1; // Nope, not there\n }", "@Test \r\n public void shouldFindOneWordAtTheEnd() {\r\n \r\n String inputWord = \"bxxxxxxxe\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"be\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n \r\n assertEquals(\"be\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean containsWord(String keyword){\n /* to be implemented in part(b) */\n if(description.indexOf(\" \"+ keyword+ \" \")!==-1){\n return true; \n }\n else if(description.indexOf(\" \"+keyword)=0){\n return true \n }\n else return false;\n }", "@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul Brown Stadium location\");\n\t\t//manager.keywordQuery(\"0Francesco\");\n System.out.println(\"******* keyword query *******\");\n\t\t//manager.keywordQuery(\"sportspeople in tennis\");\n\t\t//manager.keywordSearch(\"list of movies starring Sean Connery\",ElasticIndex.analyzed,100 );\n//\t\tmanager.keywordSearch(\"movies starring Sean Connery\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"musical movies tony award\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"United states professional sports teams\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"movies academy award nominations\",ElasticIndex.notStemmed,100 );\n System.out.println(SearchResultUtil.toSummary(manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.notLowercased,20 )));\n //manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notAnalyzed,100 );\n //(better than analyzed) manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notStemmed,100 );\n System.out.println(\"*****************************\");\n\n\t\t//manager.keywordQuery(\"Disney movies\");\n\t}", "boolean hasKeywordPlan();", "@Test\n\tpublic void testAddKeyword01() {\n\t\tKeywordSet result = new KeywordSet()\n\t\t\t.withKeyword(new Keyword().withContent(\"keyword1\"))\n\t\t\t.withKeyword(new Keyword().withContent(\"keywordTwo\"), \n\t\t\t\t\tnew Keyword().withContent(\"keywordIII\"));\n\t\tassertThat(((String)result.getKeyword().get(0).getContent().get(0)), is(\"keyword1\"));\n\t\tassertThat(((String)result.getKeyword().get(1).getContent().get(0)), is(\"keywordTwo\"));\n\t\tassertThat(((String)result.getKeyword().get(2).getContent().get(0)), is(\"keywordIII\"));\n\t}", "public boolean hasKeyword() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public int getKeywordId()\n {\n return keywordType;\n }", "public long getExpectedStart() {\n return this.expectedStart;\n }", "@Override\r\n public String getExpectedCompletion() {\n return this.bachelorCompletion;\r\n }", "public static String getKeywordValue(String localeID, String keywordName) {\n/* 391 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean checkFirstKeyword(String strKeyword) {\n return strKeyword.contains(keywords[0]);\n }", "public java.lang.String getExpectedOutcome() {\n return expectedOutcome;\n }", "boolean hasKeywordPlanCampaignKeyword();", "@Test\n public void testSpinNoneWord() {\n final String actualResult = kata4.spinWord(\"This is a test\");\n final String expectedResult = \"This is a test\";\n assertEquals(expectedResult, actualResult);\n }", "@Test\n\tpublic void testFunctionKeyword()\n\t{\n\t\tth.addError(1, 1, \"Missing name in function declaration.\");\n\t\tth.addError(1, 1, \"Expected '(' and instead saw ''.\");\n\t\tth.addError(1, 1, \"Unrecoverable syntax error. (100% scanned).\");\n\t\tth.test(\"function\");\n\t}", "public String getExactly() {\n return exactly;\n }", "protected void testKeywords(Model model, int nkeywords) throws Exception {\n\t\tString sparqlQuery = String.format(\"SELECT ?investigation ?keyword where { ?investigation <%s> ?keyword.\\n ?investigation <%s> <%s> } \\n\",\n\t\t\t\tTOXBANK.HASKEYWORD.getURI(),\n\t\t\t\tRDF.type.getURI(),\n\t\t\t\tISA.Investigation.getURI());\n\t\tQuery query = QueryFactory.create(sparqlQuery);\n\t\tQueryExecution qe = QueryExecutionFactory.create(query,model);\n\t\tResultSet rs = qe.execSelect();\n\t\tint n = 0;\n\t\twhile (rs.hasNext()) {\n\t\t\tQuerySolution qs = rs.next();\n\t\t\t//RDFNode node = solution.get(vars.get(i));\n\t\t\tLiteral keyword = qs.getLiteral(\"keyword\");\n\t\t\tAssert.assertTrue(keyword.getString().startsWith(ISA.TBKeywordsNS));\n\t\t\tn++;\n\t\t}\n\t\tqe.close();\n\t\tAssert.assertEquals(nkeywords,n);\n\t}", "public int getIndexExpected() {\n return indexExpected;\n }", "public Long getKeywordId() {\r\n return keywordId;\r\n }", "public String getKeywords()\r\n {\r\n return (m_keywords);\r\n }", "public void test_extractKeyphrase_A$String() throws Exception {\n\t\tYahooAuctionService target = new YahooAuctionService();\r\n\t\tString text = \"せどり初心者は中古と新品ではどちらが向いているか?\";\r\n\t\tList<String> actual = target.extractKeyphrase(text);\r\n\t\tList<String> expected = null;\r\n\t\tassertEquals(expected, actual);\r\n\t}", "public String findKeyword(String[] keywords, ParsingContext context)\r\n\t{\r\n\t\tString line = context.getCurrentLine();\r\n\t\tif (line == null)\r\n\t\t\treturn null;\r\n\t\tline = line.toUpperCase();\r\n\t\tfor (String keyword : keywords)\r\n\t\t{\r\n\t\t\tif (line.startsWith(keyword))\r\n\t\t\t{\r\n\t\t\t\treturn keyword;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getFindKeywords() {\n return getString(CommandProperties.FIND_KEYWORDS);\n }", "public String getBase()\r\n {\r\n return BASE_KEYWORD;\r\n }", "protected Expression analyzeCondition() throws AnalysisException {\n final var condition = analyzeExpression();\n assertKeyWord(ScriptBasicKeyWords.KEYWORD_THEN);\n return condition;\n }", "protected String expectedFor( String resource)\n {\n return resource + \"-Expected\";\n }", "@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }", "public String getKeff() {\r\n if (isSetKeff()) {\r\n return getAttribute(MEConstants.keff);\r\n }\r\n return \"\";\r\n }", "public String getKeywords() {\n return keywords;\n }", "public String getKeywords() {\n return keywords;\n }", "public String getKeywords() {\n return keywords;\n }", "public Map<String, ExpectedAttributeValue> getExpected() {\n return expectedAttributes;\n }", "public void setKeyword(String keyword) {\r\n this.keyword = keyword;\r\n }", "public String getKeywords() {\n return getProperty(Property.KEYWORDS);\n }", "public void setKeyword(String keyword) {\n this.keyword = keyword;\n }", "public boolean containsKeyword(String keyword) {\n String lcKeyword = keyword.toLowerCase();\n String lcDescription = description.toLowerCase();\n return lcDescription.contains(lcKeyword);\n }", "public void assertTextPresent(String expected, String actual) {\n if ( (actual==null)\n || (actual.indexOf(expected)==-1)\n ) {\n throw new AssertionFailedError(\"expected presence of [\"+expected+\"], but was [\"+actual+\"]\");\n }\n }", "public String getExpectedFileName() {\n\t\treturn this.expectedFileName;\n\t}", "public void testTIERCED3() throws Exception {\n\t\tObject retval = execLexer(\"TIERCED\", 83, \"blah\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"TIERCED\", expecting, actual);\n\t}", "public String getExpectedSalary() {\n\t\treturn expectedSalary;\n\t}", "private boolean matchedKeyword(String keyword, String[] tokens) {\n\t\tfor (int i = 0; i < tokens.length; i++)\n\t\t\tif (keyword.equalsIgnoreCase(tokens[i]))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "boolean isNotKeyWord(String word);", "public static int getKeywordSize()\r\n\t{\r\n\t\treturn keywords.size();\r\n\t}", "public void testMETAL3() throws Exception {\n\t\tObject retval = execLexer(\"METAL\", 130, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"METAL\", expecting, actual);\n\t}", "public void assertTextPresentIgnoreCase(String expected, String actual) {\n assertTextPresent(expected.toLowerCase(), actual.toLowerCase());\n }", "public KeywordException() {\n super(MESSAGE);\n }" ]
[ "0.68852097", "0.66106194", "0.6406561", "0.6363998", "0.63047886", "0.62977576", "0.62812084", "0.62223464", "0.62188095", "0.62144077", "0.6180616", "0.6056496", "0.60166353", "0.59923553", "0.59642255", "0.58799344", "0.58696693", "0.58537644", "0.57591283", "0.57145905", "0.56757146", "0.56479084", "0.56479084", "0.5644064", "0.5563381", "0.5551479", "0.55338085", "0.55049074", "0.54815686", "0.5443956", "0.5433335", "0.5373391", "0.5354121", "0.5346467", "0.53412914", "0.5293029", "0.528452", "0.5275118", "0.5275118", "0.5275118", "0.52604467", "0.525617", "0.5244225", "0.5225087", "0.5204775", "0.5198122", "0.5167546", "0.51647395", "0.5151254", "0.5132603", "0.51323956", "0.51021355", "0.50992584", "0.5069171", "0.5065989", "0.50653857", "0.50503147", "0.5032737", "0.50139844", "0.5012858", "0.5007617", "0.4987736", "0.49768674", "0.49588442", "0.49571797", "0.49412787", "0.4936779", "0.49272627", "0.4926647", "0.49233896", "0.49225867", "0.49221414", "0.4916362", "0.49116266", "0.48995057", "0.48762226", "0.48651955", "0.4856378", "0.48525453", "0.48521265", "0.4848295", "0.48435324", "0.48344326", "0.48344326", "0.48344326", "0.4831336", "0.48262843", "0.48225376", "0.4797041", "0.47967732", "0.47866648", "0.47720346", "0.47661015", "0.4764465", "0.47614285", "0.47526985", "0.47315666", "0.47299382", "0.4728069", "0.47263992" ]
0.48700896
76
current distance from the root
private void indent(StringBuffer output, Node node) { output.append("\n"); String lineNumber = (node == null) ? "" : "[" + node.getLine() + "]"; output.append(String.format("%5s ", lineNumber)); for (int i = 0; i < depth; ++i) output.append(" "); output.append("+-- "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getFinalDistance(){\n return valori.get(end_node);\n }", "double getDistance();", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "public double distance(){\n return DistanceTraveled;\n }", "public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}", "public double getDistance()\n {\n return Math.abs(getDifference());\n }", "public int distance() {\n return distance;\n }", "public float getDistance();", "public double distance() {\n return distance;\n }", "public double distance() {\n return distance;\n }", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "public double getDist(){\n double dist=0;\n double DA = 0;\n double minDist = this.getMotors()[0].getTargetPosition();\n for(int i =0;i<this.getMotors().length;i++) {\n double current = this.getMotors()[i].getCurrentPosition();\n double target = this.getMotors()[i].getTargetPosition();\n DA = Math.abs(target) - Math.abs(current);\n dist = target - current;\n if(Math.abs(DA)<Math.abs(minDist)){\n minDist = dist;\n }\n }\n return (minDist);\n }", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "public int getTotalDistance() {\n return totalDistance;\n }", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = distance(vertex1, vertex2);\n \t}\n \n \treturn dist;\n }", "public double getDist() {\n return distance;\n }", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public double getDistance () {\n return distance;\n }", "public double getDistance(){\n\t\treturn this.distance;\n\t}", "public double getDistance() {\n return distance;\n }", "public double getDistance() {\n\t\treturn distance;\n\t}", "public double getDistance() {\n\t\treturn distance;\n\t}", "double treeNodeTargetFunctionValue(){\n\t\t\t//loop counter variable\n\t\t\tint i;\n\t\t\t\n\t\t\t//stores the cost\n\t\t\tdouble sum = 0.0;\n\n\t\t\tfor(i=0; i<this.n; i++){\n\t\t\t\t//stores the distance\n\t\t\t\tdouble distance = 0.0;\n\n\t\t\t\t//loop counter variable\n\t\t\t\tint l;\n\n\t\t\t\tfor(l=0;l<this.points[i].dimension;l++){\n\t\t\t\t\t//centroid coordinate of the point\n\t\t\t\t\tdouble centroidCoordinatePoint;\n\t\t\t\t\tif(this.points[i].weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l] / this.points[i].weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinatePoint = this.points[i].coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\t//centroid coordinate of the centre\n\t\t\t\t\tdouble centroidCoordinateCentre;\n\t\t\t\t\tif(this.centre.weight != 0.0){\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l] / this.centre.weight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcentroidCoordinateCentre = this.centre.coordinates[l];\n\t\t\t\t\t}\n\t\t\t\t\tdistance += (centroidCoordinatePoint-centroidCoordinateCentre) * \n\t\t\t\t\t\t\t(centroidCoordinatePoint-centroidCoordinateCentre) ;\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tsum += distance*this.points[i].weight;\t\n\t\t\t}\n\t\t\treturn sum;\n\t\t}", "public float getDistance() {\r\n return distance;\r\n }", "public int getTotDistance(){\r\n\t \treturn this.totDistance;\r\n\t }", "public final float getDistance() {\n return distance;\n }", "public Vector3D getDistance()\n\t{\n\t\treturn distance;\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public float getDistance() {\n return distance;\n }", "public float getDistance() {\n return distance;\n }", "public int getMinDistance(){\n return totalDistance;\n }", "public double getDistance() {\r\n return this.distance;\r\n }", "double getDistanceInMiles();", "public int getDistance() {\n return distance;\n }", "public int getDistance() {\n return distance;\n }", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "double getDistance(Point p);", "public double getSpecificRootLength() {return specificRootLength;}", "public double getDistanceTotale() {\n\t\treturn distanceTotale;\n\t}", "public double calDistance()\n {\n double closest = poly[0].getD();\n\n for(int i = 1; i < sides; i++)\n {\n if(closest > poly[i].getD())\n {\n closest = poly[i].getD();\n }\n }\n this.distance = closest;\n\n return closest;\n }", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "public int distanceToCentral() {\n SubCell central = centralSubCellOf(containingCell());\n return Math.abs(this.x() - central.x())\n + Math.abs(this.y() - central.y());\n }", "public double getDistance() {\n return this.distance;\n }", "public int getDistance() {\n\t\treturn distance;\n\t}", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "public int getResult() {\n return Math.abs(greenLeafSum - nonLeafEvenDepthSum);\n }", "public float getDistance()\n {\n return distance_slider.getValue() / DISTANCE_SCALE_FACTOR;\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "double getSquareDistance();", "public float getDistance() {\n shouldUpdateDistance = true;\n if (shouldUpdateDistance) {\n distance = getDistance(createSuggestedWindowFilter());\n shouldUpdateDistance = false;\n }\n return distance;\n }", "public double getMaxDistance()\n\t{\n\t // Make sure it went some distance\n\t\tif(xPosList.size() > 0)\n\t\t{\n\t\t\treturn this.xPosList.get(xPosList.size() - 1);\n\t\t}\n\n\t\treturn 0;\n\t}", "private float getDistance(SXRNode object)\n {\n float x = object.getTransform().getPositionX();\n float y = object.getTransform().getPositionY();\n float z = object.getTransform().getPositionZ();\n return (float) Math.sqrt(x * x + y * y + z * z);\n }", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "public double calcDistance(Planet p){\n\t\treturn(Math.sqrt((this.xxPos-p.xxPos)*(this.xxPos-p.xxPos)\n\t\t\t+(this.yyPos-p.yyPos)*(this.yyPos-p.yyPos)));\n\t}", "public double getDistanceToTarget() {\n if (!Config.isVisionInstalled) {\n return 0;\n }\n double distanceToVisionTarget =\n Config.visionDistanceConstant * (Config.fieldVisionTargetHeight-Config.limelightMountingHeight) /\n Math.tan(Math.toRadians(limelight.getTy() + Config.limelightMountingAngle));\n\n //now we can convert the new values into a new distance\n return distanceToVisionTarget;\n }", "@Override\r\n public double getOriginDistance()\r\n {\r\n double distance=Math.sqrt(\r\n Math.pow(origin.getYCoordinate(), 2)+Math.pow(origin.getYCoordinate(), 2));\r\n return distance;\r\n }", "public double getDistance() {\n\t\tdouble sum = 0;\n\t\tfor(int i = 0; i < ordering.size() - 1; i++) {\n\t\t\tsum += cost[ordering.get(i) - 1][ordering.get(i+1) - 1];\n\t\t}\n\t\treturn sum;\n\t}", "double distance (double px, double py);", "Execution getClosestDistance();", "public double getStartingDistance() {\n return myStartDistance;\n }", "public abstract double distanceFrom(double x, double y);", "public Distance getDistance() {\n return distance;\n }", "public double getDragDistanceFromCursorPressedEvent() {\r\n\t\tif ((this.lastChangedEvent != null) && (this.lastPressedEvent != null)) {\r\n\t\t\treturn lastChangedEvent.getPosition().distance(\r\n\t\t\t\t\tlastPressedEvent.getPosition());\r\n\t\t}\r\n\r\n\t\treturn Double.NaN;\r\n\t}", "private double distanceResult(double preLng, double preLat, double nextLng, double nextLat) {\n\t\treturn Math.sqrt((preLng - nextLng) * (preLng - nextLng) + (preLat - nextLat) * (preLat - nextLat));\n\t}", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "public Dimension2D getDistance() {\n\t\treturn distance;\n\t}", "private int getDistanceEnd() {\n int lastPoint = getNumPoints() - 1;\n return getDistanceIndex(lastPoint) + lastPoint;\n }", "public static double totalDistance(ArrayList<Edge> tree) {\n double accumDistance = 0;\n \n \tfor (Edge e : tree) {\n \t\taccumDistance += e.distance();\n \t}\n \n \treturn accumDistance;\n }", "private int calcDistance()\n\t{\n\t\tint distance = 0;\n\n\t\t// Generate a sum of all of the difference in locations of each list element\n\t\tfor(int i = 0; i < listSize; i++) \n\t\t{\n\t\t\tdistance += Math.abs(indexOf(unsortedList, sortedList[i]) - i);\n\t\t}\n\n\t\treturn distance;\n\t}", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "public abstract double GetDistance();", "public double getClosestDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMin;\n\t\t}", "public double getDistanceFromSource()\n {\n return distanceFromSource;\n }", "public float getDistanceFromBirth() {\n double dx = location.x - birthLocation.x;\n double dy = location.y - birthLocation.y;\n return (float) Math.sqrt(dx * dx + dy * dy);\n }", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "private void getDistance() {\n\n float dist = 0;\n Location location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n while (location==null) { //If we don't know where we are right now\n Toast.makeText(this, \"No last known location. Aborting...\", \n Toast.LENGTH_LONG).show();\n location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }\n\n createPositions();\n\n dist = location.distanceTo(mPositions.get(0).toLocation());\n distanceList.add(dist);\n\n dist = mPositions.get(0).toLocation().distanceTo(mPositions.get(1).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(1).toLocation().distanceTo(mPositions.get(2).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(2).toLocation().distanceTo(mPositions.get(3).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(3).toLocation().distanceTo(mPositions.get(4).toLocation());\n distanceList.add(dist);\n \n }", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "public double getFurthermostDistance(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn distanceMax;\n\t\t}", "public double\ntValue(double distance)\n{\n\treturn (distance/this.length());\n}", "public double calculateValue() {\n if (!isLeaf && Double.isNaN(value)) {\n for (List<LatticeNode> list : children) {\n double tempVal = 0;\n for (LatticeNode node : list) {\n tempVal += ((CALatticeNode) node).calculateValue();\n }\n if (!list.isEmpty())\n value = tempVal;\n }\n }\n weight = Math.abs(value);\n return value;\n }", "double distance() {\r\n\t double dist_total = 0;\r\n\t for (int i = 0; i < index.length - 1; i++) {\r\n\t dist_total += city(i).distance(city(i + 1));\r\n\t }\r\n\t \r\n\t return dist_total;\r\n\t}", "public int height(){\n return height(root);\n }", "public double distance(double x, double y);", "public int findDistance(TreeNode root, int p, int q) {\n if (p == q) return 0;\n return dfs(root, p, q, 0);\n }", "public double calcDistance(Planet p){\n\t\t\tdouble dx = this.xxPos - p.xxPos;\n\t\t\tdouble dy = this.yyPos - p.yyPos;\n\t\treturn Math.sqrt(dx*dx + dy*dy);\n\t}", "public void calculateDistance() {\n SensorEventListener mSensorEventListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n mAngle = (Math.acos(sensorEvent.values[2] / 9.8)) * (180/Math.PI) - 5;\n mAngle = Math.toRadians(mAngle);\n mDistance = mHeight * Math.tan(mAngle);\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n mSensorManager.registerListener(mSensorEventListener, mAccelerometer,\n SensorManager.SENSOR_DELAY_UI);\n\n // Calculating the distance.\n mDistance = mHeight * Math.tan(mAngle);\n // Rounding it up to 2 decimal places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n mDistance = Double.valueOf(df.format(mDistance));\n String distanceString = Double.toString(mDistance);\n\n // Update the distance TextView\n TextView distanceView = (TextView) findViewById(R.id.distanceText);\n String text = distanceString + \" cm\";\n distanceView.setText(text);\n distanceView.setTextSize(36);\n }", "public int getDistance(){\n if (distance == 0) {\n int tourDistance = 0;\n // Loop through our tour's cities\n for (int cityIndex=0; cityIndex < tourSize(); cityIndex++) {\n // Get city we're travelling from\n City fromCity = getCity(cityIndex);\n // City we're travelling to\n City destinationCity;\n // Check we're not on our tour's last city, if we are set our \n // tour's final destination city to our starting city\n if(cityIndex+1 < tourSize()){\n destinationCity = getCity(cityIndex+1);\n }\n else{\n destinationCity = getCity(0);\n }\n // Get the distance between the two cities\n tourDistance += fromCity.distanceTo(destinationCity);\n }\n distance = tourDistance;\n }\n return distance;\n }", "public int getClientViewDistance ( ) {\n\t\treturn extract ( handle -> getClientViewDistance ( ) );\n\t}", "public double calcDistance(Planet p){\n\t\tdouble dx = p.xxPos - this.xxPos;\n\t\tdouble dy = p.yyPos - this.yyPos ;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\n\t}", "public double calcDistance(Planet p){\n\t\tdouble dx=-(xxPos-p.xxPos);\n\t\tdouble dy=-(yyPos-p.yyPos);\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "private static int calculateEuclidianDistance(Node actualNode, Node targetNode)\n\t{\n\t\t\n\t\treturn (int)Math.sqrt(Math.pow((actualNode.getRow() - targetNode.getRow()), 2) +\n\t\t\t\t\tMath.pow((actualNode.getColumn() - targetNode.getColumn()), 2));//distance*(int)Math.sqrt(dx+dy);\n\t}", "public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}", "public int height() { return height(root); }", "public float getDistanceTo(DoGMaximum target)\n \t{\n \t\tif (target == null)\n \t\t\treturn Float.NaN;\n \t\t\n \t\tfloat difference = 0;\n \t\t\n\t\tdifference += Math.pow(this.x - target.x,2); \n\t\tdifference += Math.pow(this.y - target.y,2);\n\t\tdifference += Math.pow(this.z - target.z,2);\n\t\tdifference += Math.pow(this.sigma - target.sigma,2); \t\t\n \t\t\n\t\treturn (float)Math.sqrt(difference);\n \t}", "public double distance(Node b) {\n return distance(b.getCords());\n }", "public float distanceToTarget(Vector2 target) {\r\n\t\tdouble underRoot = Math.pow(target.y() - position.y(), 2) + Math.pow(target.x() - position.x(), 2);\r\n\t\treturn (float)Math.sqrt(underRoot);\r\n\t}", "public double getMinimumDistance() { return minDistance; }", "public double length() {\n\t\tdouble length = 0;\n\t\tif (isEmpty())\n\t\t\treturn 0;\n\t\tjava.util.ListIterator<PathPoint> it = listIterator();\n\t\tPathPoint current = it.next();\n\t\twhile (it.hasNext()) {\n\t\t\tPathPoint next = it.next();\n\t\t\tlength += mc.distance3d(current.getLocation(), next.getLocation());\n\t\t\tcurrent = next;\n\t\t}\n\t\treturn length;\n\t}", "public float distanceToMouse() { \n PVector temp = new PVector(p.mouseX, p.mouseY);\n return pos.dist(temp);\n }" ]
[ "0.7226837", "0.6865376", "0.68082935", "0.6786897", "0.6757092", "0.67534983", "0.6728856", "0.6668097", "0.66679496", "0.66679496", "0.66451186", "0.66323155", "0.6620164", "0.6611005", "0.6589471", "0.65669984", "0.65294665", "0.6526256", "0.65165555", "0.6495537", "0.6466038", "0.6448957", "0.6448957", "0.64456886", "0.64439493", "0.6440699", "0.6417787", "0.6401687", "0.639677", "0.639677", "0.6392367", "0.6387058", "0.6383661", "0.6379815", "0.6379366", "0.63729995", "0.63729995", "0.63576007", "0.6351471", "0.633883", "0.6336886", "0.6336219", "0.6321772", "0.6307154", "0.6305321", "0.62829626", "0.62791884", "0.6275924", "0.624843", "0.6248091", "0.6229159", "0.6227442", "0.62235796", "0.62152135", "0.6210179", "0.6186953", "0.61839503", "0.61735463", "0.6168477", "0.61590165", "0.61563456", "0.61540794", "0.6149137", "0.6146879", "0.61405784", "0.61007166", "0.6076289", "0.60671896", "0.60544515", "0.6039192", "0.60334253", "0.6033422", "0.6033332", "0.60311115", "0.60309714", "0.6019335", "0.5996138", "0.5989345", "0.59841317", "0.5969081", "0.59553295", "0.5954065", "0.594043", "0.59361047", "0.5926095", "0.5921277", "0.5915051", "0.5912993", "0.5911894", "0.5905559", "0.590036", "0.5897831", "0.5896129", "0.58927315", "0.58915246", "0.5889655", "0.58576673", "0.585524", "0.5845207", "0.581782", "0.5816362" ]
0.0
-1
String str = "(u(love)i)";
public static void main(String[] args) { String str = "(ed(et(oc))el)"; // String str = "(abcd)"; str = "ta()usw((((a))))"; // //le(et(oc))de //le(etco)de // String[] arr = str.split("\\("); // System.out.println(Arrays.toString(arr)); Solution solution = new Solution(); System.out.println(solution.reverseParentheses(str)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String hackerSpeak(String str) {\n\n String replace = str.replace(\"a\", \"4\").replace(\"e\", \"3\").replace(\"i\", \"1\").replace(\"o\", \"0\").replace(\"s\", \"5\");\n return replace;\n }", "public static void main(String[] args) {\n\n \tString str = \"123abc你好efc\";\n\n \tString reg = \"[\\u4e00-\\u9fa5]\";\n\n \tPattern pat = Pattern.compile(reg); \n\n \tMatcher mat=pat.matcher(str); \n\n \tString repickStr = mat.replaceAll(\"\");\n\n \tSystem.out.println(\"去中文后:\"+repickStr);\n\n}", "private static String convertToLatin(String word)\n {\n return word.substring(1) + word.substring(0,1) + \"ay\";\n }", "String getWordIn(String schar, String echar);", "private String replaceUlauts(String str) {\n\t\treturn str.replace(\"ä\", \"ae\").replace(\"ö\", \"oe\").replace(\"ü\", \"ue\").replace(\"ß\", \"ss\").replace(\"Ä\", \"Ae\").replace(\"Ö\", \"Oe\").replace(\"Ü\", \"Ue\");\n\t}", "private static void printLatinWord(String s) {\n\t\tif (s.length() < 2|| !s.matches(\"\\\\w*\")) {\n\t\t\tSystem.out.print(s+\" \");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.print(s.replaceAll(\"(\\\\w)(\\\\w*)\", \"$2$1ay \"));\n\t}", "private static final String toExpr(String s) {\n\t\tchar[] b = s.toCharArray();\n\t\tint i;\n\t\tfor (i=0; (i<b.length) && Character.isLetter(b[i]); i++) ;\n\t\tif (i<b.length) return(\"(\" + s + \")\");\n\t\treturn(s) ;\t\t// Just letters\n\t}", "public static String translate_word_to_pig_latin(String word) {\r\n String new_word = word;\r\n int vowel_index = index_of_first_vowel(word);\r\n // Put starting consonant(s), if any, at the end of the word\r\n if(vowel_index > 0){\r\n new_word = word.substring(vowel_index) + word.substring(0, vowel_index);\r\n }\r\n\r\n // Add the ay to the end of all words\r\n new_word = new_word.concat(\"ay\");\r\n return new_word;\r\n }", "public static String shorthand(String s){\n \tif(s.toUpperCase().indexOf(\"YOU\")>=0){\n \t\ts=s.substring(0, s.toUpperCase().indexOf(\"YOU\"))+\" U \"+s.substring(s.toUpperCase().indexOf(\"YOU\")+3);\n \t\ts=shorthand(s);\n \t}else if(s.toUpperCase().indexOf(\"FOR\")>=0){\n \t\ts=s.substring(0, s.toUpperCase().indexOf(\"FOR\"))+\" 4 \"+s.substring(s.toUpperCase().indexOf(\"FOR\")+3);\n \t\ts=shorthand(s);\n \t}else if(s.toUpperCase().indexOf(\"AND\")>=0){\n \t\ts=s.substring(0, s.toUpperCase().indexOf(\"AND\"))+\" & \"+s.substring(s.toUpperCase().indexOf(\"AND\")+3);\n \t\ts=shorthand(s);\n \t}else if(s.toUpperCase().indexOf(\"TO\")>=0){\n \t\ts=s.substring(0, s.toUpperCase().indexOf(\"TO\"))+\" 2 \"+s.substring(s.toUpperCase().indexOf(\"TO\")+3);\n \t\ts=shorthand(s);\n \t}\n \treturn removeVowels(s);\n }", "public static String engToPig( String w ) {\r\n\tString result = \"\";\r\n\tif (w.substring(0,1).equals(\"y\")) {// if w begins with 'y'\r\n\t result = w.substring(1) + \"yay\";\r\n\t} \r\n\telse if (beginsWithVowel(w)) { //if w begins with a vowel\r\n\t result = w + \"way\"; //append way to w\r\n\t}\r\n else { //if w begins with consonant(s)\r\n\t result = w.substring(w.indexOf(firstVowel(w))) + w.substring(0,w.indexOf(firstVowel(w))) + \"ay\"; //take the first occurrence of a vowel, then the consonant(s) before that vowel, and add ay\r\n\t}\r\n if (beginsWithCapital(w)) {\r\n\t result = result.substring(0,1).toUpperCase() + result.substring(1).toLowerCase();\r\n\t}\r\n\tif (hasA(w,\".\")) {\r\n\t result = result.substring(0,result.indexOf(\".\")) + result.substring(result.indexOf(\".\") + 1) + \".\";\r\n\t }\r\n\tif (hasA(w,\",\")) {\r\n\t result = result.substring(0,result.indexOf(\",\")) + result.substring(result.indexOf(\",\") + 1) + \",\";\r\n\t }if (hasA(w,\"?\")) {\r\n\t result = result.substring(0,result.indexOf(\"?\")) + result.substring(result.indexOf(\"?\") + 1) + \"?\";\r\n\t }if (hasA(w,\"!\")) {\r\n\t result = result.substring(0,result.indexOf(\"!\")) + result.substring(result.indexOf(\"!\") + 1) + \"!\";\r\n\t }\r\n\treturn result;\r\n }", "public static String engToPig(String w) { \n String rtrstr =\"\"; //final string to return\n \n if (beginsWithVowel(w)) { //checks if beginsWithVowel(check above)\n rtrstr = w + \"way\"; //adds \"way\"\n }\n else if (hasAVowel(w)) { //if it has a vowel at all\n rtrstr = w.substring(w.indexOf(firstVowel(w))) + w.substring(0, w.indexOf(firstVowel(w))) + \"ay\" ; //adds substring from first vowel onwards + substring of beginning to first vowel + \"ay\"\n }\n else {\n VOWELS += \"yY\"; \n rtrstr = engToPig(w); //does engtopig again but this time counting \"y\" as a vowel\n VOWELS = VOWELS.substring(0,9); //removes y from VOWELS\n }\n return punct(cap(rtrstr)); //adjusts proper capitalization, and then punctuation\n }", "public static String newWord(String strw) {\n String value = \"Encyclopedia\";\n for (int i = 1; i < value.length(); i++) {\n char letter = 1;\n if (i % 2 != 0) {\n letter = value.charAt(i);\n }\n System.out.print(letter);\n }\n return value;\n }", "String replaceInString(String s) {\n\t\tString newS = s.replaceAll(\"[a-zA-Z]+\", \"WORT\");\n\t\tif (newS == s) {\n\t\t\tSystem.out.println(\"gleich\");\n\t\t}\n\t\treturn newS;\n\t}", "public String toGoatLatin(String S) {\n String[] strs = S.split(\" \");\n int len = strs.length;\n StringBuilder res = new StringBuilder();\n StringBuilder suffix = new StringBuilder(\"a\");\n char c;\n S = \"aeiouAEIOU\";\n for (int i = 0; i < len; ++i) {\n c = strs[i].charAt(0);\n if (S.indexOf(c) != -1) {\n res.append(strs[i]);\n } else {\n res.append(strs[i].substring(1));\n res.append(c);\n }\n res.append(\"ma\");\n res.append(suffix);\n res.append(' ');\n suffix.append('a');\n }\n return res.substring(0, res.length() - 1).toString();\n }", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "public static String remove(String str){\n\t\tString str2 = str.trim();\n\t\tstr2 = str2.replaceAll(\"à|á|ả|ã|ạ|â|ầ|ấ|ẩ|ẫ|ậ|ằ|ắ|ẳ|ẵ|ặ|ă\", \"a\");\n\t\tstr2 = str2.replaceAll(\"í|ì|ỉ|ĩ|ị\",\"i\");\n\t\tstr2 = str2.replaceAll(\"ư|ứ|ừ|ử|ữ|ự|ú|ù|ủ|ũ|ụ\",\"u\");\n\t\tstr2 = str2.replaceAll(\"ế|ề|ể|ễ|ệ|é|è|ẻ|ẽ|ẹ|ê\",\"e\");\n\t\tstr2 = str2.replaceAll(\"ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|ó|ò|ỏ|õ|ọ|ô|ơ\",\"o\");\n\t\tstr2= str2.replaceAll(\"ý|ỳ|ỷ|ỹ|ỵ\",\"y\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"Ấ|Ầ|Ẩ|Ẫ|Ậ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Á|À|Ả|Ã|Ạ|Â|Ă\",\"A\");\n\t\tstr2 = str2.replaceAll(\"Í|Ì|Ỉ|Ĩ|Ị\",\"I\");\n\t\tstr2 = str2.replaceAll(\"Ứ|Ừ|Ử|Ữ|Ự|Ú|Ù|Ủ|Ũ|Ụ|Ư\",\"U\");\n\t\tstr2 = str2.replaceAll(\"Ế|Ề|Ể|Ễ|Ệ|É|È|Ẻ|Ẽ|Ẹ|Ê\",\"E\");\n\t\tstr2 = str2.replaceAll(\"Ố|Ồ|Ổ|Ô|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ơ\",\"O\");\n\t\tstr2= str2.replaceAll(\"Ý|Ỳ|Ỷ|Ỹ|Ỵ\",\"Y\");\n\t\tstr2 = str2.replaceAll(\"đ\",\"d\");\n\t\tstr2 = str2.replaceAll(\"Đ\",\"D\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"ò\", \"\");\n\t\treturn str2;\n\t}", "public static String convertVowels(String word) {\n StringBuffer sb = new StringBuffer();\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (((c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') || (c == 'u'))){\n sb.append(\"*\");\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public static void main(String args[])\n {\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n StringBuilder sb = new StringBuilder(str);\n int len = sb.length();\n StringBuilder temp = new StringBuilder(\"\");\n for(int id = 0;id<=len-1;id++)\n {\n if((str.charAt(id)!='a')&&(str.charAt(id)!='e')&&(str.charAt(id)!='i')&&(str.charAt(id)!='o')&&(str.charAt(id)!='u')||(str.charAt(id)==' '))\n {\n temp.append(str.charAt(id));\n }\n }\n System.out.println(temp);\n \n\n }", "public static String stringYak(String str) {\n return str.replaceAll(\"yak\", \"\");\n }", "public static String check(String p) {\n\t\tString answer = \"\";\n\t\tif(p.equals(\"\")) {\n\t\t\treturn \"\";\n\t\t}\n\t\t// p 가 들어오면\n\t\t// ()))((()\n\t\tchar[] chararr = p.toCharArray(); // ( ) ) ) ( ( ( ) 인데.\n\t\tint chknum = 0;\n\t\tboolean correct = false;\n\t\tif(chararr[0] == '(') {\n\t\t\tchknum--;\n\t\t\tcorrect = true;\n\t\t} else {\n\t\t\tchknum++;\n\t\t}\n\t\t// ( 은 -1 ) 은 +1\n\t\tint i = 1; // 현재 인덱스\n\t\twhile(chknum != 0) {\n\t\t\t//System.out.println(chknum);\n\t\t\tif(chararr[i] == '(') {\n\t\t\t\tchknum--;\n\t\t\t} else {\n\t\t\t\tchknum++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t// 0 - (i-1) 까지 u 고\n\t\t// i - 끝까지 v\n\t\t\n\t\tif(correct == true) {\n\t\t\tanswer = p.substring(0, i) + check(p.substring(i, p.length()));\n\t\t} else {\n\t\t\t// p.substring을 원래대로 돌려놔야한다!\n\t\t\t// 0 부터 i-1 까지!\n\t\t\tchar[] changearr = new char[i];\n\t\t\t//changearr[0] = '(';\n\t\t\t//changearr[i-1] = ')';\n\t\t\t\n\t\t\tfor(int j=1; j<i-1; j++) {\n\t\t\t\tchangearr[j] = chararr[j] == '('? ')':'(';\n\t\t\t}\n\t\t\t\n\t\t\tanswer = \"(\" + check(p.substring(i, p.length())) + \")\" + String.valueOf(changearr).substring(1,i-1);\n\t\t\t//System.out.println(String.valueOf(changearr));\n\t\t\t//System.out.println(\"answer 1 : \" + answer);\n\t\t}\n\t\t\n\t\t// u, v 로 분리.\n\t\t// u는 조건 수행하고\n\t\t// 뒤에 check (v)를 붙일 것임...\n\t\t// check(v)\n\t\t//System.out.println(\"answer : \"+answer);\n\t\treturn answer;\n\t\t\n\t}", "public static String newFormat(String str) {\n\t\tString temp = Normalizer.normalize(str, Normalizer.Form.NFD);\n\t\tPattern pattern = Pattern.compile(\"\\\\p{InCombiningDiacriticalMarks}+\");\n\t\treturn pattern.matcher(temp).replaceAll(\"\");\n\t}", "public static String vibrateTranslate(String st) {\n String s = st.toLowerCase(); //upper and lower case represented by same character in Morse code\n\n // StringBuilder class makes it easier to append to String objects\n StringBuilder sb = new StringBuilder();\n // goes through user inputted String to translate to Morse code\n for (char ch : s.toCharArray()) {\n if (ch >= 'a' && ch <= 'z') { // between a and z\n int i = ch - 'a'; // specific index of mAlphabet\n sb.append(mAlphabet[i]).append(\"!\"); // in vibration this symbolizes a space between a letter in morse code\n } else if (ch >= '0' && ch <= '9') { // between 0 and 9\n int j = ch - '0';\n sb.append(mNumbers[j]).append(\"!\"); // in vibration this symbolized a space between a number in morse code\n } else if (ch == ' ') {\n sb.append(\"~\");// in vibration, this symbolizes a space between a word in morse code\n }\n else{\n return\"x\";\n }\n\n }\n // appended char array is then returned as a String\n return sb.toString().trim();\n }", "String mo2801a(String str);", "private static String zzty(String string2) {\n StringBuffer stringBuffer = new StringBuffer();\n int n = 0;\n while (n < string2.length()) {\n char c = string2.charAt(n);\n if (n == 0) {\n stringBuffer.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n stringBuffer.append('_').append(Character.toLowerCase(c));\n } else {\n stringBuffer.append(c);\n }\n ++n;\n }\n return stringBuffer.toString();\n }", "public static void main(String[] args) {\n String s = \"(ed(et(oc))el)\";\n// String s = \"a(bcdefghijkl(mno)p)q\";\n System.out.println(reverseParentheses(s));\n }", "public static void main(String[] args) {\n\t\n\tString str=\"Hello Deannochka, How are you? How have you been?\";\n\tSystem.out.println(str.replace(\" y\", \" th\"));\n\tSystem.out.println(str.replace(\"Hello\", \"Hey\"));\n//\tSystem.out.println(str.replaceAll(regex, replacement));\n\t\n}", "public static String translatePigLatin(String line) {\n\t\tString[] words = line.split(\" \");\n\t\t//declare to use as final string\n\t\tString pigLatin = \"\";\n\t\tfor(int i = 0; i < words.length; i++) {\n\t\t\t//***specification lower case each word and store it over itself\n\t\t\twords[i] = words[i].toLowerCase();\n\t\t\t//***specification if word matches 0-9 or @ or $ or # anywhere then don't change it\n\t\t\tif(!words[i].matches(\".*[\\\\d@$#].*\")) {\n\t\t\t\t//***specification if word has punctuation at the end 1 or more times replace with empty char\n\t\t\t\twords[i] = words[i].replaceAll(\"[\\\\.,:;?!\\\"]+$\", \"\");\n\t\t\t\t//***specification checks if the word starts with a vowel and adds way to the end if it does\n\t\t\t\tif(words[i].matches(\"^[aeiou].*\")) {\n\t\t\t\t\twords[i] = words[i] + \"way\";\n\t\t\t\t} else {\n\t\t\t\t\t//***specification if word starts with a consonant replace all the \n\t\t\t\t\t//consonants until you hit a vowel or y with empty char\n\t\t\t\t\tString begin = words[i].replaceAll(\"^[^aeiou][^aeiouy]*\", \"\");\n\t\t\t\t\t//subtract the length of the replaced string from the word length to \n\t\t\t\t\t//get the consonants removed from the beginning to add them at the end\n\t\t\t\t\tString end = words[i].substring(0, words[i].length() - begin.length());\n\t\t\t\t\t//concatenate the string together for the word\n\t\t\t\t\twords[i] = begin + end + \"ay\";\n\t\t\t\t}\n\t\t\t//concatenate the words back into a sentence\n\t\t\tpigLatin += words[i] + \" \";\n\t\t\t}\n\t\t}\n\t\t//return translated sentence\n\t\treturn pigLatin;\n\t}", "public CharSequence ZawGyiToUni(String myString1, Boolean unicode) {\n\t\t String uni = \"[\"\n\t + \" {\\\"from\\\": \\\"(\\u103D|\\u1087)\\\",\\\"to\\\":\\\"\\u103E\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103C\\\",\\\"to\\\":\\\"\\u103D\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u103B|\\u107E|\\u107F|\\u1080|\\u1081|\\u1082|\\u1083|\\u1084)\\\",\\\"to\\\":\\\"\\u103C\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u103A|\\u107D)\\\",\\\"to\\\":\\\"\\u103B\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1039\\\",\\\"to\\\":\\\"\\u103A\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106A\\\",\\\"to\\\":\\\"\\u1009\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106B\\\",\\\"to\\\":\\\"\\u100A\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106C\\\",\\\"to\\\":\\\"\\u1039\\u100B\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106D\\\",\\\"to\\\":\\\"\\u1039\\u100C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106E\\\",\\\"to\\\":\\\"\\u100D\\u1039\\u100D\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u106F\\\",\\\"to\\\":\\\"\\u100D\\u1039\\u100E\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1070\\\",\\\"to\\\":\\\"\\u1039\\u100F\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u1071|\\u1072)\\\",\\\"to\\\":\\\"\\u1039\\u1010\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1060\\\",\\\"to\\\":\\\"\\u1039\\u1000\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1061\\\",\\\"to\\\":\\\"\\u1039\\u1001\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1062\\\",\\\"to\\\":\\\"\\u1039\\u1002\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1063\\\",\\\"to\\\":\\\"\\u1039\\u1003\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1065\\\",\\\"to\\\":\\\"\\u1039\\u1005\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1068\\\",\\\"to\\\":\\\"\\u1039\\u1007\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1069\\\",\\\"to\\\":\\\"\\u1039\\u1008\\\"},\"\n\t + \" {\\\"from\\\": \\\"/(\\u1073|\\u1074)/g\\\",\\\"to\\\":\\\"\\u1039\\u1011\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1075\\\",\\\"to\\\":\\\"\\u1039\\u1012\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1076\\\",\\\"to\\\":\\\"\\u1039\\u1013\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1077\\\",\\\"to\\\":\\\"\\u1039\\u1014\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1078\\\",\\\"to\\\":\\\"\\u1039\\u1015\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1079\\\",\\\"to\\\":\\\"\\u1039\\u1016\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u107A\\\",\\\"to\\\":\\\"\\u1039\\u1017\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u107C\\\",\\\"to\\\":\\\"\\u1039\\u1019\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1085\\\",\\\"to\\\":\\\"\\u1039\\u101C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1033\\\",\\\"to\\\":\\\"\\u102F\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1034\\\",\\\"to\\\":\\\"\\u1030\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103F\\\",\\\"to\\\":\\\"\\u1030\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1086\\\",\\\"to\\\":\\\"\\u103F\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1088\\\",\\\"to\\\":\\\"\\u103E\\u102F\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1089\\\",\\\"to\\\":\\\"\\u103E\\u1030\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u108A\\\",\\\"to\\\":\\\"\\u103D\\u103E\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u1064\\\",\\\"to\\\":\\\"\\u1004\\u103A\\u1039$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u108B\\\",\\\"to\\\":\\\"\\u1004\\u103A\\u1039$1\\u102D\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u108C\\\",\\\"to\\\":\\\"\\u1004\\u103A\\u1039$1\\u102E\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u108D\\\",\\\"to\\\":\\\"\\u1004\\u103A\\u1039$1\\u1036\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u108E\\\",\\\"to\\\":\\\"\\u102D\\u1036\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u108F\\\",\\\"to\\\":\\\"\\u1014\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1090\\\",\\\"to\\\":\\\"\\u101B\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1091\\\",\\\"to\\\":\\\"\\u100F\\u1039\\u1091\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1019\\u102C(\\u107B|\\u1093)\\\",\\\"to\\\":\\\"\\u1019\\u1039\\u1018\\u102C\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u107B|\\u1093)\\\",\\\"to\\\":\\\"\\u103A\\u1018\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u1094|\\u1095)\\\",\\\"to\\\":\\\"\\u1037\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1096\\\",\\\"to\\\":\\\"\\u1039\\u1010\\u103D\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1097\\\",\\\"to\\\":\\\"\\u100B\\u1039\\u100B\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103C([\\u1000-\\u1021])([\\u1000-\\u1021])?\\\",\\\"to\\\":\\\"$1\\u103C$2\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u103C\\u103A\\\",\\\"to\\\":\\\"\\u103C$1\\u103A\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1031([\\u1000-\\u1021])(\\u103E)?(\\u103B)?\\\",\\\"to\\\":\\\"$1$2$3\\u1031\\\"},\"\n\t + \" {\\\"from\\\": \\\"([\\u1000-\\u1021])\\u1031(\\u103B|\\u103C|\\u103D)\\\",\\\"to\\\":\\\"$1$2\\u1031\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1032\\u103D\\\",\\\"to\\\":\\\"\\u103D\\u1032\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103D\\u103B\\\",\\\"to\\\":\\\"\\u103B\\u103D\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103A\\u1037\\\",\\\"to\\\":\\\"\\u1037\\u103A\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u102F(\\u102D|\\u102E|\\u1036|\\u1037)\\u102F\\\",\\\"to\\\":\\\"\\u102F$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u102F\\u102F\\\",\\\"to\\\":\\\"\\u102F\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u102F|\\u1030)(\\u102D|\\u102E)\\\",\\\"to\\\":\\\"$2$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u103E)(\\u103B|\\u1037)\\\",\\\"to\\\":\\\"$2$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1025(\\u103A|\\u102C)\\\",\\\"to\\\":\\\"\\u1009$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1025\\u102E\\\",\\\"to\\\":\\\"\\u1026\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1005\\u103B\\\",\\\"to\\\":\\\"\\u1008\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1036(\\u102F|\\u1030)\\\",\\\"to\\\":\\\"$1\\u1036\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1031\\u1037\\u103E\\\",\\\"to\\\":\\\"\\u103E\\u1031\\u1037\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1031\\u103E\\u102C\\\",\\\"to\\\":\\\"\\u103E\\u1031\\u102C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u105A\\\",\\\"to\\\":\\\"\\u102B\\u103A\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1031\\u103B\\u103E\\\",\\\"to\\\":\\\"\\u103B\\u103E\\u1031\\\"},\"\n\t + \" {\\\"from\\\": \\\"(\\u102D|\\u102E)(\\u103D|\\u103E)\\\",\\\"to\\\":\\\"$2$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u102C\\u1039([\\u1000-\\u1021])\\\",\\\"to\\\":\\\"\\u1039$1\\u102C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103C\\u1004\\u103A\\u1039([\\u1000-\\u1021])\\\",\\\"to\\\":\\\"\\u1004\\u103A\\u1039$1\\u103C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1039\\u103C\\u103A\\u1039([\\u1000-\\u1021])\\\",\\\"to\\\":\\\"\\u103A\\u1039$1\\u103C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u103C\\u1039([\\u1000-\\u1021])\\\",\\\"to\\\":\\\"\\u1039$1\\u103C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1036\\u1039([\\u1000-\\u1021])\\\",\\\"to\\\":\\\"\\u1039$1\\u1036\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1092\\\",\\\"to\\\":\\\"\\u100B\\u1039\\u100C\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u104E\\\",\\\"to\\\":\\\"\\u104E\\u1004\\u103A\\u1038\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1040(\\u102B|\\u102C|\\u1036)\\\",\\\"to\\\":\\\"\\u101D$1\\\"},\"\n\t + \" {\\\"from\\\": \\\"\\u1025\\u1039\\\",\\\"to\\\":\\\"\\u1009\\u1039\\\"}\" + \"]\";\n\t\t \n\t\t String zawgyi = \"[ { \\\"from\\\": \\\"င်္\\\", \\\"to\\\": \\\"ၤ\\\" }, { \\\"from\\\": \\\"္တွ\\\", \\\"to\\\": \\\"႖\\\" }, { \\\"from\\\": \\\"န(?=[ူွှု္])\\\", \\\"to\\\": \\\"ႏ\\\" }, { \\\"from\\\": \\\"ါ်\\\", \\\"to\\\": \\\"ၚ\\\" }, { \\\"from\\\": \\\"ဋ္ဌ\\\", \\\"to\\\": \\\"႒\\\" }, { \\\"from\\\": \\\"ိံ\\\", \\\"to\\\": \\\"ႎ\\\" }, { \\\"from\\\": \\\"၎င်း\\\", \\\"to\\\": \\\"၎\\\" }, { \\\"from\\\": \\\"[ဥဉ](?=[္ုူ])\\\", \\\"to\\\": \\\"ၪ\\\" }, { \\\"from\\\": \\\"[ဥဉ](?=[်])\\\", \\\"to\\\": \\\"ဥ\\\" }, { \\\"from\\\": \\\"ည(?=[္ုူွ])\\\", \\\"to\\\": \\\"ၫ\\\" }, { \\\"from\\\": \\\"(္[က-အ])ု\\\", \\\"to\\\": \\\"$1ဳ\\\" }, { \\\"from\\\": \\\"(္[က-အ])ူ\\\", \\\"to\\\": \\\"$1ဴ\\\" }, { \\\"from\\\": \\\"္က\\\", \\\"to\\\": \\\"ၠ\\\" }, { \\\"from\\\": \\\"္ခ\\\", \\\"to\\\": \\\"ၡ\\\" }, { \\\"from\\\": \\\"္ဂ\\\", \\\"to\\\": \\\"ၢ\\\" }, { \\\"from\\\": \\\"္ဃ\\\", \\\"to\\\": \\\"ၣ\\\" }, { \\\"from\\\": \\\"္စ\\\", \\\"to\\\": \\\"ၥ\\\" }, { \\\"from\\\": \\\"္ဆ\\\", \\\"to\\\": \\\"ၦ\\\" }, { \\\"from\\\": \\\"္ဇ\\\", \\\"to\\\": \\\"ၨ\\\" }, { \\\"from\\\": \\\"္ဈ\\\", \\\"to\\\": \\\"ၩ\\\" }, { \\\"from\\\": \\\"ည(?=[္ုူ])\\\", \\\"to\\\": \\\"ၫ\\\" }, { \\\"from\\\": \\\"္ဋ\\\", \\\"to\\\": \\\"ၬ\\\" }, { \\\"from\\\": \\\"္ဌ\\\", \\\"to\\\": \\\"ၭ\\\" }, { \\\"from\\\": \\\"ဍ္ဍ\\\", \\\"to\\\": \\\"ၮ\\\" }, { \\\"from\\\": \\\"ဎ္ဍ\\\", \\\"to\\\": \\\"ၯ\\\" }, { \\\"from\\\": \\\"္ဏ\\\", \\\"to\\\": \\\"ၰ\\\" }, { \\\"from\\\": \\\"္တ\\\", \\\"to\\\": \\\"ၱ\\\" }, { \\\"from\\\": \\\"္ထ\\\", \\\"to\\\": \\\"ၳ\\\" }, { \\\"from\\\": \\\"္ဒ\\\", \\\"to\\\": \\\"ၵ\\\" }, { \\\"from\\\": \\\"္ဓ\\\", \\\"to\\\": \\\"ၶ\\\" }, { \\\"from\\\": \\\"္ဓ\\\", \\\"to\\\": \\\"ၶ\\\" }, { \\\"from\\\": \\\"္န\\\", \\\"to\\\": \\\"ၷ\\\" }, { \\\"from\\\": \\\"္ပ\\\", \\\"to\\\": \\\"ၸ\\\" }, { \\\"from\\\": \\\"္ဖ\\\", \\\"to\\\": \\\"ၹ\\\" }, { \\\"from\\\": \\\"္ဗ\\\", \\\"to\\\": \\\"ၺ\\\" }, { \\\"from\\\": \\\"္ဘ\\\", \\\"to\\\": \\\"ၻ\\\" }, { \\\"from\\\": \\\"္မ\\\", \\\"to\\\": \\\"ၼ\\\" }, { \\\"from\\\": \\\"္လ\\\", \\\"to\\\": \\\"ႅ\\\" }, { \\\"from\\\": \\\"ဿ\\\", \\\"to\\\": \\\"ႆ\\\" }, { \\\"from\\\": \\\"(ြ)ှ\\\", \\\"to\\\": \\\"$1ႇ\\\" }, { \\\"from\\\": \\\"ွှ\\\", \\\"to\\\": \\\"ႊ\\\" }, { \\\"from\\\": \\\"(ၤ)([ေ]?)([ြ]?)([က-အ])ိ\\\", \\\"to\\\": \\\"$2$3$4ႋ\\\" }, { \\\"from\\\": \\\"(ၤ)([ေ]?)([ြ]?)([က-အ])ီ\\\", \\\"to\\\": \\\"$2$3$4ႌ\\\" }, { \\\"from\\\": \\\"(ၤ)([ေ]?)([ြ]?)([က-အ])ံ\\\", \\\"to\\\": \\\"$2$3$4ႍ\\\" }, { \\\"from\\\": \\\"(ၤ)([ေ]?)([ြ]?)([က-အ])\\\", \\\"to\\\": \\\"$2$3$4$1\\\" }, { \\\"from\\\": \\\"ရ(?=[ုူွႊ])\\\", \\\"to\\\": \\\"႐\\\" }, { \\\"from\\\": \\\"ဏ္ဍ\\\", \\\"to\\\": \\\"႑\\\" }, { \\\"from\\\": \\\"ဋ္ဋ\\\", \\\"to\\\": \\\"႗\\\" }, { \\\"from\\\": \\\"([က-အႏဩ႐])([ၠ-ၩၬၭၰ-ၼႅႊ])?([ျ-ှ]*)?ေ\\\", \\\"to\\\": \\\"ေ$1$2$3\\\" }, { \\\"from\\\": \\\"([က-အဩ])([ၠ-ၩၬၭၰ-ၼႅ])?(ြ)\\\", \\\"to\\\": \\\"$3$1$2\\\" }, { \\\"from\\\": \\\"်\\\", \\\"to\\\": \\\"္\\\" }, { \\\"from\\\": \\\"ျ\\\", \\\"to\\\": \\\"်\\\" }, { \\\"from\\\": \\\"ြ\\\", \\\"to\\\": \\\"ျ\\\" }, { \\\"from\\\": \\\"ွ\\\", \\\"to\\\": \\\"ြ\\\" }, { \\\"from\\\": \\\"ှ\\\", \\\"to\\\": \\\"ွ\\\" }, { \\\"from\\\": \\\"ွု\\\", \\\"to\\\": \\\"ႈ\\\" }, { \\\"from\\\": \\\"([ုူနရြႊွႈ])([ဲံ]{0,1})့\\\", \\\"to\\\": \\\"$1$2႕\\\" }, { \\\"from\\\": \\\"ု႕\\\", \\\"to\\\": \\\"ု႔\\\" }, { \\\"from\\\": \\\"([နရ])([ဲံိီႋႌႍႎ])့\\\", \\\"to\\\": \\\"$1$2႕\\\" }, { \\\"from\\\": \\\"႕္\\\", \\\"to\\\": \\\"႔္\\\" }, { \\\"from\\\": \\\"([်ျ])([က-အ])([ံိီႋႌႍႎ]?)ု\\\", \\\"to\\\": \\\"$1$2$3ဳ\\\" }, { \\\"from\\\": \\\"([်ျ])([က-အ])([ံိီႋႌႍႎ]?)ူ\\\", \\\"to\\\": \\\"$1$2$3ဴ\\\" }, { \\\"from\\\": \\\"်ု\\\", \\\"to\\\": \\\"်ဳ\\\" }, { \\\"from\\\": \\\"်([ံိီႋႌႍႎ])ု\\\", \\\"to\\\": \\\"်$1ဳ\\\" }, { \\\"from\\\": \\\"([်ျ])([က-အ])ူ\\\", \\\"to\\\": \\\"$1$2ဴ\\\" }, { \\\"from\\\": \\\"်ူ\\\", \\\"to\\\": \\\"်ဴ\\\" }, { \\\"from\\\": \\\"်([ံိီႋႌႍႎ])ူ\\\", \\\"to\\\": \\\"်$1ဴ\\\" }, { \\\"from\\\": \\\"ွူ\\\", \\\"to\\\": \\\"ႉ\\\" }, { \\\"from\\\": \\\"ျ([ကဃဆဏတထဘယလယသဟ])\\\", \\\"to\\\": \\\"ၾ$1\\\" }, { \\\"from\\\": \\\"ၾ([ကဃဆဏတထဘယလယသဟ])([ြႊ])([ဲံိီႋႌႍႎ])\\\", \\\"to\\\": \\\"ႄ$1$2$3\\\" }, { \\\"from\\\": \\\"ၾ([ကဃဆဏတထဘယလယသဟ])([ြႊ])\\\", \\\"to\\\": \\\"ႂ$1$2\\\" }, { \\\"from\\\": \\\"ၾ([ကဃဆဏတထဘယလယသဟ])([ဳဴ]?)([ဲံိီႋႌႍႎ])\\\", \\\"to\\\": \\\"ႀ$1$2$3\\\" }, { \\\"from\\\": \\\"ျ([က-အ])([ြႊ])([ဲံိီႋႌႍႎ])\\\", \\\"to\\\": \\\"ႃ$1$2$3\\\" }, { \\\"from\\\": \\\"ျ([က-အ])([ြႊ])\\\", \\\"to\\\": \\\"ႁ$1$2\\\" }, { \\\"from\\\": \\\"ျ([က-အ])([ဳဴ]?)([ဲံိီႋႌႍႎ])\\\", \\\"to\\\": \\\"ၿ$1$2$3\\\" }, { \\\"from\\\": \\\"်ွ\\\", \\\"to\\\": \\\"ွ်\\\" }, { \\\"from\\\": \\\"်([ြႊ])\\\", \\\"to\\\": \\\"$1ၽ\\\" }, { \\\"from\\\": \\\"([ဳဴ])႔\\\", \\\"to\\\": \\\"$1႕\\\" }, { \\\"from\\\": \\\"ႏၱ\\\", \\\"to\\\" : \\\"ႏၲ\\\" }, { \\\"from\\\": \\\"([က-အ])([ၻၦ])ာ\\\", \\\"to\\\": \\\"$1ာ$2\\\" }, { \\\"from\\\": \\\"ာ([ၻၦ])့\\\", \\\"to\\\": \\\"ာ$1႔\\\" }]\";\n\t\t \n\t\t if(unicode==true) {\n\t\treturn replacewithUni(uni, myString1);\n\t\t } else {\n\t\t\t return replacewithZawgyi(zawgyi, myString1);\n\t\t }\n\t}", "private String e19BuildStaffGageString(String s) {\n String tmp1 = null;\n if ((s != null) && (s.length() > 0)) {\n tmp1 = String.format(\"%c%s-%c\", SEP_CHAR, s, SEP_CHAR);\n } else {\n tmp1 = String.format(\"%c-----%c\", SEP_CHAR, SEP_CHAR);\n }\n\n return tmp1;\n }", "static String convert(String str)\n {\n char ch[] = str.toCharArray();\n for (int i = 0; i < str.length(); i++) {\n \n // If first character of a word is found\n if (i == 0 && ch[i] != ' ' || \n ch[i] != ' ' && ch[i - 1] == ' ') {\n \n // If it is in lower-case\n if (ch[i] >= 'a' && ch[i] <= 'z') {\n \n // Convert into Upper-case\n ch[i] = (char)(ch[i] - 'a' + 'A');\n }\n }\n \n // If apart from first character\n // Any one is in Upper-case\n else if (ch[i] >= 'A' && ch[i] <= 'Z') \n \n // Convert into Lower-Case\n ch[i] = (char)(ch[i] + 'a' - 'A'); \n }\n \n // Convert the char array to equivalent String\n String st = new String(ch);\n return st;\n }", "public String startOz(String str) {\n String result = \"\";\n \n if (str.length() >= 1 && str.charAt(0)=='o') {\n result = result + str.charAt(0);\n }\n \n if (str.length() >= 2 && str.charAt(1)=='z') {\n result = result + str.charAt(1);\n }\n \n return result;\n}", "private static String zzgr(String string2) {\n int n = string2.length();\n StringBuilder stringBuilder = new StringBuilder(n);\n int n2 = 0;\n while (n2 < n) {\n char c = string2.charAt(n2);\n if (c >= ' ' && c <= '~' && c != '\\\"' && c != '\\'') {\n stringBuilder.append(c);\n } else {\n stringBuilder.append(String.format(\"\\\\u%04x\", c));\n }\n ++n2;\n }\n return stringBuilder.toString();\n }", "public static boolean isVog(String s){\n boolean flag = true;\n int i = 0;\n while(flag && i < s.length()){\n flag = (s.charAt(i) == 'a' || s.charAt(i) == 'A' ||\n s.charAt(i) == 'e' || s.charAt(i) == 'E' ||\n s.charAt(i) == 'i' || s.charAt(i) == 'I' ||\n s.charAt(i) == 'o' || s.charAt(i) == 'O' ||\n s.charAt(i) == 'u' || s.charAt(i) == 'U' );\n i++;\n }\n return flag;\n }", "public static String translateWord(String word) {\n\n if (word.length() < 1) return word;\n int[] vowelArray = word.chars().filter(c -> vowels.contains((char) c)).toArray();\n if (vowelArray.length == 0) return word.charAt(0) + word.substring(1).toLowerCase() + \"ay\";\n\n char first = Character.isUpperCase(word.charAt(0))\n ? Character.toUpperCase((char) vowelArray[0]) : (char) vowelArray[0];\n if (vowels.contains(word.charAt(0)))\n word = first + word.substring(1).toLowerCase() + \"yay\";\n else\n word = first + word.substring(word.indexOf(vowelArray[0]) + 1).toLowerCase()\n + word.substring(0, word.indexOf(vowelArray[0])).toLowerCase() + \"ay\";\n return word;\n }", "public String toPigLatin(String string) {\n\t\t//Create an array of vowels\n\t\tCharacter[] vowels = new Character[] {'a','e','i','o','u'};\n\t\t//Create an array in order to split the string into individual words\n\t\tString[] splitByWords = string.split(\"[\\\\s',]\");\n\t\t//Iterate through the array of split up words\n\t\tfor (int i = 0; i < splitByWords.length; i++) {\n\t\t\t/*\n\t\t\t * For each word in the array, if the first character is a consonant or the last\n\t\t\t * character is a q, put the first character at the end and then delete the first character.\n\t\t\t * \n\t\t\t * Add \"ay\" onto the end.\n\t\t\t */\n\t\t\twhile ((!Arrays.asList(vowels).contains(splitByWords[i].charAt(0))) || (splitByWords[i].charAt(splitByWords[i].length()-1) == 'q')) {\n\t\t\t\tsplitByWords[i] = splitByWords[i] + splitByWords[i].charAt(0);\n\t\t\t\tsplitByWords[i] = splitByWords[i].substring(1,splitByWords[i].length());\n\t\t\t}\n\t\t\tsplitByWords[i] = splitByWords[i] + \"ay\"; \n\t\t}\n\t\tString temp = splitByWords[0];\n\t\t\n\t\t//format the array back into a returnable string\n\t\tif(splitByWords.length>1) {\n\t\t\tfor (int i=1; i<splitByWords.length; i++) {\n\t\t\t\ttemp = temp + \" \" + splitByWords[i];\n\t\t\t}\n\t\t}\n\t\treturn temp;\n\t}", "public static String sanitizeForMRS(String in) {\r\n\t\treturn in.replaceAll(\"[\\\"\\u2018\\u2019\\u201c\\u201d]\", \"'\").replaceAll(\"[\\u2026\\u22ef]\", \"...\").replaceAll(\"[\\u2010\\u2011\\u2012\\u2013\\u2014\\u2015]\", \"-\").replaceAll(\"[&+]\", \"and\");\r\n\t}", "public String spanishWord() {\n\t\treturn \"Depurar\";\n\t}", "public static String find_a(String question)\n\t{\n\t\t\n\t\tint first_par = 0;\n\t\tint second_par = 0;\n\t\t\n\t\tString a = \"\";\n\t\t\n\t\tfirst_par = question.indexOf(\"(\");\n\t\tsecond_par = question.indexOf(\")\");\n\t\t\n\t\ta = question.substring(first_par+1,second_par);\n\t\t\n\t\t\n\t\treturn a;\n\t}", "public static String ungroupify(String text){\r\n return text.replaceAll(\"[\\\\sx]\", \"\");\r\n}", "public static String translate(String word) {\n\t\t// Method variables.\n\t\tint vowelIndex = 0;\n\t\tint wordLength = word.length();\n\t\tString pigLatin = \"\";\n\n\t\t// Loop through the word marking at what point the first vowel is.\n\t\tfor (int i = 0; i < wordLength; i++) {\n\t\t\t// Gets the char at i and sets it to lower case for comparing to vowels.\n\t\t\tchar letter = Character.toLowerCase(word.charAt(i));\n\n\t\t\t// If a letter of a word equals a vowel break loop\n\t\t\tif (letter == 'a' || letter == 'e' || letter == 'i' || letter == 'o' || letter == 'u') {\n\t\t\t\tvowelIndex = i; // Set the value of firstVowel the index of the character in the word.\n\t\t\t\tbreak; // Exit loops\n\t\t\t}\n\n\t\t}\n\n\t\t// Rearrange word into Pig Latin.\n\t\t// First test if it starts with a vowel\n\t\tif (vowelIndex == 0) {\n\t\t\tpigLatin = word + \"way\"; // Put way on end of any word starting with a vowel.\n\t\t} else {\n\t\t\t// Create substring of characters to add to the end of the word.\n\t\t\tString toEnd = word.substring(0, vowelIndex);\n\t\t\t\n\t\t\t// Create a substring of the new start of the word.\n\t\t\tString newStart = word.substring(vowelIndex, wordLength);\n\n\t\t\t// Combine both substrings together and add ay.\n\t\t\tpigLatin = newStart + toEnd + \"ay\";\n\t\t}\n\n\t\treturn pigLatin.toUpperCase(); // returns the word translated into Pig Latin\n\t}", "public static String convertText(String s) {\r\n StringCharacterIterator stringcharacteriterator = new StringCharacterIterator(s);\r\n StringBuffer stringbuffer = new StringBuffer();\r\n int ai[] = new int[s.length()];\r\n int i = 0;\r\n int j = 0;\r\n for(char c = stringcharacteriterator.first(); c != '\\uFFFF'; c = stringcharacteriterator.next())\r\n if(c == '%')\r\n {\r\n c = stringcharacteriterator.next();\r\n if(c != '%')\r\n {\r\n stringbuffer.append('%');\r\n c = stringcharacteriterator.previous();\r\n } else\r\n {\r\n c = stringcharacteriterator.next();\r\n switch(c)\r\n {\r\n case 37: // '%'\r\n stringbuffer.append('%');\r\n break;\r\n\r\n case 80: // 'P'\r\n case 112: // 'p'\r\n stringbuffer.append('\\361');\r\n break;\r\n\r\n case 67: // 'C'\r\n case 99: // 'c'\r\n stringbuffer.append('\\355');\r\n break;\r\n\r\n case 68: // 'D'\r\n case 100: // 'd'\r\n stringbuffer.append('\\u00b0');\r\n break;\r\n\r\n case 85: // 'U'\r\n case 117: // 'u'\r\n ai[stringbuffer.length()] ^= 1;\r\n i++;\r\n break;\r\n\r\n case 79: // 'O'\r\n case 111: // 'o'\r\n ai[stringbuffer.length()] ^= 2;\r\n j++;\r\n break;\r\n\r\n default:\r\n if(c >= '0' && c <= '9')\r\n {\r\n int k = 3;\r\n char c1 = (char)(c - 48);\r\n for(c = stringcharacteriterator.next(); c >= '0' && c <= '9' && --k > 0; c = stringcharacteriterator.next())\r\n c1 = (char)(10 * c1 + (c - 48));\r\n\r\n stringbuffer.append(c1);\r\n }\r\n c = stringcharacteriterator.previous();\r\n break;\r\n }\r\n }\r\n } else\r\n if(c == '^')\r\n {\r\n c = stringcharacteriterator.next();\r\n if(c == ' ')\r\n stringbuffer.append('^');\r\n } else\r\n {\r\n stringbuffer.append(c);\r\n }\r\n s = Unicode.char2DOS437(stringbuffer, 2, '?');\r\n\r\n\t\tString ss = s;\r\n\t\treturn ss;\r\n\t}", "public String soundex(String str) {\n if (null == str || str.length() == 0) { return str; }\n \n StringBuffer sBuf = new StringBuffer(); \n str = str.toUpperCase();\n \n sBuf.append(str.charAt(0));\n \n char last, current;\n last = '*';\n \n for (int i = 0; i < str.length(); i++) {\n \n current = getMappingCode(str.charAt(i));\n if (current == last) {\n continue;\n } \n else if (current != 0) {\n sBuf.append(current); \n }\n \n last = current; \n \n }\n \n return sBuf.toString();\n }", "ILoLoString translate();", "public static String replaceNonAlphanumeric(String str, char subst) {\n StringBuffer ret = new StringBuffer(str.length());\n char[] testChars = str.toCharArray();\n for (int i = 0; i < testChars.length; i++) {\n if (Character.isLetterOrDigit(testChars[i])) {\n ret.append(testChars[i]);\n } else {\n ret.append( subst );\n }\n }\n return ret.toString();\n }", "final protected String translateSpecialChars(String title)\r\n {\r\n int start;\r\n\tint i;\r\n\t// HTML representation of selected extended chars\r\n\tString rawString[]={\r\n\t\t\t\t\t\t \"&aacute;\",\"&acirc;\",\"&aelig;\",\r\n\t\t\t\t\t\t \"&agrave;\",\"&auml;\",\"&ccedil;\",\r\n\t\t\t\t\t\t \"&eacute;\",\"&ecirc;\",\"&egrave;\",\r\n\t\t\t\t \"&euml;\",\"&icirc;\",\"&iuml;\",\r\n\t\t\t\t \"&ocirc;\",\"&ouml;\",\"&szlig;\",\r\n\t\t\t\t \"&uuml;\",\"&yuml;\",\"&copy;\",\r\n\t\t\t\t \"&pound;\",\"&reg;\",\"&lt;\",\r\n\t\t\t\t \"&gt;\",\"&amp;\",\"&quot;\",\r\n \t\t\t\t\t \"&atilde;\",\"&aring;\",\"&igrave;\",\r\n\t\t\t\t\t \"&iacute;\",\"&eth;\",\"&ntilde;\",\r\n\t\t\t\t\t \"&ograve;\",\"&oacute;\",\"&otilde;\",\r\n\t\t\t\t\t \"&divide;\",\"&oslash;\",\"&ugrave;\",\r\n\t\t\t\t\t \"&uacute;\",\"&ucirc;\",\"&yacute;\",\r\n\t\t\t\t\t \"&thorn;\",\"&times;\",\"&nbsp;\",\r\n\t\t\t\t\t \"&sect;\",\"&cent;\",\"&deg;\"\r\n\t\t\t\t\t };\r\n // Unicode representation of above\r\n\tchar translatedChar[]={\r\n\t\t\t\t\t\t\t'\\u00e1','\\u00e2','\\u00e6',\r\n\t\t\t\t\t\t\t'\\u00e0','\\u00e4','\\u00e7',\r\n\t\t\t\t\t\t\t'\\u00e9','\\u00ea','\\u00e8',\r\n\t\t\t\t\t\t\t'\\u00eb','\\u00ee','\\u00ef',\r\n\t\t\t\t\t\t\t'\\u00f4','\\u00f6','\\u00df',\r\n\t\t\t\t\t\t\t'\\u00fc','\\u00ff','\\u00a9',\r\n\t\t\t\t\t\t\t'\\u00a3','\\u00ae','\\u003c',\r\n\t\t\t\t\t\t\t'\\u003e','\\u0026','\\u0022',\r\n\t\t\t\t\t\t\t'\\u00e3','\\u00e5','\\u00ec',\r\n\t\t\t\t\t\t\t'\\u00ed','\\u00f0','\\u00f1',\r\n\t\t\t\t\t\t\t'\\u00f2','\\u00f3','\\u00f5',\r\n\t\t\t\t\t\t\t'\\u00f7','\\u00f8','\\u00f9',\r\n\t\t\t\t\t\t\t'\\u00fa','\\u00fb','\\u00fd',\r\n\t\t\t\t\t\t\t'\\u00fe','\\u00d7','\\u00a0',\r\n\t\t\t\t\t\t\t'\\u00a7','\\u00a2','\\u00b0'\r\n\t\t\t\t\t\t };\r\n StringBuffer translated=new StringBuffer(\"\");\r\n\tString titleString=title;\r\n\r\n\t//Check the title for each of the above HTML special chars\r\n\tfor(int loop=0;loop<NUMBER_SPECIAL_CHARS;loop++)\r\n\t{\r\n\t if(translated.length()>0)\r\n\t {\r\n\t titleString=translated.toString();\r\n\t\ttranslated=new StringBuffer(\"\");\r\n\t }\r\n\t start=titleString.indexOf(rawString[loop]);\r\n\t if(start!=-1)\r\n\t {\r\n\t //HTML special character found so replace it \r\n\t\t// with the unicode equalent for display.\r\n\t\tfor(i=0;i<start;i++)\r\n\t\t translated.insert(i,titleString.charAt(i));\r\n translated.append(translatedChar[loop]);\r\n\t\tfor(i=start+rawString[loop].length();i<titleString.length();i++)\r\n\t\t translated.append(titleString.charAt(i));\r\n\t }\r\n\t}\r\n\treturn (translated.length()==0) ? titleString : translated.toString();\r\n }", "public static String translateSentence(String sentence) {\n\n Matcher matcher = Pattern.compile(\"\\\\w+\").matcher(sentence);\n return matcher.replaceAll(match -> translateWord(match.group()));\n }", "public String translateFi(String s) {\n if (s == \"always\") {\n return \"aina\";\n } else if (s == \"often\") {\n return \"usein\";\n } else if (s == \"sometimes\") {\n return \"joskus\";\n } else if (s == \"never\") {\n return \"en koskaan\";\n } else if (s == \"low\") {\n return \"vähän\";\n } else if (s == \"high\") {\n return \"paljon\";\n } else if (s == \"normal\") {\n return \"jonkin verran\";\n }\n return \"\";\n }", "String mo150a(String str);", "public static String punct(String w) {\n int len = w.length();\n String newW = \"\"; //just letters\n String start= \"\"; //string of start punctuations\n String end = \"\"; //string of end punctuations\n for (int i = 0; i < len; i++) {\n if (endPunct.indexOf(w.substring(i, i+1)) != -1) {\n end += w.substring(i, i+1); } //if there is an end punctuation put it in the end NOT counting apostrophes \n else if (startPunct.indexOf(w.substring(i,i+1)) != -1) {\n start += w.substring(i, i+1); } //if there is a start punctution, put it in start\n else {\n newW += w.substring(i, i+1); } //string of just the letters \n }\n return start + newW + end; }", "void mo37759a(String str);", "public static String Rule2(String para_word) {\n\t\tint last = para_word.length();\r\n\r\n\t\t// if it ends in y and there is a vowel in steam change it to i\r\n\t\tif ((para_word.charAt(last - 1) == 'y') && wordSteamHasVowel(para_word)) {\r\n\t\t\tpara_word = para_word.substring(0, last - 1) + \"i\";\r\n\t\t}\r\n\r\n\t\treturn para_word;\r\n\t}", "public static String disemvowel(String originStr){\r\n return originStr.replaceAll(\"[AaEeIiOoUu]\",\"\");\r\n }", "public String ReplaceCharacterwithAnotherCharacter(String str)\n {\n str=str.replace(\"d\",\"f\");\n str=str.replace(\"l\",\"t\");\n return str;\n }", "void mo9058ad(String str, int i);", "void mo12635a(String str);", "public static void main(String[] args) {\n// System.out.println(alphanumeric.replaceAll(\"[aei]\", \"x\"));\n\n\n String regex = \"^[A-Z]|[a-z]\";\n String username = \"kaaviya\";\n\n System.out.println(username.replaceAll( \"^[A-Za-z][A-Za-z0-9_]{7,29}$\", \"x\"));\n System.out.println(username.matches(regex));\n\n }", "public String notString(String str) {\n if (str.length() >= 3 && str.substring(0,3).equals(\"not\")){\n return str;\n }\n \n return (\"not \" + str);\n}", "public static void main(String[] args) {\n\t\tString str = \"They is students.\";\n\t\tint i=0;\n\t\tfor(;i<str.length();i++){\n\t\t\tif(str.charAt(i)=='i')\n\t\t\t\tif(str.charAt(i+1)=='s'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\tStringBuffer sb = new StringBuffer(str);\n\t\tsb.replace(i, i+2, \"are\");\n\t\tSystem.out.println(sb);\n\t}", "String mo3176a(String str, String str2);", "public static void tulis(String str){\n System.out.println(str);\n }", "public String getWordRegex(String word){\n\t\treturn String.format(\"\\\\b%1$s\\\\b|\\\\b%1$ss\\\\b\", word);\n\t}", "public static String formatLabel(String lbl){\n\t\t\n\t\t// XXX There is be a better way to do this...\n\t\tlbl = lbl.replaceAll(\",\", \"COMMA\");\n\t\tlbl = lbl.replaceAll(\"\\\\$\", \"DOL\");\n\t\tlbl = lbl.replaceAll(\"\\\\?\", \"QMARK\");\n\t\tlbl = lbl.replaceAll(\"\\\\!\", \"EXCMARK\");\n\t\tlbl = lbl.replaceAll(\"'\", \"\");\n\t\t\n\t\treturn lbl;\n\t}", "private static String replace(String str, int i, char c) {\n char[] chs = str.toCharArray();\n chs[i] = c;\n return new String(chs);\n }", "private static String expandUmlauts(String name) {\n return name.toLowerCase().replace(\"ä\", \"ae\").replace(\"ö\", \"oe\").replace(\"ü\", \"ue\");\n }", "void mo5871a(String str);", "void mo85415a(String str);", "public static void main(String[] args){\r\n String first = \"jin\";\r\n String last = \"jung\";\r\n String ay = \"ay\";\r\n/*\r\n use substring() and toUpperCase methods to reorder and capitalize\r\n*/\r\n\r\n String letFirst = first.substring(0,1);\r\n String capFirst = letFirst.toUpperCase();\r\n String letLast = last.substring(0,1);\r\n String capLast = letLast.toUpperCase();\r\n\r\n String nameInPigLatin = first.substring(1,3) + capFirst + ay + \" \" + last.substring(1,4) + capLast + ay;\r\n\r\n/*\r\n output resultant string to console\r\n*/\r\n\r\n System.out.println(nameInPigLatin);\r\n\r\n }", "private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }", "@Override\n\tpublic void talk(String s) {\n\t\tString[] stuff=s.split(\" \");\n\t\tString talkString=\"\";\n\t\tfor (String string : stuff) {\n\t\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\t\tif(i<string.length()/2) {\n\t\t\t\t\ttalkString+=\"o\";\n\t\t\t\t}else {\n\t\t\t\ttalkString+=\"i\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttalkString+=\"nk \";\n\t\t}\n\t\tSystem.out.println(talkString);\n\t}", "void mo3768a(String str);", "private static String abbrv(String str, int max) {\n return (abbrv(str, max, true));\n }", "private static String spellPunctuation(String string) {\n\t\tchar[] in = string.toCharArray();\n\t\tStringBuilder out = new StringBuilder();\n\t\t\n\t\tchar b = 0; //previous\n\t\tchar c = 0; //current\n\t\tchar d = 0; //next\n\t\tint n = in.length;\n\t\t\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tc = in[i];\n\t\t\t\n\t\t\tif (i+1 < n) {\n\t\t\t\td = in[i+1];\n\t\t\t}\n\t\t\t\n\t\t\tswitch (c) {\n\t\t\t\tcase ',':\n\t\t\t\t\tif (d != ' ') {\n\t\t\t\t\t\tout.append(\" comma \");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tout.append(\" comma\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '.':\n\t\t\t\t\tif (d == ' ') { //skip periods at the end of sentences\n\t\t\t\t\t\t//skip\n\t\t\t\t\t}\n\t\t\t\t\telse { //keep number with a decimal intact\n\t\t\t\t\t\tout.append(c);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ';':\n\t\t\t\t\tout.append(\" semicolon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ':':\n\t\t\t\t\tout.append(\" colon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201c':\n\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201d':\n\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\"':\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\tout.append(\" double quote \");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\'': //single quote\n\t\t\t\tcase '\\u2019': //apostrophe\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\t//contraction apostrophe is ignored; don't -> dont\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '%':\n\t\t\t\t\tout.append(\" percent\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tout.append(c);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tb = c;\n\t\t}\n\t\t\n\t\treturn out.toString();\n\t}", "abstract String mo1747a(String str);", "private String removeSpecialCharacters(String word)\n\t{\n\t\tString newString = \"\";\n\n\t\tfor (int i = 0; i < word.length(); i++)\n\t\t{\n\t\t\tif (word.charAt(i) != '?' && word.charAt(i) != '!' && word.charAt(i) != '\"' && word.charAt(i) != '\\''\n\t\t\t\t\t&& word.charAt(i) != '#' && word.charAt(i) != '(' && word.charAt(i) != ')' && word.charAt(i) != '$'\n\t\t\t\t\t&& word.charAt(i) != '%' && word.charAt(i) != ',' && word.charAt(i) != '&')\n\t\t\t{\n\t\t\t\tnewString += word.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn newString;\n\t}", "private String formatLatex(String text){\r\n\r\n String output=text.replaceAll(\"_\",\"-\");\r\n\r\n return output;\r\n }", "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "static void reverseWordInMyString(String str) {\r\n\t\tString[] words = str.split(\" \");\r\n\t\tString reversedString = \"\";\r\n\t\tfor (int i = 0; i < words.length; i++) {\r\n\t\t\tString word = words[i];\r\n\t\t\tString reverseWord = \"\";\r\n\t\t\tfor (int j = word.length() - 1; j >= 0; j--) {\r\n\t\t\t\t/*\r\n\t\t\t\t * The charAt() function returns the character at the given position in a string\r\n\t\t\t\t */\r\n\t\t\t\treverseWord = reverseWord + word.charAt(j);\r\n\t\t\t}\r\n\t\t\treversedString = reversedString + reverseWord + \" \";\r\n\t\t}\r\n\t\tSystem.out.println(str);\r\n\t\tSystem.out.println(reversedString);\r\n\t}", "public static String allVowels( String w ) \n {\n String rtrnStr = \"\";\n String currLetter = \"\";\n int origLength = w.length();\n for (int i = 0; i < origLength; i++){\n currLetter = w.substring(i,i+1);\n if (isAVowel(currLetter)){\n rtrnStr += currLetter; //if it is a vowel, add the letter to the string of vowels \n }\n }\n return rtrnStr;\n }", "public static String recaseMWE(String s) {\n return recase.get(s.toLowerCase());\n }", "void mo9075h(String str, int i, int i2);", "private void Trans(String s) {\n }", "void mo19167a(String str, String str2, int i, String str3, int i2);", "public static void main(String[] args) {\n\n\t\t\n\t\tString s = \"平仮�??stringabc片仮�??numbers 123漢字gh%^&*#$1@):\";\n\t\t\n\t\t//Regular Expression: [^a-zA-Z0-9]\n\t\t\n\t\ts = s.replaceAll(\"[^a-zA-Z0-9]\", \"-\"); // ^ symbol is used for not/except\n\t\tSystem.out.println(s);\n\t}", "public static String A(String str)\n\t{\t\t\n\t\tString aStr = Format.a(str);\n\t\treturn aStr.substring(0, 1).toUpperCase();\n\t}", "void mo1791a(String str);", "private String composeCharacterString(String string) {\n return null;\r\n }", "public static void main(String[] args) {\n\r\n String nome = \"Mario\"; //object literal\r\n String outro = \"Alura\"; //má prática, sempre prefere a sintaxe literal\r\n\r\n String novo = outro.replace(\"A\", \"a\");\r\n System.out.println(novo);\r\n\r\n String novo2 = nome.toLowerCase(); //também teste toUpperCase()\r\n System.out.println(novo2);\r\n\r\n char c = nome.charAt(3); //char i\r\n System.out.println(c);\r\n\r\n int pos = nome.indexOf(\"rio\");\r\n System.out.println(pos);\r\n\r\n String sub = nome.substring(1);\r\n System.out.println(sub);\r\n\r\n for (int i = 0; i < nome.length(); i++) {\r\n System.out.println(nome.charAt(i));\r\n }\r\n\r\n StringBuilder builder = new StringBuilder(\"Socorram\");\r\n builder.append(\"-\");\r\n builder.append(\"me\");\r\n builder.append(\", \");\r\n builder.append(\"subi \");\r\n builder.append(\"no \");\r\n builder.append(\"ônibus \");\r\n builder.append(\"em \");\r\n builder.append(\"Marrocos\");\r\n String texto = builder.toString();\r\n\r\n System.out.println(texto);\r\n }", "private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}", "void mo1932a(String str);", "private static String rep(String input) {\n\t\tchar[] ca = input.toCharArray();\n\t\tint c = 0;\n\t\tfor (int i = 0, n = ca.length; i < n; i++) {\n\t\t\tif (ca[i] == '\\'')\n\t\t\t\tc++;\n\t\t\telse if (ca[i] == ',' && ((c % 2) != 0))\n\t\t\t\tca[i] = '~';\n\t\t}\n\t\treturn String.valueOf(ca);\n\t}", "String mo1888b(String str, String str2, String str3, String str4);", "public static String SimpleSymbols(String str) {\n \n for(int i = 0; i < str.length(); i++){\n \n if(Character.isLetter(str.charAt(i))){\n \n if(i == 0){\n return \"false\";\n }\n if(str.charAt(i - 1) != '+'){\n return \"false\";\n }\n if((i+ 1) < str.length()){\n if(str.charAt(i+1) != '+'){\n return \"false\";\n }\n }\n }\n }\n \n return \"true\";\n \n }", "private CharSequence replacewithUni(String uni1, String myString2) {\n\t\ttry {\n JSONArray rule_array = new JSONArray(uni1);\n int max_loop = rule_array.length();\n\n myString2 = myString2.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString2 = myString2.replaceAll(from, to);\n myString2 = myString2.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\t\tmyString2 = myString2.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString2;\n }", "String mo1889a(String str, String str2, String str3, String str4);", "void mo9697a(String str);", "private String RemoveCharacter(String strName) {\r\n String strRemover = \"( - )|( · )\";\r\n String[] strTemp = strName.split(strRemover);\r\n if (strTemp.length >= 2) {\r\n strName = strTemp[0].trim() + \" - \" + strTemp[1].trim();\r\n }\r\n\r\n strName = strName.replace(\"–\", \"-\");\r\n strName = strName.replace(\"’\", \"'\");\r\n strName = strName.replace(\":\", \",\");\r\n\r\n strName = strName.replace(\"VA - \", \"\");\r\n strName = strName.replace(\"FLAC\", \"\");\r\n return strName;\r\n }", "public static void main(String[] args) {\r\n\t\tString s = \"navneet\";\r\n\t\tchar c = 'm';\r\n\t\t\r\n\t\t\tSystem.out.println(s.indexOf(c));\r\n\t\t\t//s.replace(s.indexOf(ch), newChar)\r\n\t\t\t//s.substring(1);\r\n\t\t\tStringBuilder myName = new StringBuilder(\"domanokz\");\r\n\t\t\tmyName.setCharAt(4, 'x');\r\n\r\n\t\t\tSystem.out.println(myName);\r\n\t\t\r\n\t}", "static String stringCutter2(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n // pemotongan string untuk kelompok ke dua\n String sentence2 = s.substring(value, s.length());\n\n // perulangan untuk membalik setiap karakter pada kelompok kata ke dua\n String sentence2reverse = \"\";\n for (int i = sentence2.length() - 1; i >= 0; i--) {\n sentence2reverse += sentence2.toUpperCase().charAt(i);\n }\n return sentence2reverse;\n }", "private static String removeVowels(String s){\n \tif(s.toLowerCase().indexOf(\"a\")>=0){\n \t\ts=s.substring(0, s.toLowerCase().indexOf(\"a\"))+s.substring(s.toLowerCase().indexOf(\"a\")+1);\n \t\ts=removeVowels(s);\n \t}else if(s.toLowerCase().indexOf(\"e\")>=0){\n \t\ts=s.substring(0, s.toLowerCase().indexOf(\"e\"))+s.substring(s.toLowerCase().indexOf(\"e\")+1);\n \t\ts=removeVowels(s);\n \t}else if(s.toLowerCase().indexOf(\"i\")>=0){\n \t\ts=s.substring(0, s.toLowerCase().indexOf(\"i\"))+s.substring(s.toLowerCase().indexOf(\"i\")+1);\n \t\ts=removeVowels(s);\n \t}else if(s.toLowerCase().indexOf(\"o\")>=0){\n \t\ts=s.substring(0, s.toLowerCase().indexOf(\"o\"))+s.substring(s.toLowerCase().indexOf(\"o\")+1);\n \t\ts=removeVowels(s);\n \t}else if(s.toLowerCase().indexOf(\"u\")>=0){\n \t\ts=s.substring(0, s.toLowerCase().indexOf(\"u\"))+s.substring(s.toLowerCase().indexOf(\"u\")+1);\n \t\ts=removeVowels(s);\n \t}\n \treturn s;\n }", "public static String acronym(String phrase) {\n\t\tString[] arrPhrase = phrase.split(\" \", 0);\n\t\treturn arrPhrase[2];\n\t}" ]
[ "0.59782577", "0.59161115", "0.5903178", "0.57042533", "0.5657723", "0.5614543", "0.53602195", "0.53484374", "0.5346798", "0.533346", "0.5325291", "0.53192335", "0.53145903", "0.5270572", "0.52701116", "0.5263717", "0.5259071", "0.5244902", "0.52410114", "0.52279174", "0.52209413", "0.5213696", "0.5198166", "0.5172525", "0.51596844", "0.51382333", "0.512597", "0.51236606", "0.51047164", "0.5100349", "0.5097807", "0.50829184", "0.5080495", "0.507521", "0.5064653", "0.50621486", "0.506134", "0.5049412", "0.50488216", "0.50375146", "0.5029745", "0.50227696", "0.5021087", "0.49954057", "0.49893865", "0.4989303", "0.49828258", "0.49763095", "0.49761945", "0.49697748", "0.4964389", "0.49641132", "0.49636245", "0.49635133", "0.49591464", "0.49423566", "0.49290267", "0.49245864", "0.49219084", "0.4909347", "0.49092516", "0.49032623", "0.4900862", "0.48956448", "0.48943657", "0.4891561", "0.4881371", "0.48805657", "0.48734465", "0.4862913", "0.4861133", "0.48589578", "0.48579875", "0.48522234", "0.48518384", "0.4849717", "0.48480922", "0.48459432", "0.4844282", "0.48412058", "0.4840855", "0.48367265", "0.483505", "0.48341694", "0.48310718", "0.48228663", "0.48221025", "0.481761", "0.48171714", "0.48168185", "0.4816377", "0.4814186", "0.48120263", "0.480842", "0.47953203", "0.47879297", "0.47753102", "0.47702664", "0.4768868", "0.47649068" ]
0.5143172
25
method to insert user defined stock list or update
void insertOrUpdate(StockList stockList) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "stockFilePT102.StockDocument.Stock insertNewStock(int i);", "@Override\n\tpublic void addInStock(Stock s) {\n\t\n\t}", "int insert(ItemStockDO record);", "int insert(ItemStockDO record);", "int insertSelective(ItemStockDO record);", "public void addStoreStock(String name, int amount);", "public void setListOfStock( List<StockEntity> listOfStock ) {\n this.listOfStock = listOfStock;\n }", "@Override\n\tpublic void updateStock(Stock s) {\n\n\t\ttry {\n\t String sql = \"INSERT or Replace into stockTable (hlr,sim,card,easyL,easyLR,easyP,easyPR,cash) \"\n\t \t\t+ \"VALUES (?,?,?,?,?,?,?,?)\";\n\t \n\t prepStmt = connection.prepareStatement(sql);\n\t prepStmt.setInt(1, s.getHlr());\n\t prepStmt.setInt(2, s.getSim());\n\t prepStmt.setInt(3, s.getCard());\n\t prepStmt.setInt(4, s.getEasyLoad());\n\t prepStmt.setInt(5, s.getEasyLoadReturn());\n\t prepStmt.setInt(6, s.getEasyPaisa());\n\t prepStmt.setInt(7, s.getEasyPaisaReturn());\n\t prepStmt.setInt(8,s.getCash());\n\t \t\t \n\t prepStmt.executeUpdate();\n\t \n\n\t System.out.println(\">>> Successfully insert query working\"); \n\t } catch (SQLException ex) {\n \n\t \t System.out.println(\"*** Error: insert query is not working\");\n\t \t ex.printStackTrace();\n\t \t \n\t }\n\t\t\n\t\t\n\t}", "private void updateStocks(StockTransferTransactionRequest item) {\n\n Integer updatedQuantity = item.getQuantity();\n StockTraderServiceFactoryIF serviceFactory = new StockTraderServiceFactory();\n DematServiceIF dematService = serviceFactory.dematService();\n\n Optional<Integer> oldQuantity = dematService.getStockStatus(item.getUserName(),\n item.getStock());\n if(oldQuantity != null && oldQuantity.get() > 0) {\n updatedQuantity = oldQuantity.get() + item.getQuantity();\n }\n try(Connection conn = DriverManager.getConnection(Constants.DB_URL,\n Constants.USER,\n Constants.PASS);\n PreparedStatement stmt = conn.prepareStatement(\n Constants.MERGE_STOCK)) {\n stmt.setString(1, item.getUserName());\n stmt.setString(2, item.getStock().toString());\n stmt.setInt(3, updatedQuantity);\n stmt.execute();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void addOrUpdate() {\n try {\n Stokdigudang s = new Stokdigudang();\n if (!tableStok.getSelectionModel().isSelectionEmpty()) {\n s.setIDBarang(listStok.get(row).getIDBarang());\n }\n s.setNamaBarang(tfNama.getText());\n s.setHarga(new Integer(tfHarga.getText()));\n s.setStok((int) spJumlah.getValue());\n s.setBrand(tfBrand.getText());\n s.setIDKategori((Kategorimotor) cbKategori.getSelectedItem());\n s.setIDSupplier((Supplier) cbSupplier.getSelectedItem());\n s.setTanggalDidapat(dateChooser.getDate());\n\n daoStok.addOrUpdateStok(s);\n JOptionPane.showMessageDialog(this, \"Data berhasil disimpan!\");\n showAllDataStok();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Data gagal disimpan!\");\n }\n }", "stockFilePT102.StockDocument.Stock addNewStock();", "public void addWarehouseStock(String name, int amount);", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "public void add(Stock s)\n {\n stocks.add(s);\n }", "@Override\r\n\tpublic void stockInsert(adminStockVO vo) {\n\t\tadminDAO.stockInsert(vo);\r\n\t}", "int insertSelective(SwmsStockOutRecordDetail record);", "public void insertGestionStock(Map criteria);", "@Override\n\tpublic Integer insert(InvBaseStock baseStock) {\n\t\treturn invBaseStockDao.insert(baseStock);\n\t}", "@Override\n\tpublic void AddOrUpdate(Stock model) {\n\t\tif (model.getId() == 0){\n\t\t\t_stockDao.insert(model);\n\t\t}\n\t\telse {\n\t\t\t_stockDao.updateByPrimaryKey(model);\n\t\t}\n\t}", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addStock(Product p, int n) {\nif (p.id < 0) return;\nif (n < 1) return;\n\nfor (int i = 0; i < productCatalog.size(); i++) {\nProductStockPair pair = productCatalog.get(i);\nif (pair.product.id == p.id) {\nproductCatalog.set(i, new ProductStockPair(p, pair.stock + n));\nreturn;\n}\n}\nproductCatalog.add(new ProductStockPair(p, n));\n}", "public void buildStocks(List<String[]> stockData){\n for(int i = 0; i < stockData.size(); i++){\n this.addToStockManager(this.buildStock(i, stockData)); \n }\n }", "public interface StockDAO {\n public int getAmountAvailable(String stockName); //Retrieves amount of stock available from stock_initial table\n public List<StockItem> getStockList(); //Retrieves list of stocks for initial wallet values\n}", "void setStockArray(int i, stockFilePT102.StockDocument.Stock stock);", "public void add(Stock stock) {\n\t\tif(!isExist(stock.getSymbol())) {\n\t\t\tmItems.add(stock);\t\t\n\t\t\tnotifyDataSetChanged();\n\t\t}\n\t}", "public boolean saveOrUpdateStockExchange(StockExchange stockExchange);", "public List<StockItem> getStockList();", "private void addBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addBtnMouseClicked\n\n String id = pidTxt.getText().toString();\n String name = pnameTxt.getText().toString();\n String price = pperpriceTxt.getText().toString();\n String quantity = pquanityTxt.getText().toString();\n String date = pdateTxt.getText().toString();\n\n try {\n String Query = \"INSERT INTO `stock` (`Product_ID`, `Product_Name`,`Quantity`, `Entry_Date`,`Price`) VALUES (?, ?, ?, ?, ?)\";\n\n pstm = con.prepareStatement(Query);\n\n pstm.setInt(1, Integer.parseInt(id));\n pstm.setString(2, name);\n pstm.setInt(3, Integer.parseInt(quantity));\n pstm.setString(4, date);\n pstm.setInt(5, Integer.parseInt(price));\n pstm.executeUpdate();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Data Insertion Failed \");\n }\n refTable();\n\n\n }", "private StockData addSymbolToCurrentWatchList(String symbol)\r\n {\r\n debug(\"addSymbolToCurrentWatchList(\" + symbol + \")\");\r\n // Get the index into the current selected Tabpane\r\n int index = tabPane.getSelectedIndex();\r\n // Now grab our Table and Models\r\n HGTable table = (HGTable) tableVector.elementAt(index);\r\n StockDataTableModel dataModel = (StockDataTableModel) modelVector.elementAt(index);\r\n // Get the current Selected Row.\r\n int row = ((table.getSelectedRow() >= 0) ? table.getSelectedRow() : 0);\r\n\r\n debug(\"Insert Row After row [\" + row + \"] The Row being inserted is \" + (row + 1));\r\n dataModel.insert(row + 1);\r\n // Fire a notification that we are changing the table\r\n table.tableChanged(\r\n new TableModelEvent(dataModel, row + 1, row + 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));\r\n // Set the row to be selected\r\n table.setRowSelectionInterval(row, row);\r\n table.repaint();\r\n // Now Get the StockData Obj at that row\r\n StockData sd = (StockData) dataModel.getData().elementAt(row + 1);\r\n // Now we have the Object - We still Need to pre-fill in the data\r\n sd.setSymbol(symbol, 0.00);\r\n // Set the Name as we are still Searching\r\n sd.setName(\"Search for \" + symbol);\r\n // Lets Load the Historic Data.\r\n this.loadHistoricData(sd);\r\n // We are done now.\r\n debug(\"addSymbolToCurrentWatchList(\" + symbol + \") - complete\");\r\n\r\n return sd;\r\n }", "double addStock(String identifier, double amount, String date, double commission)\n throws IllegalArgumentException;", "public void addToStockManager(Stock stock){\n this.stockAnalyzer.addStock(stock);\n }", "public void addtoDB(String plate,String date,double km,ObservableList<Service> serv){\n \n plate = convertToDBForm(plate);\n \n try {\n stmt = conn.createStatement();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if(!checkTableExists(plate)){ \n try {\n stmt.execute(\"CREATE TABLE \" + plate + \"(DATA VARCHAR(12),QNT DOUBLE,DESC VARCHAR(50),PRICE DOUBLE,KM DOUBLE);\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n for(int i=0;i<serv.size();i++){\n \n double qnt = serv.get(i).getQnt();\n String desc = serv.get(i).getDesc();\n double price = serv.get(i).getPrice();\n \n try {\n stmt.executeUpdate(\"INSERT INTO \" + plate + \" VALUES('\" + date + \"',\" + Double.toString(qnt) + \",'\" + desc + \"',\" + Double.toString(price) + \",\" + Double.toString(km) + \");\");\n }catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n try {\n stmt.close();\n } catch (SQLException ex) {\n Logger.getLogger(DBHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n\n }", "public void createOrUpdateItem(Stockitem stockitem) {\n\t\tstockitemDAO.save(stockitem);\n\t}", "public void buyStock(Stock stock) {\n\t\tportfolio.add(stock);\n\t}", "public void setStocksAtHome(List<String> stockList){\n HashSet<String> hashSet = new HashSet<String>(stockList);\n List<String> stocksAtHome = getStocksAtHome();\n hashSet.addAll(stocksAtHome);\n\n //To proceed with easy storage\n stockList = new ArrayList<String>(hashSet);\n\n Gson gson = new GsonBuilder().create();\n String gsonStockList = gson.toJson(stockList);\n editor.putString(STOCK_HOME_SET, gsonStockList);\n editor.commit();\n }", "public Stock createStock(Stock stock){\n this.open();\n ContentValues stockEntry = new ContentValues();\n stockEntry.put(SQLiteHelper.COL_ITEM_NAME, stock.getItemName());\n stockEntry.put(SQLiteHelper.COL_ITEM_QUANTITY, stock.getItemQuantity());\n stockEntry.put(SQLiteHelper.COL_ITEM_PRICE, stock.getItemPrice());\n stockEntry.put(SQLiteHelper.COL_CREATED_ON, stock.getCreatedOn());\n stockEntry.put(SQLiteHelper.COL_CREATED_BY, stock.getCreatedBy());\n stockEntry.put(SQLiteHelper.COL_MODIFIED_ON, stock.getModifiedOn());\n stockEntry.put(SQLiteHelper.COL_MODIFIED_BY, stock.getModifiedBy());\n stockEntry.put(SQLiteHelper.COL_OBJECT_ID, stock.getObjectId());\n Log.e(\"Stock object Id\", stock.getObjectId());\n\n long insertId = database.insert(SQLiteHelper.TABLE_STOCK,null, stockEntry);\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns\n , SQLiteHelper.COL_ID + \" =? \"\n , new String[]{String.valueOf(insertId)}\n , null, null, null\n );\n \n cursor.moveToFirst();\n Stock newStock = cursorToStock(cursor); \n cursor.close();\n this.close();\n \n return newStock;\n }", "public void addStock(int qtearajouter) {\n\t\tthis.stock += qtearajouter;\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "@Override\n\t\tpublic void addRawitem(Rawitem Rawitem) {\n\t\t\tString sql=\"INSERT INTO rawitem(suppliedby,rquantity,riprice,rstock)\"\n\t\t\t\t\t+ \" values (:suppliedby,:rquantity,:riprice,:rstock)\";\n\t\t\tnamedParameterJdbcTemplate.update(sql,getSqlParameterByModel(Rawitem));\n\t\t}", "@Override\n\tpublic boolean updateStock(int quant) {\n\t\treturn false;\n\t}", "@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }", "public void insert_values_in_list_items_local_db(String AgentID, String selected_ln, int list_incr) {\n\n // non_deleted_arraylist\n ArrayList<String> non_deleted_prod_id = get_non_deleted_product_id(selected_ln, AgentID, list_incr);\n\n // define contentvalues object\n ContentValues copy_values_int_list_item = new ContentValues();\n\n // set values of list items\n copy_values_int_list_item.put(GlobalProvider.LI_List_Name, selected_ln);\n copy_values_int_list_item.put(GlobalProvider.LI_Increment,list_incr);\n copy_values_int_list_item.put(GlobalProvider.LI_Login_User_Id,AgentID);\n copy_values_int_list_item.put(GlobalProvider.LI_deleted,\"0\");\n\n // loop on array of prod ids selected by user\n for(String curr_prod_ids : product_ids_for_list){\n\n // set prod ids into contentvalues object\n copy_values_int_list_item.put(GlobalProvider.LI_Product_ID, curr_prod_ids);\n if(!non_deleted_prod_id.contains(curr_prod_ids) || non_deleted_prod_id.isEmpty()) {\n // firing query to insert into local db of list item\n Uri uri = getContentResolver().insert(GlobalProvider.CONTENT_URI_List_Item,\n copy_values_int_list_item);\n Toast.makeText(this,\n \" Added data successfully in \" + selected_ln ,Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this,\"Product is already exists in \" + selected_ln,Toast.LENGTH_LONG).show();\n }\n }\n }", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "public ArrayList<Stock> addDefaultStocks() {\n Stock amzn = new Stock(\"Amazon\", \"AMZN\", new Dollar(2474.00), 100); \n Stock fb = new Stock(\"Facebook\", \"FB\", new Dollar(204.71), 100); \n Stock msft = new Stock(\"Microsoft\", \"MSFT\", new Dollar(174.57), 100); \n Stock googl = new Stock(\"Alphabet\", \"GOOGL\", new Dollar(1317.32), 100); \n Stock baba = new Stock(\"Alibaba\", \"BABA\", new Dollar(194.48), 100); \n Stock fis = new Stock(\"Fidelity\", \"FIS\", new Dollar(26.01), 100); \n Stock crm = new Stock(\"Salesforce\", \"CRM\", new Dollar(156.37), 100); \n Stock ma = new Stock(\"Mastercard\", \"MA\", new Dollar(268.74), 100); \n Stock v = new Stock(\"Visa\", \"V\", new Dollar(175.57), 100); \n Stock nflx = new Stock(\"Netflix\", \"NFLX\", new Dollar(415.27), 100); \n\n stocks.add(amzn); \n stocks.add(fb); \n stocks.add(msft); \n stocks.add(googl); \n stocks.add(baba); \n stocks.add(fis);\n stocks.add(crm); \n stocks.add(ma); \n stocks.add(v); \n stocks.add(nflx); \n\n return stocks; \n }", "@Override\n\tpublic void addItems(Workspace workspace) {\n//\t\tSession currentSession = sessionFactory.getCurrentSession();\n//\t\tfor(Cart_items myCart : workspace.getCartItems()) {\t\n//\t\t\tcurrentSession.save(myCart);\n//\t\t}\n\t}", "public void updateStockData() {\n\t\t\ttry {\n\t\t\t\tthis.dataURL = new URL(this.url);\n\t\t\t} catch (final MalformedURLException e) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"CRITICAL ERROR: The impossible has happened! The hard-hoded URL was malformed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\tScanner scanner;\n\t\t\ttry {\n\t\t\t\tscanner = new Scanner(this.dataURL.openStream());\n\t\t\t\twhile (scanner.hasNextLine())\n\t\t\t\t\ttry {\n\t\t\t\t\t\tscanner\n\t\t\t\t\t\t\t\t.findInLine(Pattern\n\t\t\t\t\t\t\t\t\t\t.compile(\"([0-9.]*),\\\"([0-9a-zA-Z._-]*)\\\",\\\"([a-zA-Z._\\\\s-]*)\\\"\"));\n\t\t\t\t\t\tfinal MatchResult result = scanner.match();\n\t\t\t\t\t\tboolean found = false;\n\t\t\t\t\t\tfor (final StockCompany company : StockBrokerImpl.this.stockData)\n\t\t\t\t\t\t\tif (company.getCompanySymbol().equals(\n\t\t\t\t\t\t\t\t\tresult.group(2))) {\n\t\t\t\t\t\t\t\tfinal Double stockPrice = Double\n\t\t\t\t\t\t\t\t\t\t.parseDouble(result.group(1));\n\t\t\t\t\t\t\t\tcompany.setStockPrice(stockPrice);\n\t\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!found)\n\t\t\t\t\t\t\tStockBrokerImpl.this.stockData\n\t\t\t\t\t\t\t\t\t.add(new StockCompany(result.group(3),\n\t\t\t\t\t\t\t\t\t\t\tresult.group(2), Double\n\t\t\t\t\t\t\t\t\t\t\t\t\t.parseDouble(result\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.group(1))));\n\n\t\t\t\t\t\tscanner.nextLine();\n\n\t\t\t\t\t} catch (final NumberFormatException e) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"CRITICAL ERROR: Update data corrupted. [Virtually impossible]\");\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\tscanner.close();\n\t\t\t} catch (final IOException e) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"ERROR: Connection to stock price update feed could not be established.\");\n\t\t\t}\n\t\t}", "stockFilePT102.StockFileDocument.StockFile addNewStockFile();", "@Override\r\n\tpublic void inserOrder(Good_ordVO good_ordVO, List<PointgoodsVO> list) {\n\t\t\r\n\t}", "public void addProduct(Product p){\n stock.add(p);\n }", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }", "private void updateSuiteItems(String rowDatas, CustomSuite newCustomSuite) {\n List<SuiteItem> suiteItems = newCustomSuite.suiteItems;\n //创建一个List容器记录原来的 明细ID\n List<Long> itemIds = new ArrayList<>();\n for (SuiteItem suiteItem : suiteItems) {\n if(!suiteItem.deleted)\n itemIds.add(suiteItem.id);\n }\n\n String[] rowData = rowDatas.split(\";\");\n SuiteItem suiteItem;\n CustomStockItem customStockItem;\n for (String data : rowData) {\n String[] datas = data.split(\",\");\n if (datas.length > 1) {\n long id = Long.valueOf(datas[0]);\n if (id != 0) {\n if(itemIds.contains(id)){\n //update\n suiteItem = suiteItemRepository.findOne(id);\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n itemIds.remove(id);//更新一个后 从Id集合中移除\n }\n } else {\n //新增\n\n customStockItem = customStockItemRepository.findOne(Long.valueOf(datas[1]));\n\n List<SuiteItem> isHasOne = suiteItemRepository.findBySkuItemAndCostAndDeleted(customStockItem, Double.valueOf(datas[4]), true);\n if(isHasOne != null && isHasOne.size()>0 ){\n isHasOne.get(0).deleted = false;\n if (datas[2].equals(\"true\")) {\n isHasOne.get(0).times = -1;\n } else {\n isHasOne.get(0).times = Integer.valueOf(datas[3]);\n }\n }else{\n suiteItem = new SuiteItem();\n suiteItem.skuItem = customStockItem;\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n suiteItems.add(suiteItem);\n suiteItemRepository.save(suiteItem);\n }\n }\n }\n }\n //rowData操作完成\n for (Long itemId : itemIds) {\n SuiteItem deleteOne = suiteItemRepository.findOne(itemId);\n deleteOne.deleted = true;\n }\n// return suiteItems;\n }", "@Override\n public void insertUpdate(DocumentEvent e) {\n String order = \"\";\n if(fromSplit != null && toSplit != null){\n String query = \n \"Select * from StockOut where cast(dbo.StockOut.Date as date ) between '\"+fromSplit[0]+\"' and \"\n + \" '\"+toSplit[0]+\"' and \" +\n \" (ProductId like '%\"+searchtf.getText()+\"%' or Barcode like '%\"+searchtf.getText()+\"%' or\"\n + \" ProductName like '%\"+searchtf.getText()+\"%' or ProductDesc like '%\"+searchtf.getText()+\"%' or \"\n + \"Category \" \n + \" like '%\"+searchtf.getText()+\"%' or Quantity like '%\"+searchtf.getText()+\"' or \"\n + \"SellPrice like '%\"+searchtf.getText()+\"'or Total like '%\"+searchtf.getText()+\"%' or \"\n + \"InvoiceNo like '%\"+searchtf.getText()+\"%' ) order by invoiceNo \";\n findUsers(query);\n }else{\n String query = \"Select * from StockOut where ProductId like '%\"+searchtf.getText()+\"%' or Barcode like '%\"+searchtf.getText()+\"%' or\"\n + \" ProductName like '%\"+searchtf.getText()+\"%' or ProductDesc like '%\"+searchtf.getText()+\"%' or \"\n + \"Category \" \n + \" like '%\"+searchtf.getText()+\"%' or Quantity like '%\"+searchtf.getText()+\"' or \"\n + \"SellPrice like '%\"+searchtf.getText()+\"'or Total like '%\"+searchtf.getText()+\"%' or \"\n + \"InvoiceNo like '%\"+searchtf.getText()+\"%' order by invoiceNo\";\n findUsers(query);\n }\n \n }", "public void restock(Connection con, Statement s, int prod_id, int cat_id, int deficit )\n {\n int qtyToOrder = deficit + 100;\n int wareOrdId = assignID(con, s, \"store_orders\");\n String storeOrders = \"insert into store_orders(order_num, Loc_id, date_ordered) values(\" + wareOrdId +\", \" + Loc_id + \", '\"+date + \"')\";\n String storeOrder = \"insert into store_order(order_num, purpose) values(\" + assignID(con, s, \"store_order\") +\", '\"+purpose+\"')\";\n String vendor = findCheapVendor(con, s, prod_id, cat_id);\n double price = getStoreBuysPrice(con, s, vendor, prod_id, cat_id);\n String updateOrdFrom = \"insert into store_order_from(order_num, name) values(\" + wareOrdId + \", '\" + vendor + \"')\";\n String updateStoreBuys = \"insert into store_buys(order_num, cat_id, prod_id, qty, price, buy_date) values(\" + wareOrdId + \", \" + cat_id + \", \" + prod_id + \", \" + qtyToOrder + \", \" + price + \", '\" + date +\"')\";\n String updateStoredIn = \"update stored_in set qty = \" + (qtyToOrder) + \" where prod_id = \" + prod_id + \" and cat_id = \" + cat_id + \" and Loc_id = \" + Loc_id;\n try\n {\n int i = s.executeUpdate(storeOrder);\n i = s.executeUpdate(storeOrders);\n i = s.executeUpdate(updateOrdFrom);\n i = s.executeUpdate(updateStoreBuys);\n i = s.executeUpdate(updateStoredIn);\n }catch(Exception e)\n {\n System.out.println(\"updates failed\");\n System.exit(0);\n }\n }", "SimpleStock(String newsymbol, String newname, double newpreviousClosingPrice, double newcurrentPrice ) {\n\t\tSymbol = newsymbol;\n\t\tName = newname;\n\t\tpreviousClosingPrice = newpreviousClosingPrice;\n\t\tcurrentPrice = newcurrentPrice;\n\t \t }", "@Override\n\tpublic boolean addStockAlarmBill(StockAlarmBillPO bill) throws RemoteException {\n\t\ttry {\t\n\t\t\tStatement statement_1 = con.createStatement();\t\n\t\t\tStatement statement_2 = con.createStatement();\t\n\t\t\tStatement statement_3 = con.createStatement();\t\n\t\t\tint state = BillState.getIntByState(bill.getState());\n\t\t\tString id = bill.getId();\n\t\t\tjava.util.Date date = bill.getDate();\n\t\t\tjava.sql.Date d = new java.sql.Date(date.getTime());\n\t\t\tString operatorid = bill.getOperatorID();\n\t\t\tString wareid = bill.getWareID();\n\t\t\tString sql_1 = \"insert into stockalarmbill values(' \" + state +\"','\"+ id +\"','\"+ d+\"','\"+ operatorid+\"','\"\n\t\t\t\t\t+ wareid+\"')\";\t\t\n\t\t\tstatement_1.execute(sql_1);\n\n\t\t\tArrayList<StockAlarmBillItem> itemList = bill.getItemList();\n\n\t\t\tString sql_2 = \"CREATE TABLE IF NOT EXISTS erp.stock\" + id +\t\t \n\t\t\t\t\t\" (Number char(10), \" +\t\t \n\t\t\t\t\t\"Name char(10), \" +\t\t \n\t\t\t\t\t\"Amount bigint(20),\" +\n\t\t\t\t\t\"AlarmAmount bigint(20));\";\n\t\t\t statement_2.execute(sql_2);\n\t\t\tfor(int i=0 ; i<itemList.size() ; i++) {\n\t\t\t\tStockAlarmBillItem item = itemList.get(i);\n\t\t\t\tString sql_3 = \"insert into stock\"\n\t\t\t\t\t\t+id+ \" values(' \" + item.getNumber() +\"','\"+ item.getName() +\"',\"+ item.getAmount() \n\t\t\t\t\t\t+\",\"+ item.getAlarmAmount()+\")\";\n\t\t\t\tstatement_3.execute(sql_3);\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \t\n\t\treturn false;\n\t}", "public void understockCase(Connection conn, String client, int amount, String product, int stock) {\n\tString sql = \"INSERT INTO javadbconnection.understock_products(productName, current_stock, ordered_quantity) Values(\" + product + \",\" + stock + \",\" + amount + \")\";\n\ttry {\n\tPreparedStatement stmt = conn.prepareStatement(sql);\n\tstmt.executeUpdate(sql);\n\t}catch (SQLException e) {\n\tSystem.err.println(e.getMessage()); \n\t\t\t}\n\t\t}", "int insert(SellType record);", "public interface StockItem {\n String getSymbol();\n\n String getName();\n\n BigDecimal getValue();\n\n int getVolume();\n\n Date getLastTradeDateTime();\n\n BigDecimal getGains();\n\n BigDecimal getOpenValue();\n\n BigDecimal getCloseValue();\n}", "public void createNewStock(Stock stock) throws DuplicateEntry, InvalidDateEntry {\n\t\tif (!validateDate(stock.getDate())) {\n\t\t\tlog.error(\"Date entered is a future date for:\" + stock.getStock() + \"date given : \" + stock.getDate());\n\t\t\tthrow new InvalidDateEntry(\n\t\t\t\t\t\"Date entered is a future date for: \" + stock.getStock() + \" date given : \" + stock.getDate());\n\t\t}\n\n\t\tif (checkForDuplicates(new StockId(stock.getStock(), stock.getDate()))) {\n\t\t\tlog.error(\"Duplcate Record for :\" + stock.getStock() + \"on \" + stock.getDate());\n\t\t\tthrow new DuplicateEntry(\"Duplcate Record for : \" + stock.getStock() + \" on \" + stock.getDate());\n\t\t}\n\n\t\tstockRepo.save(stock);\n\n\t}", "public void AddAvailableDates()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < openDates.size(); i++)\n\t\t\t{\n\t\t\t\tboolean inTable = CheckAvailableDate(openDates.get(i)); \n\t\t\t\tif(inTable == false)\n\t\t\t\t{\n\t\t\t\t\tquery = \"INSERT INTO Available(available_hid, price_per_night, startDate, endDate)\"\n\t\t\t\t\t\t\t+\" VALUE(\"+hid+\", \"+price+\", '\"+openDates.get(i).stringStart+\"', '\"+openDates.get(i).stringEnd+\"')\";\n\t\t\t\t\tint result = con.stmt.executeUpdate(query); \n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void persistToDatabase(Stock stock, int id) throws ParseException {\n\n\n // Creating the config instance & passing the hibernate config file.\n Configuration config = new Configuration();\n config.configure(\"hibernate.cfg.xml\");\n\n // Session object to start the db transaction.\n Session s = config.buildSessionFactory().openSession();\n\n // Transaction object to begin the db transaction.\n Transaction t = s.beginTransaction();\n\n Stock_infoDAO stock_infoDAO = new Stock_infoDAO();\n stock_infoDAO.setId(id);\n stock_infoDAO.setSymbol(stock.getSymbol());\n BigDecimal price = new BigDecimal(stock.getPrice());\n stock_infoDAO.setPrice(price);\n\n String inDate= stock.getTime();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Timestamp ts = new Timestamp(((java.util.Date)dateFormat.parse(inDate)).getTime());\n stock_infoDAO.setTime(ts);\n\n\n // Saving the stockinfo object to the db.\n s.persist(stock_infoDAO);\n\n // Committing the transaction in the db.\n t.commit();\n\n System.out.println(\"\\n===================\\n\");\n\n\n // Closing the session object.\n s.close();\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void setStock(String stock) {\n this.stock = stock;\n }", "public void addProduct(Product item)\n {\n stock.add(item);\n }", "public interface StockDao {\n //包含仓库、入库、出库信息\n\n //添加仓库信息\n boolean addStock(Stock stock);\n //更新仓库信息\n boolean updateStock(Stock stock);\n //增加入库记录\n boolean addInnerStock(InnerStock innerStock);\n //查看入库记录\n List<InnerStock> listInnerStock();\n\n}", "private void actualizarStock(String codBarras) throws SQLException {\n\n }", "@Override\n\tpublic <S extends Basket> List<S> insert(Iterable<S> arg0) {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(ItemStockDO record);", "public void initStockData() {\n\t\t\tStockBrokerImpl.this.stockData = new ArrayList<StockCompany>();\n\t\t\tthis.updateStockData();\n\t\t\tfor (final StockCompany company : StockBrokerImpl.this.stockData)\n\t\t\t\tSystem.out.println(company.getStockPrice());\n\n\t\t}", "@Modifying(clearAutomatically = true)\n\t@Lock(value = LockModeType.OPTIMISTIC_FORCE_INCREMENT)\n @Query(\"UPDATE Item i SET i.quantity = i.quantity + ?1 WHERE i =?2\")\n int addToStock(double qty, Item item);", "public interface StockDao {\n List<Stock> findAll();\n\n void save(Stock stock);\n\n Stock findById(long id);\n}", "private void refillStock(ArrayList<Integer> stock) {\n\t\tgetSetUpMachine().setFork_stock(getSetUpMachine().getFork_stock() + stock.get(2));\n\t\tgetSetUpMachine().setNapkin_stock(getSetUpMachine().getNapkin_stock() + stock.get(3));\n\t\tgetSetUpMachine().setSpoon_stock(getSetUpMachine().getSpoon_stock() + stock.get(1));\n\t\tgetSetUpMachine().setKnife_stock(getSetUpMachine().getKnife_stock() + stock.get(0));\n\t\tSystem.out.format(\"\\n[ %d: K - %d: S - %d: F - %d: N ]\\n\", getSetUpMachine().getKnife_stock(),\n\t\t\t\tgetSetUpMachine().getSpoon_stock(), getSetUpMachine().getFork_stock(),\n\t\t\t\tgetSetUpMachine().getNapkin_stock());\n\t}", "public void setStock(int stock) {\n this.stock = stock;\n }", "public void setStock(int stock) {\n this.stock = stock;\n }", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "public StockExchange()\n {\n stocks = new ArrayList<Stock>();\n }", "java.util.List<stockFilePT102.StockDocument.Stock> getStockList();", "private void pushSavedExpenseLineItem(){\n //Cursor cursor = getExpenseStatusCursor(SyncStatus.SAVED_REPORT);\n Cursor cursor = getSavedExpenseLineItemCursor();\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n do {\n final Long expenseBaseId = cursor.getLong(\n cursor.getColumnIndex(ExpenseEntry._ID));\n\n ExpenseLineItem expenseLineItem = new ExpenseLineItem();\n\n expenseLineItem.setDescription(\n cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_DESCRIPTION)));\n\n expenseLineItem.setExpenseReportId(cursor.getInt(\n cursor.getColumnIndex(ExpenseEntry.COLUMN_REPORT_ID)));\n\n expenseLineItem.setExpenseDate(\n cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_EXPENSE_DATE)));\n\n expenseLineItem.setCategory(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_CATEGORY)));\n\n expenseLineItem.setCost(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_COST)));\n\n expenseLineItem.setHst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_HST)));\n expenseLineItem.setGst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_GST)));\n expenseLineItem.setQst(cursor.getFloat(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_QST)));\n expenseLineItem.setCurrency(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_CURRENCY)));\n expenseLineItem.setRegion(cursor.getString(cursor.getColumnIndex(\n ExpenseEntry.COLUMN_REGION)));\n\n //TODO: receipt\n\n try {\n ERTRestApi.apiAddExpenseLineItem(\n expenseLineItem,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Gson gson = new GsonBuilder().setDateFormat\n (\"yyyy-MM-dd'T'HH:mm:ss\").create();\n ExpenseLineItem expenseLineItemResponse =\n gson.fromJson(response.toString(),\n ExpenseLineItem.class\n );\n\n updateExpenseLineItemSyncStatus(expenseBaseId,\n SyncStatus.SYNCED\n );\n\n setExpenseLineItemValuesFromServer(\n expenseBaseId,\n expenseLineItemResponse\n );\n\n }\n },\n\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n\n Log.e(LOG_TAG, error.getMessage());\n\n }\n }\n );\n } catch (ERTRestApiException | JSONException e) {\n Log.e(LOG_TAG, e.getMessage());\n }\n\n updateExpenseLineItemSyncStatus(expenseBaseId,SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }", "void bulkInsertOrReplace (List<Consumption> entities);", "@Override\r\n\tpublic void stockUpdate(adminStockVO vo) {\n\t\tadminDAO.stockUpdate(vo);\r\n\t}", "public interface StockMapper {\n void addTable(String stockId);\n List<Stock> listExampleStock();\n}", "@Override\n\tpublic <S extends Basket> List<S> save(Iterable<S> arg0) {\n\t\treturn null;\n\t}", "int insert(OpeningRequirement record);", "public void updateStock(String[] itemsList) {\n // for each item name in list\n for (int i = 0; i < itemsList.length; i++) {\n int firstFoundIndex = findIndexByName(itemsList[i]);\n // if such item was found\n if (firstFoundIndex > -1) {\n FoodItem firstFoundItem = this._stock[firstFoundIndex];\n int firstFoundQuantity = firstFoundItem.getQuantity();\n // if 1 piece left, remove the item because quantity should be 0 - so it's out of stock;\n if (firstFoundQuantity == 1) {\n removeAtIndex(firstFoundIndex);\n }\n else {\n // otherwise, decrease the quantity by 1.\n firstFoundItem.setQuantity(firstFoundQuantity-1);\n }\n }\n // otherwise just ignore\n }\n }", "int insert(R_dept_trade record);", "LiveStockDatabase(LiveStock liveStock){\r\n\t\tthis.liveStock = liveStock;\r\n\t}", "public synchronized static void addShop(String designation, String description, int loyer, int surface, int niveau, String localisation, List<Integer> ListidType, Connection c) throws SQLException {\n PreparedStatement myStmt = null;\r\n myStmt = c.prepareStatement(\"insert into magasin (designation,description,loyer,superficie,niveau,localisation) values (?,?,?,?,?,?) \");\r\n\r\n //The attributes' values are placed in the same order as \"?\".\r\n myStmt.setString(1, designation);\r\n myStmt.setString(2, description);\r\n myStmt.setInt(3, loyer);\r\n myStmt.setInt(4, surface);\r\n myStmt.setInt(5, niveau);\r\n myStmt.setString(6, localisation);\r\n myStmt.executeUpdate();\r\n Statement myStmt2 = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs = myStmt2.executeQuery(\"select last_insert_id() as last_id from magasin\");\r\n myRs.next();\r\n int lastid = myRs.getInt(\"last_id\");\r\n //This request insert the type of the shop in database;\r\n for (int idType : ListidType) {\r\n if (idType != 0) {\r\n PreparedStatement myStmt3 = null;\r\n myStmt3 = c.prepareStatement(\"insert into magasin_has_type values (?,?)\");\r\n myStmt3.setInt(1, lastid);\r\n myStmt3.setInt(2, idType);\r\n myStmt3.executeUpdate();\r\n }\r\n }\r\n }", "@Override\n\tpublic void importData(List<Schedule> listData) {\n\t\tSession session = getCurrentSession();\n\t\tif (listData != null && !listData.isEmpty()) {\n\t\t\tlistData.forEach((schedule) -> {\n\t\t\t\tsession.saveOrUpdate(schedule);\n\t\t\t});\n\t\t}\n\n\t}", "@Override\r\n\tpublic void insert(List<MonitoredSupermarket> msList, int userId) throws SQLException {\r\n\t\tcon = ConnectionPoolManager.getPoolManagerInstance().getConnectionFromPool();\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\tString query = \"insert into monitored_supermarket(id_user,id_supermarket) values(?, ?)\";\r\n\r\n\t\tint insertsNumber = msList.size();\r\n\r\n\t\ttry{\r\n\t\t\tps = con.prepareStatement(query);\r\n\r\n\t\t\tfor(int i = 0; i < insertsNumber; i++){\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tps.setInt(1, userId);\r\n\t\t\t\t\tps.setInt(2, msList.get(i).getId_supermarket().getId_supermarket());\r\n\t\t\t\t\tps.executeUpdate();\r\n\t\t\t\t}catch (SQLException e) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} \t\r\n\t\t\t}\r\n\t\t} finally{\r\n\t\t\tConnectionPoolManager.getPoolManagerInstance().returnConnectionToPool(con);\r\n\t\t}\r\n\t\treturn;\r\n\r\n\t}", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "private void addFinanceItem(FinanceUnitData unitData, boolean update) {\n Calendar today = Calendar.getInstance();\n\n FinanceDailyData lastDateData = this.financeDataList.size() > 0 ? this.financeDataList.get(0) : null;\n if (lastDateData != null\n && today.get(Calendar.YEAR) == lastDateData.getDate().get(Calendar.YEAR)\n && today.get(Calendar.MONTH) == lastDateData.getDate().get(Calendar.MONTH)\n && today.get(Calendar.DAY_OF_MONTH) == lastDateData.getDate().get(Calendar.DAY_OF_MONTH)) {\n\n //Last day is today.\n lastDateData.getDataList().add(unitData);\n } else {\n FinanceDailyData todayData = new FinanceDailyData();\n todayData.setDate(today);\n todayData.getDataList().add(unitData);\n financeDataList.add(todayData);\n }\n\n // Refresh UI.\n if(update){\n updateFinanceList();\n }\n }", "public void stockItem(String upc, int qty) \n\n\t\t\tthrows SQLException, ClassNotFoundException, IOException\n\n\t\t\t{\n\n\t\tif(qty < 0 )\n\n\t\t\t//sanity check\n\n\t\t\tthrow new IOException(\"Quantity input cannot be less than 0.\");\n\n\n\n\t\tif(this.conn == null)\n\n\t\t\tthis.conn = JDBCConnection.getConnection();\n\n\n\n\t\tPreparedStatement stmt = conn.prepareStatement(\n\n\t\t\t\t\"UPDATE Item \" +\n\n\t\t\t\t\t\t\"SET stock = stock + ? \" +\n\n\t\t\t\t\"WHERE upc = ? \");\n\n\t\tstmt.setInt(1, qty);\n\n\t\tstmt.setString(2, upc);\n\n\t\ttry\n\n\t\t{\n\n\t\t\tint update = stmt.executeUpdate();\n\n\t\t\tif(update == 1)\n\n\t\t\t\treturn;\n\n\t\t\telse if(update == 0)\n\n\t\t\t\t//if none is update\n\n\t\t\t\tthrow new SQLException(\"The Item with upc \" + upc + \" does \" +\n\n\t\t\t\t\t\t\"not exist.\");\n\n\t\t\telse\n\n\t\t\t\t//Fatal error: more than 1 tuple is updated -> duplicate upc!!!\n\n\t\t\t\tthrow new SQLException(\"Fatal Error: Duplicate UPC!\");\n\n\t\t}\n\n\t\tfinally\n\n\t\t{\n\n\t\t\tstmt.close();\n\n\t\t}\n\n\t\t\t}", "void setStockArray(stockFilePT102.StockDocument.Stock[] stockArray);", "@Kpi(\"ID_KPI_AGENCY_EXPORT_STOCK_CREATE_UNDER_LYING\")\n @Secured(\"@\")\n public void doCreateUnderlyingStock() {\n try {\n //validate ngay nhap phai la dinh dang so, va phai la so nguyen duong\n List<StockTransDetailDTO> lsDetailDTOs = Lists.newArrayList();\n List<StockTransFullDTO> lsStockTransFull = listProductTag.getLsStockTransFull();\n Long totalDepositPrice = 0L;\n for (StockTransFullDTO stockTransFullDTO : lsStockTransFull) {\n StockTransDetailDTO stockTransDetailDTO = new StockTransDetailDTO();\n stockTransDetailDTO.setStockTransDetailId(stockTransFullDTO.getStockTransDetailId());\n stockTransDetailDTO.setProdOfferId(stockTransFullDTO.getProdOfferId());\n stockTransDetailDTO.setStateId(stockTransFullDTO.getStateId());\n stockTransDetailDTO.setQuantity(stockTransFullDTO.getQuantity());\n stockTransDetailDTO.setLstStockTransSerial(stockTransFullDTO.getLstSerial());\n stockTransDetailDTO.setTableName(stockTransFullDTO.getTableName());\n stockTransDetailDTO.setProdOfferTypeId(stockTransFullDTO.getProductOfferTypeId());\n stockTransDetailDTO.setDepositPrice(stockTransFullDTO.getDepositPrice());\n lsDetailDTOs.add(stockTransDetailDTO);\n if (!DataUtil.isNullObject(stockTransFullDTO.getDepositPrice())) {\n totalDepositPrice += stockTransFullDTO.getDepositPrice() * stockTransFullDTO.getQuantity();\n }\n }\n StockTransActionDTO stockTransActionDTO = orderStockTag.getStockTransActionDTO();\n StockTransDTO stockTransDTO = orderStockTag.getStockTransDTO();\n stockTransDTO.setStockTransActionId(getStockTransActionId());\n stockTransDTO.setCreateUserIpAdress(BccsLoginSuccessHandler.getIpAddress());\n stockTransDTO.setDepositPrice(totalDepositPrice);\n stockTransDTO.setProcessOffline(checkOffline ? Const.PROCESS_OFFLINE : \"\");\n stockTransDTO.setShopId(staffDTO.getShopId());\n BaseMessage message = executeStockTransService.executeStockTrans(Const.STOCK_TRANS.EXPORT_AGENT, Const.STOCK_TRANS_TYPE.EXPORT, stockTransDTO, stockTransActionDTO, lsDetailDTOs, requiredRoleMap);\n if (!DataUtil.isNullOrEmpty(message.getErrorCode())) {\n throw new LogicException(message.getErrorCode(), message.getKeyMsg(), message.getParamsMsg());\n }\n doSearchStockTrans();\n canPrint = true;\n reportSuccess(\"frmExportNote:msgExport\", \"export.stock.success\");\n } catch (LogicException ex) {\n logger.error(ex.getMessage(), ex);\n reportError(\"frmExportNote:msgExport\", ex);\n topPage();\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n reportError(\"frmExportNote:msgExport\", \"common.error.happened\", ex);\n topPage();\n }\n\n }", "@RequestMapping(value=\"/{username}/index\", method = RequestMethod.POST)\n\tpublic User addIndex(@PathVariable String username, @RequestParam(value=\"stock\") String[] stocks){\n\t\tUser user = userService.getUserByName(username);\n\t\tStockIndex newStockIndex;\n\t\tfor(String stock: stocks){\n\t\t\tnewStockIndex = new StockIndex(stock);\n\t\t\tuser.addCustomIndex(newStockIndex.returnIndex());\n\t\t}\n\t\treturn userService.updateUser(user);\n\t}", "public void setStock(Integer stock) {\n this.stock = stock;\n }", "public interface OmsOrderOperateHistoryDao {\n /**\n * Multiple create\n */\n int insertList(@Param(\"list\") List<OmsOrderOperateHistory> orderOperateHistoryList);\n}" ]
[ "0.71934056", "0.6969349", "0.69206667", "0.69206667", "0.67978746", "0.6725413", "0.67135864", "0.6712184", "0.66085744", "0.6574456", "0.65403265", "0.6519175", "0.6507048", "0.6408273", "0.63867176", "0.6305674", "0.63042635", "0.6249952", "0.62430364", "0.62163943", "0.6212299", "0.6148673", "0.61170936", "0.61162263", "0.61008394", "0.6085184", "0.6079778", "0.60578793", "0.6040898", "0.60306835", "0.6026835", "0.60223275", "0.60132337", "0.60074097", "0.60061604", "0.6003298", "0.6001924", "0.598802", "0.59791124", "0.59712833", "0.5952549", "0.59486926", "0.5937683", "0.593178", "0.5929936", "0.5905098", "0.58952427", "0.58941364", "0.58906406", "0.5859115", "0.582393", "0.58213496", "0.58181864", "0.5800705", "0.579718", "0.5783226", "0.5779468", "0.5777984", "0.57665116", "0.57610077", "0.57465696", "0.57336444", "0.57176286", "0.57170784", "0.57170784", "0.57154226", "0.5695035", "0.56947666", "0.5683804", "0.5681196", "0.5681196", "0.5677435", "0.56712615", "0.5668495", "0.5665076", "0.56558", "0.56558", "0.5655092", "0.5653685", "0.5648733", "0.56475717", "0.56473863", "0.5641136", "0.56406474", "0.5634805", "0.56345177", "0.563254", "0.56323147", "0.56307155", "0.5621206", "0.5616568", "0.5610275", "0.5592133", "0.5589602", "0.55760485", "0.55726266", "0.5552962", "0.5535542", "0.5535346", "0.5523023" ]
0.8239847
0
fetch a single or multiple stock list
List<StockList> fetch(String title);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<StockList> fetchAll();", "public List<StockItem> getStockList();", "List<Stock> retrieveAllStocks(String symbol);", "@Override\r\n\tpublic StockResponseModel getListOfStock() {\n\t\tStockResponseModel list = new StockResponseModel();\r\n\t\tList<StockEntities> stockRepoList = new ArrayList();\r\n\t\tList<StockRequestModel> stockModelList = new ArrayList();\r\n\t\tstockModelList = CommonUtills.mapConvert(stockRepoList, stockModelList);\r\n\t\tstockRepoList = stockRepository.findAll();\r\n\t\tlist.setStockInfo(stockModelList);\r\n\t\tlist.setResponseCode(HttpStatus.OK.toString());\r\n\t\tlist.setResponseMsg(HttpStatus.OK.getReasonPhrase());\r\n\t\treturn list;\r\n\t\t\r\n\t}", "java.util.List<stockFilePT102.StockDocument.Stock> getStockList();", "public static List<YahooStock> retrieveYahooStocks(String symbol) {\n\t\tURL yahooFinanceUrl2 = null;\n\t\tURLConnection urlConnection;\n\t\tList<YahooStock> yahooStockList = null;\n\t\ttry {\n\t\t\t//yahooFinanceUrl1 = new URL(\"http://download.finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t\tyahooFinanceUrl2 = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t} catch (MalformedURLException mue) {\n\t\t\tmue.printStackTrace();\n\t\t} \n\t\ttry {\n\t\t\turlConnection = yahooFinanceUrl2.openConnection();\n\t\t\tBufferedReader dataIn = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); \n\t\t\tString inputLine; \n\t\t\tyahooStockList = new ArrayList<YahooStock>();\n\t\t\twhile ((inputLine = dataIn.readLine()) != null) {\n\t\t\t\tString[] yahooStockInfo = inputLine.split(\",\");\n\t\t\t\tYahooStock yahooStock = new YahooStock();\n\t\t\t\tyahooStock.setSymbol(yahooStockInfo[0].replaceAll(\"\\\"\", \"\"));\n\t\t\t\tyahooStock.setLastTrade(Double.valueOf(yahooStockInfo[1]));\n\t\t\t\tyahooStock.setTradeDate(yahooStockInfo[2]);\n\t\t\t\tyahooStock.setTradeTime(yahooStockInfo[3]);\n\t\t\t\tyahooStock.setChange(Double.valueOf(yahooStockInfo[4]));\n\t\t\t\tyahooStock.setOpen(Double.valueOf(yahooStockInfo[5]));\n\t\t\t\tyahooStock.setHigh(Double.valueOf(yahooStockInfo[6]));\n\t\t\t\tyahooStock.setLow(Double.valueOf(yahooStockInfo[7]));\n\t\t\t\tyahooStock.setVolume(Double.valueOf(yahooStockInfo[8]));\n\t\t\t\tyahooStock.setSmallChartUrl(\"http://ichart.finance.yahoo.com/t?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStock.setLargeChartUrl(\"http://chart.finance.yahoo.com/w?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStockList.add(yahooStock);\n\t\t\t} \n\t\t\tdataIn.close(); \n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} \n\t\treturn yahooStockList; \t\n\t}", "public ArrayList<String[]> loadStocks() {\n Log.d(TAG, \"loadStocks: Start Loading\");\n ArrayList<String[]> stocks = new ArrayList<>();\n Cursor cursor = database.query(\n TABLE_NAME,\n new String[]{STOCK_SYMBOL, STOCK_NAME},\n null,\n null,\n null,\n null,\n STOCK_SYMBOL);\n if (cursor != null) {\n cursor.moveToFirst();\n for (int i = 0; i < cursor.getCount(); i++) {\n String symbol = cursor.getString(0);\n //Double price = cursor.getDouble(1);\n // Double change = cursor.getDouble(2);\n //Double changePer = cursor.getDouble(3);\n String name = cursor.getString(1);\n stocks.add(new String[]{symbol, name});\n cursor.moveToNext();\n }\n cursor.close();\n }\n return stocks;\n}", "List<ItemStockDO> selectAll();", "public List<Stock> getAllStocks() {\n\n this.open();\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns, null, null, null, null, null);\n List<Stock> allStocks = new ArrayList<>();\n\n cursor.moveToLast();\n while (!cursor.isBeforeFirst()){\n allStocks.add(cursorToStock(cursor));\n cursor.moveToPrevious();\n }\n\n cursor.close();\n this.close();\n return allStocks;\n }", "Stock retrieveStock(String symbol);", "public List<StockData> multipleStockDate(List<String> codes) {\n String url = generateUrl(codes);\n RestTemplate rt = new RestTemplate();\n ResponseEntity<String> responseEntity = rt.getForEntity(url, String.class);\n String body = responseEntity.getBody();\n if (body.length() < 25) {\n return null;\n }\n return parseMultipleStockData(body);\n }", "static List<Stock> getList2() {\n\t\treturn null;\n\t}", "List<MarketPerformanceData> retrieveMarketData(String[] symbol);", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n List<AppStock> getAllStocksSync();", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "@GetMapping(\"/stocksList\")\r\n\tpublic List<StockState> getMarketStocksList() {\t\r\n\t\treturn stockPortfolioService.getMarketStocksList();\r\n\t}", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n return stocks_;\n }", "List<MarketData> getMarketDataItems(String index);", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n LiveData<List<AppStock>> getAllStocks();", "public void setListOfStock( List<StockEntity> listOfStock ) {\n this.listOfStock = listOfStock;\n }", "public static ArrayList<Stocks> findSymbolByName(String StockName) {\n ArrayList<Stocks> SearchResults = new ArrayList<>();\n// re-do the search for the new StockName\n HttpResponse response = null;\n HttpClient client = new DefaultHttpClient();\n HttpGet request = new HttpGet();\n HttpEntity entity = null;\n try {\n //create the URI to inquery about the Stock Symbol based off of the stockname input\n request.setURI(new URI(StockConstants.StockSymbolLookupAPIURL.replace(StockConstants.KEY_SEARCHSTRING, StockName)));\n response = client.execute(request);\n entity = response.getEntity();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n\n String result = EntityUtils.toString(entity);\n //formating the result into JSON array:\n result = result.replace(StockConstants.KEY_APICALLBACKNAME + \"(\", \"\");\n result = result.replace(\")\", \"\");\n\n Log.d(TAG, \"Symbol response was :\" + result);\n JSONArray jsonArray = new JSONArray(result);\n //Iterating through the list and grab the data\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject obj = jsonArray.getJSONObject(i);\n // return an arraylist of stock objs containing name/symbol and exchange market\n Stocks stock = new Stocks(obj.getString(\"Name\"), obj.getString(\"Symbol\"), obj.getString(\"Exchange\"));\n Log.d(\"~~~~~~~\", \"Adding new stock :\" + stock.toString());\n SearchResults.add(stock);\n }\n } catch (JSONException e) {\n Log.d(TAG, \"Caught JSONException:\" + e);\n } catch (IOException e) {\n Log.d(TAG, \"Caught IOException:\" + e);\n }\n\n\n return SearchResults;\n }", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "void getMarketOrders();", "public List getGestionStockList(Map criteria);", "public StockDetails viewStock() {\n\t\tint availableStock = 0;\n\t\tStockDetails stockDetails = new StockDetails(); \n\t\t \n\t\ttry {\n\t\t\tcon = ConnectionUtil.getConnection();\n\t\t\tString sql = \"select * from stock_details\";\n\t\t\tPreparedStatement pst = con.prepareStatement(sql);\n\t\t\tResultSet rs = pst.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\t stockDetails.setStockAvailability(rs.getInt(\"stock_availability\"));\n\t\t\t\t Date date = rs.getDate(\"inserted_date\");\n\t\t\t\t stockDetails.setStockAddedDate(date.toLocalDate());\n\t \n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tConnectionUtil.close(con, pst);\n\t\t}\n\t\treturn stockDetails;\n\t}", "public List<ProductWithStockItemTO> getProductsWithLowStock(long storeID);", "@GetMapping(\"/stocks\")\n\tpublic ResponseEntity<List<Stock>> getStocks(@RequestParam int stockExchangeId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getStocks(stockExchangeId), HttpStatus.OK);\n\t}", "public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n return stocks_.get(index);\n }", "public Map<String, Stock> getStocks();", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "public interface StockDAO {\n public int getAmountAvailable(String stockName); //Retrieves amount of stock available from stock_initial table\n public List<StockItem> getStockList(); //Retrieves list of stocks for initial wallet values\n}", "Stock retrieveStock(String symbol, String asOf);", "public List<MyStockHist> getMystockHistAlltList(MyStockHist myStockHist) ;", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "@Override\r\n public ArrayList<CurrencyTuple> getSymbols() throws MalformedURLException, IOException{\r\n String symbolsUrl = \"https://api.binance.com/api/v1/ticker/24hr\";\r\n String charset = \"UTF-8\";\r\n String symbol = this.pair;\r\n URLConnection connection = new URL(symbolsUrl).openConnection();\r\n connection.setRequestProperty(\"Accept-Charset\", charset);\r\n InputStream stream = connection.getInputStream();\r\n ByteArrayOutputStream responseBody = new ByteArrayOutputStream();\r\n byte buffer[] = new byte[1024];\r\n int bytesRead = 0;\r\n while ((bytesRead = stream.read(buffer)) > 0) {\r\n responseBody.write(buffer, 0, bytesRead);\r\n }\r\n String responseString = responseBody.toString();\r\n int position = 0;\r\n ArrayList<CurrencyTuple> toReturn = new ArrayList<>();\r\n for (int i = 0; i < 100; i++){\r\n position = responseString.indexOf(\"symbol\", position + 6);\r\n String symbols = responseString.substring(position + 9, position + 15);\r\n String symbolOwned = symbols.substring(0, 3);\r\n String symbolNotOwned = symbols.substring(3, 6);\r\n if (responseString.substring(position+9, position + 16).contains(\"\\\"\")\r\n || responseString.substring(position+9, position + 16).contains(\"USD\")){\r\n if (symbolOwned.contains(\"USD\")) {\r\n symbolOwned = symbolOwned.concat(\"T\");\r\n }\r\n if (symbolNotOwned.contains(\"USD\")) {\r\n symbolOwned = symbolNotOwned.concat(\"T\");\r\n }\r\n Currency CurrencyOwned = new Currency(symbolOwned, 0.0);\r\n Currency CurrencyNotOwned = new Currency(symbolNotOwned, 0.0);\r\n CurrencyTuple tuple = new CurrencyTuple(CurrencyOwned, CurrencyNotOwned);\r\n System.out.println(CurrencyOwned.getName() + \" - \" + CurrencyNotOwned.getName());\r\n toReturn.add(tuple);\r\n }\r\n }\r\n return toReturn;\r\n }", "public List<Ohlc> getBySymbol(String symbol);", "public List<Buy> getAll() throws PersistException;", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n if (stocksBuilder_ == null) {\n return java.util.Collections.unmodifiableList(stocks_);\n } else {\n return stocksBuilder_.getMessageList();\n }\n }", "@Override\r\n\tpublic Collection<Sticker> list(Sticker sticker) {\n\t\treturn sst.selectList(\"stickerns.list\",sticker);\r\n\t}", "ArrayList<Serie> getSeries(){\n\n Uri builtUri = Uri.parse(seriesURL)\n .buildUpon()\n .build();\n String url = builtUri.toString();\n\n return doCallSerie(url);\n }", "List<Product> retrieveProducts();", "@GetMapping(\"/stockExchanges\")\n\tpublic ResponseEntity<List<StockExchange>> getStockExchanges() {\n\t\treturn new ResponseEntity<>(dataFetchService.getStockExchanges(), HttpStatus.OK);\n\t}", "public List<Stock> findByStockTicker(String stockTicker) throws ResourceNotFound {\n\t\tlog.info(\"Finding matches for given stock Ticker : \" + stockTicker);\n\t\tList<Stock> stockList = stockRepo.findByStock(stockTicker);\n\t\tif (stockList.isEmpty()) {\n\t\t\tlog.error(\"No matching records found for : \" + stockTicker);\n\t\t\tthrow new ResourceNotFound(\"There is no matching info found for \" + stockTicker);\n\t\t} else\n\t\t\treturn stockList;\n\t}", "@Override\r\n\tpublic List<MatStockBean> getMatStockDetails() {\n\t\tList<MatStockBean> matStockBeans=null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistOfObjcts=boardDao.getMatStockDetails();\r\n\t\t\tmatStockBeans=new ArrayList<MatStockBean>();\r\n\t\t\tIterator<Object[]> iterator=listOfObjcts.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tMatStockBean stockBean=new MatStockBean();\r\n\t\t\t\tstockBean.setMatStockId((Integer)objects[0]);\r\n\t\t\t\tstockBean.setBatchNo((String)objects[1]);\r\n\t\t\t\tstockBean.setQtyAval((Float)objects[2]);\r\n\t\t\t\tStorageLocation location=(StorageLocation)objects[3];\r\n\t\t\t\tMaterial material=(Material)objects[4];\r\n\t\t\t\tstockBean.setMaterialName(material.getMaterialName());\r\n\t\t\t\tstockBean.setStorageLocName(location.getStorageLocation());\r\n\t\t\t\tmatStockBeans.add(stockBean);\r\n\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t\t\t\r\n\t\t}\r\n\t\treturn matStockBeans;\r\n\t}", "List<Goods> getGoodsList();", "List<SpotPrice> getAll();", "public List<ProductWithSupplierAndStockItemTO> getProductsWithStockItems(long storeID) throws NotInDatabaseException;", "public ArrayList<Stock> getStockList() {\n\t\treturn stockList;\n\t}", "public void fetchDataStock(){\n// stocks.add(new Stock(1,\"bitcoin\",new Double(7000),new Double(7500),new Double(5),null));\n\n stockFetcher = new StockAsyncTask ();\n stockFetcher.execute();\n\n\n // TODO:\n\n refresh(5000);\n\n\n }", "public int getStock(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.stock;\n}\n}\nreturn -1;\n}", "public StockUnits call() throws Exception {\n\treturn broker.getStocksOfComapny(company);\r\n }", "public ArrayList<PersonStocks> getStock(){\n return myStocks;\n }", "public List<StockFavorite> getListFavoriteStock(int userId);", "public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n if (stocksBuilder_ == null) {\n return stocks_.get(index);\n } else {\n return stocksBuilder_.getMessage(index);\n }\n }", "@Override\n\tpublic ArrayList<StockAlarmBillPO> getAllStockAlarmBill() throws RemoteException {\n\t\tArrayList<StockAlarmBillPO> list = new ArrayList<StockAlarmBillPO>();\n\t\tArrayList<StockAlarmBillItem> itemList = new ArrayList<StockAlarmBillItem>();\n\t\ttry {\t\n\t\t\tStatement statement_1 = con.createStatement();\t\n\t\t\tString sql_1 = \"select * from stockalarmbill\";\t\t\t\t\n\t\t\tResultSet rs = statement_1.executeQuery(sql_1);\n\t\t BillState state = null;\n\t\t String id = null;\t\t \n\t\t java.sql.Date date = null;\t\t \n\t\t String operatorID = null;\t\t \n\t\t String wareID = null;\n\t\t \n\t\t while(rs.next()){\n\t\t \tstate = BillState.getStateByInt(rs.getInt(\"State\"));\n\t\t \tid = rs.getString(\"ID\");\n\t\t \tdate = rs.getDate(\"Date\");\n\t\t \tjava.util.Date d = new java.util.Date(date.getTime());\n\t\t \toperatorID = rs.getString(\"OperatorID\");\n\t\t \twareID = rs.getString(\"WareID\");\n\t\t \t\n\t\t \tStatement statement_2 = con.createStatement();\t\n\t\t \t//��ȡ�����ݱ���������idΪ������\n\t\t \tString sql_2 = \"select * from stock\" + id;\t\t\n\t\t \tResultSet rs_2 = statement_2.executeQuery(sql_2);\n\t\t\t String number = null;\n\t\t\t String name = null;\n\t\t\t long amount = 0;\n\t\t\t long alarmAmount = 0;\n\t\t\t \n\t\t\t while(rs_2.next()) {\n\t\t\t \tnumber = rs_2.getString(\"Number\");\n\t\t\t \tname = rs_2.getString(\"Name\");\n\t\t\t \tamount = rs_2.getLong(\"Amount\");\n\t\t\t \talarmAmount = rs_2.getLong(\"AlarmAmount\");\n\t\t\t \t\n\t\t\t \tStockAlarmBillItem item = new StockAlarmBillItem(number, name, amount, alarmAmount);\n\t\t\t \titemList.add(item);\n\t\t\t }\t\t \t\t\t \n\t\t \tStockAlarmBillPO bill = new StockAlarmBillPO( id, itemList, state, d, operatorID, wareID);\n\t\t \tlist.add(bill);\t \n\t\t \trs_2.close();\n\t\t }\t \n\t\t rs.close();\n\t\t} catch(SQLException e) { \n\t\t\te.printStackTrace(); \t \n\t\t}catch (Exception e) { \n\t\t\te.printStackTrace();\t \n\t\t}\n\t\treturn list;\n\t}", "String retrieveSymbolNewsItems(String symbol);", "public List<CompanyStockDTO> findAllActive();", "@Override\n\tpublic List<Article> getStock() {\n\t\treturn null;\n\t}", "@Ignore\r\n\t@Test\r\n\tpublic void showTodayStock() {\n\t\tList<StockMainVO> list = sms.showTodayStock();\r\n\t\t\r\n\t\tSystem.out.println(\"test list : \" + list);\r\n\t}", "public List<Map<String, Object>> getStockPriceLow() throws SQLException;", "public ArrayList<Stock> getStockWithName() {\n\n return null;\n }", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "@GetMapping(\"/signalforbullish/{ticker}\")\n public List<String> getBullishEngulfingforstock(@PathVariable String ticker) {\n List<CandleModel> result = candleService.getCandleData(ticker);\n List<String> dates=candleService.getBullishEngulfingCandleSignal(result);\n System.out.println(dates);\n return dates;\n }", "private void searchGoodsStock(String goodsId, List<WareInfo> mStockData) {\n String sql2 = \"select fname,fitemid from t_stock\";\n\n //根据助记码或者名称模糊查询\n new StockItemTask(sql2, mStockData).execute();\n }", "public Items[] findWhereStockIdEquals(int stockId) throws ItemsDaoException;", "public ArrayList<Stock> addDefaultStocks() {\n Stock amzn = new Stock(\"Amazon\", \"AMZN\", new Dollar(2474.00), 100); \n Stock fb = new Stock(\"Facebook\", \"FB\", new Dollar(204.71), 100); \n Stock msft = new Stock(\"Microsoft\", \"MSFT\", new Dollar(174.57), 100); \n Stock googl = new Stock(\"Alphabet\", \"GOOGL\", new Dollar(1317.32), 100); \n Stock baba = new Stock(\"Alibaba\", \"BABA\", new Dollar(194.48), 100); \n Stock fis = new Stock(\"Fidelity\", \"FIS\", new Dollar(26.01), 100); \n Stock crm = new Stock(\"Salesforce\", \"CRM\", new Dollar(156.37), 100); \n Stock ma = new Stock(\"Mastercard\", \"MA\", new Dollar(268.74), 100); \n Stock v = new Stock(\"Visa\", \"V\", new Dollar(175.57), 100); \n Stock nflx = new Stock(\"Netflix\", \"NFLX\", new Dollar(415.27), 100); \n\n stocks.add(amzn); \n stocks.add(fb); \n stocks.add(msft); \n stocks.add(googl); \n stocks.add(baba); \n stocks.add(fis);\n stocks.add(crm); \n stocks.add(ma); \n stocks.add(v); \n stocks.add(nflx); \n\n return stocks; \n }", "public Response doStockQuery(JSONArray stockArray){\n\n\t\tString frontUrl = \"http://query.yahooapis.com/v1/public/yql?q=\";\n\t\tString endUrl = \"&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys\";\n\n\t\tString query = \"select * from yahoo.finance.quotes where symbol in (\";\n\n\t\t//Parse symbols to (\"YHOO\",\"AAPL\",\"GOOG\",\"MSFT\") form\n\t\tfor(int a = 0; a < stockArray.length(); a++){\n\n\t\t\tif(a == stockArray.length()-1){\n\t\t\t\tquery = query + \"\\\"\"+stockArray.getJSONObject(a).getString(\"symbol\")+\"\\\") \";\n\t\t\t}\n\t\t\telse{\n\t\t\t\tquery = query + \"\\\"\"+stockArray.getJSONObject(a).getString(\"symbol\")+\"\\\",\";\n\t\t\t}\n\t\t}\n\n\t\tURI uri = UriBuilder.fromUri(frontUrl)\n\t\t\t\t.replaceQuery(\"q=\"+query+endUrl)\n\t\t\t\t.build();\n\n\n\t\tClient client = ClientBuilder.newClient();\n\t\tWebTarget webTarget = client.target(uri);\n\n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);\n\t\tResponse response = invocationBuilder.get();\n\n\t\tresponseObject = new JSONObject(response.readEntity(String.class));\n\n\t\tanalyzeStocks(responseObject.getJSONObject(\"query\").getJSONObject(\"results\").getJSONArray(\"quote\"));\n\n\t\t\n\t\treturn response;\n\n\t}", "public static ArrayList<StockPortfolio> fetchDataFromFile() {\r\n\t\tArrayList<StockPortfolio> alStockPortfolios = new ArrayList<>();\r\n\t\tJSONParser parser= new JSONParser();\r\n\t\ttry{\r\n\t\t\tJSONArray alStock=(JSONArray)parser.parse(new FileReader(\"src/resource/StockInformation.json\"));\r\n\t\t\tfor(Object stock:alStock){\r\n\t\t\t\tJSONObject stockJson=(JSONObject) stock;\r\n\t\t\t\tStockPortfolio objStockPortfolio = new StockPortfolio();\r\n\t\t\t\tobjStockPortfolio.setName(stockJson.get(\"name\").toString());\r\n\t\t\t\tobjStockPortfolio.setNoOfShare((Long)stockJson.get(\"noOfShare\"));\r\n\t\t\t\tobjStockPortfolio.setPriceOfShare((Long)stockJson.get(\"priceOfShare\"));\r\n\t\t\t\talStockPortfolios.add(objStockPortfolio); \r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t\treturn alStockPortfolios;\r\n\t}", "Stock retrieveStockChartData(String symbol);", "stockFilePT102.StockDocument.Stock getStockArray(int i);", "@Override\n\tpublic List<Stock_out> getStock_outs() {\n\t\tList<Stock_out> list = stock_outDao.selectAllStock_out();\n\t\treturn list;\n\t}", "List<Consumption> listAll();", "List<T> fetch(Session session);", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "@Override\n public List<Trade> getStockTradeRecord(Stock stock, int minutes) {\n return this.tradeRepository.getTradeRecord(stock, minutes);\n }", "public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }", "public static ArrayList<Song> getAll() {\n ArrayList<Song> songs = new ArrayList<>();\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\"jdbc:mysql://\" + host + \"/\" + db + \"?\" + \"user=\" + user + \"&password=\" + psw );\n\n songStatement = conn.createStatement();\n songResultSet = songStatement.executeQuery(\"SELECT * FROM spotify.track WHERE annotated = 0 LIMIT 0, 25\");\n\n songs = createSongs(songResultSet);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close();\n }\n\n return songs;\n }", "@RequestMapping(path = \"/Sstock\", headers = \"Accept=application/json\")\n public List<Stock> loadStocks(@RequestBody List<String> stockCodes,\n @RequestParam(name = \"begin\", required = true) String initialDate,\n @RequestParam(name = \"end\", required = true) String finalDate) throws IOException, ParseException {\n\n List<StockDBEntity> stocks = stocksService.loadStocks(stockCodes);\n List<Stock> result = new ArrayList<>();\n for (StockDBEntity sdb : stocks) {\n result.add(new Stock(sdb.getId(), sdb.getCode(), sdb.getName()));\n }\n\n return result;\n }", "List<String> getCompanySymbols() throws StorageException;", "public List<Sale> saleListSong() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT * FROM disquera.sale \"\n + \"join disquera.song on sale.id_song=song.id_song \"\n + \"join disquera.artist on song.id_artist=artist.id_artist \"\n + \"join disquera.album on song.id_album=album.id_album\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n newSale.setId_sale(result.getInt(1));\n newSale.setId_song(result.getInt(2));\n newSale.setPrice(result.getDouble(3));\n newSale.setId_album(result.getInt(4));\n newSale.setId_user(result.getInt(5));\n newSale.setId_genre(result.getInt(6));\n newSale.setSongName(result.getString(10));\n newSale.setArtistName(result.getString(14));\n newSale.setAlbumName(result.getString(20));\n\n System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "private static List<Stock> parseResponse(Response response) {\n\t\treturn null;\r\n\t}", "public String[] showStock() {\n \tString[] stock = new String[5];\n \tstock[0] = Integer.toString(this.getId());\n \tstock[1] = this.getName();\n \tstock[2] = Integer.toString(this.getAvailableNumber());\n \tstock[3] = Double.toString(this.getBuyPrice().getAmount());\n \tstock[4] = Double.toString(this.getSellPrice().getAmount());\n \treturn stock;\n }", "private String[] getLoadListFromDb(ContentResolver cr) {\n Cursor cursor = null;\n String[] loadList = null;\n try {\n final String[] projection = new String[]{StockEntry.COLUMN_SYMBOL};\n final int indexSymbol = 0;\n\n // Query db for just symbols.\n cursor = cr.query(\n StockEntry.CONTENT_URI,\n projection,\n null,\n null,\n StockProvider.ORDER_BY_LIST_POSITION_ASC_ID_DESC);\n\n // Grab symbols from cursor and put them in array\n if (cursor != null) {\n int cursorCount = cursor.getCount();\n loadList = new String[cursorCount];\n\n for (int i = 0; i < cursorCount; i++) {\n cursor.moveToPosition(i);\n loadList[i] = cursor.getString(indexSymbol);\n }\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return loadList;\n }", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "String getStockData(String symbol) throws Exception\n\t{\n\t\tfinal String urlHalf1 = \"https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=\";\n\t\tfinal String urlHalf2 = \"&apikey=\";\n\t\tfinal String apiKey = \"FKS0EU9E4K4UQDXI\";\n\n\t\tString url = urlHalf1 + symbol + urlHalf2 + apiKey;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString returnData = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement timeSeries = jsonObject.get(\"Time Series (Daily)\");\n\n\t\t\tif (timeSeries.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject timeObject = timeSeries.getAsJsonObject();\n\n\t\t\t\tDate date = new Date();\n\n\t\t\t\tCalendar calendar = new GregorianCalendar();\n\t\t\t\tcalendar.setTime(date);\n\n\t\t\t\t// Loop until we reach most recent Friday (market closes on Friday)\n\t\t\t\twhile (calendar.get(Calendar.DAY_OF_WEEK) < Calendar.FRIDAY\n\t\t\t\t\t\t|| calendar.get(Calendar.DAY_OF_WEEK) > Calendar.FRIDAY)\n\t\t\t\t{\n\t\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t\t\t}\n\n\t\t\t\tint year = calendar.get(Calendar.YEAR);\n\t\t\t\tint month = calendar.get(Calendar.MONTH) + 1;\n\t\t\t\tint day = calendar.get(Calendar.DAY_OF_MONTH);\n\n\t\t\t\tString dayToString = Integer.toString(day);\n\n\t\t\t\tif (dayToString.length() == 1)\n\t\t\t\t\tdayToString = \"0\" + dayToString;\n\n\t\t\t\tJsonElement currentData = timeObject.get(year + \"-\" + month + \"-\" + dayToString);\n\n\t\t\t\tif (currentData.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject dataObject = currentData.getAsJsonObject();\n\n\t\t\t\t\tJsonElement openPrice = dataObject.get(\"1. open\");\n\t\t\t\t\tJsonElement closePrice = dataObject.get(\"4. close\");\n\t\t\t\t\tJsonElement highPrice = dataObject.get(\"2. high\");\n\t\t\t\t\tJsonElement lowPrice = dataObject.get(\"3. low\");\n\n\t\t\t\t\treturnData = year + \"-\" + month + \"-\" + dayToString + \" - \" + symbol + \": Opening price: $\"\n\t\t\t\t\t\t\t+ openPrice.getAsString() + \" / Closing price: $\" + closePrice.getAsString()\n\t\t\t\t\t\t\t+ \" / High price: $\" + highPrice.getAsString() + \" / Low price: $\" + lowPrice.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn returnData;\n\t}", "public Response getStockInfo(String symbolsToUse){\n\t\tString yahooStringFront = \"http://finance.yahoo.com/webservice/v1/symbols/\";\n\t\tString yahooStringBack = \"/quote?format=json&view=detail\";\n\n\t\tClient client = ClientBuilder.newClient();\n\t\tWebTarget webTarget = client.target(yahooStringFront+symbolsToUse+yahooStringBack);\n\n\t\tInvocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);\n\t\tResponse response = invocationBuilder.get();\n\n\t\tresponseObject = new JSONObject(response.readEntity(String.class));\n\t\treturn response;\n\n\t}", "public void listStores(){\r\n Map<String, String> params = new HashMap<>();\r\n String url = API_DOMAIN + STORE_EXT + LIST_ACTION;\r\n this.makeVolleyRequest( url, params );\r\n }", "public java.util.List<? extends com.sbytestream.samples.grpc.stockservice.StockOrBuilder> \n getStocksOrBuilderList() {\n return stocks_;\n }", "public interface StockOperation {\r\n\r\n\t/**\r\n\t * Retrieves all stocks.\r\n\t * \r\n\t * @author acalaras\r\n\t */\r\n\tList<Stock> retrieveAllStocks();\r\n\r\n\t/**\r\n\t * Retrieves a stock's chart data.\r\n\t * \r\n\t * @param symbol\r\n\t * @return All price and timestamp data of a stock.\r\n\t * @author acalaras\r\n\t */\r\n\tStock retrieveStockChartData(String symbol);\r\n\r\n\t/**\r\n\t * Retrieves all stocks with given symbol.\r\n\t * \r\n\t * @param symbol\r\n\t * @return All stocks with the given symbol.\r\n\t * @author acalaras\r\n\t */\r\n\tList<Stock> retrieveAllStocks(String symbol);\r\n\r\n\t/**\r\n\t * Retrieves a single stock given a symbol.\r\n\t *\r\n\t * @param symbol\r\n\t * @return A single stock given a symbol.\r\n\t * @author acalaras\r\n\t */\r\n\tStock retrieveStock(String symbol);\r\n\r\n\t/**\r\n\t * Retrieves a single stock given a symbol and timestamp.\r\n\t *\r\n\t * @param symbol\r\n\t * @param asOf\r\n\t * @return A single stock given a symbol and timestamp.\r\n\t * @author acalaras\r\n\t */\r\n\tStock retrieveStock(String symbol, String asOf);\r\n\r\n}", "static Stock getStock(String symbol) { \n\t\tString sym = symbol.toUpperCase();\n\t\tdouble price = 0.0;\n\t\tint volume = 0;\n\t\tdouble pe = 0.0;\n\t\tdouble eps = 0.0;\n\t\tdouble week52low = 0.0;\n\t\tdouble week52high = 0.0;\n\t\tdouble daylow = 0.0;\n\t\tdouble dayhigh = 0.0;\n\t\tdouble movingav50day = 0.0;\n\t\tdouble marketcap = 0.0;\n\t\n\t\ttry { \n\t\t\t\n\t\t\t// Retrieve CSV File\n\t\t\tURL yahoo = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\"+ symbol + \"&f=l1vr2ejkghm3j3\");\n\t\t\tURLConnection connection = yahoo.openConnection(); \n\t\t\tInputStreamReader is = new InputStreamReader(connection.getInputStream());\n\t\t\tBufferedReader br = new BufferedReader(is); \n\t\t\t\n\t\t\t// Parse CSV Into Array\n\t\t\tString line = br.readLine(); \n\t\t\tString[] stockinfo = line.split(\",\"); \n\t\t\t\n\t\t\t// Check Our Data\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[0])) { \n\t\t\t\tprice = 0.00; \n\t\t\t} else { \n\t\t\t\tprice = Double.parseDouble(stockinfo[0]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[1])) { \n\t\t\t\tvolume = 0; \n\t\t\t} else { \n\t\t\t\tvolume = Integer.parseInt(stockinfo[1]); \n\t\t\t} \n\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[2])) { \n\t\t\t\tpe = 0; \n\t\t\t} else { \n\t\t\t\tpe = Double.parseDouble(stockinfo[2]); \n\t\t\t}\n \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[3])) { \n\t\t\t\teps = 0; \n\t\t\t} else { \n\t\t\t\teps = Double.parseDouble(stockinfo[3]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[4])) { \n\t\t\t\tweek52low = 0; \n\t\t\t} else { \n\t\t\t\tweek52low = Double.parseDouble(stockinfo[4]); \n\t\t\t}\n\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[5])) { \n\t\t\t\tweek52high = 0; \n\t\t\t} else { \n\t\t\t\tweek52high = Double.parseDouble(stockinfo[5]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[6])) { \n\t\t\t\tdaylow = 0; \n\t\t\t} else { \n\t\t\t\tdaylow = Double.parseDouble(stockinfo[6]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[7])) { \n\t\t\t\tdayhigh = 0; \n\t\t\t} else { \n\t\t\t\tdayhigh = Double.parseDouble(stockinfo[7]); \n\t\t\t} \n\t\t\t\n\t\t\tif (Pattern.matches(\"N/A - N/A\", stockinfo[8])) { \n\t\t\t\tmovingav50day = 0; \n\t\t\t} else { \n\t\t\t\tmovingav50day = Double.parseDouble(stockinfo[8]); \n\t\t\t}\n\t\t\t\t \n\t\t\tif (Pattern.matches(\"N/A\", stockinfo[9])) { \n\t\t\t\tmarketcap = 0; \n\t\t\t} else { \n\t\t\t\tmarketcap = Double.parseDouble(stockinfo[9]); \n\t\t\t} \n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLogger log = Logger.getLogger(StockHelper.class.getName()); \n\t\t\tlog.log(Level.SEVERE, e.toString(), e);\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn new Stock(sym, price, volume, pe, eps, week52low, week52high, daylow, dayhigh, movingav50day, marketcap);\n\t\t\n\t}", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n @Path(\"StockProducto/list\")\r\n public ArrayList<StockProducto> getXmls() throws Exception {\n ArrayList<StockProducto> lista=new ArrayList<StockProducto>();\r\n lista=StockProducto.stockproducto();\r\n return lista;\r\n }", "ArrayList<Bet> selectBetsOfCurrency(String currency) throws DAOException;", "public Stock getFromMap(String name){\n\tif(table.containsKey(name)){\n\tStock rval = table.get(name);\n\treturn rval;\n\t}\n\telse{\n\t\t//call pull from URL and return newStock \n\t\taddToMap(String name, Stock newStock);\n\t\tgetFromMap(name);\n\t}\n}", "public List<CartItem> getAllcartitem();", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "public synchronized void get(T stock) throws InterruptedException {\n\t\twhile (store.isEmpty()) {\n\t\t\tLOG.info(\"No products available\");\n\t\t\twait();\n\t\t}\n\t\tstore.remove(stock);\n\t\tLOG.info(\"Product bought\" + store.size());\n\t\tnotify();\n\t}", "@Test\n public void testGetStock() {\n IStockParser parser;\n try {\n parser = ParserFactory.createStockParser(\"openones.webparser.stockparser.DVSCParser\");\n Collection<StockInfo> stockList = parser.getStockList(\"ACB\");\n for (StockInfo stock : stockList) {\n System.out.println(stock.getDate() + \";\" + stock.getRefPrice() + \";\" + stock.getCeilPrice() + \";\" +\n stock.getFloPrice() + \";\" + stock.getClosedPrice() + \";\" + stock.getVolume());\n }\n } catch (Exception ex) {\n // TODO Auto-generated catch block\n ex.printStackTrace();\n }\n \n \n }", "private Future<List<JsonObject>> fetch(Map<String, List<String>> request) {\n Promise<List<JsonObject>> p = Promise.promise();\n List<String> resIds = new ArrayList<>();\n\n if (request.containsKey(RES)) {\n resIds.addAll(request.get(RES));\n\n // get resGrpId from resID\n resIds.addAll(\n resIds.stream()\n .map(e -> e.split(\"/\"))\n .map(obj -> obj[0] + \"/\" + obj[1] + \"/\" + obj[2] + \"/\" + obj[3])\n .collect(Collectors.toList()));\n }\n\n if (request.containsKey(RES_GRP)) resIds.addAll(request.get(RES_GRP));\n\n List<String> distinctRes = resIds.stream().distinct().collect(Collectors.toList());\n\n List<Future> fetchFutures =\n distinctRes.stream().map(this::fetchItem).collect(Collectors.toList());\n\n CompositeFuture.all(fetchFutures)\n .onSuccess(\n successHandler -> {\n p.complete(\n fetchFutures.stream()\n .map(x -> (JsonObject) x.result())\n .collect(Collectors.toList()));\n })\n .onFailure(\n failureHandler -> {\n p.fail(failureHandler);\n });\n return p.future();\n }", "@Override\r\n\tpublic List<MarketDto> readMarketAll() {\n\t\treturn session.selectList(\"kdc.market.readMarketAll\");\r\n\t}" ]
[ "0.7848582", "0.7485072", "0.7225612", "0.72103", "0.7139481", "0.67153347", "0.6623127", "0.65924907", "0.6540856", "0.6514597", "0.64752567", "0.6445606", "0.6430225", "0.64271134", "0.64259255", "0.64155906", "0.6409139", "0.6370075", "0.629481", "0.6291998", "0.627383", "0.6243842", "0.62327254", "0.6224395", "0.61810577", "0.61690325", "0.61622834", "0.61612594", "0.61443704", "0.608291", "0.6079058", "0.6068264", "0.60678387", "0.6059081", "0.6037287", "0.5995535", "0.5968015", "0.5935195", "0.59351623", "0.5929588", "0.5910789", "0.58975387", "0.5896431", "0.5887296", "0.58828986", "0.5878659", "0.58783036", "0.5862956", "0.5859383", "0.5855126", "0.58474493", "0.58452785", "0.5840386", "0.58372456", "0.5821063", "0.5814008", "0.57962525", "0.5794377", "0.57831115", "0.57813674", "0.57792115", "0.57573193", "0.57572484", "0.5742713", "0.5741324", "0.5736218", "0.57329875", "0.5720588", "0.5718119", "0.5703359", "0.56946546", "0.56933486", "0.569024", "0.5683217", "0.5682548", "0.5679495", "0.5678411", "0.5674376", "0.5670991", "0.5665086", "0.5662343", "0.56603634", "0.5658531", "0.5647371", "0.5645405", "0.56324774", "0.5631044", "0.5630615", "0.56285465", "0.5626457", "0.56236047", "0.5615212", "0.5612074", "0.56013936", "0.55947775", "0.5584752", "0.5578235", "0.557799", "0.5574128", "0.5573788" ]
0.8108194
0
fetch all of the user's stock lists.
List<StockList> fetchAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<StockItem> getStockList();", "public List<StockFavorite> getListFavoriteStock(int userId);", "public List<Stock> getAllStocks() {\n\n this.open();\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns, null, null, null, null, null);\n List<Stock> allStocks = new ArrayList<>();\n\n cursor.moveToLast();\n while (!cursor.isBeforeFirst()){\n allStocks.add(cursorToStock(cursor));\n cursor.moveToPrevious();\n }\n\n cursor.close();\n this.close();\n return allStocks;\n }", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n return stocks_;\n }", "java.util.List<stockFilePT102.StockDocument.Stock> getStockList();", "List<StockList> fetch(String title);", "public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n if (stocksBuilder_ == null) {\n return java.util.Collections.unmodifiableList(stocks_);\n } else {\n return stocksBuilder_.getMessageList();\n }\n }", "@Override\r\n\tpublic StockResponseModel getListOfStock() {\n\t\tStockResponseModel list = new StockResponseModel();\r\n\t\tList<StockEntities> stockRepoList = new ArrayList();\r\n\t\tList<StockRequestModel> stockModelList = new ArrayList();\r\n\t\tstockModelList = CommonUtills.mapConvert(stockRepoList, stockModelList);\r\n\t\tstockRepoList = stockRepository.findAll();\r\n\t\tlist.setStockInfo(stockModelList);\r\n\t\tlist.setResponseCode(HttpStatus.OK.toString());\r\n\t\tlist.setResponseMsg(HttpStatus.OK.getReasonPhrase());\r\n\t\treturn list;\r\n\t\t\r\n\t}", "List<Stock> retrieveAllStocks(String symbol);", "protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}", "@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}", "@GetMapping(\"/stocksList\")\r\n\tpublic List<StockState> getMarketStocksList() {\t\r\n\t\treturn stockPortfolioService.getMarketStocksList();\r\n\t}", "public List<ShelfItem> getAll(String username, Integer from, Integer to);", "public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;", "public ArrayList<Stock> getStockList() {\n\t\treturn stockList;\n\t}", "public List<MyStockHist> getMystockHistAlltList(MyStockHist myStockHist) ;", "public void listAll(InventoryList inStock) {\n for (Item a : inStock.getInventoryList()) {\n if (1 >= a.getCount()) {\n console.promptForPrintPrompt(a.toString());\n }\n }\n }", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "public List<ReportBaseImpl> getOpenOrders(SimpleUser user)\r\n throws PersistenceException;", "public void populateUserListFromDatabase() {\n\t\tList<com.expensetracker.model.User> modelUserList = null;\n\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : Populating user list cache..\");\n\t\ttry {\n\t\t\tmodelUserList = Service.getService().getUserList();\n\t\t\tList<User> list = ConvertUtil.modelToPojo(modelUserList);\n\t\t\tif (list != null) {\n\t\t\t\tuserList.addAll(list);\n\t\t\t\tpopulateUserMap(list);\n\t\t\t} else {\n\t\t\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : No data received from database for populating userlist cache\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.logMessage(\"UserManager.populateUserListFromDatabase() : Error in getting list of users from database for populating userlist cache \"\n\t\t\t\t\t+ e);\n\t\t}\n\t}", "private void getUserList() {\n // GET ENTRIES FROM DB AND TURN THEM INTO LIST \n DefaultListModel listModel = new DefaultListModel();\n Iterator itr = DBHandler.getListOfObjects(\"FROM DBUser ORDER BY xname\");\n while (itr.hasNext()) {\n DBUser user = (DBUser) itr.next();\n listModel.addElement(user.getUserLogin());\n }\n // SET THIS LIST FOR INDEX OF ENTRIES\n userList.setModel(listModel);\n }", "@Override\r\n\tpublic Collection<Sticker> list(Sticker sticker) {\n\t\treturn sst.selectList(\"stickerns.list\",sticker);\r\n\t}", "public List<ProductWithSupplierAndStockItemTO> getProductsWithStockItems(long storeID) throws NotInDatabaseException;", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n List<AppStock> getAllStocksSync();", "@Query(\"SELECT * from stock_table ORDER BY symbol ASC\")\n LiveData<List<AppStock>> getAllStocks();", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "public java.util.List<? extends com.sbytestream.samples.grpc.stockservice.StockOrBuilder> \n getStocksOrBuilderList() {\n if (stocksBuilder_ != null) {\n return stocksBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(stocks_);\n }\n }", "static List<Stock> getList2() {\n\t\treturn null;\n\t}", "public List showAll() {\n\t\tSession session = null;\n\t\tList temp = new ArrayList();\n\t\ttry {\n\n\t\t\tsession = MyUtility.getSession();// Static Method which makes only\n\t\t\t\t\t\t\t\t\t\t\t\t// one object as method is\n\t\t\t\t\t\t\t\t\t\t\t\t// static\n\n\t\t\tQuery q = session.createQuery(\"FROM AuctionVO \");\n\n\t\t\ttemp = q.list();\n\n\t\t} catch (Exception e) {\n\t\t\t//System.out.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t//session.close();\n\t\t}\n\t\treturn temp;\n\t}", "public ArrayList<PersonStocks> getStock(){\n return myStocks;\n }", "@Override\n\tpublic List<Stock_out> getStock_outs() {\n\t\tList<Stock_out> list = stock_outDao.selectAllStock_out();\n\t\treturn list;\n\t}", "@Override\n\tpublic List<String> acquireUserList() {\n\t\tString url = WeChatConst.WECHATURL+WeChatConst.GETUSERLISTURI;\n\t\tboolean flag = true;\n\t\tString next_openid = null;\n\t\tList<String> openids = new ArrayList<String>(); \n\t\twhile (flag) \n\t\t{\n\t\t\tMap<String, String> param = new HashMap<String, String>();\n\t\t\tparam.put(\"access_token\",WeChatGlobalVar.accessToken);\n\t\t\tif(next_openid != null)\n\t\t\t{\n\t\t\t\tparam.put(\"next_openid\", next_openid);\n\t\t\t}\n\t\t\tString response = HttpClientUtils.doGetWithoutHead(url, param);\n\t\t\tlog.debug(\" acquireUserList response :\"+response);\n\t\t\ttry {\n\t\t\t\tJSONObject responseJson = JSONObject.parseObject(response);\n\t\t\t\tif(!responseJson.containsKey(\"errcode\"))\n\t\t\t\t{\n\t\t\t\t\tJSONObject data = responseJson.getJSONObject(\"data\");\n\t\t\t\t\tif(data != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tJSONArray openidArray = data.getJSONArray(\"openid\");\n\t\t\t\t\t\tif(openidArray != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfor (int i = 0; i < openidArray.size(); i++) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\topenids.add(openidArray.getString(i));\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\tString nextopenid = responseJson.getString(\"next_openid\");\n\t\t\t\t\tif(StringUtils.isEmpty(nextopenid))\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t\tnext_openid = nextopenid;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlog.error(e);\n\t\t\t\tflag = false;\n\t\t\t}\n\t\t}\n\t\treturn openids;\n\t}", "List<User> fetchAllUSers();", "public java.util.List<? extends com.sbytestream.samples.grpc.stockservice.StockOrBuilder> \n getStocksOrBuilderList() {\n return stocks_;\n }", "public List<User> listAll() throws Exception;", "public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "List<ItemStockDO> selectAll();", "@GET\n @Path(\"/\")\n public List<HashMap<String, String>> getAllLists() {\n return mailChimpService.getAllLists();\n }", "public ArrayList<Warehouse> getUserWarehouses(){\r\n try{\r\n ArrayList<Warehouse> mWarehouses = new ArrayList<Warehouse>();\r\n UserManager mydb= new UserManager(activity);\r\n String[] allColumns = { DBManager.Warehouse_Key, DBManager.Warehouse_LABEL };\r\n\r\n mydb.open();\r\n Cursor cursor = mydb.getDb().query(DBManager.Warehouse_TABLE_NAME,\r\n allColumns, null, null, null, null, null);\r\n\r\n cursor.moveToFirst();\r\n while (!cursor.isAfterLast()) {\r\n Warehouse dp = new Warehouse(cursor.getString(0),cursor.getString(1));\r\n mWarehouses.add(dp);\r\n cursor.moveToNext();\r\n }\r\n // closing the cursor\r\n cursor.close();\r\n mydb.close();\r\n\r\n return mWarehouses;\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "public void setListOfStock( List<StockEntity> listOfStock ) {\n this.listOfStock = listOfStock;\n }", "public List getGestionStockList(Map criteria);", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "List<KingdomUser> getUsers();", "@Override\r\n\tpublic List<UserEntity> findUserList(UserEntity user) {\n\t\treturn userDao.findUserList(user);\r\n\t}", "@Override\n\tpublic List<InvBaseStockEx> queryInvStockList(InvBaseStockEx invBaseStock, PagerInfo pager) {\n\t\treturn invBaseStockDao.queryInvStockList(invBaseStock, pager);\n\t}", "private void getGiveBackBillList() {\n User user = DataFunctionUtil.findFirstUserByName(HuIZhanApplication.getLName(mContext));\n Service.stringGet(this, Const.URL_DOWNLOAD_GIVBACK + user.getStorageID(), new DownloadGiveBackBillCallBack(\"正在下载出库单...\", mHandler, this), 104);\n\n }", "public List<ShelfItem> getAllShelf(String filter, String username, Integer from, Integer to);", "public static List<YahooStock> retrieveYahooStocks(String symbol) {\n\t\tURL yahooFinanceUrl2 = null;\n\t\tURLConnection urlConnection;\n\t\tList<YahooStock> yahooStockList = null;\n\t\ttry {\n\t\t\t//yahooFinanceUrl1 = new URL(\"http://download.finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t\tyahooFinanceUrl2 = new URL(\"http://finance.yahoo.com/d/quotes.csv?s=\" + symbol + \"&f=sl1d1t1c1ohgv&e=.csv\");\n\t\t} catch (MalformedURLException mue) {\n\t\t\tmue.printStackTrace();\n\t\t} \n\t\ttry {\n\t\t\turlConnection = yahooFinanceUrl2.openConnection();\n\t\t\tBufferedReader dataIn = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); \n\t\t\tString inputLine; \n\t\t\tyahooStockList = new ArrayList<YahooStock>();\n\t\t\twhile ((inputLine = dataIn.readLine()) != null) {\n\t\t\t\tString[] yahooStockInfo = inputLine.split(\",\");\n\t\t\t\tYahooStock yahooStock = new YahooStock();\n\t\t\t\tyahooStock.setSymbol(yahooStockInfo[0].replaceAll(\"\\\"\", \"\"));\n\t\t\t\tyahooStock.setLastTrade(Double.valueOf(yahooStockInfo[1]));\n\t\t\t\tyahooStock.setTradeDate(yahooStockInfo[2]);\n\t\t\t\tyahooStock.setTradeTime(yahooStockInfo[3]);\n\t\t\t\tyahooStock.setChange(Double.valueOf(yahooStockInfo[4]));\n\t\t\t\tyahooStock.setOpen(Double.valueOf(yahooStockInfo[5]));\n\t\t\t\tyahooStock.setHigh(Double.valueOf(yahooStockInfo[6]));\n\t\t\t\tyahooStock.setLow(Double.valueOf(yahooStockInfo[7]));\n\t\t\t\tyahooStock.setVolume(Double.valueOf(yahooStockInfo[8]));\n\t\t\t\tyahooStock.setSmallChartUrl(\"http://ichart.finance.yahoo.com/t?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStock.setLargeChartUrl(\"http://chart.finance.yahoo.com/w?s=\" + yahooStock.getSymbol());\n\t\t\t\tyahooStockList.add(yahooStock);\n\t\t\t} \n\t\t\tdataIn.close(); \n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} \n\t\treturn yahooStockList; \t\n\t}", "public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "public void queryAllBuyableItems(){\r\n awsAppSyncClient.query(ListBuyableItemsQuery.builder().build())\r\n .responseFetcher(AppSyncResponseFetchers.CACHE_AND_NETWORK)\r\n .enqueue(getAllBuyableItemsCallback);\r\n }", "@Override\r\n\tpublic List<Book> getWishList(User user) {\n\t\tTypedQuery<Book> query = sessionFactory.getCurrentSession().createNativeQuery(\"select USER_ID, BOOK_ID from WISH_USER_BOOK where USER_ID = \" + user.getId());\r\n\t\treturn query.getResultList();\r\n\t}", "public void listStores(){\r\n Map<String, String> params = new HashMap<>();\r\n String url = API_DOMAIN + STORE_EXT + LIST_ACTION;\r\n this.makeVolleyRequest( url, params );\r\n }", "public List<User> getUsers();", "public List<User> getUserList();", "@Override\r\n\tpublic Object getList() {\n\t\treturn userDao.getList();\r\n\t}", "@Transactional (propagation = Propagation.REQUIRES_NEW, isolation = Isolation.SERIALIZABLE)\n\t@Override\n\tpublic List<UserBO> listUser(String criteria) {\n\t\tlogger.info(\"Begin : \" + getClass().getName() + \" : listUser()\");\n\t\tList<UserBO> userBOList = securityDao.listUser(criteria);\n\t\tlogger.info(\"User list 1st fetched : \" + userBOList.size());\n\t\t\n\t\tuserBOList = securityDao.listUser(criteria);\n\t\tlogger.info(\"User list 2nd fetched : \" + userBOList.size());\n\t\treturn userBOList;\n\t}", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "List<User> getUsers();", "List<User> getUsers();", "public List getUserListCurrent() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@Override\n\tpublic List<TUserScores> getList(String hql) {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction ts = session.beginTransaction();\n\n\t\tList<TUserScores> list = new ArrayList<TUserScores>();\n\t\tlist = session.createQuery(hql).list();\n\t\tts.commit();\n\t\tsession.close();\n\t\treturn list;\n\t}", "public List<ShelfItem> getAllWishlist(String filter, String username, Integer from, Integer to);", "public ArrayList findAll() {\n String query = \"SELECT * FROM SilentAuction.Users\";\n ArrayList aUserCollection = selectUsersFromDB(query);\n return aUserCollection;\n }", "@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}", "@Override\n\tpublic List<InvBaseStockEx> queryInvBaseStockList(InvBaseStockEx invBaseStock, PagerInfo pager) {\n\t\treturn invBaseStockDao.queryInvBaseStockList(invBaseStock, pager);\n\t}", "public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}", "public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}", "public List<Buy> getAll() throws PersistException;", "public void getUserLists(@NonNull final String userID, @NonNull final ShopListCallback callback) {\n String url = URL_GET_LIST + userID + \"/lists\";\n Log.d(\"URL\", \"URL: \" + url);\n\n List<ShopList> shopLists = new ArrayList<>();\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url,response -> {\n try {\n JSONArray listArray = new JSONArray(response);\n for(int i = 0; i < listArray.length(); i++){\n JSONObject parameter = listArray.getJSONObject(i);\n\n String title = parameter.getString(\"title\");\n String listID = parameter.getString(\"listID\");\n String date = parameter.getString(\"date\");\n\n ShopList shopList = new ShopList(title, null, listID, userID, date);\n shopLists.add(shopList);\n }\n callback.onShopListSuccess(shopLists);\n } catch (JSONException | IOException ex) {\n Log.d(TAG, \"Failure: \" + ex.getMessage());\n VolleyError error = new ParseError();\n callback.onShopListError(error);\n }\n }, error -> {\n Log.d(\"ERROR\", \"createUser: \" + error);\n callback.onShopListError(error);\n });\n\n Log.d(TAG, \"getProduct: \" + stringRequest);\n stringRequest.setTag(CURRENT_SHOPLIST_TAG);\n requestQueue.add(stringRequest);\n }", "public final void fetchAuctionSalesList(boolean z) {\n showLoadingIndicator(true);\n StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;\n Object[] objArr = new Object[2];\n SessionManager sessionManager2 = this.sessionManager;\n if (sessionManager2 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"sessionManager\");\n }\n objArr[0] = sessionManager2.getCurrentSessionUsername();\n SessionManager sessionManager3 = this.sessionManager;\n if (sessionManager3 == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"sessionManager\");\n }\n objArr[1] = sessionManager3.getCurrentSessionPassword();\n String format = String.format(\"%s:%s\", Arrays.copyOf(objArr, objArr.length));\n Intrinsics.checkExpressionValueIsNotNull(format, \"java.lang.String.format(format, *args)\");\n AuctionSalesListViewModel auctionSalesListViewModel = this.viewModel;\n if (auctionSalesListViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n auctionSalesListViewModel.fetchAuctionSalesList(getRequestBody(), format, z);\n subscribeToViewModel();\n }", "@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}", "@Transactional\n\tpublic List<Supplier> list() {\n\t\tString hql=\"from Supplier\";\n\t\tQuery query=sessionFactory.getCurrentSession().createQuery(hql);\n\t\t\n\t\treturn query.list();\n\t}", "public ArrayList<String[]> loadStocks() {\n Log.d(TAG, \"loadStocks: Start Loading\");\n ArrayList<String[]> stocks = new ArrayList<>();\n Cursor cursor = database.query(\n TABLE_NAME,\n new String[]{STOCK_SYMBOL, STOCK_NAME},\n null,\n null,\n null,\n null,\n STOCK_SYMBOL);\n if (cursor != null) {\n cursor.moveToFirst();\n for (int i = 0; i < cursor.getCount(); i++) {\n String symbol = cursor.getString(0);\n //Double price = cursor.getDouble(1);\n // Double change = cursor.getDouble(2);\n //Double changePer = cursor.getDouble(3);\n String name = cursor.getString(1);\n stocks.add(new String[]{symbol, name});\n cursor.moveToNext();\n }\n cursor.close();\n }\n return stocks;\n}", "public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}", "List<KingdomUser> getAllUsers();", "public static ArrayList<Userdatas> getAllUsersList() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_ALL_USERS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Userdatas> anagList = (ArrayList<Userdatas>) rpp.parameters[0];\n\t\treturn anagList;\n\t}", "@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}", "public void initStockData() {\n\t\t\tStockBrokerImpl.this.stockData = new ArrayList<StockCompany>();\n\t\t\tthis.updateStockData();\n\t\t\tfor (final StockCompany company : StockBrokerImpl.this.stockData)\n\t\t\t\tSystem.out.println(company.getStockPrice());\n\n\t\t}", "void getMarketOrders();", "@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}", "public void loadAllLists(){\n }", "public UserList list();", "public Cursor getAllLists() {\n //Seleccionamos todas las filas de la tabla List\n return database.rawQuery(\n \"select * from \" + LIST_TABLE_NAME, null);\n }", "public ArrayList<User> getList() {\n return list;\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }", "List<InventoryItem> getInventory(String username);", "java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();", "@Override\n\tpublic ArrayList<Object> getList() {\n\t\tSession session = HibernateUtil.getSession();\n\t\tsession.beginTransaction();\n\t\tString hsql=\"from hibernate.pojo.GmSite as site where site.display='true'\";\n\t\tQuery query = session.createQuery(hsql);\n\t\tsession.getTransaction().commit();\n\t\tArrayList<Object> list = new ArrayList<Object>();\n\t\tlist = (ArrayList<Object>) query.list();\n\t\t\n\t\tsession.close();\n\t\treturn list;\n\t}", "public ArrayList<memberjoin> getUserList() {\n\t\treturn Tdao.selectticketList();\r\n\t}", "public StockManager()\n {\n stock = new ArrayList<>();\n }", "private void getDBInstallationList() {\n DataHolder mDataHolder;\n mArrayListInstallations = new ArrayList<>();\n try {\n String url = \"select * from \" + mActivity.mDbHelper.mTableInstall + \" where \" + mActivity.mDbHelper.mFieldInstallIsSync + \"= 0\" + \" AND \" + mActivity.mDbHelper.mFieldInstallUserId + \"= '\" + PreferenceHelper.getPreferenceInstance(MyApplication.getAppContext()).getUserId() + \"'\" + \" order by \" + mActivity.mDbHelper.mFieldInstallLocalId + \" DESC\";\n System.out.println(\"Local url \" + url);\n mDataHolder = mActivity.mDbHelper.read(url);\n if (mDataHolder != null) {\n System.out.println(\"Local Device List \" + url + \" : \" + mDataHolder.get_Listholder().size());\n for (int i = 0; i < mDataHolder.get_Listholder().size(); i++) {\n VoInstallation mVoInstallation = new VoInstallation();\n mVoInstallation.setInst_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalId));\n mVoInstallation.setInst_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerId));\n mVoInstallation.setInst_user_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUserId));\n mVoInstallation.setInst_device_imei_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceIMEINo));\n mVoInstallation.setInst_device_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceServerId));\n mVoInstallation.setInst_device_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceLocalId));\n mVoInstallation.setInst_device_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDevicName));\n mVoInstallation.setInst_device_warranty_status(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceWarranty_status));\n mVoInstallation.setInst_device_type_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceTypeName));\n mVoInstallation.setInst_help_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallHelpNo));\n mVoInstallation.setInst_date_time(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTime));\n mVoInstallation.setInst_latitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLatitude));\n mVoInstallation.setInst_longitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLongitude));\n mVoInstallation.setInst_country_code(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryCode));\n mVoInstallation.setInst_country_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryName));\n mVoInstallation.setInst_vessel_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselLocalId));\n mVoInstallation.setInst_vessel_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselServerId));\n mVoInstallation.setInst_vessel_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselName));\n mVoInstallation.setInst_vessel_regi_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselRegNo));\n mVoInstallation.setInst_power(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPower));\n mVoInstallation.setInst_location(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocation));\n mVoInstallation.setInst_owner_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerName));\n mVoInstallation.setInst_owner_address(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerAddress));\n mVoInstallation.setInst_owner_city(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerCity));\n mVoInstallation.setInst_owner_state(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerState));\n mVoInstallation.setInst_owner_zipcode(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerZipcode));\n mVoInstallation.setInst_owner_email(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerEmail));\n mVoInstallation.setInst_owner_mobile_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerMobileNo));\n mVoInstallation.setInst_local_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalSignUrl));\n mVoInstallation.setInst_server_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerSignUrl));\n mVoInstallation.setInst_local_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalInstallerSignUrl));\n mVoInstallation.setInst_server_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerInstallerSignUrl));\n mVoInstallation.setInst_pdf_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPdfUrl));\n mVoInstallation.setInst_created_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCreatedDate));\n mVoInstallation.setInst_updated_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUpdatedDate));\n mVoInstallation.setInst_is_sync(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallIsSync));\n mVoInstallation.setIs_install(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallStatus));\n mVoInstallation.setInst_date_timestamp(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTimeStamp));\n mArrayListInstallations.add(mVoInstallation);\n }\n }\n// Collections.sort(mArrayListTreatmentLists, new Comparator<TreatmentList>() {\n// @Override\n// public int compare(TreatmentList s1, TreatmentList s2) {\n// return s1.getTreatment_title().compareToIgnoreCase(s1.getTreatment_title());\n// }\n// });\n } catch (Exception e) {\n e.printStackTrace();\n }\n LinearLayoutManager mLayoutManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false);\n mInstallationAdapter = new InstallationAdapter();\n mRecyclerViewInstallation.setLayoutManager(mLayoutManager);\n mRecyclerViewInstallation.setAdapter(mInstallationAdapter);\n mInstallationAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n checkAdapterIsEmpty();\n }\n });\n checkAdapterIsEmpty();\n }", "List<Order> getByUser(User user);", "@GET\r\n public List<EnterpriseUserDTO> getEnterpriseUserList(){\r\n List <EnterpriseUserEntity> enterpriseUsers = enterpriseUsersLogic.obtenerEnterpriseUsers();\r\n return EnterpriseUserDTO.toEnterpriseUserList(enterpriseUsers);\r\n }", "@Override\r\n public GameList getAllRentedGames(User user) throws RemoteException, SQLException {\r\n return gameListClientModel.getRentedGames(user);\r\n }", "private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs names \r\n ArrayList<String> clubs = new ArrayList<>();\r\n \r\n // add names to list\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n clubs.add(profile.get(cName).toString());\r\n }\r\n \r\n Collections.sort(clubs);\r\n \r\n for (String name : clubs)\r\n \t logger.log(Level.INFO, name);\r\n \r\n displayOpen();\r\n }", "public List<User> getAllUsers();", "public List getAllUserAbscences() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n // DateFormat sdf = new SimpleDateFormat(\"MM/dd/yy\");\n\n String today=\"\";\n int year=new Date().getYear()+1900;\n int month=new Date().getMonth()+1;\n \n today = new Date().getDate()+\"/\"+ month+\"/\"+ year;\n \n\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select userabscence from app.user.UserAbscence userabscence where \"\n + \" userabscence.abscence_date= str_to_date('\" + today\n + \"','%d/%m/%Y')\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }" ]
[ "0.69433725", "0.6841752", "0.66292685", "0.65244573", "0.6516595", "0.64563143", "0.64501363", "0.6444759", "0.6440891", "0.64106023", "0.6358039", "0.62838626", "0.61768484", "0.61261433", "0.6121003", "0.6119492", "0.6074521", "0.60566723", "0.6056305", "0.6052407", "0.5989349", "0.5986485", "0.59644926", "0.59285015", "0.591476", "0.59037256", "0.59014434", "0.5901137", "0.5897826", "0.5895336", "0.58814216", "0.58758235", "0.5867962", "0.58654577", "0.5863414", "0.5854199", "0.5838226", "0.58350986", "0.5825495", "0.5819351", "0.58069575", "0.5804024", "0.57990617", "0.579067", "0.5780958", "0.5760246", "0.5743201", "0.57321167", "0.57289636", "0.5721487", "0.5713904", "0.5713085", "0.5692577", "0.5685405", "0.5681686", "0.5679898", "0.56792104", "0.5677568", "0.5666515", "0.56591254", "0.5658282", "0.5658282", "0.5654692", "0.5652835", "0.565275", "0.56484276", "0.5641113", "0.56344813", "0.56325907", "0.56269085", "0.5624194", "0.5618323", "0.5612638", "0.560979", "0.5600859", "0.55923295", "0.55884606", "0.55832076", "0.55797213", "0.5573124", "0.55713344", "0.55615747", "0.5559679", "0.5553956", "0.55529815", "0.5550411", "0.55495566", "0.55483556", "0.55443543", "0.5543335", "0.5540206", "0.553833", "0.5529146", "0.55236155", "0.5521283", "0.55187845", "0.55179924", "0.5517561", "0.5515395", "0.5515205" ]
0.715978
0
Reducing Operators > generally performed on finite set Conditional Operators > checks conditions
public static void main(String[] args) { // count operator counter number of elements emmitted, Observable<Integer> observable = Observable.just(1,2,3,4); observable.count().subscribe(s->System.out.println(s)); // conditional opertors // all() -> this operator checks condition for all values and returns false if any condition fails observable.all(i->i<3).subscribe(s->System.out.println(s)); // any() -> this operator checks condition for all values and returns true if any condition is true // empty() -> checks if observable have empty value and returns true/false // contains() -> checks if specified item is contained/emmitted by observable // sequenceEqual() -> checks if two sequences are equals (sequences contains same values) observable.any(i->i<3).subscribe(s->System.out.println(s)); observable.filter(i->i<5).isEmpty().subscribe(s->System.out.println(s)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object findOperatorNeedCheck();", "boolean hasOperator();", "protected boolean checkOperators()\n {\n Object loLeft ;\n Object loRight ;\n Object loOperator ;\n Object loConditionType ;\n boolean lboolOK = true ;\n\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n loLeft = getData( \"AND_COND_LHS_\" + liCtr ).getObject() ;\n loConditionType = getData( \"AND_COND_TYP_\" + liCtr ).getObject() ;\n loOperator = getData( \"AND_COND_OPR_\" + liCtr ).getObject() ;\n loRight = getData( \"AND_COND_RHS_\" + liCtr ).getObject() ;\n if ( ( loLeft != null ) && ( loOperator == null ) )\n {\n lboolOK = false ;\n raiseException( \"An operator is required for Condition \" + liCtr ) ;\n } /* end if ( ( loLeft != null ) && ( loOperator == null ) ) */\n\n if (loConditionType == null)\n {\n if(loLeft != null)\n {\n lboolOK = false ;\n raiseException( \"%c:Q0150,v: Condition Type for Condition \" +\n liCtr + \",v: Left Hand Side is %\" ) ;\n }\n if(loRight != null)\n {\n lboolOK = false ;\n raiseException( \"%c:Q0150,v: Condition Type for Condition \" +\n liCtr + \",v: Right Hand Side is %\" ) ;\n }\n } /* end if (loConditionType == null) */\n } /* end for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ ) */\n return lboolOK ;\n }", "private void ensureConditionContinuity( )\n {\n /* If the operators are not valid, then do not move the conditions */\n if ( checkOperators() )\n {\n /*\n * When Left Hand Side, Operator and Right Hand Side for a Condition\n * are empty then infer the default value, i.e., set Operator to\n * CVL_WF_OPRSImpl.EQUAL. Left Hand Side and Right Hand Side will continue\n * to remain empty.\n */\n defaultForEmptyConditions();\n\n int liCount = 0;\n int liNumber = 0 ;\n int liCurrentRow = 0;\n Data loNewData = null ;\n Data loOldData = null ;\n\n /* Cycle through the conditions. Make sure the conditions in front */\n /* of current condition are not blank, if so, move current condition up */\n\n for (liCount = 2; liCount < 6; liCount++ )\n {\n liNumber = liCount ;\n while (liNumber > 1)\n {\n liCurrentRow = liCount - ( liNumber - 1 );\n if (getAND_COND_LHS(liCurrentRow) == null)\n {\n /*\n * copy old condition to new condition, or condition 2 to 1 ...\n * first get data from new left hand side, and get data from\n * old left hand side, and copy new to old. Repeat for right\n * hand side , operator and Condition Type.\n */\n\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_LHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loOldData = getData(\"AND_COND_RHS_FLD_\" + liCurrentRow ) ;\n loOldData.setString(loNewData.getString() );\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loOldData = getData(\"AND_COND_OPR_\" + liCurrentRow ) ;\n loOldData.setbyte(loNewData.getbyte() );\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loOldData = getData(\"AND_COND_TYP_\" + liCurrentRow ) ;\n loOldData.setint(loNewData.getint() );\n /*\n * reset the old condition back to null ,operator to default 3\n * and Condition type to 1 (i.e. Actual Value)\n */\n loNewData = getData(\"AND_COND_LHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_RHS_FLD_\" + liCount ) ;\n loNewData.setString(null);\n loNewData = getData(\"AND_COND_OPR_\" + liCount ) ;\n loNewData.setbyte((byte)3);\n loNewData = getData(\"AND_COND_TYP_\" + liCount ) ;\n loNewData.setint(CVL_WF_COND_TYPImpl.ACTUAL_VAL);\n\n } /* end if (getAND_COND_LHS(liCurrentRow) == null) */\n\n liNumber-- ;\n\n } /* end while (liNumber > 1) */\n } /* end for (liCount = 2; liCount < 6; liCount++ ) */\n } /* end if ( checkOperators() ) */\n }", "public void testX1andX2orNotX1() {\n \tCircuit circuit = new Circuit();\n \t\n \tBoolean b1 = Boolean.TRUE;\n \tBoolean b2 = Boolean.FALSE;\n \tAnd and = (And) circuit.getFactory().getGate(Gate.AND);\n\t\tNot not = (Not) circuit.getFactory().getGate(Gate.NOT);\n\t\tOr or = (Or) circuit.getFactory().getGate(Gate.OR);\n\t\tand.setLeftInput(b1);\n\t\tand.setRightInput(b2);\n\t\tand.eval();\n\t\tnot.setInput(b1);\n\t\tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n\t\tassertEquals(Boolean.FALSE, or.eval());\n\t\tassertEquals(Boolean.FALSE, circuit.eval());\n//\t\t==========================================\n\t\tb1 = Boolean.FALSE;\n \tb2 = Boolean.TRUE;\n// \tand.eval();\n// \tnot.eval();\n \tassertEquals(Boolean.FALSE, circuit.eval());\n// \t============================================\n \tDouble d1 = 0.0;\n \tDouble d2 = 1.0;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n\t\tnot.setInput(d1);\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(1.0), or.eval());\n// \t============================================\n \td1 = 0.5;\n \td2 = 0.5;\n \tand.setLeftInput(d1);\n\t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n\t\tor.setLeftInput(and.getOutput());\n\t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n// \t============================================\n \ttry {\n \td1 = 0.5;\n \td2 = 2.0;\n \tand.setLeftInput(d1);\n \t\tand.setRightInput(d2);\n \tand.eval();\n \tnot.setInput(d1);\n \tnot.eval();\n \t\tor.setLeftInput(and.getOutput());\n \t\tor.setRightInput(not.getOutput());\n \tassertEquals( new Double(0.625), or.eval());\n \t} catch (IllegalArgumentException e) {\n \t\tSystem.err.println(\"IllegalArgumentException: \" + e.getMessage());\n \t}\n\n }", "@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "boolean isOp();", "private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }", "@Override\n\tprotected void addRequestedOperators() {\n\t}", "public static void main(String[] agrs) {\n\t\tconditionalOperEx();\r\n\t}", "final public void PendingOperatorBool() throws ParseException {String o, op1, op2, r;\n// Si la pila no esta vacía\n if( !pOperators.empty()) {\n\n // Y el tope de la pila es > < <> o ==\n if ( pOperators.peek() == \">\" || pOperators.peek() == \"<\" ||\n pOperators.peek() == \"<>\" || pOperators.peek() == \"==\" ) {\n\n // Sacar los operandos y el operador de las pilas\n op2 = (String)pOperands.pop();\n op1 = (String)pOperands.pop();\n o = (String)pOperators.pop();\n r = \"t\" + currentTemporal;\n\n currentTemporal++;\n\n // Crear un cuadruplo y meterlos\n Cuadruplo quad = new Cuadruplo(o, op1, op2, r);\n quadCounter++;\n pOperands.push(r);\n cuadruplos.addElement(quad);\n }\n }\n }", "static boolean binaryOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"binaryOperator\")) return false;\n boolean r;\n r = multiplicativeOperator(b, l + 1);\n if (!r) r = additiveOperator(b, l + 1);\n if (!r) r = shiftOperator(b, l + 1);\n if (!r) r = relationalOperator(b, l + 1);\n if (!r) r = consumeToken(b, EQ_EQ);\n if (!r) r = bitwiseOperator(b, l + 1);\n return r;\n }", "@Override\n\tpublic Object visit(ASTLogical node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "public boolean isOperator(){\n return true;\n }", "@RepeatedTest(20)\n void logicalOperatorsTest() {\n assertEquals(bi.or(bot), new Binary(\"1\"));\n assertEquals(bi.or(bof), bi);\n assertEquals(bi.and(bot), bi);\n assertEquals(bi.and(bof), new Binary(\"0\"));\n assertEquals(bot.or(bi), new Binary(\"1\"));\n assertEquals(bof.or(bi), bi);\n assertEquals(bot.and(bi), bi);\n assertEquals(bof.and(bi), new Binary(\"0\"));\n assertEquals(bot.and(bot), bot);\n assertEquals(bot.and(bof),bof);\n assertEquals(bof.and(bot),bof);\n assertEquals(bof.and(bof),bof);\n assertEquals(bot.or(bot), bot);\n assertEquals(bot.or(bof),bot);\n assertEquals(bof.or(bot),bot);\n assertEquals(bof.or(bof),bof);\n Binary b1 = new Binary(\"10001\");\n Binary b2 = new Binary(\"1001011\");\n assertEquals(b1.or(b2), new Binary(\"1111011\"));\n assertEquals(b1.and(b2), new Binary(\"1000001\"));\n assertEquals(b1.or(b2), b2.or(b1));\n assertEquals(b1.and(b2),b2.and(b1));\n assertEquals(bi.or(bi), bi);\n assertEquals(bi.and(bi),bi);\n Binary notbi = bi.neg();\n assertEquals(bi.or(notbi), new Binary(\"1\"));\n assertEquals(bi.and(notbi), new Binary(\"0\"));\n\n //nulls\n //Bool or ITypes \\ {Logicals}\n assertEquals(bot.or(st),Null);\n assertEquals(bof.or(st),Null);\n assertEquals(bot.or(f), Null);\n assertEquals(bof.or(i), Null);\n //Float or ITypes\n assertEquals(f.or(st), Null);\n assertEquals(f.or(bot), Null);\n assertEquals(f.or(bof), Null);\n assertEquals(f.or(i), Null);\n assertEquals(f.or(g), Null);\n assertEquals(f.or(bi), Null);\n //Int or ITypes\n assertEquals(i.or(st), Null);\n assertEquals(i.or(bot),Null);\n assertEquals(i.or(bof), Null);\n assertEquals(i.or(j), Null);\n assertEquals(i.or(f), Null);\n assertEquals(i.or(bi), Null);\n //Binary or ITypes \\ {Logicals}\n assertEquals(bi.or(st), Null);\n assertEquals(bi.or(f), Null);\n assertEquals(bi.or(i), Null);\n //NullType or ITypes\n assertEquals(Null.or(st), Null);\n assertEquals(Null.or(bof), Null);\n assertEquals(Null.or(f), Null);\n assertEquals(Null.or(i), Null);\n assertEquals(Null.or(bi), Null);\n assertEquals(Null.or(Null), Null);\n assertEquals(st.or(Null), Null);\n assertEquals(bot.or(Null), Null);\n assertEquals(f.or(Null), Null);\n assertEquals(i.or(Null), Null);\n assertEquals(bi.or(Null), Null);\n\n //Bool and ITypes \\ {Logicals}\n assertEquals(bot.and(st),Null);\n assertEquals(bof.and(st),Null);\n assertEquals(bot.and(f), Null);\n assertEquals(bof.and(i), Null);\n //Float and ITypes\n assertEquals(f.and(st), Null);\n assertEquals(f.and(bot), Null);\n assertEquals(f.and(bof), Null);\n assertEquals(f.and(i), Null);\n assertEquals(f.and(g), Null);\n assertEquals(f.and(bi), Null);\n //Int and ITypes\n assertEquals(i.and(st), Null);\n assertEquals(i.and(bot),Null);\n assertEquals(i.and(bof), Null);\n assertEquals(i.and(j), Null);\n assertEquals(i.and(f), Null);\n assertEquals(i.and(bi), Null);\n //Binary and ITypes \\ {Logicals}\n assertEquals(bi.and(st), Null);\n assertEquals(bi.and(f), Null);\n assertEquals(bi.and(i), Null);\n //NullType and ITypes\n assertEquals(Null.and(st), Null);\n assertEquals(Null.and(bof), Null);\n assertEquals(Null.and(f), Null);\n assertEquals(Null.and(i), Null);\n assertEquals(Null.and(bi), Null);\n assertEquals(Null.and(Null), Null);\n assertEquals(st.and(Null), Null);\n assertEquals(bot.and(Null), Null);\n assertEquals(f.and(Null), Null);\n assertEquals(i.and(Null), Null);\n assertEquals(bi.and(Null), Null);\n\n }", "String getOr_op();", "private void checkLogicOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }", "Expression getCond();", "private void checkArithmeticOperands(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n checkBinaryOperation(in, d, out);\n }", "boolean getDoCommonSubexpressionElimination();", "String getOperator();", "java.lang.String getOperator();", "private double logicalAnd() {\n\t\tdouble q = p<=0.5?p:1-p;\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('t') + q * configMap.get('m') + p * configMap.get('a');\n\t}", "bool eval(Map<string,object> obj)\n {\n if(!obj.contains(property)) //dept\n return false;\n \n curValue = obj.get(property); //purchase\n switch(operator)\n {\n case '==':\n return value.equeals(curValue); sales == purchase\n break;\n case '>':\n ...\n case '<':\n ...\n case '!=':\n ... \n case '<=':\n ...\n case '>=':\n ...\n }\n }", "private boolean isOperator(String s) {\n\t\treturn (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\") || s.equals(\"/\") || s.equals(\"^\"));\n\t}", "public static void main(String[]args){\n\r\n int []arr = new int[100];\r\n int []arr2 = new int[50];\r\n int []arr3 = {1,2,3,4,5,6,7,8};\r\n int number = 5;\r\n LogicalOp op = new LogicalOp();\r\n// op.writeOnArray(arr);\r\n\r\n// arr2 = op.evenArray(arr2);\r\n// for(int i=0;i<arr2.length;i++)\r\n// System.out.println(arr2[i]);\r\n\r\n //System.out.println(\"Mean value: \"+op.meanValue(arr3));\r\n\r\n// String[] arrOfStr = {\"ana\",\"are\",\"mere\",\"pere\",\"mere\"};\r\n// String str = \"mere\";\r\n// System.out.println(op.isContaingString(arrOfStr,str));\r\n\r\n// System.out.println(op.findPosition(arr3,number));\r\n\r\n //op.displayLines();\r\n\r\n// int[]modifArr = op.modifiedArr(arr3,number);\r\n// for(int item: modifArr)\r\n// System.out.print(item+\" \");\r\n\r\n\r\n //System.out.println(\"Second minimum: \"+op.secondMin(arr3));\r\n\r\n int[] empty = new int[arr3.length];\r\n empty = op.populateArray(arr3,empty);\r\n for(int item:empty)\r\n System.out.print(item+\" \");\r\n\r\n\r\n\r\n }", "protected abstract boolean reduce();", "@Override\n\tpublic Set<Operator> determinization(Set<Operator> ops)\n\t{\n\t\tif (DEBUG)\n\t\t\tSystem.out.println(\"Determinize following operators: \" + ops);\n\t\tSet<Operator> result = new HashSet<Operator>(ops.size() * 2);\n\t\t// Processing of explicit Operators.\n\t\tfor (Operator op : ops)\n\t\t{\n\t\t\tExplicitOperator explicitOp = (ExplicitOperator) op;\n\t\t\tassert !op.isDeterminized();\n\t\t\tSet<Set<ExplicitEffect>> nondeterministicEffect = explicitOp\n\t\t\t\t\t.getNondeterministicEffect();\n\t\t\tif (nondeterministicEffect == null\n\t\t\t\t\t|| nondeterministicEffect.size() == 1)\n\t\t\t{\n\t\t\t\t// Operator is already deterministic, since it has only an empty\n\t\t\t\t// effect or only a single deterministic effect.\n\t\t\t\tresult.add(new ExplicitOperator(op.getName() + \"_det\",\n\t\t\t\t\t\texplicitOp.precondition, explicitOp\n\t\t\t\t\t\t\t\t.getNondeterministicEffect(), op.observation,\n\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t} else\n\t\t\t{\n\t\t\t\t// There is more than one deterministic effect.\n\t\t\t\tint i = 0;\n\t\t\t\tif (DEBUG)\n\t\t\t\t\tSystem.out.println(\"Operator \" + op + \" has \"\n\t\t\t\t\t\t\t+ nondeterministicEffect.size() + \" choices.\");\n\t\t\t\tfor (Set<ExplicitEffect> choice : nondeterministicEffect)\n\t\t\t\t{\n\t\t\t\t\tif (choice.isEmpty())\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tSet<Set<ExplicitEffect>> modifiedNondeterministicEffect = new HashSet<Set<ExplicitEffect>>();\n\t\t\t\t\tmodifiedNondeterministicEffect.add(choice);\n\t\t\t\t\tString name = op.getName() + \"_det_\" + i++;\n\t\t\t\t\tresult.add(new ExplicitOperator(name,\n\t\t\t\t\t\t\texplicitOp.precondition,\n\t\t\t\t\t\t\tmodifiedNondeterministicEffect, op.observation,\n\t\t\t\t\t\t\top.isAbstracted, true, op.getCost()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (DEBUG)\n\t\t{\n\t\t\tSystem.out.println(\"Result of determinization: \" + result);\n\t\t\tSystem.out.println();\n\t\t}\n\t\tassert (Operator.assertNoDuplicateInNames(result));\n\t\treturn result;\n\t}", "private boolean canGenericOperatorsBeRewrite(Expression virtExpr){\r\n\r\n\t for(GenericNames name : GenericNames.values()){\r\n\t\tif(!name.equals(GenericNames.ON_NEW_NAME))\r\n\t\t if(!this.canOperatorBeRewrittenForExpression(name, virtExpr))\r\n\t\t\treturn false;\r\n\t }\r\n\t\treturn true;\r\n\t}", "public static void main(String args[]) {\n boolean hasSATscore = true;\n boolean hasHighSchoolTranscript = true;\n boolean isInternational=false;\n boolean hasTOFELscore=false;\n\n /*\n * logical_step2: Check if the applicant is eligible to apply to the university\n * logical_step_details: the applicant must have a SAT score, a high school transcript and must have TOEFL score\n * if is an international student.\n * question_1: What does the following block of code do?\n * answer 1: Check if the applicant is eligible to apply to the university\n * question_2: What is the data type of the variable isElig?\n * answer 2: isElig is a Boolean data type\n * question_3: What is the value of: !isInternational. (value assigned above)\n * answer_3: the value of !isInternational is true\n * question_4: What is the output the following block of code?\n * answer_4: the code displays the following statement \"You eligibility requirement has been evaluated to :true\"\n */\n\n /*\n * stm_comment: isElig contains result of logical operation between the variables. logical and (&&), logical or(||) and not operator is used \n * question_1: Please explain how the value of isElig evaluated.\n * answer_1: isElig contains result of logical operation between the variables\n * question_2: Please state the operators used in the code block below.\n * answer_2: logical and (&&), logical or(||) and not operator is used .\n *\n */\n\n boolean isElig = hasSATscore && hasHighSchoolTranscript && (!isInternational || (isInternational && hasTOFELscore));\n System.out.println(\" Your eligibility requirement has been evaluated to :\" +isElig );\n\n\n }", "@Test\n public void defaultOperatorsEvaluteTrueTest() throws Exception {\n\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 != 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <> 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 < 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 > 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 1\", \"expr\").render(null), is((Object)true));\n\n // negative numbers\n assertThat(getNode(\"1 > -1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1 < 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1.0 > -1.0\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1.0 < 1.0\", \"expr\").render(null), is((Object)true));\n }", "public LogicalOperator() {\n this.logical = Logical.And;\n }", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }", "private static boolean checkPrecedence(String operator1, String operator2){\n\n\t\tif((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public String operator( String op);", "private boolean isOperator(char ch)\n {\n if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '^')\n//returns true if either of the operator is found\n return true;\n//else returns false\n return false;\n }", "public void updateOperations() {\n String temp = \"\";\n \n if (chkBoxOperators[0].isSelected()) temp += PLUS;\n if (chkBoxOperators[1].isSelected()) temp += MINUS;\n if (chkBoxOperators[2].isSelected()) temp += TIMES;\n if (chkBoxOperators[3].isSelected()) temp += DIVIDE;\n \n charOperators = temp.toCharArray();\n if (temp.indexOf(currentOperator) == -1) setNewNumbers();\n \n }", "public boolean rightDistributive( Operator op){\n\t return false;\n }", "public int operation(int number1,int number2,String operator)", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "@Override\n public void visit(CondFactExpr CondFactExpr) {\n Code.loadConst(1);\n Code.putFalseJump(Code.eq, 0);\n andList.add(Code.pc - 2);\n\n }", "private static boolean isOperator(String value){\r\n\t\tif (value.equals(\"+\") ||value.equals(\"-\")|| value.equals(\"*\")|| value.equals(\"/\"))\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "@Test\r\n\tpublic void testCompileOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\");\r\n\r\n\t\t// Look for the \"Compile\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(2).click();\r\n\r\n\t\t// Check that there contains the word \"opt_plus\", \"opt_minus\",\r\n\t\t// \"opt_mult\" and \"opt_div\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_plus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_minus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_mult\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_div\"));\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "protected void evaluateConditions()\n {\n ensureConditionContinuity() ;\n checkComponentList() ;\n\n for ( int liCondCtr = 1 ; liCondCtr <= 5 ; liCondCtr++ )\n {\n checkCondition( liCondCtr ) ;\n } /* end for */\n\n }", "boolean operator(Character input){\r\n //detects operands\r\n if(input == '^'||input == '-'||input == '+'||input == '/'||input == '*'|| input =='('|| input ==')'){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }", "public boolean meetsCondition(OpSystem system);", "public static void main(String[] args) { , or , not\n // truth table -> t=1 f=0\n // a =t b= f c = a and b => a.b =0=>f\n\n // except 0 every no. is treated as true\n // int a=1 int b=2 a and b => a.b\n // and -> a=1 , b=2, a and b => a.b\n\n\n // and\n boolean a= false;\n boolean b= false;\n\n boolean c= a && b; // a.b\n System.out.println(c);\n\n //or\n boolean f= true;\n boolean d= true;\n\n boolean e= f || d; // a+b\n System.out.println(e);\n\n // not\n boolean g =true;\n boolean h= !g;\n System.out.println(h);\n\n }", "private void checkBinaryOperation(Set<FlowAbstraction> in, Unit d, Set<FlowAbstraction> out) {\n if (d instanceof AbstractDefinitionStmt) {\n AbstractDefinitionStmt def = (AbstractDefinitionStmt) d;\n Value leftSide = def.getLeftOp();\n Value rightSide = def.getRightOp();\n if(leftSide instanceof Local && rightSide instanceof AbstractBinopExpr) {\n AbstractBinopExpr expr = (AbstractBinopExpr) rightSide;\n FlowAbstraction taint1 = isInTaintedSet(expr.getOp1(), in);\n FlowAbstraction taint2 = isInTaintedSet(expr.getOp2(), in);\n if(taint1 != null || taint2 != null) {\n taint(leftSide, d, out);\n }\n }\n }\n }", "private static boolean validOperation(String op) {\n\t\tfor (String goodOp : validOps) {\n\t\t\tif (goodOp.equalsIgnoreCase(op)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "Expr getCond();", "public static void main(String[] args)\n {\n int i = 1 + 1;\n \n //Concat String\n String s = \"My\" + \" \" + \"String\";\n \n int r = 4;\n int ff = 4;\n System.out.println(\"String\" + r + ff);\n System.out.println(\"String\" + ( r + ff ));\n //If the left or the rigth operator is a String, + will be a String concatenation\n //If both operands are numeric, + will be an addition operator\n \n /*************************************/\n /** Operator = */\n /*************************************/\n //Assign a primitive value to a variable\n int ii = 4;\n \n //Assign a value to an object reference variable\n Object o = new Object();\n \n /*************************************/\n /** Compound assignment operators */\n /*************************************/\n //+=,-=,*=,/=\n// int x *= 2+5;//forbidden, compound assignment operators\n int x = 1;\n \n x *= 2+5;\n //equals to\n x = x * (2+5);\n\n /*************************************/\n /** Relational operators */\n /*************************************/\n //>,>=,<,<=,==,!=\n boolean b = false;\n if(b = false){System.out.println(\"false\");}\n //The result of any assignment is the value of the variable after assignment !\n \n /** == with enum values **/\n //It's the same than equals()\n \n /*************************************/\n /** Arithmetic operators */\n /*************************************/ \n //+,-,/,*,%\n \n /*************************************/\n /** Inc and Decrement operators */\n /*************************************/\n int azerty = 4;\n //pre incr and decrementation\n System.out.println(++azerty);//incr first, print after\n System.out.println(--azerty);//desc first, print after\n \n //post incr and decrementation\n azerty = 4;\n System.out.println(azerty++);//print first, inc after\n System.out.println(azerty--);//print first, desc after\n \n /*************************************/\n /** Logical operator */\n /*************************************/\n //|| OR\n if(theTruth() || theTruth()){\n //Do something\n }\n //if the first operator is true, the second will not be evaluated\n \n //| OR\n if(theTruth() | theTruth()){\n //Do something\n }\n //The two operators are evalued\n \n //XOR ^\n System.out.println(true ^ true);//false\n System.out.println(true ^ false);//true\n System.out.println(false ^ true);//true\n System.out.println(false ^ false);//false\n //The two operators are evalued\n \n //logical operator !\n if(false && false || true){\n System.out.println(\"?\");\n }\n if( (false && false) || true){\n System.out.println(\"??\");\n }\n if(false && false | true){\n System.out.println(\"???\");\n }\n if( (false && false) | true){\n System.out.println(\"????\");\n }\n //| operator is evaluated first!!!\n }", "private boolean isOperator(char x) {\n return (x == '^' ||\n x == '*' ||\n x == '/' ||\n x == '+' ||\n x == '-');\n }", "private boolean isOperator(String value) {\r\n return value.equals(\"*\") || value.equals(\"/\") || value.equals(\"-\") || value.equals(\"+\") || value.equals(\"(\") || value.equals(\")\");\r\n }", "public boolean validOperator(char op){\n switch(op){\n case '+':\n case '-':\n case '*':\n case '/':\n case '^':\n case ')':\n case '(':\n return true;\n }\n\n return false;\n }", "@Test\n public void generate_correctOrderOfPrecedenceWithoutParentheses() throws Exception {\n ConditionGenerator conditionGenerator = initGenerator(PREFIX_TAG_TOKEN, STRING_ONE_TOKEN, OR_TOKEN,\n PREFIX_TAG_TOKEN, STRING_TWO_TOKEN, AND_TOKEN, PREFIX_TAG_TOKEN, STRING_THREE_TOKEN, EOF_TOKEN);\n Predicate<Coin> condition = conditionGenerator.generate();\n\n assertFalse(condition.test(COIN_0));\n assertFalse(condition.test(COIN_1));\n assertFalse(condition.test(COIN_2));\n assertTrue(condition.test(COIN_3));\n assertFalse(condition.test(COIN_4));\n assertTrue(condition.test(COIN_5));\n assertFalse(condition.test(COIN_6));\n assertTrue(condition.test(COIN_7));\n }", "private static boolean isOperator(String c)\n\t\t{\t\n\t\t\tif (c.equals(\"+\") || c.equals(\"-\") || c.equals(\"*\") || c.equals(\"/\") ) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public interface Rule {\n \n /**\n * Determine if a rule meets all of its conditions.\n * @param OpSystem The overall system for this rule.\n * @return true if the rule meets its condition.\n */\n public boolean meetsCondition(OpSystem system);\n}", "private Operator compile(List<Operator> ops, int offset, int length) {\n \n int lLength = findExpression(ops, offset, length);\n \n if (lLength == length){\n \n // Case 1: EXPR\n if (length == 1){\n \n // Return single operator\n return ops.get(offset);\n \n } else if ((ops.get(offset) instanceof PrecedenceOperator) &&\n (ops.get(offset + length - 1) instanceof PrecedenceOperator)){\n \n // Remove brackets\n return compile(ops, offset+1, length-2);\n \n } else {\n throw new RuntimeException(\"Invalid expression\");\n }\n \n } else {\n \n // Case 2: EXPR <OP> EXPR\n if (!(ops.get(offset + lLength) instanceof BinaryOperator)){\n \n // Invalid\n throw new RuntimeException(\"Expecting EXPR <OP> EXPR\");\n } else {\n \n // Binary operator\n BinaryOperator bop = (BinaryOperator)ops.get(offset + lLength);\n bop.left = compile(ops, offset, lLength);\n bop.right = compile(ops, offset + lLength + 1, length - lLength - 1);\n return bop;\n }\n }\n }", "private static boolean check_if_operator(char c)\n {\n return c == '+' || c == '-' || c == '*' || c == '/' || c == '^'|| c == 'r'\n || c == '(' || c == ')'|| c == 's' || c == 'c' || c == 't' || c == 'l';\n }", "private boolean isOperator(char input) {\n\t\tboolean isOperator = false;\n\t\t\n\t\tif((input == '+') || (input == '-') || (input == '*') || (input == '/'))\n\t\t{\n\t\t\tisOperator = true;\n\t\t}\n\t\t\n\t\treturn isOperator;\n\t}", "private boolean isOperator(char c) {\n\t\treturn c == '<' || c == '=' || c == '>' || c == '!';\n\t}", "private boolean isOperator(String operator)\n {\n switch(operator)\n {\n case \"+\":\n case \"-\":\n case \"*\":\n case \"/\":\n case \"%\":\n return true;\n default:\n return false;\n }\n }", "@Override\n public void visitIntIfCmp(Quad q) {\n final byte EQ = 0;\n final byte NE = 1;\n if (checkLevel != NonNull.LEVEL_NORMAL) {\n Operand s1 = Operator.IntIfCmp.getSrc1(q);\n Operand s2 = Operator.IntIfCmp.getSrc2(q);\n TargetOperand targBranch = Operator.IntIfCmp.getTarget(q);\n\n byte cond = Operator.IntIfCmp.getCond(q).getCondition();\n int targBBid = targBranch.getTarget().getID();\n\n // only do this when at least one of opr is reg\n if (s1 instanceof RegisterOperand && !(s2 instanceof RegisterOperand) ||\n s2 instanceof RegisterOperand && !(s1 instanceof RegisterOperand)) {\n Operand reg = s1 instanceof RegisterOperand ? s1 : s2;\n Operand other = s1 instanceof RegisterOperand ? s2 : s1;\n String regName = ((RegisterOperand) reg).getRegister().toString();\n // now ensure reg is register oprd\n\n if (cond == EQ) {\n if (isChecked(other)) {\n val.checkVarWithBranch(regName, true, targBBid);\n } else if (isNull(other)) {\n val.checkVarWithBranch(regName, false, targBBid);\n }\n } else if (cond == NE) {\n if (isNull(other)) {\n val.checkVarWithBranch(regName, true, targBBid);\n } else if (isChecked(other)) {\n val.checkVarWithBranch(regName, false, targBBid);\n }\n }\n } else if (s1 instanceof RegisterOperand && s2 instanceof RegisterOperand) {\n RegisterOperand r1 = (RegisterOperand) s1;\n RegisterOperand r2 = (RegisterOperand) s2;\n String reg1 = r1.getRegister().toString();\n String reg2 = r2.getRegister().toString();\n if (cond == EQ) {\n if (isChecked(r1)) {\n val.checkVarWithBranch(reg2, true, targBBid);\n } else if (isNull(r1)) {\n val.checkVarWithBranch(reg2, false, targBBid);\n } else if (isChecked(r2)) {\n val.checkVarWithBranch(reg1, true, targBBid);\n } else if (isNull(r2)) {\n val.checkVarWithBranch(reg1, false, targBBid);\n }\n } else if (cond == NE) {\n if (isChecked(r1)) {\n val.checkVarWithBranch(reg2, false, targBBid);\n } else if (isNull(r1)) {\n val.checkVarWithBranch(reg2, true, targBBid);\n } else if (isChecked(r2)) {\n val.checkVarWithBranch(reg1, false, targBBid);\n } else if (isNull(r2)) {\n val.checkVarWithBranch(reg1, true, targBBid);\n }\n }\n\n }\n }\n }", "LogicCondition createLogicCondition();", "public static void main(String ... aa)\n {\n \n boolean a1 = 3 == 4; // false ;because 3 is different than 4\n boolean a2 = 4 != 5 ; // true ; because 4 is different than 5\n boolean a3 = 4 < 3.2 ; // false ;because 4 is greater than 3.2\n \n\n /* Logical operators have as results boolean values , however the operands\n are boolean values as well */\n \n boolean a4 = !(4<3.2); // true ; (4<3.2) is false and !false is true\n boolean a5 = true & (3==4); // false; (3==4) is false and true & false is false\n boolean a6 = false | true ; // true \n boolean a7 = false ^ false ; // false\n \n /**************EXTRA CONCEPTS************/\n \n /* & is the and operator , | is the or operator , ^ is the xor operator\n ! is the negation operator , so these operators fulfill the rules of\n logic */\n \n /* Short-circuit logical operators are || and && , they act as the normal\n | and & ,however , if the first operand is enough to know the final result,\n the second operand will not be evaluated */\n \n boolean a8 = false && (3<4); // this is false , however (3<4) was not evaluated\n \n /* a compile error will appar if we try to use relational and logical operators with\n different types of operators */\n \n // boolean a9 = 3 < true; this will not compile \n \n }", "@Override\npublic final void accept(TreeVisitor visitor) {\n visitor.visitWord(OpCodes.OR_NAME);\n if (ops != null) {\n for (int i = 0; i < ops.length; i++) {\n ops[i].accept(visitor);\n }\n } else {\n visitor.visitConstant(null, \"?\");\n }\n visitor.visitEnd();\n }", "Operations operations();", "public boolean leftDistributive( Operator op){\n\t return false;\n }", "public boolean isOperator() {\n\t\treturn (letter == '+') || (letter == '*') ||\n\t\t\t (letter == '%') || (letter == '-') ? true : false;\n\t}", "public void checkOperator (TextView tv){\n String s = tv.getText().toString().substring(tv.getText().length() - 1);\n if (s.equals(\")\") || s.equals(\"!\")) {\n //int a = 1;\n isOperator = false;\n } else if (Character.isDigit(tv.getText().toString().charAt(tv.getText().toString().length() - 1)))\n isOperator = false;\n else\n isOperator = true;\n }", "@Test\r\n public void deriveFromOrAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M|=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH|=9\", \"(long,km^2/h)\");\r\n }", "public interface Operator\n{\n /**\n * Prueft, ob der Messwert das Testkriterium erfuellt.\n * Falls die Implementierung beispielsweise pruefen soll, ob ein\n * Maximalwert ueberschritten ist, muss sie dann \"true\" zurueckliefern,\n * wenn \"value\" groesser als \"limit\" ist.\n * @param sensor der Sensor samt seinem Messwert.\n * @param limit der festgelegte Grenzwert.\n * @return true, wenn die Bedingung erfuellt ist.\n * @throws IllegalArgumentException wenn die Parameter ungueltig sind.\n */\n public boolean matches(Sensor sensor, String limit) throws IllegalArgumentException;\n}", "private void checkCondition( int fiIndex )\n {\n Vector lvVals = new Vector();\n int liNumTokens = 0;\n String lsDocCd = null ;\n String lsOperator = null ;\n int liIndex ;\n String lsDataObject = null ;\n String lsFieldName = null ;\n int liFieldType ;\n String lsLHS = getAND_COND_LHS( fiIndex ) ;\n String lsRHS = getAND_COND_RHS( fiIndex ) ;\n String lsRHS_FLD = getAND_COND_RHS_FLD( fiIndex );\n byte lbOper = getAND_COND_OPR( fiIndex ) ;\n int liCondType = getAND_COND_TYP( fiIndex ) ;\n boolean lboolLHSExists = true ;\n boolean lboolRHSExists = true ;\n boolean lboolListOper = false ;\n char [] lcRhsChar = null;\n int liRhsLen = 0;\n boolean lboolRHSFLDExists = true ;\n boolean lboolIsNullOrIsNotNullOper = false ;\n int liRHSIndex=-1;\n String lsRHSDataObject = null ;\n String lsRHSFieldName = null ;\n int liRHSFieldType=0;\n\n if ( ( lsLHS == null ) || ( lsLHS.trim().length() <= 0 ) )\n {\n lboolLHSExists = false ;\n } /* end if ( ( lsLHS == null ) || ( lsLHS.trim().length() <= 0 ) ) */\n\n lsOperator = CVL_WF_OPRSImpl.RULE_OPERATOR[lbOper];\n\n lboolIsNullOrIsNotNullOper=lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NULL)||\n\t lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NOT_NULL);\n\n\t if (!lboolIsNullOrIsNotNullOper && (( lsRHS == null ) || ( lsRHS.trim().length() <= 0 )) )\n\t {\n\t lboolRHSExists = false ;\n\t } /* end if ( ( lsRHS == null ) || ( lsRHS.trim().length() <= 0 ) ) */\n\n\t // Check if RHS Field exists.\n\t if (!lboolIsNullOrIsNotNullOper && AMSStringUtil.strIsEmpty(lsRHS_FLD) )\n\t {\n\t lboolRHSFLDExists = false ;\n\t } /* end if ( AMSStringUtil.strIsEmpty(lsRHS_FLD) ) */\n\n\n /*\n * If the value for the left hand side is null, and the value\n * for the right hand side is null, then return\n */\n if ( ! ( lboolLHSExists || lboolRHSExists || lboolRHSFLDExists) )\n\t {\n\t return ;\n\t } /* end if ( ! ( lboolLHSExists || lboolRHSExists ) ) */\n\n\t /*\n\t * If the value for the left hand side is not null, but\n\t * the value for the right hand side is null, then\n\t * raise an exception\n\t */\n\t if ( lboolLHSExists && !lboolRHSExists && !lboolRHSFLDExists)\n\t {\n\t raiseException( \"%c:Q0074%\" ) ;\n\t return ;\n\t } /* end if ( lboolLHSExists && !lboolRHSExists ) */\n\n\t if(!lboolIsNullOrIsNotNullOper)\n\t {\n\t /*\n\t * If right hand side value and right hand side field both are present, then\n\t * raise an exception\n\t */\n\t if ( lboolRHSFLDExists && lboolRHSExists )\n\t {\n\t raiseException( \"%c:Q0142%\" ) ;\n\t return ;\n\t } /* end if ( lboolRHSFLDExists && lboolRHSExists ) */\n\n\t /*If right hand side field component neither equal to the left hand side\n\t *component nor the header component.\n\t */\n\t if(lboolLHSExists && lboolRHSFLDExists && !isRHSFldCompEqualsLHSOrHDR(lsLHS,lsRHS_FLD))\n\t {\n\t raiseException( \"%c:Q0145%\" ) ;\n\t return ;\n\t }\n\t }\n\n\t /*\n\t * If the value for the left hand side is null, but\n\t * the value for the right hand side is not null, then\n\t * raise an exception\n\t */\n\t if ( !lboolLHSExists && (lboolRHSExists || lboolRHSFLDExists))\n\t {\n\t raiseException( \"%c:Q0075%\" ) ;\n\t return ;\n\t } /* end if ( ( lsLHS == null ) && ... */\n\n\t /*\n\t * If both left hand and right hand sides are not null, but the\n\t * operator is null, then raise an exception\n\t */\n\t if ( ( lboolLHSExists ) && ( lboolRHSExists || lboolRHSFLDExists) && ( lbOper <= 0 ) )\n\t {\n\t raiseException( \"%c:Q0076%\" ) ;\n\t return ;\n\t } /* end if ( ( lboolLHSExists ) ... */\n\n /*\n * If both left hand , right hand sides are not null and operator\n * is not null but the type of condition is null, then raise an exception\n */\n if ( ( lboolLHSExists ) && ( lboolRHSExists || lboolRHSFLDExists) && ( lbOper > 0 ) && liCondType <= 0 )\n {\n raiseException( \"%c:Q0150,v: Condition Type for Condition \" +\n fiIndex + \",v: Left Hand Side, Operator and Right Hand Side are %\" ) ;\n return ;\n } /* end if ( ( lboolLHSExists ) ... */\n\n\n /*\n * If the left hand side, right hand side, or operator value is null\n * then return\n */\n if ( ( !lboolLHSExists ) || ( !lboolRHSExists && !lboolRHSFLDExists) || ( lbOper <= 0 ) )\n {\n return ;\n } /* end if ( ( !lboolLHSExists ) || ... */\n\n /*\n * If both left hand and right hand sides are not null, but the\n * operator is \"IS_NULL\" or \"IS_NOT_NULL\", then raise an exception\n */\n if ((lsLHS != null ) && (lsRHS != null || !AMSStringUtil.strIsEmpty(lsRHS_FLD)) &&\n (lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NULL) ||\n lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NOT_NULL)))\n {\n\t raiseException( \"%c:Q0113%\" ) ;\n\t return;\n } /* end if ( (lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NULL)).... */\n\n /*\n * Verify that the left hand side is a valid workflow approval\n * field. If not, then raise an exception\n */\n lsDocCd = getDOC_CD() ;\n if ( ( lsDocCd != null ) && ( lsDocCd.trim().length() > 0 ) )\n {\n Enumeration loEnum = null ;\n Enumeration loEnumForRHSFld = null ;\n String lsWhereClause = \"DOC_CD=\" +\n AMSSQLUtil.getANSIQuotedStr( lsDocCd,true ) ;\n\n loEnum = R_WF_APRV_FLDImpl.getObjects( lsWhereClause, this.getSession() ) ;\n loEnumForRHSFld = R_WF_APRV_FLDImpl.getObjects( lsWhereClause, getSession() ) ;\n if ( !checkFields( loEnum, lsLHS ) )\n {\n raiseException( \"%c:Q0077%\" ) ;\n return ;\n } /* end if ( !checkFields( loEnum, lsLHS ) */\n if(!lboolIsNullOrIsNotNullOper && lboolRHSFLDExists)\n {\n if ( !checkFields( loEnumForRHSFld, lsRHS_FLD ) )\n {\n raiseException( \"%c:Q0077%\" ) ;\n return ;\n } /* end if ( !checkFields( loEnum, lsRHS_FLD ) */\n }/* end if (lboolRHSFLDExists) */\n } /* end if ( ( lsDocCd != null ) && ( lsDocCd.trim.length() > 0 ) ) */\n\n liIndex = lsLHS.indexOf( '.' ) ;\n lsDataObject = lsLHS.substring( 0,liIndex ) ;\n lsFieldName = lsLHS.substring( liIndex + 1, lsLHS.length() ) ;\n liFieldType = getFieldType( lsDataObject, lsFieldName ) ;\n\n /*Field Type for the left hand side field and the right hand side field\n *should be comparable to each other.\n */\n if(!lboolIsNullOrIsNotNullOper && lboolRHSFLDExists)\n {\n liRHSIndex = lsRHS_FLD.indexOf( DOT_CHAR ) ;\n lsRHSDataObject = lsRHS_FLD.substring( 0,liRHSIndex ) ;\n lsRHSFieldName = lsRHS_FLD.substring( liRHSIndex + 1, lsRHS_FLD.length() ) ;\n liRHSFieldType = getFieldType( lsRHSDataObject, lsRHSFieldName ) ;\n if(!isFieldTypeComparable(liFieldType,liRHSFieldType))\n {\n raiseException( \"%c:Q0148%\" ) ;\n return;\n }\n }\n\n /*\n * If the data type of the field is boolean\n * and operator used is not EQUAL(=) or NOT_EQUAL(<>)\n * then raise an exception\n */\n if( liFieldType == DataConst.BIT\n && !AMSStringUtil.strEqual(lsOperator,CVL_WF_OPRSImpl.EQUAL)\n && !AMSStringUtil.strEqual(lsOperator,CVL_WF_OPRSImpl.NOT_EQUAL))\n {\n raiseException( \"%c:Q0155%\" ) ;\n return ;\n }\n\n /*\n * Parse the value from the right hand side into individual\n * values which are comma separated.\n */\n if(!(AMSStringUtil.strIsEmpty(lsRHS)))\n {\n lvVals = getListVals( lsRHS, getSession() ) ;\n lcRhsChar = lsRHS.toCharArray();\n liRhsLen = lsRHS.trim().length();\n }\n\n if ( lvVals != null )\n {\n liNumTokens = lvVals.size() ;\n } /* end if ( loTokens != null ) */\n\n if ( ( lsOperator.trim().equals( CVL_WF_OPRSImpl.IN_LIST ) ) ||\n ( lsOperator.trim().equals( CVL_WF_OPRSImpl.NOT_IN_LIST ) ) )\n {\n lboolListOper = true ;\n } /* end if if ( ( lsOperator.trim().equals( CVL_WF_OPRSImpl.IN_LIST )...*/\n\n //List operator should not be used with the right hand side field.\n if(lboolListOper && lboolRHSFLDExists)\n {\n raiseException( \"%c:Q0149%\" ) ;\n return;\n }\n\n if(liCondType == CVL_WF_COND_TYPImpl.DELTA_CHANGE ||\n liCondType == CVL_WF_COND_TYPImpl.PERCENT_CHANGE ||\n liCondType == CVL_WF_COND_TYPImpl.ABS_DELTA_CHANGE ||\n liCondType == CVL_WF_COND_TYPImpl.ABS_PERCENT_CHANGE)\n {\n /*\n * Raise error if Operator is IN LIST or NOT_IN_LIST or IS_NULL or IS_NOT_NULL\n * and Approval Condition Type is other than 'Actual Value'.\n */\n lsOperator = lsOperator.trim();\n if(AMSStringUtil.strEqual(lsOperator, CVL_WF_OPRSImpl.IN_LIST) ||\n AMSStringUtil.strEqual(lsOperator, CVL_WF_OPRSImpl.NOT_IN_LIST) ||\n AMSStringUtil.strEqual(lsOperator, CVL_WF_OPRSImpl.IS_NULL) ||\n AMSStringUtil.strEqual(lsOperator, CVL_WF_OPRSImpl.IS_NOT_NULL))\n {\n raiseException( \"%c:Q0152,v:\" + fiIndex + \"%\" ) ;\n return;\n }\n\n if(liFieldType != DataConst.BIGINT &&\n liFieldType != DataConst.DECIMAL &&\n liFieldType != DataConst.DOUBLE &&\n liFieldType != DataConst.FLOAT &&\n liFieldType != DataConst.INTEGER &&\n liFieldType != DataConst.NUMERIC &&\n liFieldType != DataConst.SMALLINT &&\n liFieldType != DataConst.REAL &&\n liFieldType != DataConst.TINYINT)\n {\n /*\n * Raise error when Left Hand Side is not numeric and\n * Condition Type is Delta Change, Percent Change,\n * Absolute Delta Change or Absolute Percent Change.\n */\n raiseException(\"%c:Q0151,v: \" +\n CVL_WF_COND_TYPImpl.getConditionTypeDV(liCondType, getSession()) +\n \" for Condition \" + fiIndex + \"%\");\n return;\n }\n\n for (int liCnt = 0; liCnt < liRhsLen; liCnt++)\n {\n if (!((lcRhsChar[liCnt] == '-') ||\n (lcRhsChar[liCnt] == '.') ||\n Character.isDigit(lcRhsChar[liCnt])))\n {\n /*\n * Raise error when Right Hand Side is not numeric and\n * Condition Type is Delta Change, Percent Change,\n * Absolute Delta Change or Absolute Percent Change.\n */\n raiseException(\"%c:Q0153,v: \" + fiIndex + \"%\");\n return;\n }\n } //end for loop\n }\n\n /* If the operator is not \"In List\" or \"Not In List\" */\n if ( !lboolListOper )\n {\n /* if more than one parsed value */\n if ( liNumTokens > 1 )\n {\n StringBuffer lsbSingleVal = new StringBuffer(256) ;\n raiseException( \"%c:Q0077%\" ) ;\n }\n else\n {\n /*\n * If the data type of the field is boolean\n * and operator used is not EQUAL(=) or NOT_EQUAL(<>)\n * then raise an exception\n */\n if( liFieldType == DataConst.BIT\n && !AMSStringUtil.strEqual(lsOperator,CVL_WF_OPRSImpl.EQUAL)\n && !AMSStringUtil.strEqual(lsOperator,CVL_WF_OPRSImpl.NOT_EQUAL))\n {\n raiseException( \"%c:Q0155%\" ) ;\n }\n\n } /* end else of if ( liNumTokens > 1 ) */\n } /* end if ( !lboolListOper ) */\n else\n {\n /*\n * If the data type of the field is not numeric or text,\n * then raise an exception\n */\n if ( !( ( isFieldNumeric( lsDataObject, lsFieldName ) ) ||\n ( liFieldType == DataConst.CHAR ) ||\n ( liFieldType == DataConst.VARCHAR ) ) )\n {\n raiseException( \"%c:Q0078%\" ) ;\n return ;\n } /* end if ( !( isFieldNumeric... */\n } /* end else */\n\n if ( ( lvVals != null ) && ( liNumTokens > 0 ) )\n {\n String lsParsedVal ;\n for( int liCtr = 0 ; liCtr < liNumTokens ; liCtr ++ )\n {\n lsParsedVal = (String) lvVals.elementAt(liCtr) ;\n checkValue( liFieldType, lsParsedVal, fiIndex ) ;\n } /* end while ( loTokens.hasMoreTokens() ) */\n } /* end if ( loTokens != null ) */\n else\n {\n if(!(lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NULL)|| lsOperator.trim().equals( CVL_WF_OPRSImpl.IS_NOT_NULL))\n && !AMSStringUtil.strIsEmpty(lsRHS) )\n {\n \tcheckValue( liFieldType, lsRHS, fiIndex ) ;\n\t\t }\n } /* end else */\n }", "static BiPredicate<SibillaValue,SibillaValue> getRelationOperator(String op) {\n if (op.equals(\"<\")) { return (x,y) -> x.doubleOf()<y.doubleOf(); }\n if (op.equals(\"<=\")) { return (x,y) -> x.doubleOf()<=y.doubleOf(); }\n if (op.equals(\"==\")) { return (x,y) -> x.doubleOf()==y.doubleOf(); }\n if (op.equals(\"!=\")) { return (x,y) -> !x.equals(y); }\n if (op.equals(\">\")) { return (x,y) -> x.doubleOf()>y.doubleOf(); }\n if (op.equals(\">=\")) { return (x,y) -> x.doubleOf()>=y.doubleOf(); }\n return (x,y) -> false;\n }", "@Override\n public TreeNode parse() {\n TreeNode first = ArithmeticSubexpression.getAdditive(environment).parse();\n if (first == null) return null;\n\n // Try to parse something starting with an operator.\n List<Wrapper> wrappers = RightSideSubexpression.createKleene(\n environment, ArithmeticSubexpression.getAdditive(environment),\n BemTeVicTokenType.EQUAL, BemTeVicTokenType.DIFFERENT,\n BemTeVicTokenType.GREATER_OR_EQUALS, BemTeVicTokenType.GREATER_THAN,\n BemTeVicTokenType.LESS_OR_EQUALS, BemTeVicTokenType.LESS_THAN\n ).parse();\n\n // If did not found anything starting with an operator, return the first node.\n if (wrappers.isEmpty()) return first;\n\n // Constructs a binary operator node containing the expression.\n Iterator<Wrapper> it = wrappers.iterator();\n Wrapper secondWrapper = it.next();\n BinaryOperatorNode second = new BinaryOperatorNode(secondWrapper.getTokenType(), first, secondWrapper.getOutput());\n\n if (wrappers.size() == 1) return second;\n\n // If we reach this far, the expression has more than one operator. i.e. (x = y = z),\n // which is a shortcut for (x = y AND y = z).\n\n // Firstly, determine if the operators are compatible.\n RelationalOperatorSide side = RelationalOperatorSide.NONE;\n for (Wrapper w : wrappers) {\n side = side.next(w.getTokenType());\n }\n if (side.isMixed()) {\n environment.emitError(\"XXX\");\n }\n\n // Creates the other nodes. In the expression (a = b = c = d), The \"a = b\"\n // is in the \"second\" node. Creates \"b = c\", and \"c = d\" nodes.\n List<BinaryOperatorNode> nodes = new LinkedList<BinaryOperatorNode>();\n nodes.add(second);\n\n TreeNode prev = secondWrapper.getOutput();\n while (it.hasNext()) {\n Wrapper w = it.next();\n BinaryOperatorNode current = new BinaryOperatorNode(w.getTokenType(), prev, w.getOutput());\n prev = w.getOutput();\n nodes.add(current);\n }\n\n // Combines all of the nodes in a single one using AND.\n return new VariableArityOperatorNode(BemTeVicTokenType.AND, nodes);\n }", "private DoubleBinaryOperator chooseOperator() {\n\t\tswitch(name) {\n\t\tcase \"+\":\n\t\t\treturn ADD;\n\t\t\t\n\t\tcase \"-\":\n\t\t\treturn SUB;\n\t\t\t\n\t\tcase \"*\":\n\t\t\treturn MULTIPLY;\n\t\t\t\n\t\tcase \"/\":\n\t\t\treturn DIVIDE;\n\t\t\t\n\t\tcase \"x^n\":\n\t\t\treturn POW;\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Invalid binary operator\");\n\t\t}\n\t}", "@Override\n public Void visit(AssignmentExpression nd, SuccessorInfo i) {\n if (\"&&=\".equals(nd.getOperator()) || \"||=\".equals(nd.getOperator()) || \"??=\".equals(nd.getOperator())) {\n if (\"&&=\".equals(nd.getOperator())) {\n // from lhs to rhs on truthy. from lhs to false-branch on falsy.\n visitWithSuccessors(nd.getLeft(), First.of(nd.getRight()), i.getSuccessors(false));\n } else if (\"||=\".equals(nd.getOperator())) {\n // from lhs to true-branch on truthy. from lhs to rhs on falsy.\n visitWithSuccessors(nd.getLeft(), i.getSuccessors(true), First.of(nd.getRight()));\n } else { // \"??=\"\n // the union of the above - truthyness is unknown.\n visitWithSuccessors(nd.getLeft(), union(First.of(nd.getRight()), i.getAllSuccessors()));\n }\n \n visitWithSuccessors(nd.getRight(), nd); // from right to assignment.\n\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n } else {\n visitAssign(nd, nd.getLeft(), nd.getRight());\n writeSuccessors(nd, i.getGuardedSuccessors(nd));\n }\n return null;\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tint num = 20;\n\t\t\n\t\tnum = 25; \n\t\t\n\t\t//\" == \" sign or comparison boolean kullanilir \n\t\t\n\t\tboolean isTrue = 5 + 2 == 7;\n\t\t\n\t\tboolean isFalse = 5 + 2 == 8;\n\t\t\n\t\tSystem.out.println(isTrue == isFalse); // this says True equals False. it doesnt so it gives False result \n\t\t\n\n\t\t\n\t\t//!= Not Equal Sing\n\t\t\n\t\t\n\t\tboolean isTrue1 = 5+2 != 8;\n\t\t\n\t\tboolean noteq = 5+2 != 23;\n\t\t\n\t\tSystem.out.println(isTrue1);\n\t\tSystem.out.println(noteq);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// \">\" , \">=\" , \"<\" , \"<=\" ==> All returns boolean\n\t\t\n\t\t// && and operator .... If you have at least one false result \n\t\t// || Or operation ... If you have just one true the result will be true \n\t\t\n\t\tSystem.out.println(5>8); //False\n\t\t\n\t\tSystem.out.println(8>11-5); // True \n\t\t\n\t\t\n\t\tboolean b1 = 5>2;\t // true \n\t\tboolean b2 = 5==2+3;\t// true \n\t\tboolean b3 = 5==2;\t // false\n\t\tboolean b4 = 5<2; \t\t//false\n\t\t\n\t\t\n\t\t\n\t\t// to get true && all variables must ben true \n\t\t\n\t\tSystem.out.println(b1 && b2); // both true so result rue \n\t\t\n\t\tSystem.out.println(b1 && b3); //false \n\t\t\n\t\tSystem.out.println(b3 && b4); // false \n\t\t\n\t\t\n\t\t// || Or \n\t\tSystem.out.println(b2 || b1); // true bec at least one of the variables is true \n\t\t\n\t\tSystem.out.println(b3 || b4); // false bec all everything is false \n\t\t\n\t\tSystem.out.println(b1 || b2 || b3 || b4); // True bec at least one variable is true \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t\t\n\n\t}", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "private boolean postFixEvalution(char operator) throws ArithmeticException{\n //Pre: Validar que el stack no este vacio y que los operandos sean numeros.\n //Post: Realizar la operacion indicada\n try{\n if(!stack.empty()){\n //Se obtienen los dos operandos mas recientes del stack.\n Integer op2 = stack.pop();\n Integer op1 = stack.pop();\n\n //Se determina la operacion por hacer.\n if(op1 != null && op2 != null){\n switch (operator){\n case '+':\n stack.push(op1 + op2);\n break;\n case '-':\n stack.push(op1 - op2);\n break;\n case '*':\n stack.push(op1 * op2);\n break;\n case '/':\n stack.push(op1 / op2);\n break;\n }\n return true;\n }\n else\n return false;\n }\n else{\n return false;\n }\n }\n catch (ArithmeticException e){\n String ex = \"Error: Division por 0\";\n throw new ArithmeticException(ex);\n }\n }", "private boolean checkVisualCondition(final String[] condArray) throws Exception {\r\n\t\t//boolean isDisplay = true ; // remarked by Leo YEUNG for testing\r\n\t\tboolean isDisplay = false ;\r\n\t\tint CondPassCount = 0; //Use to count the number of Boolean expressions passed\t\t\t\t\t\t \r\n\t\tint CondAmount = condArray.length;//Total number of Boolean expressions in this Node\r\n\t\t//Loop for all Boolean expressions in one conditon\t\t\t \r\n\t\tfor (int k=0; k<CondAmount; k++) {\t\t \t\t\t\t\t\r\n\t\t\tif (CondPassCount<k) break;\t //Exit the following condition check while one of the Boolean expresssion is failure which save the loop time\r\n\t\t\t//Loop for sort out different Attribute\r\n\t\t\tfor (int m=0; m<conAttName.length; m++) {\r\n\t\t\t\tint previousCondPassCount = CondPassCount;//a value use to check the Boolean expresssion is failure\r\n\t\t\t\tif (condArray[k].toUpperCase().startsWith(conAttName[m].toUpperCase())){ \r\n\t\t\t\t\tfinal String tempConAttType = conAttType[m]; // ldap attribute type\r\n\t\t\t\t\tfinal String tempValue = condArray[k].substring(conAttName[m].length());\r\n\t\t\t\t\tfinal int tempColonIndex = condArray[k].indexOf(\"\\\"\");\r\n\t\t\t\t\tfinal String attName = condArray[k].substring(0,conAttName[m].length()); \t \t\t\t \t\t \t\t\t\t //Attribute Name\r\n\t\t\t\t\tfinal String attCond = condArray[k].substring(conAttName[m].length(),tempColonIndex); //Attribute condition syntax\r\n\t\t\t\t\tfinal String attVal = condArray[k].substring(tempColonIndex+1,condArray[k].lastIndexOf(\"\\\"\"));//Attribute Value\r\n\t\t\t\t\tint k2 = k+1;\r\n\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" checking for \" + condArray[k]+\" Start\");\r\n\t\t\t\t\t//Condition Greater Than\r\n\t\t\t\t\tif (attCond.equalsIgnoreCase(Constant.gt)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null){\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) > 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater Than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo > intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\r\n\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}\r\n\t\t\t\t\t//Condition Less Than\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.lt)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) < 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less than> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo < intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Greater and Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.ge)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) >= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t} catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Greater and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo >= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Less and Equal\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.le)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (strCrtUserInfo.compareTo(strAttVal) <= 0 ){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t}else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition::\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Less and Equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo <= intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Equal\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.equal)){ //Equal\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\t\tif (strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\t\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo == intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not Equal to\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_equal)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tint intCrtUserInfo;\r\n\t\t\t\t\t\t\tint intAttVal;\r\n\t\t\t\t\t\t\tString strCrtUserInfo;\r\n\t\t\t\t\t\t\tString strAttVal;\t\t\t\t\t\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t\tif (tempConAttType.equalsIgnoreCase(\"cis\")){\r\n\t\t\t\t\t\t\t\tstrCrtUserInfo = (String)ht.get(attName.toUpperCase());\r\n\t\t\t\t\t\t\t\tstrAttVal = attVal;\r\n\t\t\t\t\t\t\t\tif (!strCrtUserInfo.equalsIgnoreCase(strAttVal)){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\t\t\t\t\t\t\t\t\t\t \t \t\t\r\n\t\t\t\t\t\t\t} else if(tempConAttType.equalsIgnoreCase(\"int\")){\r\n\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\tintCrtUserInfo = Integer.parseInt((String)ht.get(attName.toUpperCase()));\r\n\t\t\t\t\t\t\t\t\tintAttVal = Integer.parseInt(attVal);\r\n\t\t\t\t\t\t\t\t}catch (NumberFormatException e){\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"checkVisualCondition:\" + e.getMessage(), e);\r\n\t\t\t\t\t\t\t\t\tlogger.error(\"Invalid attribute value: The attribute value is not numeric, the <Not equal to> condition cannot apply.\");\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(e.getMessage());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (intCrtUserInfo != intAttVal){\r\n\t\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\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\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)!=-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Start with\t \t \r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.start_with)){\r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition\tNot contain\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_contain)){ \r\n\t\t\t\t\t\tif (ht.get(attName.toUpperCase()) != null) {\r\n\t\t\t\t\t\t\tif (((String)ht.get(attName.toUpperCase())).indexOf(attVal)==-1){\r\n\t\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Condition Not start with\t\r\n\t\t\t\t\t} else if (attCond.equalsIgnoreCase(Constant.not_start_with)){\r\n\t\t\t\t\t\tif (!((String)ht.get(attName.toUpperCase())).startsWith(attVal)){\r\n\t\t\t\t\t\t\tCondPassCount += 1;\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" OK: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlogger.debug(\"Boolean expression \" + k2 + \" failed: \" + attName + \"- \" + (String)ht.get(attName) + attCond + attVal + \" failed!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t//Finally, Syntax Error\t \r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlogger.error(\"checkVisualCondition:Invalid condition syntax found: \" + attCond);\r\n\t\t\t\t\t} \r\n\t\t\t\t}\t\r\n\t\t\t\tif (previousCondPassCount<CondPassCount) break; // condition passed. Exit the for loop\r\n\t\t\t}\r\n\t\t\tif (CondPassCount == CondAmount) isDisplay = true;\r\n\t\t}\r\n\t\t//logger.debug(\"checkVistualCondition: isDisplay = \" + isDisplay);\r\n\t\t//logger.debug(\"checkVistualCondition: CondPassCount = \" + CondPassCount);\r\n\t\t//logger.debug(\"checkVistualCondition: CondAmount = \" + CondAmount);\r\n\t\treturn isDisplay;\r\n\t}", "private String auxOperacion(int operando1, int operando2, String valor1, String valor2, int op) {\n if (ManejadorMemoria.isInt(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n System.out.println(valor1 + \" \" + valor2 + \" \" + (Integer.parseInt(valor1) > Integer.parseInt(valor2)));\n return (Integer.parseInt(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Integer.parseInt(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Integer.parseInt(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Integer.parseInt(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Integer.parseInt(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Integer.parseInt(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Integer.parseInt(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Integer.parseInt(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Integer.parseInt(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Integer.parseInt(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Integer.parseInt(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isFloat(operando1)) {\n if (ManejadorMemoria.isInt(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Integer.parseInt(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Integer.parseInt(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Integer.parseInt(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Integer.parseInt(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Integer.parseInt(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Integer.parseInt(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Integer.parseInt(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Integer.parseInt(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Integer.parseInt(valor2)) + \"\";\n }\n } else if (ManejadorMemoria.isFloat(operando2)) {\n switch (op) {\n case Codigos.SUMA:\n return (Double.parseDouble(valor1) + Double.parseDouble(valor2)) + \"\";\n case Codigos.RESTA:\n return (Double.parseDouble(valor1) - Double.parseDouble(valor2)) + \"\";\n case Codigos.MULT:\n return (Double.parseDouble(valor1) * Double.parseDouble(valor2)) + \"\";\n case Codigos.DIV:\n return (Double.parseDouble(valor1) / Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYOR:\n return (Double.parseDouble(valor1) > Double.parseDouble(valor2)) + \"\";\n case Codigos.MENOR:\n return (Double.parseDouble(valor1) < Double.parseDouble(valor2)) + \"\";\n case Codigos.MAYORIG:\n return (Double.parseDouble(valor1) >= Double.parseDouble(valor2)) + \"\";\n case Codigos.MENORIG:\n return (Double.parseDouble(valor1) <= Double.parseDouble(valor2)) + \"\";\n case Codigos.IGUAL:\n return (Double.parseDouble(valor1) == Double.parseDouble(valor2)) + \"\";\n case Codigos.DIFERENTE:\n return (Double.parseDouble(valor1) != Double.parseDouble(valor2)) + \"\";\n }\n }\n } else if (ManejadorMemoria.isString(operando1)) {\n return valor1 + valor2;\n } else if(ManejadorMemoria.isBool(operando1)){\n switch(op){\n case Codigos.AND:\n return (Boolean.parseBoolean(valor1) && Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.OR:\n return (Boolean.parseBoolean(valor1) || Boolean.parseBoolean(valor2)) + \"\";\n case Codigos.NOT:\n return (! Boolean.parseBoolean(valor1))+ \"\";\n }\n }\n\n return \"\";\n }", "private Expr or() { // This uses the same recursive matching structure as other binary operators.\n Expr expr = and(); // OR takes precedence over AND.\n while(match(OR)) {\n Token operator = previous();\n Expr right = and();\n expr = new Expr.Logical(expr, operator, right);\n }\n return expr;\n }", "private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n scan();\n op = token.kind;\n } else {\n error(\"Relational operator expected\");\n op = Token.NONE;\n }\n\n int opcode;\n switch (token.kind) {\n case Token.GTR:\n opcode = Code.OP_JGT;\n break;\n case Token.GEQ:\n opcode = Code.OP_JGE;\n break;\n case Token.LESS:\n opcode = Code.OP_JLT;\n break;\n case Token.LEQ:\n opcode = Code.OP_JLE;\n break;\n case Token.EQL:\n opcode = Code.OP_JEQ;\n break;\n case Token.NEQ:\n opcode = Code.OP_JNE;\n break;\n default:\n opcode = Code.OP_TRAP;\n error(\"Illegal comparison operator\");\n break;\n }\n\n Struct type2 = parseExpr().type;\n\n if (!type1.compatibleWith(type2)) {\n error(\"Incompatible types in comparison\");\n }\n if (type1.isRefType() && type2.isRefType()) {\n if (op != Token.EQL && op != Token.NEQ) {\n error(\"Reference types can only be compared \"\n + \"for equality and inequality\");\n }\n }\n\n code.putFalseJump(opcode, 42); // Will be fixed later\n }", "@Test\n public void defaultOperatorsEvaluateFalseTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 != 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <> 1\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 < 0\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 > 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 >= 3\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"2 >= 4\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 <= 0\", \"expr\").render(null), is((Object)false));\n }", "@Override\n public Void visit(LogicalExpression nd, SuccessorInfo i) {\n Expression left = nd.getLeft();\n writeSuccessor(nd, First.of(left));\n if (\"&&\".equals(nd.getOperator()))\n visitWithSuccessors(left, First.of(nd.getRight()), i.getSuccessors(false));\n else visitWithSuccessors(left, i.getSuccessors(true), First.of(nd.getRight()));\n nd.getRight().accept(this, i);\n return null;\n }", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "private Operator checkOperator(char c){\n if (c == '+'){\n return new AddOperator(); \n }\n else if (c == '-'){\n return new SubOperator(); \n }\n else if (c == '*'){\n return new MulOperator(); \n }\n else if (c == '/'){\n return new DivOperator(); \n }\n else \n return null;\n }", "@Test\r\n public void deriveFromBinaryXorAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M^=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH^=9\", \"(long,km^2/h)\");\r\n }", "private static Conditional[] getOperators(Class<?> clazz)\n {\n Conditional[] operators = Conditional.STRING_VALUES;\n if (clazz != null && Number.class.isAssignableFrom(clazz))\n {\n operators = Conditional.NUMBER_VALUES;\n }\n return operators;\n }", "public static boolean condenseConditionals(List<Op03SimpleStatement> statements) {\n boolean effect = false;\n for (int x = 0; x < statements.size(); ++x) {\n boolean retry;\n do {\n retry = false;\n Op03SimpleStatement op03SimpleStatement = statements.get(x);\n // If successful, this statement will be nopped out, and the next one will be\n // the combination of the two.\n Statement inner = op03SimpleStatement.getStatement();\n if (!(inner instanceof IfStatement)) continue;\n Op03SimpleStatement fallThrough = op03SimpleStatement.getTargets().get(0);\n Op03SimpleStatement taken = op03SimpleStatement.getTargets().get(1);\n Statement fallthroughInner = fallThrough.getStatement();\n Statement takenInner = taken.getStatement();\n // Is the taken path just jumping straight over the non taken?\n boolean takenJumpBy1 = (x < statements.size() - 2) && statements.get(x+2) == taken;\n\n if (fallthroughInner instanceof IfStatement) {\n Op03SimpleStatement sndIf = fallThrough;\n Op03SimpleStatement sndTaken = sndIf.getTargets().get(1);\n Op03SimpleStatement sndFallThrough = sndIf.getTargets().get(0);\n\n retry = condenseIfs(op03SimpleStatement, sndIf, taken, sndTaken, sndFallThrough, false);\n\n// if (if2.condenseWithPriorIfStatement(if1, false)) {\n// retry = true;\n// }\n } else if (fallthroughInner.getClass() == GotoStatement.class && takenJumpBy1 && takenInner instanceof IfStatement) {\n // If it's not an if statement, we might have to negate a jump - i.e.\n // if (c1) a1\n // goto a2\n // a1 : if (c2) goto a2\n // a3\n //\n // is (of course) equivalent to\n // if (!c1 || c2) goto a2\n\n Op03SimpleStatement negatedTaken = fallThrough.getTargets().get(0);\n Op03SimpleStatement sndIf = statements.get(x+2);\n Op03SimpleStatement sndTaken = sndIf.getTargets().get(1);\n Op03SimpleStatement sndFallThrough = sndIf.getTargets().get(0);\n\n retry = condenseIfs(op03SimpleStatement, sndIf, negatedTaken, sndTaken, sndFallThrough, true);\n\n// IfStatement if1 = (IfStatement)inner;\n// IfStatement if2 = (IfStatement)takenInner;\n// if (if2.condenseWithPriorIfStatement(if1, true)) {\n// retry = true;\n// }\n }\n\n if (retry) {\n effect = true;\n do {\n x--;\n } while (statements.get(x).isAgreedNop() && x > 0);\n }\n } while (retry);\n }\n return effect;\n }", "private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}", "abstract String getOp();", "public void applyOperators(FockState passedRow, int[] momenta, int opTypes) {\n \n _rightMostP = 0;\n _operatorFactors = 1.0; \n for(int i=0; i<(_phiPow-1); i++) {\n \t\n \t// Run through the operators from left to right\n \n if(((opTypes & (1 << i)) != 0)) {\n \t\n \t// This bit is a 1, apply an annihilation operator to the relevant momentum mode\n \t// and update the running operator factor and rightmost operator momentum.\n \t// If this operation invalidates the state set the factor to zero.\n \n if(passedRow.getCoeff(momenta[i]) > 0) {\n \t\t_operatorFactors = (_operatorFactors * Math.sqrt(passedRow.getCoeff(momenta[i])));\n \t\t_operatorFactors = (_operatorFactors * Math.sqrt(2.0*FockState.calcFrequency(momenta[i], _systemSize, _epsilon, _mass)*_systemSize*_epsilon)); \n \t}\n else {\n \t_operatorFactors = 0.0;\n } \n passedRow.applyAnnihil(momenta[i]);\n \n // The rightmost momentum is set by the momentum just used\n \n if((momenta[i]%2) == 0) {\n \t_rightMostP = _rightMostP - (int)Math.floor((momenta[i]+1)/2); \t\n }\n else { \t\n \t_rightMostP = _rightMostP + (int)Math.floor((momenta[i]+1)/2); \t\n } \n }\n else {\n \t\n \t// This bit is a 0, apply a creation operator to the relevant momentum mode\n \t// and update the running operator factor and rightmost operator momentum.\n \n \t_operatorFactors = (_operatorFactors * Math.sqrt(passedRow.getCoeff(momenta[i]) + 1.0));\n \t_operatorFactors = (_operatorFactors * Math.sqrt(2.0*FockState.calcFrequency(momenta[i], _systemSize, _epsilon, _mass)*_systemSize*_epsilon)); \n passedRow.applyCreation(momenta[i]);\n \n // The rightmost momentum is set by the momentum just used\n \n if((momenta[i]%2) == 0) { \t\n \t_rightMostP = _rightMostP + (int)Math.floor((momenta[i]+1)/2); \t\n }\n else { \t\n \t_rightMostP = _rightMostP - (int)Math.floor((momenta[i]+1)/2); \t\n } \n } \n }\n \n // Put the rightmost momentum in the required range before using it\n \n if(((opTypes & (1 << (_phiPow-1))) != 0)) {\n \t\n \t// This bit is a 1, apply an annihilation operator to the rightmost operator momentum mode.\n \t// Complete the operator factor for this set of operators.\n \t// If this operation invalidates the state set the factor to zero.\n \t\n \twhile(_rightMostP >= (_systemSize/2)) { \t\t\t\n \t\t\t_rightMostP = (_rightMostP - _systemSize); \t\t\t\t\n \t\t} \t\t\n \t\twhile(_rightMostP < (-_systemSize/2)) { \t\t\t\t\n \t\t\t_rightMostP = (_rightMostP + _systemSize); \t\t\t\t\n \t\t}\t\t\t\n\t\t\tif(_rightMostP >= 0) {\t\t\t\t\n\t\t\t\t_rightMostP = (_rightMostP * 2);\t\t\t\t\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\t_rightMostP = ((2*(-_rightMostP)) - 1);\t\t\t\t\n\t\t\t}\t\t\t\n \tif(passedRow.getCoeff(_rightMostP) > 0) { \t \n \t\t_operatorFactors = (_operatorFactors * Math.sqrt(passedRow.getCoeff(_rightMostP)));\n \t\t_operatorFactors = (_operatorFactors * Math.sqrt(2.0*FockState.calcFrequency(_rightMostP, _systemSize, _epsilon, _mass)*_systemSize*_epsilon)); \t\t\n \t}\n \telse {\n \t\t_operatorFactors = 0.0;\n \t} \t\n \tpassedRow.applyAnnihil(_rightMostP); \n }\n else {\n \t\n \t// This bit is a 0, apply a creation operator to the rightmost operator momentum mode.\n \t// Complete the operator factor for this set of operators.\n \t\n \t_rightMostP = (_rightMostP * -1); \t\n \twhile(_rightMostP >= (_systemSize/2)) { \t\t\t\n \t\t\t_rightMostP = (_rightMostP - _systemSize); \t\t\t\t\n \t\t} \t\t\n \t\twhile(_rightMostP < (-_systemSize/2)) { \t\t\t\t\n \t\t\t_rightMostP = (_rightMostP + _systemSize); \t\t\t\t\n \t\t} \t\n \tif(_rightMostP >= 0) {\t\t\t\t\n\t\t\t\t_rightMostP = (_rightMostP * 2);\t\t\t\t\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\t_rightMostP = ((2*(-_rightMostP)) - 1);\t\t\t\t\n\t\t\t} \t\n \t_operatorFactors = (_operatorFactors * Math.sqrt(passedRow.getCoeff(_rightMostP) + 1.0));\n \t_operatorFactors = (_operatorFactors * Math.sqrt(2.0*FockState.calcFrequency(_rightMostP, _systemSize, _epsilon, _mass)*_systemSize*_epsilon)); \t\n passedRow.applyCreation(_rightMostP); \n }\n \n }", "public Code visitOperatorNode(ExpNode.OperatorNode node) {\n beginGen(\"Operator\");\n Code code;\n ExpNode args = node.getArg();\n switch (node.getOp()) {\n case ADD_OP:\n code = args.genCode(this);\n code.generateOp(Operation.ADD);\n break;\n case SUB_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n code.generateOp(Operation.ADD);\n break;\n case MUL_OP:\n code = args.genCode(this);\n code.generateOp(Operation.MPY);\n break;\n case DIV_OP:\n code = args.genCode(this);\n code.generateOp(Operation.DIV);\n break;\n case EQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n break;\n case LESS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESS);\n break;\n case NEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n code.genBoolNot();\n break;\n case LEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESSEQ);\n break;\n case GREATER_OP:\n /* Generate argument values in reverse order and use LESS */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESS);\n break;\n case GEQUALS_OP:\n /* Generate argument values in reverse order and use LESSEQ */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESSEQ);\n break;\n case NEG_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n break;\n default:\n errors.fatal(\"PL0 Internal error: Unknown operator\",\n node.getLocation());\n code = null;\n }\n endGen(\"Operator\");\n return code;\n }", "public boolean evaluate(DataDeSerializerNoClass dds, long pos, Object[] params) {\r\n\t\tboolean first = (n1 != null ? n1.evaluate(dds, pos, params) : t1.evaluate(dds, pos, params));\r\n\t\t//do we have a second part?\r\n\t\tif (op == null) {\r\n\t\t\treturn first;\r\n\t\t}\r\n\t\tif ( !first && op == LOG_OP.AND) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif ( first && op == LOG_OP.OR) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn (n2 != null ? n2.evaluate(dds, pos, params) : t2.evaluate(dds, pos, params));\r\n\t}", "public final void logicExpresions() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:118:2: ( logicExpresion ( operator logicExpresion )* )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:118:5: logicExpresion ( operator logicExpresion )*\r\n {\r\n pushFollow(FOLLOW_logicExpresion_in_logicExpresions427);\r\n logicExpresion();\r\n\r\n state._fsp--;\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:118:20: ( operator logicExpresion )*\r\n loop19:\r\n do {\r\n int alt19=2;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( ((LA19_0>=AND && LA19_0<=OR)) ) {\r\n alt19=1;\r\n }\r\n\r\n\r\n switch (alt19) {\r\n \tcase 1 :\r\n \t // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:118:21: operator logicExpresion\r\n \t {\r\n \t pushFollow(FOLLOW_operator_in_logicExpresions430);\r\n \t operator();\r\n\r\n \t state._fsp--;\r\n\r\n \t pushFollow(FOLLOW_logicExpresion_in_logicExpresions432);\r\n \t logicExpresion();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop19;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "static BinaryOperator<SibillaValue> getOperator(String op) {\n if (op.equals(\"+\")) {return SibillaValue::sum;}\n if (op.equals(\"-\")) {return SibillaValue::sub; }\n if (op.equals(\"%\")) {return SibillaValue::mod; }\n if (op.equals(\"*\")) {return SibillaValue::mul; }\n if (op.equals(\"/\")) {return SibillaValue::div; }\n if (op.equals(\"//\")) {return SibillaValue::zeroDiv; }\n return (x,y) -> SibillaValue.ERROR_VALUE;\n }" ]
[ "0.726338", "0.69809043", "0.6757155", "0.6688474", "0.6504065", "0.64402145", "0.6184996", "0.6167376", "0.6153923", "0.6153438", "0.6092173", "0.60617703", "0.6055113", "0.6055081", "0.60488296", "0.6014481", "0.5955438", "0.59482616", "0.5924747", "0.5919658", "0.58990824", "0.5864722", "0.5861329", "0.58552027", "0.5853196", "0.58509654", "0.5823489", "0.58162224", "0.5801514", "0.57878906", "0.5777923", "0.57689506", "0.57588035", "0.5741587", "0.57371116", "0.57327324", "0.573188", "0.5722747", "0.5709539", "0.5705663", "0.56981933", "0.5690037", "0.56899", "0.56779", "0.5673524", "0.56670046", "0.5666789", "0.5663387", "0.56530017", "0.56473166", "0.5644374", "0.5643426", "0.56399196", "0.5634117", "0.5628818", "0.56104064", "0.56044436", "0.5595513", "0.55936825", "0.55812794", "0.5579357", "0.5576012", "0.5569206", "0.5569135", "0.55687284", "0.5568241", "0.5565563", "0.5560958", "0.55596834", "0.55547166", "0.5551031", "0.5542661", "0.55376047", "0.5535941", "0.5534793", "0.55280435", "0.55206716", "0.55201465", "0.55173874", "0.55156267", "0.5509367", "0.55049366", "0.5493859", "0.5488915", "0.54866046", "0.54754776", "0.5470573", "0.54705656", "0.54659474", "0.5460172", "0.5459709", "0.5454446", "0.5447685", "0.54448605", "0.5442689", "0.54384506", "0.5432835", "0.5425162", "0.542418", "0.5422311", "0.54190457" ]
0.0
-1
store the values selected into a Calendar instance
@Override public void onDateSet(DatePicker datePicker, int i, int i1, int i2) { final Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR, i); c.set(Calendar.MONTH, i1); c.set(Calendar.DAY_OF_MONTH, i2); FilterFragment parentFrag = (FilterFragment) getTargetFragment(); parentFrag.onDatePass(c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onSet(Calendar calendarSelected, Date dateSelected, int year,\n String monthFullName, String monthShortName, int monthNumber,\n int date, String weekDayFullName, String weekDayShortName,\n int hour24, int hour12, int min, int sec, String AM_PM) {\n\n }", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendarNow = (Calendar) endCalendar.clone();\n calendarNow.set(selectedYear, selectedMonth, selectedDay);\n if (calendarNow.getTimeInMillis() < view.getMinDate()) {\n enddaShowDatePickerDialog();\n Toast.makeText(getActivity(), getResources().getString(R.string.createOrder_datePicker_selectPastDate), Toast.LENGTH_SHORT).show();\n view.updateDate(endCalendar.get(Calendar.YEAR), endCalendar.get(Calendar.MONTH), endCalendar.get(Calendar.DAY_OF_MONTH));\n }\n\n endYear = selectedYear;\n endMonth = selectedMonth;\n endDay = selectedDay;\n endCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvEndda.setText(new StringBuilder().append(char2(endDay))\n .append(\".\").append(char2(endMonth + 1)).append(\".\").append(endYear));\n\n if (tvBegda.getText().toString().equals(getResources().getString(R.string.leave_dmy))) {\n begYear = selectedYear;\n begMonth = selectedMonth;\n begDay = selectedDay;\n begCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvBegda.setText(new StringBuilder().append(char2(begDay))\n .append(\".\").append(char2(begMonth + 1)).append(\".\").append(begYear));\n }\n }", "public void setDays(){\n\n CalendarDay Day=DropDownCalendar.getSelectedDate();\n Date selectedDate=Day.getDate();\n String LongDate=\"\"+selectedDate;\n String DayOfWeek=LongDate.substring(0,3);\n Calendar calendar=Calendar.getInstance();\n calendar.setTime(selectedDate);\n int compare=Integer.parseInt(CurrenDate.substring(6,8).trim());\n int comparemonth=Integer.parseInt(CurrenDate.substring(4,6));\n int startNumber=Integer.parseInt(CheckedDate.substring(6,8).trim())-Offset(DayOfWeek);\n int max=calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n GregorianCalendar date= (GregorianCalendar) GregorianCalendar.getInstance();\n date.set(selectedDate.getYear(),1,1);\n\n boolean Feb=false;\n int priormax=30;\n\n if(max==30){\n priormax=31;\n }\n else if( max==31){\n priormax=30;\n }\n\n if(selectedDate.getMonth()==2){\n if(date.isLeapYear(selectedDate.getYear())){\n priormax=29;\n }\n\n else{\n priormax=28;\n }\n Feb=true;\n }\n for(int i=0;i<WeekDays.length;++i){\n String line=WeekDays[i].getText().toString().substring(0,3);\n\n if(startNumber<=max){\n if(startNumber==compare && comparemonth==Day.getMonth()+1){\n WeekDays[i].setTextColor(Color.BLUE);\n }\n else{\n WeekDays[i].setTextColor(Color.BLACK);\n }\n if(startNumber<=0){\n int val=startNumber+priormax;\n if(Feb){\n if(val==priormax){\n startNumber=max;\n }\n }\n\n WeekDays[i].setText(line+\"\\n\"+val);}\n\n else{\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n }\n else{\n startNumber=1;\n WeekDays[i].setText(line+\"\\n\"+startNumber);\n }\n\n MaskWeekdays[i].setText(line+\"\\n\"+startNumber);\n ++startNumber;\n }\n DropDownCalendar.setDateSelected(Calendar.getInstance().getTime(), true);\n }", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendarNow = Calendar.getInstance();\n calendarNow.set(selectedYear, selectedMonth, selectedDay);\n if (calendarNow.getTimeInMillis() < view.getMinDate()) {\n begdaShowDatePickerDialog();\n Toast.makeText(getActivity(), getResources().getString(R.string.createOrder_datePicker_selectFutureDate), Toast.LENGTH_SHORT).show();\n view.updateDate(begCalendar.get(Calendar.YEAR), begCalendar.get(Calendar.MONTH), begCalendar.get(Calendar.DAY_OF_MONTH));\n }\n\n begYear = selectedYear;\n begMonth = selectedMonth;\n begDay = selectedDay;\n begCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvBegda.setText(new StringBuilder().append(char2(begDay))\n .append(\".\").append(char2(begMonth + 1)).append(\".\").append(begYear));\n if (tvEndda.getText().toString().equals(getResources().getString(R.string.leave_dmy))) {\n endYear = selectedYear;\n endMonth = selectedMonth;\n endDay = selectedDay;\n endCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvEndda.setText(new StringBuilder().append(char2(endDay))\n .append(\".\").append(char2(endMonth + 1)).append(\".\").append(endYear));\n }\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n calendario.set(Calendar.YEAR, year);\n calendario.set(Calendar.MONTH, monthOfYear);\n calendario.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n actualizarInput();\n }", "public void setCalendar(Calendar cal) {\n this.cal = cal;\n }", "public void setCalendar(Calendar cal) {\n this.cal = cal;\n }", "public void setCalendar(Calendar cal) {\n this.cal = cal;\n }", "private void initSelectedDays() {\n binding.viewAlarm.cbMonday.setSelected(alarmVM.isDayActive(Calendar.MONDAY));\n binding.viewAlarm.cbTuesday.setSelected(alarmVM.isDayActive(Calendar.TUESDAY));\n binding.viewAlarm.cbWednesday.setSelected(alarmVM.isDayActive(Calendar.WEDNESDAY));\n binding.viewAlarm.cbThursday.setSelected(alarmVM.isDayActive(Calendar.THURSDAY));\n binding.viewAlarm.cbFriday.setSelected(alarmVM.isDayActive(Calendar.FRIDAY));\n binding.viewAlarm.cbSaturday.setSelected(alarmVM.isDayActive(Calendar.SATURDAY));\n binding.viewAlarm.cbSunday.setSelected(alarmVM.isDayActive(Calendar.SUNDAY));\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n month=month+1;\n String currentInfo=\"\";\n Cursor cursor=myDb.getRow(mId1);// finding selected row item to store the selected date\n if(cursor.moveToFirst()){\n do{\n currentInfo=cursor.getString(cursor.getColumnIndex(myDb.KEY_DATE));\n\n }while (cursor.moveToNext());\n cursor.close();\n }\n currentInfo =year+\"-\"+month+\"-\"+day;\n //Storing the date at selected row\n myDb.updateRow(mId1, currentInfo);\n\n populateListViewFromDB();\n }", "@Override\n public void onDateRangeSelected(int startDay, int startMonth, int startYear, int endDay, int endMonth, int endYear) {\n DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.getDefault());\n Calendar c = Calendar.getInstance();\n Calendar c2 = Calendar.getInstance();\n c.set(startYear,startMonth,startDay);\n c2.set(endYear, endMonth,endDay);\n\n String dataInicio = \"Start \" + df.format(c.getTime()) + \"\\n\";\n String dataFim = \" End \" + df.format(c2.getTime()) ;\n\n txt_inform.setText(dataInicio);\n txt_inform.append(dataFim);\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDateArrival();\n }", "public Calendar setReservationDate(){\n\t\t\n\t\t\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH)+1; //Month starts from zero in Java\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentDate = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\tint currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tint currentMinute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Current Year \"+ currentYear );\n\t\tSystem.out.println(\"Current Month \"+ currentMonth );\n\t\tSystem.out.println(\"Today's date \"+ currentDate );\n\t\tSystem.out.println(\"Current Hour \"+ currentHour );\n\t\tSystem.out.println(\"Current Minute \"+ currentMinute );\n\t\tSystem.out.println(\"\\t---\\t---\\t---\\t---\\t---\");\n\t\tint inputMonth, inputYear, inputDate, inputHour, inputMinute;\n\t\t\n\t\tCalendar reserveDate = Calendar.getInstance();\n\t\t\n\t\tSystem.out.print(\"Enter the year: \");\n\t\tinputYear = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputYear < currentYear){\n\t\t\tSystem.out.println(\"Old year entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the year: \");\n\t\t\tinputYear = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\t\n\t\treserveDate.set(Calendar.YEAR,inputYear); \n\t\n\t\tSystem.out.print(\"Enter the month: \");\n\t\tinputMonth = scan.nextInt();\t\n\t\tscan.nextLine();\n\t\t\n\t\twhile (inputMonth < 1 || inputMonth > 12){\n\t\t\tSystem.out.println(\"Invalid Month entry!\");\n\t\t\tSystem.out.print(\"Enter the month again: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMonth < currentMonth) && (inputYear == currentYear)){\n\t\t\t\t\t\n\t\t\tSystem.out.println(\"Old month entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the month: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t}\n\t\treserveDate.set(Calendar.MONTH,inputMonth-1);//MONTH is from 0 to 11.\n\t\t\n\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\tinputDate = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputDate < 1 || inputDate > 31){\n\t\t\tSystem.out.println(\"Invalid date entry!\");\n\t\t\tSystem.out.print(\"Enter the date again: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputDate < currentDate) && (inputMonth == currentMonth)&&(inputYear==currentYear)){\n\t\t\tSystem.out.println(\"Past Day is not allowed!\\n\");\n\t\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\treserveDate.set(Calendar.DAY_OF_MONTH,inputDate);\n\t\t\n\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\tinputHour = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputHour < 0 || inputHour > 23){\n\t\t\tSystem.out.println(\"Invalid hour entry!\");\n\t\t\tSystem.out.print(\"Enter the hour again: \");\n\t\t\tinputHour = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile(inputHour < currentHour && inputDate == currentDate&&inputMonth == currentMonth&&inputYear==currentYear){\n\t\t\t\n\t\t\tif (inputHour < 0 && inputHour > 23){\n\t\t\t\tSystem.out.println(\"Invalid Hour entry\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Past hour is not allowed!\\n\");\n\t\t\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\t\t\tinputHour = scan.nextInt();\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\t\t}\n\t\treserveDate.set(Calendar.HOUR_OF_DAY,inputHour); //This uses 24 hour clock\n\t\t\n\t\tSystem.out.print(\"Enter minute: \");\n\t\tinputMinute = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile(inputMinute < 0 || inputMinute > 59){\n\t\t\tSystem.out.println(\"Invalid Minute entry\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMinute-currentMinute) <= 0 && inputHour == currentHour){\n\t\t\t\n\t\t\t//System.out.println(\"Reservation can only be made 30 minutes earlier or invalid input !\");\n\t\t\tSystem.out.print(\"Invalid minute\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\t\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\treserveDate.set(Calendar.MINUTE,inputMinute);\n\t\tSystem.out.println(\"Date Reserved!\");\n\t\treturn reserveDate;\n\t}", "public void setSelectedDate(Date selectedDate);", "public void add_events_screen(View view) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(selectedYear, selectedMonth, selectedDay);\n\n Intent intent = new Intent(Intent.ACTION_EDIT);\n intent.setType(\"vnd.android.cursor.item/event\");\n intent.putExtra(CalendarContract.Events.TITLE, \"\");\n intent.putExtra(CalendarContract.EXTRA_EVENT_BEGIN_TIME, calendar.getTimeInMillis());\n intent.putExtra(CalendarContract.EXTRA_EVENT_END_TIME, calendar.getTimeInMillis());\n intent.putExtra(CalendarContract.Events.ALL_DAY, false);\n intent.putExtra(CalendarContract.Events.DESCRIPTION,\"\");\n startActivity(intent);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n to_calendar.set(Calendar.YEAR, year);\n to_calendar.set(Calendar.MONTH, monthOfYear);\n to_calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateToLabel();\n }", "public void initCalendarFirst() {\n getCurrentDate();\n mCalendar.setOnDateChangedListener(new OnDateSelectedListener() {\n @Override\n public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay select, boolean selected) {\n mSelectedDate = select.toString();\n String string[] = mSelectedDate.split(\"\\\\{|\\\\}\");\n String s = string[1]; //2017-8-14\n String string1[] = s.split(\"-\");\n int tempMonth = Integer.parseInt(string1[1]);\n String month = Integer.toString(tempMonth + 1);\n mDate1 = string1[0] + \"-\" + month + \"-\" + string1[2];\n }\n });\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n ed_date.setText(sdf.format(myCalendar.getTime()));\n sel_date=sdf.format(myCalendar.getTime());\n int dd=myCalendar.get(Calendar.DAY_OF_WEEK);\n switch (dd){\n case 1: sel_day=\"SUNDAY\";\n break;\n case 2: sel_day=\"MONDAY\";\n break;\n case 3: sel_day=\"TUESDAY\";\n break;\n case 4: sel_day=\"WEDNESDAY\";\n break;\n case 5: sel_day=\"THURSDAY\";\n break;\n case 6: sel_day=\"FRIDAY\";\n break;\n case 7: sel_day=\"SATURDAY\";\n break;\n }\n schedule_load();\n SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor ed=sh.edit();\n ed.putString(\"date\",ed_date.getText().toString());\n ed.commit();\n }", "void setDate(int index, Date value, Calendar cal)\n throws SQLException;", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDays();\n }", "private void set(Calendar mCalendar) {\n\n //get the values from the calendar\n\n int date = mCalendar.get(Calendar.DATE);\n int month = mCalendar.get(Calendar.MONTH);\n int year = mCalendar.get(Calendar.YEAR);\n\n //update the textViews\n mTextDate.setText(date+\"\");\n mTextYear.setText(year+\"\");\n\n //use the formatter to display the month as Jan\n mTextMonth.setText(mFormatter.format(mCalendar.getTime()));\n\n\n }", "@Override\n public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n\n year = selectedYear;\n month = selectedMonth;\n day = selectedDay;\n\n showDialog(AppUtils.TIME_DIALOG_ID);\n\n }", "public Calendar getDate() {\r\n return (Calendar) selectedDate;\r\n }", "public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n selectedmonth = selectedmonth + 1;\n Search_end_date.setText(String.format(\"%04d\", selectedyear)+\"-\"+String.format(\"%02d\", selectedmonth)+\"-\"+ String.format(\"%02d\", selectedday) +\"\" );\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, day);\n pickedDate = calendar.getTimeInMillis();\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateBdateValue();\n }", "@Override\n\tpublic void valueChanged(ListSelectionEvent ls) {\n\t\tString s = (String)((JList)ls.getSource()).getSelectedValue();\n\t\tif(s!=null && !s.isEmpty()){\n\t\t\tif(!SelectEventFromCalendarListener.currentCal.equals(s)){\n\t\t\t\tSelectEventFromCalendarListener.currentCal = s;\n\t\t\t\t\n\t\t\t\tVector<Event> v = new Vector<Event>();\n\t\t\t\tfor(Event e : Main.myCals.getCalendar(SelectEventFromCalendarListener.currentCal).getAllEvent()){\n\t\t\t\t\tv.add(e);\n\t\t\t\t}\n\t\t\t\tthis.evList.setListData(v);\n\t\t\t\tRefreshList rl = new RefreshList(false);\n\t\t\t\trl.refresh();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Activer la fonction creer evenement\n\t}", "public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n selectedmonth = selectedmonth + 1;\n Search_start_date.setText(String.format(\"%04d\", selectedyear)+\"-\"+String.format(\"%02d\", selectedmonth)+\"-\"+ String.format(\"%02d\", selectedday)+\"\" );\n }", "@Override\n public void onClick(View v) {\n \tToast.makeText(TaskActivity.this, \"Setting dates!\", Toast.LENGTH_SHORT).show();\n \tshowDatePickerDialog(mSelectedYear, mSelectedMonth, mSelectedDay, mOnDateSetListener);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n from_calendar.set(Calendar.YEAR, year);\n from_calendar.set(Calendar.MONTH, monthOfYear);\n from_calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateFromLabel();\n }", "public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n// updateLabel();\n updateLabel();\n// callTimeSlotService();\n\n }", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(selectedYear, selectedMonth, selectedDay);\n\n if (!isDateOK(calendar.getTime())) {\n Snackbar.make(mRoot, \"Project start cant be in the past!\", Snackbar.LENGTH_LONG).show();\n } else {\n txtProjectStart.setText(dateFormat.format(calendar.getTime()));\n }\n }", "public void getoptions() {\n if (mydatepicker.getValue() != null) {\n ObservableList<String> options1 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\",\n \"11:30\",\n \"12:00\",\n \"12:30\",\n \"13:00\",\n \"13:30\",\n \"14:00\",\n \"14:30\"\n );\n ObservableList<String> options2 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\"\n );\n ObservableList<String> options3 = FXCollections.observableArrayList(\"NOT open on Sunday\");\n\n int a = mydatepicker.getValue().getDayOfWeek().getValue();\n if (a == 7) {\n time_input.setItems(options3);\n } else if (a == 6) {\n time_input.setItems(options2);\n } else {\n time_input.setItems(options1);\n }\n }\n }", "private void scanCurrentDay(){\n month.getMyCalendar().setDate(dp.getYear(), dp.getMonth(), dp.getDayOfMonth());\n month.setSelectDay(dp.getDayOfMonth());\n month.invalidate();\n this.dismiss();\n }", "public void setCalendari(Dia[] c) {\n\t\tcal = c;\n\t}", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDatedeparture();\n }", "public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t\t }", "@Override\n public void onSelectedDayChange(CalendarView view, int year, int month,\n int dayOfMonth) {\n bookingDate = dayOfMonth + \"-\" + (month + 1) + \"-\" + year;\n date = dayOfMonth;\n mon = (month + 1);\n }", "public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n cal.set(year, monthOfYear, dayOfMonth);\n\n edt.setText(dateFormatter.format(cal.getTime()));\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n }", "private void setValues() {\n if (dish != null) {\n etDishName.setText(dish.getNAME());\n etDishAmount.setText(HungryAdminUtility.getFormattedPrice(Double.parseDouble(dish.getAMOUNT())));\n etDishQuantity.setText( dish.getQUNTITY());\n etDishDescription.setText(dish.getDESCRIPTION());\n\n settime(dish.getSTART_TIME(), dish.getEND_TIME(), etStartTime, etEndTime);\n /* etStartTime.setText(dish.getSTART_TIME());\n etEndTime.setText(dish.getEND_TIME());\n */\n Log.e( \"setValues: \", dish.getTYPE());\n\n if(dish.getIS_SHOWN().equals(\"Y\"))\n {\n swIsShown.setChecked(true);\n }\n else {\n swIsShown.setChecked(false);\n }\n for (int i = 0; i < menuTypes.size(); i++) {\n if (menuTypes.get(i).equalsIgnoreCase(dish.getTYPE())) {\n spDishType.setSelected(true);\n } else {\n spDishType.setSelected(false);\n }\n }\n\n\n for (int i = 0; i < menuCategory.size(); i++) {\n Log.e( \"setValueslist1: \", String.valueOf(menuCategory.get(i)));\n\n if (menuCategory.get(i).equals(dish.getCATEGORY())) {\n spDishCategory.setSelection(i);\n spDishCategory.setSelected(true);\n } else {\n spDishCategory.setSelected(false);\n }\n }\n }\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n\n\n }", "public void setSelectedDates(Timestamp mod1, Timestamp mod2, Timestamp acc1, Timestamp acc2, Timestamp cre1, Timestamp cre2) {\n frameSearch.getPnAdvanced().getDateCreationOne().setDate(new Date(cre1.getTime()));\n frameSearch.getPnAdvanced().getDateCreationTwo().setDate(new Date(cre2.getTime()));\n frameSearch.getPnAdvanced().getDateModificationOne().setDate(new Date(mod1.getTime()));\n frameSearch.getPnAdvanced().getDateModificationTwo().setDate(new Date(mod2.getTime()));\n frameSearch.getPnAdvanced().getDateAccessOne().setDate(new Date(acc1.getTime()));\n frameSearch.getPnAdvanced().getDateAccessTwo().setDate(new Date(acc2.getTime()));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jCalendar1 = new com.toedter.calendar.JCalendar();\n jPanel1 = new javax.swing.JPanel();\n cboArticulos = new javax.swing.JComboBox<>();\n jLabel1 = new javax.swing.JLabel();\n dtDesde = new com.toedter.calendar.JDateChooser();\n dtHasta = new com.toedter.calendar.JDateChooser();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtDias = new javax.swing.JTextField();\n btGuardar = new javax.swing.JButton();\n btCancelar = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n setTitle(\"Artículos\");\n setAlwaysOnTop(true);\n setBackground(new java.awt.Color(255, 255, 255));\n setUndecorated(true);\n\n jPanel1.setBackground(new java.awt.Color(255, 254, 253));\n jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(30, 129, 53), 1, true));\n jPanel1.setForeground(new java.awt.Color(255, 255, 255));\n\n jLabel1.setForeground(new java.awt.Color(247, 165, 41));\n jLabel1.setText(\"Artículo:\");\n\n dtDesde.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n dtDesdePropertyChange(evt);\n }\n });\n\n dtHasta.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n dtHastaFocusLost(evt);\n }\n });\n dtHasta.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n dtHastaMousePressed(evt);\n }\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n dtHastaMouseClicked(evt);\n }\n public void mouseExited(java.awt.event.MouseEvent evt) {\n dtHastaMouseExited(evt);\n }\n });\n dtHasta.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n dtHastaPropertyChange(evt);\n }\n });\n\n jLabel2.setForeground(new java.awt.Color(247, 165, 41));\n jLabel2.setText(\"Desde:\");\n\n jLabel3.setForeground(new java.awt.Color(247, 165, 41));\n jLabel3.setText(\"Hasta:\");\n\n jLabel4.setForeground(new java.awt.Color(247, 165, 41));\n jLabel4.setText(\"Cantidad de días:\");\n\n txtDias.setEditable(false);\n txtDias.setText(\"1\");\n\n btGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Archivos/disk.png\"))); // NOI18N\n btGuardar.setText(\"Guardar\");\n btGuardar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btGuardarActionPerformed(evt);\n }\n });\n\n btCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Archivos/cancel.png\"))); // NOI18N\n btCancelar.setText(\"Cancelar\");\n btCancelar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btCancelarActionPerformed(evt);\n }\n });\n\n jLabel5.setForeground(new java.awt.Color(247, 165, 41));\n jLabel5.setText(\"Información de la operación:\");\n\n jLabel6.setBorder(javax.swing.BorderFactory.createEtchedBorder(java.awt.Color.white, java.awt.Color.red));\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(cboArticulos, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(27, 27, 27)\n .addComponent(dtDesde, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(dtHasta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel5)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 472, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(282, 282, 282)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtDias, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(0, 6, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(17, 17, 17))\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dtDesde, dtHasta});\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btCancelar, btGuardar});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(cboArticulos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(dtDesde, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dtHasta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtDias, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btCancelar)\n .addComponent(btGuardar))\n .addGap(70, 70, 70))\n );\n\n jLabel7.setFont(new java.awt.Font(\"Ubuntu\", 1, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(9, 146, 231));\n jLabel7.setText(\"Ingreso de Artículos\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel7)\n .addGap(169, 169, 169))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n purCalen.set(year, monthOfYear, dayOfMonth);\n purDateBtn.setText(year+\"년 \"+(monthOfYear+1)+\"월 \"+ dayOfMonth+\"일\");\n setShelfCalen();\n// String msg = String.format(\"%d / %d / %d\", year,monthOfYear+1, dayOfMonth);\n// Toast.makeText(FoodInputActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n// myCalendar.set(Calendar.MONTH, monthOfYear);\n// myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n autoD8.setText(dayOfMonth + \" \" + monthString(monthOfYear + 1) + \" \" + year);\n\n dialogueCal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n dialogueCal.set(Calendar.YEAR, year);\n dialogueCal.set(Calendar.MONTH, monthOfYear);\n timeAndDate = dialogueCal.getTimeInMillis();\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel2();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel2();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel2();\n }", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, end_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(to_date);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel1();\n\n }", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n year = selectedYear;\n month = selectedMonth;\n day = selectedDay;\n\n // set selected date into textview\n txtDateLastSeen.setText(new StringBuilder()\n .append(day).append(\"-\")\n .append(month + 1).append(\"-\")\n .append(year).append(\" \"));\n\n // set selected date into datepicker also\n// dpResult.init(year, month, day, null);\n\n }", "public void setTodayCalendar()\n {\n this.currentCalendar = Calendar.getInstance();\n }", "void setTripDates(Calendar departureDate, Calendar arrivalDate);", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(from_date);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n calendar.set(Calendar.YEAR, year);\n calendar.set(Calendar.MONTH, monthOfYear);\n calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n binding.editTextTanggalKegiatan.setText(simpleDateFormatView.format(calendar.getTime()));\n tanggal = simpleDateFormatServer.format(calendar.getTime());\n }", "public void setSelectedCalendar(String calendarName) {\n }", "public void setFechaSolicitud(java.util.Calendar param){\n \n this.localFechaSolicitud=param;\n \n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel(edtanniversry);\n }", "@Override\n\t\tpublic void onDateSet(DatePicker view, int selectedYear,\n\t\t\t\tint selectedMonth, int selectedDay) {\n\n\t\t\tyear = selectedYear;\n\t\t\tmonth = selectedMonth;\n\t\t\tday = selectedDay;\n\n\t\t\tcreate_srart_date.setText(new StringBuilder().append(year)\n\t\t\t\t\t.append(\"-\").append(month + 1).append(\"-\").append(day));\n\n\t\t}", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n tanggal.set(Calendar.YEAR, year);\n tanggal.set(Calendar.MONTH, monthOfYear);\n tanggal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, start_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, dayOfMonth);\n Date date = new Date(calendar.getTimeInMillis());\n edit.setText(Utils.formatDate(date, Constants.FORMAT_DATE_YEAR_MONTH_DAY));\n if (startDate) {\n mStartDate = new Date(date.getTime());\n } else {\n mEndDate = new Date(date.getTime());\n }\n // has to do here\n updateInterest();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n Button button = (Button) findViewById(R.id.dateBtn);\n button.setText(\"Selected Date: \" + month + \"/\" + day + \"/\" + year);\n calendarSelected.set(year, month, day);\n userSelectedDate = true;\n\n if (!userSelectedTime) {\n int hour = calendarSelected.get(Calendar.HOUR_OF_DAY);\n int minute = calendarSelected.get(Calendar.MINUTE);\n\n button = (Button) findViewById(R.id.timeBtn);\n button.setText(\"Selected Time: \" + hour + \":\" + String.format(\"%02d\",minute));\n }\n }", "public void setAppointment() throws SQLException {\n ResultSet rs;\n Statement st = dbConnection.dbConnect().createStatement();\n Timestamp date = new java.sql.Timestamp(new java.util.Date().getTime());\n \n String getCustomerId=\"SELECT customerId FROM customer WHERE customerName = '\" + selectedCustomer + \"';\";\n rs = st.executeQuery(getCustomerId);\n rs.next();\n selectedCustomerId = rs.getInt(1);\n \n long startTime = appointmentStart.getTime();\n Date startDate = new Date(startTime - TimeZone.getDefault().getOffset(startTime));\n appointmentStarts = new Timestamp(startDate.getTime());\n \n long endTime = appointmentEnd.getTime();\n Date endDate = new Date(endTime - TimeZone.getDefault().getOffset(endTime));\n appointmentEnds = new Timestamp(endDate.getTime());\n \n // Adding to customer table\n String query=\"INSERT INTO appointment(customerId, title, description, location, url, start, end, createDate, createdBy, lastUpdateBy) VALUES('\" \n + selectedCustomerId + \"', '\"\n + title.getText() + \"', '\"\n + description.getText() + \"', '\"\n + location.getText() + \"', '\"\n + urlText.getText() + \"', '\"\n + appointmentStarts + \"', '\"\n + appointmentEnds + \"', '\"\n + date + \"', '\"\n + LoginPageController.getUser() + \"', '\"\n + LoginPageController.getUser() + \"')\";\n st.executeUpdate(query);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n\t\t\t\tpublic void onSelectedDayChange(CalendarView view, int year,\n\t\t\t\t\t\tint month, int dayOfMonth) {\n\n\t\t\t\t\tif (dayOfMonth != currentSelectedDate.getDate()\n\t\t\t\t\t\t\t|| (dayOfMonth == currentSelectedDate.getDate() && month != currentSelectedDate\n\t\t\t\t\t\t\t\t\t.getMonth())) {\n\n\t\t\t\t\t\tcurrentSelectedDate = new Date(calendarView.getDate());\n\t\t\t\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t\t\t\t\t\t.format(currentSelectedDate));\n\t\t\t\t\t\tupdateSchedulePatient();\n\t\t\t\t\t}\n\n\t\t\t\t}", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabelFromDate();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateLabel();\n }", "private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }", "public void setTodayDate() {\r\n int oldMonthValue = getMonth();\r\n int oldYearValue = getYear();\r\n calendarTable.getCalendarModel().setTodayDate();\r\n updateControlsFromTable();\r\n // fire property change\r\n int newMonthValue = getMonth();\r\n if (oldMonthValue != newMonthValue) {\r\n firePropertyChange(MONTH_PROPERTY, oldMonthValue, newMonthValue);\r\n }\r\n int newYearValue = getYear();\r\n if (oldYearValue != newYearValue) {\r\n firePropertyChange(YEAR_PROPERTY, oldYearValue, newYearValue);\r\n }\r\n // clear selection when changing the month in view\r\n if (oldMonthValue != newMonthValue && oldYearValue != newYearValue) {\r\n calendarTable.getSelectionModel().clearSelection();\r\n }\r\n }", "public void initializeDate() {\n //Get current date elements from Calendar object\n day = cal.get(Calendar.DAY_OF_MONTH);\n month = cal.get(Calendar.MONTH); //Note months are indexed starting at zero (Jan -> 0)\n year = cal.get(Calendar.YEAR);\n\n //Pair EditText to local variable and set input type\n date = (EditText) findViewById(R.id.textSetDate);\n date.setInputType(InputType.TYPE_NULL);\n\n //Set EditText text to be current time\n date.setText((month + 1) + \"/\" + day + \"/\" + year);\n\n //Create onClick listener on date variable\n date.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n datePicker = new DatePickerDialog(ControlCenterActivity.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int dayOfMonth) {\n date.setText((month + 1) + \"/\" + dayOfMonth + \"/\" + year);\n }\n }, year, month, day);\n\n datePicker.show();\n }\n });\n }", "@Override\n\t\t\t\tpublic void onSelectedDayChange(CalendarView view, int year,\n\t\t\t\t\t\tint month, int dayOfMonth) {\n\n\t\t\t\t\tif (dayOfMonth != currentSelectedDate.getDate()\n\t\t\t\t\t\t\t|| (dayOfMonth == currentSelectedDate.getDate() && month != currentSelectedDate\n\t\t\t\t\t\t\t\t\t.getMonth())) {\n\n\t\t\t\t\t\tcurrentSelectedDate = new Date(calendarView.getDate());\n\t\t\t\t\t\tappointment.setDate(new SimpleDateFormat(\"dd-MM-yyyy\")\n\t\t\t\t\t\t\t\t.format(currentSelectedDate));\n\t\t\t\t\t\tupdateScheduleDoctor();\n\t\t\t\t\t}\n\n\t\t\t\t}", "public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDate();\n }", "public void set_value_to_default() {\n this.selectionListStrike.setText(\"\");\n this.selectionListCal_iv.setText(\"\");\n this.selectionListUlast.setText(\"\");\n String format = new SimpleDateFormat(\"dd/MM/yyyy\").format(new Date());\n int parseInt = Integer.parseInt(format.substring(6, 10));\n int parseInt2 = Integer.parseInt(format.substring(3, 5));\n int parseInt3 = Integer.parseInt(format.substring(0, 2));\n this.selectedDate = parseInt + \"-\" + parseInt2 + \"-\" + parseInt3;\n this.selectionListExpiry.setSelectedText(format);\n this.selectionListExpiry.initItems(R.string.set_date, SelectionList.PopTypes.DATE, parseInt, parseInt2, parseInt3);\n if (!this.wtype.equals(\"C\")) {\n this.callputbutton.callOnClick();\n }\n }", "public void setDate(View view) {\n new DatePickerDialog(\n AddEvent.this, dateSet,\n myCalendar.get(Calendar.YEAR),\n myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)\n ).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, monthOfYear, dayOfMonth);\n long time = calendar.getTimeInMillis();\n Bundle args = getArguments();\n if (args.getString(\"date\").equals(\"start\")) {\n setStartDate = true;\n }\n if (setStartDate)\n AddEventActivity.setStartDateEvent(new Date(time));\n else\n AddEventActivity.setEndDateEvent(new Date(time));\n }", "private void initializeMonthSelector(){\n monthSelect.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {\n \n \n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n// System.out.println(monthSelect.getSelectionModel().getSelectedItem());\n // Necessary to check for null because change listener will\n // also detect clear() calls\n if (newValue != null) {\n \n // Show selected/current month above calendar\n monthLabel.setText(newValue);\n System.out.println(\"mounth new \"+newValue);\n // Update the VIEWING MONTH;\n Model.getInstance().viewing_month = Model.getInstance().getMonthIndex(newValue);\n \n \n //Model.getInstance().viewing_month = monthSelect.getSelectionModel().getSelectedIndex();\n \n \n // System.out.println(\"mounth\"+Model.getInstance().viewing_month);\n\n // Update view\n repaintView();\n }\n \n }\n });\n \n // Add event listener to each year item, allowing user to change years\n selectedYear.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {\n \n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n \n if (newValue != null){\n \n // Update the VIEWING YEAR\n Model.getInstance().viewing_year = Integer.parseInt(newValue);\n \n // Update view\n repaintView();\n }\n }\n });\n }", "public void populateForm(Appointment row){\n selectedRow = row;\n idText.setText(Integer.toString(row.getId()));\n titleText.setText(row.getTitle());\n descriptionText.setText(row.getDescription());\n for(Location item : locationCombo.getItems()){\n if(item.getCity_state().equals(row.getLocation())){\n locationCombo.getSelectionModel().select(item);\n break;\n }\n }\n for(Contact person : contactCombo.getItems()){\n if(person.getName().equals(row.getContact())){\n contactCombo.getSelectionModel().select(person);\n break;\n }\n }\n for(Type meeting : typeCombo.getItems()){\n if(meeting.getAppointment_type().equals(row.getType())){\n typeCombo.getSelectionModel().select(meeting);\n break;\n }\n }\n for(Customer cust : customerCombo.getItems()){\n if(cust.getId() == row.getCustomer()){\n customerCombo.getSelectionModel().select(cust);\n break;\n }\n }\n for(User user : userCombo.getItems()){\n if(user.getId() == row.getUser()){\n userCombo.getSelectionModel().select(user);\n break;\n }\n }\n startLDT = LocalDateTime.parse(row.getStart(), formatter);\n endLDT = LocalDateTime.parse(row.getEnd(), formatter);\n dateBox.setValue(startLDT.toLocalDate());\n setPrevSpinner = true;\n setSpinners();\n }", "public GregorianCalendar getSelectedDate(){\n int day = Integer.parseInt(this.date_day.getSelectedItem().toString());\n int month = Integer.parseInt(this.date_month.getSelectedItem().toString());\n int year = Integer.parseInt(this.date_year.getSelectedItem().toString());\n\n GregorianCalendar date = new GregorianCalendar();\n date.setTimeInMillis(0);\n \n date.set(Calendar.DAY_OF_MONTH, day);\n date.set(Calendar.MONTH, month -1);\n date.set(Calendar.YEAR, year);\n\n return date;\n }", "public void onDateSet(DatePicker view, int selectedYear,\n\t\t\t\t\tint selectedMonth, int selectedDay) {\n\t\t\t\t\tyear = selectedYear; \n\t\t\t\t\tmonth = selectedMonth; \n\t\t\t\t\tday = selectedDay;\n\t\t\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t\t\t// Month is 0 based, just add 1\n\t\t\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t\t\t.append(year));\n\t\t\t}", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n int mMonth = month + 1;\n String bydate = year + \"-\" + mMonth + \"-\" + day;\n mIdTvMoonatCenterShortLine.setText(bydate);\n\n List<SleepDataInfo> all = manager.findAllSleep();\n SleepDataInfo sleepDataInfo_total = manager.findSleepDataInfo(SPUtil.getUserName(getApplication()), bydate);\n RefreshView(sleepDataInfo_total); /*选择日期后刷新ui*/\n }", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(oDate.getSelection());\t\t\t\t\n\t\t\t\teachShipment.setExpectedShipDate(oDate.getSelection());;\n\t\t\t eachShipment.setExpectedRecievedDate(sDate.getSelection());\n\t\t\t eachShipment.setRecieptNumber(recieptText.getText());\n\t\t\t\teachShipment.setOrgId(orgId);\n\t\t\t\t//need to refactor to remove duplication later\n\t\t\t\t//possible try block\n\t\t\t\tList<DatabaseAccess> affectedTables = new ArrayList<DatabaseAccess>();\n\t\t\t\tStoreInDatabase sd = new StoreInDatabase();\n\t\t\t\taffectedTables.add(eachShipment);\n\t\t\t\tsd.writeToDatabase(affectedTables);\n\t\t\t}", "public void setCalendar(VCalendar calendar) {\n this.calendar = calendar;\n }", "public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}" ]
[ "0.6295115", "0.6022221", "0.6009509", "0.59449303", "0.5942713", "0.591061", "0.5893715", "0.5893715", "0.5871577", "0.58404875", "0.5809887", "0.58092695", "0.5793959", "0.57897085", "0.5787137", "0.57638294", "0.5754973", "0.5751897", "0.5723166", "0.5708487", "0.57043004", "0.57041365", "0.56984735", "0.56963384", "0.56932163", "0.5668175", "0.56676924", "0.5667442", "0.5657254", "0.5641261", "0.5636471", "0.56357735", "0.56357306", "0.5620473", "0.56186754", "0.5616765", "0.5614073", "0.5607612", "0.5604143", "0.55956286", "0.55858475", "0.55826885", "0.5578691", "0.55773896", "0.55660594", "0.55532223", "0.55527556", "0.55519867", "0.5549078", "0.5533438", "0.5533438", "0.5533438", "0.5533109", "0.55240285", "0.551212", "0.5505026", "0.550022", "0.54983824", "0.5494037", "0.54928535", "0.54904413", "0.54821074", "0.54774296", "0.5477074", "0.547432", "0.5468579", "0.546312", "0.54585874", "0.54547507", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5450449", "0.5447389", "0.54448867", "0.5444478", "0.5444478", "0.5444478", "0.5441499", "0.54295456", "0.5427135", "0.5412477", "0.54060054", "0.5398925", "0.53946346", "0.53919005", "0.53913224", "0.53905666", "0.53872585", "0.53869605", "0.53848857", "0.538101", "0.5380552", "0.53800875" ]
0.0
-1
Closes this input stream and releases any system resources associated with the stream; closes the method also.
@Override public void close() throws IOException { if (closed) return; /* Allow multiple close calls */ closed = true; try { consume(); } finally { super.close(); } if (method != null) method.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void closeStream() {\n output.close();\n input.close();\n }", "@Override\n public void close() throws IOException {\n input.close();\n }", "public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void close() throws IOException\n {\n InputStream in = _inputSource;\n\n if (in != null) {\n _inputSource = null;\n if (_autoClose) {\n in.close();\n }\n }\n freeBuffers();\n }", "protected void closeStream ()\n {\n stream.close ();\n }", "public static void close(){\n\t\tin.close();\n\t}", "public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }", "public static void closeIO()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tinStream.close();\r\n\t\t\toutStream.close();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t public synchronized void close() throws IOException {\n\t\tin.close();\n\t\topen = false;\n\t }", "public void close() throws IOException\n {\n in.close();\n }", "public synchronized void close() {\n try {\n audioInputStream.close();\n } catch (IOException ioe) {\n System.err.println(\"Problem while closing the audioInputSteam\");\n }\n\n }", "protected void close() {\n\t\tif(sOutput != null) {\n\t\t\ttry {\n\t\t\t\tsOutput.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"error closing output stream\");\n\t\t\t}\n\t\t\t\n\t\t\tsOutput = null;\n\t\t}\n\t}", "private void closeStream() throws IOException {\n if (originalInputStream != inputStream) {\n // Close the byte input stream or file input stream, if either is the current one\n inputStream.close();\n }\n\n if (closeOriginalStreamOnClose) {\n originalInputStream.close();\n }\n }", "public void close() throws IOException {\n open = false;\n stream.close();\n }", "@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }", "public void close ()\n {\n StreamHelper.flush (this);\n StreamHelper.close (m_aOS);\n m_aOS = null;\n }", "public void close() throws FormatException, IOException {\n if (in != null) in.close();\n in = null;\n currentId = null;\n }", "private void close() {\n try {\n if (reader != null) {\n this.reader.close();\n }\n if (writer != null) {\n this.writer.close();\n }\n }\n catch (IOException e) {\n log.error(e);\n log.debug(Constants.STREAM_IS_CLOSED);\n }\n }", "public void closeStream() {\n\t\ttry {\n\t\t\tisReaderStatusClosed = true;\n\t\t\tif(buffReader != null) {\n\t\t\t\tbuffReader.close();\n\t\t\t}\n\t\t} catch(Exception e) { }\n\t}", "protected void close() {\r\n\t\ttry {\r\n\t\t\t_asciiIn.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Error ocurred while closing file \" + _directory + _filename + _filetype + \":\" + e.getMessage());\r\n\t\t} // catch\r\n\t}", "@Override\n public void close() {\n backingIterator.close();\n outputBuffer.close();\n isClosed = true;\n }", "private void CloseInputAndOutputStreams() {\n if (mOut != null)\n mOut.close();\n\n if (mIn != null)\n try {\n mIn.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "protected void close()\n {\n out.close();\n }", "public synchronized void close() throws IOException {\n\t\t\tfinish();\n\t\t\tout.close();\n\t\t}", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "private void closeInputFile() {\n try {\n fileInputStream.close();\n } catch (IOException ioException) {\n Log.d(LOG_TAG, \"closeInputFile (165): Error while closing input file.\");\n ioException.printStackTrace();\n this.finishedEncoding = true;\n }\n }", "@Override\n\t public synchronized void close() throws IOException {\n\t\tout.close();\n\t\topen = false;\n\t }", "@Override\n public void onClose() {\n logger.info(\"Closing {} streams for file {}\", this.getTransferType(), this.getResource().file);\n try {\n if (inputChannel != null) {\n inputChannel.close();\n inputChannel = null;\n inputBuffer.clear();\n inputBuffer = null;\n }\n if (outputStream != null) {\n outputStream.close();\n outputStream = null;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n try { out.flush(); } catch (Exception e) {}; // just to be sure\n \n cleanup();\n }", "public void \n close() \n throws PipeException \n {\n in = -1;\n closedByReader = true;\n }", "public void close() throws IOException {\n source.close();\n }", "@Override\n public void close() throws IOException\n {\n try\n {\n fAVMRemote.closeInputHandle(fTicketHolder.getTicket(), fHandle);\n }\n catch (Exception e)\n {\n throw new IOException(\"Remote Error closing input stream.\");\n }\n }", "public void close() {\n this.output = null;\n }", "public void close()\n throws IOException\n {\n outstream.close();\n }", "public void close() throws IOException {\n if (!closed) {\n // Android-changed: Unconditionally close external inflaters (b/26462400)\n //if (usesDefaultInflater)\n inf.end();\n in.close();\n closed = true;\n }\n }", "@Override\n\t\tpublic void close() throws IOException {\n\t\t\tout.close();\n\t\t}", "public void close(){\n\t\ttry {\n\t\t\tout.close();\n\t\t\tout = null;\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"Problem closing file.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "@Override\n public void close() throws IOException\n {\n _out.close();\n }", "public void close()\r\n\t{\r\n\t if (isOpen()) try {\r\n\t \tfd.close();\r\n\t } catch (IOException ex) {\r\n\t \t/* do nothing */\r\n\t } finally {\r\n\t\t thisc = EOF;\r\n\t\t holdc = EOF;\r\n\t\t fd = null;\r\n\t }\r\n\t}", "public void close() throws IOException\n {\n try\n {\n flush();\n }\n catch (IOException ignored)\n {\n // ignore\n }\n getStream().close();\n }", "public static void closeFile() {\n\t\tif (input != null)\n\t\t\tinput.close();\n\t\t\n\t}", "protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }", "public void close() {\n this.output.flush();\n this.output.close();\n }", "public void close() throws IOException {\r\n reader.close();\r\n reader = null;\r\n }", "@Override\n\tpublic void close() {\n\t\tfinal Socket input = getSocket();\n\n\t\tif (input != null) {\n\t\t\tif (!input.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t// we cannot do anything\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void close() {\n try {\n out.close();\n } catch (java.io.IOException ioe) {\n }\n ;\n }", "public void close() throws IOException {\n reader.close();\n }", "private void close() {\r\n try {\r\n if (m_in != null) {\r\n m_in.close();\r\n }\r\n if (m_out != null) {\r\n m_out.close();\r\n }\r\n if (m_socket != null) {\r\n m_socket.close();\r\n }\r\n } catch (IOException e) {\r\n throw new WrappedRuntimeException(e);\r\n }\r\n }", "public void close() throws IOException {\n\t\tthis.finish();\n\t\tthis.buffer.close();\n\t\t}", "public synchronized void close() throws IOException {\n\t\tm_reader.close();\n\t}", "@Override\n\tpublic void close() throws IOException {\n\t\tiOBuffer = new IOBuffer();\n\t}", "public static void close( InputStream ins )\n {\n if ( ins != null )\n {\n try\n {\n ins.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing input stream.\", e );\n }\n }\n }", "public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}", "private void close() {\n\t\t\n//\t\tif (handlingEvent) { return; } // hopefully this is never used\n\t\t\n\t\tif (serialPort != null) {\n\t\t\tUtil.debug(\"close port: \" + serialPort.getName() + \" baud: \" + serialPort.getBaudRate(), this);\n\t\t\t// serialPort.removeEventListener();\n\t\t\tserialPort.close();\n\t\t\tserialPort = null;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tif (inputStream != null) inputStream.close();\n\t\t} catch (Exception e) {\n\t\t\tUtil.log(\"input stream close():\" + e.getMessage(), this);\n\t\t}\n\t\ttry {\n\t\t\tif (outputStream != null) outputStream.close();\n\t\t} catch (Exception e) {\n\t\t\tUtil.log(\"output stream close():\" + e.getMessage(), this);\n\t\t}\n\t\t\n\t\tbuffer = null;\n\t\t// Util.delay(TIMEOUT);\n\n\t}", "public void close() {\r\n\t\tflush();\r\n\t\ttry {\r\n\t\t\tdos.close();\r\n\t\t\ts.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void close() {\n if (numDigits > 0)\n flush();\n try {\n output.close();\n } catch (IOException e) {\n throw new RuntimeException(e.toString());\n }\n }", "public void close(){\n\t\tscanner.close();\n\t}", "public void close() throws IOException {\n reset();\n _reader.close();\n }", "public void Close() {\n\t\tfd.close();\r\n\t}", "public void close() {\n if (this.out == null) {\n return;\n }\n try {\n this.out.flush();\n this.out.close();\n this.out = null;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}", "public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n void close() throws IOException;", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; /* indicate end of file */\n zzEndRead = zzStartRead; /* invalidate buffer */\n\n if (zzReader != null)\n zzReader.close();\n }", "@Override\n public void close() throws IOException {\n isClosed = true;\n }", "public void close()\n\t{\n\t\ttry { stream.close(); } catch(Exception ex1) {}\n\t\ttry { channel.close(); } catch(Exception ex2) {}\n\t}", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public void close() throws IOException;", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }", "public final void yyclose() throws java.io.IOException {\n zzAtEOF = true; // indicate end of file\n zzEndRead = zzStartRead; // invalidate buffer\n\n if (zzReader != null) {\n zzReader.close();\n }\n }", "@Override\n\t\tpublic void close() throws IOException {\n\t\t\t\n\t\t}" ]
[ "0.79279345", "0.7767912", "0.7595205", "0.75555336", "0.73307276", "0.7190848", "0.7122996", "0.70553803", "0.7044631", "0.70355326", "0.7008062", "0.7004743", "0.70011556", "0.693755", "0.6897453", "0.6895465", "0.6851754", "0.6802819", "0.67967653", "0.6779326", "0.67617613", "0.6689186", "0.6651829", "0.664503", "0.6642979", "0.662964", "0.6618057", "0.6603035", "0.658941", "0.6576588", "0.65745807", "0.657106", "0.6562653", "0.6551799", "0.6533398", "0.6527242", "0.6500724", "0.6479163", "0.64770097", "0.64765286", "0.647308", "0.64212877", "0.6420451", "0.6397926", "0.6392773", "0.63614935", "0.6355117", "0.6338008", "0.63363177", "0.6335875", "0.63338625", "0.6328462", "0.62996507", "0.6297519", "0.6294933", "0.6285902", "0.6282353", "0.627915", "0.6270776", "0.62668896", "0.62448347", "0.6225257", "0.6208875", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61907536", "0.61905354", "0.6190157", "0.618843", "0.6184507", "0.6184507", "0.6184507", "0.6184507", "0.6184507", "0.6184507", "0.6184507", "0.6184507", "0.6178685", "0.6178685", "0.61773276" ]
0.6588985
29
umesto test bice zahtev za placanje
@RequestMapping(path="/initPaymentGet", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> test() { logger.info("Init payment"); //System.out.println("DTO: " + btcDTO.getPrice_currency()); String pom = ""; RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS"); ResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET, new HttpEntity<String>(pom, headers), String.class); //restTemplate.getForEntity("https://google.rs", String.class); //ResponseEntity<String> response = restTemplate.getForEntity("https://api-sandbox.coingate.com/v2/orders", String.class); //ResponseEntity<String> response = restTemplate.postForEntity("https://api.coingate.com/v2/orders", btcDTO, String.class); return new ResponseEntity<Object>(responseEntity,HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\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// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\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}", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\n public void testKatsokoko() {\n \n assertEquals(50, testi.ruudunkoko);\n }", "@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "@Test\r\n\tpublic void testGetErabBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -0.5);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == -2.75);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == 0.75);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 1.75);\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Batezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// e1 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == -1);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(p1.getPelikulaId())).equals(\"-1,6398\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p2.getPelikulaId())).equals(\",1491\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p3.getPelikulaId())).equals(\",4472\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(p4.getPelikulaId())).equals(\"1,0435\"));\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazio normalizatuak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioNormalizatuak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 0);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "public void testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "public void testAltaVehiculo(){\r\n\t}", "@Test\n\tpublic void vero_se_e_solo_se_un_prestito_uguale_a_se_stesso() {\n\t\tassertTrue(prestito.equals(prestito),\"Prestito uguale sse uguale a se stesso\");\n\t}", "@Test\r\n\tpublic void testGetErabBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioak(e1.getId());\r\n\t\tassertTrue(bek.luzera() == 3);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 3.5);\r\n\t\tassertFalse(bek.bektoreanDago(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioak(e2.getId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 2);\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 balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioak(e3.getId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(p1.getPelikulaId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(p3.getPelikulaId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(p4.getPelikulaId()) == 5);\r\n\t\t\r\n\t\t// e4 erabiltzaileak baloratu dituen pelikulen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getErabBalorazioak(e4.getId());\r\n\t\tassertTrue(bek.luzera() == 1);\r\n\t\tassertTrue(bek.getBalioa(p2.getPelikulaId()) == 3.5);\r\n\t\tassertFalse(bek.bektoreanDago(p1.getPelikulaId()));\r\n\t\t\r\n\t}", "public void testNamaPNSYangSkepnyaDiterbitkanOlehPresiden(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPNSYangSkepnyaDiterbitkanOlehPresiden(); \n\n\t\tshowData(data,\"nip\",\"nama\",\"tanggal_lahir\",\"tanggal_berhenti\",\"pangkat\",\"masa_kerja\",\"penerbit\");\n\t}", "@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }", "@Test\r\n\tpublic void testErabiltzaileakBaloratuDituenPelikulenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e1.getId());\r\n\t\tassertTrue(zer.size() == 3);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e2.getId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e3.getId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e4.getId());\r\n\t\tassertTrue(zer.size() == 1);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t}", "@Test\n public void testRucheVide() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheVide =============================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n assertTrue(instance.rucheVide());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec un insecte a l'origine :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheVide());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "@Test\n public void testVoitto() {\n Peli peli = new Peli(new Alue(3, 0));\n peli.avaaRuutu(1, 1);\n boolean ododtus = true;\n boolean tulos = peli.voitto();\n assertEquals(ododtus, tulos);\n }", "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void konstruktoriAsettaaSateenOikein() {\n assertEquals(3.0, lierio.getSade(), 1);\n }", "@Test\n public void testSalaire() {\n Assert.assertTrue(e.calculSalaire() == 15 * 20 + e.getSalaire());\n }", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "@Test\r\n public void testGetPracownik() {\r\n System.out.println(\"getPracownik\");\r\n Faktura instance = new Faktura();\r\n Pracownik expResult = null;\r\n Pracownik result = instance.getPracownik();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testNoNulos() {\n\t\tassertNotNull(\"Error: La bici es nula\", bicicleta);\n\t\tassertNotNull(\"Error: La velocidad es nula\", bicicleta.getVelocidad());\n\t\tassertNotNull(\"Error: El espacio es nulo\", bicicleta.getEspacioRecorrido());\n\t\tassertNotNull(\"Error: El piñon actual es nulo\", bicicleta.getPinhonactual());\n\t\tassertNotNull(\"Error: El plato actual es nulo\", bicicleta.getPlatoactual());\n\t\tassertNotNull(\"Error: El radio de la rueda es nulo\", bicicleta.getRadiorueda());\n\t}", "public void testAuta()\n\t{\n\t\tNakladak nakl = new Nakladak(Simulator.getCas());\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\t//cesta po prekladistich\n\t\tfor(int i=4001;i<4009;i++)\n\t\t{\n\t\t\tnakl.cesta.add(i);\n\t\t}\n\t\tnakl.kDispozici = false;\n\t\tnakl.jede = true;\n\t\tsim.addObserver(nakl);\n\t\t\n\t\tthis.vozy.add(nakl);\n\t\t\n\t}", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "public void testOctaedre() {\n\t\t\t\n\t\t\tSolide i = Octaedre.octaedre();\n\t\t\t\n\t\t\t/* creation de points qui ont les memes coordonnees que ceux qui \n\t\t\t * constituent notre solide (car octaedre() n'a pas de parametres)\n\t\t\t */\n\t\t\t\n\t\t\tPoint p1 = new Point(-25, 0,-25);\n\t\t\tPoint p2 = new Point(-25, 0,25);\n\t\t\tPoint p3 = new Point(25, 0,-25);\n\t\t\tPoint p4 = new Point(25,0,25);\n\t\t\tfloat hauteur = (float) (50/Math.sqrt(2));\n\t\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\n\t\t\tPoint p5 = new Point(0, hauteur,0);\n\t\t\tPoint p6 = new Point(0,-hauteur,0);\n\t\t\t\n\t\t\t//On teste si les points de l'octaedre i sont bien les memes que ceux créés\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getAbscisse()==(p1.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(1).getAbscisse()==(p2.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(5).getAbscisse()==(p3.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(3).getAbscisse()==(p4.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(2).getAbscisse()==(p5.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(0).getAbscisse()==(p6.getAbscisse()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getOrdonnee()==(p1.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(1).getOrdonnee()==(p2.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(5).getOrdonnee()==(p3.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(3).getOrdonnee()==(p4.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(2).getOrdonnee()==(p5.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(0).getOrdonnee()==(p6.getOrdonnee()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getProfondeur()==(p1.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(1).getProfondeur()==(p2.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(5).getProfondeur()==(p3.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(3).getProfondeur()==(p4.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(2).getProfondeur()==(p5.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(0).getProfondeur()==(p6.getProfondeur()));\n\t\t\t\n\t\t\t//On teste si les faces de l'octaedre contiennent bien les points créés\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(0).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(1).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(2).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(3).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p6));\n\t\t\n\t\t\tassertTrue(i.getFaces().get(4).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(5).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(6).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(7).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p6));\n\t\t\t\n\t\t\t\n\t\t\t\n\t}", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testJatka() {\n System.out.println(\"jatka\");\n Peli peli = new Peli(new Alue(3, 1));\n peli.jatka();\n assertEquals(peli.isHavio(), false);\n assertEquals(peli.getMenetykset(), 1);\n\n }", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\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}", "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 test2(){\r\n\t\tZug zug1 = st.zugErstellen(2, 2, \"Zug 1\");\r\n\t\tst.fahren();\r\n\t}", "@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }", "@Test\n public void testSpremiKonfiguraciju() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju();\n assertTrue(datKonf.exists());\n }", "@Test\n public void testRucheBrisee() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n instance.ajoutCasesVoisines(orig);\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee(null, null));\n //assertFalse(instance.rucheBrisee(reine));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost et casedest :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(new Case(orig.voisinBas()), new Case(orig.voisinBas().voisinBas().voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "@Test\n public void testCalculScoreAvecQueDesStrikes(){\n Jeu leJeu = new Jeu(10, 0);\n Partie laPartie = new Partie(leJeu, leJeu, leJeu);\n //when : on calcul le score\n Integer score = laPartie.calculerScore();\n //then : on obtient un score de 150\n assertEquals(new Integer(300), score);\n }", "@Test\r\n public void testCalculerValeurTerrainAgricole() {\n Lot lot1 = new Lot(\"Lot1\", 2, 0, 300, \"14-02-2019\");\r\n Lot lot2 = new Lot(\"Lot2\", 2, 0, 600, \"12-06-2019\");\r\n Lot lot3 = new Lot(\"Lot3\", 2, 0, 1500, \"04-02-2019\");\r\n List<Lot> lots = new ArrayList();\r\n lots.add(lot1);\r\n lots.add(lot2);\r\n lots.add(lot3);\r\n // Terrain (typeTerrain, prix_min2, prix_min2, listLot)\r\n Terrain terrain = new Terrain(0, 50.00, 75.00, lots);\r\n Agricole.calculerValeurTerrainAgricole(terrain);\r\n // valFonciereAttendue = 50.0*300 + 50.0*600 + 50.0*1500 + 733.77 +\r\n // nbreDroitPassage = 500-(2*(5/100*300*50)) + 500-(2*(5/100*600*50))+\r\n // 500-(2*(5/100*1500*50)\r\n double valFonciereAttendue = 110233.8;\r\n double taxeScolaireAttendue=1322.85;\r\n double taxeMunicipaleAttendue = 2755.85;\r\n boolean resultat = valFonciereAttendue == terrain.getValeur_fonciere_totale()\r\n && taxeScolaireAttendue == terrain.getTaxe_scolaire()\r\n && taxeMunicipaleAttendue == terrain.getTaxe_municipale();\r\n assertTrue(\"valfoncièreAttendue: \" + valFonciereAttendue+\", vs valeur obtenue: \"+terrain.getValeur_fonciere_totale()\r\n + \"\\ntaxe scolaire attendue: \" + taxeScolaireAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_scolaire()\r\n + \"\\ntaxe muninipale attendue: \" + taxeMunicipaleAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_municipale(), \r\n resultat); \r\n \r\n }", "public void testInicial(){\n\t\tString prueba = \"gg\";\n\t\tassertNotNull(prueba);\n\t}", "@Test\n public void testRucheBrisee2() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee2 ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee2(null));\n assertFalse(instance.rucheBrisee2(reine.getEmplacement()));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee2(new Case(orig.voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "@Test\r\n public void testSamaPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n \r\n AvlPuu puu2 = new AvlPuu();\r\n puu2.insert(noodi);\r\n puu2.insert(noodi2);\r\n assertTrue(puu.SamaPuu(puu2));\r\n\r\n }", "@Test\n public void testPrestarEjemplar() {\n System.out.println(\"prestarEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(1);\n Usuario usuario = new UsuariosList().getUsuarios().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar result = instance.prestarEjemplar(ejemplar, usuario);\n Ejemplar expResult = ejemplar;\n expResult.setUsuarioId(usuario);\n \n assertEquals(expResult, result);\n\n }", "@Test\r\n public void testGetOrigen() {\r\n String expResult = \"origenprueba\";\r\n articuloPrueba.setOrigen(expResult);\r\n String result = articuloPrueba.getOrigen();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testArreglarCadena() {\n System.out.println(\"arreglarCadena\");\n String cadena = \"\";\n String expResult = \"\";\n String result = utilsHill.arreglarCadena(cadena);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void test5(){\r\n\t\tZug zug1 = st.zugErstellen(1, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(0, 3, \"Zug 2\"); \r\n\t}", "@Test\n\tpublic void testKargatuGorde() throws IOException {\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\n\t\tassertEquals(0, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gorde();\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\n\t\tErabiltzaileLista.getErabiltzaileLista().kargatu();\n\t\tassertEquals(0, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\t//Erabiltzaile bat gordeta\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tErabiltzaileLista.getErabiltzaileLista().gorde();\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\n\t\tErabiltzaileLista.getErabiltzaileLista().kargatu();\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tassertNotNull( ErabiltzaileLista.getErabiltzaileLista().bilatuErabiltzaile(\"Martin\", \"123456\"));\n\t\t//Erabiltzaile asko gordeta\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Mikel\", \"123456\",\"123456\");\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Edgar\", \"123456\",\"123456\");\n\t\tassertEquals(3, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gorde();\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\n\t\tErabiltzaileLista.getErabiltzaileLista().kargatu();\n\t\tassertEquals(3, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tassertNotNull( ErabiltzaileLista.getErabiltzaileLista().bilatuErabiltzaile(\"Martin\", \"123456\"));\n\t\tassertNotNull( ErabiltzaileLista.getErabiltzaileLista().bilatuErabiltzaile(\"Mikel\", \"123456\"));\n\t\tassertNotNull( ErabiltzaileLista.getErabiltzaileLista().bilatuErabiltzaile(\"Edgar\", \"123456\"));\n\n\n\t}", "@Test\r\n public void testVerificaPossibilidade0() {\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testCalculScoreAvecQueDesSpares(){\n Jeu leJeu = new Jeu(5,5);\n Jeu jeuBonus1 = new Jeu(5, null);\n Partie laPartie = new Partie(leJeu, jeuBonus1);\n //when : on calcul le score\n Integer score = laPartie.calculerScore();\n //then : on obtient un score de 150\n assertEquals(new Integer(150), score);\n }", "@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }", "@Test\n\tpublic void ricercaSinteticaClassificatoreGSAFigli() {\n\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 testaReclamacao() {\n\t}", "@Test\r\n public void testNamaSupplierSudahAda() throws RemoteException, NotBoundException{\n f = new Form_Data_Supplier_Tambah(); \r\n f.setNama(\"PT HOLI PHARMACEUTICAL INDUST\"); \r\n boolean output = f.cekNamaSupplierSudahAda(); \r\n boolean target = true;\r\n assertEquals(target, output);\r\n }", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\n public void testCheckPlaceVerticaleTeteDehors() {\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 try {\n j.checkPlace(\"A50\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxStartPointInvalide);\n }\n }", "@Test\n public void sucheReihen() throws Exception {\n System.out.println(\"sucheReihen\");\n KategorieKey key = null;\n List<Reihe> expResult = null;\n List<Reihe> result = SaalHelper.sucheReihen(key);\n assertEquals(expResult, result);\n \n }", "@Test\n public void testConsultarPelaChave() throws Exception {\n System.out.println(\"consultarPelaChave\");\n String chave = \"\";\n ConfiguracaoTransferencia result = instance.consultarPelaChave(chave);\n assertNotNull(result);\n }", "@Test\n public void testeCadastrarSenhaFraca(){\n String senha3 = \"12345\";\n TestToolsCadUser.preencherEclicar(this.mNome,this.mEmail, senha3, senha3);\n TestTools.checarToast(R.string.erro_cadastro_senha_invalida_Toast);\n }", "@Test\n public void testTarkistaVastaus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n\n\n assertEquals(\"Sanan tarkastus ei toimi\", true, k.tarkistaVastaus(\"vastine\"));\n }", "@Test\n public void testGetYhteensa() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getYhteensa();\n\n assertEquals(\"Sanan tarkastus ei toimi\", 2, virheita);\n }", "public void testObtenerPalabrasClave() {\n \tString prueba = null; \n \t\tassertNull(prueba);\n }", "@Test\n public void test_distanceLinaireSurX_distanceLinaireSurX_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionY = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(2, positionY));\n pays.setPositionVille(1, new Point(3, positionY));\n pays.setPositionVille(2, new Point(4, positionY));\n pays.setPositionVille(3, new Point(5, positionY));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "@Test\n\tpublic void testResultadosEsperados() {\n\t\t\n\t\t\n\t\t\n\t\tbicicleta.darPedalada(utilidadesCiclista.getCadencia(), 75);\n\t\t\n\t\t\n\t\t//se comprueba que la velocidad sea la esperada\n\t\t\n\t\tdouble velocidadesperada = utilidadesBicicleta.velocidadDeBici(0, utilidadesCiclista.getCadencia(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t65, bicicleta.getRadiorueda(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\t\n\t\tassertEquals(\"Error: La velocidad de la bicicleta no es la correcta\", velocidadesperada, bicicleta.getVelocidad(), 2);\n\t\t\n\t\t\n\t\t//se comprueba que el espacio de la pedalada sea el esperado\n\t\t\n\t\tdouble espaciodelapedaladaesperado = utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", espaciodelapedaladaesperado, utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que la relacion de transmision sea la esperada\n\t\t\n\t\tdouble relaciondeetransmisionesperado = utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", relaciondeetransmisionesperado, utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que el recorrido lineal sea el esperado\n\t\t\n\t\tdouble recorridoLinealDeLaRuedaesperado = utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda());\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", recorridoLinealDeLaRuedaesperado, utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda()), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban las variables despues de frenar\n\t\t\n\t\tbicicleta.frenar();\n\t\t\n\t\t//se comprueba que la velocidad halla decrementado como esperamos despues de frenar\n\t\t\n\t\tdouble velocidadfrenado = utilidadesBicicleta.velocidadDeBici(0, 1, 65, bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tvelocidadfrenado = -(velocidadfrenado *0.2);\n\t\t\n\t\tdouble velocidadesperadafrenando = UtilidadesNumericas.redondear(velocidadesperada + velocidadfrenado,1);\n\n\t\tassertEquals(\"Error: La velocidad de frenado de la bicicleta no es la correcta\", velocidadesperadafrenando, UtilidadesNumericas.redondear(bicicleta.getVelocidad(),1),2);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los piñones se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarpinhonesperado = bicicleta.getPinhonactual() +1;\n\t\t\n\t\tbicicleta.incrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El incremento de piñon de la bicicleta no es la correcta\", incrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\tint decrementarpinhonesperado = bicicleta.getPinhonactual() -1;\n\t\t\t\n\t\tbicicleta.decrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los platos se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarplatoesperado = bicicleta.getPlatoactual() +1;\n\t\t\n\t\tbicicleta.incrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El incremento del plato de la bicicleta no es la correcta\", incrementarplatoesperado, bicicleta.getPlatoactual(), 2);\n\t\t\n\t\tint decrementarplatoesperado = bicicleta.getPlatoactual() -1;\n\t\t\n\t\tbicicleta.decrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarplatoesperado, bicicleta.getPlatoactual(), 0);\n\t}", "@Test\n public void test_distanceLinaireSurY_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionX = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(positionX, 2));\n pays.setPositionVille(1, new Point(positionX, 3));\n pays.setPositionVille(2, new Point(positionX, 4));\n pays.setPositionVille(3, new Point(positionX, 5));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "@Test\r\n public void testYhdista() {\r\n System.out.println(\"yhdista\");\r\n Pala toinenpala = null;\r\n Palahajautustaulu taulu = null;\r\n Pala instance = null;\r\n instance.yhdista(toinenpala, taulu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testLaskeSolmut() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n assertEquals(puu.laskeSolmut(), 2);\r\n }", "@Test\n public void testGetVastaus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n String vastaus = k.getVastaus();\n assertEquals(\"getVastaus ei toimi odoitetusti\", \"vastine\", vastaus);\n }", "@Test\n public void testGetOikein1() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vastine\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getOikein();\n// System.out.println(virheita);\n\n assertEquals(\"Oikein menneiden sanojen tarkastukset ei laske virheitä oikein\", 1, virheita);\n }", "@Test\n public void testLisaa33() { // Oluet: 33\n Oluet oluet = new Oluet(); \n Olut karjala1 = new Olut(), karjala2 = new Olut(); \n assertEquals(\"From: Oluet line: 36\", 0, oluet.getLkm()); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 37\", 1, oluet.getLkm()); \n oluet.lisaa(karjala2); assertEquals(\"From: Oluet line: 38\", 2, oluet.getLkm()); \n assertEquals(\"From: Oluet line: 39\", 2, oluet.getAlkiot()); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 40\", 3, oluet.getLkm()); \n assertEquals(\"From: Oluet line: 41\", 4, oluet.getAlkiot()); \n assertEquals(\"From: Oluet line: 42\", karjala1, oluet.tuoOlut(0)); \n assertEquals(\"From: Oluet line: 43\", karjala2, oluet.tuoOlut(1)); \n assertEquals(\"From: Oluet line: 44\", karjala1, oluet.tuoOlut(2)); \n assertEquals(\"From: Oluet line: 45\", false, oluet.tuoOlut(1) == karjala1); \n assertEquals(\"From: Oluet line: 46\", true, oluet.tuoOlut(1) == karjala2); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 47\", 4, oluet.getLkm()); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 48\", 5, oluet.getLkm()); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 49\", 6, oluet.getLkm()); \n oluet.lisaa(karjala1); assertEquals(\"From: Oluet line: 50\", 7, oluet.getLkm()); \n }", "@Test\n public void testPrimosRelativos() {\n System.out.println(\"primosRelativos\");\n int x = 0;\n int y = 0;\n boolean expResult = false;\n boolean result = utilsHill.primosRelativos(x, y);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void WertZuweisung (){\n String bez = \"Test\";\n String matGr = \"Test\";\n String zeichNr = \"Test\";\n float preis = 3;\n int ve = 1;\n try {\n Teilebestand teil = new Teilebestand();\n teil.setBezeichnung(bez);\n teil.setMaterialgruppe(matGr);\n teil.setPreis(preis);\n teil.setTyp(Teilebestand.Typ.kaufteile);\n teil.setZeichnungsnummer(zeichNr);\n teil.setVe(ve);\n \n teil.save();\n \n assertEquals(teil.getBezeichnung(), bez);\n assertEquals(teil.getMaterialgruppe(), matGr);\n assertEquals(teil.getPreis(), preis, 0.1);\n assertNotNull(preis);\n assertEquals(teil.getTyp(), Teilebestand.Typ.kaufteile);\n assertEquals(teil.getVe(), ve);\n assertNotNull(ve);\n assertEquals(teil.getZeichnungsnummer(), zeichNr);\n \n } catch (SQLException ex) {\n fail(ex.getSQLState());\n }\n \n \n \n \n }", "@Test\r\n public void testVerificaPossibilidade8() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(1);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-depois\", result);\r\n }", "@Test\n\tvoid testeContato()\n\t{\n\t\tString msg = \"Esperando obter nome completo\";\n\t\tassertEquals(\"Matheus Gaudencio\", contatoBasico.nomeCompleto(), msg);\n\t}", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "public boolean czyJestWykolejenie(){\r\n int losowy = (int) (Math.random() * 130) ;\r\n if (losowy <= szansaWykolejenia){\r\n System.out.println(\"Nastapilo wykolejenie tramwaju!\");\r\n return true;\r\n }\r\n else {\r\n System.out.println(\"Brak wykolejenia\");\r\n return false;\r\n }\r\n }", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "public void testBidu(){\n\t}", "@Test\n public void nelioMuodostuu() {\n ArrayList lista=this.tetrimino.palautaKuvio();\n assertEquals(lista.size(), 4);\n \n }", "@Test\r\n public void testVerificaPossibilidade9() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(250);\r\n usucapiao.setPrazo(2);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"possivel-agora\", result);\r\n }", "@Test\n public void testKelloAika() {\n System.out.println(\"kelloAika\");\n Peli peeli = new Peli(new Alue(3, 1));\n String tulos = peeli.kelloAika();\n assertEquals(tulos, \"00:00:00\");\n\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "@org.junit.Test\n public void testObliczOdsetkiLokataRoczna() {\n \n OdsetkiStateLokataRoczna odsetki = injector.getInstance(OdsetkiStateLokataRoczna.class);\n BigDecimal stanKonta = new BigDecimal(1000);\n BigDecimal expResult = new BigDecimal(\"20.00\");\n \n LokataRoczna lokata = injector.getInstance(LokataRoczna.class);\n \n BigDecimal result = odsetki.obliczOdsetki(stanKonta, lokata);\n\n assertEquals(expResult, result);\n }", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\r\n public void testCaso3_1() {\r\n System.out.println(\"Caso 3.1: Datos de entrada: cadena de 5 caracteres. Resultado esperado (Salida): La\\n\" +\r\n\"aplicación no permite el ingreso del dato y muestra un mensaje de error. \\n\");\r\n Ejercicio1 instance = new Ejercicio1();\r\n String expResult = \"Cadena incorrecta. La longuitud de la cadena es < 6\";\r\n String result = instance.IntroducirCadena(\"cinco\");\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void test01(){\n //Kodumuzu tamamen dinamik yapmak icin 3 dataya ihtiyacım var\n //1-locate ===> Bunları Page Class'ından obje üreterek alabilirim\n //2-Test datalari ====> Bunlar icin obje olusturmama gerek yok,\n\n //ConfigReader Class'ında hersey static oldugu icin\n //sadece Class ismi ile herseye ulabailirim\n\n driver.get(ConfigReader.getProperty(\"kr_url\"));\n\n KoalaResortLoginPage koalaResortLoginPage = new KoalaResortLoginPage(driver);\n koalaResortLoginPage.ilkLoginLink.click();\n koalaResortLoginPage.kullaniciAdi.sendKeys(ConfigReader.getProperty(\"kr_valid_username\"));\n koalaResortLoginPage.passwordTextBox.sendKeys(ConfigReader.getProperty(\"kr_valid_password\"));\n koalaResortLoginPage.loginButonu.click();\n }", "@Test\r\n public void testCalcularPosicion() {\r\n System.out.println(\"calcularPosicion\");\r\n int saltos = 41;\r\n int inicio = 8;\r\n int expResult = 11;\r\n int result = Cifrado.calcularPosicion(saltos, inicio);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testRucheAUnInsecte() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheAUnInsecte =======================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec un insecte a l'origine :\");\n instance.ajoutInsecte(reine, orig);\n assertTrue(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test avec deux insectes :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test avec trois insectes :\");\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "@Test\r\n public void testGetAnalizar() {\r\n System.out.println(\"getAnalizar\");\r\n RevisorParentesis instance = null;\r\n String expResult = \"\";\r\n String result = instance.getAnalizar();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testLecturaFrom(){\n\t\tassertEquals(esquemaEsperado.getExpresionesFrom().toString(), esquemaReal.getExpresionesFrom().toString());\n\t}", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void z_topDown_TC02() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n }" ]
[ "0.72357553", "0.71027005", "0.7090307", "0.70712197", "0.6994714", "0.69840235", "0.6983808", "0.6948967", "0.69318163", "0.690746", "0.68886006", "0.68590146", "0.6848844", "0.6834203", "0.6782526", "0.67706895", "0.6769539", "0.67547244", "0.6718854", "0.67130864", "0.66924655", "0.6688735", "0.66717994", "0.66575694", "0.66428655", "0.6633292", "0.66202766", "0.6596206", "0.6582647", "0.65819466", "0.6572501", "0.6565501", "0.65639144", "0.6550085", "0.654712", "0.65384334", "0.6530443", "0.65286624", "0.65267605", "0.6505684", "0.6499469", "0.6493139", "0.64725417", "0.647234", "0.64671314", "0.6467108", "0.64669204", "0.6461322", "0.6458093", "0.64526397", "0.64521223", "0.6448326", "0.64473224", "0.64454573", "0.6443488", "0.64365685", "0.64327824", "0.6423985", "0.64209574", "0.6414863", "0.6413115", "0.6411819", "0.64101297", "0.6408416", "0.6406041", "0.6398608", "0.6397917", "0.6397856", "0.63975585", "0.6396376", "0.6391421", "0.63778806", "0.63693327", "0.6360218", "0.63559794", "0.6352385", "0.6350601", "0.6347641", "0.6333577", "0.63305414", "0.6329939", "0.6327679", "0.63248134", "0.6320212", "0.63183695", "0.6312798", "0.6311548", "0.63061386", "0.6304389", "0.62940246", "0.6291859", "0.62902856", "0.62869275", "0.6285282", "0.6284948", "0.62841743", "0.62799376", "0.6277472", "0.6270779", "0.62656325", "0.62532175" ]
0.0
-1
Metoda koja gadja Create Order na coingateu
@RequestMapping(path="/createOrder", method = RequestMethod.POST, produces = "application/json", consumes = "application/json") public ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) { logger.info("Init payment"); SellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId()); System.out.println("ADDRESS " + sbi.getBitcoinAddress()); String token = sbi.getBitcoinAddress(); String authToken = "Bearer " + token; //trebali bismo da kreiramo transakciju koja ce biti u stanju "pending" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme //txRepo.save(tx); //RestTemplate restTemplate = new RestTemplate(); //restTemplate.getForEntity("https://google.rs", String.class); //restTemplate.getForEntity("https://api.coingate.com/v2/ping", String.class); HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", authToken); System.out.println("Amount: " + btcDTO.getAmount()); CreateOrderRequestDTO order = new CreateOrderRequestDTO("1111", btcDTO.getAmount(), "BTC", "DO_NOT_CONVERT", "Title", "Description", "https://localhost:4200/success", "https://localhost:4200/failed", "https://localhost:4200/success", "token"); ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders", HttpMethod.POST, new HttpEntity<Object>(order, headers), Object.class); logger.info(responseEntity.getBody().toString()); ObjectMapper mapper = new ObjectMapper(); mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); BitCoinResponseDTO btcResponse = new BitCoinResponseDTO(); btcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class); String paymentUrl = btcResponse.getPayment_url(); logger.info(paymentUrl); Tx tx = createTransaction(btcResponse,sbi); txRepo.save(tx); TxInfoDto txInfo = new TxInfoDto(); txInfo.setOrderId(btcDTO.getOrderId()); txInfo.setServiceWhoHandlePayment("https://localhost:8764/bitCoin"); txInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u RestTemplate restTemplate = new RestTemplate(); ResponseEntity<TxInfoDto> r = restTemplate.postForEntity("https://localhost:8111/request/updateTxAfterPaymentInit", txInfo, TxInfoDto.class); //BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString()); //BitCoinResponseDTO responseDTO = responseEntity.; //String pageToRedirec = responseDTO.getPayment_url(); //restTemplate.exchange //ResponseEntity<String> response = restTemplate.postForEntity("https://api-sandbox.coingate.com/v2/orders", btcDTO, String.class); PaymentResponseDTO responseDTO = new PaymentResponseDTO(); responseDTO.setPaymentUrl(paymentUrl); responseDTO.setPaymentId(1l); STATIC_ID = btcResponse.getId(); STATIC_TOKEN = authToken; IS_CREATE = true; //scheduleFixedDelayTask(); //scheduleFixedDelayTask(btcResponse.getId(), authToken); return new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Order order);", "@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}", "public void create(Order order) {\n order_dao.create(order);\n }", "protected abstract Order createOrder(Cuisine cuisine);", "@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}", "public Invoice createInvoice(Order order);", "private void generateAndSubmitOrder()\n {\n OrderSingle order = Factory.getInstance().createOrderSingle();\n order.setOrderType(OrderType.Limit);\n order.setPrice(BigDecimal.ONE);\n order.setQuantity(BigDecimal.TEN);\n order.setSide(Side.Buy);\n order.setInstrument(new Equity(\"METC\"));\n order.setTimeInForce(TimeInForce.GoodTillCancel);\n if(send(order)) {\n recordOrderID(order.getOrderID());\n }\n }", "public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }", "void newOrder();", "@Test\n public void testCreatePurchaseOrder() throws Exception {\n System.out.println(\"createPurchaseOrder\");\n Long factoryId = 1L;\n Long contractId = 2L;\n Double purchaseAmount = 4D;\n Long storeId = 2L;\n String destination = \"store\";\n Calendar deliveryDate = Calendar.getInstance();\n deliveryDate.set(2015, 0, 13);\n Boolean isManual = false;\n Boolean isToStore = true;\n PurchaseOrderEntity result = PurchaseOrderManagementModule.createPurchaseOrder(factoryId, contractId, purchaseAmount, storeId, destination, deliveryDate, isManual, isToStore);\n assertNotNull(result);\n }", "Order placeNewOrder(Order order, Project project, User user);", "public MOrder createTransferOrder(Integer newDocTypeID) throws Exception{\n\t\t// Crear el pedido idéntico\n\t\tMOrder newOrder = new MOrder(getCtx(), 0, get_TrxName());\n\t\tMOrder.copyValues(this, newOrder);\n\t\tnewOrder.setC_DocTypeTarget_ID(newDocTypeID);\n\t\tnewOrder.setC_DocType_ID(newDocTypeID);\n\t\t// Intercambiar el depósito y organización origen por destino \n\t\tnewOrder.setAD_Org_ID(getAD_Org_Transfer_ID());\n\t\tnewOrder.setAD_Org_Transfer_ID(getAD_Org_ID());\n\t\tnewOrder.setM_Warehouse_ID(getM_Warehouse_Transfer_ID());\n\t\tnewOrder.setM_Warehouse_Transfer_ID(getM_Warehouse_ID());\n\t\tnewOrder.setRef_Order_ID(getID());\n\t\tnewOrder.setDocStatus(DOCSTATUS_Drafted);\n\t\tnewOrder.setDocAction(DOCACTION_Complete);\n\t\tnewOrder.setProcessed(false);\n\t\t// Guardar\n\t\tif(!newOrder.save()){\n\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t}\n\t\t// Copiar las líneas\n\t\tMOrderLine newOrderLine;\n\t\tBigDecimal pendingQty;\n\t\tfor (MOrderLine orderLine : getLines(true)) {\n\t\t\tnewOrderLine = new MOrderLine(getCtx(), 0, get_TrxName());\n\t\t\tMOrderLine.copyValues(orderLine, newOrderLine);\n\t\t\tpendingQty = orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered());\n\t\t\t\n\t\t\tnewOrderLine.setC_Order_ID(newOrder.getID());\n\t\t\tnewOrderLine.setQty(pendingQty);\n\t\t\tnewOrderLine.setQtyReserved(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyInvoiced(pendingQty);\n\t\t\tnewOrderLine.setQtyDelivered(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyTransferred(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setPrice(orderLine.getPriceEntered());\n\t\t\tnewOrderLine.setRef_OrderLine_ID(orderLine.getID());\n\t\t\tnewOrderLine.setProcessed(false);\n\t\t\tnewOrderLine.setM_Warehouse_ID(newOrder.getM_Warehouse_ID());\n\t\t\tnewOrderLine.setAD_Org_ID(newOrder.getAD_Org_ID());\n\t\t\tif(!newOrderLine.save()){\n\t\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t\t}\n\t\t}\n\t\treturn newOrder;\n\t}", "@Test\n public void testOrderFactoryCreate() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n }", "@Override\r\n\tpublic void insertOrder(OrderVO vo) throws Exception {\n\t\tsqlSession.insert(namespaceOrder+\".createOrder\",vo);\r\n\t}", "@Override\n\tpublic void cr_Order(String id, String name, String dizi, String date,\n\t\t\tFloat cost, int status, int type, String serilNumber) {\n\t\tConnection lianjie = super.lianjie();\n\t\tString sql=\"insert into easybuy_order values(null,?,?,?,?,?,?,?,?)\";\n\t\tPreparedStatement pr=null;\n\t\ttry {\n\t\t\tpr=lianjie.prepareStatement(sql);\n\t\t\tpr.setString(1, id);\n\t\t\tpr.setString(2, name);\n\t\t\tpr.setString(3, dizi);\n\t\t\tpr.setString(4, date);\n\t\t\tpr.setFloat(5, cost);\n\t\t\tpr.setInt(6, status);\n\t\t\tpr.setInt(7, type);\n\t\t\tpr.setString(8, serilNumber);\n\t\t\tpr.executeUpdate();\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\tsuper.guanbi(null, pr, lianjie);\n\t}", "void createOrders(int orderNum) throws OrderBookOrderException;", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "OrderDTO create(OrderDTO orderDTO);", "public void saveOrder(Order order) {\n Client client = clientService.findBySecurityNumber(order.getClient().getSecurityNumber());\n Product product = productService.findByBarcode(order.getProduct().getBarcode());\n order.setClient(client);\n order.setProduct(product);\n if (isClientPresent(order) && isProductPresent(order)) {\n do {\n currencies = parseCurrencies();\n } while (currencies.isEmpty());\n\n generateTransactionDate(order);\n\n// Client client = ClientServiceImpl.getClientRepresentationMap().get(order.getClient());\n// Product product = ProductServiceImpl.getProductRepresentationMap().get(order.getProduct());\n convertPrice(order);\n orders.add(order);\n orderedClients.add(client);\n orderedProducts.add(product);\n }\n }", "void createOrder(List<Product> products, Customer customer);", "@GetMapping(\"/createorders\")\n\tpublic void generateOrderRequest(){\n\t\tSystem.out.println(\" == generateOrderRequest == \");\n\t\tfor(int i=0;i<150;i++) {\n\t\t\t// create new order\n\t\t\tOrderRequest order = new OrderRequest();\n\t\t\torder.setOrderReqId(\n\t\t\t\t\tInteger.parseInt(new RandomStringGenerator.Builder().withinRange('1', '9').build().generate(5))\n\t\t\t\t\t);\n\t\t\torder.setName(new RandomStringGenerator.Builder().withinRange('a', 'z').build().generate(5));\n\t\t\t// create status row for this order\n\t\t\tOrderRequestStatus orderStatus = new OrderRequestStatus();\n\t\t\torderStatus.setStatus(\"new\");\n\t\t\torderStatus.setOrderRequest(order);\n\t\t\torderStateRepository.save(orderStatus);\n\t\t}\n\t}", "NewOrderResponse newOrder(NewOrder order);", "private void createIPOOrder(final OrderBO completedOrder)\n\t{\n\t\t// YTODO Auto-generated method stub\n\t\tfinal FMIPOOrderModel order = getmodelService().create(FMIPOOrderModel.class);\n\t\torder.setCode(completedOrder.getMstrOrdNbr().trim());\n\t\torder.setBilltoparty(getAccountByNabs(completedOrder.getBillToAcct().getAccountCode()));\n\t\torder.setShiptoparty(getAccountByNabs(completedOrder.getShipToAcct().getAccountCode()));\n\t\torder.setPONumber(completedOrder.getCustPoNbr());\n\t\torder.setOrdercomments(completedOrder.getComment1() + completedOrder.getComment2() + completedOrder.getComment3());\n\t\torder.setUserFirstName(\"IPO USER\");\n\t\tgetmodelService().save(order);\n\t\tcreateIPOOrderEntry(order, completedOrder.getItemList());\n\t}", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearOrdersTest() {\r\n\r\n\t\tpd.crearOrders();\r\n\t\tpd.pm.deletePersistent(pd.o1);\r\n\t\tpd.pm.deletePersistent(pd.o2);\r\n\t\tpd.pm.deletePersistent(pd.o3);\r\n\r\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.POST)\n public ResponseEntity create(@RequestBody Order order)\n {\n throw new NotImplementedException();\n }", "Operacion createOperacion();", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}", "@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}", "public void startOrder() {\r\n this.o= new Order();\r\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}", "private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }", "OperacionColeccion createOperacionColeccion();", "public int createPurchaseOrder(PurchaseOrder purchaseOrder){\n try {\n session.save(purchaseOrder);\n tx.commit();\n } catch (Exception e) {\n e.printStackTrace();\n tx.rollback();\n return 0 ;\n }\n return 0;\n }", "@Test\n\tpublic void testOrder() {\n\t\t\n\t\tDateFormat df1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = df1 .parse(\"2021-10-15\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tshoppingCart = new ShoppingCart();\n\t\tshoppingCart.setExpiry(date);\n\t\tshoppingCart.setUserId(11491);\n\t\tshoppingCart.setItems(shoppingCartSet);\n\t\t\n\t\torder.setId(1);\n\t\torder.setShoppingCart(shoppingCart);\n\t\t\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), 1);\n\t\t\t\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addSimpleOrder(Order o) {\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n if(o.getType() == 1) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_order (`TafelID`, `DrankID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n\r\n else if(o.getType() == 0) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_order (`TafelID`, `GerechtID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n }\r\n\r\n connection.closeConnection();\r\n }", "@RequestMapping(\"/createOrder\")\n public Order createOrder(@RequestParam(\"user_id\") int user_id){\n System.out.println(\"createOrder\");\n Order order = orderService.createOrder(user_id);\n\n return order;\n }", "void prepareOrder(int orderId);", "@Test\n public void testOrderFactoryGetOrder() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n assertEquals(STAFF_NAME, orderController.getOrder(1).getStaffName());\n assertEquals(1, orderController.getOrder(1).getTableId());\n assertEquals(3, orderController.getOrder(1).getOrderedMenuItems().get(menuFactory.getMenu().getMenuItem(1)));\n }", "protected void checkIfOrdersEntityIsNullAndCreateOrders() {\n if (ordersEntity == null) {\n log.info(\"OrdersBean : Aucun Orders n'est trouvé\");\n createOrders();\n }\n }", "public static void createOrder(Staff staff) {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Creating a new order************\");\n\t\t// TODO - implement RRPSS.createOrder\n\t\tTableManager tableManager = new TableManager();\n\t\tList listOfTables = tableManager.onStartUp();\n\n\t\tOrderManager orderManager = new OrderManager();\n\t\tTable table = null;\n\t\tOrder order = null;\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\t// print the list of tables for the user to select from.\n\t\t\tfor (i = 0; i < listOfTables.size(); i++) {\n\t\t\t\ttable = (Table) listOfTables.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Table \" + table.getId()\n\t\t\t\t\t\t+ \" | Size: \" + table.getCapacity());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.print(\"Select a table to create an order: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\ttable = (Table) listOfTables.get(choice - 1);\n\n\t\t\torder = new Order();\n\t\t\torder.setStaff(staff);\n\t\t\torder.setTable(table);\n\t\t\torder.setClosed(false);\n\n\t\t\tcheck = orderManager.createOrder(order);\n\n\t\t\tif (check) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\tSystem.out.println(\"Order is created successfully!\");\n\n\t\t\t\tcheck = tableManager.updateTable(table);\n\n\t\t\t\tif (check) {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Added order to table!\");\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Failed to add order to table!\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Failed to created order!\");\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of creating new order************\");\n\t}", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public Order createOrder(WeeklyRecipe wr, User u, Date deliveryTime,\n\t\t\tint quantity) {\n\t\tem.getTransaction().begin();\n\t\tOrder order = new Order(false, null, false, deliveryTime, false,\n\t\t\t\tquantity, 0, wr, u);\n\t\tem.persist(order);\n\t\tem.getTransaction().commit();\n\t\treturn order;\n\t}", "public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}", "@Override\n public boolean createPurchaseOrder(PurchaseOrderBean purchaseorder) {\n purchaseorder.setGendate(C_Util_Date.generateDate());\n return in_purchaseorderdao.createPurchaseOrder(purchaseorder);\n }", "public static Product[] createOrder()\n {\n Order order = new Order();\n Random r = new Random();\n int x;\n order.orderNumber++;\n int itemCount = 1 + r.nextInt(50);\n order.orderContents = new Product[itemCount];\n for (x = 0 ; x < itemCount; x++){\n Product item = productMaker.generateProduct();\n order.orderContents[x] = item;\n }\n\n return order.orderContents;\n\n }", "public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }", "public void buildOrders() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT\"\n + \" EXISTS orders (id TEXT, orderer_id TEXT, deliverer_id TEXT,\"\n + \" pickup_time REAL, dropoff_time REAL, pickup_location TEXT,\"\n + \" dropoff_location TEXT, price REAL, pickup_phone TEXT,\"\n + \" PRIMARY KEY (id),\" + \" FOREIGN KEY (orderer_id)\"\n + \" REFERENCES users(id), FOREIGN KEY (deliverer_id) REFERENCES\"\n + \" users(id), FOREIGN KEY (pickup_location) REFERENCES\"\n + \" locations(id),\"\n + \" FOREIGN KEY (dropoff_location) REFERENCES locations(id)\"\n + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public Order() {\n\t}", "public Order() {\n }", "@Override\n public boolean createOrderForm(OrderFormBean orderform) {\n\n return in_orderformdao.createOrderForm(orderform);\n }", "Order sendNotificationNewOrder(Order order);", "@Override\n public boolean createSalesOrder(SalesOrderBean salesoder) {\n salesoder.setGendate(C_Util_Date.generateDate());\n return in_salesorderdao.createSalesOrder(salesoder);\n }", "@Test\n public void testValidateNewOrderProduct() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderProduct(order3));\n }", "public Map<String, String> createOrder(boolean debug) throws IOException {\n Map<String, String> map = new HashMap<>();\n OrdersCreateRequest request = new OrdersCreateRequest();\n request.prefer(\"return=representation\");\n request.requestBody(buildRequestBody());\n //3. Call PayPal to set up a transaction\n HttpResponse<Order> response = client().execute(request);\n System.out.println(\"Response: \" + response.toString());\n // if (true) {\n if (response.statusCode() == 201) {\n System.out.println(\"Status Code: \" + response.statusCode());\n System.out.println(\"Status: \" + response.result().status());\n System.out.println(\"Order ID: \" + response.result().id());\n System.out.println(\"Intent: \" + response.result().intent());\n System.out.println(\"Links: \");\n for (LinkDescription link : response.result().links()) {\n System.out.println(\"\\t\" + link.rel() + \": \" + link.href() + \"\\tCall Type: \" + link.method());\n }\n System.out.println(\"Total Amount: \" + response.result().purchaseUnits().get(0).amount().currencyCode()\n + \" \" + response.result().purchaseUnits().get(0).amount().value());\n\n\n map.put(\"statusCode\" , response.statusCode()+\"\");\n map.put(\"status\" , response.result().status());\n map.put(\"orderID\" , response.result().id());\n\n //return response.result().id();\n } else {\n System.out.println(\"Response: \" + response.toString());\n map.put(\"Reponse\",response.toString());\n //return response.toString();\n }\n\n return map;\n //}\n }", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}", "private void createOrder(Shop shop, FileManager fileManager, ArrayList<Tool> toolList,\n ArrayList<Integer> quantityList) {\n if (toolList.size() != 0) {\n if (shop.createOrderOrAppendOrder(shop, toolList, quantityList, fileManager)) {\n System.out.println(\"Successfully added and/or appended order to orders.txt!\");\n } else {\n System.out.println(\"ERROR: Could not edit orders.txt.\");\n }\n }\n }", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "@Test\n public void testCreateOrderCalculations() throws Exception {\n\n service.loadFiles();\n \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.calculateNewOrderDataInput(newOrder);\n\n Assert.assertEquals(newOrder.getMaterialCostTotal(), (new BigDecimal(\"1199.95\")));\n Assert.assertEquals(newOrder.getLaborCost(), (new BigDecimal(\"1106.75\")));\n Assert.assertEquals(newOrder.getTax(), (new BigDecimal(\"144.17\")));\n Assert.assertEquals(newOrder.getTotal(), (new BigDecimal(\"2450.87\")));\n\n }", "@Test\n public void createOrder() {\n IngredientDTO ig1 = new IngredientDTO(\"Onion\",\"onion\",2L,null);\n\n IngredientDTO ig2 = new IngredientDTO(\"Chicken\",\"chicken\",2L,null);\n IngredientDTO ig3 = new IngredientDTO(\"Bacon\",\"chicken\",2L,null);\n\n OrderDataDTO orderDataDTO = new OrderDataDTO(TestDataProviders.NAME_1,TestDataProviders.STREET,TestDataProviders.ZIP_CODE,TestDataProviders.COUNTRY,TestDataProviders.TEST_EMAIL_1,DeliveryMethod.FASTEST);\n\n\n BurgerDTO burgerDTO = new BurgerDTO(new HashSet<>(Arrays.asList(ig1,ig2,ig3)),TestDataProviders.PRICE);\n OrderDTO inputDTO = new OrderDTO(null,burgerDTO,orderDataDTO,null,false);\n\n Optional<User> optionalUser = Optional.of(user);\n when(userRepository.findByUsername(any(String.class))).thenReturn(optionalUser);\n\n //when\n when(orderRepository.save(any(Order.class))).thenReturn(order);\n\n OrderDTO result = underTest.createOrder(inputDTO,\"user1\");\n\n verify(userRepository).findByUsername(anyString());\n assertEquals(inputDTO.getArchived(),result.getArchived());\n assertThat(result.getUserId(),is(1L));\n assertEquals(inputDTO.getBurger().getIngredients().size(),result.getBurger().getIngredients().size());\n// assertThat(result.getOrderData().getCountry(),TestDataProviders.COUNTRY);\n\n }", "public void addOrder(Order o) throws SQLException\r\n {\r\n String sqlQuery = \r\n \"INSERT INTO orders (custname, tablenumber, foodname, beveragename, served, billed) VALUES (\" +\r\n \"'\" + o.getCustomerName() + \"', \" + \r\n o.getTable() + \", \" + \r\n \"'\" + o.getFood() + \"', \" +\r\n \"'\" + o.getBeverage() + \"', \" + \r\n o.isServed() + \", \" +\r\n o.isBilled() + \")\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }", "@PostMapping(\"/add-order\")\n\tpublic ResponseEntity<Object> insertOrder(@RequestBody Order order) {\n\t\tLOGGER.info(\"add-Order URL is opened\");\n\t\tLOGGER.info(\"addOrder() is initiated\");\n\t\tOrderDTO orderDTO = null;\n\t\tResponseEntity<Object> orderResponse = null;\n\t\torderDTO = orderService.addOrder(order);\n\t\torderResponse = new ResponseEntity<>(orderDTO, HttpStatus.ACCEPTED);\n\t\tLOGGER.info(\"addOrder() has executed\");\n\t\treturn orderResponse;\n\t}", "static void addOrder(orders orders) {\n }", "@Override\n\t\tprotected String doInBackground(String... params)\n\t\t{\n\n\t\t\tint id = mDatabaseService.createOrder(Utils.getCurrentDateTime(), \"\"+tableId, \"1\");\n\t\t\tLog.d(TAG, \"order created id:\" + id);\n\t\t\treturn \"\" + id;\n\t\t}", "public void setOrder(Order order){\n this.order = order;\n }", "@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }", "@Transactional(propagation=Propagation.REQUIRES_NEW)\r\n\tpublic void createError(){\r\n\t\tOrder newOrder = new Order( );\r\n\t\tnewOrder.setDescription(\"Service layer added \"+Calendar.getInstance().getTime());\r\n\t\tspringOrderDao.errorSave(newOrder);\r\n\t}", "public void addOrder(Order order) {\n\t\tPreparedStatement addSQL = null;\n\t\tSystem.out.println(\"Creating order..\");\n\t\ttry {\n\n\t\t\taddSQL = getConnection()\n\t\t\t\t\t.prepareStatement(\"INSERT INTO orders(code, name, quantity) values(?,?,?);\",\n\t\t\t\t\t\t\tStatement.RETURN_GENERATED_KEYS);\n\n\t\t\taddSQL.setInt(1, order.getCode());\n\t\t\taddSQL.setString(2, order.getName());\n\t\t\taddSQL.setInt(3, order.getQuantity());\n\n\t\t\tint rows = addSQL.executeUpdate();\n\n\t\t\tif (rows == 0) {\n\t\t\t\tSystem.out.println(\"Failed to insert order into database\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedID = addSQL.getGeneratedKeys()) {\n\t\t\t\tif (generatedID.next()) {\n\t\t\t\t\torder.setID(generatedID.getInt(1));\n\t\t\t\t\tSystem.out.println(\"Order created with id: \" + order.getID());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Failed to create order.\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (addSQL != null) {\n\t\t\t\ttry {\n\t\t\t\t\taddSQL.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Order() {\n orderID = \"\";\n customerID = \"\";\n status = \"\";\n }", "private Order convertOrderElemeToOrderObj04(ISqlAdapter adapter, String orderId) throws HitspException {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n DataTable dtOrderEleme = getOrderElemeInfo(adapter, orderId);\r\n if (dtOrderEleme == null || dtOrderEleme.size() == 0) {\r\n return null;\r\n }\r\n\r\n Order order = new Order();\r\n if (!Converter.toBoolean(dtOrderEleme.get(0, \"book\"))) {\r\n //若该订单非预订单\r\n order.setDeliverTime(null);\r\n } else {\r\n //若该订单为预订单\r\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+8\"));\r\n// Date b = formatter.parse(a);\r\n// order.setDeliverTime(Converter.toDate(dtOrderEleme.get(0, \"deliverTime\")));\r\n try {\r\n order.setDeliverTime(formatter.parse(dtOrderEleme.get(0, \"deliverTime\")));\r\n } catch (ParseException e) {\r\n logger.error(\"预计送达时间处理错误\");\r\n }\r\n }\r\n order.setOrderId(dtOrderEleme.get(0, \"orderId\"));\r\n order.setId(Converter.toLong(orderId));\r\n\r\n String udate = dtOrderEleme.get(0, \"activeAt\");\r\n String cdate = dtOrderEleme.get(0, \"createdAt\");\r\n try {\r\n Date uDate = df.parse(udate);\r\n Date cDate = df.parse(cdate);\r\n order.setGmtCreate(cDate);\r\n order.setGmtModify(uDate);\r\n } catch (ParseException e) {\r\n logger.error(\"下单时间处理错误\");\r\n }\r\n\r\n order.setOrderFrom(\"15\");\r\n order.setTotalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"totalPrice\")));\r\n order.setOriginalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"originalPrice\")));\r\n order.setStatus(\"0\");\r\n String elemeShopId = dtOrderEleme.get(0, \"shopId\");\r\n DataTable dtShop = getShopInfoByElemeShopId(adapter, elemeShopId);\r\n if (dtShop == null || dtShop.size() == 0) {\r\n logger.error(\"饿了么({})门店不存在\", elemeShopId);\r\n return null;\r\n }\r\n\r\n order.setShopId(dtShop.get(0, \"id\"));\r\n order.setShopName(dtShop.get(0, \"name\"));\r\n// order.setShopAddress(dtOrderEleme.get(0, \"address\"));\r\n order.setShopAddress(\"\");//饿了么推送订单中无门店地址,暂置为空\r\n order.setShopPhone(null);\r\n order.setRecipientName(dtOrderEleme.get(0, \"consignee\"));\r\n order.setRecipientAddress(dtOrderEleme.get(0, \"deliveryPoiAddress\"));\r\n\r\n StringBuilder phones = new StringBuilder();\r\n JSONArray phoneList = JSON.parseArray(dtOrderEleme.get(0, \"phoneList\"));\r\n if (phoneList != null) {\r\n for (int i = 0; i < phoneList.size(); i++) {\r\n String phone = phoneList.getString(i);\r\n if (i != 0) {\r\n phones.append(\";\");\r\n }\r\n phones.append(phone);\r\n }\r\n }\r\n order.setRecipientPhone(phones.toString());\r\n\r\n order.setRecipientLongitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[0]));\r\n order.setRecipientLatitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[1]));\r\n order.setShippingType(\"10\");\r\n order.setShippingFee(dtOrderEleme.get(0, \"deliverFee\") == null ? BigDecimal.valueOf(0) : Converter.toBigDecimal(dtOrderEleme.get(0, \"deliverFee\")));\r\n order.setShipperName(null);\r\n order.setShipperPhone(null);\r\n order.setHasInvoiced(Converter.toBoolean(dtOrderEleme.get(0, \"invoiced\")));\r\n order.setInvoiceTitle(dtOrderEleme.get(0, \"invoice\"));\r\n order.setPackageFee(Converter.toBigDecimal(dtOrderEleme.get(0, \"packageFee\")));\r\n order.setPayType(Converter.toBoolean(dtOrderEleme.get(0, \"onlinePaid\")) == false ? \"1\" : \"2\");\r\n order.setCaution(dtOrderEleme.get(0, \"description\"));\r\n order.setRemark(\"\");\r\n BigDecimal shopPart = Converter.toBigDecimal(dtOrderEleme.get(0, \"shopPart\"));\r\n if (shopPart.signum() == -1) {\r\n shopPart = shopPart.abs();\r\n }\r\n order.setShopPart(shopPart);\r\n order.setShopIncome(Converter.toBigDecimal(dtOrderEleme.get(0, \"income\")));\r\n BigDecimal serviceFee = Converter.toBigDecimal(dtOrderEleme.get(0, \"serviceFee\"));\r\n if (serviceFee.signum() == -1) {\r\n serviceFee = serviceFee.abs();\r\n }\r\n order.setServiceFee(serviceFee);\r\n// List<OrderDetail> detailList = convertOrderElemeToOrderDetailList(adapter, dtOrderEleme);\r\n List<OrderDetail> detailList = convertOrderElemeToOrderDetailList04(adapter, dtOrderEleme, dtShop.get(0, \"id\"));\r\n order.setDetail(detailList);\r\n return order;\r\n }", "@Test\n public void testAddOrd() {\n System.out.println(\"addOrd\");\n Criteria ctr = null;\n String orderProp = \"\";\n EDirecaoOrdenacao orderDir = null;\n ClassificacaoTributariaDAO instance = new ClassificacaoTributariaDAO();\n instance.addOrd(ctr, orderProp, orderDir);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }", "public void saveDate(View view) {\n// create an object of order\n Order order = new Order(name, Integer.parseInt(price));\n dbHandler.addOrder(order);\n Toast.makeText(getApplicationContext(), \"Hooray! Data Saved in DB\", Toast.LENGTH_SHORT).show();\n }", "public void createInvoice() {\n\t}", "@Override\n public Order createOrder(int stockId, int partyId, int userId, boolean isBuy, BigDecimal price, int size) throws\n InvalidEntityException,\n MissingEntityException,\n IOException {\n Stock stock = stockDao.getStockById(stockId).get();\n User user = userDao.getUserById(userId).get();\n Party party = partyDao.getPartyById(partyId).get();\n LocalDateTime versionTime = LocalDateTime.now();\n Order order = new Order(user, party, stock, price, size, isBuy, PENDING, versionTime);\n order = orderDao.createOrder(order);\n auditDao.writeMessage(\"Add Order: \" + order.getId() + \" to Repository, userId: \" + userId);\n // sets status\n matchOrder(order);\n if (order.getStatus() == PENDING) {\n order.setStatus(ACTIVE);\n orderDao.editOrder(order);\n }\n return order;\n }", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);", "@RequestMapping(\"/order/{cartId}\")\r\n public String createOrder(@PathVariable(\"cartId\") int cartId) {\r\n \tSystem.out.println(\"in order\");\r\n \tUserOrder userOrder = new UserOrder();\r\n Cart cart=cartService.getCartById(cartId);\r\n userOrder.setCart(cart);\r\n\r\n UsersDetail usersDetail = cart.getUsersDetail();\r\n userOrder.setUsersDetail(usersDetail);\r\n userOrder.setBillingAddress(usersDetail.getBillingAddress());\r\n //userOrder.setShippingAddress(usersDetail.getShippingAddress());\r\n\r\n orderService.addOrder(userOrder);\r\n\r\n return \"redirect:/checkout?cartId=\"+cartId;\r\n }", "@RequestMapping(value =\"/customer/buy_now\", method = RequestMethod.POST)\n public String initiateOrder(@RequestParam(\"pcode\") String code,Order order, ModelMap model) {\n logger.info(\"*** OrderController - initiateOrder ***\");\n String username = \"BookMan\";\n Product product = productService.getProduct(code);\n order.setProduct(product);\n order.setStatus(\"initiated\");\n order.setCustomerName(username);\n order.setOrderDate(new Date());\n order.setBill(order.getQuantity()*product.getPrice());\n Order orderInserted = orderService.newOrder(order);\n model.addAttribute(\"order\",orderInserted);\n return \"customer_shipping_details\";\n }", "Delivery createDelivery();", "@Override\n\tpublic boolean addOrder(OrderDO orderDO) {\n\t\treturn false;\n\t}", "public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }", "int newOrder(OrderBean newOrder);", "@POST\n @Consumes(\"application/json\")\n public Response createPO(PurchaseOrderEJBDTO po) {\n int pono = pfb.addPO(po);\n URI uri = context.getAbsolutePath();\n return Response.created(uri).entity(pono).build();\n }", "public int addOrder(Order order, int diff) throws Exception, SQLException {\n PreparedStatement ps = conn.prepareStatement(\"insert into orders(status, cid, total, createdate) values(?,?,?,NOW())\", Statement.RETURN_GENERATED_KEYS);\n ps.setInt(1, order.getStatus());\n ps.setInt(2, order.getCid());\n ps.setFloat(3, order.getTotal());\n //ps.setInt(4, diff);\n int rows = ps.executeUpdate();\n if (rows == 1) {\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n ps = conn.prepareStatement(\"update orders set shipdate = DATE_ADD(NOW(), INTERVAL ? HOUR) where oid = ?\");\n ps.setInt(1, diff);\n ps.setInt(2, rs.getInt(1));\n ps.executeUpdate();\n return rs.getInt(1);\n }\n throw new Exception(\"order id mismatch\");\n }", "@Override\n\tpublic int insertOrderTrading(Order_TradingVO otvo) {\n\t\treturn sql.insert(\"insertOrderTrading\", otvo);\n\t}", "public boolean makeOrder(Long clientId, Long orderedMedicineId, Long orderedMedicinesCount)\n\t\t\tthrows ServiceException {\n\t\ttry (DaoCreator daoCreator = new DaoCreator()) {\n\t\t\ttry {\n\t\t\t\tMedicineDao medicineDao = daoCreator.getMedicineDao();\n\t\t\t\tboolean prescriptionNeeded = medicineDao.getPrescriptionInfoFromMedicineById(orderedMedicineId);\n\t\t\t\tif (prescriptionNeeded) {\n\t\t\t\t\tLocalDate nowDate = LocalDate.now();\n\t\t\t\t\tDate actualDate = Date.valueOf(nowDate);\n\t\t\t\t\tPrescriptionDao prescriptionDao = daoCreator.getPrescriptionDao();\n\t\t\t\t\tList<OrderPrescriptionInfo> prescriptionDtoList = prescriptionDao\n\t\t\t\t\t\t\t.getPrescriptionsForOrdersValidation(clientId, orderedMedicineId, actualDate);\n\t\t\t\t\tboolean isEmptyList = prescriptionDtoList == null;\n\t\t\t\t\tif (isEmptyList) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdaoCreator.startTransaction();\n\t\t\t\tOrderDao orderDao = daoCreator.getOrderDao();\n\t\t\t\tOrder newOrder = createOrder(clientId);\n\t\t\t\tOrder madedOrder = orderDao.insert(newOrder);\n\n\t\t\t\tOrderMedicine newOrderMedicine = new OrderMedicine();\n\t\t\t\tnewOrderMedicine.setMedicineId(orderedMedicineId);\n\t\t\t\tLong orderId = madedOrder.getId();\n\t\t\t\tnewOrderMedicine.setOrderId(orderId);\n\t\t\t\tnewOrderMedicine.setCount(orderedMedicinesCount);\n\n\t\t\t\tOrderMedicineDao orderMedicineDao = daoCreator.getOrderMedicineDao();\n\t\t\t\torderMedicineDao.insert(newOrderMedicine);\n\t\t\t\tdaoCreator.commitTransaction();\n\t\t\t\treturn true;\n\t\t\t} catch (DaoException e) {\n\t\t\t\tdaoCreator.rollbackTransaction();\n\t\t\t\tthrow new ServiceException(\"Can't end transaction and make new order!\", e);\n\t\t\t}\n\t\t} catch (ConnectionException | SQLException e) {\n\t\t\tthrow new ServiceException(\"Can't make new order!\", e);\n\t\t}\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "Order getOrder();", "public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }" ]
[ "0.7752912", "0.71624124", "0.70904136", "0.70179087", "0.69460696", "0.69346756", "0.69308794", "0.6921919", "0.69210726", "0.6907669", "0.6832976", "0.68303335", "0.6826795", "0.6801275", "0.6769019", "0.6762509", "0.67043394", "0.67024493", "0.6702062", "0.66949016", "0.66692454", "0.6664443", "0.6655364", "0.6628116", "0.6602819", "0.6596489", "0.6574763", "0.65166175", "0.6516224", "0.6436078", "0.64327", "0.6419907", "0.6413818", "0.6404039", "0.64034337", "0.6397576", "0.6391133", "0.63835245", "0.6382124", "0.636918", "0.6364935", "0.63648033", "0.6338401", "0.6335698", "0.6310529", "0.63087684", "0.63069665", "0.6292235", "0.6260182", "0.625956", "0.6239559", "0.6228718", "0.6221391", "0.6206204", "0.62053686", "0.61964625", "0.61939", "0.6193213", "0.6190557", "0.61719614", "0.6164905", "0.6161004", "0.61523384", "0.6147163", "0.61412895", "0.6141274", "0.6141221", "0.61394787", "0.61313254", "0.6129756", "0.61228544", "0.61187726", "0.61174923", "0.61098254", "0.610703", "0.6101996", "0.60981655", "0.60981077", "0.60885423", "0.6083397", "0.6080469", "0.60800356", "0.6073797", "0.60634774", "0.60630643", "0.6037884", "0.6027615", "0.6019488", "0.60086566", "0.6005622", "0.60040253", "0.59990853", "0.5992201", "0.5988893", "0.598439", "0.5982075", "0.59787583", "0.5977781", "0.59767944", "0.5963666" ]
0.6389261
37
/ Kreiranje transakcije na bekendu u momentu kad korisnik kreira
private Tx createTransaction(BitCoinResponseDTO btcDTO, SellerBitcoinInfo sbi) { Tx tx = new Tx(); tx.setDate(new Date()); tx.setAmountOfMoney(btcDTO.getPrice_amount()); tx.setStatus(TxStatus.PENDING); tx.setRecieverAddress(btcDTO.getPayment_url()); tx.setorder_id(btcDTO.getId()); //ovaj id je na coin gate-u i moram ga cuvati u transakciji tx.setTxDescription("Porudzbina je kreirana od strane korisnika"); tx.setSbi(sbi); //trebace ovde jos da se setuje id korisnika koji je kreirao porudzbinu kako bi kasnije mogao da getuje sve //njegove transakcije return tx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public transaksi() {\n initComponents();\n judul();\n tampildata();\n judulbarang();\n tampilbarang();\n reset();\n autokode();\n total();\n lkembali.setText(\"Rp. 0\");\n bcek.requestFocus();\n ltgl.setText(hari); \n bhapus.setVisible(false);\n bedit.setVisible(false);\n bbeli.setVisible(true);\n breset.setVisible(true);\n }", "@Transactional\r\n\tpublic String aktiviraj(Long id) {\n\r\n\t\tClanPaket clpak = clanPaketDao.findById(id).get();\r\n\t\tif (clpak.getIstice() == null) {\r\n\t\t\t// long sad = System.currentTimeMillis();\r\n\t\t\tDate pp = new java.util.Date();\r\n\t\t\tInstant instant = pp.toInstant();\r\n\r\n\t\t\t// 1 sat =3600*1000milisec. ovde vreme u minutama cuvamo\r\n\t\t\t// String output = instantHourLater.toString();\r\n\r\n\t\t\tInteger istice = clpak.getPaket().getTrajanje();\r\n\t\t\tDuration duration = Duration.ofMinutes(istice);\r\n\t\t\tInstant kasnije = instant.plus(duration);\r\n\t\t\tDate enddat = Date.from(kasnije);\r\n\t\t\tclpak.setIstice(enddat);\r\n\t\t\t// mozda vratiti poruku aktivirano\r\n\t\t\tclanPaketDao.saveAndFlush(clpak);\r\n\t\t\treturn \"Aktiviran paket\";\r\n\t\t} else {\r\n\t\t\treturn \"Paket sa tim brojem je vec aktiviran.Zvacu policiju\";\r\n\r\n\t\t}\r\n\r\n\t}", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "public void denda()\n {\n transaksi.setDenda(true);\n }", "public String doPayy(Expence expence, BankRunning bankRunning, User user)\r\n/* 89: */ {\r\n/* 90: 86 */ String result = \"\";\r\n/* 91: 87 */ Expence persistent = (Expence)this.expenceDao.load(expence.getId());\r\n/* 92: 88 */ if ((\"3\".equals(persistent.getStat())) || (persistent.getStat() == \"3\")) {\r\n/* 93: 89 */ return result = \"[id=\" + persistent.getId() + \", \" + persistent.getStat() + \"]该项数据已经审批!\";\r\n/* 94: */ }\r\n/* 95: 92 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 96: 93 */ expenceFlow.setGxsj(new Date());\r\n/* 97: 94 */ expenceFlow.setExpence(expence);\r\n/* 98: 95 */ expenceFlow.setUser(user);\r\n/* 99: 96 */ expenceFlow.setOptContent(\"审批\");\r\n/* 100: 97 */ expenceFlow.setYwlc(Integer.valueOf(3));\r\n/* 101: 98 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 102: */ \r\n/* 103: */ \r\n/* 104:101 */ BeanUtils.copyProperties(expence, persistent, new String[] { \"id\", \"user\", \"bxsj\", \"fssj\", \"bxnr\", \"bxje\", \"bxr\", \"skzh\", \"bxlx\" });\r\n/* 105:102 */ persistent.setGxr(user.getName());\r\n/* 106:103 */ persistent.setGxsj(new Date());\r\n/* 107:104 */ persistent.setStat(\"3\");\r\n/* 108:108 */ if (bankRunning != null)\r\n/* 109: */ {\r\n/* 110:110 */ bankRunning.setZcje(Double.parseDouble(bankRunning.getFkje()));\r\n/* 111:111 */ bankRunning.setLrje(0.0D - Double.parseDouble(bankRunning.getFkje()));\r\n/* 112:112 */ bankRunning.setLrsj(new Date());\r\n/* 113:113 */ bankRunning.setLrr(user.getName());\r\n/* 114:114 */ bankRunning.setShbj(\"1\");\r\n/* 115:115 */ bankRunning.setOrderId(expenceFlow.getId().toString());\r\n/* 116:116 */ bankRunning.setBz(expenceFlow.getOptContent());\r\n/* 117:117 */ Integer b_r_id = (Integer)this.bankRunningService.save(bankRunning);\r\n/* 118: */ \r\n/* 119:119 */ persistent.setBankRunningId(b_r_id);\r\n/* 120:120 */ this.expenceDao.update(persistent);\r\n/* 121: */ \r\n/* 122:122 */ Bank b = (Bank)this.bankService.get(bankRunning.getBank().getId());\r\n/* 123:123 */ double cush = new Double(b.getCush() + bankRunning.getLrje()).doubleValue();\r\n/* 124:124 */ this.bankService.updateBankCush(cush, Integer.valueOf(bankRunning.getBank().getId().intValue()));\r\n/* 125: */ }\r\n/* 126:126 */ return result;\r\n/* 127: */ }", "public IBankTransfert payment();", "public static void recargarWallet(Wallet w, int recarga) {\n boolean realizada = true;\n Connection conexion = null;\n try {\n conexion = Conexion.getConnection();\n if (conexion.getAutoCommit()) {\n conexion.setAutoCommit(false);\n }\n\n //actualizar datos del wallet\n WalletDAO daow = new WalletDAO(conexion);\n w.setSaldo(w.getSaldo() + recarga);\n daow.update(w);\n\n //comprobar que estamos en la fecha correcta\n int dia = Integer.parseInt((new SimpleDateFormat(\"dd\")).format(new java.util.Date()));\n if (dia > 5) {\n conexion.rollback();\n System.out.println(\"Rollback: No puede hacer la recarga, fuera de fecha.\");\n realizada = false;\n }\n conexion.commit();\n conexion.close();\n } catch (SQLException e) {\n if (conexion != null) {\n try {\n conexion.rollback();\n System.out.println(\"Rollback: \" + e.getMessage());\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"Error al hacer el rollback\");\n }\n }\n realizada = false;\n }\n if (realizada) {\n System.out.println(\"Gracias por su recarga.\");\n }\n }", "@Transactional\n public void transfer(Rekening asal, Rekening tujuan, BigDecimal nilai, String keterangan) {\n logTransaksiService.logTransferMulai(asal, tujuan, nilai);\n\n // cek saldo\n if (asal.getSaldo().compareTo(nilai) < 0) {\n throw new IllegalStateException(\"Saldo tidak cukup\");\n }\n\n // kurangi saldo pengirim\n asal.setSaldo(asal.getSaldo().subtract(nilai));\n rekeningDao.save(asal);\n\n // mutasi rekening pengirim\n Mutasi mutasiPengirim = new Mutasi();\n mutasiPengirim.setKeterangan(\"transfer ke \"+tujuan.getNomor());\n mutasiPengirim.setRekening(asal);\n mutasiPengirim.setNilai(nilai.multiply(new BigDecimal(-1)));\n mutasiDao.save(mutasiPengirim);\n\n // mutasi rekening penerima\n Mutasi mutasiPenerima = new Mutasi();\n mutasiPenerima.setKeterangan(\"transfer dari \"+asal.getNomor());\n mutasiPenerima.setRekening(tujuan);\n mutasiPenerima.setNilai(nilai);\n mutasiDao.save(mutasiPenerima);\n\n // tambah saldo penerima\n tujuan.setSaldo(tujuan.getSaldo().add(nilai));\n rekeningDao.save(tujuan);\n\n // log sukses transaksi\n logTransaksiService.logTransferSukses(asal, tujuan, nilai);\n }", "@Transactional\n public String transferMoney(Integer destCardId, double amount, HttpServletRequest r) {\n Card toCard = cardService.getCard(destCardId);\n double currentAmount = currentCard.getAmount();\n JSONObject json = new JSONObject();\n if (currentAmount < amount) {\n try {\n json.put(\"sucess\", false);\n json.put(\"result\", \"Недостаточно средств.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n } else {\n currentCard.setAmount(currentAmount - amount);\n double newAmount = converter.convert(currentCard.getCurrency(), toCard.getCurrency(), amount);\n toCard.setAmount(toCard.getAmount() + newAmount);\n Invoice invoice = currentCard.createInvoice();\n invoice.setToCard(destCardId);\n invoice.setAmount(newAmount);\n String date = new SimpleDateFormat(\"dd.MM.yyyy-hh.mm-a\").format(GregorianCalendar.getInstance().getTime());\n invoice.setDate(date);\n invoice.setCurrency(toCard.getCurrency());\n invoiceService.addInvoice(invoice);\n try {\n json.put(\"sucess\", true);\n json.put(\"result\", \"Успешно.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }\n cardService.update(currentCard);\n r.getSession().setAttribute(\"Card\", currentCard);\n cardService.update(toCard);\n return json.toString();\n }", "BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);", "public void transact() {\n\t\truPay.transact();\n\n\t}", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public boolean depositarB(Double monto) {\n if(paractual.cuentaB.getEstado() == \"Activo\" && paractual.cuentaA.getSaldo() > 0) {\n // Pasamos saldo a B\n paractual.setSaldoB(paractual.cuentaB.getSaldo() + monto);\n return true;\n }\n return false;\n }", "public void InitializeBalance(BigDecimal valor){\n \r\n ChekingAccount chekAc=pRepository.GetChekingAccount();\r\n chekAc.setSaldoInicial(valor);\r\n pRepository.SaveChekingAccount(chekAc);\r\n \r\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "@Override\n public boolean update(Transaksi transaksi) {\n try {\n String query = \"UPDATE transaksi SET tgl_transaksi=? WHERE id=?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getTglTransaksi());\n ps.setString(2, transaksi.getId());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public beli_kredit() {\n initComponents();\n koneksitoko();\n }", "public void autoPay() {}", "public boolean doTransaction() {\r\n int nonce = -1;\r\n TransactionOperation transactionOperation = null;\r\n try {\r\n double balance;\r\n \r\n //read the stream for requests from client\r\n byte[] cipherText = (byte [])is.readObject();\r\n \r\n // decrypt the ciphertext to obtain the signed message\r\n ATMSessionMessage atmSessionMessage = (ATMSessionMessage) crypto.decryptRijndael(cipherText, kSession);\r\n if(!(currTimeStamp < atmSessionMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n \r\n //interpret the transaction operation in the request\r\n SignedMessage signedMessage = atmSessionMessage.getSignedMessage();\r\n \r\n \r\n \t\t//verify signature\r\n \t\ttry {\r\n \t\t\tif(!crypto.verify(signedMessage.msg, signedMessage.signature, currAcct.kPub))\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"Digital signature failed...\");\r\n \t\t\t}\r\n \t\t\tSystem.out.println(\"Message signature valid...\");\r\n \t\t} catch (SignatureException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t} catch (KeyException e2) {\r\n \t\t\te2.printStackTrace();\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n TransactionMessage transactionMessage = (TransactionMessage)signedMessage.getObject();\r\n transactionOperation = transactionMessage.getOperation();\r\n \r\n //print the signed message\r\n System.out.println(\"\\n\" + (new Date()).toString());\r\n System.out.println(signedMessage.toString());\r\n \r\n //strip out the parameters embedded \r\n nonce = atmSessionMessage.getNonce();\r\n double value = transactionMessage.getValue();\r\n \r\n //print the timestamp when the transaction takes place\r\n Date now = new Date();\r\n System.out.println(\"\\n\" + now.toString());\r\n \r\n //re-route the request to the appropriate handling function\r\n if(transactionOperation == TransactionOperation.Deposit) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" DEPOSIT: \" + value);\r\n currAcct.deposit(value);\r\n \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Deposit Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.Withdraw) {\r\n \t System.out.println(\"ACCT #:\" + currAcct.getNumber() + \" WITHDRAW: \" + value);\r\n \t currAcct.withdraw(value);\r\n \t \r\n System.out.println(\"\\n\" + (now).toString());\r\n System.out.println(\"Withdrawal Complete. BALANCE:\" + currAcct.getBalance());\r\n }\r\n else if(transactionOperation == TransactionOperation.EndSession) \r\n \t {\r\n \t \tSystem.out.println(\"\\nTerminating session with ACCT#: \" + currAcct.getNumber());\r\n \t \treturn false;\r\n \t \t\r\n \t }\r\n \r\n accts.save();\r\n //create a successful reply Success and set the balance\r\n balance = currAcct.getBalance(); \r\n transactionMessage = new TransactionMessage(MessageType.ResponseSuccess,transactionOperation,balance);\r\n atmSessionMessage = new ATMSessionMessage(transactionMessage);\r\n \r\n //set the nonce \r\n atmSessionMessage.setNonce(nonce);\r\n currTimeStamp = atmSessionMessage.getTimeStamp();\r\n //encrypt the response and send it\r\n cipherText = crypto.encryptRijndael(atmSessionMessage, kSession);\r\n os.writeObject((Serializable)cipherText);\r\n \r\n //Logging.....\r\n //get the signed message and encrypt it\r\n \r\n signedMessage.encryptMessage(this.kLog);\r\n \r\n //encrypt the action\r\n //archive the signed message for logging and non-repudiation purposes \r\n SignedAction signedAction = new SignedAction(currAcct.getNumber(), atmSessionMessage.getTimeStamp(), signedMessage);\r\n \r\n //flush out transaction record to the audit file\r\n BankServer.log.write(signedAction);\r\n \r\n\t return true;\r\n }\r\n catch(Exception e){\r\n if(e instanceof TransException) replyFailure(transactionOperation,nonce);\r\n System.out.println(\"Terminating session with ACCT#: \" + currAcct.getNumber());\r\n \t//e.printStackTrace();\r\n \r\n return true;\r\n }\r\n }", "private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}", "private int doComp() {\n\t\tDbTime totalTime = pubService.getDbTime();\n\t\tString beginDate = \"\";\n\t\tString endDate = pubService.getTotalDateStr();\n\t\tString yesterdayStr = pubService.getYesterdayStr();\n\t\t\n\t\tReBankAccept reBankAccept = new ReBankAccept();\n\t\treBankAccept.setOrgId(1);\n\t\treBankAccept.setCheckType(\"N\");\n\t\tList<ReBankAccept> reBankAcceptList= sqlSessionTemplate.selectList(\"com.tmount.db.order.dao.ReBankAcceptMapper.selectBySelective\",reBankAccept);\n\t\tSystem.out.println(\"...records...\"+reBankAcceptList.size()+\"...\");\n\t\tfor(ReBankAccept aReBankAccept:reBankAcceptList){\n\t\t\t\n\t\t\tString billOrder = aReBankAccept.getBankAccept()+\"\";\n\t\t\tDate payTime = aReBankAccept.getPayTime();\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\t\tgc.setTime(payTime); \n\t\t\tString payDate=df.format(gc.getTime());\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"payDate = \"+ payDate);\n\t\t\tSystem.out.println(\"billOrder = \"+ billOrder);\n\t\t\t\n\t\t\tStringBuffer strbuf = new StringBuffer();\n\t\t\tiRet = settle.QuerySingleOrder(payDate,billOrder,strbuf);\n\t\t\tif (iRet == 0)\n\t\t\t{\n\t\t\t\t//System.out.println(strbuf);\n\t\t\t\tString[] strArr = strbuf.toString().split(\"\\n\");\n\t\t\t\tif(strArr.length!=4){\n\t\t\t\t\tSystem.out.println(\"...strbuf format error...\");\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tString billData = strArr[0];//交易日期\n\t\t\t\tString dealData = strArr[1];//处理日期\n\t\t\t\tString orderStatus = strArr[2];//定单状态 0-已结帐,1-已撤销,2-部分结帐,3-退款,4-未结帐,5-无效状态,6-未知状态\n\t\t\t\tString strAmount = strArr[3];//定单金额\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"billData:[\"+billData+\"]\");\n\t\t\t\tSystem.out.println(\"dealData:[\"+dealData+\"]\");\n\t\t\t\tSystem.out.println(\"orderStatus:[\"+orderStatus+\"]\");\n\t\t\t\tSystem.out.println(\"strAmount:[\"+strAmount+\"]\");\n\t\t\t\t\n\t\t\t\tif(\"0\".equals(orderStatus)){\n\t\t\t\t\tif(\"Y\".equals(aReBankAccept.getPayType())){//已经是支付状态\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tint payCount = sqlSessionTemplate.selectOne(\"com.tmount.db.order.dao.ReBankOrderAcceptMapper.countPayStatusByBankAccept\",aReBankAccept.getBankAccept());\n\t\t\t\t\t\tif(payCount>0){//银行流水对应的商城订单有支付完成的\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{//银行流水对应的商城订单没有支付完成的,对该未结账订单进行 支付(商城的支付服务逻辑)、结账\n\t\t\t\t\t\t\tOrderService orderservice = new OrderService();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlong payId = 0;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpayId = orderService.userBankOrderPay(aReBankAccept.getBankAccept(),1,\"通过对账程序对本地的订单进行缴费\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"@:***payId***[\"+payId+\"]\");\n\t\t\t\t\t\t\t} catch (ShopBusiException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (ShopParamException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//此处调用封装支付服务的函数,并将函数返回值赋给payId\n\t\t\t\t\t\t\taReBankAccept.setPayType(\"Y\");\n\t\t\t\t\t\t\taReBankAccept.setPayCommitTime(pubService.getDbTime().getDbTime());\n\t\t\t\t\t\t\taReBankAccept.setPayId(payId);\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\taReBankAccept.setCheckType(\"Y\");\t\n\t\t\t\t\tsqlSessionTemplate.update(\"com.tmount.db.order.dao.ReBankAcceptMapper.updateByPrimaryKeySelective\", aReBankAccept);\n\t\t\t\t\t\n\t\t\t\t\t//入银行结算表 对账成功写结算表\n\t\t\t\t\tBkBankChangeAccept bkBankChangeAccept = new BkBankChangeAccept();\n\t\t\t\t\tbkBankChangeAccept.setBankAccept(aReBankAccept.getBankAccept());\n\t\t\t\t\tbkBankChangeAccept.setOrgId(aReBankAccept.getOrgId());\n\t\t\t\t\tbkBankChangeAccept.setPrice(aReBankAccept.getPrice());\n\t\t\t\t\tbkBankChangeAccept.setPayTime(aReBankAccept.getPayTime());\n\t\t\t\t\tbkBankChangeAccept.setPayId(aReBankAccept.getPayId());\n\t\t\t\t\tsqlSessionTemplate.insert(\"com.tmount.db.order.dao.BkBankChangeAcceptMapper.insertSelective\",bkBankChangeAccept);\n\t\t\t\t\t\n\t\t\t\t}else{\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\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"...iRet...\"+iRet);\n\t\t\t\tSystem.out.println(settle.GetLastErr(iRet));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"...totalTime.getDbTime().getHours()...\"+totalTime.getDbTime().getHours());\n\t\t\t\tSystem.out.println(\"...Long.parseLong(payDate)...\"+Long.parseLong(payDate));\n\t\t\t\tSystem.out.println(\"...Long.parseLong(pubService.getYesterdayStr())...\"+Long.parseLong(pubService.getYesterdayStr()));\n\t\t\t\t//招商银行订单的有效期是到第二天的1点(这里防止有遗漏,设置到两点之后失效)\n\t\t\t\tif(totalTime.getDbTime().getHours()>1&&Long.parseLong(payDate)<= Long.parseLong(pubService.getYesterdayStr())){\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tmoveHis(aReBankAccept);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "private void btnbayarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnbayarActionPerformed\n String status = \"Selesai\";\n String formattanggal =\"yyyy-MM-dd\" ; \n SimpleDateFormat ft = new SimpleDateFormat(formattanggal); //ft = FORMAT TANGGAL\n String tglbayar = String.valueOf(ft.format(txttanggal.getDate()));\n String tglaudit = String.valueOf(ft.format(txtaudit.getDate()));\n try{\n if (tglaudit.equals(\"\") || tglbayar.equals(\"\")){\n JOptionPane.showMessageDialog(rootPane, \"ADA DATA YANG BELUM DI ISI\");\n }else{ \n Statement statement = (Statement) conek.GetConnection().createStatement();\n statement.executeUpdate(\"insert into tblpembayaran VALUES ('\" + txtkode.getText() + \"','\" + tglaudit + \"','\" + tglbayar + \"','\" + status + \"','\" + txtgrup.getSelectedItem() +\"','\" + txtaktivitas.getText() +\"','\" + txtcompart.getSelectedItem() + \"','\" + txtanggota.getText() +\"','\" + txtha.getText() +\"','\" + txtharga.getText() +\"','\" + jmltotal +\"','\" + txtgajianggota.getText() +\"');\");\n statement.executeUpdate(\"DELETE from tblaktivitas where compart=('\" + txtcompart.getSelectedItem() + \"');\");\n statement.close();\n JOptionPane.showMessageDialog(rootPane, \"PEMBAYARAN BERHASIL DISIMPAN\"); \n txttanggal.setDateFormatString(\"\");\n txtaudit.setDateFormatString(\"\");\n }\n }catch (Exception t){\n JOptionPane.showMessageDialog(rootPane, \"PEMBAYARAN GAGAL DISIMPAN\");\n } \n autonumber();\n tabelpembayaran();\n tabelaktivitas();\n tampilgrup();\n }", "private AppointmentCashRequest appointmentCashRequest() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy hh:mm aa\", Locale.getDefault());\n String currentDateandTime = sdf.format(new Date());\n\n AppointmentCashRequest appointmentCashRequest = new AppointmentCashRequest();\n appointmentCashRequest.set_id(appoinmentid);\n appointmentCashRequest.setAmount(txt_serviceamout.getText().toString());\n Log.w(TAG,\"appointmentCashRequest\"+ \"--->\" + new Gson().toJson(appointmentCashRequest));\n return appointmentCashRequest;\n }", "private void createTransaction() {\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n if(mCategory == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Category_Income_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(etAmount.getText().toString().replaceAll(\",\", \"\"));\n if(amount < 0) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Amount_Invalid));\n return;\n }\n\n int CategoryId = mCategory != null ? mCategory.getId() : 0;\n String Description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n boolean isDebtValid = true;\n // Less: DebtCollect, More: Borrow\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n }\n\n if(isDebtValid) {\n Transaction transaction = new Transaction(0,\n TransactionEnum.Income.getValue(),\n amount,\n CategoryId,\n Description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n long newTransactionId = mDbHelper.createTransaction(transaction);\n\n if (newTransactionId != -1) {\n\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) newTransactionId);\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n mDbHelper.deleteTransaction(newTransactionId);\n }\n } else {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n\n if(getFragmentManager().getBackStackEntryCount() > 0) {\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n } else {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_transaction_create_fail));\n }\n }\n\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}", "@Override\n public boolean insert(Transaksi transaksi) {\n try {\n String query = \"INSERT INTO transaksi (id, tgl_transaksi) VALUES (?, ?)\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, transaksi.getId());\n ps.setString(2, transaksi.getTglTransaksi());\n\n if (ps.executeUpdate() > 0) {\n return true;\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "private void tampilkan_dataT() {\n \n DefaultTableModel tabelmapel = new DefaultTableModel();\n tabelmapel.addColumn(\"Tanggal\");\n tabelmapel.addColumn(\"Berat\");\n tabelmapel.addColumn(\"Kategori\");\n tabelmapel.addColumn(\"Harga\");\n \n try {\n connection = Koneksi.connection();\n String sql = \"select a.tgl_bayar, b.berat, b.kategori, b.total_bayar from transaksi a, data_transaksi b where a.no_nota=b.no_nota AND a.status_bayar='Lunas' AND MONTH(tgl_bayar) = '\"+date1.getSelectedItem()+\"' And YEAR(tgl_bayar) = '\"+c_tahun.getSelectedItem()+\"'\";\n java.sql.Statement stmt = connection.createStatement();\n java.sql.ResultSet rslt = stmt.executeQuery(sql);\n while (rslt.next()) {\n Object[] o =new Object[4];\n o[0] = rslt.getDate(\"tgl_bayar\");\n o[1] = rslt.getString(\"berat\");\n o[2] = rslt.getString(\"kategori\");\n o[3] = rslt.getString(\"total_bayar\");\n tabelmapel.addRow(o);\n }\n tabel_LK.setModel(tabelmapel);\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Gagal memuat data\");\n }\n \n }", "private String insertarCartaBurningSign() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 2,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 0,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n false,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n true,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "private void automaticPayment(String accountName, String reciever, String billName, final int amount, String date) {\n Log.d(TAG, \"makeTransaction: Has been called\");\n final DocumentReference senderDocRef = db.collection(\"users\").document(user.getEmail())\n .collection(\"accounts\").document(accountName);\n\n final DocumentReference recieverDocRef = db.collection(\"companies\").document(reciever);\n\n final DocumentReference billDocRef = db.collection(\"companies\").document(reciever).collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").document(billName);\n\n db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n DocumentSnapshot sender = transaction.get(senderDocRef);\n DocumentSnapshot reciever = transaction.get(recieverDocRef);\n\n\n int senderBalance = sender.getLong(\"balance\").intValue();\n int recieverBalance = reciever.getLong(\"amount\").intValue();\n int transactionBalance = Math.abs(amount);\n\n if (senderBalance >= transactionBalance) {\n transaction.update(senderDocRef, \"balance\", senderBalance - transactionBalance);\n transaction.update(recieverDocRef, \"amount\", recieverBalance + transactionBalance);\n transaction.update(billDocRef, \"isPaid\", true);\n\n\n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date newDate = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(newDate);\n cal.add(Calendar.MONTH, 1);\n newDate = cal.getTime();\n transaction.update(billDocRef, \"recurring\", dateformat.format(newDate));\n } else {\n Log.d(TAG, \"apply: Transaction ikke fuldført\");\n }\n\n // Success\n return null;\n }\n }).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"Transaction success!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Transaction failure.\", e);\n }\n });\n\n }", "private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setText(v.format(smallCash.setScale(2, BigDecimal.ROUND_HALF_UP)));\n //jTextValueTotalDiscontCoupon.setText(v.format(PagamentoPedido.getDesconto_pagamento()));\n\n if (smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() < 0) {\n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n jTextCash.setText(\"0,00\");\n jTextValueDiscontCoupon.setText(\"0,00\");\n jTextCash.requestFocus(true);\n } else {\n\n if (last_cod_tipo_pagamento != null && smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() > 0) {\n\n if (JOptionPane.showConfirmDialog(this, \"Não é permitido troco para pagamento com cartão.\\nDeseja emitir um contra vale?\", \"Mensagem\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon) == 0) {\n\n JOptionPane.showMessageDialog(this, \"Emitindo contra vale...\");\n\n fechouVenda = true;\n //BeanConsulta.setVenda_fechada(fechouVenda);\n this.dispose();\n\n } else {\n\n funcaoLimpaPag();\n }\n } else {\n \n \n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); \n jButtonFinalizaCalculoPagameto.setEnabled(true);\n jButtonFinalizaCalculoPagameto.requestFocus(true);\n\n }\n }\n\n }", "public void withdraw(String PIN, float amount, String currentDate) {\n String finalDate = ProcessingDates.computeFinalDay(currentDate, this.period);\n if(finalDate.compareTo(currentDate) < 0) {\n System.out.println(\"Daca retrageti bani inainte de data scadenta a contului, va veti pierde dobanda\");\n }\n else if(finalDate == currentDate) {\n if (amount <= this.getCurrentBalance()) {\n this.setCurrentBalance(this.getCurrentBalance() - amount);\n\n AccountStatement accountStatement = new AccountStatement(currentDate, \"Retragere numerar\", \"Debit\", amount);\n this.addAccountStatement(accountStatement);\n System.out.println(\"Retragere realizata cu succes!\");\n } else {\n System.out.println(\"Fonduri insuficiente!\");\n }\n }\n }", "@Override\r\n public long deposito(long deposito) {\n saldo += deposito;\r\n \r\n // Mediante un cuadro de dialogo se anuncia el nuevo saldo\r\n JOptionPane.showMessageDialog(null, \"Su nuevo saldo es: \" + saldo);\r\n\r\n return saldo;\r\n\r\n }", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "@Transactional\n\tpublic String addTransaction(int toAccNo, int fromAccNo, Transaction tran) {\n\t\t\tEntityManager entityManager = getEntityManager();\n\t\t\tAccountdetail acc = (Accountdetail) entityManager.createQuery(\"select a from Accountdetail a where a.accountnumber =: toaccNo\").setParameter(\"toaccNo\", toAccNo ).getSingleResult();\n\t\t\tAccountdetail acc1 = (Accountdetail) entityManager.createQuery(\"select ac from Accountdetail ac where ac.accountnumber =: fromAccNo\").setParameter(\"fromAccNo\", fromAccNo ).getSingleResult();\n\t\t\t\n\t\t\t//Validation -----> The Balance amount should be greater than the Amount Transfered \n\t\t\tif(acc1.getCurrentbalance()>=tran.getAmounttransferred()) {\n\t\t\t\t\ttran.setAccountto(acc);\n\t\t\t\t\ttran.setAccountfrom(acc1);\n\t\t\t\t\tentityManager.merge(tran);\n\t\t\t\t\t\n\t\t\t\t\t//Taking the amount transfered\n\t\t\t\t\tint amt = tran.getAmounttransferred();\n\t\t\t\t\tSystem.out.println(toAccNo);\n\t\t\t\t\t\n\t\t\t\t\t//Also crediting and debiting the amount from the accounts \n\t\t\t\t\tacc.setCurrentbalance(acc.getCurrentbalance()+amt);\n\t\t\t\t\tacc1.setCurrentbalance(acc1.getCurrentbalance()-amt);\n\t\t\t\t\t\n\t\t\t\t\t//Mailing the details of the transaction to the Respective Account Numbers\n\t\t\t\t\tString info_deb = \"Amount debited from your account.\\nAmount -->\"+amt+\"\\nTo Account -->\"+acc.getAccountnumber();\n String info_rec = \"Amount credited to your account.\\nAmount -->\"+amt+\"\\nFrom Account -->\"+acc1.getAccountnumber();\n mailService.sendMail(info_deb, acc1.getCustomerdetail().getEmail());\n mailService.sendMail(info_rec, acc.getCustomerdetail().getEmail());\n \n\t\t\t\t\treturn \"Transaction Inserted\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If Balance is less than the Amount Transfered \n\t\t\t\telse if(acc1.getCurrentbalance()<tran.getAmounttransferred()) {\n\t\t\t\t\treturn \"insufficient funds\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//If the Details is wrong\n\t\t\t\telse {\n\t\t\t\t\treturn \"Wrong details. Please try again\";\n\t\t\t\t}\n\t }", "public int TransBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\tjava.util.Date d=new java.util.Date();\r\n\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\tString sdate=sd.format(d);\r\n\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\tif(rs1.next()==true)\r\n\t{\r\n\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='self' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','self',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t}\r\n\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\tif(rss.next()==true)\r\n\t{\r\n\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t}\r\n\treturn 1;\r\n}", "public void setSaldoKoperasi(double saldoKoperasi) {\n this.saldoKoperasi = saldoKoperasi;\n }", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public void realizarDeposito(String codigo_cuenta, double monto) {\n try {\n Cuenta cuenta = obtenerCuenta(codigo_cuenta);\n double credito_total = cuenta.getCredito() + monto;\n PreparedStatement PrSt;\n String Query = \"UPDATE Cuenta SET Credito = ? WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setDouble(1, credito_total);\n PrSt.setString(2, codigo_cuenta);\n PrSt.executeUpdate();\n PrSt.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "@Scheduled(fixedDelay = 15000)\n\tpublic void scheduleFixedDelayTask() {\n\t\t\n\t\tList<Tx> listaTx = txRepo.findAll();\n\t\t\n\t\tfor (Tx tx : listaTx) {\n\t\t\tif(tx.getStatus().equals(TxStatus.PENDING)) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t//to be implemented\n\t\t\t\t\n\t\t\t\tString auth = \"Bearer \" + tx.getSbi().getBitcoinAddress();\n\t\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\t\theaders.add(\"Authorization\", auth);\n\t\t\t\t\n\t\t\t\tInteger orderId = tx.getorder_id();\n\t\t\t\t\n\t\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\t\n\t\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + orderId, HttpMethod.GET,\n\t\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t\t \n\t\t\t \n\t\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\t\n\t\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\t\n\t\t\t \n\t\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t\t\t\n\t\t\t if(gorResponse.getStatus().equals(\"paid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"invalid\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"expired\") || \n\t\t\t \t\tgorResponse.getStatus().equals(\"canceled\")) {\n\t\t\t \t\n\t\t\t \t//naredne tri linije mi nisu nista jasne zasto sam ovo radio pre mesec dana\n\t\t\t \tTx tx2 = new Tx();\n\t\t \t\ttx2 = txRepo.findByusername(gorResponse.getId());\n\t\t \t\tSystem.out.println(\"TX: \" + tx2.getorder_id());\n\t\t \t\t\n\t\t \t\tRestTemplate restTemplate = new RestTemplate();\n\t\t \t\t\n\t\t \t\tTxInfoDto txInfo;\n\t\t\t \t\n\t\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t\t \t\t\n\t\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.SUCCESS, \"https://localhost:8764/bitCoin\");\n\t\t\t \t\t\t\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else if(gorResponse.getStatus().equals(\"expired\")){\n\t\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, \"https://localhost:8764/bitCoin\");\n\t\t\t \t} else {\n\t\t\t \t\ttx.setStatus(TxStatus.CANCELED);\n\t\t\t \t\ttxInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.ERROR, \"https://localhost:8764/bitCoin\");\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \ttxRepo.save(tx);\n\t\t \t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentIsFinished\", txInfo, TxInfoDto.class);\n\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t \t\n\t\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Nema transakcija :(\");\n\t\t\n\t/*\tif(IS_CREATE) {\n\t\t\tSystem.out.println(\n\t\t\t\t \"Fixed delay task - \" + System.currentTimeMillis() / 20000);\n\t\t\t\t\t\t \t\n\t\t String authToken = STATIC_TOKEN;\n\t\t \n\t\t\tHttpHeaders headers = new HttpHeaders();\n\t\t\theaders.add(\"Authorization\", authToken);\n\t\t\t\n\t\t\tSystem.out.println(\"authtoken : \" + authToken);\n\t\t \n\t\t\tGetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO();\n\t\t\t\n\t\t ResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders/\" + STATIC_ID, HttpMethod.GET,\n\t\t\t\t\tnew HttpEntity<Object>(getOrderDTO, headers), Object.class);\n\t\t \n\t\t \n\t\t ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\t\tGetOrderResponseDTO gorResponse = new GetOrderResponseDTO();\n\t\n\t\t\tgorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class);\n\t\n\t\t \n\t\t System.out.println(\"Order status: \" + gorResponse.getStatus());\n\t\t \n\t\t if(gorResponse.getStatus().equals(\"paid\") || gorResponse.getStatus().equals(\"invalid\") || gorResponse.getStatus().equals(\"expired\")) {\n\t\t \t\n\t\t \t/*Tx tx = new Tx();\n\t \t\ttx = txRepo.findByOrder_Id(gorResponse.getId());\n\t \t\tSystem.out.println(\"TX: \" + tx.getorder_id());\n\t\t \t\n\t\t \tif(gorResponse.getStatus().equals(\"paid\")) {\n\t\t \t\t//promenimo u bazi\n\t\t \t\t//txRepo.getOne((Integer)gorResponse.getId());\n\t\t \t\ttx.setStatus(TxStatus.PAID);\n\t\t \t\t\n\t\t \t} else if(gorResponse.getStatus().equals(\"invalid\")) {\n\t\t \t\ttx.setStatus(TxStatus.FAILED);\n\t\t \t} else {\n\t\t \t\ttx.setStatus(TxStatus.EXPIRED);\n\t\t \t}\n\t\t \t\n\t\t \ttxRepo.save(tx);*/\n\t\t /*\t\n\t\t \tIS_CREATE = false;\n\t\t }\n\t\t\t\t\t \n\t\t\t\t \n\t\t} else {\n\t\t\tSystem.out.println(\"Nikom nista\");\n\t\t\tlogger.info(\"Scheduled is working...\");\n\t\t}*/\n\t\t\n\t \n\t \n\t}", "public static void hentOgSkrivKostnader() {\n Connection con = getCon();\n PreparedStatement prepStmt = null;\n ResultSet res = null;\n try {\n String query = \"SELECT prosj_id, kunde, tekst, beløp FROM prosjekt JOIN prosjektkostnader USING(prosj_id) WHERE faktura_sendt IS NULL ORDER BY prosj_id, kunde;\";\n prepStmt = con.prepareStatement(query);\n res = prepStmt.executeQuery();\n while (res.next()) {\n Tekstfil.skriv(res.getString(\"prosj_id\") +\n \"; \" + res.getString(\"tekst\") + \"; \" +\n res.getString(\"kunde\") + \"; \" +\n res.getDouble(\"beløp\") + \"\\n\");\n }\n /*\n String query2 = \"UPDATE prosjektkostnader SET faktura_sendt=CURRENT_DATE() WHERE faktura_sendt IS NULL;\";\n prepStmt = con.prepareStatement(query2);\n prepStmt.executeUpdate();\n */\n } catch (SQLSyntaxErrorException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n closeConnection(con, prepStmt, null);\n }\n }", "void pay(Order order);", "public Kreditkarte(){\n\t\n\t}", "@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }", "public void onSaveButton(View v) {\n\n hasMoney = true;\n\n transactionNotes = findViewById(R.id.transaction_notes);\n final FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n final EditText transactionPrice = findViewById(R.id.transaction_price);\n\n\n // check the field of the transaction\n if (dateText.getText().toString().matches(\"\")) {\n return;\n }\n\n if (transactionPrice.getText().toString().matches(\"\")) {\n Toast.makeText(EditTransaction.this, \"Insert a price!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // delete the unnecessary data\n DocumentReference docRef = db.document(firebaseAuth.getCurrentUser().getUid()).collection(transactionDate).document(transactionID);\n docRef.delete();\n\n // update the totalsum in the DB\n HashMap<String, Double> sum = new HashMap<>();\n sum.put(\"amount\", totalSum - transaction.getAmount());\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").set(sum);\n\n // in case the transaction was moved to another month\n // we need to insert this transaction to the documents where it belongs\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n\n if (task.isSuccessful()) {\n\n DocumentSnapshot documentSnapshot = task.getResult();\n Boolean isPosivite = false;\n if (income.get(CategoryText.getText().toString()) != null)\n isPosivite = true;\n\n totalSum = (double) documentSnapshot.getData().get(\"amount\");\n\n // if the transaction is not possible\n // i.e the user does not have enough money\n // then show a little message\n if (totalSum - Double.parseDouble(transactionPrice.getText().toString()) < 0 && !isPosivite) {\n Toast.makeText(EditTransaction.this, \"You are a little poor human\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n // otherweise save the new transaction to the DB\n DocumentReference ref = db\n .document(firebaseAuth.getCurrentUser().getUid()).collection(monthCollection).document();\n\n Map<String, String> transaction = new HashMap<>();\n transaction.put(\"date\", dateText.getText().toString());\n transaction.put(\"price\", transactionPrice.getText().toString());\n transaction.put(\"notes\", transactionNotes.getText().toString());\n Toast.makeText(EditTransaction.this, dateText.getText().toString() + transactionPrice.getText().toString() + transactionNotes.getText().toString(), Toast.LENGTH_SHORT).show();\n\n CategoryText = findViewById(R.id.transaction_select_category);\n String[] dates = dateText.getText().toString().split(\"-\");\n String luna = dates[0], zi = dates[1], an = dates[2];\n\n\n HashMap<String, String> months = new HashMap<>();\n String[] mnths = {\"\", \"Jan\", \"Feb\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"Sept\", \"Oct\", \"Nov\", \"Dec\"};\n for (int i = 1; i <= 12; i++) {\n if (i < 10) {\n months.put(Integer.toString(i), mnths[i]);\n } else {\n\n months.put(Integer.toString(i), mnths[i]);\n }\n }\n\n Toast.makeText(EditTransaction.this, months.get(luna), Toast.LENGTH_SHORT).show();\n\n\n TransactionDetails transactionDetails = new TransactionDetails(Integer.parseInt(zi), zi, months.get(luna), an, CategoryText.getText().toString(), (Integer) findViewById(R.id.category_image).getTag(), -Double.parseDouble(transactionPrice.getText().toString()), ref.getId());\n\n // daca adaug bani dau cu plus\n if (isPosivite)\n transactionDetails.setAmount(-transactionDetails.getAmount());\n\n ref.set(transactionDetails);\n\n // update totalsum\n HashMap<String, Double> sum = new HashMap<>();\n sum.put(\"amount\", totalSum + transactionDetails.getAmount());\n db.document(firebaseAuth.getCurrentUser().getUid()).collection(\"Wallet\").document(\"MainWallet\").set(sum);\n\n startActivity(new Intent(EditTransaction.this, MainActivity.class));\n\n }\n\n }\n\n }\n });\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public void queryNext() {\n String sumText;\n if (!isExpire()) {\n this.mHandler.removeCallbacks(this.queryNextRunnable);\n this.mHandler.removeCallbacks(this.queryCurrentRunnable);\n boolean allQueried = this.currentID == this.bizOrderIds.size() + -1;\n if (allQueried && this.results.length > 0 && this.results[this.results.length - 1] != null && \"WAIT_BUYER_PAY\".equals(this.results[this.results.length - 1].getOrderInfo().getOrderStatusCode())) {\n allQueried = false;\n }\n double sum = ClientTraceData.b.f47a;\n if (allQueried) {\n OrderDetailMO[] orderDetailMOArr = this.results;\n int length = orderDetailMOArr.length;\n int i = 0;\n while (i < length) {\n OrderDetailMO mo = orderDetailMOArr[i];\n if (checkPaid(mo.getOrderInfo().getOrderStatusCode())) {\n sum += Double.parseDouble(mo.getOrderInfo().getTotalPrice());\n i++;\n } else {\n return;\n }\n }\n final QRDialogDelegate delegate = this.mDelegate;\n if (sum == ((double) ((int) sum))) {\n sumText = String.format(\"成功付款 %.0f 元\", new Object[]{Double.valueOf(sum)});\n } else {\n sumText = String.format(\"成功付款 %.2f 元\", new Object[]{Double.valueOf(sum)});\n }\n new PayConfirmDialog.Builder(this.mActivityContext).setCancelable(false).setMessage((CharSequence) onHandlerSpanned(sumText)).setPositiveButton(\"按OK键完成\", (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n if (delegate != null) {\n delegate.QRDialogSuccess(QRDialog.this, true);\n }\n dialogInterface.dismiss();\n }\n }).create().show();\n dismiss();\n return;\n }\n this.mHandler.postDelayed(this.queryNextRunnable, 5000);\n }\n }", "public int TransBroBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\t\tjava.util.Date d=new java.util.Date();\r\n\t\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\tString sdate=sd.format(d);\r\n\t\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\t\tif(rs1.next()==true)\r\n\t\t{\r\n\t\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','broker',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t\t}\r\n\t\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\t\tif(rss.next()==true)\r\n\t\t{\r\n\t\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public static ArrayList<Krediti> rascetOtricBalans() {\r\n\t\tArrayList<Krediti> foundKrediti = new ArrayList<Krediti>();\r\n\r\n\t\tint t = 0;\r\n\t\tfor (Krediti vkla : kred) {\r\n\r\n\t\t\tt = t + vkla.getDolg();\r\n\r\n\t\t}\r\n\t\tSystem.out.println(\"Otrictelni balanse Scetov= \" + t + \"$\");\r\n\t\treturn foundKrediti;\r\n\t}", "private void getTransactionInformation(){\n\n LayoutInflater layoutInflater = getLayoutInflater();\n View layoutGetTransactionInformation = layoutInflater.inflate(R.layout.layout_get_transaction_information, null);\n\n final EditText fromDateEditText = (EditText) layoutGetTransactionInformation.findViewById(R.id.edit_text_from_date);\n EditText toDateEditText = (EditText) layoutGetTransactionInformation.findViewById(R.id.edit_text_to_date);\n\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setView(layoutGetTransactionInformation)\n // Add action buttons\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n }).setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n final AlertDialog getTransactionInformationAlertDialog = builder.create();\n getTransactionInformationAlertDialog.show();\n\n getTransactionInformationAlertDialog.getButton(DialogInterface.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // we gotta calculate hash at our end\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.VERIFY_PAYMENT);\n // var 1 is from date\n payUChecksum.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.VERIFY_PAYMENT);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(verifyPaymentTransactionIdEditText.getText().toString());\n if((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR ){\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n VerifyPaymentTask verifyPaymentTask = new VerifyPaymentTask(PayUVerifyApiActivity.this);\n verifyPaymentTask.execute(payuConfig);\n\n verifyPaymentDialog.dismiss();\n\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public VenTransactionFee persistVenTransactionFee(VenTransactionFee venTransactionFee);", "@Override\n public boolean withdrawAmount(TransactionDTO transaction) {\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n if(customerDetails.getAccountBalance()>=transaction.getAmount()){\n customerDetails.setAccountBalance(customerDetails.getAccountBalance()-transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }\n else{\n return false;\n }\n }", "public void save_order_without_payment(String advert, String userWhoGive,String userWhoGet,Date date,Date start, Date finish,Float price);", "public void registrarPagoFacturaCredito(){\n if(facturaCredito != null){\n try{\n //NUEVA TRANSACCION\n Transaccion transac = new Transaccion();\n transac.setFechaTransac(new funciones().getTime());\n transac.setHoraTransac(new funciones().getTime());\n transac.setResponsableTransac(new JsfUtil().getEmpleado());\n transac.setTipoTransac(4); //REGISTRO DE PAGO\n transac.setIdtransac(ejbFacadeTransac.getNextIdTransac());\n ejbFacadeTransac.create(transac);\n //REGISTRAR PAGO\n PagoCompra pagoCompra = new PagoCompra();\n pagoCompra.setFacturaIngreso(facturaCredito);\n pagoCompra.setIdtransac(transac);\n pagoCompra.setInteresPagoCompra(new BigDecimal(intereses));\n pagoCompra.setMoraPagoCompra(new BigDecimal(mora));\n pagoCompra.setAbonoPagoCompra(new BigDecimal(pago));\n BigDecimal total = pagoCompra.getAbonoPagoCompra().add(pagoCompra.getInteresPagoCompra()).add(pagoCompra.getMoraPagoCompra());\n pagoCompra.setTotalPagoCompra(new BigDecimal(new funciones().redondearMas(total.floatValue(), 2)));\n pagoCompra.setIdpagoCompra(ejbFacadePagoCompra.getNextIdPagoCompra());\n ejbFacadePagoCompra.create(pagoCompra); // Registrar Pago en la BD\n //Actualizar Factura\n facturaCredito.getPagoCompraCollection().add(pagoCompra); //Actualizar Contexto\n BigDecimal saldo = facturaCredito.getSaldoCreditoCompra().subtract(pagoCompra.getAbonoPagoCompra());\n facturaCredito.setSaldoCreditoCompra(new BigDecimal(new funciones().redondearMas(saldo.floatValue(), 2)));\n if(facturaCredito.getSaldoCreditoCompra().compareTo(BigDecimal.ZERO)==0){\n facturaCredito.setEstadoCreditoCompra(\"CANCELADO\");\n facturaCredito.setFechaCancelado(transac.getFechaTransac());\n }\n facturaCredito.setUltimopagoCreditoCompra(transac.getFechaTransac());\n ejbFacadeFacturaIngreso.edit(facturaCredito);\n new funciones().setMsj(1, \"PAGO REGISTRADO CORRECTAMENTE\");\n if(facturaCredito.getEstadoCreditoCompra().equals(\"CANCELADO\")){\n RequestContext context = RequestContext.getCurrentInstance(); \n context.execute(\"alert('FACTURA CANCELADA POR COMPLETO');\");\n }\n prepararPago();\n }catch(Exception e){\n new funciones().setMsj(3, \"ERROR AL REGISTRAR PAGO\");\n }\n }\n }", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public void dohvatiOtpad(KonkretniSpremnik ks) {\n VozilaLogger.printRad(this, ks);\n if (ks.getNazivBroj() == getVrsta()) {\n float nova_popunjenost = popunjenost + ks.getNapunjenost();\n if (nova_popunjenost >= nosivost) {\n notifyAllObservers();\n } else {\n popunjenost = nova_popunjenost;\n ks.isprazni();\n azurirajStatistikuOtpada(1, ks.getNapunjenost());\n }\n }\n }", "public Date getTransactrateDate() {\n return transactrateDate;\n }", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "@Override\n public boolean depositAmount(TransactionDTO transaction) {\n if(transaction.getAmount()>0){\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n customerDetails.setAccountBalance(customerDetails.getAccountBalance()+transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }else{\n return false;\n }\n }", "@Override\n\tpublic void mostrarDeposito() {\n\t\tSystem.out.println(\"Depósito: \"+depositoActual+\"litros\");\n\t}", "AcctgTrans getAcctgTrans();", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "private void xuLyThemSD(){\n if (checkNgay(txtNgaySD.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải thuộc dạng [YYYY-MM-DD].\\n Vui lòng kiểm tra lại!\");\n txtNgaySD.requestFocus();\n return;\n }//kiem tra ngay su dung\n \n if (checkGia(txtGiaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải là ký tự số.\\n Vui lòng kiểm tra lại!\");\n txtGiaDV.requestFocus();\n return;\n }//kiem tra gia dich vu\n \n \n SuDungService suDungService = new SuDungService();\n int x = suDungService.themSuDung(cbbMaDV.getSelectedItem().toString(),\n cbbMaKH.getSelectedItem().toString(),\n txtNgaySD.getText(), Float.valueOf(txtGiaDV.getText()));\n \n if (x>0){\n hienThiSuDung();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n cbbMaDV.requestFocus();\n return;\n }\n }", "public BankRekening() {\n setSaldo(0);\n }", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "public Transaksi_Pembelian() {\n initComponents();\n datatable();\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String id = (String) dataSnapshot.child(\"nextTransID\").getValue();\n String allowTotal = (String) dataSnapshot.child(\"total\").getValue();\n if (id == null){\n //TODO: display message.\n Log.e(TAG, \"no transactions found\");\n return;\n }\n Log.d(TAG, \"ID is: \" + id);\n mTransID = id;\n mAllowTotal = allowTotal;\n }", "@Override\n public void success(Object result) {\n super.success(result);\n if (null == result) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n JSONObject json = JSON.parseObject(result.toString());\n if (200 != json.getIntValue(\"code\")) {\n Util.show(\"网络异常,请重试\", PayMoneyFrame1.this);\n return;\n }\n pay_item_rec_ban.setText(\"¥\" + json.getString(\"rec\"));// 充值\n pay_item_sb_ban.setText(json.getString(\"sb\") + \"枚\");// 商币\n\n pay_item_zz_ban.setText(json.getString(\"rec\") + \"+\" + json.getString(\"red_s\"));// 充值+红包种子\n pay_item_zz1_ban.setText(json.getString(\"red_s\"));// 红包种子\n pay_item_reccon_rec_ban.setText(json.getString(\"rec\") + \"+\" + json.getString(\"con\"));\n String number = \"0.00\";\n if (!Util.isNull(json.getString(\"shopping_voucher\"))) {\n number = json.getString(\"shopping_voucher\");\n }\n gowuquan.setText(number);\n\n }", "@GetMapping(\"\")\n private String requestPayrollForm(\n @RequestParam(value=\"tanggalIsu\") @DateTimeFormat(pattern=\"yyyy-MM-dd\") Date tanggalIsu,\n HttpServletRequest request,\n Model model) {\n //Initiate Page\n YearMonth reset = payrollService.datetoYM(tanggalIsu);\n Date tanggal_isu = payrollService.YMtoDate(reset);\n try{\n payrollService.getDokumenByTanggal_Isu(tanggal_isu);\n }catch(NoSuchElementException exception){\n DokumenTotalModel dokumenBaru = new DokumenTotalModel();\n payrollService.makeDokumenTotal(dokumenBaru, tanggal_isu);\n }\n DokumenTotalModel dokumen = payrollService.getDokumenByTanggal_Isu(tanggal_isu);\n payrollService.updateDokumenTotal(dokumen);\n\n //Authorization Control\n String role = payrollService.findUser().getId_role().getRole();\n\n if((role.equals(\"Wakil Pengurus Harian\"))&&\n (dokumen.getId_status().getStatus().equals(\"Menunggu Pengajuan\"))){\n String message=\"Mohon maaf, Anda belum memiliki akses ke halaman ini \" +\n \"karena Manajer SDI belum mengajukan dokumen total anggaran\";\n model.addAttribute(\"message\", message);\n return \"payroll-access\";\n } else{\n //List Attribute\n List<DokumenTotalModel> dokumenList = dokumenTotalDb.findAll();\n int lastIndex = dokumenList.size()-1;\n List<List<Integer>> total = payrollService.totalPerDokPerUnit();\n List<String> dateList = payrollService.displayYearMonth();\n model.addAttribute(\"role\", role);\n model.addAttribute(\"dateList\", dateList);\n model.addAttribute(\"dateDisplay\", dateList.get(lastIndex));\n model.addAttribute(\"dokumenDisplay\", dokumenList.get(lastIndex));\n model.addAttribute(\"dokumenList\", dokumenList);\n model.addAttribute(\"unitDisplay\", total.get(lastIndex));\n model.addAttribute(\"total\", total);\n return \"mengajukan-payroll\";\n }\n }", "@Override\n\tpublic void teclaConfirmaDigitada() {\n\t\t\n\t}", "public JSONObject addTransaction(JSONObject message, Session session, Connection conn) {\n\t\ttransNotif = new JSONObject();\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tdouble amount = message.getDouble(\"amountToAdd\");\n\t\t\tint userID = message.getInt(\"userID\");\n\t\t\tint budgetID = message.getInt(\"categoryID\");\n\t\t\tdouble latitude = message.getDouble(\"latitude\");\n\t\t\tdouble longitude = message.getDouble(\"longitude\");\n\t\t\tString details = message.getString(\"details\");\n\t\t\tString date = message.getString(\"date\");\n\t\t\tint auto = 0;\n\t\t\t\n\t\t\tif (message.getBoolean(\"automaticTransaction\")) {\n\t\t\t\tSystem.out.println(\"help\");\n\t\t\t\tauto = 1;\n\t\t\t}\n\t\t\t//latitude, longitude, details\n\t\t\tst.execute(Constants.SQL_INSERT_TRANSACTION + \"(\" + budgetID + \", \" + amount + \", '\" + details + \"', \" + latitude + \", \" + longitude +\", '\" + date + \"', \" + auto + \");\");\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM Budgets WHERE budgetID = \" + budgetID + \";\");\n//\t\t\tSystem.out.println(\"rs\");\n\t\t\tint bigBudgetID=0;\n\t\t\tdouble budgetSpent=0;\n\t\t\tdouble newBudgetSpent=0;\n\t\t\tdouble budgetAmount=0;\n\t\t\tString budgetName=\"\";\n\t\t\tif(rs.next()) {\n\t\t\t\tbigBudgetID = rs.getInt(\"bigBudgetID\");\n\t\t\t\tbudgetSpent = rs.getDouble(\"TotalAmountSpent\");\n\t\t\t\tnewBudgetSpent = budgetSpent + amount;\n\t\t\t\tbudgetAmount = rs.getDouble(\"BudgetAmount\");\n\t\t\t\tbudgetName = rs.getString(\"BudgetName\");\n\t\t\t\tSystem.out.println(bigBudgetID);\n\t\t\t}\n//\t\t\tSystem.out.println(\"rs\");\n\t\t\tResultSet rs1 = st.executeQuery(\"SELECT * FROM BigBudgets WHERE bigBudgetID = \" + bigBudgetID + \";\");\n//\t\t\tSystem.out.println(\"rs1\");\n\t\t\tdouble bigBudgetSpent = 0; double bigbudgetAmount = 0; double newBigBudgetSpent = 0;\n\t\t\tString bigbudgetName = \"\";\n\t\t\tint daysLeft = 0;\n\t\t\tString lnotification=\"\";\n\t\t\tif (rs1.next()) {\n\t\t\t\tbigBudgetSpent = rs1.getDouble(\"TotalAmountSpent\");\n\t\t\t\tnewBigBudgetSpent = bigBudgetSpent+amount;\n\t\t\t\tbigbudgetAmount = rs1.getDouble(\"BigBudgetAmount\");\n\t\t\t\tbigbudgetName = rs1.getString(\"BigBudgetName\");\n\t\t\t\tdaysLeft = rs1.getInt(\"BigBudgetDaysLeft\");\n\t\t\t\tlnotification = rs1.getString(\"LimitNotification\");\n\t\t\t}\n\t\t\tString[] lnList = lnotification.split(\" \");\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor (int i=0; i<lnList.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tlist.add(Integer.parseInt(lnList[i]));\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tst.executeUpdate(\"UPDATE Budgets SET TotalAmountSpent = \" + newBudgetSpent + \" WHERE budgetID = \" + budgetID + \";\");\n\t\t\tSystem.out.println(\"update\");\n\t\t\tresponse = getData(conn, userID);\n\t\t\tst.executeUpdate(\"UPDATE BigBudgets SET TotalAmountSpent = \" + newBigBudgetSpent + \" WHERE bigBudgetID = \" + bigBudgetID + \";\");\n\t\t\t\n\t\t\tArrays.sort(list.toArray());\n\t\t\tboolean added = false;\n\t\t\tfor (int i=list.size()-1; i>=0; i--) {\n\t\t\t\tSystem.out.println(list.get(i));\n\t\t\t\tSystem.out.println(newBudgetSpent + \", \" + ((double)list.get(i)/100)*(budgetAmount) + \", \" + budgetSpent + \", \" + budgetAmount + \", \" + (newBudgetSpent > ((list.get(i)/100)*(budgetAmount))));\n\t\t\t\tif ((newBudgetSpent >= (((double)list.get(i)/100)*(budgetAmount))) && (budgetSpent < (((double)list.get(i)/100)*budgetAmount))) {\n\t\t\t\t\tresponse.put(\"notification\", \"yes\");\n\t\t\t\t\tresponse.put(\"notify\", \"You have now spent \" + list.get(i) + \"% of category \" + budgetName + \" which is in budget \" + bigbudgetName + \". You have \" + daysLeft + \" more days.\");\n\t\t\t\t\ti = -1;\n\t\t\t\t\tadded = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!added) {\n\t\t\t\tresponse.put(\"notification\", \"no\");\n\t\t\t}\n//\t\t\tif (newBudgetSpent >= ((budgetAmount)) && budgetSpent <= (budgetAmount)) {\n//\t\t\t\tresponse.put(\"notification\", \"yes\");\n//\t\t\t\tresponse.put(\"notify\", \"You have used all of your allotted amount in category \" + budgetName + \" which is in budget \" + bigbudgetName + \". You have \" + daysLeft + \" more days.\");\n//\t\t\t}\n//\t\t\telse if (newBudgetSpent > (0.95*(budgetAmount)) && budgetSpent <= (0.95*budgetAmount)) {\n//\t\t\t\tresponse.put(\"notification\", \"yes\");\n//\t\t\t\tresponse.put(\"notify\", \"You now have less than 5% left in category \" + budgetName + \" which is in budget \" + bigbudgetName + \". You have \" + daysLeft + \" more days.\");\n//\t\t\t}\n//\t\t\telse if (newBudgetSpent > (0.9*(budgetAmount)) && budgetSpent <= (0.9*budgetAmount)) {\n//\t\t\t\tresponse.put(\"notification\", \"yes\");\n//\t\t\t\tresponse.put(\"notify\", \"You now have less than 10% left in category \" + budgetName + \" which is in budget \" + bigbudgetName + \". You have \" + daysLeft + \" more days.\");\n//\t\t\t}\n//\t\t\telse if (newBudgetSpent > (0.8*(budgetAmount)) && budgetSpent <= (0.8*budgetAmount)) {\n//\t\t\t\tresponse.put(\"notification\", \"yes\");\n//\t\t\t\tresponse.put(\"notify\", \"You now have less than 20% left in category \" + budgetName + \" which is in budget \" + bigbudgetName + \". You have \" + daysLeft + \" more days.\");\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\tresponse.put(\"notification\", \"no\");\n//\t\t\t}\n\t\t\tif (response.getString(\"notification\").equals(\"no\")) {\n\t\t\t\ttransNotif = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttransNotif.put(\"notification\", \"yes\");\n\t\t\t\ttransNotif.put(\"notify\", response.getString(\"notify\"));\n\t\t\t}\n\t\t\tresponse.put(\"message\", \"addTransactionSuccess\");\n\t\t}\n\t\tcatch (SQLException | JSONException e) {\n\t\t\te.printStackTrace();\n\t\t\ttry {\n\t\t\t\tresponse.put(\"message\", \"addTransactionFail\");\n\t\t\t} catch (JSONException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n//\t\tdeleteAll(conn);\n\t\treturn response;\n\t}", "HashMap saveOrderPaymentTE(long orderIdi,double monto,String hdnRa,String hdnVoucher,String hdnComentario,String hdnNumLogin,String hdnUser,Integer hdnFlgVep,Double txtCuotaInicial, Double hdnMontoFinanciado,Integer hdnNumCuotas)throws SQLException, Exception, RemoteException;", "@RequestMapping(path=\"/createOrder\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\n\tpublic ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) { \n\t\tlogger.info(\"Init payment\");\n\t\t\n\t\tSellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId());\n\t\t\n\t\tSystem.out.println(\"ADDRESS \" + sbi.getBitcoinAddress());\n\t\t\n\t\tString token = sbi.getBitcoinAddress();\n\t\t\n\t\tString authToken = \"Bearer \" + token;\n\t\t//trebali bismo da kreiramo transakciju koja ce biti u stanju \"pending\" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme\n\t\t\n\t\t//txRepo.save(tx);\n\t\t//RestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//restTemplate.getForEntity(\"https://api.coingate.com/v2/ping\", String.class);\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", authToken);\t \n\t\t\n\t\tSystem.out.println(\"Amount: \" + btcDTO.getAmount());\n\t\t\n\t\tCreateOrderRequestDTO order = new CreateOrderRequestDTO(\"1111\", btcDTO.getAmount(), \"BTC\", \"DO_NOT_CONVERT\", \"Title\", \"Description\", \"https://localhost:4200/success\", \"https://localhost:4200/failed\", \"https://localhost:4200/success\", \"token\");\n\t\t\n\t\tResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders\", HttpMethod.POST,\n\t\t\t\tnew HttpEntity<Object>(order, headers), Object.class);\n\t\t\n\t\tlogger.info(responseEntity.getBody().toString());\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\tBitCoinResponseDTO btcResponse = new BitCoinResponseDTO();\n\n\t\tbtcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class);\n\t\t\n\t\tString paymentUrl = btcResponse.getPayment_url();\n\t\t\n\t\tlogger.info(paymentUrl);\n\t\t\n\t\tTx tx = createTransaction(btcResponse,sbi);\n\t\ttxRepo.save(tx);\n\t\t\n\t\tTxInfoDto txInfo = new TxInfoDto();\n\t\ttxInfo.setOrderId(btcDTO.getOrderId());\n\t\ttxInfo.setServiceWhoHandlePayment(\"https://localhost:8764/bitCoin\");\n\t\ttxInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentInit\", txInfo, TxInfoDto.class);\n\t\t\n\t\t//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());\n\t\t\n\t\t//BitCoinResponseDTO responseDTO = responseEntity.;\n\t\t\n\t\t//String pageToRedirec = responseDTO.getPayment_url();\n\t\t\n\t\t//restTemplate.exchange\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api-sandbox.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\tPaymentResponseDTO responseDTO = new PaymentResponseDTO();\n\t\tresponseDTO.setPaymentUrl(paymentUrl);\n\t\tresponseDTO.setPaymentId(1l);\n\n\t\tSTATIC_ID = btcResponse.getId();\n\t\tSTATIC_TOKEN = authToken;\n\t\tIS_CREATE = true;\n\t\t\n\t\t//scheduleFixedDelayTask();\n\t\t//scheduleFixedDelayTask(btcResponse.getId(), authToken);\n\t\t\n\t\treturn new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK);\n\t}", "public abstract void aktualisiereZeitpunk(int momentanZeitpunkt);", "public boolean deposito(int idConta, double quantia) {\n try {\n Conta conta = new Conta(idConta); //deveria poder fazer isto\n boolean executado = conta.depositoConta(quantia);\n System.out.println(executado ? \"Deposito efetuado com sucesso.\" : \"Erro ao Efeuar o Deposito\" );\n return executado;\n } catch (Exception e) {\n System.out.println(\"Erro no serviço deposito: \" + e.getMessage());\n return false;\n } \n}", "Money getCashSettlementAmount();", "public BankRekening(double saldo) {\n if (saldo > 0)\n setSaldo(saldo);\n }", "private void doBankRequest(final String amount) {\n ParseObject bankRequest = new ParseObject(Constants.CLASS_TRANSACTIONS);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_FROM, mCurrentUser);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequest.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n bankRequest.put(Constants.CLASS_TRANSACTIONS_RESOLUTION, false);\n bankRequest.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n mProgressBar.setVisibility(View.INVISIBLE);\n if (e == null) {\n\n bankRequestObject = new JSONObject();\n try {\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_FROM, mUserId);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_TYPE, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n bankRequestObject.put(Constants.CLASS_TRANSACTIONS_AMOUNT, Integer.parseInt(amount));\n } catch (JSONException el) {\n el.printStackTrace();\n }\n\n saveTransaction(amount, Constants.CLASS_TRANSACTIONS_TYPE_FUNDS_REQUEST_BANK);\n\n Logger.s(getApplicationContext(), getString(R.string.request_sent_message_txt));\n IntentUtils.startActivity(RequestFundsActivity.this, HomeActivity.class);\n finish();\n } else if (e.getCode() == ParseException.CONNECTION_FAILED || e.getCode() == ParseException.TIMEOUT) {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.network_timeout_message_txt));\n } else {\n mButton.setEnabled(true);\n Logger.s(getApplicationContext(), getString(R.string.general_error_message_txt));\n }\n }\n });\n }", "@Override\r\n public void pay() {\n }", "@Override\n\tpublic Json add(StoreRecharge storeRecharge, HttpSession session) {\n\t\tJson json = new Json();\n\t\ttry {\n\t\t\tMap<String, Object> variables = new HashMap<String, Object>();\n\t\t\tProcessInstance pi = runtimeService.startProcessInstanceByKey(\"storeRecharge\", variables);\n\t\t\t// 根据流程实例Id查询任务\n\t\t\tTask task = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).singleResult();\n\t\t\t// 完成 门店经理交押金申请\n\t\t\t\n\t\t\ttaskService.addComment(task.getId(), pi.getProcessInstanceId(), \" :1\");\n\t\t\ttaskService.complete(task.getId());\n\t\t\tString username = (String) session.getAttribute(CommonAttributes.Principal);\n\t\t\tHyAdmin hyAdmin = hyAdminService.find(username);\n\t\t\tDepartment department = hyAdmin.getDepartment();\n\t\t\tList<Filter> filters = new LinkedList<>();\n\t\t\tfilters.add(Filter.eq(\"department\", department));\n\t\t\tList<Store> stores = storeService.findList(null, filters, null);\n\t\t\tif (stores == null || stores.size() == 0) {\n\t\t\t\tjson.setSuccess(false);\n\t\t\t\tjson.setMsg(\"所属门店不存在\");\n\t\t\t} else {\n\t\t\t\tStore store = stores.get(0);\n\t\t\t\tstoreRecharge.setStore(store);\n\t\t\t}\n\t\t\tstoreRecharge.setOperator(hyAdmin);\n\t\t\tStoreAccountLog storeAccountLog = new StoreAccountLog();\n\t\t\tstoreAccountLog.setMoney(storeRecharge.getMoney());\n\t\t\tstoreAccountLog.setStore(storeRecharge.getStore());\n\t\t\tstoreAccountLog.setStatus(0);\n\t\t\tstoreAccountLog.setProfile(\"预存款充值\");\n\t\t\tstoreAccountLog.setType(0);\n\t\t\tstoreAccountLogService.save(storeAccountLog);\n\t\t\tstoreRecharge.setStoreAccountLogId(storeAccountLog.getId());\n\t\t\tstoreRecharge.setProcessInstanceId(task.getProcessInstanceId());\n\t\t\tstoreRecharge.setStatus(0);\t\t\t\n\t\t\tthis.save(storeRecharge);\n\t\t\tjson.setSuccess(true);\n\t\t\tjson.setMsg(\"申请成功\");\n\t\t} catch (Exception e) {\n\t\t\tjson.setSuccess(false);\n\t\t\tjson.setMsg(\"申请错误: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn json;\n\t}", "@Transactional(propagation=Propagation.REQUIRED)\n\tpublic double calcularExistencia(Producto producto,Almacen almacen,final Date fecha);", "String getTransactionId();", "String getTransactionId();", "long getSettlementDate();", "@Override\n public int getTotalBarangById(String idTransaksi) {\n int totalBarang = 0;\n\n try {\n String query = \"SELECT SUM(b.jml_barang) AS \\\"total_barang\\\" FROM transaksi a INNER JOIN detail_transaksi b ON a.id = b.id_transaksi\";\n query += \" WHERE a.id = ?\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ps.setString(1, idTransaksi);\n ResultSet rs = ps.executeQuery();\n\n if (rs.next()) {\n totalBarang = rs.getInt(1);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return totalBarang;\n }", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "abstract void updateRecurringTransactions(Ui ui) throws BankException;", "public void getPaySuccessData() {\n\n RetrofitNetNew.build(SCommonApi.class, getIdentifier()).get_my_paysuccess(BanbenUtils.getInstance().getVersion(), BanbenUtils.getInstance().getImei(), BanbenUtils.getInstance().getToken()).enqueue(new Callback<ResponseSlbBean<SPaySuccessBean>>() {\n @Override\n public void onResponse(Call<ResponseSlbBean<SPaySuccessBean>> call, Response<ResponseSlbBean<SPaySuccessBean>> response) {\n if (!hasView()) {\n return;\n }\n if (response.body() == null) {\n return;\n }\n if (response.body().getCode() != 0) {\n getView().OnPaySuccessNodata(response.body().getMsg());\n return;\n }\n getView().OnPaySuccessSuccess(response.body().getData());\n call.cancel();\n }\n\n @Override\n public void onFailure(Call<ResponseSlbBean<SPaySuccessBean>> call, Throwable t) {\n if (!hasView()) {\n return;\n }\n// String string = t.toString();\n String string = BanbenUtils.getInstance().net_tips;\n getView().OnPaySuccessFail(string);\n call.cancel();\n }\n });\n\n }", "private void pay(){\n //Calculating the new balance\n Integer value = Integer.parseInt(this.txtAmount.getText().toString());\n int result = this.balance - value;\n //The intent to be passed back.\n Intent data = new Intent(TransferActivity.this, MainActivity.class);\n //The bundle to be put into the intent.\n Bundle bundle = new Bundle();\n //Gets time of transaction\n Calendar cal = Calendar.getInstance();\n Date date = cal.getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n String formattedDate = dateFormat.format(date);\n //Fills bundle the needed data\n bundle.putInt(MainActivity.PARAM_INT_NAME, result);\n bundle.putString(MainActivity.PARAM_STRING_NAME, this.chosenName);\n bundle.putString(MainActivity.PARAM_DATE_NAME, formattedDate);\n data.replaceExtras(bundle);\n //Sets result and ends activity\n setResult(Activity.RESULT_OK, data);\n finish();\n }", "void tampilKarakterA();", "public boolean withdraw(long id, String password, String currency, double amount);", "public int cancelTranTx(TrantrnInput trantrn) {\n\t\tString companyID = trantrn.getCompanyID();\n\t\tString jobcd = trantrn.getTrantrn().getJob_cd();\n\t\tString inputno = trantrn.getTrantrn().getInput_no();\n\t\tString status = TrantrnMapper.getstatus(jobcd,inputno,companyID);\n\t\tif(!status.equals(\"1\")){\n\t\t\treturn 0;\n\t\t}\n\t\tint locknum = trantrn.getTrantrn().getLock_flg();\n\t\tint locknumnow=TrantrnMapper.queryLock(jobcd,companyID,inputno);\n\t\tif(locknumnow>locknum){\n\t\t\t return -1; \n\t\t }\n\t\tTrantrn tran = trantrn.getTrantrn();\n\t\ttran.setCancelconfirmdate(DateUtil.getNowTime());\n\t\ttran.setCancelconfirmemp(trantrn.getUserID());\n\t\ttran.setCompany_cd(trantrn.getCompanyID());\n\t\tList<JobLableTrn> jltrn = trantrn.getLableList();\n\t\tjobLandMapper.deleteByJobCd(null, trantrn.getTrantrn().getInput_no(), Integer.valueOf(companyID),\n\t\t\t\t\"orderlabeltrn\");\n\t\t if(jltrn==null||jltrn.size()==0) {\n\t\t \tjltrn = null;\n\t\t }else {\n\t\t \tfor(int i=0;i<jltrn.size();i++) {\n\t\t\t\t\tjltrn.get(i).setCostno(trantrn.getTrantrn().getInput_no());\n\t\t\t\t\tjltrn.get(i).setLablelevel(3);\n\t\t\t\t\tjltrn.get(i).setCompanycd(Integer.valueOf(trantrn.getCompanyID()));\n\t\t\t\t\tjltrn.get(i).setUpdDate(DateUtil.getNowTime());\n\t\t\t\t\tjltrn.get(i).setUpUsercd(trantrn.getUserID());\n\t\t\t\t\tjltrn.get(i).setAddDate(DateUtil.getNowTime());\n\t\t\t\t\tjltrn.get(i).setAddUsercd(trantrn.getUserID());\n\t\t \t}\n\t\t \t\n\t\t \tcostMapper.insertCostLable(jltrn);\n\t\t \t}\n\t\t TrantrnMapper.updateLock(jobcd,companyID,inputno);\n\t\treturn TrantrnMapper.cancelTran(tran);\n\t}", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "private final void d(com.iqoption.core.microservices.billing.response.deposit.d r21) {\n /*\n r20 = this;\n r0 = r20;\n r1 = r20.asp();\n r1 = r1.cCg;\n r2 = \"binding.depositAmountEdit\";\n kotlin.jvm.internal.i.e(r1, r2);\n if (r21 == 0) goto L_0x0158;\n L_0x000f:\n r2 = r0.cFG;\n r3 = 1;\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r2 = r1.getText();\n r2 = r2.toString();\n r4 = r0.cFG;\n r2 = kotlin.jvm.internal.i.y(r2, r4);\n r2 = r2 ^ r3;\n if (r2 == 0) goto L_0x0027;\n L_0x0025:\n goto L_0x0158;\n L_0x0027:\n r2 = r20.ass();\n r4 = 0;\n if (r2 == 0) goto L_0x0068;\n L_0x002e:\n r2 = (java.lang.Iterable) r2;\n r2 = r2.iterator();\n L_0x0034:\n r5 = r2.hasNext();\n if (r5 == 0) goto L_0x0050;\n L_0x003a:\n r5 = r2.next();\n r6 = r5;\n r6 = (com.iqoption.core.features.c.a) r6;\n r6 = r6.getName();\n r7 = r21.getName();\n r6 = kotlin.jvm.internal.i.y(r6, r7);\n if (r6 == 0) goto L_0x0034;\n L_0x004f:\n goto L_0x0051;\n L_0x0050:\n r5 = r4;\n L_0x0051:\n r5 = (com.iqoption.core.features.c.a) r5;\n if (r5 == 0) goto L_0x0068;\n L_0x0055:\n r6 = r5.Xy();\n if (r6 == 0) goto L_0x0068;\n L_0x005b:\n r7 = 0;\n r8 = 0;\n r9 = 1;\n r10 = 0;\n r11 = 0;\n r12 = 19;\n r13 = 0;\n r2 = com.iqoption.core.util.e.a(r6, r7, r8, r9, r10, r11, r12, r13);\n goto L_0x0069;\n L_0x0068:\n r2 = r4;\n L_0x0069:\n r5 = r0.ayL;\n if (r5 == 0) goto L_0x0084;\n L_0x006d:\n r5 = r5.Km();\n if (r5 == 0) goto L_0x0084;\n L_0x0073:\n r5 = r5.aar();\n if (r5 == 0) goto L_0x0084;\n L_0x0079:\n r6 = r21.getName();\n r5 = r5.get(r6);\n r5 = (java.util.ArrayList) r5;\n goto L_0x0085;\n L_0x0084:\n r5 = r4;\n L_0x0085:\n if (r2 != 0) goto L_0x00a5;\n L_0x0087:\n if (r5 == 0) goto L_0x00a5;\n L_0x0089:\n r2 = r20.asr();\n r2 = r2.getItems();\n r2 = kotlin.collections.u.bV(r2);\n r2 = (com.iqoption.deposit.light.d.b) r2;\n if (r2 == 0) goto L_0x00a4;\n L_0x0099:\n r2 = r2.asL();\n if (r2 == 0) goto L_0x00a4;\n L_0x009f:\n r2 = com.iqoption.deposit.f.a(r2);\n goto L_0x00a5;\n L_0x00a4:\n r2 = r4;\n L_0x00a5:\n r6 = r0.cxs;\n r7 = r0.cFE;\n r8 = r4;\n r8 = (java.lang.Double) r8;\n if (r2 != 0) goto L_0x00f4;\n L_0x00ae:\n r9 = r6 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r9 == 0) goto L_0x00f4;\n L_0x00b2:\n if (r7 == 0) goto L_0x00f4;\n L_0x00b4:\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r6;\n r6 = r6.aaI();\n if (r6 == 0) goto L_0x00cd;\n L_0x00bc:\n r7 = r7.getName();\n r6 = r6.get(r7);\n r6 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d.b) r6;\n if (r6 == 0) goto L_0x00cd;\n L_0x00c8:\n r6 = r6.OL();\n goto L_0x00ce;\n L_0x00cd:\n r6 = r4;\n L_0x00ce:\n if (r6 == 0) goto L_0x00f5;\n L_0x00d0:\n r7 = r0.f(r6);\n if (r7 != 0) goto L_0x00f5;\n L_0x00d6:\n r8 = r6.doubleValue();\n r10 = 0;\n r11 = 0;\n r12 = 1;\n r13 = 0;\n r14 = 0;\n r15 = 0;\n r16 = 0;\n r2 = java.util.Locale.US;\n r7 = \"Locale.US\";\n kotlin.jvm.internal.i.e(r2, r7);\n r18 = 115; // 0x73 float:1.61E-43 double:5.7E-322;\n r19 = 0;\n r17 = r2;\n r2 = com.iqoption.core.util.e.a(r8, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19);\n goto L_0x00f5;\n L_0x00f4:\n r6 = r8;\n L_0x00f5:\n if (r2 == 0) goto L_0x00f8;\n L_0x00f7:\n goto L_0x00fa;\n L_0x00f8:\n r2 = \"\";\n L_0x00fa:\n r0.cFG = r2;\n r2 = (java.lang.CharSequence) r2;\n r1.setText(r2);\n r1 = r2.length();\n r2 = 0;\n if (r1 != 0) goto L_0x010a;\n L_0x0108:\n r1 = 1;\n goto L_0x010b;\n L_0x010a:\n r1 = 0;\n L_0x010b:\n if (r1 == 0) goto L_0x0155;\n L_0x010d:\n r1 = r0.cxs;\n r7 = r1 instanceof com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d;\n if (r7 != 0) goto L_0x0114;\n L_0x0113:\n r1 = r4;\n L_0x0114:\n r1 = (com.iqoption.core.microservices.billing.response.deposit.cashboxitem.d) r1;\n if (r1 == 0) goto L_0x011e;\n L_0x0118:\n r1 = r1.aaE();\n if (r1 == r3) goto L_0x0155;\n L_0x011e:\n if (r6 == 0) goto L_0x0122;\n L_0x0120:\n r1 = r6;\n goto L_0x0138;\n L_0x0122:\n if (r5 == 0) goto L_0x0137;\n L_0x0124:\n r5 = (java.util.List) r5;\n r1 = kotlin.collections.u.bV(r5);\n r1 = (com.iqoption.core.microservices.billing.response.deposit.e) r1;\n if (r1 == 0) goto L_0x0137;\n L_0x012e:\n r5 = r1.ZC();\n r1 = java.lang.Double.valueOf(r5);\n goto L_0x0138;\n L_0x0137:\n r1 = r4;\n L_0x0138:\n if (r1 == 0) goto L_0x013b;\n L_0x013a:\n goto L_0x0141;\n L_0x013b:\n r5 = 0;\n r1 = java.lang.Double.valueOf(r5);\n L_0x0141:\n r1 = r0.f(r1);\n if (r1 == 0) goto L_0x014b;\n L_0x0147:\n r4 = r1.getErrorMessage();\n L_0x014b:\n if (r1 == 0) goto L_0x0151;\n L_0x014d:\n r2 = r1.aso();\n L_0x0151:\n r0.u(r4, r2);\n goto L_0x0158;\n L_0x0155:\n r0.u(r4, r2);\n L_0x0158:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.d(com.iqoption.core.microservices.billing.response.deposit.d):void\");\n }", "private void deposit() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at indsætte: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n moneyController(userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Deposited\");\n }" ]
[ "0.6668743", "0.60066307", "0.5822365", "0.5766976", "0.566922", "0.56686634", "0.5661163", "0.5656838", "0.56464046", "0.5635043", "0.5519854", "0.54968673", "0.5491473", "0.5480303", "0.54712385", "0.5444254", "0.54421866", "0.5426366", "0.54187787", "0.53576005", "0.53534573", "0.5323279", "0.53229326", "0.5317461", "0.53077006", "0.5297256", "0.528768", "0.5284416", "0.5280228", "0.52634776", "0.5257631", "0.5243862", "0.52281255", "0.5212026", "0.52078015", "0.5174818", "0.5170543", "0.51657486", "0.5154887", "0.51546633", "0.5149213", "0.5131362", "0.51233655", "0.51222426", "0.51212895", "0.5117151", "0.51167095", "0.51146495", "0.5113091", "0.5104086", "0.51005554", "0.50998044", "0.50963396", "0.50893897", "0.5081821", "0.50739545", "0.5072847", "0.5060639", "0.5056778", "0.50519437", "0.504645", "0.50435513", "0.50387", "0.50264555", "0.5025581", "0.5023988", "0.5022394", "0.5017936", "0.50149935", "0.50147265", "0.5011531", "0.5008919", "0.5005505", "0.5003482", "0.4995877", "0.49943396", "0.4989275", "0.49870875", "0.4986271", "0.4986145", "0.4983313", "0.49817392", "0.49811804", "0.49805897", "0.49749407", "0.49742848", "0.49722594", "0.49722594", "0.4969585", "0.4968637", "0.49676874", "0.49656624", "0.4963715", "0.49633837", "0.49585423", "0.49564633", "0.49542347", "0.49498236", "0.4948399", "0.49446812" ]
0.5418567
19
/ Metoda za konkretno placanje, to be implemented
@RequestMapping(path="/checkout/{order_id}/{idMagazine}", method = RequestMethod.POST, produces = "application/json", consumes = "application/json") public ResponseEntity<Object> checkout(@PathVariable Integer order_id, @PathVariable Long idMagazine) { logger.info("Init checkout"); CheckoutResponseDTO checkoutDTO = new CheckoutResponseDTO(); SellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(idMagazine); System.out.println("ADDRESS " + sbi.getBitcoinAddress()); String token = sbi.getBitcoinAddress(); String authToken = "Bearer " + token; //trebali bismo da kreiramo transakciju koja ce biti u stanju "pending" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme //txRepo.save(tx); //RestTemplate restTemplate = new RestTemplate(); //restTemplate.getForEntity("https://google.rs", String.class); //restTemplate.getForEntity("https://api.coingate.com/v2/ping", String.class); HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", authToken); ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders" + Integer.toString(order_id), HttpMethod.POST, new HttpEntity<Object>(checkoutDTO, headers), Object.class); logger.info(responseEntity.getBody().toString()); ObjectMapper mapper = new ObjectMapper(); mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); CheckoutResponseDTO btcResponse = new CheckoutResponseDTO(); btcResponse = mapper.convertValue(responseEntity.getBody(), CheckoutResponseDTO.class); String paymentUrl = btcResponse.getPayment_url(); logger.info(paymentUrl); //BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString()); //BitCoinResponseDTO responseDTO = responseEntity.; //String pageToRedirec = responseDTO.getPayment_url(); //restTemplate.exchange //ResponseEntity<String> response = restTemplate.postForEntity("https://api-sandbox.coingate.com/v2/orders", btcDTO, String.class); return new ResponseEntity<Object>(responseEntity,HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "public Pitonyak_09_02() {\r\n }", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "private UsineJoueur() {}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public PregledPoruka() {\n preuzmiMape();\n preuzmiPoruke();\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public PrnPrivitakVo() {\r\n\t\tsuper();\r\n\t}", "public void sendeSpielfeld();", "public AntrianPasien() {\r\n\r\n }", "private stendhal() {\n\t}", "public SlanjePoruke() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\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}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Plato(){\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void getExras() {\n }", "private ControleurAcceuil(){ }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic boolean vender(String placa) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public void Ordenamiento() {\n\n\t}", "public void asetaTeksti(){\n }", "public Kullanici() {}", "public PlatzVerkaufsWerkzeug()\r\n\t{\r\n\t\t_ui = new PlatzVerkaufsWerkzeugUI();\r\n\t\tregistriereUIAktionen();\r\n\t\t// Am Anfang wird keine Vorstellung angezeigt:\r\n\t\tsetVorstellung(null);\r\n//\t\t_auswahl = new Map<Platz, Boolean>; Alternative mit Map\r\n\t}", "public abstract String dohvatiKontakt();", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public PanCoperti() {\n /* rimanda al costruttore della superclasse */\n super(Layout.ORIENTAMENTO_ORIZZONTALE);\n\n\n try { // prova ad eseguire il codice\n\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n\n } catch (Exception unErrore) { // intercetta l'errore\n new Errore(unErrore);\n }// fine del blocco try-catch\n }", "public Pasien() {\r\n }", "private void remplirPrestaraireData() {\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public void trenneVerbindung();", "private DittaAutonoleggio(){\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected Asignatura()\r\n\t{}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "private QuadradoPerfeito() {\n }", "@Override\r\n public String toString() {\r\n// ritorna una stringa\r\n return \"pollo\";\r\n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\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}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Test\r\n public void testSetPracownik() {\r\n System.out.println(\"setPracownik\");\r\n Pracownik pracownik = null;\r\n Faktura instance = new Faktura();\r\n instance.setPracownik(pracownik);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void recreo() {\n\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\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n\n }", "@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}", "public final void nonRedefinissableParEnfant(){\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\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\r\n\tpublic void preparer() {\n\t\tSystem.out.println(\"Carre preparer\");\r\n\t}", "@Override\n public void prepare() {\n System.out.println(\"Add Pepporonie!!\");\n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void inizializza() {\n Navigatore nav;\n Portale portale;\n\n super.inizializza();\n\n try { // prova ad eseguire il codice\n\n Modulo modulo = getModuloRisultati();\n modulo.inizializza();\n// Campo campo = modulo.getCampoChiave();\n// campo.setVisibileVistaDefault(false);\n// campo.setPresenteScheda(false);\n// Vista vista = modulo.getVistaDefault();\n// vista.getElement\n// Campo campo = vista.getCampo(modulo.getCampoChiave());\n\n\n\n /* aggiunge il Portale Navigatore al pannello placeholder */\n nav = this.getNavigatore();\n portale = nav.getPortaleNavigatore();\n this.getPanNavigatore().add(portale);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "Compleja createCompleja();", "public static void main(String[] args) {\n Punto p1 = new Punto(2, 2);\r\n Punto p2 = new Punto(1, 4);\r\n Punto p3 = new Punto(5, 2);\r\n Punto p4 = new Punto(10, 1);\r\n \r\n Datos d1 = new Datos();\r\n d1.add(p1);\r\n d1.add(p2);\r\n d1.add(p3);\r\n d1.add(p4);\r\n \r\n System.out.println(\"Distancia Media: \"+d1.distanciaMedia());\r\n \r\n \r\n // -- Act 2 Test\r\n //Correcta: Una librería para construir interfaces gráficas\r\n \r\n // -- Act 3 insertaPaisCiudad\r\n PaisCiudades pc = new PaisCiudades();\r\n System.out.println(\"Insertamos: España, Granada. ¿Inserto?: \"+pc.insertaPaisCiudad(\"España\", \"Granada\"));\r\n System.out.println(\"Insertamos: España, Zaidin. ¿Inserto?: \"+pc.insertaPaisCiudad(\"España\", \"Zaidin\"));\r\n System.out.println(\"Insertamos: PatataLandia, Huerto de Patatas. ¿Inserto?: \"+pc.insertaPaisCiudad(\"PatataLandia\", \"Huerto de Patatas\"));\r\n \r\n System.out.println(\"HashMap: \\n\"+pc.toString());\r\n \r\n // -- Act 4 Test\r\n //Correcta: public class Componente implements Printable\r\n \r\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private TMCourse() {\n\t}", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}" ]
[ "0.66657645", "0.65054893", "0.64701366", "0.6398407", "0.6393092", "0.63543695", "0.63432807", "0.6265124", "0.62307096", "0.62176293", "0.6195965", "0.6146808", "0.61309886", "0.6122964", "0.61209697", "0.61023116", "0.6068367", "0.6025106", "0.6020756", "0.6007963", "0.60034686", "0.5981769", "0.59631324", "0.59607285", "0.59607285", "0.5958071", "0.5955493", "0.59534407", "0.5948109", "0.59422094", "0.592817", "0.5925008", "0.5912954", "0.5895289", "0.5886923", "0.5878312", "0.58724624", "0.58611226", "0.58599085", "0.5857985", "0.5840078", "0.5827692", "0.5824542", "0.5823508", "0.5814334", "0.5804925", "0.57962763", "0.57926774", "0.5784032", "0.57668126", "0.57602656", "0.5759254", "0.57554114", "0.5735714", "0.57221466", "0.57199484", "0.5718418", "0.5717631", "0.5706955", "0.5705207", "0.57028073", "0.569476", "0.5692148", "0.56909746", "0.56788164", "0.56751007", "0.5668406", "0.5668406", "0.56672883", "0.5663121", "0.5660638", "0.5660638", "0.5660638", "0.5660638", "0.5660638", "0.5660638", "0.56548285", "0.56532586", "0.56477916", "0.56399846", "0.5639385", "0.5639385", "0.5639385", "0.5637422", "0.56333697", "0.5627189", "0.5627189", "0.5627189", "0.5627189", "0.5627189", "0.56270385", "0.56219", "0.5620487", "0.56159335", "0.5615553", "0.5614247", "0.5613764", "0.5612565", "0.5609375", "0.5608549", "0.56054455" ]
0.0
-1
/ Metoda koja svakih 2 min (15 sekundi radi demonstracije rada) proverava da li je transakcija prosla na coingateu.
@Scheduled(fixedDelay = 15000) public void scheduleFixedDelayTask() { List<Tx> listaTx = txRepo.findAll(); for (Tx tx : listaTx) { if(tx.getStatus().equals(TxStatus.PENDING)) { System.out.println( "Fixed delay task - " + System.currentTimeMillis() / 20000); //to be implemented String auth = "Bearer " + tx.getSbi().getBitcoinAddress(); HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", auth); Integer orderId = tx.getorder_id(); GetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO(); ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders/" + orderId, HttpMethod.GET, new HttpEntity<Object>(getOrderDTO, headers), Object.class); ObjectMapper mapper = new ObjectMapper(); mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); GetOrderResponseDTO gorResponse = new GetOrderResponseDTO(); gorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class); System.out.println("Order status: " + gorResponse.getStatus()); if(gorResponse.getStatus().equals("paid") || gorResponse.getStatus().equals("invalid") || gorResponse.getStatus().equals("expired") || gorResponse.getStatus().equals("canceled")) { //naredne tri linije mi nisu nista jasne zasto sam ovo radio pre mesec dana Tx tx2 = new Tx(); tx2 = txRepo.findByusername(gorResponse.getId()); System.out.println("TX: " + tx2.getorder_id()); RestTemplate restTemplate = new RestTemplate(); TxInfoDto txInfo; if(gorResponse.getStatus().equals("paid")) { tx.setStatus(TxStatus.PAID); txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.SUCCESS, "https://localhost:8764/bitCoin"); } else if(gorResponse.getStatus().equals("invalid")) { tx.setStatus(TxStatus.FAILED); txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, "https://localhost:8764/bitCoin"); } else if(gorResponse.getStatus().equals("expired")){ tx.setStatus(TxStatus.EXPIRED); txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.FAILED, "https://localhost:8764/bitCoin"); } else { tx.setStatus(TxStatus.CANCELED); txInfo = new TxInfoDto(tx.getorder_id(), TxStatusReqHandler.ERROR, "https://localhost:8764/bitCoin"); } txRepo.save(tx); ResponseEntity<TxInfoDto> r = restTemplate.postForEntity("https://localhost:8111/request/updateTxAfterPaymentIsFinished", txInfo, TxInfoDto.class); } } else { System.out.println("Nikom nista"); logger.info("Scheduled is working..."); } } System.out.println("Nema transakcija :("); /* if(IS_CREATE) { System.out.println( "Fixed delay task - " + System.currentTimeMillis() / 20000); String authToken = STATIC_TOKEN; HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", authToken); System.out.println("authtoken : " + authToken); GetOrderResponseDTO getOrderDTO = new GetOrderResponseDTO(); ResponseEntity<Object> responseEntity = new RestTemplate().exchange("https://api-sandbox.coingate.com/v2/orders/" + STATIC_ID, HttpMethod.GET, new HttpEntity<Object>(getOrderDTO, headers), Object.class); ObjectMapper mapper = new ObjectMapper(); mapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); GetOrderResponseDTO gorResponse = new GetOrderResponseDTO(); gorResponse = mapper.convertValue(responseEntity.getBody(), GetOrderResponseDTO.class); System.out.println("Order status: " + gorResponse.getStatus()); if(gorResponse.getStatus().equals("paid") || gorResponse.getStatus().equals("invalid") || gorResponse.getStatus().equals("expired")) { /*Tx tx = new Tx(); tx = txRepo.findByOrder_Id(gorResponse.getId()); System.out.println("TX: " + tx.getorder_id()); if(gorResponse.getStatus().equals("paid")) { //promenimo u bazi //txRepo.getOne((Integer)gorResponse.getId()); tx.setStatus(TxStatus.PAID); } else if(gorResponse.getStatus().equals("invalid")) { tx.setStatus(TxStatus.FAILED); } else { tx.setStatus(TxStatus.EXPIRED); } txRepo.save(tx);*/ /* IS_CREATE = false; } } else { System.out.println("Nikom nista"); logger.info("Scheduled is working..."); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public transaksi() {\n initComponents();\n judul();\n tampildata();\n judulbarang();\n tampilbarang();\n reset();\n autokode();\n total();\n lkembali.setText(\"Rp. 0\");\n bcek.requestFocus();\n ltgl.setText(hari); \n bhapus.setVisible(false);\n bedit.setVisible(false);\n bbeli.setVisible(true);\n breset.setVisible(true);\n }", "@Transactional\r\n\tpublic String aktiviraj(Long id) {\n\r\n\t\tClanPaket clpak = clanPaketDao.findById(id).get();\r\n\t\tif (clpak.getIstice() == null) {\r\n\t\t\t// long sad = System.currentTimeMillis();\r\n\t\t\tDate pp = new java.util.Date();\r\n\t\t\tInstant instant = pp.toInstant();\r\n\r\n\t\t\t// 1 sat =3600*1000milisec. ovde vreme u minutama cuvamo\r\n\t\t\t// String output = instantHourLater.toString();\r\n\r\n\t\t\tInteger istice = clpak.getPaket().getTrajanje();\r\n\t\t\tDuration duration = Duration.ofMinutes(istice);\r\n\t\t\tInstant kasnije = instant.plus(duration);\r\n\t\t\tDate enddat = Date.from(kasnije);\r\n\t\t\tclpak.setIstice(enddat);\r\n\t\t\t// mozda vratiti poruku aktivirano\r\n\t\t\tclanPaketDao.saveAndFlush(clpak);\r\n\t\t\treturn \"Aktiviran paket\";\r\n\t\t} else {\r\n\t\t\treturn \"Paket sa tim brojem je vec aktiviran.Zvacu policiju\";\r\n\r\n\t\t}\r\n\r\n\t}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "@Override\r\n\tpublic Map<String,String> updateMinutesPaypal(StudentProfileDetail studentProfileDetail,\r\n\t\t\tString buyMin) {\r\n\t\tPlanRate planRate=daoPlanRate.getPlanRateByCountryAndPlanMaster(studentProfileDetail.getCountryMaster().getCountry_Id(), 4);\r\n\t\t\r\n\t\tif(planRate==null){\r\n\t\t\tplanRate=daoPlanRate.getPlanRateByCountryIdIsNullAndPlanID(4);\r\n\t\t}\r\n\t\t Map<String, String> map = new HashMap<String, String>();\t\r\n\t\t int buyMinute = Integer.parseInt(buyMin);\r\n\t\t String message=null;\r\n\t\t String myKey=\"\";\r\n\t\t double rate=planRate.getRate();\r\n\t \t\t\r\n\t \t\tswitch (buyMinute){\r\n\t \t\tcase 15:\r\n\t \t\t\trate=rate/4;\r\n\t \t\t\tbreak;\r\n\t \t\tcase 30:\r\n\t \t\t\trate=rate/2;\r\n\t \t\t\tbreak;\r\n\t \t\tcase 45:\r\n\t \t\t\trate=rate*3/4;\r\n\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\r\n\t\t \r\n\t\t\r\n\t\tPayRequest payRequest = new PayRequest();\r\n\t\tList<Receiver> receivers = new ArrayList<Receiver>();\r\n\t\tReceiver receiver = new Receiver();\r\n\t\treceiver.setAmount(rate);\r\n\t\treceiver.setEmail(receiverEmail);\r\n\t\treceivers.add(receiver);\r\n\t\tReceiverList receiverList = new ReceiverList(receivers);\r\n\t\tpayRequest.setReceiverList(receiverList);\r\n\t\tRequestEnvelope requestEnvelope = new RequestEnvelope(\"es_XC\");\r\n\t\tpayRequest.setRequestEnvelope(requestEnvelope); \r\n\t\tpayRequest.setActionType(\"PAY\");\r\n\t\tpayRequest.setCancelUrl(cancelURL);\r\n\t\tpayRequest.setReturnUrl(returnURL+\"=\"+buyMin);\r\n\t\t\r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\tpayRequest.setCurrencyCode(\"USD\");\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\tpayRequest.setCurrencyCode(\"MXN\");\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\tpayRequest.setCurrencyCode(\"EUR\");\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tMap<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\tsdkConfig.put(\"mode\", mode);\r\n\t\tsdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\tsdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\tsdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\tsdkConfig.put(\"acct1.AppId\",acctAppId);\r\n\r\n\t\tAdaptivePaymentsService adaptivePaymentsService = new AdaptivePaymentsService(sdkConfig);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPayResponse payResponse = adaptivePaymentsService.pay(payRequest);\r\n\t\t\t \r\n\t\t\t myKey=payResponse.getPayKey();\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\tmessage = e.getMessage();\r\n\t\t}\t\r\n\t\t\r\n\t\t\tmap.put(\"msg\", message);\r\n\t\t\tmap.put(\"key\", myKey);\r\n\t\t\r\n\t\treturn map;\r\n\t\t\r\n\t}", "private static void verifPayement(){\n\t\tint x,y, dime;\n\t\tx=jeu.getAssam().getXPion()-1;\n\t\ty=jeu.getAssam().getYPion()-1;\n\t\tint caseInfoTapis = jeu.cases[x][y].getCouleurTapis();\n\t\tif(caseInfoTapis == tour || caseInfoTapis == 0){\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\tdime = jeu.payerDime(caseInfoTapis,x,y,0,new boolean[7][7]);\n\t\t\tJoueur payeur = jeu.getJoueurs()[tour-1];\n\t\t\tJoueur paye = jeu.getJoueurs()[caseInfoTapis-1];\n\t\t\tif(jeu.payerVraimentDime(payeur,paye,dime)){\n\t\t\t\tjoueurElimine++;\n\t\t\t}\n\t\t\tconsole.afficherPayeurPaye(payeur, paye, dime);\n\t\t}\n\t}", "public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }", "public int actualizarTiempo(int empresa_id,int idtramite, int usuario_id) throws ParseException {\r\n\t\tint update = 0;\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\tString timeNow = formateador.format(date);\r\n\t\tSimpleDateFormat formateador2 = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString fecha = formateador2.format(date);\r\n\t\tSimpleDateFormat formateador3 = new SimpleDateFormat(\"hh:mm:ss\");\r\n\t\tString hora = formateador3.format(date);\r\n\t\tSystem.out.println(timeNow +\" \"+ fecha+\" \"+hora );\r\n\t\t\r\n\t\t List<Map<String, Object>> rows = listatks(empresa_id, idtramite);\t\r\n\t\t System.out.println(rows);\r\n\t\t if(rows.size() > 0 ) {\r\n\t\t\t String timeCreate = rows.get(0).get(\"TIMECREATE_HEAD\").toString();\r\n\t\t\t System.out.println(\" timeCreate \" +timeCreate+\" timeNow: \"+ timeNow );\r\n\t\t\t Date fechaInicio = formateador.parse(timeCreate); // Date\r\n\t\t\t Date fechaFinalizo = formateador.parse(timeNow); //Date\r\n\t\t\t long horasFechas =(long)((fechaInicio.getTime()- fechaFinalizo.getTime())/3600000);\r\n\t\t\t System.out.println(\" horasFechas \"+ horasFechas);\r\n\t\t\t long diferenciaMils = fechaFinalizo.getTime() - fechaInicio.getTime();\r\n\t\t\t //obtenemos los segundos\r\n\t\t\t long segundos = diferenciaMils / 1000;\t\t\t \r\n\t\t\t //obtenemos las horas\r\n\t\t\t long horas = segundos / 3600;\t\t\t \r\n\t\t\t //restamos las horas para continuar con minutos\r\n\t\t\t segundos -= horas*3600;\t\t\t \r\n\t\t\t //igual que el paso anterior\r\n\t\t\t long minutos = segundos /60;\r\n\t\t\t segundos -= minutos*60;\t\t\t \r\n\t\t\t System.out.println(\" horas \"+ horas +\" min\"+ minutos+ \" seg \"+ segundos );\r\n\t\t\t double tiempoTotal = Double.parseDouble(horas+\".\"+minutos);\r\n\t\t\t // actualizar cabecera \r\n\t\t\t updateHeaderOut( idtramite, fecha, hora, tiempoTotal, usuario_id);\r\n\t\t\t for (Map<?, ?> row : rows) {\r\n\t\t\t\t Map<String, Object> mapa = new HashMap<String, Object>();\r\n\t\t\t\tint idd = Integer.parseInt(row.get(\"IDD\").toString());\r\n\t\t\t\tint idtramite_d = Integer.parseInt(row.get(\"IDTRAMITE\").toString());\r\n\t\t\t\tint cantidaMaletas = Integer.parseInt(row.get(\"CANTIDAD\").toString());\r\n\t\t\t\tdouble precio = Double.parseDouble(row.get(\"PRECIO\").toString());\t\t\t\t\r\n\t\t\t\tdouble subtotal = subtotal(precio, tiempoTotal, cantidaMaletas);\r\n\t\t\t\tString tipoDescuento = \"\";\r\n\t\t\t\tdouble porcDescuento = 0;\r\n\t\t\t\tdouble descuento = descuento(subtotal, porcDescuento);\r\n\t\t\t\tdouble precioNeto = precioNeto(subtotal, descuento);\r\n\t\t\t\tdouble iva = 0;\r\n\t\t\t\tdouble montoIVA = montoIVA(precioNeto, iva);\r\n\t\t\t\tdouble precioFinal = precioFinal(precioNeto, montoIVA);\r\n\t\t\t\t//actualizar detalle\r\n\t\t\t\tupdateBodyOut( idd, idtramite_d, tiempoTotal , subtotal, tipoDescuento, porcDescuento, descuento, precioNeto, iva, montoIVA, precioFinal );\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\treturn update;\r\n\t}", "@SuppressWarnings(\"unused\")\r\n\t@Override\r\n\tpublic String buyMinutesPaypal(StudentProfileDetail studentProfileDetail,\r\n\t\t\tString selectMin, int planId) {\r\n\t\tPlanRate planRate=daoPlanRate.getPlanRateByCountryAndPlanMaster(studentProfileDetail.getCountryMaster().getCountry_Id(), 4);\r\n\t\t\r\n\t\tif(planRate==null){\r\n\t\t\tplanRate=daoPlanRate.getPlanRateByCountryIdIsNullAndPlanID(4);\r\n\t\t}\r\n\t\t int buyMinute = Integer.parseInt(selectMin);\r\n\t\t String message=null;\r\n\t\t String myKey=\"\";\r\n\t\t double rate=planRate.getRate();\r\n\t \t\t\r\n\t \t\tswitch (buyMinute){\r\n\t \t\tcase 15:\r\n\t \t\t\trate=rate/4;\r\n\t \t\t\tbreak;\r\n\t \t\tcase 30:\r\n\t \t\t\trate=rate/2;\r\n\t \t\t\tbreak;\r\n\t \t\tcase 45:\r\n\t \t\t\trate=rate*3/4;\r\n\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\r\n\t\t \r\n\t\t\r\n\t\tPayRequest payRequest = new PayRequest();\r\n\t\tList<Receiver> receivers = new ArrayList<Receiver>();\r\n\t\tReceiver receiver = new Receiver();\r\n\t\treceiver.setAmount(rate);\r\n\t\treceiver.setEmail(receiverEmail);\r\n\t\treceivers.add(receiver);\r\n\t\tReceiverList receiverList = new ReceiverList(receivers);\r\n\t\tpayRequest.setReceiverList(receiverList);\r\n\t\tRequestEnvelope requestEnvelope = new RequestEnvelope(\"es_XC\");\r\n\t\tpayRequest.setRequestEnvelope(requestEnvelope); \r\n\t\tpayRequest.setActionType(\"PAY\");\r\n\t\tpayRequest.setCancelUrl(cancelUrlRegister);\r\n\t\tpayRequest.setReturnUrl(returnURLRegister+\"?userId=\"+studentProfileDetail.getUser().getUser_Id()+\"&planId=\"+planId+\"&buyMin=\"+selectMin);\r\n\t\t\r\n\t\tString currencyName=studentProfileDetail.getCountryMaster().getCurrency().getCurrencyName();\r\n\t\tif(currencyName.equalsIgnoreCase(\"US\")){\r\n\t\tpayRequest.setCurrencyCode(\"USD\");\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"MXN\")){\r\n\t\t\tpayRequest.setCurrencyCode(\"MXN\");\r\n\t\t}\r\n\t\telse if(currencyName.equalsIgnoreCase(\"EURO\")){\r\n\t\t\tpayRequest.setCurrencyCode(\"EUR\");\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tMap<String, String> sdkConfig = new HashMap<String, String>();\r\n\t\tsdkConfig.put(\"mode\", mode);\r\n\t\tsdkConfig.put(\"acct1.UserName\", acctUserName);\r\n\t\tsdkConfig.put(\"acct1.Password\", acctPassword);\r\n\t\tsdkConfig.put(\"acct1.Signature\",acctSignature);\r\n\t\tsdkConfig.put(\"acct1.AppId\",acctAppId);\r\n\r\n\t\tAdaptivePaymentsService adaptivePaymentsService = new AdaptivePaymentsService(sdkConfig);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPayResponse payResponse = adaptivePaymentsService.pay(payRequest);\r\n\t\t\t \r\n\t\t\t myKey=payResponse.getPayKey();\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\tmessage = e.getMessage();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn myKey;\r\n\t}", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner leer = new Scanner(System.in);\r\n \r\n System.out.println(\"Ingrese #Cuenta del cliente A: \");\r\n cuentaA = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese #Cuenta del cliente B: \");\r\n cuentaB = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese monto a trasferir: \");\r\n monto = parseInt(leer.nextLine());\r\n System.out.println(\"Ingrese el banco de destino: \"); \r\n banco = leer.nextLine();\r\n \r\n\r\n if((cuentaA==cuentaCliente)&&(banco==bancoCliente)&&(saldoCliente>monto)&&(saldoCliente>costoTransaccion)&&(hora>=9 && hora <=12)||(hora>=15&&hora <=20))//comprobar cuentas\r\n {\r\n if((cuentaB==cuentaDestino))\r\n {\r\n costoTransaccion = 100;\r\n }\r\n else\r\n {\r\n costoTransaccion = 0;\r\n }\r\n aprobado=true;\r\n montoTransaccion = monto;\r\n System.out.println(\"Transaccion de: \"+montoTransaccion+ \" exitosa\"+\" Costo de transaccion: \"+costoTransaccion+ \"\");\r\n System.out.println(\"Saldo anterior del cliente: \"+saldoCliente+\"\\n\"+\"Saldo Actual del cliente: \"+(saldoCliente - costoTransaccion));\r\n }\r\n }", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "private void gettime(){\n\t\t String depart_time = view.shpmTable.getSelection()[0].getAttribute(\"DEPART_TIME\");\n\t\t String unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n\t\t if(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t}else {\n\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t}\n\t\t /*Util.db_async.getSingleRecord(\"MAX(DEPART_TIME)\", \"V_SHIPMENT_HEADER\", \" WHERE LOAD_NO='\"+load_no+\"'\", null, new AsyncCallback<HashMap<String,String>>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSuccess(HashMap<String, String> result) {\n\t\t\t\tString depart_time = result.get(\"MAX(DEPART_TIME)\");\n\t\t\t\tString unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n//\t\t\t\tboolean x =DateUtil.isAfter(unload_time, depart_time);\n\t\t\t\tif(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t\t}else {\n\t\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});*/\n\t}", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "private void xuLyThemSD(){\n if (checkNgay(txtNgaySD.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải thuộc dạng [YYYY-MM-DD].\\n Vui lòng kiểm tra lại!\");\n txtNgaySD.requestFocus();\n return;\n }//kiem tra ngay su dung\n \n if (checkGia(txtGiaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải là ký tự số.\\n Vui lòng kiểm tra lại!\");\n txtGiaDV.requestFocus();\n return;\n }//kiem tra gia dich vu\n \n \n SuDungService suDungService = new SuDungService();\n int x = suDungService.themSuDung(cbbMaDV.getSelectedItem().toString(),\n cbbMaKH.getSelectedItem().toString(),\n txtNgaySD.getText(), Float.valueOf(txtGiaDV.getText()));\n \n if (x>0){\n hienThiSuDung();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n cbbMaDV.requestFocus();\n return;\n }\n }", "public void denda()\n {\n transaksi.setDenda(true);\n }", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "public static void main(String[] args) {\n LocalDateTime termino = LocalDateTime.now();\n if (termino.getHour() >= 17) {\n if(termino.getMinute() >= 31){\n System.out.println(\"Ar-Condicionado Ligado + produto.getSala()\");\n }\n }\n if(termino.getDayOfWeek().getValue() != 7){\n //depois de consultar no banco e dar o alerta, mudar o atributo leituraAlerta no banco para true\n \n }\n \n }", "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "@Override\n public void onSucceed(String json) {\n GetGoldTimeResponse response = new Gson().fromJson(json, GetGoldTimeResponse.class);\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_NUMBERS,response.getData().getCount());//保存获取金币次数\n\n UserSpCache.getInstance(mContext).putInt(UserSpCache.GOLD_TIME ,response.getData().getGold_time());\n if (response.getData().getTime_difference() != 0) {\n mAddColdView.showGoldTime(response.getData().getTime_difference());\n }\n }", "private void trade_shortsell() {\n\t\ttext_code.setText(code);\n\t\t\n\t\tDecimalFormat df=new DecimalFormat(\"#.00\");\n\t\ttext_uprice.setText(df.format(Double.parseDouble(information[2])*1.1) );//涨停价\n\t\t\n\t\ttext_downprice.setText(df.format(Double.parseDouble(information[2])*0.9));//跌停价\n\t\t\n\t\t//getfundown().setText(homepage.get_table_userinfo().getItem(1).getText(1));//可用资金\n\t\t\n\t\t//double d1 = Double.parseDouble(homepage.get_table_userinfo().getItem(1).getText(1));\n\t\t//double d2 = Double.parseDouble(information[3]);\n\t\t//text_limitnum.setText(Integer.toString( (int)(d1/d2) ) );//可卖数量\n\t\t\n\n\t}", "@Scheduled(fixedRate = 19000)\n public void tesk() {\n\t\tDateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\");\n DateFormat tf =new SimpleDateFormat(\"HH:mm\");\n\t\t// Get the date today using Calendar object.\n\t\tDate today = Calendar.getInstance().getTime(); \n\t\t// Using DateFormat format method we can create a string \n\t\t// representation of a date with the defined format.\n\t\tString reportDate = df.format(today);\n\t\tString repo = tf.format(today);\n\t\tSystem.out.println(\"Report Date: \" + reportDate);\n \n\t\t List<Tacher> tacher= tacherservice.findBydatetime(today, repo);\n\t\t\n\t\t if (tacher!=null){\t \n \t\t for(int i=0; i<tacher.size(); i++) {\n \t\t\t Tacher current = tacher.get(i);\n \t\t\t System.out.println(\"Tacher: \" + current.getId()+\" Statut=\"+current.getStatut()); \n \t\t tacherservice.metajourtacher(current.getId());\n \t\t System.out.println(\"Tacher: \" + current.getId()+\" Statut=\"+current.getStatut());\n \t\t } ///// fermeteur de for \n\t\t }//fermeteur de if\n\t}", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long value = dataSnapshot.getValue(Long.class);\n // Log.d(TAG, \"Value is: \" + value);\n\n\n\n\n Date tiempo= new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"mm:ss\");\n\n tiempo.setTime(value);\n\n if(extraTime) {\n t_contador.setText(\"-\" + format.format(tiempo));\n\n if(!vibrando) {\n\n startVibrate();\n vibrando=true;\n }\n\n }\n }", "@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}", "hr.client.appuser.CouponCenter.TimeRange getUseTime();", "hr.client.appuser.CouponCenter.TimeRange getUseTime();", "@Test\n\tpublic void testSettleCreditDifference() {\n\t\tint creditEstimate = 50;\n\t\tLong originalAccBalance = 150l;\n\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"3\");\n\t\tsmsAccount.setSakaiSiteId(\"3\");\n\t\tsmsAccount.setMessageTypeCode(\"3\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(originalAccBalance);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSenderUserName(\"sakaiUserId\");\n\t\tsmsTask.setSmsAccountId(smsAccount.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.setCreditEstimate(creditEstimate);\n\t\tsmsTask.setGroupSizeActual(0);\n\t\tsmsTask.setMessageTypeId(SmsConstants.MESSAGE_TYPE_SYSTEM_ORIGINATING);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(smsTask.getDateToSend());\n\t\tcal.add(Calendar.SECOND, smsTask.getMaxTimeToLive());\n\t\tsmsTask.setDateToExpire(cal.getTime());\n\t\thibernateLogicLocator.getSmsTaskLogic().persistSmsTask(smsTask);\n\n\t\tsmsBillingImpl.reserveCredits(smsTask);\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\t\tAssert.assertNotNull(smsAccount);\n\n\t\t// Account was credited\n\t\tAssert.assertTrue(smsAccount.getCredits() < originalAccBalance);\n\n\t\tsmsBillingImpl.settleCreditDifference(smsTask, smsTask.getCreditEstimate(), smsTask.getCreditsActual());\n\n\t\tsmsAccount = hibernateLogicLocator.getSmsAccountLogic().getSmsAccount(\n\t\t\t\tsmsAccount.getId());\n\n\t\t// Account balance was returnd to origional state since the actual\n\t\t// groups size on the task was zero\n\t\tAssert.assertTrue(smsAccount.getCredits() == originalAccBalance);\n\n\t}", "public boolean kiemTraPSToiGian(){\n if (timUSCLN(tuSo,mauSo) == 1){\n return true;\n }else {\n return false;\n }\n }", "@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\t\n\t}", "public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }", "public void payinFullSimple(PaymentType p, long tipAMt){\n payment.clear();\n tips.clear();\n addPayment(new SimplePayment(p, getGrandTotal()));\n addTip(new SimplePayment(p, tipAMt));\n }", "@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\n\t\t\t } \n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn \"网络出错!\";\n\t\t}\t\n\t}", "public Date getBuy_time() {\r\n\t\treturn buy_time;\r\n\t}", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "public void autoPay() {}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n BTCMessage btcMessage = new BTCMessage() ;\n /*btcMessage.setIP(\"localhost\");\n btcMessage.setPORT(\"7000\");*/\n //\n // btcMessage.setIP(\"localhost\");\n BigDecimal test = new BigDecimal(\"1499000000\");\n BigDecimal digit = new BigDecimal(100000000);\n test = test.divide(digit);\n System.out.println(\"sdfadsa = \" + test.toString());\n /* btcMessage.setIP(\"127.0.01\");\n btcMessage.setPORT(\"5279\");\n btcMessage.setPASSWORD(\"sax1314\");\n btcMessage.setACCESS_KEY(\"eth123456\");\n btcMessage.setSECRET_KEY(\"eth123456\");\n LBCUtils lbcUtils = new LBCUtils(btcMessage);\n TransactionDetailResp resp = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n System.three.println(\"sdfadsa = \" + resp);*/\n //String str = lbcUtils.version();\n //String str = lbcUtils.transaction_show(\"b116e8fc03c8cfbb0a65eb6a76d0905b0f7a8e7d8289f5d34bda44221eb04a1e\");\n //BaseJson resp = lbcUtils.wallet_balance();\n //System.three.println(\"----> \" + resp.getResult());\n //String str = lbcUtils.help(\"transaction_show\");\n // String str = lbcUtils.help(null);\n //BaseJson base = lbcUtils.wallet_new_address();\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"95001809afccede23ebc80df7f04d14fce96d4005e225471050201500ee2e2dd\");\n //String str = lbcUtils.transaction_list();\n //String str = lbcUtils.transaction_show(\"eeb23af0ff0c0d1e0ae413960ca84206e7eb225c0377f28ad9206222b53eca66\");\n //String str = lbcUtils.help(\"transaction_show\");\n //System.three.println(\"----> \" + str);\n }", "public abstract void aktualisiereZeitpunk(int momentanZeitpunkt);", "double getClientTime();", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long value = dataSnapshot.getValue(Long.class);\n // Log.d(TAG, \"Value is: \" + value);\n\n Date tiempo= new Date();\n SimpleDateFormat format = new SimpleDateFormat(\"mm:ss\");\n\n tiempo.setTime(value);\n\n if(value==0){\n extraTime=true;\n }else {\n\n if(vibrando){\n stopVibrate();\n vibrando=false;\n }\n t_contador.setText(format.format(tiempo));\n }\n }", "private AppointmentCashRequest appointmentCashRequest() {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy hh:mm aa\", Locale.getDefault());\n String currentDateandTime = sdf.format(new Date());\n\n AppointmentCashRequest appointmentCashRequest = new AppointmentCashRequest();\n appointmentCashRequest.set_id(appoinmentid);\n appointmentCashRequest.setAmount(txt_serviceamout.getText().toString());\n Log.w(TAG,\"appointmentCashRequest\"+ \"--->\" + new Gson().toJson(appointmentCashRequest));\n return appointmentCashRequest;\n }", "private void getOnlineMoneyData(final Context context, final String fromCurrencyCode, final String toCurrencyCode) {\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.GET,\n BuildConfig.BASE_URL, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n closeProgressDialog();\n Log.d(\"Tag\", response.toString());\n try {\n String date = response.getString(\"date\");\n JSONObject rates = response.getJSONObject(\"rates\");\n\n double baseRate = Double.valueOf(rates.getString(\"USD\"));\n double initRate = Double.valueOf(rates.getString(fromCurrencyCode));\n double targetRate = Double.valueOf(rates.getString(toCurrencyCode));\n double first_input = Double.valueOf(et_currencyvalue.getText().toString());\n String resultFinal = String.valueOf(String.format(\"%.3f\", ((targetRate * first_input) / initRate)));\n tv_currencyresultv.setText(resultFinal);\n Timestamp ts = new Timestamp(response.getLong(\"timestamp\"));\n Date time = new Date(ts.getTime());\n tv_lastupdate.setText(\"Last updated on \" + date);\n runAnimation(android.R.anim.fade_in, tv_lastupdate);\n } catch (JSONException e) {\n e.printStackTrace();\n Toast.makeText(context,\n \"Error: \" + e.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n closeProgressDialog();\n reset();\n VolleyLog.d(\"TAG\", \"Error: \" + error.getMessage());\n Toast.makeText(context, error.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n\n RequestQueue queue = Volley.newRequestQueue(context);\n // Adding request to request queue\n queue.add(jsonObjReq);\n\n }", "private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setText(v.format(smallCash.setScale(2, BigDecimal.ROUND_HALF_UP)));\n //jTextValueTotalDiscontCoupon.setText(v.format(PagamentoPedido.getDesconto_pagamento()));\n\n if (smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() < 0) {\n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n jTextCash.setText(\"0,00\");\n jTextValueDiscontCoupon.setText(\"0,00\");\n jTextCash.requestFocus(true);\n } else {\n\n if (last_cod_tipo_pagamento != null && smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() > 0) {\n\n if (JOptionPane.showConfirmDialog(this, \"Não é permitido troco para pagamento com cartão.\\nDeseja emitir um contra vale?\", \"Mensagem\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon) == 0) {\n\n JOptionPane.showMessageDialog(this, \"Emitindo contra vale...\");\n\n fechouVenda = true;\n //BeanConsulta.setVenda_fechada(fechouVenda);\n this.dispose();\n\n } else {\n\n funcaoLimpaPag();\n }\n } else {\n \n \n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); \n jButtonFinalizaCalculoPagameto.setEnabled(true);\n jButtonFinalizaCalculoPagameto.requestFocus(true);\n\n }\n }\n\n }", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public void run() {\r\n\t\tDate fechaActual = new Date();\r\n\t\ttry {\r\n\t\t\t// Actual\r\n\t\t\tint horaActual = Integer.parseInt(ManipulacionFechas\r\n\t\t\t\t\t.getHora(fechaActual));\r\n\t\t\tint minutosActual = Integer.parseInt(ManipulacionFechas\r\n\t\t\t\t\t.getMinutos(fechaActual));\r\n\r\n\t\t\tint horaInicialRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"HORA_INICIAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\t\t\tint minutosInicialRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"MINUTOS_INICIAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\r\n\t\t\tint horaFinalRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"HORA_FINAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\t\t\tint minutosFinalRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"MINUTOS_FINAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\r\n\t\t\t// Tiempo Actual en Minutos\r\n\t\t\tint tiempoActual = (horaActual * 60) + minutosActual;\r\n\r\n\t\t\t// Tiempos de Rango de Ejecucion en Minutos\r\n\t\t\tint rangoInicial = (horaInicialRangoEjecucion * 60)\r\n\t\t\t\t\t+ minutosInicialRangoEjecucion;\r\n\t\t\tint rangoFinal = (horaFinalRangoEjecucion * 60)\r\n\t\t\t\t\t+ minutosFinalRangoEjecucion;\r\n\r\n\t\t\t// Pregunta si la hora actual esta dentro del rango de ejecucion de\r\n\t\t\t// la tarea\r\n\t\t\tif ((tiempoActual >= rangoInicial) && (tiempoActual <= rangoFinal)) {\r\n\t\t\t\tDate start = new Date();\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Corriendo proceso automatico Cobro de Ciat Casa Ciat : \"\r\n\t\t\t\t\t\t\t\t+ start + \"----\");\r\n\t\t\t\tnew BillingAccountServiceImpl().CobroCiatCasaCiat();\r\n\r\n\t\t\t\tDate end = new Date();\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Termina proceso Envio de notificaciones automaticas Cobro de Ciat Casa Ciat \"\r\n\t\t\t\t\t\t\t\t+ start + \"----\");\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(end.getTime()\r\n\t\t\t\t\t\t\t\t- start.getTime()\r\n\t\t\t\t\t\t\t\t+ \" total milliseconds en realizar tarea automatica Cobro de Ciat Casa Ciat : \");\r\n\r\n\t\t\t}// Fin if\r\n\t\t\telse {\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Tarea Automatica de notificacion Cobro de Ciat Casa Ciat en espera... \"\r\n\t\t\t\t\t\t\t\t+ new Date() + \" ----\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog\r\n\t\t\t\t\t.error(\"Error RUN Tarea Automatica de notificacion Cobro de Ciat Casa Ciat: \"\r\n\t\t\t\t\t\t\t+ e.getMessage());\r\n\t\t}\r\n\r\n\t\tfechaActual = null;\r\n\r\n\t}", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.PaymentDelay addNewPaymentDelay();", "public boolean ingresarNuevoArticuloAlTicket(Ticket ticket, Articulo articulo, Usuario usuario, boolean esArticuloInicial) {\n try {\n ticket.setFechaDeModificacion(new Date());\n //Se determina el tiempo de actualizacion segun el SLA\n int tiempoDeActualizacion = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeActualizacionDeEscalacion();\n Calendar c = Calendar.getInstance();\n //c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeActualizacion);\n //Se hacen verificaciones por tipo de disponibilidad es decir 24x7 o 8x5\n int horaActual = c.get(Calendar.HOUR_OF_DAY);\n int diaDeLaSemana = c.get(Calendar.DAY_OF_WEEK);\n if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (diaDeLaSemana == Calendar.SATURDAY || diaDeLaSemana == Calendar.SUNDAY || (diaDeLaSemana == Calendar.FRIDAY && horaActual > 17))) {\n if (diaDeLaSemana == Calendar.FRIDAY) {\n c.add(Calendar.DAY_OF_MONTH, 3);\n } else if (diaDeLaSemana == Calendar.SATURDAY) {\n c.add(Calendar.DAY_OF_MONTH, 2);\n } else {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n } else if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (horaActual < 8 || horaActual > 17) && (diaDeLaSemana != Calendar.SATURDAY && diaDeLaSemana != Calendar.SUNDAY)) {\n if (horaActual > 17) {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n }\n ticket.setFechaDeProximaActualizacion(c.getTime());\n this.ticketFacade.edit(ticket);\n //Se actualiza el notificador\n Timer tarea = this.notificadorServicio.getTareaInfoById(\"t_update\" + ticket.getTicketNumber());\n if (tarea != null) {\n TareaTicketInfo info = (TareaTicketInfo) tarea.getInfo();\n info.setStartDate(c.getTime());\n info.setHour(String.valueOf(c.get(Calendar.HOUR)));\n info.setMinute(String.valueOf(c.get(Calendar.MINUTE)));\n info.setSecond(String.valueOf(c.get(Calendar.SECOND)));\n this.notificadorServicio.updateJob(info);\n }\n articulo.setDe(usuario);\n articulo.setPara(ticket.getUsuarioidcreador());\n StringBuilder cc = new StringBuilder();\n List<String> emails = contactosDeTicket(ticket, true);\n int i = 0;\n for (String email : emails) {\n if (i++ < emails.size()) {\n cc.append(email).append(\";\");\n }\n }\n articulo.setCopia(cc.toString());\n articulo.setTicketticketNumber(ticket);\n articulo.setFechaDeCreacion(new Date());\n articulo.setOrden(this.articuloFacade.obtenerOrdenDeArticuloTicket(ticket));\n articuloFacade.create(articulo);\n HistorialDeTicket historialDeTicket = new HistorialDeTicket();\n historialDeTicket.setEventoTicketcodigo(this.eventoTicketFacade.find(2));\n historialDeTicket.setOrden(this.historialDeTicketFacade.obtenerOrdenDeHistorialDeTicket(ticket));\n historialDeTicket.setTicketticketNumber(ticket);\n historialDeTicket.setFechaDelEvento(new Date());\n historialDeTicket.setUsuarioid(usuario);\n\n //Se envía un correo por ticket nuevo\n UtilidadDeEmail utilidadDeCorreoElectronico = new UtilidadDeEmail();\n DatosSinetcom datosSinetcom = this.datosSinetcomFacade.find(\"1791839692001\");\n if (esArticuloInicial) {\n //Se envia el correo electrónico notificando a todos los interesados \n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Nueva incidencia - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoTicket(ticket, articulo, false), contactosDeTicket(ticket, true), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n //Se envia un correo a todos los tecnicos de Sinetcom\n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Nueva incidencia - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoTicket(ticket, articulo, true), contactosDeTicket(ticket, false), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n } else {\n //Se envia un correo electrónico del nuevo articulo\n utilidadDeCorreoElectronico.enviarMensajeConAdjunto(datosSinetcom.getEmailNoResponder(), \"[email protected]\", \"Actualización - Caso# \" + ticket.getTicketNumber(), crearCuerpoDeCorreoNuevoArticuloEnTicket(articulo), contactosDeTicket(ticket, true), articulo.getContenidoAdjunto() != null ? articulo.getContenidoAdjunto() : null, articulo.getContenidoAdjunto() != null ? ticket.getTicketNumber() + \"_\" + articulo.getId() + \".\" + articulo.getExtensionArchivo() : null);\n }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n return true;\n }", "float znajdzOstatecznaCene()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCene\");\n\t\t//print (\"znajdzOstatecznaCene \"+iteracja);\n\t\t\n\t\t//debug\n\t\tBoolean debug = false;\n\t\tif (LokalneCentrum.getCurrentHour().equals(\"03:00\"))\n\t\t{\n\t\t\tprint(\"03:00 on the clock\",debug);\n\t\t\tdebug=false;\n\t\t}\n\t\t\n\t\t//wszystkie ceny jakie byly oglaszan ne na najblizszy slot w \n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tprint(\"ceny na najblizszy slot \"+cenyNaNajblizszySlot.size());\n\n\t\t\n\t\t//do rpzerobienia problemu minimalizacji na maksymalizacje\n\t\tint inverter =-1;\n\t\t\n\t\ti=0;\n\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\tfloat minimuCena =cena;\t\t\n\t\tfloat minimumValue =inverter*funkcjaRynku2(cena, false,true);\n\t\ti++;\n\t\t\n\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), minimuCena);\n\t\t\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tcena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =inverter*funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), cena);\n\n\t\t\tif (value<minimumValue)\n\t\t\t{\n\t\t\t\tminimuCena =cena;\n\t\t\t\tminimumValue = value;\n\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(debug)\n\t\t{\n\t\t\tgetInput(\"03:00 end\");\n\t\t}\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCene - nto finished\");\n\t\treturn minimuCena;\n\t\t\n\t}", "@Test\n public void testBtcPrice() throws Exception {\n RetrieveCryptoPrices retrieveCryptoPrices = new RetrieveCryptoPrices();\n retrieveCryptoPrices.setBtcPrice(\"10000\");\n assertEquals(\"10000\", retrieveCryptoPrices.getBtcPrice());\n\n }", "@Override\n public void jornadaTrabalho(int x) {\n DateTimeFormatter formatoData = DateTimeFormatter.ofPattern(\"HH:mm\");\n \n if (x == 40) {\n // Jornada de Trabalho PADRÃO 40h\n entrada1 = LocalTime.of(8, 0);\n saida1 = LocalTime.of(12, 0);\n entrada2 = LocalTime.of(14, 0);\n saida2 = LocalTime.of(18, 0);\n cbxJornada.setSelectedIndex(1);\n jornada = 40;\n } else if (x == 44) {\n // Jornada de Trabalho PADRÃO 44h\n entrada1 = LocalTime.of(7, 0, 0);\n saida1 = LocalTime.of(12, 0, 0);\n entrada2 = LocalTime.of(14, 0, 0);\n saida2 = LocalTime.of(18, 0, 0);\n cbxJornada.setSelectedIndex(2);\n jornada = 44;\n }\n //Popula os campos de horas\n txtEntrada1.setText(entrada1.format(formatoData));\n txtSaida1.setText(saida1.format(formatoData));\n txtEntrada2.setText(entrada2.format(formatoData));\n txtSaida2.setText(saida2.format(formatoData));\n }", "public Purchase_product() {\n initComponents();\n \n// SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n// Date d = new Date();\n// String date=dateFormat.format(d);\n//\n// \n// DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"HH:mm:ss\");\n// LocalDateTime now = LocalDateTime.now();\n// String time = dtf.format(now);\n \n \n }", "@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }", "BigInteger getResponse_time();", "private void jButton2ActionPerformed(ActionEvent evt) {\n\t \ttry{\n\t \t\tenseigne_client = jComboBox1.getSelectedItem().toString();\n\t \t\tcodeProduit = jComboBox2.getSelectedItem().toString();\n\t\t \tDouble nvTauxReprise = Double.parseDouble(jTextField1.getText());\n\t\t \t\n\t\t \ttry{\n\t\t \t\tmd.updateTauxReprise(nvTauxReprise, enseigne_client, codeProduit);\n\t\t \t} catch (Exception e){\n\t\t \t\tmd.insertNvTxReprise(nvTauxReprise, enseigne_client, codeProduit, false);\n\t\t \t}\n\t\t \t\n\t \t} catch (Exception e){}\n\t \t/*\n\t \tdouble pourcentage = 0.0;\n\t \tdouble tauxreprise = 0.0;\n\t \tjLabel1.setText(\"Taux de reprise actuel : \");\n\t \tString nomprofil = \"\";\n\t \tString nomproduit = \"\";\n\t \t\n\t\t\tpourcentage = Integer.parseInt(jTextField1.getText());\n\t\t\tnomprofil = (String) jComboBox1.getSelectedItem();\n\t\t\tnomproduit = (String) jComboBox2.getSelectedItem();\n\t\t\t\n\t\t\tmd.updateTauxReprise(pourcentage, nomprofil, nomproduit);\n\t\t\ttauxreprise = rd.recuperationTxReprise(codeProduit, enseigne_client);\n\t\t\tjLabel1.setText(jLabel1.getText() + \" \" + tauxreprise + \" %\");\n\t\t\t*/\n\t\t}", "@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitMoreThan2Days(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertTrue(c.cancelAuction(myNonProfit, myAuctDateMoreThan2Days, myCurrDate));\r\n\t\t\r\n\t}", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public static LocalTime czasDojazduAutobusu(int pozX, int pozY){\r\n Koordynaty pozAutobusu = new Koordynaty();\r\n pozAutobusu.przypiszKoordynaty(7,5);\r\n int ile = Math.abs((pozAutobusu.pozX -pozX + pozAutobusu.pozY - pozY + ThreadLocalRandom.current().nextInt(1,30)));\r\n LocalTime czas = LocalTime.of(0,0);\r\n if(ile > 180) { ile -= 100;}\r\n czas = czas.plusMinutes(ile);\r\n return czas;\r\n }", "@Override\n public void onSuccess(String msg, String balance, String cardNum, String thresholdValue) {\n Log.e(TAG, \"查询余额onSuccess回调msg:\" + msg);\n Log.e(TAG, \"查询余额onSuccess回调balance:\" + balance);\n Log.e(TAG, \"查询余额onSuccess回调cardNum:\" + cardNum);\n Log.e(TAG, \"查询余额onSuccess回调thresholdValue:\" + thresholdValue);\n balanceResult.setText(balance);\n //余额查询完后去显示交易记录\n RecordUtil.recordBleQuery(WalletActivity.this, WalletActivity.this, RecordUtil.LINKLOVE, provider.getCurrentDeviceMac(), false, new RecordCallbackInterface() {\n @Override\n public void onSuccess(String s, List<Map<String, Object>> list) {\n if (list.size() <= 0) {\n if (dialog_pay != null && dialog_pay.isShowing()) {\n dialog_pay.dismiss();\n }\n return;\n }\n for (Map<String, Object> map : list) {\n //{sh_cost=0.01 Ԫ, sh_type=充值, sh_date=06-22 10:32}\n Log.e(TAG, \"查询记录:\" + map.toString());\n LLTradeRecord record = new LLTradeRecord();\n String money = map.get(\"sh_cost\") + \"\";\n money = money.substring(0, money.length() - 1);\n record.setTradeAmount(money + \" 元\");\n record.setTradeTime(map.get(\"sh_date\") + \"\");\n if (String.valueOf(map.get(\"sh_type\")).equals(\"充值\")) {\n record.setTradeType(\"in\");\n } else {\n record.setTradeType(\"out\");\n }\n list_qianbao.add(record);\n walletAdapeter.notifyDataSetChanged();\n if (dialog_pay != null && dialog_pay.isShowing()) {\n dialog_pay.dismiss();\n }\n }\n }\n\n @Override\n public void onFail(String s) {\n if (dialog_pay != null && dialog_pay.isShowing()) {\n dialog_pay.dismiss();\n }\n }\n });\n }", "boolean startTransaction(Klant klant, String IBAN1, String IBAN2, double value, String description) throws SessionExpiredException, IllegalArgumentException, LimitReachedException, RemoteException;", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public static void chargeHire(int minutes) {\n int time = minutes;\n double cost;\n\n if(time >= 0 && time <30) {\n cost = 0;\n }\n else {\n if(time >30 && time < 60) {\n cost = 0.5;\n }\n else {\n if(time > 60 && time < 120) {\n cost = 1.50;\n }\n else{\n if(time > 120 && time <180) {\n cost = 6.50;\n }\n else {\n\n int numOfHalfHours = (time/30);\n int b = (numOfHalfHours - 5);\n int c = (b*2);\n cost = (6.50 + c);\n }\n }\n }\n }\n System.out.println(\"€\" +cost);\n if(cost <= accountBalance) {\n accountBalance = (accountBalance - cost);\n// System.out.println(\"Bike rent successful! you have been charged\" + cost);\n Receipt.printSlip(cost);\n }\n else {\n System.out.println(\"There were insuficient funds in your account.\" + \"\\n\" +\n \"We will now charge the credit card you have provided us instead.\");\n }\n }", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "private void jButton1ActionPerformed(ActionEvent evt) {\n\t \ttry{\n\t \t\tenseigne_client = jComboBox1.getSelectedItem().toString();\n\t \t\tcodeProduit = jComboBox2.getSelectedItem().toString();\n\t \t\t\n\t \t\tjLabel1.setText(\"Taux de reprise actuel : \");\n\t\t \tdouble tauxreprise;\n\t\t\t\ttry{\n\t\t\t\t\ttauxreprise = rml_.recuperationTxReprise(codeProduit, enseigne_client);\n\t\t\t\t} catch (Exception e){\n\t\t\t\t\ttauxreprise = 0.15;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tjLabel1.setText(jLabel1.getText() + \" \" + tauxreprise + \" %\");\n\t\t\t\tthis.repaint();\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif(tauxreprise == 0.0){\n\t\t\t\t\tdouble nvTauxReprise = 0.0;\n\t\t\t\t\ttry{\n\t\t\t\t\t\tnvTauxReprise = Integer.parseInt(jTextField1.getText());\n\t\t\t\t\t\tmd.insertNvTxReprise(nvTauxReprise, enseigne_client, codeProduit, false);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// réaffichage de mon label avec la nouvelle valeur \n\t\t\t\t\t\ttauxreprise = rd.recuperationTxReprise(codeProduit, enseigne_client);\n\t\t\t\t\t\tjLabel1.setText(jLabel1.getText() + \" \" + tauxreprise + \" %\");\n\t\t\t\t\t}catch(NumberFormatException e){\n\t\t\t\t\t\tSystem.out.println(\"toto\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tjLabel1.setText(jLabel1.getText() + \" \" + tauxreprise + \" %\");\n\t\t\t\t\tthis.repaint();\n\t\t\t\t}\n\t\t\t\t*/\n\t \t\t\n\t \t} catch (Exception e){}\n\t \t\n\t\t}", "public String enterExpiryDate(String object, String data) {\n try {\n int newMin;\n int wait = Integer.parseInt(data);\n String Objects[] = object.split(\",\");\n Calendar calendar = Calendar.getInstance();\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"MM/dd/yyyy h:mm:ss a\");\n timeFormat.setTimeZone(TimeZone.getTimeZone(\"US/Central\"));\n calendar.add(Calendar.MINUTE, wait);\n String dueDate = timeFormat.format(calendar.getTime());\n String param[] = dueDate.split(\" \");\n writeInInput(Objects[0], param[0]);\n logger.debug(\"Date is\" + param[0]);\n Thread.sleep(2000);\n selectList(Objects[3], param[2]);\n logger.debug(\"Meridian is\" + param[2]);\n String time[] = param[1].split(\":\");\n Thread.sleep(2000);\n WebElement elementMin = driver.findElement(By.xpath(OR.getProperty(Objects[2])));\n Select selectMin = new Select(elementMin);\n\n int min = Integer.parseInt(time[1]);\n if (min % 5 == 0) {\n newMin = min;\n\n }\n if (min > 55) {\n int n = min / 5;\n newMin = n * 5;\n\n } else {\n int n = min / 5;\n newMin = n * 5 + 5;\n }\n\n String timeMin = String.valueOf(newMin);\n if (timeMin.equals(\"5\")) {\n selectMin.selectByValue(\"05\");\n } else if (timeMin.equals(\"60\")) {\n selectMin.selectByValue(\"00\");\n int hr = Integer.parseInt(time[0]);\n if (hr == 12) {\n hr = 1;\n String timeHr = String.valueOf(hr);\n selectList(Objects[1], timeHr);\n if (param[2].equals(\"AM\")) {\n param[2] = \"PM\";\n selectList(Objects[3], param[2]);\n }\n if (param[2].equals(\"PM\")) {\n param[2] = \"AM\";\n selectList(Objects[3], param[2]);\n }\n } else {\n hr = hr + 1;\n String timeHr = String.valueOf(hr);\n selectList(Objects[1], timeHr);\n }\n } else {\n logger.debug(\"Minute is > \" + timeMin);\n selectMin.selectByValue(timeMin);\n }\n selectList(Objects[1], time[0]);\n int flag = 1;\n if (flag == 1)\n return Constants.KEYWORD_PASS + \" Due date entered Successfully\";\n else\n return Constants.KEYWORD_FAIL + \" Due date is not entered Successfully \";\n } catch (Exception ex) {\n\n \t\n return Constants.KEYWORD_FAIL + ex.getMessage();\n }\n\n }", "@org.junit.Test\n public void testObliczOdsetkiLokataRoczna() {\n \n OdsetkiStateLokataRoczna odsetki = injector.getInstance(OdsetkiStateLokataRoczna.class);\n BigDecimal stanKonta = new BigDecimal(1000);\n BigDecimal expResult = new BigDecimal(\"20.00\");\n \n LokataRoczna lokata = injector.getInstance(LokataRoczna.class);\n \n BigDecimal result = odsetki.obliczOdsetki(stanKonta, lokata);\n\n assertEquals(expResult, result);\n }", "public void updateQuote(){\n\t\tDate date = new Date();\n\t\tlong maxTimeNoUpdate = Long.parseLong(config.getQOTD_expiration_time());\n\n\t\tlong timeNow = date.getTime()/1000L;\n\t\tlong timeLastQuote = 0;\n\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\t\t\tif(crs.next()){\n\t\t\t\ttimeLastQuote = crs.getDate(\"date\").getTime()/1000L;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tcrs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(timeNow-timeLastQuote > maxTimeNoUpdate){\n\t\t\tSystem.out.println(\"UPDATING QUOTE\");\n\t\t\tsaveQuote();\n\t\t} else {\n\t\t\tSystem.out.println(\"QUOTE IS UP TO DATE\");\n\t\t}\n\t}", "@Test public void shouldGive180MinFor650cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 3 * 60 /*minutes*/ , rs.calculateTime(650) ); \r\n }", "public void TemperaturaDentroDoPermitido() {\n\t\tSystem.out.println(\"Temperatura: \" + temperaturaAtual);\n\t\t// verifica se a temperatua esta abaixo do permitido\n\t\tif (temperaturaAtual < temperaturaMinimaPermitida) {\n\t\t\tSystem.out.println(\"Temperatura abaixo do permitido, Alerta!!\");\n\t\t}\n\t\t// verifica se a temperatura esta acima do permitido\n\t\telse if (temperaturaAtual > temperaturaMaximaPermitida) {\n\t\t\tSystem.out.println(\"Temperatura acima do permitido, Alerta!!\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Temperatura OK!!\");\n\t\t}\n\t}", "public String doPayy(Expence expence, BankRunning bankRunning, User user)\r\n/* 89: */ {\r\n/* 90: 86 */ String result = \"\";\r\n/* 91: 87 */ Expence persistent = (Expence)this.expenceDao.load(expence.getId());\r\n/* 92: 88 */ if ((\"3\".equals(persistent.getStat())) || (persistent.getStat() == \"3\")) {\r\n/* 93: 89 */ return result = \"[id=\" + persistent.getId() + \", \" + persistent.getStat() + \"]该项数据已经审批!\";\r\n/* 94: */ }\r\n/* 95: 92 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 96: 93 */ expenceFlow.setGxsj(new Date());\r\n/* 97: 94 */ expenceFlow.setExpence(expence);\r\n/* 98: 95 */ expenceFlow.setUser(user);\r\n/* 99: 96 */ expenceFlow.setOptContent(\"审批\");\r\n/* 100: 97 */ expenceFlow.setYwlc(Integer.valueOf(3));\r\n/* 101: 98 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 102: */ \r\n/* 103: */ \r\n/* 104:101 */ BeanUtils.copyProperties(expence, persistent, new String[] { \"id\", \"user\", \"bxsj\", \"fssj\", \"bxnr\", \"bxje\", \"bxr\", \"skzh\", \"bxlx\" });\r\n/* 105:102 */ persistent.setGxr(user.getName());\r\n/* 106:103 */ persistent.setGxsj(new Date());\r\n/* 107:104 */ persistent.setStat(\"3\");\r\n/* 108:108 */ if (bankRunning != null)\r\n/* 109: */ {\r\n/* 110:110 */ bankRunning.setZcje(Double.parseDouble(bankRunning.getFkje()));\r\n/* 111:111 */ bankRunning.setLrje(0.0D - Double.parseDouble(bankRunning.getFkje()));\r\n/* 112:112 */ bankRunning.setLrsj(new Date());\r\n/* 113:113 */ bankRunning.setLrr(user.getName());\r\n/* 114:114 */ bankRunning.setShbj(\"1\");\r\n/* 115:115 */ bankRunning.setOrderId(expenceFlow.getId().toString());\r\n/* 116:116 */ bankRunning.setBz(expenceFlow.getOptContent());\r\n/* 117:117 */ Integer b_r_id = (Integer)this.bankRunningService.save(bankRunning);\r\n/* 118: */ \r\n/* 119:119 */ persistent.setBankRunningId(b_r_id);\r\n/* 120:120 */ this.expenceDao.update(persistent);\r\n/* 121: */ \r\n/* 122:122 */ Bank b = (Bank)this.bankService.get(bankRunning.getBank().getId());\r\n/* 123:123 */ double cush = new Double(b.getCush() + bankRunning.getLrje()).doubleValue();\r\n/* 124:124 */ this.bankService.updateBankCush(cush, Integer.valueOf(bankRunning.getBank().getId().intValue()));\r\n/* 125: */ }\r\n/* 126:126 */ return result;\r\n/* 127: */ }", "public void tampilKarakterC(){\r\n System.out.println(\"Saya adalah binatang \");\r\n }", "hr.client.appuser.CouponCenter.TimeRange getExchangeTime();", "private void checkAnnoRateo() {\n\t\tif(req.getRateo().getAnno()>=primaNota.getBilancio().getAnno()){\n\t\t\tthrow new BusinessException(ErroreCore.OPERAZIONE_NON_CONSENTITA.getErrore(\"L'anno del Rateo deve essere minore dell'anno della prima nota di partenza.\"));\n\t\t}\n\t}", "@PostMapping(\"/saveTransaction\")\n\t@Timed\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic void saveTransaction(@Valid @RequestBody TransactionDTO transaction) {\n\t\tlog.debug(\"Called saveTransaction {}\", transaction);\n\t\ttransaction.setStatus(Status.INITIATED.name());\n\t\tTransaction tx = transactionService.saveTransaction(transaction);\n\n\t\tlog.debug(\"Tx Registered {}\", tx);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tDate date = new Date();\n\n\t\tlong Seconds = 10;\n\n\t\tTimer timer = new Timer();\n\n\t\ttimer.schedule(new TimerTask() {\n\t\t\tint counter = 0;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tString comparedValue = null;\n\t\t\t\t\tString url = \"\";\n\t\t\t\t\tif (StringUtils.equals(tx.getCurrency(), \"ETH\")) {\n\t\t\t\t\t\ttransaction.setStatus(Status.CONNECTED.name());\n\t\t\t\t\t\turl = \"http://api\" + CAN_NETWORK + \"etherscan.io/api?module=account&action=txlist&address=\"\n\t\t\t\t\t\t\t\t+ ETHER_ADDRESS + \"&startblock=0&endblock=999999999&sort=asc&apikey=\" + key;\n\t\t\t\t\t\tcomparedValue = tx.getEth();\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\turl = \"http://api\" + CAN_NETWORK + \"etherscan.io/api?module=account&action=tokentx&address=\"\n\t\t\t\t\t\t\t\t+ ETHER_ADDRESS + \"&startblock=0&endblock=999999999&sort=asc&apikey=\" + key;\n\t\t\t\t\t\tcomparedValue = tx.getEth();\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(url);\n\t\t\t\t\tTransaction txDatac = transactionRepository.findOneByOrderid(transaction.getKey());\n\n\t\t\t\t\tif (StringUtils.equals(txDatac.getStatus(), Status.INITIATED.name())) {\n\t\t\t\t\t\tHttpClient client = HttpClientBuilder.create().build();\n\n\t\t\t\t\t\tif (counter == 360) {\n\t\t\t\t\t\t\tTransaction txData = transactionRepository.findOneByOrderid(tx.getOrderid());\n\t\t\t\t\t\t\ttxData.setStatus(Status.TIMEOUT.name());\n\t\t\t\t\t\t\ttransactionRepository.save(txData);\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\tHttpGet request = new HttpGet(url);\n\t\t\t\t\t\tHttpResponse response = client.execute(request);\n\n\t\t\t\t\t\tSystem.out.println(\"Response Code : \" + response.getStatusLine().getStatusCode());\n\n\t\t\t\t\t\tBufferedReader rd = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(response.getEntity().getContent()));\n\n\t\t\t\t\t\tStringBuffer result = new StringBuffer();\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t\t\t\tresult.append(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trd.close();\n\t\t\t\t\t\trequest.abort();\n\t\t\t\t\t\tObjectMapper jsonParserClient = new ObjectMapper();\n\n\t\t\t\t\t\tEtherscan etherscan = jsonParserClient.readValue(result.toString(), Etherscan.class);\n\t\t\t\t\t\tTransaction txData = transactionRepository.findOneByOrderid(tx.getOrderid());\n\t\t\t\t\t\tfor (Result ethplorer : etherscan.getResult()) {\n\t\t\t\t\t\t\tDate longdate = new java.util.Date(Long.parseLong(ethplorer.getTimeStamp()) * 1000);\n\t\t\t\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\t\t\t\tString dateString = formatter.format(longdate);\n\t\t\t\t\t\t\tString value = String.format(\"%.6f\",\n\t\t\t\t\t\t\t\t\tDouble.parseDouble(ethplorer.getValue()) / 1000000000000000000l);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Double ---- \" + comparedValue + \" equals to \" + value);\n\t\t\t\t\t\t\tif (StringUtils.equals(compareDates(dateString, dateFormat.format(date)), \"after\")\n\t\t\t\t\t\t\t\t\t&& StringUtils.contains(value, comparedValue)) {\n\t\t\t\t\t\t\t\tlog.debug(\"Tx Processed {}\", tx.getOrderid());\n\t\t\t\t\t\t\t\tSystem.out.println(\"Tx Processed {}\");\n\t\t\t\t\t\t\t\ttxData.setStatus(Status.IDENTIFIED.name());\n\t\t\t\t\t\t\t\ttxData.setHash(ethplorer.getHash());\n\t\t\t\t\t\t\t\ttxData.setDate(dateString);\n\t\t\t\t\t\t\t\ttransactionRepository.save(txData);\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\trequest.releaseConnection();\n\t\t\t\t\t}\n\n\t\t\t\t\ttxDatac = transactionRepository.findOneByOrderid(transaction.getKey());\n\n\t\t\t\t\tif (StringUtils.equals(txDatac.getStatus(), Status.IDENTIFIED.name())) {\n\t\t\t\t\t\tlog.debug(\"Called staging {}\", txDatac);\n\t\t\t\t\t\tSystem.out.println(\"Transferring\");\n\n\t\t\t\t\t\ttxDatac.setStatus(Status.AUTHENTICATED.name());\n\n\t\t\t\t\t\tWeb3j web3 = Web3j.build(new HttpService(CAN_INFURA));\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tBigInteger gasprice = web3.ethGasPrice().send().getGasPrice();\n\t\t\t\t\t\t\tSystem.out.println(\"Gas Price \" + gasprice);\n\t\t\t\t\t\t\tlog.debug(\"Gas Price {}\", gasprice);\n\t\t\t\t\t\t\tBigInteger gaslimit = BigInteger.valueOf(90000);\n\t\t\t\t\t\t\tBigDecimal value = new BigDecimal(txDatac.getAmount());\n\t\t\t\t\t\t\tCanYaCoin contract = CanYaCoin.load(CAN_CONTRACT, web3, credentials, gasprice, gaslimit);\n\n\t\t\t\t\t\t\tBigDecimal valueToMultiply = new BigDecimal(\"1000000\");\n\n\t\t\t\t\t\t\tBigDecimal s = value.multiply(valueToMultiply);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Address is \" + txDatac.getAddress());\n\t\t\t\t\t\t\tTransactionReceipt transactionReceipt = contract\n\t\t\t\t\t\t\t\t\t.transfer(txDatac.getAddress(), s.toBigInteger()).send();\n\t\t\t\t\t\t\tSystem.out.println(\"HASH \" + transactionReceipt.getTransactionHash());\n\t\t\t\t\t\t\tSystem.out.println(\"SUCCESS\");\n\t\t\t\t\t\t\ttxDatac.setStatus(Status.COMPLETE.name());\n\t\t\t\t\t\t\ttxDatac.setHashethertoaccount(transactionReceipt.getTransactionHash());\n\t\t\t\t\t\t\tlog.debug(\"CAN Sent {}\", txDatac);\n\t\t\t\t\t\t\ttransactionRepository.save(txDatac);\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t\ttxDatac.setStatus(Status.ERROR.name());\n\t\t\t\t\t\t\ttransactionRepository.save(txDatac);\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\"Tx Error {}\", e.getMessage());\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 0, 1000 * Seconds);\n\n\t}", "@Transactional\n public String transferMoney(Integer destCardId, double amount, HttpServletRequest r) {\n Card toCard = cardService.getCard(destCardId);\n double currentAmount = currentCard.getAmount();\n JSONObject json = new JSONObject();\n if (currentAmount < amount) {\n try {\n json.put(\"sucess\", false);\n json.put(\"result\", \"Недостаточно средств.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n } else {\n currentCard.setAmount(currentAmount - amount);\n double newAmount = converter.convert(currentCard.getCurrency(), toCard.getCurrency(), amount);\n toCard.setAmount(toCard.getAmount() + newAmount);\n Invoice invoice = currentCard.createInvoice();\n invoice.setToCard(destCardId);\n invoice.setAmount(newAmount);\n String date = new SimpleDateFormat(\"dd.MM.yyyy-hh.mm-a\").format(GregorianCalendar.getInstance().getTime());\n invoice.setDate(date);\n invoice.setCurrency(toCard.getCurrency());\n invoiceService.addInvoice(invoice);\n try {\n json.put(\"sucess\", true);\n json.put(\"result\", \"Успешно.\");\n } catch (JSONException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }\n cardService.update(currentCard);\n r.getSession().setAttribute(\"Card\", currentCard);\n cardService.update(toCard);\n return json.toString();\n }", "public double calculatePayment (int hours);", "@Override\n public void onClick(View v) {\n PayUChecksum payUChecksum = new PayUChecksum();\n payUChecksum.setKey(mPaymentParams.getKey());\n payUChecksum.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n // var 1 is from date\n payUChecksum.setVar1(fromDateEditText.getText().toString());\n payUChecksum.setSalt(bundle.getString(PayuConstants.SALT));\n if ((postData = payUChecksum.getHash()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n MerchantWebService merchantWebService = new MerchantWebService();\n merchantWebService.setKey(mPaymentParams.getKey());\n merchantWebService.setCommand(PayuConstants.GET_TRANSACTION_INFO);\n merchantWebService.setHash(postData.getResult());\n merchantWebService.setVar1(fromDateEditText.getText().toString());\n merchantWebService.setVar2(fromDateEditText.getText().toString());\n if ((postData = new MerchantWebServicePostParams(merchantWebService).getMerchantWebServicePostParams()) != null && postData.getCode() == PayuErrors.NO_ERROR) {\n payuConfig.setData(postData.getResult());\n\n // lets make api call\n GetTransactionInfoTask getTransactionInfoTask = new GetTransactionInfoTask(PayUVerifyApiActivity.this);\n getTransactionInfoTask.execute(payuConfig);\n\n getTransactionInformationAlertDialog.dismiss();\n\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(PayUVerifyApiActivity.this, postData.getResult(), Toast.LENGTH_LONG).show();\n }\n }", "public static boolean isPassOneHour(String pass)\n {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = new Date();\n String current = dateFormat.format(date);\n\n //Extract current data time all values\n\n int current_year = Integer.parseInt(current.substring(0, 4));\n int current_month = Integer.parseInt(current.substring(5,7))-1;\n int current_day = Integer.parseInt(current.substring(8,10));\n\n int current_hour = Integer.parseInt(current.substring(11,13));\n int current_minute = Integer.parseInt(current.substring(14,16));\n int current_seconds = Integer.parseInt(current.substring(17));\n\n //String pass = \"2016-10-05 10:14:00\";\n\n //Extract last update data (pass from parameter\n\n int year = Integer.parseInt(pass.substring(0, 4));\n int month = Integer.parseInt(pass.substring(5,7))-1;\n int day = Integer.parseInt(pass.substring(8,10));\n\n int hour = Integer.parseInt(pass.substring(11,13));\n int minute = Integer.parseInt(pass.substring(14,16));\n int seconds = Integer.parseInt(pass.substring(17));\n\n\n System.out.println(\"CURRENT: \" + current_year+\"/\"+current_month+\"/\"+current_day+\" \"+current_hour+\":\"+current_minute+\":\"+current_seconds);\n\n System.out.println(\"PASS: \" + year+\"/\"+month+\"/\"+day+\" \"+hour+\":\"+minute+\":\"+seconds);\n\n if (current_year == year)\n {\n if (current_month == month)\n {\n if (current_day == day)\n {\n if (current_hour > hour)\n {\n if ((current_hour - hour > 1))\n {\n //Bi ordu gutxienez\n System.out.println(\"Bi ordu gutxienez: \" + (current_hour) + \" / \" + hour);\n return true;\n }\n else\n {\n if (((current_minute + 60) - minute ) < 60)\n {\n //Ordu barruan dago\n System.out.println(\"Ordu barruan nago ez delako 60 minutu pasa: \" + ((current_minute + 60) - minute ));\n return false;\n }\n else\n {\n //Refresh\n System.out.println(\"Eguneratu, ordu bat pasa da gutxienez: \" + ((current_minute + 60) - minute ));\n return true;\n }\n }\n\n }\n }\n }\n }\n return false;\n }", "public void tickerStoppen() \n {\n anzeige.tickerAbmelden( this );\n }", "public void transact() {\n\t\truPay.transact();\n\n\t}", "@Override\n public String getDescription() {\n return \"Transfer currency\";\n }", "@Override\n public String getDescription() {\n return \"Buy currency\";\n }", "public void verSesionCandidato(Candidato actualcandidat)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionCandidato nuevasesion = new SesionCandidato();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdcandidato(actualcandidat.getIdcandidato());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionCandidatoBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesioncandidato = new SesionCandidatoI(this, actualcandidat, sesioningr);\r\n\t\t\t\tsesioncandidato.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void btnbayarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnbayarActionPerformed\n String status = \"Selesai\";\n String formattanggal =\"yyyy-MM-dd\" ; \n SimpleDateFormat ft = new SimpleDateFormat(formattanggal); //ft = FORMAT TANGGAL\n String tglbayar = String.valueOf(ft.format(txttanggal.getDate()));\n String tglaudit = String.valueOf(ft.format(txtaudit.getDate()));\n try{\n if (tglaudit.equals(\"\") || tglbayar.equals(\"\")){\n JOptionPane.showMessageDialog(rootPane, \"ADA DATA YANG BELUM DI ISI\");\n }else{ \n Statement statement = (Statement) conek.GetConnection().createStatement();\n statement.executeUpdate(\"insert into tblpembayaran VALUES ('\" + txtkode.getText() + \"','\" + tglaudit + \"','\" + tglbayar + \"','\" + status + \"','\" + txtgrup.getSelectedItem() +\"','\" + txtaktivitas.getText() +\"','\" + txtcompart.getSelectedItem() + \"','\" + txtanggota.getText() +\"','\" + txtha.getText() +\"','\" + txtharga.getText() +\"','\" + jmltotal +\"','\" + txtgajianggota.getText() +\"');\");\n statement.executeUpdate(\"DELETE from tblaktivitas where compart=('\" + txtcompart.getSelectedItem() + \"');\");\n statement.close();\n JOptionPane.showMessageDialog(rootPane, \"PEMBAYARAN BERHASIL DISIMPAN\"); \n txttanggal.setDateFormatString(\"\");\n txtaudit.setDateFormatString(\"\");\n }\n }catch (Exception t){\n JOptionPane.showMessageDialog(rootPane, \"PEMBAYARAN GAGAL DISIMPAN\");\n } \n autonumber();\n tabelpembayaran();\n tabelaktivitas();\n tampilgrup();\n }", "@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}", "public void setTesto(){\n \n if(sec < 10){\n this.testo = min + \":0\" + sec + \":\" + deci;\n }\n else{\n this.testo = min + \":\" + sec + \":\" + deci;\n }\n \n }", "@Override\r\n public BoletoLocal onGerarBoleto(Contrato contrato, ConfiguracoesBoleto config) {\r\n int diaVencimento = contrato.getDiaVencimento();\r\n Calendar dataHj = Calendar.getInstance();\r\n\r\n //SE O DIA DO VENCIMENTO DO BOLETO FOR MENOR OU IGUAL\r\n // A DATA DE HJ GERA NORMAL, SE NÃO ELE GERA PRO PROXIMO MES\r\n if (dataHj.get(Calendar.DAY_OF_MONTH) <= diaVencimento) {\r\n\r\n } else {\r\n dataHj.add(Calendar.MONTH, 1);\r\n }\r\n\r\n dataHj.set(Calendar.DAY_OF_MONTH, diaVencimento);\r\n Calendar dataMaxima = Calendar.getInstance();\r\n dataMaxima.add(Calendar.DAY_OF_MONTH, 20);\r\n\r\n //SE A DATA FOR MAIOS QUE O MÁXIMO CONFIGURADO NÃO GERA NADA.\r\n if (dataHj.after(dataMaxima)) {\r\n System.out.println(\"data depois de 20 dias\");\r\n return null;\r\n }\r\n\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O CEDENTE.\r\n */\r\n Cedente cedente = new Cedente(config.getBanco().getNomeBeneficiado(), config.getDocBeneficiado());\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O SACADO.\r\n */\r\n Sacado sacado = new Sacado(contrato.getLocatario().getNome(), contrato.getLocatario().getDocumento());\r\n\r\n // Informando o endereço do sacado.\r\n org.jrimum.domkee.comum.pessoa.endereco.Endereco enderecoSac = new org.jrimum.domkee.comum.pessoa.endereco.Endereco();\r\n enderecoSac.setUF(UnidadeFederativa.valueOfSigla(contrato.getLocatario().getEndereco().getCodUf()));\r\n enderecoSac.setLocalidade(contrato.getLocatario().getEndereco().getCidade());\r\n enderecoSac.setCep(new CEP(contrato.getLocatario().getEndereco().getDesCep()));\r\n enderecoSac.setBairro(contrato.getLocatario().getEndereco().getDesBairro());\r\n enderecoSac.setLogradouro(contrato.getLocatario().getEndereco().getDesLogradouro());\r\n enderecoSac.setNumero(contrato.getLocatario().getEndereco().getDesNumero());\r\n sacado.addEndereco(enderecoSac);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O TÍTULO.\r\n */\r\n // Informando dados sobre a conta bancária do título.\r\n ContaBancaria contaBancaria = null;\r\n if (config.getBanco().getBanco() == BancosEnum.ITAU) {\r\n contaBancaria = new ContaBancaria(BancosSuportados.BANCO_ITAU.create());\r\n }\r\n\r\n if (contaBancaria == null) {\r\n System.out.println(\"Conta bancária não cadastrada\");\r\n return null;\r\n }\r\n\r\n contaBancaria.setNumeroDaConta(new NumeroDaConta(Integer.parseInt(config.getBanco().getContaNumero()), config.getBanco().getContaDigito()));\r\n contaBancaria.setCarteira(new Carteira(Integer.parseInt(config.getCarteira())));\r\n contaBancaria.setAgencia(new Agencia(Integer.parseInt(config.getBanco().getAgenciaNumero()), config.getBanco().getAgenciaDigito()));\r\n\r\n Titulo titulo = new Titulo(contaBancaria, sacado, cedente);\r\n titulo.setNumeroDoDocumento(config.getNumeroDocumento());\r\n titulo.setNossoNumero(config.getNossoNumero());\r\n titulo.setDigitoDoNossoNumero(config.getNossoNumeroDigito());\r\n titulo.setValor(contrato.getValor());\r\n titulo.setDataDoDocumento(new Date());\r\n\r\n titulo.setDataDoVencimento(dataHj.getTime());\r\n titulo.setTipoDeDocumento(TipoDeTitulo.DM_DUPLICATA_MERCANTIL);\r\n titulo.setAceite(Aceite.A);\r\n//\t\ttitulo.setDesconto(BigDecimal.ZERO);\r\n//\t\ttitulo.setDeducao(BigDecimal.ZERO);\r\n//\t\ttitulo.setMora(BigDecimal.ZERO);\r\n//\t\ttitulo.setAcrecimo(BigDecimal.ZERO);\r\n//\t\ttitulo.setValorCobrado(BigDecimal.ZERO);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O BOLETO.\r\n */\r\n Boleto boletoBank = new Boleto(titulo);\r\n\r\n boletoBank.setLocalPagamento(config.getLocalPagamento());\r\n boletoBank.setInstrucaoAoSacado(config.getInstrucaoSacado());\r\n boletoBank.setInstrucao1(config.getInstrucao1());\r\n boletoBank.setInstrucao2(config.getInstrucao2());\r\n boletoBank.setInstrucao3(config.getInstrucao3());\r\n boletoBank.setInstrucao4(config.getInstrucao4());\r\n boletoBank.setInstrucao5(config.getInstrucao5());\r\n boletoBank.setInstrucao6(config.getInstrucao6());\r\n boletoBank.setInstrucao7(config.getInstrucao7());\r\n boletoBank.setInstrucao8(config.getInstrucao8());\r\n\r\n /*\r\n\t\t * GERANDO O BOLETO BANCÁRIO.\r\n */\r\n // Instanciando um objeto \"BoletoViewer\", classe responsável pela\r\n // geração do boleto bancário.\r\n BoletoViewer boletoViewer = new BoletoViewer(boletoBank);\r\n\r\n // Alterado para pegar o path do sistema automático , gerando dentro\r\n // do projeto.\r\n // Gerando o arquivo. No caso o arquivo mencionado será salvo na mesma\r\n // pasta do projeto. Outros exemplos:\r\n // WINDOWS: boletoViewer.getAsPDF(\"C:/Temp/MeuBoleto.pdf\");\r\n // LINUX: boletoViewer.getAsPDF(\"/home/temp/MeuBoleto.pdf\");\r\n String pasta = \"/boletos\";\r\n\r\n String caminhoCompletoPasta = FacesUtil.getExternalContext().getRealPath(pasta) + \"/\";\r\n BoletoLocal boletoLocal = new BoletoLocal();\r\n contrato.getBoletos().add(boletoLocal);\r\n boletoLocal.setContrato(contrato);\r\n\r\n String nomeArquivoPDF = contrato.getLocatario().getNome().replace(\" \", \"_\") + boletoLocal.getMes() + boletoLocal.getAno() + \".pdf\";\r\n\r\n System.out.println(caminhoCompletoPasta + nomeArquivoPDF);\r\n File arquivoPdf = boletoViewer.getPdfAsFile(caminhoCompletoPasta + nomeArquivoPDF);\r\n\r\n boletoLocal.setPath(pasta + nomeArquivoPDF);\r\n\r\n super.save(boletoLocal);\r\n\r\n return boletoLocal;\r\n }", "int getSignOffTime();", "public static void main(String[] args) {\n int yaricap=4;\n double alan= 4*4*Constans.pi;\n\n\n // kullanicidan alacaginiz saat , dakika ve gun bilgisinin saniyeyey ceviriniz\n\n int gun =23;\n int saat=7;\n int dakika=25;\n\n int saniyeCinsinden =\n gun * Constants.hourInDay *Constants.minuteInHour* Constants.secondInMinute+\n saat* Constants.minuteInHour* Constants.secondInMinute+\n dakika * Constants.secondInMinute;\n System.out.println(\"saniyeCinsinden = \" + saniyeCinsinden);\n\n\n }", "public static String sendLiveRequest(){\n\n // The following line initializes the HttpGet Object with the URL in order to send a request\n HttpGet get = new HttpGet(BASE_URL + ENDPOINT + \"?access_key=\" + ACCESS_KEY);\n\n try {\n CloseableHttpResponse response = httpClient.execute(get);\n HttpEntity entity = response.getEntity();\n\n // the following line converts the JSON Response to an equivalent Java Object\n JSONObject exchangeRates = new JSONObject(EntityUtils.toString(entity));\n \n Date timeStampDate = new Date((long)(exchangeRates.getLong(\"timestamp\")*1000)); \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(timeStampDate);\n \n String USDUAH = \"1 \" + exchangeRates.getString(\"source\") + \" in UAH : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDUAH\") + \" (Date: \" + formattedDate + \")\";\n String USDEUR = \"1 \" + exchangeRates.getString(\"source\") + \" in EUR : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDEUR\") + \" (Date: \" + formattedDate + \")\"; \n String USDGBP = \"1 \" + exchangeRates.getString(\"source\") + \" in GBP : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDGBP\") + \" (Date: \" + formattedDate + \")\";\n String USDJPY = \"1 \" + exchangeRates.getString(\"source\") + \" in JPY : \" + exchangeRates.getJSONObject(\"quotes\").getDouble(\"USDJPY\") + \" (Date: \" + formattedDate + \")\";\n return USDUAH+\"\\n\"+USDEUR+\"\\n\"+USDGBP+\"\\n\"+USDJPY;\n } catch (ClientProtocolException e) { \n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (IOException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n Main.logger.log(Level.SEVERE, \"Exception: \", e);\n }\n\t\treturn null;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.PaymentDelay getPaymentDelay();", "@Test\n public void savings_account2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account savingsAccount = new SavingsAccount(bill, Account.SAVINGS);\n bank.addCustomer(new Customer(\"Bill\").openAccount(savingsAccount));\n Transaction t = new CreditTransaction(500.0);\n t.setTransactionDate(getTestDate(-15));\n savingsAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365, 15) * 500.0 - 500, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "@Override\n public void run() {\n long pocetak = 0;\n long kraj = 0;\n int pauza = Integer.parseInt(SlusacAplikacije.konfig.dajPostavku(\"sleep\"));\n while (!ServerSustava.isStop()) {\n pocetak = System.currentTimeMillis();\n if (!ServerSustava.isPauza()) {\n System.out.println(\"preuzimanje meteo podataka\");\n BazaPodataka bp = new BazaPodataka();\n List<Adresa> adrese = new ArrayList<Adresa>();\n adrese = bp.dohvatiAdrese();\n String apiKey = SlusacAplikacije.konfig.dajPostavku(\"apiKey\");\n OWMKlijent owmk = new OWMKlijent(apiKey);\n if (adrese != null) {\n for (Adresa a : adrese) {\n //System.out.println(\"adr: \" + a.getAdresa());\n MeteoPodaci mp = owmk.getRealTimeWeather(a.getGeoloc().getLatitude(), a.getGeoloc().getLongitude());\n bp.spremiMeteoPodatke(a.getAdresa(), mp);\n //System.out.println(\"Status: \" + a.getStatusPreuzimanja());\n if (a.getStatusPreuzimanja() == 0) {\n // System.out.println(\"update statusa!\");\n bp.statusPreuzimanjaPodataka(a.getAdresa());\n }\n }\n }\n }\n kraj = System.currentTimeMillis();\n long trajanjeObrade = kraj - pocetak;\n try {\n long spavanje = pauza * 1000;\n if (trajanjeObrade < spavanje) {\n sleep(spavanje - trajanjeObrade);\n }\n } catch (InterruptedException ex) {\n Logger.getLogger(MeteoPodaciPreuzimanje.class.getName()).log(Level.SEVERE, null, ex);\n break;\n }\n }\n }", "@Test\n void deve_retornar_o_periodo_second_period_in() {\n List<LocalTime> localTimes = Arrays.asList(LocalTime.parse(\"10:30:00\"), LocalTime.parse(\"10:30:00\"));\n TimeCourseEnum response = timeService.addPeriod(localTimes);\n Assert.assertEquals(TimeCourseEnum.SECOND_PERIOD_IN, response);\n }", "public boolean crearNuevoTicket(Ticket ticket, Usuario usuario) {\n\n try {\n\n //Se determina el tiempo de vida del ticket según el SLA\n int tiempoDeVida = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeSolucion();\n Calendar c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeVida);\n ticket.setTiempoDeVida(c.getTime());\n //Se indica la fecha máxima de cierre\n ticket.setFechaDeCierre(c.getTime());\n //Se indica la fecha actual como fecha de creacion\n ticket.setFechaDeCreacion(new Date());\n //se ingresa la fecha de última modificación\n ticket.setFechaDeModificacion(ticket.getFechaDeCreacion());\n //Se determina el tiempo de actualizacion segun el SLA\n //int tiempoDeActualizacion = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeActualizacionDeEscalacion();\n //Información del ticket y el sla\n Sla ticketSla = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid();\n PrioridadTicket prioridadTicket = ticket.getPrioridadTicketcodigo();\n int tiempoDeActualizacion = prioridadTicket.getValor() == 1 ? ticketSla.getTiempoRespuestaPrioridadAlta() : prioridadTicket.getValor() == 2 ? ticketSla.getTiempoRespuestaPrioridadMedia() : ticketSla.getTiempoRespuestaPrioridadBaja();\n //Se añade el tiempo de actualización para pos-validación según SLA\n c = Calendar.getInstance();\n c.add(Calendar.HOUR, tiempoDeActualizacion);\n //Se hacen verificaciones por tipo de disponibilidad es decir 24x7 o 8x5\n int horaActual = c.get(Calendar.HOUR_OF_DAY);\n int diaDeLaSemana = c.get(Calendar.DAY_OF_WEEK);\n if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (diaDeLaSemana == Calendar.SATURDAY || diaDeLaSemana == Calendar.SUNDAY || (diaDeLaSemana == Calendar.FRIDAY && horaActual > 17))) {\n if (diaDeLaSemana == Calendar.FRIDAY) {\n c.add(Calendar.DAY_OF_MONTH, 3);\n } else if (diaDeLaSemana == Calendar.SATURDAY) {\n c.add(Calendar.DAY_OF_MONTH, 2);\n } else {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n } else if (ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") && (horaActual < 8 || horaActual > 17) && (diaDeLaSemana != Calendar.SATURDAY && diaDeLaSemana != Calendar.SUNDAY)) {\n if (horaActual > 17) {\n c.add(Calendar.DAY_OF_MONTH, 1);\n }\n c.set(Calendar.HOUR_OF_DAY, 8);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n }\n ticket.setFechaDeProximaActualizacion(c.getTime());\n if (ticket.getFechaDeProximaActualizacion().compareTo(ticket.getFechaDeCierre()) > 0) {\n Calendar cierre = Calendar.getInstance();\n cierre.setTime(c.getTime());\n cierre.add(Calendar.HOUR, tiempoDeVida);\n ticket.setFechaDeCierre(cierre.getTime());\n }\n //Se indica la persona que crea el ticket\n ticket.setUsuarioidcreador(usuario);\n //Se indica el usuario propietario por defecto y el responsable (Soporte HELPDESK)\n Usuario usuarioHelpdek = this.usuarioFacade.obtenerUsuarioPorCorreoElectronico(\"[email protected]\");\n ticket.setUsuarioidpropietario(usuarioHelpdek);\n ticket.setUsuarioidresponsable(usuarioHelpdek);\n //Se indica el estado actual del ticket\n EstadoTicket estadoNuevo = this.estadoTicketFacade.find(1);\n ticket.setEstadoTicketcodigo(estadoNuevo);\n //Creamos el ticket\n this.ticketFacade.create(ticket);\n //Creamos el Notificador\n TareaTicketInfo tareaTicketInfo = new TareaTicketInfo(\"t_sla\" + ticket.getTicketNumber(), \"Notificador SLA ticket# \" + ticket.getTicketNumber(), \"LoteTareaNotificarSLA\", ticket);\n //Información del ticket y el sla\n //Sla ticketSla = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid();\n //PrioridadTicket prioridadTicket = ticket.getPrioridadTicketcodigo();\n String hora = prioridadTicket.getValor() == 1 ? String.valueOf(ticketSla.getTiempoRespuestaPrioridadAlta()) : prioridadTicket.getValor() == 2 ? String.valueOf(ticketSla.getTiempoRespuestaPrioridadMedia()) : String.valueOf(ticketSla.getTiempoRespuestaPrioridadBaja());\n //Definir la hora de inicio\n //c = Calendar.getInstance();\n //c.add(Calendar.HOUR, Integer.parseInt(hora));\n c.add(Calendar.MINUTE, -30);\n tareaTicketInfo.setStartDate(c.getTime());\n tareaTicketInfo.setEndDate(ticket.getFechaDeCierre());\n tareaTicketInfo.setSecond(String.valueOf(c.get(Calendar.SECOND)));\n tareaTicketInfo.setMinute(String.valueOf(c.get(Calendar.MINUTE)) + \"/10\");\n tareaTicketInfo.setHour(String.valueOf(c.get(Calendar.HOUR_OF_DAY)));\n tareaTicketInfo.setMonth(\"*\");\n tareaTicketInfo.setDayOfMonth(\"*\");\n tareaTicketInfo.setDayOfWeek(ticketSla.getTipoDisponibilidadid().getDisponibilidad().equals(\"8x5\") ? \"Mon, Tue, Wed, Thu, Fri\" : \"*\");\n tareaTicketInfo.setYear(\"*\");\n tareaTicketInfo.setDescription(\"Tarea SLA para ticket# \" + ticket.getTicketNumber());\n this.notificadorServicio.createJob(tareaTicketInfo);\n\n //Se añade un historico del evento\n HistorialDeTicket historialDeTicket = new HistorialDeTicket();\n historialDeTicket.setEventoTicketcodigo(this.eventoTicketFacade.find(1));\n historialDeTicket.setFechaDelEvento(new Date());\n historialDeTicket.setOrden(this.historialDeTicketFacade.obtenerOrdenDeHistorialDeTicket(ticket));\n historialDeTicket.setUsuarioid(ticket.getUsuarioidcreador());\n historialDeTicket.setTicketticketNumber(ticket);\n this.historialDeTicketFacade.create(historialDeTicket);\n\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n return true;\n }", "@Override\n public double salario() {\n return 2600 * 1.10;\n }", "public int getBlockchainValidTimer() {\r\n return blockchainValidTimer;\r\n }", "@Transactional\n public void transfer(Rekening asal, Rekening tujuan, BigDecimal nilai, String keterangan) {\n logTransaksiService.logTransferMulai(asal, tujuan, nilai);\n\n // cek saldo\n if (asal.getSaldo().compareTo(nilai) < 0) {\n throw new IllegalStateException(\"Saldo tidak cukup\");\n }\n\n // kurangi saldo pengirim\n asal.setSaldo(asal.getSaldo().subtract(nilai));\n rekeningDao.save(asal);\n\n // mutasi rekening pengirim\n Mutasi mutasiPengirim = new Mutasi();\n mutasiPengirim.setKeterangan(\"transfer ke \"+tujuan.getNomor());\n mutasiPengirim.setRekening(asal);\n mutasiPengirim.setNilai(nilai.multiply(new BigDecimal(-1)));\n mutasiDao.save(mutasiPengirim);\n\n // mutasi rekening penerima\n Mutasi mutasiPenerima = new Mutasi();\n mutasiPenerima.setKeterangan(\"transfer dari \"+asal.getNomor());\n mutasiPenerima.setRekening(tujuan);\n mutasiPenerima.setNilai(nilai);\n mutasiDao.save(mutasiPenerima);\n\n // tambah saldo penerima\n tujuan.setSaldo(tujuan.getSaldo().add(nilai));\n rekeningDao.save(tujuan);\n\n // log sukses transaksi\n logTransaksiService.logTransferSukses(asal, tujuan, nilai);\n }", "public boolean isValid_ToBuyTicket() {\n if (this.tktSold < this.museum.getMaxVisit() && isNowTime_in_period()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.5769956", "0.5754285", "0.5690234", "0.56901747", "0.56510216", "0.559834", "0.55163443", "0.55095404", "0.55068296", "0.54266435", "0.541386", "0.53151274", "0.53005683", "0.52976197", "0.52579063", "0.5257371", "0.52467275", "0.52355766", "0.52031636", "0.5191", "0.5184141", "0.51818776", "0.5178722", "0.5170354", "0.5168266", "0.5168266", "0.51661074", "0.5165356", "0.51641095", "0.5150826", "0.515067", "0.5148797", "0.5148182", "0.51453245", "0.51417476", "0.5129849", "0.51292634", "0.51232237", "0.5122293", "0.51219785", "0.51167727", "0.51162016", "0.51042706", "0.51023865", "0.5089017", "0.50697017", "0.5065897", "0.5065486", "0.5057764", "0.50512123", "0.5044027", "0.5041755", "0.5023926", "0.5021555", "0.5017594", "0.5017179", "0.5013958", "0.5010486", "0.50077116", "0.50036895", "0.50017565", "0.4992811", "0.4992598", "0.4991768", "0.49871498", "0.4978741", "0.49773052", "0.49771404", "0.49758297", "0.4970291", "0.49698177", "0.49692792", "0.49689332", "0.49639326", "0.49544036", "0.49474183", "0.49387977", "0.4931012", "0.492984", "0.49217984", "0.49198517", "0.49179834", "0.49178806", "0.4911313", "0.4910733", "0.49095437", "0.49066797", "0.48979244", "0.48973677", "0.48966822", "0.48948804", "0.48937547", "0.48935392", "0.48916274", "0.48890525", "0.4885976", "0.4879082", "0.4876591", "0.4873677", "0.48736742" ]
0.53170794
11
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.id
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public String getBookId() {\r\n return bookId;\r\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public int getBook_id() {\n\treturn book_id;\n}", "public String getBookId() {\n\t\treturn bookId;\n\t}", "public int getBookID() {\n return bookID;\n }", "public long getBookId() {\n return _sTransaction.getBookId();\n }", "public StrColumn getBookIdISBN() {\n return delegate.getColumn(\"book_id_ISBN\", DelegatingStrColumn::new);\n }", "Book getBookById(Integer id);", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "Book selectByPrimaryKey(String bid);", "BookInfo selectByPrimaryKey(Integer id);", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "CmsRoomBook selectByPrimaryKey(String bookId);", "int getBId();", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "IntegralBook selectByPrimaryKey(Long integralBookId);", "@Override\n\tpublic Book findBooknum(int id) {\n\t\treturn this.borrowrecordMapper.findBooknum(id);\n\t}", "Book selectByPrimaryKey(String id);", "public Book getById(Long bookId) {\n\t\treturn (Book) entityManager.createQuery(\"from Book where id= :bookId\").setParameter(\"bookId\", bookId)\n\t\t\t\t.getSingleResult();\n\t}", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "BookDO selectByPrimaryKey(String bookIsbn);", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "int getBookId(Book book) {\n\t\t\n\t\t// goes through all our books\n\t\tfor (int index = 0; index < this.bookCounter; index++) {\n\n\t\t\t// checks if the book is already in the library\n\t\t\tif (book == this.bookShelf[index]) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// we could not find the book \n\t\treturn -1; \n\t}", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public Book getBook(int bookID) throws SQLException {\n if (books.getBook(bookID)!=null){\n return books.getBook(bookID);}\n else\n return null;\n }", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public Number getBookDocId() {\n return (Number)getAttributeInternal(BOOKDOCID);\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "Integer getID();", "Integer getID();", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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\treturn null;\r\n\t}", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "private int getDocIdColumnIndex(String[] columnNames, String docIdColumnName) throws PersistenceException {\n int itemIdColNum = -1;\n if (docIdColumnName != null) {\n for (int i = 0; i < columnNames.length; i++) {\n if (columnNames[i].equals(docIdColumnName)) {\n itemIdColNum = i + 1; // + 1 for JDBC\n break;\n }\n }\n if (itemIdColNum == -1) {\n throw new PersistenceException(\n String.format(\"The document ID column could not be found in the SQL result set. docIdColumn: '%s', SQL: %s, columns: %s.\",\n docIdColumnName, sqlStatement, String.join(\", \", columnNames)));\n }\n }\n return itemIdColNum;\n }", "Integer getId();", "Integer getId();", "Integer getId();", "public Integer getId(){\n\t\treturn id;\n\t}", "public org.jooq.test.h2.generatedclasses.tables.pojos.VBook fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.ID, value);\n\t}", "List<Book> getBooksByAuthorId(Integer authorId);", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "public int getBId() {\n return bId_;\n }", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}", "public int getBId() {\n return instance.getBId();\n }", "public long getShopBasketId();", "public Integer getsId() {\n return sId;\n }", "public Integer getId() {\n\t\treturn loanId; //changed LoAn_Id to loanId\r\n\t}", "public static Book getIdBook(Connection conn, int id) {\n\t\tBook book = null;\n\t\tString sql = \"select * from book where bookid = ?\";\n\t\ttry {\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\n\t\t\tpst.setInt(1, id);\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tString title = rs.getString(\"title\");\n\t\t\t\tString detail = rs.getString(\"detail\");\n\t\t\t\tfloat price = rs.getFloat(\"price\");\n\t\t\t\t\n\t\t\t\tbook = new Book(id, title, detail, price);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn book;\n\t}", "public Integer getId() { return this.id; }", "io.dstore.values.IntegerValue getOrderPersonId();", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return bookingId;\n }", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "public long getItemShopBasketId();", "@JsonIgnore\n\t@Id\n\tpublic Long getId() {\n\t\treturn Long.valueOf(String.format(\"%d%02d\", sale.getSaleYear(), this.num));\n\t}", "public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }", "public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }", "public int getBookingId() {\n return booking_id;\n }", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "private Integer getId() { return this.id; }", "Long getId();", "Long getId();", "Long getId();", "public int getStudentId();", "public java.lang.Long getId();", "public int getId()\r\n\t{\r\n\t\treturn this.userId;\r\n\t}", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();" ]
[ "0.74005157", "0.70494276", "0.70494276", "0.70494276", "0.684052", "0.684052", "0.6831318", "0.6698455", "0.6655966", "0.6655966", "0.6632953", "0.65617645", "0.64466304", "0.63848734", "0.6167155", "0.60877895", "0.6058332", "0.6058332", "0.6058332", "0.6025148", "0.6023869", "0.6013336", "0.6013336", "0.60093856", "0.59933025", "0.5961098", "0.59598607", "0.59366465", "0.5921504", "0.59205717", "0.58870214", "0.5876133", "0.5859939", "0.5826822", "0.58192855", "0.58174855", "0.5812624", "0.5684739", "0.5667592", "0.56463945", "0.5631875", "0.56278515", "0.56278515", "0.5621991", "0.56168985", "0.5598164", "0.5581164", "0.55721503", "0.55721503", "0.55721503", "0.55651796", "0.5564172", "0.55552053", "0.55414104", "0.55329597", "0.5523498", "0.5508851", "0.54959434", "0.54769516", "0.5471094", "0.5456466", "0.54462403", "0.5444866", "0.5440688", "0.5440307", "0.54390967", "0.5436101", "0.5436101", "0.54355013", "0.54300773", "0.54226243", "0.54148805", "0.54148805", "0.54109496", "0.5398583", "0.5398583", "0.5398583", "0.5398583", "0.5398583", "0.5398583", "0.5398583", "0.5391761", "0.53905153", "0.5388475", "0.5388475", "0.5388475", "0.53872114", "0.5387034", "0.53859043", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414", "0.53807414" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.id
public void setId(Long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "public void setBookId(long bookId) {\n _sTransaction.setBookId(bookId);\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public void setBookId(String bookId) {\r\n this.bookId = bookId == null ? null : bookId.trim();\r\n }", "public void setBookId(String bookId) {\n\t\tthis.bookId = bookId == null ? null : bookId.trim();\n\t}", "public int getBook_id() {\n\treturn book_id;\n}", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public String getBookId() {\r\n return bookId;\r\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\n return bookid;\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n\t\treturn bookId;\n\t}", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public int getBookID() {\n return bookID;\n }", "public Book(Integer id) {\n\t\tthis.id = id;\n\t}", "public void setBookDocId(Number value) {\n setAttributeInternal(BOOKDOCID, value);\n }", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public void setId(int id){\r\n this.id = id;\r\n }", "private void setId(Integer id) { this.id = id; }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "public void setId(int id){ this.id = id; }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "public void setBook(Book book) {\n this.book = book;\n }", "public void setId(long id) {\n id_ = id;\n }", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void setId(int newId) {\n\tid = newId;\n}", "public void setId(int value) {\r\n this.id = value;\r\n }", "@Override\r\n\tpublic boolean updateByBookId(Book book) {\n\t\tboolean flag=false;\r\n\t\tString sql=\"update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? \"\r\n\t\t\t\t+ \"where id=?\";\r\n\t\tList<Object> list=new ArrayList<Object>();\r\n\t\tif(book!=null){\r\n\t\t\tlist.add(book.getTitle());\r\n\t\t\tlist.add(book.getAuthor());\r\n\t\t\tlist.add(book.getPublisherId());\r\n\t\t\tlist.add(book.getPublishDate());\r\n\t\t\tlist.add(book.getIsbn());\r\n\t\t\tlist.add(book.getWordsCount());\r\n\t\t\tlist.add(book.getUnitPrice());\r\n\t\t\tlist.add(book.getContentDescription());\r\n\t\t\tlist.add(book.getAurhorDescription());\r\n\t\t\tlist.add(book.getEditorComment());\r\n\t\t\tlist.add(book.getTOC());\r\n\t\t\tlist.add(book.getCategoryId());\r\n\t\t\t\r\n\t\t\tlist.add(book.getBooksImages());\r\n\t\t\tlist.add(book.getQuantity());\r\n\t\t\t\r\n\t\t\tlist.add(book.getAddress());\r\n\t\t\tif(book.getBaoyou()==\"0\"){\r\n\t\t\t\tbook.setBaoyou(\"不包邮\");\r\n\t\t\t}else{\r\n\t\t\t\tbook.setBaoyou(\"包邮\");\r\n\t\t\t}\r\n\t\t\tlist.add(book.getBaoyou());\r\n\t\t\tlist.add(book.getId());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint update = runner.update(sql, list.toArray());\r\n\t\t\tif(update>0){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\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\treturn flag;\r\n\t}", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public Book updateBook(Long id, Book book) {\n return this.sRepo.save(book);\n\n\t}", "public void setId(Integer id){\n\t\tthis.id = id;\n\t}", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "Book selectByPrimaryKey(String bid);", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setID(String idIn) {this.id = idIn;}", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "public void setId(Long id) \n {\n this.id = id;\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void setID(int id){\n this.id=id;\n }", "public void setId(int id)\n {\n\tthis.id = id;\n }", "public void setId(int id) {\n\tthis.id = id;\n}", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "public void setId(int newId) {\n this.id = newId;\n }", "private void setId(int value) {\n \n id_ = value;\n }" ]
[ "0.70415163", "0.69763285", "0.69763285", "0.69577694", "0.69577694", "0.69577694", "0.68400466", "0.6617363", "0.65705943", "0.6487159", "0.6345207", "0.6294231", "0.6294231", "0.6294231", "0.6189749", "0.61583525", "0.61370385", "0.6130293", "0.6122628", "0.6118547", "0.60971713", "0.60971713", "0.60373837", "0.60373837", "0.5983915", "0.5920284", "0.5853226", "0.5853226", "0.58243924", "0.579959", "0.57500476", "0.5692057", "0.56297815", "0.5623361", "0.5622572", "0.56112933", "0.56110096", "0.56047046", "0.55990666", "0.55774134", "0.5566981", "0.55638427", "0.5558383", "0.5558383", "0.55576533", "0.55489975", "0.55489975", "0.5531389", "0.5530876", "0.55301183", "0.5528808", "0.5519259", "0.5500485", "0.54922503", "0.5487935", "0.5485725", "0.5480005", "0.5480005", "0.5474319", "0.5474319", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.54684746", "0.5466971", "0.54640794", "0.5462339", "0.54615015", "0.5460546", "0.54582065", "0.5457638", "0.54499155", "0.54467493", "0.54453266" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.book_id
public String getBookId() { return bookId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\n return bookid;\n }", "public String getBookId() {\r\n return bookId;\r\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public int getBook_id() {\n\treturn book_id;\n}", "public long getBookId() {\n return _sTransaction.getBookId();\n }", "public int getBookID() {\n return bookID;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public Book getById(Long bookId) {\n\t\treturn (Book) entityManager.createQuery(\"from Book where id= :bookId\").setParameter(\"bookId\", bookId)\n\t\t\t\t.getSingleResult();\n\t}", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "int getBookId(Book book) {\n\t\t\n\t\t// goes through all our books\n\t\tfor (int index = 0; index < this.bookCounter; index++) {\n\n\t\t\t// checks if the book is already in the library\n\t\t\tif (book == this.bookShelf[index]) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// we could not find the book \n\t\treturn -1; \n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public StrColumn getBookIdISBN() {\n return delegate.getColumn(\"book_id_ISBN\", DelegatingStrColumn::new);\n }", "public Book getBook(int bookID) throws SQLException {\n if (books.getBook(bookID)!=null){\n return books.getBook(bookID);}\n else\n return null;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "IntegralBook selectByPrimaryKey(Long integralBookId);", "Book selectByPrimaryKey(String bid);", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "Book getBookById(Integer id);", "BookInfo selectByPrimaryKey(Integer id);", "BookDO selectByPrimaryKey(String bookIsbn);", "public Number getBookDocId() {\n return (Number)getAttributeInternal(BOOKDOCID);\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "Book selectByPrimaryKey(String id);", "int getBId();", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Book findBooknum(int id) {\n\t\treturn this.borrowrecordMapper.findBooknum(id);\n\t}", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "@Override\n\tpublic Optional<ShoppingCart> getBookById(int bookid) {\n\t\treturn dao.findById(bookid);\n\t}", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "private int getDocIdColumnIndex(String[] columnNames, String docIdColumnName) throws PersistenceException {\n int itemIdColNum = -1;\n if (docIdColumnName != null) {\n for (int i = 0; i < columnNames.length; i++) {\n if (columnNames[i].equals(docIdColumnName)) {\n itemIdColNum = i + 1; // + 1 for JDBC\n break;\n }\n }\n if (itemIdColNum == -1) {\n throw new PersistenceException(\n String.format(\"The document ID column could not be found in the SQL result set. docIdColumn: '%s', SQL: %s, columns: %s.\",\n docIdColumnName, sqlStatement, String.join(\", \", columnNames)));\n }\n }\n return itemIdColNum;\n }", "public int getBookingId() {\n return booking_id;\n }", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return bookingId;\n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "@Query(value=\"SELECT s FROM Shelf s, IN(s.book) b WHERE b.id = ?1\", nativeQuery=false\n )\n Optional<Shelf> findShelfByBookId(Integer bookId);", "public void setBookId(String bookId) {\r\n this.bookId = bookId == null ? null : bookId.trim();\r\n }", "@Override\n public Optional<BookDto> getBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n LogUtils.getInfoLogger().info(\"Found the book: {}\", bookEntity.get());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not found\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "@Override\n public MyBook findById(final int bookshelfId,\n final int userId, final int bookId) {\n System.err.println(\"MyBookRepositoryImpl:172 - not implement\");\n System.exit(1);\n return null;\n }", "public void setBookId(String bookId) {\n\t\tthis.bookId = bookId == null ? null : bookId.trim();\n\t}", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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\treturn null;\r\n\t}", "public void setBookId(long bookId) {\n _sTransaction.setBookId(bookId);\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "List<Book> getBooksByAuthorId(Integer authorId);", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "@Basic( optional = true )\n\t@Column( name = \"book_name\", length = 2147483647 )\n\tpublic String getBookName() {\n\t\treturn this.bookName;\n\t\t\n\t}", "public org.jooq.test.h2.generatedclasses.tables.pojos.VBook fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.ID, value);\n\t}", "io.dstore.values.IntegerValue getOrderPersonId();", "public int getBId() {\n return instance.getBId();\n }", "public int getBId() {\n return bId_;\n }", "public long getShopBasketId();", "@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}", "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bookID = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString bookCategory = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tbook = new BookBean(bookID, title, price,bookCategory);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn book;\r\n\t}", "Integer getID();", "Integer getID();", "public long getItemShopBasketId();", "java.lang.String getBidid();", "public String getStudentID(String firstName, String lastName, String bcsYear) {\n String studentID = null;\n String query = queryFormerFromStudent(firstName, lastName, bcsYear);\n Statement myStatement;\n ResultSet myResultSet = null;\n\n try {\n myStatement = studentConn.createStatement();\n myResultSet = myStatement.executeQuery(query);\n\n while (myResultSet.next()) {\n studentID = myResultSet.getString(\"studentID\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return studentID;\n }", "public static Book getIdBook(Connection conn, int id) {\n\t\tBook book = null;\n\t\tString sql = \"select * from book where bookid = ?\";\n\t\ttry {\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\n\t\t\tpst.setInt(1, id);\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tString title = rs.getString(\"title\");\n\t\t\t\tString detail = rs.getString(\"detail\");\n\t\t\t\tfloat price = rs.getFloat(\"price\");\n\t\t\t\t\n\t\t\t\tbook = new Book(id, title, detail, price);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn book;\n\t}", "public String fetchPrimaryKey(){\n\t\treturn primaryKey;\n\t}", "public JSONObject book_details(int book_id) throws JSONException {\n startSession();\n\n Query query = session.createQuery(\"from Book where id = :i\");\n query.setParameter(\"i\", book_id);\n\n Book book = (Book) query.uniqueResult();\n User owner = (User) book.getOwner();\n JSONObject book_info = new JSONObject(book.getBook_info());\n JSONObject response = new JSONObject();\n\n response.put(\"success\",\"true\");\n response.put(\"book\", book.getName());\n response.put(\"author\", book.getAuthor());\n response.put(\"rent\", book.getRent());\n response.put(\"deposit\", book.getDeposit());\n response.put(\"genre\", book.getGenre());\n response.put(\"times_rented\", book.getTimes_rented());\n response.put(\"available\",book.isAvailable());\n\n response.put(\"print\", book_info.getString(\"print\"));\n response.put(\"condition\", book_info.getString(\"condition\"));\n response.put(\"year_bought\", book_info.getString(\"year_bought\"));\n response.put(\"review\", book_info.getString(\"review\"));\n\n response.put(\"owner_id\", owner.getId());\n response.put(\"owner_name\", owner.getFull_name());\n response.put(\"owner_location\", owner.getLocation());\n response.put(\"owner_contact\", owner.getContact_no());\n\n endSession();\n return response;\n }", "public Integer getBookCommentId() {\n return bookCommentId;\n }", "public Integer getId() {\n\t\treturn loanId; //changed LoAn_Id to loanId\r\n\t}", "public Book getBookById(int id) {\n\t\tBook result = null;\n\t\tfor (Book aux : _booksList) {\n\t\t\tif (aux.get_id() == id)\n\t\t\t\treturn aux;\n\t\t}\n\t\treturn result;\n\t}", "public Book read(int bookId){\n System.out.println(\"looking for Book with id \" + bookId);\n Book b = new Book();\n \n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n if(jbook.getInt(\"idBOOK\") == bookId){\n b = new Book(jbook);\n break;\n }\n keyIterator.next(); \n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n } \n return b;\n }", "public Integer getAuthorId() {\n return authorId;\n }", "public Integer getAuthorId() {\n return authorId;\n }", "@Override\n public MyBook findByAllIds(final int bookId,\n final int userId, final int bookshelfId) {\n try {\n MyBook book = jdbcTemplate.queryForObject(\"select * from MyBook \"\n + \"where book_id = ? and user_id = ? and bookshelf_id = ?\",\n new Object[] {bookId, userId,\n bookshelfId}, new MyBookRowMapper());\n return book;\n\n } catch (EmptyResultDataAccessException e) {\n return null;\n }\n }", "public Book getBookById(final long id) {\n return entityManager.find(Book.class, id);\n }", "Integer getId();", "Integer getId();", "Integer getId();", "private void getBookItemIdForPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookItemCodeFromPlacingBook\");\n\t\t//Get value properties from bookItem\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID] = \"\";\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID].equals(\"\")) {\n\t\t\t//Display error \n\t\t\t\n\t\t\tsession.setAttribute(\"styleErrorPlaceBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleSuccessResutPlaceBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver15Days\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver10BooksLending\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorSameBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorNotExistBookItem\", \"display: block;\");\n\t\t\tsession.setAttribute(\"errorNotAvaiablePlaceBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set some attributes\n\t\t\t\n\t\t\tsession.setAttribute(\"bookItemIdFromController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\tsession.setAttribute(\"typeRequestToLendingController\", \"returnGetBookItemFromBookItemController\");\n\t\t\t//Send direct to LendingBookController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"LendingController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "public IntColumn getModelId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"model_id\", IntColumn::new) :\n getBinaryColumn(\"model_id\"));\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public int getAgentID(int agent_id) {\n int id = 0;\n try {\n checkAgentID.setInt(1, agent_id);\n ResultSet resultset = checkAgentID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"agent_id\");\n System.out.println(\"Agent ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"agent ID Invalid! No Agent Exists With That ID.\"); \n }\n return id;\n }", "@JsonIgnore\n\t@Id\n\tpublic Long getId() {\n\t\treturn Long.valueOf(String.format(\"%d%02d\", sale.getSaleYear(), this.num));\n\t}", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _second.getPrimaryKey();\n\t}", "@RequestMapping(value=\"/{bookId}\",method = RequestMethod.GET)\n\tpublic @ResponseBody\n\tBook getBook(@PathVariable(\"bookId\")Integer bookId){\n\t\tBook book = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"entering into try\");\n\t\t\tbook = bookService.getBookById(bookId);\n\t\t\tSystem.out.println(\"got book by id\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"book returned\");\n\t\tSystem.out.println(book.getBookName());\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tStringWriter sw= new StringWriter();\n\t\ttry {\n\t\t\tSystem.out.println(\"1\");\n\t\t\tmapper.writeValue(sw, book);\n\t\t\tSystem.out.println(\"1.5\" + sw.toString());\n\t\t\tSystem.out.println(\"2\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn book;\n\t}", "public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }", "public IntColumn getId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"id\", IntColumn::new) :\n getBinaryColumn(\"id\"));\n }", "public Long getBuyerId() {\r\n return buyerId;\r\n }", "public java.lang.Long getId();", "@Override\r\n\tpublic int returnBooks(int userId, BookBean books) {\n\t\t\r\n\t\t\r\n\t\treturn jdbcTemplate.update(\r\n \"update libtrx set,trx_date=?,trx_status=? values(?,?) where bookid=? and userid=?;\"+\r\n \t\t\"update libbook set bookcount=(bookcount+1) where bookid=?;\",\r\n LocalDate.now(),\"RN\",books.getBookId(),userId,books.getBookId());\r\n\t}", "@Override\n\tpublic String removeBook(int bookId) {\n\t\treturn null;\n\t}", "private int getOwnerId(String email) {\n\t\tint ownerId=-1;\n\t\tResultSet rs=null;\n\t\tString query1=\"select ownerId from ApartmentOwner where oEmail=?\";\n\t\tPreparedStatement pstmt;\n\t\ttry {\n\t\t\tpstmt = dataSource.getConnection().prepareStatement(query1);\n\t\t\tpstmt.setString(1, email);\n\t\t\trs = pstmt.executeQuery();\n\t\t\trs.next();\n\t\t\townerId=rs.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ownerId;\n\t}", "public int getStudentId();" ]
[ "0.73189634", "0.7224461", "0.7224461", "0.7224461", "0.69543624", "0.6929713", "0.6929713", "0.69133466", "0.68609273", "0.68609273", "0.680068", "0.660998", "0.6561413", "0.63306075", "0.63306075", "0.63306075", "0.6311156", "0.6233314", "0.6214165", "0.62063694", "0.6191351", "0.6171813", "0.6148434", "0.6132976", "0.6132976", "0.60780674", "0.60294366", "0.6028086", "0.6017255", "0.60034466", "0.5999887", "0.59572995", "0.5920649", "0.58899516", "0.58219695", "0.58022475", "0.57729733", "0.577213", "0.5759466", "0.573513", "0.5631904", "0.55512357", "0.5549996", "0.55376476", "0.5537069", "0.5534135", "0.5534135", "0.5493972", "0.5469891", "0.5433411", "0.54072815", "0.54028946", "0.5394566", "0.53597265", "0.5358416", "0.5351289", "0.5333445", "0.5319144", "0.5306889", "0.53058934", "0.5279925", "0.5276521", "0.5253301", "0.5247394", "0.52396315", "0.5235689", "0.5209712", "0.5209712", "0.5201409", "0.51939243", "0.519291", "0.51859695", "0.5176003", "0.51746684", "0.5159473", "0.5148819", "0.5129242", "0.51225644", "0.5108209", "0.5108209", "0.5104286", "0.5090934", "0.50833166", "0.50833166", "0.50833166", "0.5072884", "0.5055636", "0.5051906", "0.5041999", "0.5040003", "0.5032127", "0.50258577", "0.5023191", "0.5023191", "0.50183225", "0.5013307", "0.50085497", "0.50077003", "0.50058484", "0.5001548" ]
0.6801529
10
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.book_id
public void setBookId(String bookId) { this.bookId = bookId == null ? null : bookId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void setBookId(long bookId) {\n _sTransaction.setBookId(bookId);\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "public void setBookId(String bookId) {\r\n this.bookId = bookId == null ? null : bookId.trim();\r\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "public String getBookId() {\r\n return bookId;\r\n }", "public int getBook_id() {\n\treturn book_id;\n}", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public String getBookId() {\n\t\treturn bookId;\n\t}", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\n return bookid;\n }", "public void setBook(Book book) {\n this.book = book;\n }", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public int getBookID() {\n return bookID;\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void setBookDocId(Number value) {\n setAttributeInternal(BOOKDOCID, value);\n }", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "public Book updateBook(Long id, Book book) {\n return this.sRepo.save(book);\n\n\t}", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void book(long bookRecordId) {\n book(bookRecordId, false);\n }", "@Override\r\n\tpublic boolean updateByBookId(Book book) {\n\t\tboolean flag=false;\r\n\t\tString sql=\"update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? \"\r\n\t\t\t\t+ \"where id=?\";\r\n\t\tList<Object> list=new ArrayList<Object>();\r\n\t\tif(book!=null){\r\n\t\t\tlist.add(book.getTitle());\r\n\t\t\tlist.add(book.getAuthor());\r\n\t\t\tlist.add(book.getPublisherId());\r\n\t\t\tlist.add(book.getPublishDate());\r\n\t\t\tlist.add(book.getIsbn());\r\n\t\t\tlist.add(book.getWordsCount());\r\n\t\t\tlist.add(book.getUnitPrice());\r\n\t\t\tlist.add(book.getContentDescription());\r\n\t\t\tlist.add(book.getAurhorDescription());\r\n\t\t\tlist.add(book.getEditorComment());\r\n\t\t\tlist.add(book.getTOC());\r\n\t\t\tlist.add(book.getCategoryId());\r\n\t\t\t\r\n\t\t\tlist.add(book.getBooksImages());\r\n\t\t\tlist.add(book.getQuantity());\r\n\t\t\t\r\n\t\t\tlist.add(book.getAddress());\r\n\t\t\tif(book.getBaoyou()==\"0\"){\r\n\t\t\t\tbook.setBaoyou(\"不包邮\");\r\n\t\t\t}else{\r\n\t\t\t\tbook.setBaoyou(\"包邮\");\r\n\t\t\t}\r\n\t\t\tlist.add(book.getBaoyou());\r\n\t\t\tlist.add(book.getId());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint update = runner.update(sql, list.toArray());\r\n\t\t\tif(update>0){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\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\treturn flag;\r\n\t}", "public void setBooked(Integer booked) {\n this.booked = booked;\n }", "Book selectByPrimaryKey(String bid);", "@PutMapping(\"/{username}/books/{bookId}\")\n public Book markBookInLibrary(@PathVariable String username,\n @PathVariable Long bookId,\n @RequestBody Book book) {\n\n UserBookStatus userBookStatus = UserBookStatus.valueOf(book.getStatus().toUpperCase());\n UserBook userBook = userService.markBook(username, bookId, userBookStatus);\n return userBookToBook.apply(userBook);\n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "void setBookBorrowedDao(final BookBorrowedDao bookBorrowedDao);", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "void setBookDao(final BookDao bookDao);", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "public void setBuyerId(Long buyerId) {\r\n this.buyerId = buyerId;\r\n }", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public Book(Integer id) {\n\t\tthis.id = id;\n\t}", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public void setBookCode(java.lang.String value);", "public static void updateBook(Book book) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n //Update detail of the book to the database\r\n session.update(book);\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n }", "public void setPropertyBuyerId(int propertyBuyerId) {\n\t\tthis.propertyBuyerId = propertyBuyerId;\n\t}", "public void setBooks(List<Book> books) {\r\n\t\tthis.books = books;\r\n\t}", "public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }", "IntegralBook selectByPrimaryKey(Long integralBookId);", "@Override\r\n\tpublic int returnBooks(int userId, BookBean books) {\n\t\t\r\n\t\t\r\n\t\treturn jdbcTemplate.update(\r\n \"update libtrx set,trx_date=?,trx_status=? values(?,?) where bookid=? and userid=?;\"+\r\n \t\t\"update libbook set bookcount=(bookcount+1) where bookid=?;\",\r\n LocalDate.now(),\"RN\",books.getBookId(),userId,books.getBookId());\r\n\t}", "BookDO selectByPrimaryKey(String bookIsbn);", "protected void setId(EmployeeLeave employeeLeave, ResultSet rs, int rowNumber) throws SQLException{\n\t\tString id = rs.getString(EmployeeLeaveTable.COLUMN_ID);\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\n\t\temployeeLeave.setId(id);\n\t}", "Book getBookById(Integer id);", "@Override\n\tpublic BookModel update(BookModel updateBook) {\n\t\tCategoryModel category = categoryDao.findByCode(updateBook.getCategoryCode());\n\t\tupdateBook.setCategoryId(category.getId());\n\t\tbookDao.update(updateBook);\n\t\treturn bookDao.findOne(updateBook.getId());\n\t}", "public long getBookId() {\n return _sTransaction.getBookId();\n }", "public boolean updateBook(Books books){\n String sql=\"update Book set book_name=?,book_publish_date=?,book_author=?,book_price=?,scraption=? where id=?\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption(),books.getId()});\n return flag;\n }", "public Lending_ID(Book book) {\n\t\t// TO DO\n\t\tthis.myBook = book;\n\t\t// if not given, sets rent date to the date lendingID was created\n\t\tthis.rentDate = new Date();\n\t\t// if not given, sets return date to 7 days after rent date\n\t\tthis.returnDate = new Date(this.rentDate.getTime() + (7L * Lending_ID.DAY));\t\n\t\tID_Counter++;\n\t\tlendingID = ID_Counter;\n\t\tthis.todaysDate = new Date();\n\t}", "@Override\n public MyBook findById(final int bookshelfId,\n final int userId, final int bookId) {\n System.err.println(\"MyBookRepositoryImpl:172 - not implement\");\n System.exit(1);\n return null;\n }", "public Book getById(Long bookId) {\n\t\treturn (Book) entityManager.createQuery(\"from Book where id= :bookId\").setParameter(\"bookId\", bookId)\n\t\t\t\t.getSingleResult();\n\t}", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}", "Book selectByPrimaryKey(String id);", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "BookInfo selectByPrimaryKey(Integer id);", "@PutMapping(\"/books/{id}\")\n\tpublic ResponseEntity<Book> updateBook(@PathVariable Long id,@RequestBody Book bookDetails)\n\t{\n\t\tBook book = bookRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Book Not found with id\" + id));\n\t\tbook.setTitle(bookDetails.getTitle());\n\t\tbook.setAuthors(bookDetails.getAuthors());\n\t\tbook.setYear(bookDetails.getYear());\n\t\tbook.setPrice(bookDetails.getPrice());\n\t\t\n\t\tBook updatedBook = bookRepository.save(book);\n\t\treturn ResponseEntity.ok(updatedBook);\n\t}", "@PutMapping(\"/update/{id}\")\n public ResponseEntity<Void> updateBook(@RequestBody Book book,\n @PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.updateBook(book, id);\n\n return ResponseEntity.status(HttpStatus.OK).build();\n }", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }", "public void setAuthorId(Integer authorId) {\n this.authorId = authorId;\n }", "public void setIsbn(Long isbn) {\n this.isbn = isbn;\n }", "private void setStudentId() {\n\t id++;\n\t this.studentId=gradeYear+\"\"+id;\n }", "@Override\n public Optional<BookDto> updateBook(Integer bookId, BookDto bookDto) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n BookEntity updatedBookEntity = bookRepository.save(new BookEntity(bookId,\n bookDto.getBookName(), bookDto.getBookAuthor()));\n LogUtils.getInfoLogger().info(\"Book Updated: {}\", updatedBookEntity.toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(updatedBookEntity));\n } else {\n LogUtils.getInfoLogger().info(\"Book Not updated\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "int updateByPrimaryKey(Book record);", "int updateByPrimaryKey(Book record);", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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\treturn null;\r\n\t}", "public void setBookCommentId(Integer bookCommentId) {\n this.bookCommentId = bookCommentId;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}", "public User markfinished(String id,int bookId){\n User user = getById(id);\n for(SavedBook book : user.getSavedBooks()){\n if((bookId) == book.getBookId()){\n book.setIsFinished(\"True\");\n\n }\n }\n userRepo.save(user);\n return user;\n }", "public void setWorkbookId(String workbookId) {\n this.workbookId = workbookId;\n }", "public void create(Book book) {\n\t\tentityManager.persist(book);\n\t\tSystem.out.println(\"BookDao.create()\" +book.getId());\n\t\t\n\t}", "public void setStudentId(int studentId);", "public void setAuthorId(Integer authorId) {\n\t\tthis.authorId = authorId;\n\t}", "public Book getBook(int bookID) throws SQLException {\n if (books.getBook(bookID)!=null){\n return books.getBook(bookID);}\n else\n return null;\n }", "public void setId(int aMonthId) {\r\n\t\tid = aMonthId;\r\n\t}", "void setBookReservationDao(final BookReservationDao bookReservationDao);" ]
[ "0.73523825", "0.7339667", "0.7339667", "0.7339667", "0.7167013", "0.7167013", "0.7071279", "0.70416766", "0.69810086", "0.6947988", "0.6686892", "0.6456409", "0.6456409", "0.6456409", "0.6356477", "0.6328188", "0.6287344", "0.62328166", "0.62289006", "0.62289006", "0.622777", "0.6215826", "0.61927634", "0.61539656", "0.61539656", "0.6008829", "0.5991856", "0.5960472", "0.5960472", "0.59134847", "0.5846311", "0.58439976", "0.5789904", "0.57228404", "0.57052594", "0.5685889", "0.56139374", "0.55879927", "0.55708677", "0.55273664", "0.54841536", "0.54755557", "0.54259056", "0.54242694", "0.54211605", "0.5400082", "0.5394124", "0.53880185", "0.53455013", "0.5334721", "0.52970254", "0.52970254", "0.52970254", "0.52952653", "0.52944887", "0.5283926", "0.527512", "0.5274129", "0.52696806", "0.52681875", "0.52474725", "0.5243886", "0.5208425", "0.52071816", "0.5198585", "0.5183097", "0.5183039", "0.5168235", "0.51546943", "0.5153019", "0.5147428", "0.51468945", "0.5145851", "0.5143316", "0.51314354", "0.5108155", "0.5093822", "0.5084303", "0.5050809", "0.5046732", "0.50448304", "0.50448304", "0.5044811", "0.50438243", "0.5035099", "0.50343305", "0.50234306", "0.50234306", "0.5021071", "0.50107044", "0.50103027", "0.50066924", "0.49993545", "0.4997086", "0.49858046", "0.49847022", "0.49846536", "0.4984146", "0.4983251", "0.49811447" ]
0.66826
11
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.sta_date
public Long getStaDate() { return staDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.sql.Timestamp getStatusdate()\n {\n return statusdate; \n }", "public Date getBDate(){\n \treturn bDate;\n }", "public String getDate(){ return this.start_date;}", "public Timestamp getStatementDate();", "public String Get_date() \n {\n \n return date;\n }", "public void setStaDate(Long staDate) {\n\t\tthis.staDate = staDate;\n\t}", "public java.sql.Date getDocumentDate() {\n\treturn documentDate;\n}", "public java.sql.Timestamp getFecha();", "public Timestamp getDate(){\n return date;\n }", "java.lang.String getToDate();", "@Override\n\tpublic Date getDbDate() {\n\t\treturn systemMapper.selectNow();\n\t}", "public String getDate(){\n\n return this.date;\n }", "public java.sql.Date getStartDate() {\n\treturn startDate;\n}", "public Date getStartdate() {\r\n return startdate;\r\n }", "public Date getSelectDate();", "public java.sql.Timestamp getFecha_envio();", "public Date getFechaconsulta() {\r\n return fechaconsulta;\r\n }", "public Date getStartdate() {\n return startdate;\n }", "public Timestamp getsaledate() {\n return (Timestamp) getAttributeInternal(SALEDATE);\n }", "public abstract java.sql.Timestamp getFecha_ingreso();", "public java.sql.Date toSQLDate() {\r\n String isoStr = this.toSQLString();\r\n return java.sql.Date.valueOf(isoStr);\r\n //return new GregorianCalendar(this.year, this.month, this.day).getTime();\r\n }", "public StrColumn getDateOfSfRelease() {\n return delegate.getColumn(\"date_of_sf_release\", DelegatingStrColumn::new);\n }", "public Date getBirth_date() {\n return birth_date;\n }", "@Query(value = \"select rec_date from receipt where amc_no = :amcNo\", nativeQuery = true)\n\tList<Date> findDateByAmcNo(@Param(\"amcNo\") String amcNo);", "public java.sql.Date getDatebldbeg() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"datebldbeg\")));\n }", "public String getStartDate();", "public Date getDate(){\n\t\treturn date;\n\t}", "public String getDate(){\n return date;\n }", "public void test_Date_utilDateColumn_selects_sqlDate_Tx() throws Exception {\n // ## Arrange ##\n final Integer memberId = 1;\n\n // ## Act ##\n final Member member = jdbcManager.from(Member.class).where(\"memberId = ?\", memberId).getSingleResult();\n\n // ## Assert ##\n assertNotNull(member);\n log(member.toString());\n assertEquals(memberId, member.memberId);\n assertEquals(java.sql.Date.class, member.birthdate.getClass());\n }", "public String getDate(){\n return date;\n }", "public String getAsOnDate() {\n\t\treturn asOnDate;\n\t}", "public Date getStatus_date() {\r\n\t\treturn status_date;\r\n\t}", "public Date getDataNascimentoToSQL() {\r\n\t\treturn new Date(dataNascimento.getTimeInMillis());\r\n\t}", "public String getDsdate() {\n return dsdate;\n }", "public int getDate(){\n return date;\n }", "public int getDate() {\n return date ;\n }", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public Date getStatusDate()\r\n {\r\n return (m_statusDate);\r\n }", "public Date getaBrithdate() {\n return aBrithdate;\n }", "public final String getStartdate() {\n\t\treturn startdate;\n\t}", "public Date getDate()\n {\n return this.date;\n }", "public String getJP_AcctDate();", "@Basic( optional = true )\r\n\t@Column( name = \"sent_date\" )\r\n\tpublic Date getSentDate() {\r\n\t\treturn this.sentDate;\r\n\t\t\r\n\t}", "public String getDate() {\n return this.date;\n }", "public String getDate() {\n return this.date;\n }", "public StrColumn getDate() {\n return delegate.getColumn(\"date\", DelegatingStrColumn::new);\n }", "public String getDateOfBirth(){\n return(this.dateOfBirth);\n }", "public Date getInstdte() {\r\n return instdte;\r\n }", "String getStartDate();", "public Date getBirthdate()\n {\n return birthdate;\n }", "public Number getBudgetAsToDate() {\n return (Number) getAttributeInternal(BUDGETASTODATE);\n }", "public java.lang.String getBegDate() {\n return begDate;\n }", "public Timestamp getBirthdate() {\n return birthdate;\n }", "java.lang.String getStartDateYYYYMMDD();", "public java.util.Date getDate(){\n return localDate;\n }", "protected java.util.Date getResultSetDate(ResultSet rs, String colName) throws SQLException {\n //capture sql date\n java.sql.Date sqlDate = rs.getDate(colName);\n\n //if it was null, return a null object\n if(rs.wasNull())\n return null;\n\n //otherwise create the new date\n java.util.Date javaDate = new java.util.Date(sqlDate.getTime());\n \n //return a java Date object\n return javaDate;\n }", "public String getStartDate(){\n\t\treturn this.startDate;\n\t}", "public Date getDate() {\n return this.date;\n }", "public String getDate() {\n return date;\n }", "Date getForDate();", "Date getDateField();", "public java.sql.Date getDateassemb() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"dateassemb\")));\n }", "java.lang.String getStartDate();", "public java.util.Date getDate(String attr) {\n return (java.util.Date) super.get(attr);\n }", "@Override\n\tpublic FdBusinessDate getCurrencyFdBusinessDate() {\n map.put(\"busiTypeCode\",\"02\");\n map.put(\"subBusiType\",\"01\");\n\t\treturn mapper.selectByPK(map);\n\t}", "public Date getAutoDate() {\r\n return autoDate;\r\n }", "public Date getBirthdate()\n {\n return birthdate;\n }", "public List<String> querystaffdate(Basicinfo bi) {\n\t\treturn dao.querystaffdate(bi);\r\n\t\t\r\n\t}", "public Date getDate()\n {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public java.util.Date getDate() {\n\t}", "public Date getBirthdate() {\r\n return birthdate;\r\n }", "java.lang.String getOrderDate();", "public Date getBirthdate() {\n return birthdate;\n }", "public String getDate(String table, String date){\n String query = \"select * from \" + table + \" where DATE(TimeStamp) = \\'\" + date + \"\\'\";\n return runQuery(query);\n }", "@Override\n\tpublic java.util.Date getStatusDate() {\n\t\treturn _scienceApp.getStatusDate();\n\t}", "public java.lang.String getBegDate() {\n return begDate;\n }", "private java.sql.Date convertirDeDateUtilaDateSql(java.util.Date uDate) {\r\n java.sql.Date sDate = new java.sql.Date(uDate.getTime());\r\n return sDate;\r\n }", "public String getDate() {\r\n\t\treturn this.date;\r\n\t}", "public java.sql.Timestamp getRecdate() {\n\treturn recdate;\n}", "public String getDate() {\r\n return date;\r\n }", "public String getdate() {\n\t\treturn date;\n\t}", "public Date getBirthDate();", "public Date getStartDate();", "public Date getStartDate();", "java.lang.String getFoundingDate();", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public java.lang.String getStudent_dob() {\n\t\treturn _primarySchoolStudent.getStudent_dob();\n\t}", "public int getDate() {\n return date;\n }", "public int getDate() {\n return date;\n }", "public Date getDate()\n\t{\n\t\treturn date;\n\t}", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }" ]
[ "0.62003726", "0.60077417", "0.59405214", "0.59318423", "0.5885333", "0.5851686", "0.5803021", "0.57731855", "0.57568115", "0.57515943", "0.57368344", "0.5731691", "0.572385", "0.57049584", "0.5704375", "0.56953174", "0.56902796", "0.568769", "0.56737804", "0.5656979", "0.5628305", "0.561185", "0.55781186", "0.55775774", "0.5570518", "0.5546949", "0.55293477", "0.55269647", "0.55228066", "0.55206126", "0.54968077", "0.5488058", "0.5487708", "0.54602003", "0.5458557", "0.5441175", "0.5439776", "0.5435741", "0.5431204", "0.5430241", "0.54292834", "0.54269403", "0.542341", "0.5422316", "0.5422316", "0.54220396", "0.5420063", "0.5414019", "0.5411713", "0.54061204", "0.54003257", "0.539878", "0.53976005", "0.53934366", "0.5392918", "0.53899133", "0.5386511", "0.53787786", "0.5378332", "0.53777504", "0.53751945", "0.53730863", "0.5371435", "0.5371402", "0.53637433", "0.53624326", "0.53624237", "0.53534085", "0.5351747", "0.5347377", "0.53425527", "0.5338405", "0.53375137", "0.5337238", "0.5336189", "0.53324324", "0.5330978", "0.532819", "0.5326977", "0.5322762", "0.531895", "0.5317696", "0.5313718", "0.5313592", "0.5313592", "0.531087", "0.53104156", "0.53104156", "0.5306148", "0.5306148", "0.5306148", "0.5303369", "0.5302741", "0.5302741", "0.5299888", "0.5290136", "0.5290136", "0.5290136", "0.5290136", "0.5290136" ]
0.6384408
0
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.sta_date
public void setStaDate(Long staDate) { this.staDate = staDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setStartDate(Date s);", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public void SetDate(Date date);", "void setDate(Date data);", "public void setDate(String date){\n this.date = date;\n }", "void setDate(int index, Date value) throws SQLException;", "public void setDate(Date date) {\r\n this.date = date;\r\n }", "public void setDateassemb( java.sql.Date newValue ) {\n __setCache(\"dateassemb\", newValue);\n }", "public void setDate(String date){\n this.date = date;\n }", "public void setDate (String s) {\n date = s;\n }", "public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(Date date) {\n this.date = date;\n }", "public void setDate(int date){\n this.date = date;\n }", "public void setServiceDate(java.util.Date value);", "public void setToDate(Date toDate)\r\n/* 33: */ {\r\n/* 34:39 */ this.toDate = toDate;\r\n/* 35: */ }", "public void setStatementDate (Timestamp StatementDate);", "public void setBegDate(java.lang.String value) {\n this.begDate = value;\n }", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}", "public void setStartdate(Date startdate) {\r\n this.startdate = startdate;\r\n }", "public void setStartDate(java.sql.Date newStartDate) {\n\tstartDate = newStartDate;\n}", "public void setFecha(java.sql.Timestamp newFecha);", "void setDate(java.lang.String date);", "public void setDate(String date) {\r\n this.date = date;\r\n }", "public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);", "void setStartDate(Date startDate);", "public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }", "public void setStatusdate(java.sql.Timestamp newVal) {\n if ((newVal != null && this.statusdate != null && (newVal.compareTo(this.statusdate) == 0)) || \n (newVal == null && this.statusdate == null && statusdate_is_initialized)) {\n return; \n } \n this.statusdate = newVal; \n statusdate_is_modified = true; \n statusdate_is_initialized = true; \n }", "public void setARRIVAL_AT_LOC_DATE(java.sql.Date value)\n {\n if ((__ARRIVAL_AT_LOC_DATE == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_DATE)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_DATE = value;\n }", "void setBirthDate(Date birthDate);", "void setCreateDate(Date date);", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(String date) {\n this.date = date;\n }", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setDate(Date date) {\n\t\tthis.date = date;\n\t}", "public void setsaledate(Timestamp value) {\n setAttributeInternal(SALEDATE, value);\n }", "public void setUpdatedOn(Date updatedOn);", "public void setBirthDate(Date birthDate);", "public void setStartdate(Date startdate) {\n this.startdate = startdate;\n }", "void setUpdatedDate(Date updatedDate);", "public void setDatebldbeg( java.sql.Date newValue ) {\n __setCache(\"datebldbeg\", newValue);\n }", "void setDate(int index, Date value, Calendar cal)\n throws SQLException;", "public void setStartDate(java.util.Date value);", "Employee setBirthdate(Date birthdate);", "public void setDate(DateTime \n date) {\n this.date = date;\n }", "@Override\n public void setDate(Date value, Calendar cal) throws SQLException {\n if (value == null) {\n setNull();\n return;\n }\n\n setDate(getDatatypeCoder().encodeDate(value, cal));\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setFechaHasta(Date fechaHasta)\r\n/* 179: */ {\r\n/* 180:312 */ this.fechaHasta = fechaHasta;\r\n/* 181: */ }", "public void setBirthdate(Timestamp aBirthdate) {\n birthdate = aBirthdate;\n }", "public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }", "public void setFecha_envio(java.sql.Timestamp newFecha_envio);", "public void updateBDate() {\n bDate = new Date();\n }", "public Long getStaDate() {\n\t\treturn staDate;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(String date) {\n\t\tthis.date = date;\n\t}", "public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public void setCreateDate(Date createDate);", "public void setDocumentDate(java.sql.Date newValue) {\n\tthis.documentDate = newValue;\n}", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "public void setDate() {\n this.date = new Date();\n }", "public void setDate(java.lang.String date) {\n this.date = date;\n }", "@Override\n\tpublic void setStatusDate(java.util.Date statusDate) {\n\t\t_scienceApp.setStatusDate(statusDate);\n\t}", "public void setStatusDate(Date statusDate)\r\n {\r\n m_statusDate = statusDate;\r\n }", "@Override\n\tpublic void setStatusDate(Date statusDate) {\n\t\tmodel.setStatusDate(statusDate);\n\t}", "abstract public void setServiceAppointment(Date serviceAppointment);", "public void setaBrithdate(Date aBrithdate) {\n this.aBrithdate = aBrithdate;\n }", "public void setDate(Date date) {\n\t\tthis._date = date;\n\t}", "public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }", "public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}", "public static void la_pdl_datesetup_to_accrualdate(String SSN,String AppURL) throws ClassNotFoundException, SQLException, ParseException\n\n\t{\n\t\t\t\tConnection conn = null;\n\t\t\t\t\n\t\t// Object of Statement. It is used to create a Statement to execute the query\n\t\t\t Statement stmt = null;\n\t\t\t \n\t // Object of ResultSet => 'It maintains a cursor that points to the current row in the result set'\n\t\t\t\tResultSet resultSet = null;\n\t\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\t\t\n\t\t\t\ttest.log(LogStatus.INFO,\"**** Connecting to DB to set the Store date to accrual date ****\");\n\t\t\t\ttest.log(LogStatus.INFO, \"******************************************************\");\n\t // Open a connection\n\t\t\t\t//conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.2.241:1521:QFUNDUAT1\", \"QCREL2_AUTOM_07212019\", \"QCREL2_AUTOM_07212019\");\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.2.241:1521:QFUNDUAT1\", DBUserName,DBPassword);\n\t\t\t\tSystem.out.println(\"Connecting to DB\");\n\t\t\t\ttest.log(LogStatus.PASS, \"Connected to DB Successfully\");\n\t\t\t\n\t\t\t\n\t\t\t\tstmt = conn.createStatement();\n\t\t\t\t //Proc_Date=\"02-AUG-19\";\n\t\t\t\t\n\t\t\t//=========================== For Capturing Current Date ==============================================\n\t\t\t\t/*DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\t\t\n\t\t\t\tDate date = new Date();\n\t\t\t\t\n\t\t\t\tString date1= dateFormat.format(date);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Current date is \" +date1);\n\t\t curr_date = date1;*/\n\t\t \n\t\t //%%%%%%%%%%%%%%%%%%%%%%\n\t\t\t\t\n\t\t //%%%%%%%%%%%%%%%%%%%%\n\t\t \n\t\t \n\t\t\t//=================================================================================\n\t\t\t\tresultSet = stmt.executeQuery(\"update ca_ss_store_date set st_date= '\"+accrual_date+\"' where ST_DATE_ID='PRO' and st_code in (2997,2019)\");\n\t\t\t\t \n\t\t\t\t//test.log(LogStatus.PASS, \"<FONT color=green style=Arial> Current date is :\" +curr_date);\n\t\t\t\ttest.log(LogStatus.PASS, \"<FONT color=green style=Arial> Store Date is Set to Accrual date :\" +accrual_date);\n\t\t\t\ttest.log(LogStatus.INFO, \"********************** Now Login to Lend Nation For Payment *********************** \");\n\t\t\t\t\n\t\t\t\twhile (resultSet .next()) \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t// Closing Connection\t\t\n\t\t\t\t\n\t\t\t\tif (resultSet != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (conn != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "@Override\n\tprotected void setDate() {\n\n\t}", "public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }", "public void setBirthdate(Date birthdate) {\n this.birthdate = birthdate;\n }", "public void setDate(long date) {\n\t\tthis.date = date;\n\t}", "public void changeDate(String a) {\r\n getDate().editDate(a);\r\n }", "public void setAutoDate(Date autoDate) {\r\n this.autoDate = autoDate;\r\n }", "public void setDate(Date date) {\n mDate = date;\n }", "public void setJP_AcctDate (String JP_AcctDate);", "public static void nv_pdl_datesetup_to_accrualdate(String SSN,String AppURL) throws ClassNotFoundException, SQLException, ParseException\n\n\t{\n\t\t\t\tConnection conn = null;\n\t\t\t\t\n\t\t// Object of Statement. It is used to create a Statement to execute the query\n\t\t\t Statement stmt = null;\n\t\t\t \n\t // Object of ResultSet => 'It maintains a cursor that points to the current row in the result set'\n\t\t\t\tResultSet resultSet = null;\n\t\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\t\t\n\t\t\t\ttest.log(LogStatus.INFO,\"**** Connecting to DB to set the Store date to accrual date ****\");\n\t\t\t\ttest.log(LogStatus.INFO, \"******************************************************\");\n\t // Open a connection\n\t\t\t\t//conn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.2.241:1521:QFUNDUAT1\", \"QCREL2_AUTOM_07212019\", \"QCREL2_AUTOM_07212019\");\n\t\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@192.168.2.241:1521:QFUNDUAT1\", DBUserName,DBPassword);\n\t\t\t\tSystem.out.println(\"Connecting to DB\");\n\t\t\t\ttest.log(LogStatus.PASS, \"Connected to DB Successfully\");\n\t\t\t\n\t\t\t\n\t\t\t\tstmt = conn.createStatement();\n\t\t\t\t //Proc_Date=\"02-AUG-19\";\n\t\t\t\t\n\t\t\t//=========================== For Capturing Current Date ==============================================\n\t\t\t\t/*DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\t\t\n\t\t\t\tDate date = new Date();\n\t\t\t\t\n\t\t\t\tString date1= dateFormat.format(date);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Current date is \" +date1);\n\t\t curr_date = date1;*/\n\t\t \n\t\t //%%%%%%%%%%%%%%%%%%%%%%\n\t\t\t\t\n\t\t //%%%%%%%%%%%%%%%%%%%%\n\t\t \n\t\t \n\t\t\t//=================================================================================\n\t\t\t\tresultSet = stmt.executeQuery(\"update ca_ss_store_date set st_date= '\"+accrual_date+\"' where ST_DATE_ID='PRO' and st_code in (2997,2023)\");\n\t\t\t\t \n\t\t\t\t//test.log(LogStatus.PASS, \"<FONT color=green style=Arial> Current date is :\" +curr_date);\n\t\t\t\ttest.log(LogStatus.PASS, \"<FONT color=green style=Arial> Store Date is Set to Accrual date :\" +accrual_date);\n\t\t\t\ttest.log(LogStatus.INFO, \"********************** Now Login to Lend Nation For Payment *********************** \");\n\t\t\t\t\n\t\t\t\twhile (resultSet .next()) \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t// Closing Connection\t\t\n\t\t\t\t\n\t\t\t\tif (resultSet != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstmt.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (conn != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void setStatusDate(Date statusDate);", "public void setStartDate(String date){\n\t\tthis.startDate = date;\n\t}" ]
[ "0.62738156", "0.62688994", "0.6185875", "0.6153973", "0.6052556", "0.6016958", "0.59754974", "0.595104", "0.59481007", "0.5934889", "0.5926441", "0.59151673", "0.5900479", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896253", "0.5896023", "0.5888198", "0.5887843", "0.5858453", "0.5833049", "0.5809992", "0.5809992", "0.5809992", "0.58079875", "0.58021337", "0.5801063", "0.57953", "0.57876605", "0.57872427", "0.5766478", "0.5764415", "0.5752062", "0.57506746", "0.57470804", "0.57457757", "0.5739215", "0.5739215", "0.5739215", "0.5739215", "0.5739215", "0.5738266", "0.5738266", "0.5738266", "0.5735772", "0.57317924", "0.57261956", "0.572527", "0.57188374", "0.5709416", "0.56943405", "0.5693618", "0.5683968", "0.5677385", "0.5673182", "0.56585443", "0.56585443", "0.564051", "0.563271", "0.5629946", "0.56241083", "0.56215", "0.56191844", "0.5618379", "0.5618379", "0.5616955", "0.56086004", "0.56086004", "0.56086004", "0.5596176", "0.5590385", "0.5582494", "0.557894", "0.5575644", "0.5569933", "0.5563957", "0.55622214", "0.5556485", "0.554693", "0.55412495", "0.5530638", "0.5526841", "0.5526361", "0.5517105", "0.55083835", "0.55083764", "0.55063015", "0.5504938", "0.5503071", "0.5501135", "0.5500483", "0.54823595", "0.5482084", "0.5468974" ]
0.66907686
0
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.end_date
public Long getEndDate() { return endDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.sql.Date getEndDate() {\n\treturn endDate;\n}", "Date getEndDate();", "Date getEndDate();", "public Date getEndDate();", "public Date getEndDate();", "public String getEndDate(){\n\t\treturn this.endDate;\n\t}", "public Date getEndDate()\r\n {\r\n return this.endDate;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndDate();", "public Date getEndDate() {\r\n return this.endDate;\r\n }", "public Date getEndDate()\n {\n return (Date)getAttributeInternal(ENDDATE);\n }", "public Date getEND_DATE() {\n return END_DATE;\n }", "public String getEndDate();", "String getEndDate();", "public Date getEndDate() {\n\t\treturn this.endDate;\n\t}", "long getEndDate();", "long getEndDate();", "public Date getEndDate() {\r\n return endDate;\r\n }", "public Date getEndDate() {\r\n return endDate;\r\n }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public LocalDate getEnd_date(){\n return this.end_date;\n }", "public Date getEndDate() {\n\t\treturn endDate;\n\t}", "public Date getEndDate() {\n\t\treturn endDate;\n\t}", "public String getEndDate() {\n return endDate;\n }", "public LocalDate getEndDate() { return this.endDate; }", "public java.util.Date getEndDate () {\r\n\t\treturn endDate;\r\n\t}", "public java.lang.String getEndDate() {\n return endDate;\n }", "@ApiModelProperty(value = \"End of the range\")\n public String getDateEnd() {\n return dateEnd;\n }", "public long getEndDate() {\n return endDate_;\n }", "public void setEndDate(String date){\n\t\tthis.endDate = date;\n\t}", "public java.lang.String getEndDate() {\n return endDate;\n }", "public java.sql.Date getREQ_END_DATE()\n {\n \n return __REQ_END_DATE;\n }", "public Date get_end() {\n\t\treturn this.end;\n\t}", "public LocalDate getEndDate () {\n\t\treturn DateUtils.toLocalDate(this.end);\n\t}", "public long getEndDate() {\n return endDate_;\n }", "public long getEndDate() {\n return endDate_;\n }", "public Date getEnddate() {\r\n return enddate;\r\n }", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public void setEndDate(java.sql.Date newEndDate) {\n\tendDate = newEndDate;\n}", "public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }", "public String getEndDate() {\n\t\treturn endDate.getText();\n\t}", "public long getEndDate() {\n return endDate_;\n }", "@Override\n\tpublic java.util.Date getEndDate() {\n\t\treturn _esfTournament.getEndDate();\n\t}", "public java.util.Date getEndDateTime() {\n return this.endDateTime;\n }", "@Nullable\n @Generated\n @Selector(\"responseEndDate\")\n public native NSDate responseEndDate();", "public void setEndDate(Date value) {\r\n this.endDate = value;\r\n }", "public String getEndDateString() {\n SimpleDateFormat format = new SimpleDateFormat(DpdInputForm.DATA_FORMAT, Locale.ENGLISH);\n return format.format(new Date(this.endDate));\n }", "@Override\n\tpublic Long updateEndDate() {\n\t\treturn null;\n\t}", "public void setEndDate(String endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "@Nullable\r\n public DateWithOffset getEndDate() {\r\n return endDate;\r\n }", "public Date getEnd() throws ServiceLocalException {\n\t\treturn (Date) this.getPropertyBag().getObjectFromPropertyDefinition(\n\t\t\t\tAppointmentSchema.End);\n\t}", "public void setEndDate(java.lang.String value) {\n this.endDate = value;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "Date getEndDay();", "public void setEND_DATE(Date END_DATE) {\n this.END_DATE = END_DATE;\n }", "public void setEndDate(java.util.Date value);", "@Nullable\n @Generated\n @Selector(\"requestEndDate\")\n public native NSDate requestEndDate();", "String getEndDateParam(String dateString);", "public void setEndDate(Long endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public Date getServiceEndDate() {\n return (Date) getAttributeInternal(SERVICEENDDATE);\n }", "LocalDate getCollectionEndDate();", "public final String getEnddate() {\n\t\treturn enddate;\n\t}", "@ApiModelProperty(value = \"The event end date in the event or site timezone\")\n public String getEndDate() {\n return endDate;\n }", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public java.util.Calendar getEndDate() {\n return endDate;\n }", "public LocalDateTime getEndDate() {\n return endDate;\n }", "void setEndDate(Date endDate);", "public void setEndDate (java.util.Date endDate) {\r\n\t\tthis.endDate = endDate;\r\n\t}", "public LocalDateTime getEndDate();", "public void convertEndDate(Date date) {\r\n endTime = new java.sql.Timestamp(date.getTime());\r\n }", "public void setEnddate(Date enddate) {\r\n this.enddate = enddate;\r\n }", "public void setEndDate(Date value)\n {\n\n validateEndDate(value);\n setAttributeInternal(ENDDATE, value);\n \n }", "public String getResearchenddate() {\r\n\t\treturn researchenddate;\r\n\t}", "public StrColumn getDateEndProcessing() {\n return delegate.getColumn(\"date_end_processing\", DelegatingStrColumn::new);\n }", "public Date getDeliveryEndDate() {\n return (Date)getAttributeInternal(DELIVERYENDDATE);\n }", "public Date getEndServiceDate() {\n return (Date) getAttributeInternal(ENDSERVICEDATE);\n }", "public Date getEndTimestamp() {\r\n return endTimestamp;\r\n }", "public void setEndDate(@Nullable DateWithOffset endDate) {\r\n this.endDate = endDate;\r\n }", "public Date getEndDate() {\n\n String[] dateParts = description.split(\"<br />\");\n String end = dateParts[1];\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMMMM yyyy - HH:mm\");\n\n //Split first part of Description and transform to Date\n //Exaample first part = \"Start Date: Tues 18 March 2017\"\n try {\n EndDate = sdf.parse(end.split(\": \")[1]);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return EndDate;\n }", "Integer getEndDay();", "public java.lang.String getEndDay() {\r\n return localEndDay;\r\n }", "java.lang.String getEndDateYYYY();", "@Nullable\n @Generated\n @Selector(\"domainLookupEndDate\")\n public native NSDate domainLookupEndDate();", "public M csmiBirthdayEnd(Object end){this.put(\"csmiBirthdayEnd\", end);return this;}", "@ApiModelProperty(value = \"An array of each component of the event end date\")\n public DateDetails getEndDateDetails() {\n return endDateDetails;\n }", "public String eventEndString() {\n return DateUtils.formatExtDate(this.endDate);\n }", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "void setEventEndDate(Date endEventDate);", "public String getRebillLastDate()\n\t{\n\t\tif(response.containsKey(\"last_date\")) {\n\t\t\treturn response.get(\"last_date\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public TimeDateComponents getEventEndDate() {\n return getEventDates().getEndDate();\n }", "Date findNameDtNameEndDateByIdName(int idName);", "public void setEndDate(java.util.Calendar endDate) {\n this.endDate = endDate;\n }", "public Date getDebitEndDate() {\n return debitEndDate;\n }" ]
[ "0.74253416", "0.7136413", "0.7136413", "0.71118355", "0.71118355", "0.7103675", "0.7079833", "0.7061188", "0.70584637", "0.6985205", "0.6974339", "0.69551563", "0.6941296", "0.6930038", "0.6888746", "0.6888746", "0.68518084", "0.68518084", "0.68193495", "0.68193495", "0.68193495", "0.68193495", "0.6817638", "0.6736842", "0.6736842", "0.67297965", "0.6675699", "0.6669729", "0.66584843", "0.66114986", "0.66056687", "0.65941167", "0.65860546", "0.65739465", "0.6571974", "0.6546099", "0.65321475", "0.6528267", "0.65272105", "0.65237534", "0.6511955", "0.6508527", "0.64957947", "0.6461635", "0.6425928", "0.63765144", "0.63755023", "0.63408595", "0.6312368", "0.62930745", "0.62915915", "0.6287353", "0.6287353", "0.6271362", "0.62560093", "0.6220193", "0.62201226", "0.62201226", "0.62201226", "0.619928", "0.61876976", "0.61856014", "0.6183665", "0.6160295", "0.612108", "0.6084998", "0.6055998", "0.6052649", "0.6052344", "0.604764", "0.604764", "0.60377026", "0.59930986", "0.5988687", "0.5941286", "0.593612", "0.58830684", "0.5876863", "0.5870266", "0.5859085", "0.5857506", "0.5854326", "0.58414495", "0.58273107", "0.58239233", "0.5810745", "0.5810161", "0.5801401", "0.57993776", "0.57917297", "0.57551575", "0.5748036", "0.57465434", "0.5728857", "0.57171273", "0.57066596", "0.5696493", "0.5685719", "0.56795585", "0.567171" ]
0.681123
23
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.end_date
public void setEndDate(Long endDate) { this.endDate = endDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEndDate(java.sql.Date newEndDate) {\n\tendDate = newEndDate;\n}", "public void setEndDate(java.util.Date value);", "public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }", "void setEndDate(Date endDate);", "public void setEndDate(Date value) {\r\n this.endDate = value;\r\n }", "public void setEndDate(String date){\n\t\tthis.endDate = date;\n\t}", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date value)\n {\n\n validateEndDate(value);\n setAttributeInternal(ENDDATE, value);\n \n }", "public void setEndDate(java.lang.String value) {\n this.endDate = value;\n }", "public void setEndDate(String endDate) {\n this.endDate = endDate;\n }", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\t}", "public void setEnddate(Date enddate) {\r\n this.enddate = enddate;\r\n }", "void setEventEndDate(Date endEventDate);", "public void setEND_DATE(Date END_DATE) {\n this.END_DATE = END_DATE;\n }", "public void setEndDate (java.util.Date endDate) {\r\n\t\tthis.endDate = endDate;\r\n\t}", "@Override\n\tpublic void setEndDate(java.util.Date endDate) {\n\t\t_esfTournament.setEndDate(endDate);\n\t}", "public void setEndDate(@Nullable DateWithOffset endDate) {\r\n this.endDate = endDate;\r\n }", "@Override\n\tpublic Long updateEndDate() {\n\t\treturn null;\n\t}", "public void setREQ_END_DATE(java.sql.Date value)\n {\n if ((__REQ_END_DATE == null) != (value == null) || (value != null && ! value.equals(__REQ_END_DATE)))\n {\n _isDirty = true;\n }\n __REQ_END_DATE = value;\n }", "public java.sql.Date getEndDate() {\n\treturn endDate;\n}", "public void setEndDate(java.util.Calendar endDate) {\n this.endDate = endDate;\n }", "public Date getEndDate()\r\n {\r\n return this.endDate;\r\n }", "public Builder setEndDate(long value) {\n \n endDate_ = value;\n onChanged();\n return this;\n }", "public Date getEndDate() {\r\n return this.endDate;\r\n }", "Date getEndDate();", "Date getEndDate();", "public void setDtEnd(Date dtEnd) {\r\n this.dtEnd = dtEnd;\r\n }", "public void convertEndDate(Date date) {\r\n endTime = new java.sql.Timestamp(date.getTime());\r\n }", "public void setEndDate(Date eDate) throws IllegalArgumentException {\n\t\tif (eDate == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tendDate = eDate;\n\t\tupdateAvailability(\"\");\n\t}", "public Date getEndDate() {\r\n return endDate;\r\n }", "public Date getEndDate() {\r\n return endDate;\r\n }", "public Date getEndDate();", "public Date getEndDate();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndDate();", "public LocalDate getEndDate() { return this.endDate; }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n return endDate;\n }", "public void setEndDate(LocalDateTime endDate) {\n this.endDate = endDate;\n }", "public String getEndDate(){\n\t\treturn this.endDate;\n\t}", "public LocalDate getEnd_date(){\n return this.end_date;\n }", "public Builder setEndDate(long value) {\n bitField0_ |= 0x00000080;\n endDate_ = value;\n\n return this;\n }", "public long getEndDate() {\n return endDate_;\n }", "public void updateEndCaseDate(String claimNo,Date endCaseDate) throws SQLException,Exception\n {\n //创建数据库管理对象\n DBManager dbManager = new DBManager();\n dbManager.open(AppConfig.get(\"sysconst.DBJNDI\")) ;\n //开始事务\n dbManager.beginTransaction();\n try\n {\n new BLClaimAction().updateEndCaseDate(dbManager,claimNo,endCaseDate);\n //提交事务\n dbManager.commitTransaction();\n }\n catch(SQLException sqle)\n {\n //回滚事务\n dbManager.rollbackTransaction();\n throw sqle;\n }\n catch(Exception ex)\n {\n //回滚事务\n dbManager.rollbackTransaction();\n throw ex;\n }\n finally\n {\n //关闭数据库连接\n dbManager.close();\n }\n\n }", "long getEndDate();", "long getEndDate();", "public Date getEndDate() {\n\t\treturn this.endDate;\n\t}", "public Long getEndDate() {\n\t\treturn endDate;\n\t}", "public String getEndDate() {\n return endDate;\n }", "public Date getEndDate() {\n\t\treturn endDate;\n\t}", "public Date getEndDate() {\n\t\treturn endDate;\n\t}", "public Date getEndDate()\n {\n return (Date)getAttributeInternal(ENDDATE);\n }", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "public String getEndDate();", "public long getEndDate() {\n return endDate_;\n }", "public void setServiceEndDate(Date value) {\n setAttributeInternal(SERVICEENDDATE, value);\n }", "public long getEndDate() {\n return endDate_;\n }", "public void xsetEndExecDate(org.apache.xmlbeans.XmlDate endExecDate)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDate target = null;\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(ENDEXECDATE$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(ENDEXECDATE$10);\n }\n target.set(endExecDate);\n }\n }", "String getEndDate();", "public Date getEND_DATE() {\n return END_DATE;\n }", "public void setEndDateTime(java.util.Date endDateTime) {\n this.endDateTime = endDateTime;\n }", "public long getEndDate() {\n return endDate_;\n }", "public java.util.Date getEndDate () {\r\n\t\treturn endDate;\r\n\t}", "public abstract void setEndTime(Date endTime);", "public void setEndExecDate(java.util.Calendar endExecDate)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ENDEXECDATE$10, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ENDEXECDATE$10);\n }\n target.setCalendarValue(endExecDate);\n }\n }", "@Test\n public void testSetEndDate() {\n System.out.println(\"setEndDate\");\n Calendar newEnd = new GregorianCalendar(2000, 01, 01);\n String endDate = newEnd.toString();\n DTO_Ride instance = dtoRide;\n instance.setEndDate(endDate);\n \n String result = endDate.toString();\n assertEquals(newEnd, newEnd);\n }", "public Date getEnddate() {\r\n return enddate;\r\n }", "public void setEndServiceDate(Date value) {\n setAttributeInternal(ENDSERVICEDATE, value);\n }", "public void setEndTimeDate(Date endTimeDate) {\n this.endTimeDate = endTimeDate;\n }", "@Test\n\tpublic void testSetEndDate() {\n\t\tassertNotEquals(calTest, initialJob.getEndDate());\n\t\tinitialJob.setEndDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getEndDate());\n\t}", "public java.lang.String getEndDate() {\n return endDate;\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public CommonAlert dateEnd(Date dateEnd) {\n this.dateEnd = dateEnd;\n return this;\n }", "@ApiModelProperty(value = \"End of the range\")\n public String getDateEnd() {\n return dateEnd;\n }", "public java.lang.String getEndDate() {\n return endDate;\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setEndTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(ENDTIME_PROP.get(), value);\n }", "public void setExpEndDate(Date expEndDate) {\n\t\tthis.expEndDate = expEndDate;\n\t}", "public M csmiBirthdayEnd(Object end){this.put(\"csmiBirthdayEnd\", end);return this;}", "public void setDepartureDate(Date departureDate);", "public Date getDtEnd() {\r\n return dtEnd;\r\n }", "public void setFinishDate(Date finishDate)\r\n {\r\n m_finishDate = finishDate;\r\n }", "public void setEndDay(java.lang.String param) {\r\n localEndDayTracker = param != null;\r\n\r\n this.localEndDay = param;\r\n }", "public final void setWishDateEnd(java.util.Date wishdateend)\r\n\t{\r\n\t\tsetWishDateEnd(getContext(), wishdateend);\r\n\t}", "public void setDeliveryEndDate(Date value) {\n setAttributeInternal(DELIVERYENDDATE, value);\n }", "Employee setBirthdate(Date birthdate);", "public void setToDate(Date toDate)\r\n/* 33: */ {\r\n/* 34:39 */ this.toDate = toDate;\r\n/* 35: */ }", "public LocalDate getEndDate () {\n\t\treturn DateUtils.toLocalDate(this.end);\n\t}", "@Override\n\tpublic java.util.Date getEndDate() {\n\t\treturn _esfTournament.getEndDate();\n\t}", "@ApiModelProperty(value = \"The event end date in the event or site timezone\")\n public String getEndDate() {\n return endDate;\n }", "public Builder setEndDateYYYY(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n endDateYYYY_ = value;\n onChanged();\n return this;\n }", "public void setResearchenddate(String researchenddate) {\r\n\t\tthis.researchenddate = researchenddate;\r\n\t}", "public void setHC_WorkEndDate (Timestamp HC_WorkEndDate);" ]
[ "0.77520216", "0.74122137", "0.7404591", "0.7359827", "0.73563945", "0.73513865", "0.72035986", "0.72035986", "0.71296364", "0.71296364", "0.71296364", "0.7085455", "0.70220125", "0.6992979", "0.6976782", "0.6976782", "0.6884358", "0.6873224", "0.683536", "0.6834843", "0.6709491", "0.66973794", "0.6691058", "0.66497856", "0.6636363", "0.66016275", "0.6542946", "0.6531504", "0.653092", "0.6459767", "0.6459767", "0.64462405", "0.6429194", "0.6425205", "0.64230806", "0.64230806", "0.6408067", "0.6408067", "0.6399316", "0.635201", "0.6347313", "0.6347313", "0.6347313", "0.6347313", "0.63435626", "0.6338275", "0.6267713", "0.6222825", "0.62037915", "0.6197992", "0.6194902", "0.6194902", "0.6187404", "0.61789036", "0.61462337", "0.6134208", "0.6134208", "0.61187685", "0.6111208", "0.6107481", "0.60848874", "0.60726106", "0.6062989", "0.6029944", "0.6028911", "0.60248935", "0.60234654", "0.60099727", "0.59941715", "0.59871995", "0.59808344", "0.5978833", "0.5976806", "0.5964031", "0.59562975", "0.5946115", "0.59301054", "0.5925978", "0.5925978", "0.5910401", "0.5882952", "0.5879134", "0.5871686", "0.5871686", "0.58364356", "0.5810579", "0.580169", "0.5798689", "0.57914776", "0.5769342", "0.576531", "0.57623315", "0.575707", "0.5747205", "0.57458216", "0.5741129", "0.5738527", "0.5731867", "0.57232404", "0.5680178" ]
0.6942347
16
This method was generated by MyBatis Generator. This method returns the value of the database column his_books.account_id
public String getAccountId() { return accountId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Column(name = \"ACCOUNT_ID\")\n\tpublic String getAccountID()\n\t{\n\t\treturn accountID;\n\t}", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "String getAccountID();", "String getAccountID();", "public int getAccountID() {\n return accountID;\n }", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "@Override\n\tpublic String getBankId(final int bankAccountId, final Connection connection)\n\t{\n\t\tString bankAndBranchId = \"null\";\n\t\ttry {\n\t\t\tfinal StringBuilder sql = new StringBuilder(\"select b.id,c.id from bankaccount a,bankbranch b,bank c\")\n\t\t\t\t\t.append(\" where a.branchid=b.id and b.bankid=c.id and a.id= ?\");\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(sql.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tbankAndBranchId = element[0].toString();\n\t\t\t\tbankAndBranchId = bankAndBranchId + \"#\" + element[1].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\">>>bankAndBranchId \" + bankAndBranchId);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"Bank Code Not Found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" Bank Id not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn bankAndBranchId;\n\t}", "public int getAccountID(Account account)\n\t {\n\t\t int id = -1;\n\t\t String columns[] = new String[] {DatabaseContract.AccountContract._ID};\n\t\t \n\t\t String where = DatabaseContract.AccountContract.COLUMN_NAME_USERNAME + \" = ? \";\n\t\t \n\t\t Cursor cursor = db.query(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t columns,\n\t\t\t\t where,\n\t\t\t\t new String[] {account.getUsername()},\n\t\t\t\t null, null, null);\n\t\t\n\t\t if(cursor.getCount() > 0)\n\t\t {\n\t\t\t cursor.moveToFirst();\n\t\t\t \n\t\t\t int idCol = cursor.getColumnIndex(DatabaseContract.AccountContract._ID);\n\t\t\t id = cursor.getInt(idCol);\n\t\t }\n\t\t \n\t\t cursor.close();\n\t\t return id;\n\t }", "Account selectByPrimaryKey(Long accountid);", "public int getC_BankAccount_ID();", "private int getCurrentAccountId() {\n accountLock.lock();\n int nmr = 1;\n try (\n Statement s = rawDataSource.getConnection().createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n ResultSet res = s.executeQuery(\n \"SELECT ACCOUNT_ID FROM APP.ACCOUNTS ORDER BY ACCOUNT_ID ASC\")) {\n\n if (res.last()) {\n nmr = Integer.parseInt(res.getString(\"ACCOUNT_ID\")) + 1;\n }\n } catch (SQLException ex) {\n return nmr;\n }\n\n accountLock.unlock();\n return nmr;\n }", "public int getC_BankAccount_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_BankAccount_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public java.lang.Object getAccountID() {\n return accountID;\n }", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "public Integer getAcctId() {\n return acctId;\n }", "Long getAccountId();", "public String getAccountID() {\n return (tozAdAccountID);\n }", "public Integer getAccountId() {\n return this.accountId;\n }", "UserAccount getUserAccountById(long id);", "@Override\n\tpublic BigInteger selectUserIdByAccount(String account,Long type) {\n\t\t\n\t\tLoginNo loginNo = accountManageDao.selectLoginNoDetail(account, type);\n\t\tBigInteger res = loginNo==null?null:loginNo.gettUserFId();\n\t\treturn res;\n\t}", "@Override\n\tpublic Account findAccountByAccountId(int accountId) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from accounts where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tAccount a = null;\n\t\twhile (rs.next()) {\n\t\t\ta = new Account(rs.getInt(1), rs.getString(2), rs.getDouble(3));\n\t\t}\n\t\treturn a;\n\n\t}", "CusBankAccount selectByPrimaryKey(Integer id);", "public int getAccountNo()\r\n\t{\r\n\t\t\r\n\t\treturn accountNo;\r\n\t\t\r\n\t}", "public Integer getAccountId() {\n return accountId;\n }", "public Integer getAccountId() {\n return accountId;\n }", "ShopAccount selectByPrimaryKey(Integer spAccount);", "public int getAccountNo() {\n\t\treturn this.accountNo;\r\n\t}", "public int getAccountId() {\n return accountId;\n }", "public Long getAccountId() {\n return accountId;\n }", "List<BookAccount> findAllForAccount(long idAccount);", "public long getAccountId() {\n return accountId;\n }", "public int getAccountNo() {\n return accountNo;\n }", "public String getAccountNo();", "@SequenceGenerator(name = \"generator\", sequenceName=\"SEQ_CUSTOMER_ACCOUNT_MANAGENT\", allocationSize = 1)\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"generator\")\n\t@Column(name = \"ACCOUNT_ID\", unique = true, nullable = false, precision = 20, scale = 0)\n\tpublic BigDecimal getAccountId() {\n\t\treturn this.accountId;\n\t}", "public Long getBusinessBankAccountId() {\n return businessBankAccountId;\n }", "public Long getAccountId() {\n\t\treturn accountId;\n\t}", "FinanceAccount selectByPrimaryKey(Integer id);", "public int getAccountNumber() {\n return accountNumber;\n }", "Account selectByPrimaryKey(String id);", "public long getAccountId() {\n\t\treturn accountId;\n\t}", "Account getAccount(int id);", "@Query(\"select acc from Account acc where acc.customer.customerId = :customerId\")\n\tAccount findAccountByCustomer(@Param(\"customerId\") Long customerId);", "public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = \" + account_id)) {\n\n if (res.next())\n return res.getInt(\"BALANCE\");\n } catch (SQLException ex) {\n return null;\n }\n\n return null;\n }", "long getAccountLinkId();", "public String getAccountId() {\n return this.accountId;\n }", "public Integer getAccountNumber() {\n return accountNumber;\n }", "public Integer getAccountNumber() {\n return accountNumber;\n }", "@Override\n\tpublic String getBankCode(final int bankAccountId, final Connection connection)\n\t{\n\t\tString bankCodeAndName = \"\";\n\t\ttry {\n\t\t\tfinal String query = \"select glcode,name from chartofaccounts where id=(select glcodeid from bankaccount where id= ?)\";\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(query);\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tbankCodeAndName = element[0].toString();\n\t\t\t\tbankCodeAndName = bankCodeAndName + \"#\" + element[1].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\">>>bankCodeAndName \" + bankCodeAndName);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"BAnk Code Not Found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" Bank code not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn bankCodeAndName;\n\t}", "public Account getAccount(int accountid) {\n\t\treturn userDao.getAccount(accountid);\r\n\t}", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "java.lang.String getAccountId();", "public void setAccountID(Long value) {\n this.accountID = value;\n }", "public void setAccountID(Long value) {\n this.accountID = value;\n }", "public static String getUserAccount(String account){\n return \"select ui_account from user_information where ui_account = '\"+account+\"'\";\n }", "java.lang.String getAccountNumber();", "public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}", "public long getAccountId()\r\n/* 115: */ {\r\n/* 116:121 */ return this.accountId;\r\n/* 117: */ }", "@Override\n\tpublic Account getAccountById(int id) {\n\t\treturn (Account) jdbcTemplate.queryForObject(\"select * from account where id=? limit 0 , 1\", new Object[]{id}, new BeanPropertyRowMapper(Account.class));\n\t}", "public Long getUserAccountId() {\r\n return userAccountId;\r\n }", "public MnoAccount getAccountById(String id);", "@Override\n\tpublic int addAccount(Account account) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"insert into accounts values(default, ?, ?) returning id\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setString(1, account.getType());\n\t\tprepStmt.setDouble(2, account.getBalance());\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tint id = 0;\n\t\twhile(rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\treturn id;\n\t}", "public String getAccountNo() {\n return accountNo;\n }", "public String getMyAccountId()\n\t{\n\t\treturn (String) session.getAttribute(\"accountId\");\n\t}", "public String getAccountId() {\n return accountId;\n }", "public String getAccountId() {\n return accountId;\n }", "Account getAccount(Integer accountNumber);", "public String getAccountId() {\r\n return (String) getAttributeInternal(ACCOUNTID);\r\n }", "public int getBankAccount() {\n return bankAccount;\n }", "public int getAccountNumber() {\n\t\treturn accNum;\n\t}", "public Account getAccountByAccountId(String accountId) {\n\t\treturn this.accountMapper.selectAccountByPrimaryKey(accountId);\r\n\t}", "public String getAccountCode() {\n return accountCode;\n }", "public String getAccountId() {\n return mAccountId;\n }", "java.lang.String getAccount();", "public BankAccountInterface getAccount(String accountID){\n BankAccountInterface account = null;\n for(int i = 0; i < accounts.size(); i++){\n if(accounts.get(i).getAccountID().equals(accountID)){\n account = accounts.get(i);\n break;\n } \n }\n return account;\n }", "@Override\n\tpublic Integer findUserIDByAccount(PageData pd) throws Exception {\n\t\tString account=pd.getString(\"account\");\n\t\tif(account!=null){\n\t\tUser user=new User();\n\t\tuser.setAccount(account);\n\t\tList<User> userlist= usermapper.findUser(user);\n\t\tif((user=userlist.get(0))!=null){\n String useridstr=user.getId();\n int userid=Integer.parseInt(useridstr);\n\t\t return userid;\n\t\t}\n\t\telse return null;\n\t\t}\n\t\telse throw new RuntimeException(\"account不能为空\");\t\n\t}", "public Account getAccountByAccountNo(int accNo) {\n Account account = accountRepository.findByAccountNo(accNo);\n return account;\n }", "public UserAccount getUserAccountByLoginId(String loginId);", "public String getAccount(){\n\t\treturn account;\n\t}", "public io.lightcone.data.types.AccountID getAccountId() {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n }", "public void setAccount_Id(java.lang.String account_Id) {\n this.account_Id = account_Id;\n }", "Account findById(int id);", "public String getAccount() {\r\n return account;\r\n }", "public ResultSet returnAccno(Long userid)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select bank_acc_no from CUSTOMER_DETAILS where user_id=\"+userid+\"\");\r\n\treturn rs;\r\n}", "public io.lightcone.data.types.AccountID getAccountId() {\n if (accountIdBuilder_ == null) {\n return accountId_ == null ? io.lightcone.data.types.AccountID.getDefaultInstance() : accountId_;\n } else {\n return accountIdBuilder_.getMessage();\n }\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }", "public String getAccount() {\n return account;\n }" ]
[ "0.6854262", "0.6815324", "0.6815324", "0.6709417", "0.6709417", "0.66452223", "0.66452223", "0.6620855", "0.6610454", "0.65950406", "0.65848666", "0.635162", "0.63377655", "0.6256175", "0.6235676", "0.62331206", "0.6207809", "0.6190923", "0.6175487", "0.6149299", "0.61252373", "0.61110026", "0.60830504", "0.6014232", "0.60103023", "0.6004991", "0.6000237", "0.5994653", "0.5994653", "0.59752536", "0.5975155", "0.59716576", "0.596847", "0.5966482", "0.59326017", "0.59238935", "0.59195673", "0.59074605", "0.5895312", "0.58811176", "0.58727115", "0.58716244", "0.58587354", "0.58467525", "0.58384156", "0.58353496", "0.58137923", "0.58070374", "0.5800033", "0.5796957", "0.5796957", "0.57873964", "0.5778965", "0.5774373", "0.5774373", "0.5774373", "0.57541376", "0.57541376", "0.5749364", "0.57385385", "0.57273954", "0.57222056", "0.5703805", "0.5701932", "0.56963795", "0.569245", "0.567494", "0.56617945", "0.56346804", "0.56346804", "0.5627578", "0.56201243", "0.5613526", "0.55867463", "0.5578283", "0.55663085", "0.5558869", "0.55582017", "0.5551111", "0.55351233", "0.55311924", "0.552137", "0.55212015", "0.5519303", "0.55131423", "0.5507883", "0.5489069", "0.5469896", "0.5452259", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144", "0.5451144" ]
0.55913323
74
This method was generated by MyBatis Generator. This method sets the value of the database column his_books.account_id
public void setAccountId(String accountId) { this.accountId = accountId == null ? null : accountId.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAccountID(Long value) {\n this.accountID = value;\n }", "public void setAccountID(Long value) {\n this.accountID = value;\n }", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "public void setAccount_Id(java.lang.String account_Id) {\n this.account_Id = account_Id;\n }", "void setAccountId(Long accountId);", "@Column(name = \"ACCOUNT_ID\")\n\tpublic String getAccountID()\n\t{\n\t\treturn accountID;\n\t}", "public void setAccount(String accountID) {\n this.account = accountID;\n }", "public Builder setAccountID(long value) {\n validate(fields()[2], value);\n this.accountID = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public void setAccountNo (String AccountNo);", "public void setAccountID(java.lang.Object accountID) {\n this.accountID = accountID;\n }", "public Builder setAccountID(long value) {\n validate(fields()[0], value);\n this.accountID = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public void setAcctId(Integer acctId) {\n this.acctId = acctId;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public void setAccountId(Integer value) {\n this.accountId = value;\n }", "public void setAccountId(int accountId) {\n this.accountId = accountId;\n }", "public void setAccountId(long value) {\n this.accountId = value;\n }", "void setAccount(final Account account);", "public void setAccountId(Integer accountId) {\n this.accountId = accountId;\n }", "public Long getAccountID() {\n return accountID;\n }", "public Long getAccountID() {\n return accountID;\n }", "public void setAccountID(String accountID)\n\t{\n\t\tthis.accountID = accountID;\n\t}", "public\n void\n setAccount(Account account)\n {\n itsAccount = account;\n }", "void updateAccount(int id, double accountBalance, String account) {\n // Update only the required keys\n sql = \"UPDATE CashiiDB2 \" + \"SET \" + account + \" ='\" + accountBalance + \"' WHERE AccountNum in ('\" + id + \"')\";\n try {\n st.executeUpdate(sql);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void setAccount(Account account) {\n this.account = account;\n }", "public int getAccountID() {\n return accountID;\n }", "public void setAccountId(String s) { accountId = s;}", "@Override\npublic void update(Account account) {\n\taccountdao.update(account);\n}", "@Override\npublic Account findById(int accountid) {\n\treturn accountdao.findById(accountid);\n}", "public void setBankAccountDetails(int C_BankAccount_ID) {\n if (C_BankAccount_ID == 0) {\n return;\n }\n setC_BankAccount_ID(C_BankAccount_ID);\n //\n String sql = \"SELECT b.RoutingNo, ba.AccountNo \"\n + \"FROM C_BankAccount ba\"\n + \" INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) \"\n + \"WHERE C_BankAccount_ID=?\";\n try {\n PreparedStatement pstmt = DB.prepareStatement(sql, get_TrxName());\n pstmt.setInt(1, C_BankAccount_ID);\n ResultSet rs = pstmt.executeQuery();\n if (rs.next()) {\n setRoutingNo(rs.getString(1));\n setAccountNo(rs.getString(2));\n }\n rs.close();\n pstmt.close();\n } catch (SQLException e) {\n log.log(Level.SEVERE, \"setsetBankAccountDetails\", e);\n }\n }", "public BankAccount findAccountById(int currentBankID) throws SQLException;", "public void setAccountId(Long accountId) {\n this.accountId = accountId;\n }", "List<BookAccount> findAllForAccount(long idAccount);", "public void setBankAccount(final int newBAccount) {\n this.bankAccount = newBAccount;\n }", "private void setAccount(SessionData sessionData, Account account) {\n \ttry {\n\t sessionData.set(\"account\", account);\n \t} catch (Exception e) {\n \t throw new RuntimeException(e.toString());\n \t}\n }", "@Override\r\n\tpublic int updateAccountByPrimaryKeySelective(Account account) {\n\t\treturn this.accountMapper.updateAccountByPrimaryKeySelective(account);\r\n\t\t\r\n\t}", "public java.lang.String getAccount_Id() {\n return account_Id;\n }", "public void setAccountId(Long accountId) {\n\t\tthis.accountId = accountId;\n\t}", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccount(String account) {\n this.account = account;\n }", "public void setAccountId(UUID accountId) {\n this.accountId = accountId;\n }", "public void setBankaccount(java.lang.String param) {\r\n localBankaccountTracker = param != null;\r\n\r\n this.localBankaccount = param;\r\n }", "Account selectByPrimaryKey(Long accountid);", "public void setAccount(com.huawei.www.bme.cbsinterface.cbs.businessmgr.Account account) {\r\n this.account = account;\r\n }", "public void setAccountNo(int number){\n\t\taccountNo = number;\n\t}", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "public void setAccount(String account) {\r\n\t\tthis.account = account;\r\n\t}", "int updateByPrimaryKey(Account record);", "int updateByPrimaryKey(Account record);", "public void setAccountDao(AccountDao accountDao) {\n this.accountDao = accountDao;\n }", "UserAccount getUserAccountById(long id);", "public void setAccountId(String value) {\r\n setAttributeInternal(ACCOUNTID, value);\r\n }", "@Override\n\tpublic int addAccount(Account account) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"insert into accounts values(default, ?, ?) returning id\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setString(1, account.getType());\n\t\tprepStmt.setDouble(2, account.getBalance());\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tint id = 0;\n\t\twhile(rs.next()) {\n\t\t\tid = rs.getInt(1);\n\t\t}\n\t\treturn id;\n\t}", "void setAccountNumber(java.lang.String accountNumber);", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "public void setAccountId(String accountId) {\n this.accountId = accountId;\n }", "CusBankAccount selectByPrimaryKey(Integer id);", "@SequenceGenerator(name = \"generator\", sequenceName=\"SEQ_CUSTOMER_ACCOUNT_MANAGENT\", allocationSize = 1)\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = \"generator\")\n\t@Column(name = \"ACCOUNT_ID\", unique = true, nullable = false, precision = 20, scale = 0)\n\tpublic BigDecimal getAccountId() {\n\t\treturn this.accountId;\n\t}", "public boolean setAccountNumber(int account) {\n\t\tif (account > 0)\n\t\t\tthis.account = String.valueOf(account);\n\t\telse\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public void setAccount(Account associatedAccount){\r\n\t\tthis.associatedAccount = associatedAccount;\r\n\t}", "public void setCurrentUserAccount(String currentUserAccount);", "@Override\r\n\tpublic boolean update(int id, Account account) {\n\t\treturn daoref.update(id, account);\r\n\t}", "int updateByPrimaryKey(CusBankAccount record);", "public void setJP_BankAccount_Value (String JP_BankAccount_Value);", "public void setUserAccountId(Long userAccountId) {\r\n this.userAccountId = userAccountId;\r\n }", "ShopAccount selectByPrimaryKey(Integer spAccount);", "public void setAccountInfo(AccountInfo accountInfo) {\n this.accountInfo = accountInfo;\n }", "protected void setId(EmployeeLeave employeeLeave, ResultSet rs, int rowNumber) throws SQLException{\n\t\tString id = rs.getString(EmployeeLeaveTable.COLUMN_ID);\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\n\t\temployeeLeave.setId(id);\n\t}", "public Integer getAcctId() {\n return acctId;\n }", "public static void setCurrentAccount(Account currentAccount) {\r\n\t\tAccount.currentAccount = currentAccount;\r\n\t}", "FinanceAccount selectByPrimaryKey(Integer id);", "public synchronized void setAccountNumber(int number) {\n this.accountNumber = number;\n }", "int updateByPrimaryKey(ShopAccount record);", "void updateAccount(Account account);", "@Override\n\tpublic String getBankId(final int bankAccountId, final Connection connection)\n\t{\n\t\tString bankAndBranchId = \"null\";\n\t\ttry {\n\t\t\tfinal StringBuilder sql = new StringBuilder(\"select b.id,c.id from bankaccount a,bankbranch b,bank c\")\n\t\t\t\t\t.append(\" where a.branchid=b.id and b.bankid=c.id and a.id= ?\");\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(sql.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tbankAndBranchId = element[0].toString();\n\t\t\t\tbankAndBranchId = bankAndBranchId + \"#\" + element[1].toString();\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\">>>bankAndBranchId \" + bankAndBranchId);\n\t\t\t}\n\t\t\tif (rset == null || rset.size() == 0)\n\t\t\t\tthrow new NullPointerException(\"Bank Code Not Found\");\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" Bank Id not found \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn bankAndBranchId;\n\t}", "public void setAccounts(List<B2bInvoiceAccount> accounts) {\r\n this.accounts = accounts;\r\n }", "protected void setAccountName(final String account) {\n this.account = account;\n }", "public void setAccountNumber(int accountNumberIn)\r\n\t{\r\n\t\t\r\n\t\tif (accountNumberIn >= ACCOUNT_NUM_MIN && accountNumberIn <= ACCOUNT_NUM_MAX)\r\n\t\t\r\n\t\t\taccountNumber = accountNumberIn;\r\n\t\t\r\n\t\telse\r\n\t\t\taccountNumber = -1;\r\n\t\t\r\n\t}", "private void updateDatabaseAccountBalance() {\n\t\tString sql = \"UPDATE account SET balance = \" + this.balance + \" \";\n\t\tsql += \"WHERE accountID = '\" + this.accountID + \"';\";\n\n\t\tDbUtilities db = new MySqlUtilities();\n\t\tdb.executeQuery(sql);\n\t}", "int updateByPrimaryKey(FinanceAccount record);", "public int updateAccount(Accounts account) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, account.getName());\n values.put(KEY_PASSWORD, account.getPassword());\n values.put(KEY_PH_NO, account.getPhoneNumber());\n values.put(KEY_EMAIL, account.getEmail());\n\n // updating row\n return db.update(TABLE_ACCOUNTS, values, KEY_ID + \" = ?\",\n new String[]{String.valueOf(account.getID())});\n }", "public void setC_BankAccount_ID(int C_BankAccount_ID) {\n\t\tif (C_BankAccount_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"C_BankAccount_ID is mandatory.\");\n\t\tset_ValueNoCheck(\"C_BankAccount_ID\", new Integer(C_BankAccount_ID));\n\t}", "public void setAccountType(int value) {\r\n this.accountType = value;\r\n }", "String getAccountID();", "String getAccountID();", "public void setAccountNo( String accountNo ) {\r\n this.accountNo = accountNo;\r\n }", "public void saveOrUpdate(Account account) {\n accountRepository.save(account);\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void setAccountId(String accountId) {\n this.accountId = accountId == null ? null : accountId.trim();\n }", "public java.lang.Object getAccountID() {\n return accountID;\n }", "public int getC_BankAccount_ID();", "void updateAccount();", "@Override\n\tpublic Account findAccountByAccountId(int accountId) throws SQLException {\n\t\tConnection connect = db.getConnection();\n\t\tString selectQuery = \"select * from accounts where id=?\";\n\t\tPreparedStatement prepStmt = connect.prepareStatement(selectQuery);\n\t\tprepStmt.setInt(1, accountId);\n\t\tResultSet rs = prepStmt.executeQuery();\n\t\tAccount a = null;\n\t\twhile (rs.next()) {\n\t\t\ta = new Account(rs.getInt(1), rs.getString(2), rs.getDouble(3));\n\t\t}\n\t\treturn a;\n\n\t}", "public GlAccountBank (\n\t\t\tLong in_id\n ) {\n\t\tthis.setId(in_id);\n }", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void setJP_BankData_ID (int JP_BankData_ID);", "public void setAccountNumber(int accountNumber) {\n this.accountNumber = accountNumber;\n }" ]
[ "0.65597063", "0.65597063", "0.64080405", "0.61247855", "0.60074663", "0.59815264", "0.59006655", "0.5805233", "0.580516", "0.5793683", "0.5788722", "0.5765574", "0.5754869", "0.5754869", "0.5749467", "0.5718476", "0.5717143", "0.5710633", "0.5705402", "0.56950957", "0.56950957", "0.56792945", "0.56758785", "0.5666848", "0.5662432", "0.5627923", "0.5621814", "0.5609666", "0.5608607", "0.5565321", "0.5556512", "0.55492216", "0.55474764", "0.54819936", "0.5469812", "0.54448706", "0.5443923", "0.5416386", "0.54026294", "0.54026294", "0.54026294", "0.54026294", "0.53557974", "0.53543305", "0.53494257", "0.5333018", "0.53312767", "0.53227645", "0.5308658", "0.528773", "0.528773", "0.5285267", "0.52787155", "0.52757305", "0.52742696", "0.5266358", "0.5258332", "0.5258332", "0.5243036", "0.5241984", "0.5240926", "0.5200646", "0.51996297", "0.51996297", "0.5198196", "0.5197894", "0.51887614", "0.51861775", "0.5185943", "0.5185084", "0.51732904", "0.51721233", "0.51624376", "0.5158354", "0.51574576", "0.51545537", "0.5150827", "0.51370895", "0.5128345", "0.51243126", "0.5120551", "0.51105046", "0.5103462", "0.5098354", "0.5065554", "0.5063163", "0.5063163", "0.50560004", "0.5044503", "0.5040432", "0.5040188", "0.50302106", "0.5026271", "0.5025921", "0.5020154", "0.5018974", "0.50144786", "0.50142676", "0.5012075" ]
0.5093549
85
This interface helps us to write JPA methods and get the relevant data from the data base.
@Repository public interface CouponRepository extends JpaRepository<Coupon , Integer> { /** * This method finds specific coupon by using the company id and the title of coupon. * @param companyId of the company that create this coupon * @param title of the coupon * @return Coupon object */ Coupon findByCompanyIdAndTitle(int companyId, String title); /** * This method find coupon by company id. * The method helps us to get all of the coupons of specific company. * @param companyId of the relevant company * @return List of all the company coupons. */ List<Coupon> findByCompanyId(int companyId); /** * Find all the coupons until the inserted date. * @param date defines the coupons list by the inserted date. * @return list of all the coupons until the inserted date. */ List<Coupon> findByEndDateBefore(Date date); /** * The method finds the coupons with the id and the category that the company inserted. * @param companyId of the logged in company. * @param category of the coupon. * @return a Coupon list by categories that the user or the company inserted. */ List<Coupon> findByCompanyIdAndCategory(int companyId, Category category); /** * The method finds the coupons with the id and the price that the company inserted. * @param companyId of the logged in company. * @param price of the coupon. * @return a Coupon list by price that the user or the company inserted. */ List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price); /** * This repo responsible to get coupons by category. * @param category of the coupons will be shown. * @return list of the relevant coupons. */ List<Coupon> findByCategory(Category category); /** * This repo responsible to get coupons by maximum price. * @param maxPrice of the coupons will be shown. * @return list of the relevant coupons. */ List<Coupon> findByPrice(double maxPrice); /** * Sort the coupons by start date. * We use this repo in the main page of the website. * @return sorted list of the coupons. */ List<Coupon> findByOrderByStartDateDesc(); /** * Sort the coupons by the most purchased coupons. * We use this repo in the main page of the website. * @return sorted list of the most popular coupons. */ @Query(value = "SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC", nativeQuery = true) List<Integer> findByPopularity(); /** * Get all coupons that contains the search word. * @param searchWord that the user search for. * @return list of the filtered coupons. */ List<Coupon> findByTitleContaining(String searchWord); /** * Count all the coupons in the data base. * @return number of the coupons in the database. */ @Query(value = "SELECT COUNT(*) FROM coupons", nativeQuery = true) int countAllCoupons(); /** * Count all the purchased coupons. * @return number of the purchased coupons. */ @Query(value = "SELECT COUNT(*) FROM customers_coupons", nativeQuery = true) int countAllCouponsPurchased(); /** * Count all the coupons of specific company. * @param companyId of the coupons * @return number of the counted coupons. */ int countByCompanyId(int companyId); /** * Count all the coupons that purchased of specific company. * @param companyId of the coupons. * @return number of the counted coupons. */ @Query(value = "SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1" , nativeQuery = true) int countAllCouponsPurchasedByCompany(int companyId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EntityData<?> getEntityData();", "public interface AnutaEntityManager {\n\n /**\n * Saves entity in database\n * @param entity the entity to be saved\n * @param <T> the type if target entity\n * @return saved entity\n */\n public <T> T save(T entity);\n\n /**\n * Loads the entity from data source using entity's id\n * @param entityClass the target entity class\n * @param id the id of entity lo load\n * @param <T> the type if target entity\n * @return Java object, representing the entity if object was found and null otherwise\n */\n public <T> T find(Class<T> entityClass, String id);\n\n\n /**\n * Loads entity without loading all inner collections\n * @param id the id of the entity\n * @return loaded entity, if exists and null otherwise\n */\n public <T> T getPlainEntity(Class<T> entityClass, String id);\n\n /**\n * Updates entity in database\n * @param <T> the type if target entity\n * @return updated entity\n */\n public <T> T update(T entity);\n\n /**\n * Deletes entity from database\n * @param entity the entity to be deleted\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(T entity);\n\n /**\n * Deletes entity from database\n * @param entityClass the class of entity to be deleted\n * @param id the id of entity to be removed\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(Class<T> entityClass, String id);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findAll(Class<T> entityClass);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findByQuery(AnutaQuery<T> query);\n\n /**\n * Saves all entities into database\n * @param <T> the type if target entity\n * @return collection of saved entities\n */\n public <T> Collection<T> saveAll(Collection<T> entities);\n\n /**\n * Updates all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> Collection<T> updateAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param ids collection of ids for entities to be deleted\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Class<T> entityClass, Collection<String> ids);\n\n /**\n * @return the instance of {@link AnutaQueryBuilder} which can be used to build query\n */\n public <T> AnutaQueryBuilder<T> getQueryBuilder(Class<T> cls);\n\n /**\n * Queries data from DB and coverts data from cursor to Java entity.\n * @param query the query to select objects\n * @param <T> type of target entity\n * @return an instance of {@link AnutaEntityCursor} which can be used to iterate objects from database\n */\n public <T> AnutaEntityCursor<T> getEntityCursor(AnutaQuery<T> query);\n\n /**\n * Executes query and returns true if query was executed successfully and false otherwise\n * @param query the query to be executed\n * @return {@code true} if query was executed successfully and {@code false} otherwise\n */\n public <T> boolean executeQuery(AnutaQuery<T> query);\n\n /**\n * Initializes all related collections and entities\n * @param entity the entity to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entity the entity to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity, int level);\n\n /**\n * Initializes all related collections and entities for the given collection of entities\n * @param entities the collection of entities to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entities the collection of entities to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities, int level);\n}", "public interface PortalPricesInfoResponsitory extends JpaCustomResponsitory<PortalPricesInfoEntity, Integer> {\n\n @Query(\"select p from PortalPricesInfoEntity p where p.name = ?1\")\n List<PortalPricesInfoEntity> findByName(String name);\n\n}", "public interface ReadDao {\n\n /**\n * 根据手机号码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone}\")\n UserModel getUserByPhone(@Param(\"phone\") String phone);\n\n /**\n * 根据用户名密码获取用户\n *\n * @param phone\n * @return\n */\n @Select(\"select * from t_user where phone=#{phone} and passwd=substr(md5(#{pwd}),9,8)\")\n UserModel getUserByPassword(@Param(\"phone\") String phone, @Param(\"pwd\") String pwd);\n\n /**\n * 根据商品名查询商品\n *\n * @return\n */\n @Select(\"select id goodsid,name,price from t_goods where name like #{name}\")\n List<Commodity> queryCommodity(@Param(\"name\") String name);\n\n /**\n * 根据关键字查询\n *\n * @param keyword\n * @param size\n * @return\n */\n @Select(\"select * from t_goods where name like #{keyword} limit 0,#{size}\")\n public List<Commodity> getCommodityByKeyword(@Param(\"keyword\") String keyword, @Param(\"size\") int size);\n\n\n /**\n * 根据ID获取商品\n *\n * @param id\n * @return\n */\n @Select(\"select * from t_goods where id=#{id}\")\n public Commodity getCommodityById(@Param(\"id\") long id);\n\n /**\n * 查询所有商品类别\n * @return\n */\n @Select(\"select id,category1,category2 from t_goods_category\")\n public List<CommodityCategory> queryCategorys();\n\n /**\n * 查询所有商品\n * @return\n */\n @Select(\"select * from t_goods\")\n public List<Commodity> queryAllCommodityes();\n\n\n /**\n * 根据父级名称获取子级名称\n *\n * @param name\n * @return\n */\n @Select(\"select * from t_goods_category where category1=#{name}\")\n public List<CommodityCategory> getCommodityCategoryByParentName(@Param(\"name\") String name);\n\n /**\n * 获取一级分类名称\n *\n * @return\n */\n @Select(\"select DISTINCT(category1) as category1 from t_goods_category\")\n public List<CommodityCategory> getParentCommodityCateory();\n}", "public interface EntityManager {\r\n public <T> T findById(Class<T> entityClass, Long id);\r\n public <T> Long getNextIdVal(String tableName, String columnIdName);\r\n public <T> Object insert(T entity);\r\n public <T> List<T> findAll(Class<T> entityClass);\r\n public <T> T update(T entity);\r\n public void delete(Object entity);\r\n public <T> List<T> findByParamsClass(Class<T> entityClass, Map<String, Object> params);\r\n}", "public interface IDataBaseRepository {\r\n\r\n /**\r\n * Get DataBase object\r\n *\r\n * @return obj\r\n */\r\n //DataBase getDataBase();\r\n\r\n /**\r\n * Save new clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void save(Clothes clothes);\r\n\r\n /**\r\n * Delete clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void delete(Clothes clothes);\r\n\r\n /**\r\n * Update clothes\r\n *\r\n * @param oldClothes obj\r\n * @param newClothes ojb\r\n */\r\n void update(Clothes oldClothes, Clothes newClothes);\r\n\r\n /**\r\n * Get all clothes\r\n *\r\n * @return list\r\n */\r\n List<Clothes> getAll();\r\n\r\n /**\r\n * Get all clothes by type of the office\r\n *\r\n * @param officeType obj\r\n * @return list\r\n */\r\n List<Clothes> getByOffice(OfficeType officeType);\r\n\r\n /**\r\n * Get clothes by ID\r\n *\r\n * @param id int\r\n * @return clothes obj\r\n */\r\n Clothes getById(int id);\r\n\r\n}", "public abstract Statement queryToRetrieveData();", "public interface BaseDao<T extends BaseEntity> {\r\n\t/**\r\n\t * Adds entity to database\r\n\t * \r\n\t * @param entity\r\n\t * creating entity\r\n\t */\r\n\tvoid create(T entity);\r\n\r\n\t/**\r\n\t * Gets entity from database\r\n\t * \r\n\t * @param id\r\n\t * id of entity\r\n\t * @return found entity\r\n\t */\r\n\tT read(int id);\r\n\r\n\t/**\r\n\t * Gets all certain kind entities from database\r\n\t * \r\n\t * @return List of all entities\r\n\t */\r\n\tList<T> readAll();\r\n\r\n\t/**\r\n\t * Updates entity in database\r\n\t * \r\n\t * @param entity\r\n\t * entity for update\r\n\t */\r\n\tvoid update(T entity);\r\n\r\n\t/**\r\n\t * Deletes entity from database\r\n\t * \r\n\t * @param entityId\r\n\t * id of entity\r\n\t */\r\n\tvoid delete(int entityId);\r\n\r\n\t/**\r\n\t * get values from ResultSet and set them to entity object\r\n\t * \r\n\t * @param rs\r\n\t * ResultSet object\r\n\t * \r\n\t * @return entity object\r\n\t * @throws SQLException\r\n\t * if the columnLabel is not valid;\r\n\t */\r\n\tT buidEntity(ResultSet rs) throws SQLException;\r\n}", "PersistentDataHolder getDataHolder();", "public interface DatabaseTool {\r\n\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will default follow\r\n\t * complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive. It will follow complex objects.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * Get all objects from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed..\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return of all classes that is retrieved.\r\n\t */\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * Get a single object from the database. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param id of the object to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> E getObject(Class<E> clazz, int id, boolean follow);\r\n\t\r\n\t/**\r\n\t * Set a single object from the values. It should retrieve all information and put it into the database. It is important\r\n\t * that the name in the database and the name in the class matches. It is not case sensitive.\r\n\t * \r\n\t * This method will close the prepared statement and the connection.\r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @param follow complex objects as {@link ForeignKey}, {@link OneToMany} and {@link ManyToMany} \r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Retrievable> void setObject(String sql, E e, boolean follow);\r\n\t\r\n\t/**\r\n\t * This will help write a object to a persistent store. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void storeObject(String sql, E e);\r\n\t\r\n\t/**\r\n\t * This will remove a object from the database. \r\n\t * \r\n\t * \r\n\t * @param The SQL query to be executed.\r\n\t * @param clazz to be retrieved.\r\n\t * @return a instanced object.\r\n\t */\r\n\tpublic <E extends Writeable> void write(String sql);\r\n\r\n\t/**\r\n\t * Read from the database. It will return a cached result set. This result set is closed\r\n\t * and does not keep connection to the database.\r\n\t * \r\n\t * @param sql to be executed.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Writeable> ResultSet read(CharSequence sql);\r\n\t\r\n\t/**\r\n\t * Read from the database. It will first create a prepared statement before doing the read.\r\n\t * \r\n\t * @param sql to be executed. It must contain the amount ? as the length of the objects.\r\n\t * @return a cached result set.\r\n\t */\r\n\tpublic <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);\r\n\t\r\n\tpublic <E extends Retrievable> List<E> getObjects(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\tpublic <E extends Retrievable> E getObject(ResultSet resultSet, Class<E> clazz, boolean follow);\r\n\t\r\n\t/**\r\n\t * @param sql that is update/insert or both\r\n\t * @param objects that is to be used in store as parameters to the sql..\r\n\t * @return number of rows updated.\r\n\t */\r\n\tpublic int write(String sql, Object... objects);\r\n\t\r\n\tpublic int writeGetID(String sql, Object... objects);\r\n\t\r\n\tpublic QueryRunner getQueryRunner();\r\n\t\r\n\tpublic Retriver getRetriver();\r\n\r\n\tpublic <E extends Retrievable> E getObject(String sql, Class<E> clazz, Object... objects);\r\n\r\n\tpublic <E extends Retrievable> List<E> getObjects(String sql, Class<E> class1, Object... objects);\r\n\r\n\tpublic <E> E getValue(final String sql, final Class<E> clazz, final String column, final Object... objects);\r\n\t\r\n\tpublic List<Object> getValues(final String sql, final Object... objects);\r\n\t\r\n\tpublic String getServer();\r\n}", "public abstract FHIRPersistence getPersistenceImpl() throws Exception;", "@Repository\npublic interface InformDao {\n void add(Inform inform);\n List<Inform> queryAll();\n void update();\n List<Inform> queryByUsername(String username);\n}", "public interface BeeDataDao {\n\n /*获取兼职数据*/\n BeeJobTime getBeeJobTime();\n\n /*分页获取兼职数据*/\n BeeJobTime getBeeJobTimes(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工数据*/\n BeeSummerJob getBeeSummerJob();\n\n /*分页获取暑期工数据*/\n BeeSummerJob getBeeSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*根据JID获取兼职详细信息*/\n BeeJobTimeDetailed getBeeJobTimeDetailed(int jid);\n\n /*根据SID获取兼职详细信息*/\n BeeSummerJobDetailed getSummerJobDetailed(int sid);\n\n /*分页获取兼职报名信息*/\n UserMessageList getSignUpJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取兼职报名List*/\n UserMessageList getSignUpJobFair();\n\n /*根据phone查询兼职报名人员*/\n UserMessageList selectJobFairUser(String phone);\n\n /*兼职报名*/\n void putSignUpJobFair(@Param(\"userMessage\") UserMessage userMessage);\n\n /*根据UserId查询报名人员*/\n String selectSignUpJobFairByUserId(int UserId);\n\n /*插入amount*/\n void insertAmount(@Param(\"amount\") String amount,@Param(\"jobNames\") String jobNames,@Param(\"userId\") int userId);\n\n /*暑期工报名*/\n void putSignUpSummerJob(@Param(\"userMessage\") UserMessage userMessage);\n\n /*暑期工发布*/\n void publishSummerJob(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*兼职发布*/\n void publishJobFair(@Param(\"beeSummerJobDetailed\") BeeSummerJobDetailed beeSummerJobDetailed,@Param(\"tag\") String tag);\n\n /*分页获取暑期工报名信息*/\n UserMessageList getSignUpSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n /*获取暑期工报名List*/\n UserMessageList getSignUpSummerJob();\n\n BeeSummerJobDetailedList AuditingJobFairs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeSummerJobDetailedList AuditingJobFair();\n\n BeeSummerJobDetailedList AuditingSummerJob();\n\n BeeSummerJobDetailedList AuditingSummerJobs(@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n String selectSignUpJobFairByJIDS(int userId);\n\n UserMessageList selectSummerJobUser(String phone);\n\n String selectSignUpSummerJobByJIDS(int userId);\n\n String selectSignUpSummerJobByUserId(int userId);\n\n void insertAmount1(String jids, String jobNameS, int userId);\n\n int getSid(int id);\n\n int getJid(int id);\n\n void putOpenId(@Param(\"openId\") Object openId,@Param(\"targetId\") int targetId);\n\n BeeJobTime getAuditingBeeJobTimeByOpenId(String openId);\n\n BeeJobTime getAuditingBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimesByOpenId(@Param(\"openId\") String openId, @Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n BeeJobTime getBeeJobTimeByOpenId(String openId);\n\n int selectIsGet(int i);\n\n UserMessageList getSignUpJobFairsByJid();\n\n UserMessageList getSignUpJobFairByJid(@Param(\"jid\") String jid,@Param(\"startIndex\") int startIndex, @Param(\"endAmount\") int endAmount);\n\n int selectargetId(String openId);\n\n BeeJobTimeDetailed getAuditingBeeJobTimeDetailed(int jid);\n\n int selectOpenId(Object openId);\n\n Object selectOpenIds(Object openId);\n\n List<Integer> getJidByOpenId(String openId);\n\n void getJobTimeUserByJid(List<Integer> jid);\n\n String getJidsByOpenId(String openId);\n\n BeeJobTime getJobTimeByOpenId(@Param(\"jidS\") List<String> jidS);\n\n BeeJobTime getBeeJobTimesByOpenIds(int startIndex, int endAmount);\n\n String getJidsByJid(int i);\n\n String[] getJids();\n}", "protected abstract void retrievedata();", "public interface DailycarePreseterDao {\n\n public List<Event> getDataFromServer();\n}", "public interface AppHealthDataDao {\n public AppHealthData findByType(String type, String idNo) throws Exception;\n\n public AppHealthData findByPatientId(String patientId, String ghh000,String type) throws Exception;\n\n public void addHealthDataImplements(JSONObject jsonall,String idNo,String card,String type,String requestUserId,String requestUserName,String userType) throws Exception;\n}", "public interface RepoPrestamos {\n\n public List<Prestamo> getPrestamosPendientes();\n public Prestamo getPrestamo(Long id);\n public void addPrestamo(Prestamo prestamo);\n public void removePrestamo(Prestamo prestamo);\n public void updatePrestamo(Prestamo prestamo);\n\n}", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Repository\npublic interface WeatherAqiDao {\n /**\n * 根据参数查询AQI\n * @param selParams\n * @return\n */\n List<WeatherAQI> selectAqis(HashMap<String, Object> selParams);\n\n /**\n * 入库AQI\n * @param weatherAQI\n */\n void insert(WeatherAQI weatherAQI);\n\n /**\n * 更新AQI\n * @param weatherAQI\n */\n void update(WeatherAQI weatherAQI);\n\n /**\n * 根据id查询空气质量\n * @param params\n * @return\n */\n WeatherAQI selectById(Map<String, Object> params);\n}", "public interface PersistenceFactory {\n /* Fields */\n\n /**\n * The property name for all classes stored at the column:row level to introspect the entity that contains the\n * properties persisted in a row's columns\n */\n String CLASS_PROPERTY = \"___class\";\n\n /* Misc */\n\n /**\n * Deletes columns by name from column family\n *\n * @param columnFamily the column family\n * @param key the key\n * @param columns the columns to be deleted by name\n */\n void deleteColumns(String columnFamily, String key, String... columns);\n\n /**\n * Executes a query\n *\n * @param expectedResult the result expected from the query execution\n * @param query the query\n * @param <T> the result type\n * @return the result\n */\n <T> T executeQuery(Class<T> expectedResult, Query query);\n\n /**\n * @param entityClass the class\n * @param key the id\n * @param <T> the entity type\n * @return an entity from the data store looked up by its id\n */\n <T> T get(Class<T> entityClass, String key);\n\n /**\n * Fetch a map of columns and their values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param reversed if the order should be reversed\n * @param columns the column names\n * @return a map of columns and their values\n */\n Map<String, ByteBuffer> getColumns(String columnFamily, String key, boolean reversed, String... columns);\n\n /**\n * Fetch a map of columns and their values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param limit of columns\n * @param reversed if the order should be reversed\n * @param fromColumn from column\n * @param toColumn to column\n * @return a map of columns and their values\n */\n Map<String, ByteBuffer> getColumns(String columnFamily, String key, int limit, boolean reversed, String fromColumn, String toColumn);\n\n /**\n * @return the default consistency level\n */\n ConsistencyLevel getDefaultConsistencyLevel();\n\n /**\n * @return the default keyspace\n */\n String getDefaultKeySpace();\n\n /**\n * @param entityClass the class type for this instance\n * @param <T> the type of class to be returned\n * @return an instance of this type after transformation of its accessors to notify the persistence context that there are ongoing changes\n */\n <T> T getInstance(Class<T> entityClass);\n\n /**\n * Obtains an entity key\n *\n * @param entity the entity\n * @return the key\n */\n String getKey(Object entity);\n\n /**\n * The list of managed class by this factory\n *\n * @return The list of managed class by this factory\n */\n List<Class<?>> getManagedClasses();\n\n /**\n * Get a list of entities given a query\n *\n * @param type the type of objects to expect back\n * @param query the query\n * @param <T> the result type\n * @return the list of entities\n */\n <T> List<T> getResultList(Class<T> type, Query query);\n\n /**\n * Get a single result from a CQL query\n *\n * @param type the type of objects to expect back\n * @param query the query\n * @param <T> the entity type\n * @return the resulting entity\n */\n <T> T getSingleResult(Class<T> type, Query query);\n\n /**\n * Inserts columns based on a map representing keys with properties and their corresponding values\n *\n * @param columnFamily the column family\n * @param key the column family key\n * @param keyValuePairs the map with keys and values\n */\n void insertColumns(String columnFamily, String key, Map<String, Object> keyValuePairs);\n\n /**\n * Entry point method to persist and arbitrary list of objects into the datastore\n *\n * @param entities the entities to be persisted\n */\n <T> void persist(T... entities);\n\n /**\n * @param entities the entities to be removed from the data store\n */\n <T> void remove(T... entities);\n \n /**\n * return cluster\n */\n Cluster getCluster(); \n}", "public interface CustomerRepository extends JpaRepository<Customer,Long> {\r\n public Customer findByNumberID(String numberID);\r\n public List<Customer> findByLastName(String lastName);\r\n public List<Customer> findByRegion(Region region);\r\n}", "public interface StudentRespository extends JpaRepository<Student, Long> {\n List<Student> findAll();\n}", "public interface ITradeDao {\n int insertTrade(Trade trade);\n\n List<Trade> queryTrade(TradeQuery query);\n}", "public interface CounselorBiographyTempService { \n\n\t/**\n\t * Loads an entity from the database using its Primary Key\n\t * @param id\n\t * @return entity\n\t */\n\tCounselorBiographyTemp findById( Integer id ) ;\n\n\t/** \n\t * Loads all entities.\n\t * @return all entities\n\t */\n\tList<CounselorBiographyTemp> findAll();\n\t\n\t/**\n\t * Loads entities in page number.\n\t * @return entities\n\t */\n\n\tPage<CounselorBiographyTempEntity> findAll(Integer page);\n\n\t/**\n\t * Count all entities\n\t * @return Long\n\t */\n\tLong countTotal();\n\t\n\n\t/**\n\t * Saves the given entity in the database (create or update)\n\t * @param entity\n\t * @return entity\n\t */\n\tCounselorBiographyTemp save(CounselorBiographyTemp entity);\n\n\t/**\n\t * Updates the given entity in the database\n\t * @param entity\n\t * @return\n\t */\n\tCounselorBiographyTemp update(CounselorBiographyTemp entity);\n\n\t/**\n\t * Creates the given entity in the database\n\t * @param entity\n\t * @return\n\t */\n\tCounselorBiographyTemp create(CounselorBiographyTemp entity);\n\t\n\t/**\n\t * Deletes an entity using its Primary Key\n\t * @param id\n\t */\n\tvoid delete( Integer id );\n\n\tPage<CounselorBiographyTempEntity> listPaging(Integer page,Integer size);\n\t\n\tPage<CounselorBiographyTempEntity> listPagingByUserId(Integer counselorId, Integer page,Integer size);\n\t\n\tList<CounselorBiographyTempEntity> listByUserId(Integer counselorId);\n\t\n\tvoid deleteByUserId(Integer counselorTempId);\n\t\n\tvoid deleteByCounselorId(Integer counselorId);\n\n}", "@Repository\npublic interface ItemRepository extends JpaRepository<Item, Integer> {\n\n\t/**\n\t * findByName method to get the respective item for the given name from db\n\t *\n\t * @param name is the name of the item\n\t * @return the item\n\t */\n\t@Query(value=\"select I.ID , I.NAME from ITEM I\",nativeQuery = true)\n\tpublic Item findByName(String name);\n\n\n\t\n\t/*\n\t * @Query(value = \"SELECT i.ID, i. FROM ITEM i\", nativeQuery = true) public\n\t * List<Item> findItems();\n\t */\n}", "public interface QuestionnaireDAO {\r\n /**\r\n * Loads questionnaire data\r\n *\r\n * @return\r\n */\r\n public Questionnaire load();\r\n}", "public interface IEmployerService {\n\n List<Employer> selectByRealName(String username);\n\n List<Employer> selectByMobile(String username);\n\n EmployerVO selectEmployerAndPermissions(String mobile);\n}", "@Dao\npublic interface UserEntityDao {\n @Query(\"select * FROM User\")\n List<UserEntity> getUserList();\n\n @Query(\"select * FROM User WHERE name = :name\")\n UserEntity getUserByName(String name);\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void addUser(UserEntity userEntity);\n\n @Delete()\n void deleteUser(UserEntity userEntity);\n\n @Update\n void update(UserEntity entity);\n}", "public interface IEmployeeRepository extends JpaRepository<Employee,Integer> {\r\n\tEmployee findById(int id);\r\n\r\n\t\r\n\t\r\n\r\n}", "public interface PhoneTextService {\n\n public TblPhoneText getPhoneService(Long id) throws DaoException;\n}", "public interface UserDao extends JpaRepository<UserInfo, Long> {\n UserInfo findByUserName(String userName);\n}", "public interface DataBasePresent {\n void setDistrict(List<Name_Id> list);\n\n void setLocalBodyType(List<Name_Id> list);\n\n void setLocalBodyName(List<LocalBody> list);\n\n List<Name_Id> getDistrict();\n\n List<Name_Id> getLocalBodyType();\n\n List<LocalBody> getLocalBodyName(String districId ,String locatType);\n}", "@Repository\npublic interface CountryDAO extends JpaRepository<Country, Integer> {\n\n /**\n * This method is used to get all countries.\n *\n * @return List\n * @see Country\n */\n @Query(\"select c from Country c order by c.name\")\n List<Country> getAllCountries();\n\n}", "public interface ImplementShoppingDao {\n\n\n public Shopping selectShoppingById(int id);\n\n /**\n * 通过板块plate查询Article\n *\n * @return Article对象集合\n */\npublic List<Shopping> selectShoppingAllshop();\n\n /**\n * 添加商品\n * @param shopping\n * @return\n */\n public boolean addShopping(Shopping shopping);\n}", "public interface BACSSettlementDataService extends BaseDataService<BACSSettlement, BACSSettlementDTO> {\r\n\r\n List<BACSSettlementDTO> findByStatus(String status);\r\n\r\n BACSSettlementDTO findBySettlementNumber(Long settlementNumber);\r\n \r\n BACSSettlementDTO findByFinancialServicesReference(Long financialServicesReferenceNumber); \r\n \r\n List<BACSSettlementDTO> findByOrderNumber(Long orderNumber);\r\n \r\n}", "public interface EmployerDao {\n\n void addEmployer(Employer employer);\n\n Employer findEmployer(int id);\n\n Employer findEmployer(String name);\n\n List<Employer> findAll();\n\n}", "public interface Dao <Entidade extends EntityBase, Chave extends Serializable> {\n\n /**\n * Obter um elemento atraves da chave primaria\n * @param chave\n * @return Entidade\n */\n Entidade obter(Chave chave);\n\n /**\n * Incluir um novo elemento na tabela\n * @param entidade\n */\n void incluir(Entidade entidade);\n\n /**\n * Alterar um elemento na tabela\n * @param entidade\n */\n void alterar(Entidade entidade);\n\n /**\n * Excluir um elemento na tabela\n * @param chave\n */\n void excluir(Chave chave);\n\n /**\n * Listar todos os elementos da tabela\n * @return List<Entidade>\n */\n List<Entidade> listarTodos();\n}", "public interface CProjectPurposeDAO extends JpaDao<CProjectPurpose> {\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByName\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByName(String name) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByName\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByName(String name, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByPrimaryKey\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeByPrimaryKey(Integer id) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByPrimaryKey\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeById\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeById(Integer id_1) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeById\n\t *\n\t */\n\tpublic CProjectPurpose findCProjectPurposeById(Integer id_1, int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findAllCProjectPurposes\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findAllCProjectPurposes() throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findAllCProjectPurposes\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findAllCProjectPurposes(int startResult, int maxRows) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByNameContaining\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByNameContaining(String name_1) throws DataAccessException;\n\n\t/**\n\t * JPQL Query - findCProjectPurposeByNameContaining\n\t *\n\t */\n\tpublic Set<CProjectPurpose> findCProjectPurposeByNameContaining(String name_1, int startResult, int maxRows) throws DataAccessException;\n\n}", "public interface IDbProvider {\n DaoSession getSession();\n\n List<Category> getCategoryList();\n\n List<Spending> getSpendingsList(Category category);\n\n void addCategory(Category category) throws CategoryNameExistsException;\n\n void addSpending(Spending spending);\n\n void editSpending(Spending item, float value, String title, Date dateGiven);\n\n void deleteSpending(Spending spending);\n\n float getSum(Date dateFrom, Date dateThrough);\n}", "public interface PdbDao {\n\n /**\n * List of company codes for the given ownership codes.\n *\n * @param ownCodes map of own codes with their segments.\n * @return list of OLBCompanyMigration objects.\n * @throws PopulateDataException is thrown.\n */\n List getCompanies(OwnCodes ownCodes) throws PopulateDataException;\n\n}", "public interface CartInfoDao {\n\n public CartInfoEntity getCartInfoByUserId(Map param);\n}", "public interface DbRepository<TEntity, TId> {\n\n DbClient getClient();\n String tableName();\n void create(TEntity entity);\n TEntity get(TId id);\n void save(TEntity entity);\n List<TEntity> find(String searchString);\n void remove(TEntity entity);\n List<TEntity> executeQuery(String query, Function<ResultSet, List<TEntity>> handler);\n int executeUpdate(String query);\n}", "public interface ITrackerDao\n{\n Tracker findById(int idTracker);\n List<Tracker> getAll();\n}", "public interface TipoDao {\r\n\r\n /**\r\n * Inserta un nuevo registro en la tabla Tipos.\r\n */\r\n public TipoPk insert(Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Actualiza un unico registro en la tabla Tipos.\r\n */\r\n public void update(TipoPk pk, Tipo dto) throws TipoDaoException;\r\n\r\n /**\r\n * Elimina un unico registro en la tabla Tipos.\r\n */\r\n public void delete(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un unico registro en la tabla Tipos que conicida con la\r\n * primary-key especificada.\r\n */\r\n public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el criterio\r\n * 'id_tipo = :idTipo'.\r\n */\r\n public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el\r\n * criterio 'nombre_tipo LIKE %:nombre%'.\r\n */\r\n public Tipo[] findByName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna un registro de la tabla Tipos que coincida con el\r\n * criterio 'nombre_tipo = :nombre'.\r\n */\r\n public Tipo findByFullName(String nombre) throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todas las filas de la tabla Tipos.\r\n */\r\n public Tipo[] findAll() throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con la\r\n * sentencia SQL especificada arbitrariamente\r\n */\r\n public Tipo[] findByDynamicSelect(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Retorna todos los registros de la tabla Tipos que coincidan con el WHERE\r\n * SQL especificado arbitrariamente\r\n */\r\n public Tipo[] findByDynamicWhere(String sql, Object[] sqlParams)\r\n throws TipoDaoException;\r\n\r\n /**\r\n * Sets the value of maxRows\r\n */\r\n public void setMaxRows(int maxRows);\r\n\r\n /**\r\n * Gets the value of maxRows\r\n */\r\n public int getMaxRows();\r\n\r\n /**\r\n * Retorna la conexión actual del usuario\r\n * \r\n * @return Connection\r\n */\r\n public Connection getUserConn();\r\n\r\n /**\r\n * Setea la conexión a usar con la BD\r\n * \r\n * @param userConn\r\n */\r\n public void setUserConn(Connection userConn);\r\n\r\n}", "@Persistent\npublic interface WarehouseOperatorDao extends CommonRepository<WarehouseOperatorEntity, String> {\n\n @Query(\"from WarehouseOperatorEntity wo where wo.creatorName=:name\")\n WarehouseOperatorEntity findByCreatorName(@Param(\"name\") String name);\n\n @Query(\"from WarehouseOperatorEntity wo where wo.warehouseId=:id\")\n WarehouseOperatorEntity findByOperatorId(@Param(\"id\") int id);\n\n @Query(\"select new map(w.id as id,w.name as name) from WarehouseEntity w , WarehouseOperatorEntity wo \" +\n \"where w.id=wo.warehouseId and wo.operatorId=:id\")\n List<Map<String,Object>> findWarehouseByUserId(@Param(\"id\") int id);\n}", "public interface TrackingRepositoryI {\n\n void saveLocation(String lat, String lng, Object object);\n void setmRestAdapter(Object object);\n int getIdFromEmployee();\n}", "public interface EpicsDataDao {\n\n /**\n * Delete all EPICS data for a run from the database.\n *\n * @param run the run number\n */\n public void deleteEpicsData(EpicsType epicsType, int run);\n\n /**\n * Get EPICS data by run.\n *\n * @param run the run number\n * @param epicsType the type of EPICS data (1s or 10s)\n * @return the EPICS data\n */\n List<EpicsData> getEpicsData(EpicsType epicsType, int run);\n\n /**\n * Insert a list of EPICS data into the database.\n * <p>\n * The run number comes from the header information.\n *\n * @param epicsDataList the list of EPICS data\n */\n void insertEpicsData(List<EpicsData> epicsDataList, int run);\n}", "public interface RepositoryLineMhc extends JpaRepository<LineMhc, Long> {\n\n\tpublic LineMhc findByOid( Long oid );\n\tpublic LineMhc findByName( String name );\n\n}", "public interface TScientificEntityDao {\n\n public Page<TScientificEntity> listRecordsByCondition(Page page);\n public List<TScientificEntity> getLists(Page.FilterModel condition);\n\n public String getNumber(int uer_id);\n\n}", "public interface CoffeeProcessorDbService {\n void loadData();\n}", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "public interface BusinessDao extends JpaRepository<Business, Long> {\r\n}", "public interface TransactionDAO\n{\n public void addTransaction(Transaction transaction);\n public Transaction findById(Integer id);\n public List<Transaction> getAll();\n}", "public interface GuruDao {\n public int findTotal();\n public int insertGuru(@Param(\"guru\") Guru guru);\n public int updateGuru(@Param(\"guru\") Guru guru);\n public Guru findGuru(@Param(\"context\") String context);\n public List<Guru> findByPage(@Param(\"start\") int start,@Param(\"rows\")int rows);\n}", "@Override\r\n\tpublic Object getQuestionear() throws DataAccessException,SQLException {\n\t\tlogger.info(\"start : getQuestionear UsersMngDaoImpl \");\r\n\t\tObject obj = questionRepository.findAll();\r\n\t\tlogger.info(\"End : getQuestionear UsersMngDaoImpl \");\r\n\t\treturn obj;\r\n\t}", "public interface ContactRepository extends JpaRepository<Contact, Integer> {\n\n public List<Contact> getByName(String name);\n\n public List<Contact> getByNumber(String number);\n\n public List<Contact> getByUserId(int id);\n}", "public interface StockDao {\n //包含仓库、入库、出库信息\n\n //添加仓库信息\n boolean addStock(Stock stock);\n //更新仓库信息\n boolean updateStock(Stock stock);\n //增加入库记录\n boolean addInnerStock(InnerStock innerStock);\n //查看入库记录\n List<InnerStock> listInnerStock();\n\n}", "public interface ITradingPriceTrackingAutoPricing {\r\n void savePriceTrackingAutoPricing(TradingPriceTrackingAutoPricing tradingPriceTrackingAutoPricing) throws Exception;\r\n\r\n TradingPriceTrackingAutoPricing selectPriceTrackingAutoPricingByListingDateId(Long listingDateId);\r\n\r\n List<PriceTrackingAutoPricingQuery> selectPriceTrackingAutoPricingList(Map map,Page page);\r\n\r\n void deletePriceTrackingAutoPricing(TradingPriceTrackingAutoPricing tradingPriceTrackingAutoPricing) throws Exception;\r\n\r\n TradingPriceTrackingAutoPricing selectPriceTrackingAutoPricingById(Long id);\r\n\r\n List<TradingPriceTrackingAutoPricing> selectPriceTrackingAutoPricings();\r\n}", "public interface IAcquestRepository {\n //createAcquest is used to create a new acquest in database\n boolean createAcquest(Acquest acquest);\n //getAcquest is used for getting selected acquest from database\n Acquest getAcquest(int Acquest_id);\n //getAllAcquests is used to get all acquests from database\n List<Acquest> getAllAcquests();\n}", "public interface BasicInformationDao {\n BasicInformation insert(BasicInformation item);\n\n List<BasicInformation> query(BasicInformation item);\n\n void update(BasicInformation item);\n\n void delete(BasicInformation item);\n\n List<BasicInformation> queryByBasic_ids(List<Integer> list);\n\n}", "@Dao\npublic interface NoteItemDao{\n @Query(\"select * from \" + DBTables.NoteItemTable.TABLE_NAME + \" order by \" + DBTables.NoteItemTable._ID + \" ASC\")\n List<NoteItem> queryAllNotes();\n\n @Insert\n void insertNote(NoteItem noteItem);\n\n @Delete\n void deleteNote(NoteItem noteItem);\n\n @Update\n void updateNote(NoteItem noteItem);\n}", "public interface PatientInfoService {\n\n /**\n * @Description:查询患者基本信息\n * @param: [patientInfoReq]\n * @return: java.util.List<cn.joinhealth.hospmedical.model.patientinfo.PatientInfo>\n */\n List<PatientInfo> selectByParams(PatientInfoReq patientInfoReq);\n}", "public interface IBadgeDao {\n /**\n * Get all\n * @return\n */\n List<BadgeEntity> get();\n\n /**\n * get by id\n * @param id\n * @return\n */\n BadgeEntity get(Integer id);\n\n /**\n * update + save\n * @param answerEntity\n * @return\n */\n BadgeEntity update(BadgeEntity answerEntity);\n boolean delete(int id);\n}", "@Repository\npublic interface ReturnMoneyMapper {\n\n void insertReturnMoney(ReturnMoneyEntity returnMoneyEntity);\n ReturnMoneyEntity getReturnMoneyById(String id);\n List<ReturnMoneyEntity> getReturnMoneyListByContractId(ReturnMoneyQuery returnMoneyQuery);\n\n}", "public interface IProvinciaDAO {\r\n\r\n\tpublic abstract Provincia findById(Integer id);\r\n\r\n\tpublic abstract Provincia save(Provincia p);\r\n\r\n\tpublic abstract List<Provincia> findByName(String name);\r\n\r\n}", "public interface LoggerJPA extends\n JpaRepository<LoggerEntity,Long>,\n JpaSpecificationExecutor<LoggerEntity>,\n Serializable {\n}", "@org.springframework.stereotype.Repository\npublic interface EntityRepository<R> {\n\n /* public R get(R entity);*/\n\n public List<R> getAll();\n\n public List<R> getAll(int limit);\n\n public List<R> getAll(Integer firstResult, Integer maxResults);\n\n public List<R> getByExample(final R example);\n\n public R getUniqueByExample(final R example);\n\n public void put(final R record) throws DuplicateKeyException;\n\n public void put(final Collection<R> records);\n\n public Entity getEntity(Entity entity);\n\n public Entity getEntityById(Entity entity);\n\n public Entity getEntityByName(Entity entity);\n\n public void insert(final R record);\n\n public void insertAll(final Collection<R> items);\n\n public void update(final R record);\n\n public void updateAll(final Collection<R> items);\n\n public void remove(final R entity);\n\n public Entity getByColumnName(String columnName, Object columnValue);\n\n public Collection<R> getByEntities(String columnName, Object columnValue);\n\n public void clear();\n\n public void refresh(final R entity);\n\n public Long size();\n}", "public interface DailyPatrolInspectionRepository {\n /**\n * 按项目判断是否有数据更新\n */\n boolean checkInspectionByApp(String id, String timeStamp, String projectId, String creaBy, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionListByApp(String id, String timeStamp, String projectId, String creaid, String type);\n\n /**\n * 查询所有日常巡检的整改单\n */\n List<Object[]> getInspectionList(Map map, WebPage webPage);\n\n /**\n * 导出所有日常巡检的整改单\n */\n List<Object[]> getexportExcelList(Map map);\n\n DailyPatrolInspectionEntity getInspectionEntityById(String id);\n\n /**\n * 根据appid存入\n */\n DailyPatrolInspectionEntity getInspectionEntityByAppId(String id);\n\n /**\n * 保存日常巡检的整改单\n */\n void saveInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存日常巡检的整改单\n */\n void updateInspection(DailyPatrolInspectionEntity dailyPatrolInspection);\n\n /**\n * 保存图片\n */\n void saveProjectImages(ProjectImagesEntity projectImages);\n\n\n /**\n * 删除不包含的图片\n */\n void deleteByNotIds(List<String> id);\n\n /**\n * 保存图片\n */\n List<ProjectImagesEntity> getProjectImages(String id);\n\n /**\n * 删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImages(String id, String type);\n\n /**\n * 保存抄送\n */\n void saveProjectCopy(ProjectCopyEntity projectCopy);\n\n /**\n * 删除抄送\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopy(String id, String type);\n\n /**\n * 保存抄送人员\n */\n void saveProjectCopyDetails(ProjectCopyDetailsEntity ProjectCopyDetails);\n\n /**\n * 删除抄送人员\n * id: 外键id\n * type:模块\n */\n void deleteProjectCopyDetails(String id);\n\n /**\n * 查询抄送人员\n * id: 外键id\n * type:模块\n */\n List<Object[]> getProjectCopy(String id);\n\n /**\n * 查询整改记录\n */\n\n List<DailyPatrolInspectionDetailsEntity> getDailyPatrolInspectionDetails(String id);\n\n /**\n * 按项目查询统计信息\n */\n List<Object[]> searchInspection(String projectId);\n\n\n /**\n * 查询日常巡检代办理事项\n */\n List<Object[]> getInspectionListByAppTodo(String id, String timeStamp, String creaid);\n\n\n /**\n * 查询日常巡检待办事项是否有新数据更心\n */\n boolean checkInspectionTodo(String id, String timeStamp, String creaBy);\n\n /**\n * 保存巡检详情\n *\n * @param dailyPatrolInspectionDetailsEntity\n */\n void saveInspectionDetais(DailyPatrolInspectionDetailsEntity dailyPatrolInspectionDetailsEntity);\n\n\n /**\n * 批量删除图片\n * *id: 外键id\n * type:模块\n */\n void deleteProjectImagesList(List id, String type);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计列表(后端)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionCount(Map map);\n\n int searchDailyPatrolInspectionCount(Map map);\n\n int getCount(Map map);\n\n /**\n * 统计项目\n */\n int getProjectCount(Map map);\n\n /**\n * 统计区域\n */\n int getOperatCount(Map map);\n\n /**\n * 查询日常巡检详情\n */\n Object[] getInspectionListByAdmin(String id);\n\n\n DailyPatrolInspectionEntity getDailyPatrolInspection(String id);\n\n /**\n * 日常巡检 按照当前登录人的员工id 查询整改中本人所负责人数据\n */\n int inspectionCount(String userId);\n\n\n List<DailyPatrolInspectionEntity> getDailyPatrolInspectionByInspectionId(String inspectionId);\n\n\n /**\n * 日常巡检统计(项目)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(区域)\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map, WebPage webPage);\n\n /**\n * 日常巡检统计(项目)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionProjecrCount(Map map);\n\n /**\n * 日常巡检统计(区域)去掉分页\n *\n * @param map\n * @return\n */\n List<Object[]> searchInspectionOperaCount(Map map);\n}", "public interface EntityService<E extends BaseEntity<ID>, ID extends Serializable> {\n\n /**\n * Find a copy of the entity by its identifier from the database.\n * @param identifier The object identifier\n * @return An instance of the entity\n * @throws ResourceNotFoundException In case of the resource has not been found\n */\n E find(final ID identifier) throws ResourceNotFoundException;\n\n /**\n * Persist an entity object in the database.\n * @param entity The entity object to save\n * @param context The authentication context from the request\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;\n\n /**\n * Update the provided entity in the database.\n * @param id The entity id\n * @param entity The entity to update\n * @param context The authentication context from the request\n * @throws PersistenceException Thrown if the given entity does not exist in the database\n */\n E update(ID id, E entity, RequestContext context);\n\n /**\n * Gets all the entities from the database.\n * @return A list of all the entities\n */\n List<E> findAll();\n\n /**\n * Retrieves all the entities from database, with pagination.\n * @param page The current page index\n * @param size The number of elements to put on the page\n * @return A list of all the entities of this page\n */\n List<E> findAll(int page, int size);\n\n /**\n * Retrieves all the entites from database, sorted according to the\n * sort object given in argument.\n * @param sort A sort object describing what and how to sort\n * @return A list of all the entites, sorted\n */\n List<E> findAll(Sort sort);\n\n /**\n * Retrieves all the entities with specified identifiers from the database.\n * @param identifiers A sequence of ID of entity objects to retrieve.\n * @return A list of all the entities\n */\n List<E> findAll(Iterable<ID> identifiers);\n\n /**\n * Returns the number of all entity objects.\n * @return The number of entities\n */\n long count();\n\n /**\n * Delete the given entity object.\n * @param entity The entity object to delete\n * @param context The authentication context from the request\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n void delete(E entity, RequestContext context)\n throws TechnicalException, ResourceNotFoundException;\n\n /**\n * Try to find an entity that conforms to the given Specification object.\n * @param spec The Specification object, representing the criteria\n * @return The found object, or null else\n */\n E findOne(Specification<E> spec);\n\n /**\n * Retrieves all the entities that conforms to the given Specification object.\n * @return A list of the found entities\n */\n List<E> findAll(Specification<E> spec);\n\n /**\n * Retrieves all the entities that conforms to the given Specification object,\n * sorted according to the Sort object.\n * @return A list of the found entities, sorted\n */\n List<E> findAll(Specification<E> spec, Sort sort);\n\n default <Pr> E findAnyBy(String propertyName, Pr candidateValue)\n throws ResourceNotFoundException {\n return findAllBy(propertyName, candidateValue).stream()\n .findAny()\n .orElseThrow(ResourceNotFoundException::new);\n }\n\n default <Pr> E findFirstBy(String propertyName, Pr candidateValue)\n throws ResourceNotFoundException {\n return findAllBy(propertyName, candidateValue).stream()\n .findFirst()\n .orElseThrow(ResourceNotFoundException::new);\n }\n\n /**\n * Finds all the entity for which the property described by the given accessor\n * have the candidate value.\n * @param propertyName A method reference to the entity property\n * @param candidateValue The candidate value\n * @param <Pr> The type of the property\n * @return A list of all the found entities\n */\n <Pr> List<E> findAllBy(String propertyName, Pr candidateValue);\n\n /**\n * Counts the entities that conforms to the given Specification object.\n * @return The number of found entities\n */\n long count(Specification<E> spec);\n\n\n /**\n * Delete the given entity object.\n * @param entity The entity object to delete\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n default void delete(E entity)\n throws TechnicalException, ResourceNotFoundException {\n delete(entity, null);\n }\n\n /**\n * Delete the given entity object.\n * @param id The id of the entity to delete\n * @throws TechnicalException A persistence error occured during the operation\n * @throws ResourceNotFoundException The entity was not found\n */\n default void delete(ID id)\n throws TechnicalException, ConflictException{\n delete(find(id));\n }\n\n /**\n * Persist an entity object in the database.\n * @param entity The entity object to save\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }\n\n /**\n * Persist a sequence of entity objects in the database.\n * @param entities The sequence of the entities\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default void create(Iterable<E> entities)\n throws TechnicalException, ConflictException {\n entities.forEach(this::create);\n }\n\n /**\n * Persist a sequence of entity objects in the database.\n * @param entities The sequence of the entities\n * @param context The authentication context from the request\n * @throws TechnicalException The entity could not be saved in the database\n * @throws ConflictException A similar copy of the entity already exists\n */\n default void create(Iterable<E> entities, RequestContext context)\n throws TechnicalException, ConflictException {\n entities.forEach(entity -> create(entity, context));\n }\n\n /**\n * Update the provided entity in the database.\n * @param id The entity id\n * @param entity The entity to update\n * @throws PersistenceException Thrown if the given entity does not exist in the database\n */\n default E update(ID id, E entity) {\n return update(id, entity, null);\n }\n\n}", "public interface IUserParserDao extends IBaseDao<UserParserRecord>{\n List<UserParserRecord> queryByFileNameAndUserSign(String fileName, String userSign);\n\n List<UserParserRecord> queryByUserSignAndStatus(String userName,Integer status);\n}", "public interface DataBase {\n public void save(BuzzTalkData data);\n\n public ArrayList<OpenCalaisTag> getAllTags();\n\n public ArrayList<Publication> getAllPublications();\n}", "@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}", "public interface GenericDAO<E, K extends Serializable> {\n\n /**\n * Create entity in persistent storage.\n *\n * @param entity\n * Entity to save into the storage\n */\n void create(E entity);\n\n /**\n * Read all the entities found in the storage.\n *\n * @return list of entities\n */\n List<E> read();\n\n /**\n * Read one entity by it's primary key.\n *\n * @param id\n * Primary key to find entity by\n * @return entity found in storage by given id\n */\n E read(K id);\n\n /**\n * Find entities similar to given sample.\n *\n * Result list include all and only the entities with same fields values as\n * non-null fields of the sample\n *\n * @param entitySample\n * Sample for searching for.\n * @return Found entities list.\n */\n List<E> findBySample(E entitySample);\n\n /**\n * Update the stored entity with the entity given.\n *\n * @param entiry\n * Entity with properties set to what should be saved\n * @return the same entity after merging with storage version\n */\n E update(E entiry);\n\n /**\n * Delete given entity from the storage.\n *\n * @param entity\n * Entity to delete\n */\n void delete(E entity);\n\n /**\n * Delete entity from storage by given id.\n *\n * @param id\n * Entity primary key.\n */\n void delete(K id);\n}", "public interface DB2PermataFavoriteService {\n\n public abstract List<PermataFavorite> getPermataFavorite(int data);\n public abstract List<PermataFavorite> getPermataFavoriteByGcn(String gcn);\n public abstract List<PermataFavorite> getPermataFavoriteduplicate(int data);\n public abstract PermataFavorite savePermataFavorite(PermataFavorite permataFavorite);\n public abstract List<PermataFavorite> getAllPermataFavorite();\n}", "public interface ProductDao {\n List<Product> getAllSecretProduct();\n}", "public interface DataProviderRepository<T> {\n\n /**\n * find all entities with limits and query params\n *\n * @param clazz Class to search\n * @param sortParam sort parameter\n * @param ascending ascending\n * @param first first row\n * @param count number of results\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @return list with results\n */\n List<T> findAllWithQuery(Class<T> clazz, String sortParam, boolean ascending, int first, int count, Serializable beanQuery, List<String> prefetch);\n\n /**\n * find by Id\n *\n * @param clazz entity class\n * @param id id of entity\n * @return entity\n */\n T findById(Class<T> clazz, Serializable id);\n\n /**\n * finds everything\n *\n * @param clazz entity class\n * @return list with all entities\n */\n List<T> findAll(Class<T> clazz);\n\n /**\n * find all entities with limits\n *\n * @param clazz entity class\n * @param first first row\n * @param count number of following rows\n * @return all entites limitated by first and count\n */\n List<T> findAll(Class<T> clazz, int first, int count);\n\n /**\n * Returns the number of rows\n *\n * @param clazz entity clas\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @return number of results\n */\n int getSize(Class<T> clazz, Serializable beanQuery);\n\n /**\n * Returns the number of rows\n *\n * @param clazz entity clas\n * @param beanQuery bean with criterias (use BeanQuery and BeanJoin annonation)\n * @param countQuery specific count query e.g. \"count(distinct e.name)\"\n * @return number of results\n */\n int getSize(Class<T> clazz, String countQuery, Serializable beanQuery);\n}", "@Dao\npublic interface PersistableItemDao {\n\n\n @Insert( onConflict = OnConflictStrategy.FAIL)\n Long insertEntity(PersistableItem entity);\n\n @Update\n void updateEntity(PersistableItem entity);\n\n @Delete\n void deleteEntity(PersistableItem entity);\n\n @Query(\"delete from persistableItem\")\n void deleteAllItems();\n\n @Query(\"Select * from persistableItem\")\n List<PersistableItem> getAllItems();\n\n @Query(\"Select * from persistableItem WHERE itemId = :itemId \"+\n \"AND itemColor = :itemColor \" +\"AND itemSize = :itemSize\")\n PersistableItem getItemByItemIdColorAndSize(String itemId,String itemColor,String itemSize);\n\n }", "public interface UserDao {\n\n List<User> select(User user);\n\n List<User> selectAll();\n}", "public interface NameDAO {\n /**\n * Retrieves all names from the Name table given idPerson and for Parent.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Object[] findDistinctNameByIdPersonAndRelPA(int idPerson);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n * This method is used for updating the CSUP_PERSON_OUTBOUND table\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findDistinctNameByIdPerson(int idPerson);\n \n /**\n * This selects a row from Name where indNamePrimary = 'Y'\n *\n * @param idPerson\n * @return\n */\n Name findNameByPersonPrimary(int idPerson);\n\n /**\n * Gets dtNameEndDate field given idName.\n * <p/>\n *\n * @param idName\n * @return\n */\n Date findNameDtNameEndDateByIdName(int idName);\n\n /**\n * Retrieves the rows from Name and PhoneticName tables for the given idPerson and for indNamePrimary = 'Y' and\n * cdPhkNameType = 'NA'\n *\n * @param idPerson\n * @return List of objects/rows\n */\n @SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);\n\n /**\n * Retrieves all aliases for a specified stage ID, considering closure and end dating.\n * <p/>\n *\n * @param idStage\n * @return keys idPerson, nmNameFirst, nmNameMiddle, nmNameLast, cdNameSuffix, dtNameEndDate, dtNameStartDate, idName,\n * indNameInvalid, indNamePrimary, dtLastUpdate\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdStage(int idStage);\n\n /**\n * Gets name fields given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n Name findNameByIdPersonDtSysTsQuery(int idPerson, Date dtSysTsQuery);\n\n /**\n * This gets list of Person ID for the given first, middle and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n * @param first\n * @param middle\n * @param last\n * @param indSealed\n * @return List of Person ID\n */\n List<Integer> findPrimaryIdPersonsByFirstLastMiddle(String first, String last, String middle, String indSealed);\n \n /**\n * This gets list of Person ID for the given first and last names and filters\n * out the Adopted Person if the Sealed Indicator attribute of the user is N \n *\n * @param first\n * @param last\n * @return List of Person ID\n */\n @SuppressWarnings({\"unchecked\"})\n List<Integer> findPrimaryIdPersonsByFirstLast(String first, String last, String indSealed);\n \n /**\n * Counts the number of Name ID for the given ID Person and dtSysTsQuery.\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"}) \n long countNameIdName(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieve Name information given idPerson and maxDate.\n * <p/>\n *\n * @param idPerson\n * @param maxDate\n * @return Name\n */\n Name findNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n /**\n * This gets a count of idName based on idPerson and maxDate.\n *\n * @param idPerson\n * @param maxDate\n * @return Integer\n */\n long countIdNameByIdPersonAndMaxDate(int idPerson, Date maxDate);\n\n long countNameIdNameByNmFull(String first, String mid, String last);\n\n /**\n * Retrieves valid names from the Name table given idPerson and dtSysTsQuery.\n * <p/>\n *\n * @param idPerson\n * @param dtSysTsQuery\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPersonAndDtNameStartDate(int idPerson, Date dtSysTsQuery);\n\n /**\n * Retrieves all names from the Name table given idPerson.\n * <p/>\n *\n * @param idPerson\n * @return\n */\n @SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param indNamePrimary\n * @param cdNameSuffix\n * @param dtDtNameStartDate\n * @return\n */\n int insertName(int idPerson, String indNameInvalid, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String indNamePrimary, String cdNameSuffix, Date dtDtNameStartDate);\n\n /**\n * Updates Name table\n *\n * @param idName\n * @param dtDtNameEndDate\n * @param tsLastUpdate\n * @return\n */\n \n int updateName(int idName, Date dtDtNameEndDate, Date tsLastUpdate);\n\n /**\n * Updates table Name field nmNameLast given idName and idPerson\n * <p/>\n *\n * @param nmNameLast\n * @param idName\n * @param idPerson\n */\n \n \n int updateNameNmNameLast(String nmNameLast, int idName, int idPerson);\n\n /**\n * Inserts into Name table\n *\n * @param nmNameLast\n * @param idPerson\n * @return\n */\n int insertName(String nmNameLast, int idPerson);\n\n /**\n * Insert a row into the Name table.The primary key used is SEQ_NAME.\n *\n * @param idPerson\n * @param nmNameFirst\n * @param nmNameMiddle\n * @param nmNameLast\n * @param cdNameSuffix\n * @param indNamePrimary\n * @param indNameInvalid\n * @param dtNameStartDate\n * @param dtNameEndDate\n * @return\n */\n int insertName(int idPerson, String nmNameFirst, String nmNameMiddle, String nmNameLast,\n String cdNameSuffix, String indNamePrimary, String indNameInvalid,\n Date dtNameStartDate, Date dtNameEndDate\n );\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param dtNameEndDate\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, Date dtNameEndDate, int idName, int idPerson, String indNameInvalid,\n String indNamePrimary, String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial insert of Name table using the supplied parameters(column values). (Note that the insert is done using\n * straight SQL)\n *\n * @param cdNameSuffix\n * @param idName\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @return int The number of entities effected by the 'insert' operation.\n */\n int insertName(String cdNameSuffix, int idName, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateNameIncludingDtNameEndDate(String cdNameSuffix, int idPerson, String indNameInvalid,\n String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName,\n Date lastUpdate);\n\n /**\n * Partial update of Name table using the supplied parameters(column values).\n *\n * @param cdNameSuffix\n * @param idPerson\n * @param indNameInvalid\n * @param indNamePrimary\n * @param nmNameFirst\n * @param nmNameLast\n * @param nmNameMiddle\n * @param idName\n * @param lastUpdate\n * @return int The number of entities effected by the 'update' operation.\n */\n int updateName(String cdNameSuffix, int idPerson, String indNameInvalid, String indNamePrimary,\n String nmNameFirst, String nmNameLast, String nmNameMiddle, int idName, Date lastUpdate);\n\n /**\n * Delete {@link gov.georgia.dhr.dfcs.sacwis.db.Name} objects.\n *\n * @param idName\n * @param dtLastUpdate\n * @return The number of rows deleted.\n */\n int deleteName(int idName, Date dtLastUpdate);\n /**\n * This gets a count of idName.\n *\n * @param idPerson\n * @return\n */\n long countNameIdNameByIdPerson(int idPerson);\n \n /**\n * Inserts or updates a Name record\n * @param name\n * @return\n */\n int saveOrUpdateName(Name name) ;\n}", "public interface MysqldataQueryDao {\n public List<Map<String, Object>> Querydata(String sql);\n public List<Map<String, Object>> Querymaindata(String sql);\n\n}", "@Dao\npublic interface CompanyDAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n public void insert(Company company);\n\n @Update\n public int update(Company company);\n\n @Delete\n public int delete(Company company);\n\n //@Query(\"SELECT * FROM business\")\n //public List<Company> loadAllBusiness();\n\n @Query(\"SELECT name FROM business\")\n public LiveData<List<String>> loadAllBusiness();\n}", "public interface StudentDao {\n List<Student> findStudents();\n}", "public interface DataService extends Serializable {\n\n Collection<Application> getAllApplications();\n void saveApplication(Application a);\n void deleteApplication(long applicationId);\n Application getApplicationById(long applicationId);\n \n Collection<Domain> getAllDomains();\n void saveDomain(Domain r);\n void deleteDomain(long domainId);\n Domain getDomainById(long domainId);\n\n Collection<CodeType> getAllCodeTypes();\n void saveCodeType(CodeType ct);\n void deleteCodeType(long codeTypeId);\n CodeType getCodeTypeById(long codeTypeId);\n\n\n Collection<CodeValue> getAllCodeValues(CodeType codeType);\n void saveCodeValue(CodeValue codeValue);\n void deleteCodeValue(long type,long value);\n CodeValue getCodeValue(long type, long value);\n\n Collection<TextData> getAllTexts();\n void saveText(TextData textData);\n void deleteText(long id);\n TextData getTextById(long id);\n\n Collection<CodeText> getAllCodeTexts();\n void saveCodeText(CodeText codeText);\n void deleteCodeText(long type, long value);\n CodeText getCodeTextByIds(long type, long value);\n\n\n static DataService get() {\n return RestDataService.getInstance();\n }\n\n}", "public interface DataDao {\r\n\t/*\r\n\t * Get the latest data of a specific device despite of sensor data type.\r\n\t */\r\n\tpublic DataValue getLastDataByDeviceIdSortedByTimestamp(String deviceId) throws Exception;\r\n\t/*\r\n\t * Get the latest data of a specific device and a sensor data type.\r\n\t */\r\n\tpublic DataValue getLastDataByDeviceIdAndSensorTypeSortedByTimestamp(SensorValue sensorVal) throws Exception;\r\n\t/*\r\n\t * Get the data information list from database that is between a specific time interval.\r\n\t */\r\n\tpublic List<DataValue> getDataListByDeviceIdAndSensorTypeAndDateSortedByTimestamp(DataValue dataVal) throws Exception;\r\n\t/*\r\n\t * Insert new sensor data into database.\r\n\t */\r\n\tpublic int insertSensorData(DataValue dataVal) throws Exception;\r\n\t/*\r\n\t * Get the greatest data value of a specific sensor type.\r\n\t */\r\n\tpublic DataValue getGreatestDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;\r\n\t/*\r\n\t * Get the least data value of a specific sensor type.\r\n\t */\r\n\tpublic DataValue getLeastDataByDeviceIdAndSensorType(SensorValue sensorVal) throws Exception;\r\n}", "protected abstract Serializable getEntity();", "abstract E getEntityManager();", "public interface UserDataHelper {\n\n // 格式:\"username\", \"password\", \"name\", \"gender\", \"phone\", \"member_type\", \"level\", \"birthday\", \"enterprise\"\n\n\n /**\n * 在user表中插入一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage insertToSQL(ArrayList<Object> userInfo);\n\n /**\n * 在user表中删除一条用户信息\n * @param username\n * @return\n */\n public ResultMessage deleteFromSQL(String username);\n\n /**\n * 在user表中更新一条用户信息\n * @param userInfo\n * @return\n */\n public ResultMessage updateFromSQL(ArrayList<Object> userInfo);\n\n /**\n * 查找user表中的所有用户信息\n * @return\n */\n public ArrayList<ArrayList<Object>> findFromSQL();\n\n /**\n * 根据用户名在user表中查找一条用户信息\n * @param username\n * @return\n */\n public ArrayList<Object> findByIDFromSQL(String username);\n\n\n}", "public interface ResourceDAO {\n //通过资源信息获取id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \")\n public List<Long> findIdByResourceInfo(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId) ;\n\n //通过资源信息和可用性获取可用id\n @Select(\" SELECT r.resourceId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceURL = #{resourceURL} \" +\n \" AND r.resourceMethodType = #{resourceMethodType} \" +\n \" AND r.systemId = #{systemId} \" +\n \" AND r.state = #{state} \")\n public List<Long> findIdByResourceInfoAndState(@Param(\"resourceURL\") String resourceURL,\n @Param(\"resourceMethodType\") int resourceMethodType,\n @Param(\"systemId\") int systemId,\n @Param(\"state\") int state) ;\n\n //通过ids获取资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取可用的资源记录\n @Select({\"<script>\" ,\n \" SELECT * \",\n \" FROM btl_resource r \",\n \" WHERE r.state = #{state} \",\n \" AND r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findByIdsAndState(@Param(\"ids\") List<Long> ids , @Param(\"state\") int state) ;\n\n //通过ids获取资源信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceInfosByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源名称\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.resourceName \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithResourceNameByIds(@Param(\"ids\") List<Long> ids) ;\n\n //通过ids获取资源可用信息\n @Select({\"<script>\" ,\n \" SELECT r.resourceId , r.state \",\n \" FROM btl_resource r \",\n \" WHERE r.resourceId IN \",\n \"<foreach item='id' index='index' collection='ids' open='(' separator=',' close=')'>\",\n \"#{id}\",\n \"</foreach>\",\n \"</script>\"})\n public List<ResourceRecord> findIdsWithStateByIds(@Param(\"ids\") List<Long> ids) ;\n\n\n //获取所有处于某种状态下的资源信息\n @Select(\" SELECT r.resourceId , r.resourceURL , r.resourceMethodType , r.systemId \" +\n \" FROM btl_resource r \" +\n \" WHERE r.state = #{state} \")\n public List<ResourceRecord> findIdsWithResourceInfoByState(@Param(\"state\") int state) ;\n\n //通过名字获取资源记录(分页)\n @Select(\" SELECT * \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \" +\n \" LIMIT ${skip},${size} \")\n public List<ResourceRecord> findByNameInPage(@Param(\"name\") String name,\n @Param(\"skip\") int skip,\n @Param(\"size\") int size);\n //通过名字获取资源数\n @Select(\" SELECT count(1) \" +\n \" FROM btl_resource r \" +\n \" WHERE r.resourceName LIKE CONCAT('%' , #{name} , '%') \")\n long getCountByName(@Param(\"name\") String name);\n\n\n //获取资源树信息\n @Select(\"SELECT r.resourceId , r.resourceName , r.parentId , r.state FROM btl_resource r\")\n public List<ResourceRecord> findAllRoleIdsWithRoleNameAndParentIdAndState() ;\n\n //添加资源\n @Insert(\" INSERT IGNORE INTO btl_resource(createTime , resourceCode , resourceName , resourceURL , resourceMethodType , systemId , state , parentId , resourceMemo) \" +\n \" VALUES(now() , #{re.resourceCode} , #{re.resourceName} , #{re.resourceURL} , #{re.resourceMethodType} , #{re.systemId} , #{re.state} , #{re.parentId} , #{re.resourceMemo}) \")\n public int insertResource(@Param(\"re\") ResourceRecord re);\n\n //删除资源\n @Delete(\"DELETE FROM btl_resource WHERE resourceId=#{resourceId}\")\n public int deleteById(@Param(\"resourceId\") long resourceId);\n\n //更新资源\n @Update(\"UPDATE btl_resource SET \" +\n \" resourceCode = #{re.resourceCode} , \" +\n \" resourceName = #{re.resourceName} , \" +\n \" resourceURL = #{re.resourceURL} , \" +\n \" resourceMethodType = #{re.resourceMethodType} , \" +\n \" systemId = #{re.systemId} , \" +\n \" state = #{re.state} , \" +\n \" parentId = #{re.parentId} , \" +\n \" resourceMemo = #{re.resourceMemo} \" +\n \" WHERE resourceId = #{re.resourceId}\")\n public int updateResource(@Param(\"re\") ResourceRecord re);\n\n}", "@Dao\npublic interface FSalesmanDao {\n /**\n * @param fSalesman\n * Harus Menggunakan\n * .allowMainThreadQueries() pada Configurasi database utama agar tidak perlu menggunakan AsynT\n */\n @Insert\n void insert(FSalesman fSalesman);\n @Update\n void update(FSalesman fSalesman);\n @Delete\n void delete(FSalesman fSalesman);\n\n\n @Query(\"DELETE FROM fSalesman\")\n void deleteAllFSalesman();\n\n @Query(\"SELECT * FROM fSalesman \")\n LiveData<List<FSalesman>> getAllFSalesmanLive();\n\n @Query(\"SELECT * FROM fSalesman \")\n List<FSalesman> getAllFSalesman();\n\n\n @Query(\"SELECT * FROM fSalesman WHERE id = :id \")\n List<FSalesman> getAllById(int id);\n\n @Query(\"SELECT * FROM fSalesman WHERE fdivisionBean = :id \")\n List<FSalesman> getAllByDivision(int id);\n\n}", "public interface GeneralDao<E, K> {\n\n List<E> getAll();\n\n E addEntity(E entity);\n\n boolean deleteEntity(E entity);\n\n E updateEntity(E entity);\n\n E getEntityById(K id);\n\n}", "public interface ProgramaTVDAO {\n\t/**\n\t * Crea una nueva monitorización\n\t * @param titulo Título del programa\n\t * @param episodeCode Código del Episodio (ej. T01E03)\n\t * @param fechaInicio Fecha y hora de Inicio\n\t * @param fechaFin Fecha y hora de Fin\n\t * @param hashtag Hashtag que se monitorizará\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV crearMonitorizacion(String titulo, String episodeCode, Date fechaInicio, Date fechaFin, String hashtag);\n\n\t/**\n\t * Monitorización por clave primaria\n\t * @param primaryKey Clave primaria\n\t * @return Objeto ProgramaTV\n\t */\n\tpublic ProgramaTV programaPorId(Long primaryKey);\n\t\n\t/**\n\t * Todas las monitorizaciones que llevan el mismo hashtag\n\t * @param hashtag Hashtag\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> ProgramasPorHashtag(String hashtag);\n\t\n\t/**\n\t * Lista de monitorizaciones del mismo programa\n\t * @param titulo Título del programa\n\t * @return Lista de objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> programasPorTitulo(String titulo);\n\t\n\t /**\n\t * Todas las monitorizaciones\n\t * @return Lists de todos los objetos ProgramaTV\n\t */\n\tpublic List<ProgramaTV> todosLosProgramas();\n\t\n\t/**\n\t * Top 5 programas más vistos\n\t * @return Array ordenado de los 5 programas más vistos\n\t */\n\tpublic ProgramaTV[] programasTop5();\n\n\t/**\n\t * Actualiza monitorizacion\n\t * @param prog Objeto ProgramaTV\n\t */\n\tpublic void updateProgramaTV(ProgramaTV prog);\n\n\n\t/**\n\t * Borra una monitorización\n\t * @param prog Clave primaria de la monitorización\n\t */\n\tpublic void deleteProgramaTV(Long prog);\n\t\n\t/**\n\t * Borra todos los programas\n\t */\n\tpublic void deleteAll();\n\t\n\n\t\n\n\t}", "List<T> getAll() throws PersistException;", "public interface UserInfoRepostory extends JpaRepository<UserInfo, String> {\n\n\tUserInfo findByOpenid(String openid);\n}", "public interface FormularRepository extends JpaRepository<Formular, Long>\n{\n Formular findById(Long id);\n Formular findByDate(Date dataDonare);\n}", "public interface TenderDao {\n\n public void persist(Tender tender);\n\n public void update(Tender tender);\n\n public Tender findById(int id);\n\n public List<Tender> findByProposal(Tender tender);\n\n public List<Tender> findByStatus(TenderStatus tenderStatus);\n\n public List<Tender> findAll();\n\n public void delete(Tender tender);\n}", "@Dao\npublic interface CarDao {\n\n @Query(\"SELECT * FROM car\")\n List<Car> getAll();\n\n @Insert\n void insertAll(Car... cars);\n\n @Delete\n void delete(Car car);\n\n @Update\n void update(Car... cars);\n\n @Query(\"SELECT * FROM car WHERE chassisCode = :chassisCode\")\n Car findByChassisCode(String chassisCode);\n}", "public interface StockDAO {\n public int getAmountAvailable(String stockName); //Retrieves amount of stock available from stock_initial table\n public List<StockItem> getStockList(); //Retrieves list of stocks for initial wallet values\n}", "public interface Dao<T> {\n\n\n T load(Serializable id);\n\n T get(Serializable id);\n\n\n\n void persist(T entity);\n\n void save(T entity);\n void update(T entity);\n /**\n * 查询所有实体数据\n * @return\n */\n List<T> findAll();\n\n /**\n * 求所有数量\n * @return\n */\n int count();\n\n /**\n * 通过HQL查询\n * @param hql hql语句\n * @param params 参数\n * @return\n */\n List<T> findByHql(String hql, Object... params);\n\n /**\n * 通过HQL语句查询,带分页\n * @param hql HQL语句\n * @param pageNo 页号,从1起\n * @param pageSize 页大小\n * @param params 参数\n * @return\n */\n List<T> findByHqlPage(String hql, int pageNo, int pageSize, Object... params) ;\n\n /**\n * 通过Like查询实体\n * @param example 条件\n * @return\n */\n List<T> findByExampleLike(T example);\n List<T> findByExampleLike(T example, String order);\n List<T> findByExampleLike(T example, MatchMode matchMode);\n List<T> findByExampleLike(T example, int pageNo, int pageSize);\n List<T> findByExampleLike(T example, int pageNo, int pageSize, String order);\n\n long countByExampleLike(T example);\n\n List<T> findByExampleEq(T example);\n List<T> findByExampleEq(T example, String order);\n List<T> findByExampleEq(T example, MatchMode matchMode);\n List<T> findByExampleEq(T example, int pageNo, int pageSize);\n List<T> findByExampleEq(T example, int pageNo, int pageSize, String order);\n\n long countByExampleEq(T example);\n\n\n\n\n List<T> findByExampleNeProperty(T example, int pageNo, int pageSize, Map<String, Object> neqProperty, Order order);\n\n List<T> findByExampleNeProperty(T example, int pageNo, int pageSize, Map<String, Object> neqProperty);\n\n long countByExampleNeProperty(T example, Map<String, Object> neqProperty);\n\n List<T> findByExampleLike(T example, int pageNo, int pageSize, Order order);\n\n\n\n void delete(Serializable id);\n\n boolean has(T example);\n\n void flush();\n int execUpdateSQL(String sql);\n}", "public interface OrderDetailService {\n OrderDetail selectOrderDetailById(Long id);\n List<OrderDetail> selectOrderDetailListByIdList(List<Long> idList);\n int insert(OrderDetail entity);\n int update(OrderDetail entity);\n}", "public interface Crud<T> {\n\n /**\n * Persists an object in the database\n *\n * @param object an object to be persisted\n * @return persisted object\n * @throws SQLException create failed\n */\n public T create(T object) throws SQLException;\n\n /**\n * Removed an object identified by its ID from database\n *\n * @param objectId ID of the object to be removed\n * @throws SQLException remove failed\n */\n public void remove(int objectId) throws SQLException;\n\n /**\n * Updates given object in the database\n *\n * @param object object to be updated\n * @throws SQLException update failed\n */\n public void update(T object) throws SQLException;\n\n /**\n * Returns a persisted object identified by its ID\n *\n * @param objectId ID of the object to be returned\n * @return object identified by its ID\n * @throws SQLException get failed\n */\n public T get(int objectId) throws SQLException;\n\n /**\n * Returns a list of persisted objects from database\n *\n * @return list of objects\n * @throws SQLException enumerate failed\n */\n public List<T> enumerate() throws SQLException;\n}", "public interface SubGeneroDAO {\n /**\n * Método que permite guardar un subgénero.\n * @param subGenero {@link SubGenero} objeto a guardar.\n */\n void guardar(SubGenero subGenero);\n\n /**\n * Método que permite actualizar un subgénero.\n * @param subGenero {@link SubGenero} objeto a actualizar.\n */\n void actualizar(SubGenero subGenero);\n\n /**\n * Método que permite eliminar un subgénero por su identificador.\n * @param id {@link Long} identificador del subgénero a eliminar.\n */\n void eliminiar(Long id);\n\n /**\n * Método que permite consultar la lista de subgéneros.\n * @return {@link List} lista de subgéneros consultados.\n */\n List<SubGenero> consultar();\n\n /**\n * Método que permite consultar un SubGenero a partir de su identificador.\n * @param id {@link Long} identificador del subgénero a consultar.\n * @return {@link SubGenero} un objeto subgénero consultado.\n */\n SubGenero consultarById(Long id);\n\n\n}" ]
[ "0.6665456", "0.6452626", "0.6440311", "0.63725066", "0.63365597", "0.6328946", "0.63196343", "0.62265027", "0.6224712", "0.62191963", "0.6170657", "0.6164879", "0.61644113", "0.61607134", "0.61599874", "0.6151091", "0.6136217", "0.6131767", "0.6087035", "0.6076061", "0.60573965", "0.60572225", "0.604816", "0.6037778", "0.603655", "0.6035247", "0.6034511", "0.6033011", "0.6024212", "0.60211533", "0.60210973", "0.60135597", "0.6012174", "0.600634", "0.60010135", "0.60007596", "0.6000008", "0.5999278", "0.59902143", "0.59892243", "0.5985136", "0.59789675", "0.5974879", "0.5974399", "0.59738654", "0.5973143", "0.597062", "0.59681535", "0.5967811", "0.5964796", "0.5956654", "0.5951718", "0.59501636", "0.5948037", "0.59451926", "0.59435046", "0.59407675", "0.5938188", "0.5937537", "0.5936799", "0.59337354", "0.5933349", "0.5932516", "0.59303343", "0.5927855", "0.5926726", "0.5926198", "0.59260595", "0.59175044", "0.5913932", "0.5912773", "0.5912745", "0.59123623", "0.59116185", "0.5911543", "0.5910421", "0.590535", "0.5904315", "0.5902229", "0.58982724", "0.58964336", "0.58945596", "0.58933014", "0.5890534", "0.58898383", "0.5888304", "0.58859783", "0.58851844", "0.58836514", "0.5881734", "0.58800673", "0.5879445", "0.5878865", "0.5877845", "0.58762956", "0.5876107", "0.58750784", "0.5874267", "0.58727354", "0.5872523", "0.5870645" ]
0.0
-1
This method finds specific coupon by using the company id and the title of coupon.
Coupon findByCompanyIdAndTitle(int companyId, String title);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Coupon> findByCompanyId(int companyId);", "List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);", "@WebMethod public boolean findCoupon(String coupon);", "public Coupon addCoupon(Coupon coupon) throws CompanyDoesntExistException, CouponTitleAlreadyExistInThisCompanyException {\n Company comp = companyRepo.findById(this.companyID).get();\n if (comp == null) {\n //throw Exception\n throw new CompanyDoesntExistException(\"company doesn't exist!\");\n } else {\n coupon.setCompanyID(this.companyID); //if this company tries to add coupon to another company\n for (Coupon coup : comp.getCoupons()) {\n if (coup.getTitle().equals(coupon.getTitle())) {\n //throw Exception\n throw new CouponTitleAlreadyExistInThisCompanyException(\"coupon title is already exist!\");\n }\n }\n comp.getCoupons().add(coupon);\n companyRepo.save(comp);\n return coupon;\n }\n }", "@WebMethod public Coupon getCoupon(String coupon);", "List<Coupon> findByTitleContaining(String searchWord);", "public Coupon getCoupon(int id) throws DbException;", "public Company findCompany(long id);", "List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);", "Company getCompany(int id);", "@Override\n\tpublic boolean couponTitleExists(Coupon coupon) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\tboolean exists = false;\n\t\ttry {\n\t\t\t// Checking if Coupon title already exists in DB\n\t\t\tString titleExists = \"SELECT * FROM Coupon where Title = ?\";\n\t\t\tPreparedStatement pstmt1 = con.prepareStatement(titleExists);\n\t\t\tpstmt1 = con.prepareStatement(titleExists);\n\t\t\tpstmt1.setString(1, coupon.getTitle());\n\t\t\tResultSet result = pstmt1.executeQuery();\n\t\t\tif (result.next()) {\n\t\t\t\tSystem.out.println(\"Coupon title already exists in Database, please choose another one.\");\n\t\t\t\texists = true;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon writing into database\n\t\t\tthrow new CouponSystemException(\"SQL error - Company creation has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t\treturn exists;\n\t}", "@Override\n\t/** Accepts Coupon ID and returns related Coupon object */\n\tpublic Coupon getCoupon(int id) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Creating Coupon object to fill it later with data from SQL query\n\t\t// result and for method to return it afterwards\n\t\tCoupon coupon = new Coupon();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupon via prepared statement\n\t\t\tString getCouponSQL = \"select * from coupon where id = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponSQL);\n\t\t\t// Putting method accepted ID into SQL string\n\t\t\tpstmt.setInt(1, id);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// If query result has data (if Coupon has been found) do\n\t\t\tif (resCoup.next()) {\n\t\t\t\t// Set Coupon object ID to ID variable that method received\n\t\t\t\tcoupon.setId(id);\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// // Write retrieval success confirmation to the console\n\t\t\t\t// System.out.println(\"Coupon has been found successfully:\" +\n\t\t\t\t// coupon);\n\t\t\t} else {\n\t\t\t\t// If query result is empty (Coupon hasn't been found) throw\n\t\t\t\t// exception\n\t\t\t\tSystem.out.println(\"Coupon retrieve has been failed - Coupon ID not found\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return Coupon\n\t\treturn coupon;\n\t}", "public Coupon getCouponByID(int couponId) throws Exception {\n\n\t\treturn couponsDBDAO.getOneCoupon(couponId);\n\n\t}", "public CouponEntity getCouponByName(String couponName) {\n try {\n return entityManager\n .createNamedQuery(\"couponByName\", CouponEntity.class)\n .setParameter(\"couponName\", couponName)\n .getSingleResult();\n } catch (NoResultException nre) {\n return null;\n }\n }", "java.lang.String getCouponId();", "@Override\n\tpublic void createCoupon(Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, ParseException, DuplicateNameException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tboolean flag = true;\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_TITLES);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (coupon.getTitle().equals(resultSet.getString(1))) {\n\t\t\t\tflag = false;\n\t\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\t\tthrow new DuplicateNameException(\"Coupon title \" + coupon.getTitle() + \" is already exists\");\n\t\t\t}\n\t\t}\n\t\tif (flag) {\n\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.ADD_NEW_COUPON_TO_DB);\n\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\tstatement.setDate(2, StringDateConvertor.convert(coupon.getStartDate().toString()));\n\t\t\tstatement.setDate(3, StringDateConvertor.convert(coupon.getEndDate().toString()));\n\t\t\tstatement.setInt(4, coupon.getAmount());\n\t\t\tstatement.setString(5, coupon.getType().toString());\n\t\t\tstatement.setString(6, coupon.getMessage());\n\t\t\tstatement.setDouble(7, coupon.getPrice());\n\t\t\tstatement.setString(8, coupon.getImage());\n\t\t\tstatement.executeUpdate();\n\n\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_ID_BY_TITLE);\n\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\tResultSet thisCouponId = statement.executeQuery();\n\t\t\twhile (thisCouponId.next()) {\n\t\t\t\tthis.setCoupId(thisCouponId.getLong(1));\n\t\t\t}\n\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\tSystem.out.println(\"Coupon added successfull\");\n\t\t}\n\n\t}", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Coupon getCoupon(long id) {\n\t\treturn Validations.verifyNotNull(couponRepository.findOne(id));\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Override\n\tpublic void removeCoupon(Coupon coupon) throws ClassNotFoundException, SQLException, NotExistException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_TITLES);\n\t\tResultSet resultSet = statement.executeQuery();\n\n\t\tif (!resultSet.first()) {\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\tthrow new NotExistException(\"Coupon title \" + coupon.getTitle() + \" is not exist\");\n\t\t}\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.REMOVE_COUPON_BY_ID);\n\t\tstatement.setLong(1, coupon.getId());\n\t\tstatement.executeUpdate();\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.REMOVE_COUPON_FROM_COMPANY_COUPON_BY_COUPON_ID);\n\t\tstatement.setLong(1, coupon.getId());\n\t\tstatement.executeUpdate();\n\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t}", "List<Coupon> findByCategory(Category category);", "public CouponEntity getCouponByCouponId(String couponUuid) {\n try {\n CouponEntity couponEntity = entityManager.createNamedQuery(\"getCouponByCouponId\",CouponEntity.class).setParameter(\"uuid\",couponUuid).getSingleResult();\n return couponEntity;\n }catch (NoResultException nre){\n return null;\n }\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\n\tpublic CustomCouponDetail getCouponDetail(Long couponId) {\n\t\treturn null;\n\t}", "List<Coupon> findAllByCategory(Category category);", "public abstract Company get(int id);", "Optional<Company> getCompany(long id);", "java.lang.String getCouponName();", "java.lang.String getCouponName();", "java.lang.String getCouponName();", "public boolean checkIfExist(Coupon coupon) throws DbException;", "@Override\r\n\tpublic Company getOneCompanyById(int compId) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"select * from companies where companyId=\" + compId;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tCompany comp = new Company();\r\n\t\t\t\tcomp.setCompId(compId);\r\n\t\t\t\tcomp.setCompName(rs.getString(\"companyName\"));\r\n\t\t\t\tcomp.setCompEmail(rs.getString(\"companyEmail\"));\r\n\t\t\t\tcomp.setCompPass(rs.getString(\"companyPass\"));\r\n\r\n\t\t\t\treturn comp;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Couldn't find any company by this ID: \" + compId);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getOneCompanyById Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@PostMapping(\"coupon/{id}\")\r\n public ResponseEntity<?> getOneCoupon(@RequestHeader(name = \"Authorization\") String token, @PathVariable int id) throws MalformedJwtException, CouponException {\r\n if (jwtUtil.validateToken(token)) {\r\n return ResponseEntity.ok().headers(getHeaders(token)).body(companyService.getOneCoupon(id));\r\n }\r\n return new ResponseEntity<>(HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS);\r\n }", "public void removeCompanyCoupon(Coupon coupon) throws DbException;", "@Override\n\tpublic void updateCoupon(long id, Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (id == resultSet.getInt(1)) {\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TITLE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_START_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getStartDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_END_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getEndDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_AMOUNT_BY_ID);\n\t\t\t\tstatement.setInt(1, coupon.getAmount());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TYPE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getType().toString());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_MESSAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getMessage());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_PRICE_BY_ID);\n\t\t\t\tstatement.setDouble(1, coupon.getPrice());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_IMAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getImage());\n\t\t\t\tstatement.setLong(2, id);\n\n\t\t\t\tSystem.out.println(\"Coupon updated successfull\");\n\t\t\t}\n\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t}", "public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }", "@Override\n\tpublic Coupon getCoupon(long id) throws ClassNotFoundException, SQLException, ParseException {\n\t\tCoupon coupon = new Coupon();\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tPreparedStatement statement;\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tstatement.setLong(1, id);\n\t\tResultSet resultSet = statement.executeQuery();\n\n\t\twhile (resultSet.next()) {\n\t\t\tcoupon.setId(resultSet.getLong(1));\n\t\t\tcoupon.setTitle(resultSet.getString(2));\n\t\t\tcoupon.setStartDate(StringDateConvertor.convert(resultSet.getString(3)));\n\t\t\tcoupon.setEndDate(StringDateConvertor.convert(resultSet.getString(4)));\n\t\t\tcoupon.setAmount(resultSet.getInt(5));\n\t\t\tcoupon.setType(CouponType.valueOf(resultSet.getString(6)));\n\t\t\tcoupon.setMessage(resultSet.getString(7));\n\t\t\tcoupon.setPrice(resultSet.getDouble(8));\n\t\t\tcoupon.setImage(resultSet.getString(9));\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\treturn coupon;\n\t\t}\n\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn null;\n\t}", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public java.lang.String getCouponId() {\n java.lang.Object ref = couponId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\r\n\tpublic Company getDetailByCompanyName(String companyName) {\n\t\treturn companyRepository.findByCompanyName(companyName);\r\n\t}", "java.lang.String getCouponContent();", "java.lang.String getCouponContent();", "public java.lang.String getCouponId() {\n java.lang.Object ref = couponId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponId_ = s;\n return s;\n }\n }", "public void removeCouponByCompany(Company company) throws DbException;", "@Override\n\t/**\n\t * Accepts predefined Coupon object and writes it to Coupon table in the\n\t * database\n\t */\n\tpublic int createCoupon(Coupon coupon) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Defining Coupon ID variable to return\n\t\tint couponID = -1;\n\n\t\ttry {\n\t\t\t// Checking if Coupon title already exists in DB\n\t\t\t// PreparedStatement pstmt1 = null;\n\t\t\t// String nameExist = \"SELECT * FROM Coupon where Title = ?\";\n\t\t\t// pstmt1 = con.prepareStatement(nameExist);\n\t\t\t// pstmt1.setString(1, coupon.getTitle());\n\t\t\t// ResultSet result = pstmt1.executeQuery();\n\t\t\t// if (result.next()) {\n\t\t\t// System.out.println(\"Coupon title already exists in Database,\n\t\t\t// please choose another one.\");\n\t\t\t// } else {\n\n\t\t\t// Defining SQL string to insert Coupon via prepared statement\n\t\t\tString createCouponSQL = \"insert into coupon (title, start_date, end_date, expired, type, message, price, image) values (?,?,?,?,?,?,?,?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(createCouponSQL);\n\t\t\t// Fetching variables into SQL string via Coupon bean\n\t\t\tpstmt.setString(1, coupon.getTitle());\n\t\t\tpstmt.setDate(2, getSqlDate(coupon.getStart_date()));\n\t\t\tpstmt.setDate(3, getSqlDate(coupon.getEnd_date()));\n\t\t\tpstmt.setString(4, coupon.getExpired());\n\t\t\tpstmt.setString(5, coupon.getType());\n\t\t\tpstmt.setString(6, coupon.getMessage());\n\t\t\tpstmt.setInt(7, coupon.getPrice());\n\t\t\tpstmt.setString(8, coupon.getImage());\n\t\t\t// Executing prepared statement\n\t\t\tpstmt.executeUpdate();\n\t\t\tString fetchingID = \"select id from coupon where title = ? \";\n\t\t\tPreparedStatement pstmtID = con.prepareStatement(fetchingID);\n\t\t\tpstmtID.setString(1, coupon.getTitle());\n\t\t\tResultSet resCoupon = pstmtID.executeQuery();\n\t\t\tresCoupon.next();\n\t\t\t// Fetching newly created Coupon ID for a return\n\n\t\t\tcouponID = resCoupon.getInt(1);\n\t\t\tcoupon.setId(couponID);\n\t\t\t// Writing success confirmation to the console\n\t\t\tSystem.out.println(\"Coupon has been added successfully:\" + coupon);\n\n\t\t\t// }\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon writing into database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon creation has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t\t// Return Coupon ID for future use\n\t\treturn couponID;\n\t}", "public interface CouponRepository extends JpaRepository<Coupon, Integer> {\n\n\tboolean existsByCompanyIdAndTitleIgnoreCase(int companyId, String title);\n\n\tboolean existsByIdNotAndCompanyIdAndTitleIgnoreCase(int id, int companyID, String title);\n\n\tList<Coupon> findAllByCompanyId(int companyId);\n\n\tList<Coupon> findAllByCompanyIdAndCategory(int companyId, Category category);\n\n\tList<Coupon> findAllByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n\tboolean existsByCustomersIdAndId(int customerId, int couponId);\n\n\tboolean existsByIdAndAmountGreaterThan(int id, int i);\n\n\tboolean existsByIdAndEndDateAfter(int id, LocalDate date);\n\n\tList<Coupon> findAllByCustomersId(int customerId);\n\n\tList<Coupon> findAllByCustomersIdAndCategory(int customerId, Category category);\n\n\tList<Coupon> findAllByCustomersIdAndPriceLessThanEqual(int customerId, double price);\n\n\tvoid deleteAllByEndDateBefore(LocalDate date);\n\n//\t----------------------------------------------------------------------------\n//\tMore methods for front-end\n\n\tList<Coupon> findAllByCategory(Category category);\n\n\tList<Coupon> findTop6ByOrderByPurchaseDesc();\n\n\t@Query(\"SELECT SUM(c.purchase) FROM Coupon c WHERE company.id=:companyId\")\n\tint getCompanySumPurchases(int companyId);\n\n\tList<Coupon> findAllByCustomersNotContainingAndAmountGreaterThanAndEndDateAfter(Customer customer, int amount,\n\t\t\tLocalDate date);\n\n}", "Optional<Company> findOneById(String id);", "public com.google.protobuf.ByteString\n getCouponIdBytes() {\n java.lang.Object ref = couponId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public List<Coupon> getAllCouponsByCompanyName(String companyName) {\n\t\treturn Validations.VerifyNotEmpty(\n\t\t\t\tcouponRepository.findByOwnerUsernameIgnoreCase(companyName));\n\t}", "public void removeCustomerCoupon(Company company) throws DbException;", "public Contest findByTitle(String title);", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "@Override\n\tpublic Company getOne(Long id) {\n\t\treturn dao.getById(id);\n\t}", "hr.client.appuser.CouponCenter.AppCoupon getCouponList(int index);", "@Repository\npublic interface CouponDao extends BaseDao<Coupon> {\n /**\n * 根据条件获取优惠券\n * @param serach\n * @return\n */\n List<Coupon> getCouponsBySearch(Coupon serach);\n}", "public com.google.protobuf.ByteString\n getCouponIdBytes() {\n java.lang.Object ref = couponId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static void updateCoupon(Context context, String id, final Coupon c)\n {\n Query reff;\n reff= FirebaseDatabase.getInstance().getReference().child(\"coupon\").orderByChild(\"seri\").equalTo(id);\n reff.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot: dataSnapshot.getChildren())\n {\n Coupon coupon=snapshot.getValue(Coupon.class);\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"coupon\").child(coupon.getIdcoupon());\n c.setIdcoupon(coupon.getIdcoupon());\n ref.setValue(c);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\tpublic ArrayList<Coupon> getCouponByType(Coupon.CouponType type, Company c) throws CouponSystemException {\n\t\tConnection con = cp.getConnection(); // Get the connection\n\n\t\tCoupon coup = new Coupon();\n\t\tArrayList<Coupon> couponList = new ArrayList<>();\n\t\ttry (Statement st = con.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\t\"SELECT coupon.* from company_coupon right join coupon on company_coupon.coupon_id = coupon.id where company_coupon.comp_id=\"\n\t\t\t\t\t\t\t\t+ c.getId() + \"and type= '\" + type + \"'\")) {\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tcoup = new Coupon(rs.getString(2), rs.getDate(3), rs.getDate(4), rs.getInt(5),\n\t\t\t\t\t\tCoupon.CouponType.valueOf(rs.getString(6)), rs.getString(7), rs.getDouble(8), rs.getString(9));\n\t\t\t\tcoup.setId(rs.getLong(1));\n\t\t\t\tcouponList.add(coup);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"can not read the coupons\", e);\n\t\t} finally {\n\t\t\tcp.returnConnection(con); // return the connection to the Connection pool\n\t\t}\n\t\treturn couponList;\n\t}", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private void m113949b(CouponInfo couponInfo) {\n C35444d.m114486a(getContext(), ((IAwemeService) ServiceManager.get().getService(IAwemeService.class)).getRawAdAwemeById(this.f92540i.getAwemeId()), this.f92540i.getPoiId());\n C35007b.m113007e(new C35006a().mo88754b(this.f92540i.getPoiId()).mo88752a(\"poi_page\").mo88757e(this.f92540i.getPreviousPage()).mo88759g(String.valueOf(couponInfo.getCouponId())).mo88758f(\"click_button\").mo88760h(C24575a.m80615a(getContext(), couponInfo.getStatus(), true)).mo88762j(C24575a.m80616a(couponInfo)).mo88750a(this.f92540i).mo88753a());\n }", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n }\n }", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n }\n }", "public java.lang.String getCouponName() {\n java.lang.Object ref = couponName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n couponName_ = s;\n return s;\n }\n }", "static Company getCompany(SQLiteDatabase db, String companyId) {\n Cursor cursor = db.query(COMPANY_TABLE, null, COMPANY_ID + \" = ?\", new String[] { companyId }, null, null, null);\n List<Company> list = new LinkedList<Company>();\n if (cursor.moveToFirst()) {\n int idIndex = cursor.getColumnIndex(COMPANY_ID);\n int nameIndex = cursor.getColumnIndex(COMPANY_NAME);\n int logoIndex = cursor.getColumnIndex(COMPANY_LOGO);\n int descriptionIndex = cursor.getColumnIndex(COMPANY_DESCRIPTION);\n int lastUpdatedIndex = cursor.getColumnIndex(COMPANY_LAST_UPDATED);\n int wasDeletedIndex = cursor.getColumnIndex(COMPANY_WAS_DELETED);\n\n do {\n if(cursor.getString(idIndex).equals(companyId)) {\n Company company = new Company();\n company.companyId = cursor.getString(idIndex);\n company.name = cursor.getString(nameIndex);\n company.companyLogo = cursor.getString(logoIndex);\n company.companyDescription = cursor.getString(descriptionIndex);\n company.lastUpdatedDate = cursor.getDouble(lastUpdatedIndex);\n company.wasDeleted = (cursor.getInt(wasDeletedIndex) == 1);\n company.models = CarSQL.getCompanyCars(db,company.companyId);\n return company;\n }\n else\n Log.d(\"TAG\",\"can not give correct company companyID \" + companyId + \" from sql\");\n } while (cursor.moveToNext());\n }\n return null;\n }", "public void searchCompanies() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\ttry {\r\n\t\t\tbusiness = businessDao.searchBusinessForNameOrNit(searchCompany);\r\n\t\t\tif (business == null || business.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(\r\n\t\t\t\t\t\t\"frmAsociarPermisos:empresas\",\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else {\r\n\t\t\t\tBusinessAction businessAction = ControladorContexto\r\n\t\t\t\t\t\t.getContextBean(BusinessAction.class);\r\n\t\t\t\tbusinessAction.setListBusiness(new ArrayList<Business>());\r\n\t\t\t\tbusinessAction.setListBusiness(business);\r\n\t\t\t\tbusinessAction.loadDetailsBusiness();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public String findCompany(String symbol)\n {\n for (int i = 0; i < symbolPairs.size(); i++)\n {\n SymbolPair pair = symbolPairs.get(i);\n if (pair.getTickerSymbol().equals(symbol))\n {\n return pair.getCompanyName();\n }\n }\n return \"Ticker symbol not recognized!\";\n }", "@Secured({ })\n\t@RequestMapping(value = \"/contacts/findBycompany/{key}\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic List<Contact> findBycompany(@PathVariable(\"key\") Long idcompany) {\n\t\tList<Contact> list = contactService.findBycompany(idcompany);\n\t\treturn list;\n\t}", "@Test\n public void getCompanyInfo() throws Exception {\n List<Stock> comps = quoteService.companiesByNameOrSymbol(TestConfiguration.QUOTE_SYMBOL);\n assertFalse(comps.isEmpty());\n boolean pass = false;\n for (Stock info : comps) {\n if (info.getSymbol().equals(TestConfiguration.QUOTE_SYMBOL)) {\n pass = true;\n }\n }\n assertTrue(pass);\n }", "@Override\n\t/**\n\t * Accepts predefined Coupon object and deletes described entry from the\n\t * Coupon table in the database\n\t */\n\tpublic void removeCoupon(Coupon coupon) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to delete Coupon via prepared statement\n\t\t\tString removeCouponSQL = \"delete from coupon where title = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(removeCouponSQL);\n\t\t\t// Fetching variable into SQL string via Coupon bean\n\t\t\tpstmt.setString(1, coupon.getTitle());\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint rowCount = pstmt.executeUpdate();\n\t\t\tif (rowCount != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupon has been removed successfully:\" + coupon);\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupon not found in the\n\t\t\t\t// database\n\t\t\t\tSystem.out.println(\"Coupon removal has been failed - subject entry not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon removal from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon remove has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "Company getCompanyByUniversalName(String name);", "public CustomerCompany findCustomerCompany(String name) \n\t{\n\t\tTypedQuery<CustomerCompany> query = \n\t\t\t\tthis.entityManager.createNamedQuery(\"CustomerCompany.findByName\", CustomerCompany.class);\n\t\t\n\t\tquery.setParameter(\"prName\", name);\n\t\treturn query.getSingleResult();\n\t}", "public int getCouponNum() {\n return couponNum_;\n }", "public Builder setCouponId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n couponId_ = value;\n onChanged();\n return this;\n }", "public java.util.List<Todo> findByCompanyId(long companyId);", "Optional<Company> findById(long company_id);", "public int getCouponNum() {\n return couponNum_;\n }", "@Override\n\t/**\n\t * Accepts predefined Coupon object and updates entry with relevant ID in\n\t * the database with values from accepted Coupon object\n\t */\n\tpublic void updateCoupon(Coupon coupon) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to update Coupon via prepared statement\n\t\t\tString updateCouponSQL = \"update coupon set title=?, start_date=?, end_date=?, expired=?, type=?, message=?, price=?, image=? where id = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(updateCouponSQL);\n\t\t\t// Fetching variables into SQL string via Coupon bean plus ID as\n\t\t\t// method accepted variable\n\t\t\tpstmt.setString(1, coupon.getTitle());\n\t\t\tpstmt.setDate(2, getSqlDate(coupon.getStart_date()));\n\t\t\tpstmt.setDate(3, getSqlDate(coupon.getEnd_date()));\n\t\t\tpstmt.setString(4, coupon.getExpired());\n\t\t\tpstmt.setString(5, coupon.getType());\n\t\t\tpstmt.setString(6, coupon.getMessage());\n\t\t\tpstmt.setInt(7, coupon.getPrice());\n\t\t\tpstmt.setString(8, coupon.getImage());\n\t\t\tpstmt.setInt(9, coupon.getId());\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint rowCount = pstmt.executeUpdate();\n\t\t\tif (rowCount != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupon has been updated successfully:\" + coupon);\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupon not found in the\n\t\t\t\t// database\n\t\t\t\tSystem.out.println(\"Coupon update has been failed - subject entry not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon update in the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon update has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "public void updateCoupon(Coupon coupon) throws DbException;", "java.lang.String getCouponDescription();", "java.lang.String getCouponDescription();", "public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@GetMapping(\"/sys-coupon-classifies/{id}\")\n @Timed\n public ResponseEntity<SysCouponClassify> getSysCouponClassify(@PathVariable Long id) {\n log.debug(\"REST request to get SysCouponClassify : {}\", id);\n Optional<SysCouponClassify> sysCouponClassify = sysCouponClassifyService.findOne(id);\n return ResponseUtil.wrapOrNotFound(sysCouponClassify);\n }", "@Override\r\n\tpublic Company getAllCompaniesByCode(Integer code) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"company code is::\"+code);\r\n\t\treturn companyRepository.findCompanyByCode(code.longValue());\r\n\t}", "@Transactional(readOnly = true)\n public Company findOne(final Long companyId) {\n return companyRepository.findOne(companyId);\n }", "public Company getCompany(String companyShortName);", "public List<Customer> getByCompanyName(String company) throws CustomerNotFoundException {\r\n try {\r\n return this.entityManager.createQuery(\"select customer from Customer as customer where customer.company=:company\")\r\n .setParameter(\"company\", company)\r\n .getResultList();\r\n } catch (Exception e) {\r\n throw new CustomerNotFoundException();\r\n }\r\n }", "public void delete(Coupon coupon) {\n\t\tcouponRepository.delete(coupon);\n\t\t\n\t}", "@Override\r\n\tpublic Company getAllCompaniesById(Integer id) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"id value is::\"+id);\r\n\t\treturn companyRepository.findCompanyById(id.longValue());\r\n\t}", "public void createCoupon(Coupon coupon) throws DbException;", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCouponNameBytes() {\n java.lang.Object ref = couponName_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponName_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.72125715", "0.67231685", "0.6697886", "0.6466871", "0.6394164", "0.6379336", "0.6340856", "0.6200164", "0.61624867", "0.61541975", "0.61244947", "0.605193", "0.5993589", "0.5970783", "0.5957796", "0.594309", "0.5937681", "0.5916306", "0.59101415", "0.5856396", "0.57943016", "0.57891715", "0.5731933", "0.5706328", "0.5684539", "0.5677833", "0.566066", "0.5616923", "0.56067455", "0.5604809", "0.5604809", "0.5604809", "0.5580237", "0.55691737", "0.55537844", "0.5548074", "0.5513617", "0.5511786", "0.5504214", "0.54997605", "0.54513305", "0.54510665", "0.544506", "0.544506", "0.5430233", "0.54182017", "0.53925365", "0.5362602", "0.5356054", "0.5348108", "0.5333827", "0.5329935", "0.53136307", "0.5304435", "0.53035575", "0.5302695", "0.52828467", "0.52753264", "0.52739996", "0.52652866", "0.52648085", "0.526294", "0.526294", "0.526294", "0.52597016", "0.52294797", "0.52294797", "0.52294797", "0.5228568", "0.5220183", "0.5195629", "0.51951003", "0.51830685", "0.51759464", "0.51733017", "0.516082", "0.5157518", "0.51471955", "0.51456016", "0.51432544", "0.5124976", "0.51146513", "0.5111582", "0.50973475", "0.50973475", "0.5092316", "0.5092316", "0.5092316", "0.509163", "0.5070237", "0.50539607", "0.5049829", "0.5047934", "0.50349593", "0.50281173", "0.50276005", "0.5026976", "0.5022971", "0.5022044", "0.5022044" ]
0.8151132
0
This method find coupon by company id. The method helps us to get all of the coupons of specific company.
List<Coupon> findByCompanyId(int companyId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);", "Coupon findByCompanyIdAndTitle(int companyId, String title);", "List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "public Company findCompany(long id);", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "Company getCompany(int id);", "public Coupon getCoupon(int id) throws DbException;", "public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }", "public Coupon getCoupon(long id) {\n\t\treturn Validations.verifyNotNull(couponRepository.findOne(id));\n\t}", "@Override\r\n\tpublic Company getOneCompanyById(int compId) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"select * from companies where companyId=\" + compId;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tCompany comp = new Company();\r\n\t\t\t\tcomp.setCompId(compId);\r\n\t\t\t\tcomp.setCompName(rs.getString(\"companyName\"));\r\n\t\t\t\tcomp.setCompEmail(rs.getString(\"companyEmail\"));\r\n\t\t\t\tcomp.setCompPass(rs.getString(\"companyPass\"));\r\n\r\n\t\t\t\treturn comp;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Couldn't find any company by this ID: \" + compId);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getOneCompanyById Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public CustomerCompany findCustomerCompany(Long id) \n\t{\n\t\treturn this.entityManager.find(CustomerCompany.class, id);\n\t}", "@WebMethod public boolean findCoupon(String coupon);", "@WebMethod public Coupon getCoupon(String coupon);", "public ArrayList<Coupon> getCoupons(ArrayList<Long> id) {\n\t\treturn couponRepository.getCoupons(id);\n\t}", "@Secured({ })\n\t@RequestMapping(value = \"/contacts/findBycompany/{key}\", method = RequestMethod.GET, headers = \"Accept=application/json\")\n\tpublic List<Contact> findBycompany(@PathVariable(\"key\") Long idcompany) {\n\t\tList<Contact> list = contactService.findBycompany(idcompany);\n\t\treturn list;\n\t}", "Optional<Company> getCompany(long id);", "public Coupon getCouponByID(int couponId) throws Exception {\n\n\t\treturn couponsDBDAO.getOneCoupon(couponId);\n\n\t}", "@Override\r\n\tpublic Company getAllCompaniesById(Integer id) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"id value is::\"+id);\r\n\t\treturn companyRepository.findCompanyById(id.longValue());\r\n\t}", "public List<Coupon> getAllCouponsByCompanyName(String companyName) {\n\t\treturn Validations.VerifyNotEmpty(\n\t\t\t\tcouponRepository.findByOwnerUsernameIgnoreCase(companyName));\n\t}", "public ManagedCompany getManagedCompany(int id) {\n \n ManagedCompany result = null;\n \n try {\n Connection conn = this.databaseUtils.getConnection();\n dao.setConnection(conn);\n result = dao.getItemById(id);\n } catch (SQLException e) {\n Logger.getLogger(AppService.class.getName()).log(Level.SEVERE, null, e);\n }\n \n return result;\n }", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\t/** Accepts Coupon ID and returns related Coupon object */\n\tpublic Coupon getCoupon(int id) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Creating Coupon object to fill it later with data from SQL query\n\t\t// result and for method to return it afterwards\n\t\tCoupon coupon = new Coupon();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupon via prepared statement\n\t\t\tString getCouponSQL = \"select * from coupon where id = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponSQL);\n\t\t\t// Putting method accepted ID into SQL string\n\t\t\tpstmt.setInt(1, id);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// If query result has data (if Coupon has been found) do\n\t\t\tif (resCoup.next()) {\n\t\t\t\t// Set Coupon object ID to ID variable that method received\n\t\t\t\tcoupon.setId(id);\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// // Write retrieval success confirmation to the console\n\t\t\t\t// System.out.println(\"Coupon has been found successfully:\" +\n\t\t\t\t// coupon);\n\t\t\t} else {\n\t\t\t\t// If query result is empty (Coupon hasn't been found) throw\n\t\t\t\t// exception\n\t\t\t\tSystem.out.println(\"Coupon retrieve has been failed - Coupon ID not found\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return Coupon\n\t\treturn coupon;\n\t}", "@Override\n\tpublic Coupon getCoupon(long id) throws ClassNotFoundException, SQLException, ParseException {\n\t\tCoupon coupon = new Coupon();\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tPreparedStatement statement;\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tstatement.setLong(1, id);\n\t\tResultSet resultSet = statement.executeQuery();\n\n\t\twhile (resultSet.next()) {\n\t\t\tcoupon.setId(resultSet.getLong(1));\n\t\t\tcoupon.setTitle(resultSet.getString(2));\n\t\t\tcoupon.setStartDate(StringDateConvertor.convert(resultSet.getString(3)));\n\t\t\tcoupon.setEndDate(StringDateConvertor.convert(resultSet.getString(4)));\n\t\t\tcoupon.setAmount(resultSet.getInt(5));\n\t\t\tcoupon.setType(CouponType.valueOf(resultSet.getString(6)));\n\t\t\tcoupon.setMessage(resultSet.getString(7));\n\t\t\tcoupon.setPrice(resultSet.getDouble(8));\n\t\t\tcoupon.setImage(resultSet.getString(9));\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\treturn coupon;\n\t\t}\n\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn null;\n\t}", "protected List<CompaniesContactsEntity> findByIdCompany(CompaniesEntity companiesEntity) {\n\n log.info(\"CompaniesContactsBean => method : findByIdCompany()\");\n\n FacesMessage facesMessage;\n\n if (companiesContactsEntity == null) {\n log.error(\"Companies entity is null\");\n facesMessage = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"company.error\"), null);\n FacesContext.getCurrentInstance().addMessage(null, facesMessage);\n return null;\n }\n\n EntityManager em = EMF.getEM();\n\n List<CompaniesContactsEntity> companiesContactsEntities = companiesContactsDao.findByIdCompany(em, companiesEntity.getId());\n\n em.clear();\n em.close();\n\n return companiesContactsEntities;\n }", "public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "public java.util.List<Todo> findByCompanyId(long companyId);", "@Transactional(readOnly = true)\n public Company findOne(final Long companyId) {\n return companyRepository.findOne(companyId);\n }", "@Override\r\n\tpublic Company getAllCompaniesByCode(Integer code) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"company code is::\"+code);\r\n\t\treturn companyRepository.findCompanyByCode(code.longValue());\r\n\t}", "public void setCompanyId(Long companyId) {\n this.companyId = companyId;\n }", "java.lang.String getCouponId();", "public Long getCompanyId() {\n return companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(Integer companyId) {\n this.companyId = companyId;\n }", "public void setCompanyId(long companyId) {\n this.companyId = companyId;\n }", "Optional<Company> findById(long company_id);", "List<Coupon> findByCategory(Category category);", "public void setCompanyId(int companyId) {\n this.companyId = companyId;\n }", "List<Coupon> findAllByCategory(Category category);", "public void removeCouponByCompany(Company company) throws DbException;", "public abstract Company get(int id);", "@Override\n\tpublic ArrayList<Coupon> getCouponByType(Coupon.CouponType type, Company c) throws CouponSystemException {\n\t\tConnection con = cp.getConnection(); // Get the connection\n\n\t\tCoupon coup = new Coupon();\n\t\tArrayList<Coupon> couponList = new ArrayList<>();\n\t\ttry (Statement st = con.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\t\"SELECT coupon.* from company_coupon right join coupon on company_coupon.coupon_id = coupon.id where company_coupon.comp_id=\"\n\t\t\t\t\t\t\t\t+ c.getId() + \"and type= '\" + type + \"'\")) {\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tcoup = new Coupon(rs.getString(2), rs.getDate(3), rs.getDate(4), rs.getInt(5),\n\t\t\t\t\t\tCoupon.CouponType.valueOf(rs.getString(6)), rs.getString(7), rs.getDouble(8), rs.getString(9));\n\t\t\t\tcoup.setId(rs.getLong(1));\n\t\t\t\tcouponList.add(coup);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"can not read the coupons\", e);\n\t\t} finally {\n\t\t\tcp.returnConnection(con); // return the connection to the Connection pool\n\t\t}\n\t\treturn couponList;\n\t}", "@Override\n\tpublic Company getOne(Long id) {\n\t\treturn dao.getById(id);\n\t}", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\r\n\tpublic Company getCompany(long companyId) throws Exception {\r\n\r\n\t\tconnectionPool = ConnectionPool.getInstance();\r\n\t\tConnection connection = connectionPool.getConnection();\r\n\t\tCompany company = new Company();\r\n\t\tString sql = \"SELECT * FROM Company WHERE ID=\" + companyId;\r\n\t\ttry (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {\r\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\r\n\t\t\tresultSet.next();\r\n\t\t\tcompany.setCompanyId(resultSet.getLong(1));\r\n\t\t\tcompany.setCompanyName(resultSet.getString(2));\r\n\t\t\tcompany.setCompanyPassword(resultSet.getString(3));\r\n\t\t\tcompany.setCompanyEmail(resultSet.getString(4));\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new Exception(\"DB error - unable to get Company data. companyId: \" + companyId);\r\n\t\t}catch (Exception e) {\r\n\t\t\tthrow new Exception(\"unable to get Company data. companyId: \" + companyId);\r\n\t\t} \r\n\t\tfinally {\r\n\t\t\tconnection.close();\r\n\t\t\tconnectionPool.returnConnection(connection);\r\n\t\t}\r\n\t\treturn company;\r\n\t}", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "public void setCompanyId(String companyId) {\r\n this.companyId = companyId;\r\n }", "@Override\n\tpublic CustomCouponDetail getCouponDetail(Long couponId) {\n\t\treturn null;\n\t}", "public Long getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "@Override\n\tpublic void updateCoupon(long id, Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (id == resultSet.getInt(1)) {\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TITLE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_START_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getStartDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_END_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getEndDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_AMOUNT_BY_ID);\n\t\t\t\tstatement.setInt(1, coupon.getAmount());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TYPE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getType().toString());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_MESSAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getMessage());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_PRICE_BY_ID);\n\t\t\t\tstatement.setDouble(1, coupon.getPrice());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_IMAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getImage());\n\t\t\t\tstatement.setLong(2, id);\n\n\t\t\t\tSystem.out.println(\"Coupon updated successfull\");\n\t\t\t}\n\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t}", "@RequestMapping(value = \"/companies/{id}/contracts\", method = RequestMethod.GET)\n @PreAuthorize(\"hasPermission(#id, 'company', 'READ')\")\n public ResponseEntity<?> getByCompanyId(@PathVariable int id,Pageable pagination, ContractFilter filter, BindingResult result) {\n filter.setClientCompany(id);\n return super.listAll(pagination,filter,result);\n }", "@PostMapping(\"coupon/{id}\")\r\n public ResponseEntity<?> getOneCoupon(@RequestHeader(name = \"Authorization\") String token, @PathVariable int id) throws MalformedJwtException, CouponException {\r\n if (jwtUtil.validateToken(token)) {\r\n return ResponseEntity.ok().headers(getHeaders(token)).body(companyService.getOneCoupon(id));\r\n }\r\n return new ResponseEntity<>(HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS);\r\n }", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getCompanyId() {\n return companyId;\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public void removeCustomerCoupon(Company company) throws DbException;", "public int getCompanyId() {\n return companyId;\n }", "Optional<Company> findOneById(String id);", "public Company load(Long id) {\r\n\t\treturn (Company) sessionFactory.getCurrentSession().get(Company.class, id);\r\n\t}", "@Override\n\tpublic List<Coupon> getAllPurchasedCoupons(int id) throws CustomDateBaseExepation {\n\n\t\tif (customerRipository.findById(id) == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + id);\n\t\t}\n\n\t\tList<Coupon> c = customerRipository.getAllPurchasedCoupons(id);\n\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no purchased coupons for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public CouponEntity getCouponByCouponId(String couponUuid) {\n try {\n CouponEntity couponEntity = entityManager.createNamedQuery(\"getCouponByCouponId\",CouponEntity.class).setParameter(\"uuid\",couponUuid).getSingleResult();\n return couponEntity;\n }catch (NoResultException nre){\n return null;\n }\n }", "public long getCompanyId() {\n return companyId;\n }", "public com.google.protobuf.ByteString\n getCouponIdBytes() {\n java.lang.Object ref = couponId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@GetMapping(\"/sys-coupon-classifies/{id}\")\n @Timed\n public ResponseEntity<SysCouponClassify> getSysCouponClassify(@PathVariable Long id) {\n log.debug(\"REST request to get SysCouponClassify : {}\", id);\n Optional<SysCouponClassify> sysCouponClassify = sysCouponClassifyService.findOne(id);\n return ResponseUtil.wrapOrNotFound(sysCouponClassify);\n }", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "static Company getCompany(SQLiteDatabase db, String companyId) {\n Cursor cursor = db.query(COMPANY_TABLE, null, COMPANY_ID + \" = ?\", new String[] { companyId }, null, null, null);\n List<Company> list = new LinkedList<Company>();\n if (cursor.moveToFirst()) {\n int idIndex = cursor.getColumnIndex(COMPANY_ID);\n int nameIndex = cursor.getColumnIndex(COMPANY_NAME);\n int logoIndex = cursor.getColumnIndex(COMPANY_LOGO);\n int descriptionIndex = cursor.getColumnIndex(COMPANY_DESCRIPTION);\n int lastUpdatedIndex = cursor.getColumnIndex(COMPANY_LAST_UPDATED);\n int wasDeletedIndex = cursor.getColumnIndex(COMPANY_WAS_DELETED);\n\n do {\n if(cursor.getString(idIndex).equals(companyId)) {\n Company company = new Company();\n company.companyId = cursor.getString(idIndex);\n company.name = cursor.getString(nameIndex);\n company.companyLogo = cursor.getString(logoIndex);\n company.companyDescription = cursor.getString(descriptionIndex);\n company.lastUpdatedDate = cursor.getDouble(lastUpdatedIndex);\n company.wasDeleted = (cursor.getInt(wasDeletedIndex) == 1);\n company.models = CarSQL.getCompanyCars(db,company.companyId);\n return company;\n }\n else\n Log.d(\"TAG\",\"can not give correct company companyID \" + companyId + \" from sql\");\n } while (cursor.moveToNext());\n }\n return null;\n }", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);", "public com.google.protobuf.ByteString\n getCouponIdBytes() {\n java.lang.Object ref = couponId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n couponId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCompanyId() {\r\n\t\treturn companyId;\r\n\t}", "public Coupon addCoupon(Coupon coupon) throws CompanyDoesntExistException, CouponTitleAlreadyExistInThisCompanyException {\n Company comp = companyRepo.findById(this.companyID).get();\n if (comp == null) {\n //throw Exception\n throw new CompanyDoesntExistException(\"company doesn't exist!\");\n } else {\n coupon.setCompanyID(this.companyID); //if this company tries to add coupon to another company\n for (Coupon coup : comp.getCoupons()) {\n if (coup.getTitle().equals(coupon.getTitle())) {\n //throw Exception\n throw new CouponTitleAlreadyExistInThisCompanyException(\"coupon title is already exist!\");\n }\n }\n comp.getCoupons().add(coupon);\n companyRepo.save(comp);\n return coupon;\n }\n }", "public CouponEntity getCouponByName(String couponName) {\n try {\n return entityManager\n .createNamedQuery(\"couponByName\", CouponEntity.class)\n .setParameter(\"couponName\", couponName)\n .getSingleResult();\n } catch (NoResultException nre) {\n return null;\n }\n }", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "public void setCompanyId(Long companyId) {\r\n\t\tthis.companyId = companyId;\r\n\t}", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "@Override\r\n\tpublic Company getDetailByCompanyName(String companyName) {\n\t\treturn companyRepository.findByCompanyName(companyName);\r\n\t}", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic void setCompanyId(long companyId);", "@Override\n\tpublic List<Coupon> getAllPurchesCouponsByPrice(double price, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByPrice(id, price);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons with a price lower then this for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public CompanyEntity getCompany(long companyId) throws Exception {\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n\n try {\n //Establish a connection from the connection manager\n connection = JdbcUtils.getConnection();\n\n //Creating the SQL query\n String sqlStatement = \"SELECT * FROM companies WHERE id = ?\";\n\n //Combining between the syntax and our connection\n preparedStatement = connection.prepareStatement(sqlStatement);\n\n //Replacing the question marks in the statement above with the relevant data\n preparedStatement.setLong(1, companyId);\n\n //Executing the update\n ResultSet resultSet = preparedStatement.executeQuery();\n\n if (!resultSet.next()) {\n throw new ApplicationException(ErrorType.GENERAL_ERROR, \"Cannot retrieve information\");\n }\n// creating an array of companies\n CompanyEntity companyEntity = new CompanyEntity();\n companyEntity.setCompanyId(resultSet.getLong(\"id\"));\n companyEntity.setCompanyName(resultSet.getString(\"company_name\"));\n companyEntity.setCompanyEmail(resultSet.getString(\"company_email\"));\n companyEntity.setCompanyPhone(resultSet.getString(\"company_phone\"));\n companyEntity.setCompanyAddress(resultSet.getString(\"company_address\"));\n\n return companyEntity;\n\n } catch (Exception e) {\n //\t\t\te.printStackTrace();\n throw new Exception(\"Failed to retrieve data\", e);\n } finally {\n //Closing the resources\n JdbcUtils.closeResources(connection, preparedStatement);\n }\n }", "public void removeCompanyCoupon(Coupon coupon) throws DbException;" ]
[ "0.72295386", "0.72290605", "0.7063595", "0.7029383", "0.68121016", "0.6732355", "0.67047423", "0.6697661", "0.6664465", "0.6647086", "0.6477057", "0.64570546", "0.63912326", "0.63613653", "0.6247738", "0.62022823", "0.6188502", "0.6171246", "0.61663103", "0.6162327", "0.61470807", "0.61425835", "0.61122584", "0.6109387", "0.60856205", "0.6061188", "0.60584867", "0.6034705", "0.6029647", "0.60012907", "0.5965283", "0.59559566", "0.59138733", "0.5902215", "0.5885617", "0.5880565", "0.58721405", "0.58721405", "0.58522123", "0.5850458", "0.58430946", "0.58368117", "0.58304375", "0.5826241", "0.5822438", "0.5805824", "0.57995987", "0.57876843", "0.57876843", "0.5786556", "0.57826376", "0.57786125", "0.5774598", "0.5774598", "0.5769285", "0.5761851", "0.5754726", "0.5747768", "0.57435685", "0.57329035", "0.56966794", "0.56881803", "0.56881803", "0.5674819", "0.56531686", "0.5651767", "0.5648429", "0.56481874", "0.5640674", "0.5637561", "0.56332654", "0.5625891", "0.5617851", "0.5606535", "0.5602278", "0.5592021", "0.55859244", "0.55857044", "0.55743486", "0.5572127", "0.5565414", "0.55544", "0.5537206", "0.5531748", "0.5531748", "0.5531748", "0.5531748", "0.5531748", "0.5519731", "0.5506801", "0.5506801", "0.5506801", "0.5506801", "0.54936296", "0.54936296", "0.54936296", "0.54936296", "0.5493264", "0.5487478", "0.5486196" ]
0.8026537
0
Find all the coupons until the inserted date.
List<Coupon> findByEndDateBefore(Date date);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByEndDateSQL = \"select * from coupon where end_date < ? and id in(select couponid from compcoupon where companyid = ?) order by end_date desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByEndDateSQL);\n\t\t\t// Set date variable that method received into prepared statement\n\t\t\tpstmt.setDate(1, getSqlDate(date));\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Collection<Coupon> getCouponByDate(Date date) throws DbException;", "public void getAllPurchasedCouponsByDate(Date date) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByDate(date);\n }", "List<Coupon> findByOrderByStartDateDesc();", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Override\n\tpublic List<BeanCoupon> loadAllSystemCoupons() throws BaseException {\n\t\tList< BeanCoupon > result=new ArrayList<BeanCoupon>();\n\t\t\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\tconn=DBUtil.getConnection();\n\t\t\tString sql=\"select * from coupon where coupon_end_time > now()\";\n\t\t\tjava.sql.PreparedStatement pst=conn.prepareStatement(sql);\n\t\t\tjava.sql.ResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tBeanCoupon cp=new BeanCoupon();\n\t\t\t\tcp.setCoupon_id(rs.getString(1));\n\t\t\t\tcp.setCoupon_content(rs.getString(2));\n\t\t\t\tcp.setCoupon_fit_money(rs.getFloat(3));\n\t\t\t\tcp.setCoupon_price(rs.getFloat(4));\n\t\t\t\tcp.setCoupon_start_time(rs.getTimestamp(5));\n\t\t\t\tcp.setCoupon_end_time(rs.getTimestamp(6));\n\t\t\t\tresult.add(cp);\n\t\t\t}\n\t\t\t\n\t\t\treturn result;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DbException(e);\n\t\t}\n\t\tfinally{\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public Collection<Coupon> getAllPurchasedCoupons() {\r\n\t\treturn db.getCustomer(cust).getCouponHistory();\r\n\t}", "@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public List<CouponData> getExpiredCouponList() {\n LocalDateTime currentDate = LocalDateTime.now();\n\n Optional<List<CouponData>> couponDataList = couponDataJpaRepository.findExpiredCoupon(currentDate);\n\n couponDataList.orElseThrow(()\n -> new CommonException(CommonResultCode.NO_DATA));\n\n return couponDataList.get();\n }", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Override\n\tpublic List<BeanCoupon> loadAllUserCoupons(BeanUser u) throws BaseException {\n\t\tList< BeanCoupon > result=new ArrayList<BeanCoupon>();\n\t\t\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\n\t\t\tconn=DBUtil.getConnection();\n\t\t\tString sql=\"SELECT * FROM coupon WHERE coupon_id in\"\n\t\t\t\t\t+ \"(SELECT coupon_id FROM user_coupon WHERE user_id=?) \"\n\t\t\t\t\t+ \"and coupon_end_time > now()\";\n\t\t\tjava.sql.PreparedStatement pst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, u.getUser_id());\n\t\t\tjava.sql.ResultSet rs=pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tBeanCoupon cp=new BeanCoupon();\n\t\t\t\tcp.setCoupon_id(rs.getString(1));\n\t\t\t\tcp.setCoupon_content(rs.getString(2));\n\t\t\t\tcp.setCoupon_fit_money(rs.getFloat(3));\n\t\t\t\tcp.setCoupon_price(rs.getFloat(4));\n\t\t\t\tcp.setCoupon_start_time(rs.getTimestamp(5));\n\t\t\t\tcp.setCoupon_end_time(rs.getTimestamp(6));\n\t\t\t\tresult.add(cp);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DbException(e);\n\t\t}\n\t\tfinally{\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\treturn result;\t\n\t}", "public ArrayList<BikeData> getAllRecentData (){\n ArrayList<BikeData> datalist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_RECENT_DATA);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n\n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n datalist.add(bd);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return datalist;\n }", "@Override\r\n\tpublic List<DrankB> findCommodityByLater() {\n\t\treturn pageMapper.findCommodityByLater();\r\n\t}", "public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }", "public List<Order> retrieveOrders1DayAgo( Date currentDate ) throws OrderException;", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@AfterReturning(value = CUSTOMER_REPOSITORY_FIND_ALL_METHOD, returning = \"customers\")\n\tpublic void afterReturningFindAll(JoinPoint jP, Iterable<?> customers) {\n\t\tint size = 0;\n\t\t\n\t\tIterator<?> iterator = customers.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\t\tsize++;\n\t\t\titerator.next();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"CustomerRepository.findAll() returned \" + size + \" customers\");\n\t}", "private Callable<List<Price>> fetchDataIfNeeded(Calendar currentDate) {\n return () -> {\n List<Price> fetchedList = Collections.emptyList();\n\n Calendar date = repository.getLastFetchedDate();\n if (date == null) {\n // need to fetch last few days as data for all period is sampled once per two days\n fetchedList = Observable.zip(repository.fetchAllPrices(), repository.fetchPrices(DAYS_TO_FETCH),\n (list1, list2) -> mergeAndSort(list1, list2))\n .blockingFirst();\n } else {\n int dayDifference = calendarUtils.calculateDifferenceInDays(currentDate, date);\n if (dayDifference > 0) {\n fetchedList = repository.fetchPrices(dayDifference).blockingFirst();\n }\n }\n\n return fetchedList;\n };\n }", "public void populateDemo(Connection connection, LocalDate start, LocalDate end) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"DateList\", null);\n\n if (rs != null){\n\n while (!start.isAfter(end)){\n\n String sql = \"INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))\";\n\n String sql1 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql2 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 300)\";\n String sql3 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql4 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql5 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 15, 400)\";\n String sql6 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql7 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 20, 800)\";\n String sql8 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql9 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 25, 1000)\";\n String sql10 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql11 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 350)\";\n String sql12 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Twin Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 250)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n PreparedStatement pStmt1 = connection.prepareStatement(sql1);\n PreparedStatement pStmt2 = connection.prepareStatement(sql2);\n PreparedStatement pStmt3 = connection.prepareStatement(sql3);\n PreparedStatement pStmt4 = connection.prepareStatement(sql4);\n PreparedStatement pStmt5 = connection.prepareStatement(sql5);\n PreparedStatement pStmt6 = connection.prepareStatement(sql6);\n PreparedStatement pStmt7 = connection.prepareStatement(sql7);\n PreparedStatement pStmt8 = connection.prepareStatement(sql8);\n PreparedStatement pStmt9 = connection.prepareStatement(sql9);\n PreparedStatement pStmt10 = connection.prepareStatement(sql10);\n PreparedStatement pStmt11 = connection.prepareStatement(sql11);\n PreparedStatement pStmt12 = connection.prepareStatement(sql12);\n\n pStmt.clearParameters();\n pStmt1.clearParameters();\n pStmt2.clearParameters();\n pStmt3.clearParameters();\n pStmt4.clearParameters();\n pStmt5.clearParameters();\n pStmt6.clearParameters();\n pStmt7.clearParameters();\n pStmt8.clearParameters();\n pStmt9.clearParameters();\n pStmt10.clearParameters();\n pStmt11.clearParameters();\n pStmt12.clearParameters();\n\n pStmt.setString(1, start.toString());\n pStmt1.setString(1, start.toString());\n pStmt2.setString(1, start.toString());\n pStmt3.setString(1, start.toString());\n pStmt4.setString(1, start.toString());\n pStmt5.setString(1, start.toString());\n pStmt6.setString(1, start.toString());\n pStmt7.setString(1, start.toString());\n pStmt8.setString(1, start.toString());\n pStmt9.setString(1, start.toString());\n pStmt10.setString(1, start.toString());\n pStmt11.setString(1, start.toString());\n pStmt12.setString(1, start.toString());\n\n start = start.plusDays(1);\n\n pStmt.setString(2, start.toString());\n pStmt1.setString(2, start.toString());\n pStmt2.setString(2, start.toString());\n pStmt3.setString(2, start.toString());\n pStmt4.setString(2, start.toString());\n pStmt5.setString(2, start.toString());\n pStmt6.setString(2, start.toString());\n pStmt7.setString(2, start.toString());\n pStmt8.setString(2, start.toString());\n pStmt9.setString(2, start.toString());\n pStmt10.setString(2, start.toString());\n pStmt11.setString(2, start.toString());\n pStmt12.setString(2, start.toString());\n\n try {\n pStmt.executeUpdate();\n pStmt1.executeUpdate();\n pStmt2.executeUpdate();\n pStmt3.executeUpdate();\n pStmt4.executeUpdate();\n pStmt5.executeUpdate();\n pStmt6.executeUpdate();\n pStmt7.executeUpdate();\n pStmt8.executeUpdate();\n pStmt9.executeUpdate();\n pStmt10.executeUpdate();\n pStmt11.executeUpdate();\n pStmt12.executeUpdate();\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n pStmt1.close();\n pStmt2.close();\n pStmt3.close();\n pStmt4.close();\n pStmt5.close();\n pStmt6.close();\n pStmt7.close();\n pStmt8.close();\n pStmt9.close();\n pStmt10.close();\n pStmt11.close();\n pStmt12.close();\n }\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "public void initialiserCompte() {\n DateTime dt1 = new DateTime(date1).withTimeAtStartOfDay();\n DateTime dt2 = new DateTime(date2).withEarlierOffsetAtOverlap();\n DateTime dtIt = new DateTime(date1).withTimeAtStartOfDay();\n Interval interval = new Interval(dt1, dt2);\n\n\n\n// while (dtIt.isBefore(dt2)) {\n while (interval.contains(dtIt)) {\n compte.put(dtIt.toDate(), 0);\n dtIt = dtIt.plusDays(1);\n }\n }", "private void storeCongestionPoints(CommonReferenceQueryResponse message, LocalDate initializationDate,\n Integer validityDuration) {\n\n Map<String, CongestionPoint> congestionPointToCongestionPoint = message.getCongestionPoint()\n .stream()\n .collect(Collectors.toMap(CongestionPoint::getEntityAddress, Function.identity()));\n\n Map<String, List<String>> congestionPointToConnections = message.getCongestionPoint()\n .stream()\n .collect(Collectors.toMap(CongestionPoint::getEntityAddress, cp -> cp.getConnection()\n .stream()\n .map(Connection::getEntityAddress)\n .collect(Collectors.toList())));\n\n List<ConnectionGroupState> activeConnectionGroupStates = connectionGroupStateRepository\n .findActiveConnectionGroupStatesOfType(\n initializationDate, CongestionPointConnectionGroup.class);\n List<ConnectionGroupState> endingConnectionGroupStates = connectionGroupStateRepository.findEndingConnectionGroupStates(\n initializationDate, CongestionPointConnectionGroup.class);\n\n /*\n * get the list of connection group states which can be extended. They must have the same data has the incoming information\n * and no active state can be open at the specified date.\n */\n List<ConnectionGroupState> connectionGroupStatesToExtend = endingConnectionGroupStates.stream()\n .filter(cgs -> congestionPointToConnections.keySet().contains(cgs.getConnectionGroup().getUsefIdentifier()))\n .filter(cgs -> congestionPointToConnections.get(cgs.getConnectionGroup().getUsefIdentifier())\n .stream()\n .anyMatch(entityAddress -> entityAddress.equals(cgs.getConnection().getEntityAddress())))\n .collect(Collectors.toList());\n\n // extends the validity of an ending ConnectionGroupState if data is unchanged in the CRQR\n connectionGroupStatesToExtend.stream().forEach(cgs -> {\n LOGGER.debug(\"Extending VALID_UNTIL of [{}/{}] from [{}] to [{}].\", cgs.getConnectionGroup().getUsefIdentifier(),\n cgs.getConnection().getEntityAddress(), cgs.getValidUntil(), cgs.getValidUntil().plusDays(validityDuration));\n cgs.setValidUntil(cgs.getValidUntil().plusDays(validityDuration));\n });\n\n /*\n * for each incoming congestion-point/connection pair which is not in the ending ConnectionGroupStates and which is not in\n * the active connection group states\n */\n congestionPointToConnections.entrySet().forEach(entry -> entry.getValue().stream()\n .filter(connection -> connectionGroupStatesToExtend.stream().noneMatch(\n cgs -> cgs.getConnection().getEntityAddress().equals(connection) && cgs.getConnectionGroup()\n .getUsefIdentifier().equals(entry.getKey())))\n .filter(connection -> activeConnectionGroupStates.stream().noneMatch(\n activeCgs -> activeCgs.getConnectionGroup().getUsefIdentifier().equals(entry.getKey()) && activeCgs\n .getConnection().getEntityAddress().equals(connection))).forEach(\n connection -> createConnectionGroupState(connection, entry.getKey(), congestionPointToCongestionPoint,\n initializationDate, validityDuration)));\n }", "public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods> fetchByCdate(Timestamp... values) {\n return fetch(TOfferGoods.T_OFFER_GOODS.CDATE, values);\n }", "public List<Contract> getFoodContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=0 AND \"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "@Override\n public List<Cours> afficherTousLesCours() {\n return coursRepo.findAll();\n }", "@Override\n\tpublic List<Coupon> getAllPurchasedCoupons(int id) throws CustomDateBaseExepation {\n\n\t\tif (customerRipository.findById(id) == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + id);\n\t\t}\n\n\t\tList<Coupon> c = customerRipository.getAllPurchasedCoupons(id);\n\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no purchased coupons for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "@Override\r\n\tprotected ArrayList<Customer> selectComponents() throws SQLException {\r\n\r\n\t\t// Customers list\r\n\t\tArrayList<Customer> customers = new ArrayList<>();\r\n\r\n\t\t// Select customers\r\n\t\twhile (rs.next()) {\r\n\r\n\t\t\t// Current customer\r\n\t\t\tCustomer customer = new Customer();\r\n\r\n\t\t\t// Current customer coupons list\r\n\t\t\tArrayList<Coupon> coupons = new ArrayList<>();\r\n\r\n\t\t\t// Set customer details\r\n\t\t\tcustomer.setId(rs.getLong(1));\r\n\t\t\tcustomer.setCustName(rs.getString(2));\r\n\t\t\tcustomer.setPassword(rs.getString(3));\r\n\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(CustomerSQLQueries.SELECT_COUPONS_BY_CUSTOMER_ID);\r\n\t\t\tps.setLong(1, customer.getId());\r\n\r\n\t\t\tResultSet rs1 = ps.executeQuery();\r\n\r\n\t\t\t// Select current customer coupons\r\n\t\t\twhile (rs1.next()) {\r\n\r\n\t\t\t\t// Current coupon\r\n\t\t\t\tCoupon coupon = getCoupon(rs1);\r\n\r\n\t\t\t\t// Add current coupon to current customer coupons list\r\n\t\t\t\tcoupons.add(coupon);\r\n\t\t\t}\r\n\r\n\t\t\t// Set current customer coupons\r\n\t\t\tcustomer.setCoupons(coupons);\r\n\r\n\t\t\t// Add current customer to customers list\r\n\t\t\tcustomers.add(customer);\r\n\t\t}\r\n\r\n\t\treturn customers;\r\n\t}", "public List<PrestationCDI> listingContratCDIEnCours(Date d,Date deux)\n\t\t\tthrows DAOException {\n\t\tArrayList<PrestationCDI> liste = new ArrayList<PrestationCDI>();\n\t\tPrestationCDI prestation=null;\t\t\n\t\tTachesSAP tache=null;\n\t\tEmployeur employeur = null;\n\t\tIdentite identite=null;\n\t\tStatement st = null;\n\t\tResultSet res = null;\n\t\tString req = \" SELECT distinct(id_prestationcontrat) as c,\"\n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\".id_identite,id_employeur,id_tache,heuresminimois_pr, \"\n\t\t\t\t+ \"salairehor_pr,facsalairehor_pr,panier_pr,deplacement_pr, \"\n\t\t\t\t+ \"commentaire_pr,datedebut_pr,heurescontratsalarie FROM \" \n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\" inner join \"\n\t\t\t\t+DAOConstants.t_identite\n\t\t\t\t+\" on \"\n\t\t\t\t+ DAOConstants.t_sapprestation\n\t\t\t\t+\".id_identite=\"\n\t\t\t\t+DAOConstants.t_identite\n\t\t\t\t+\".id_identite\"\n\t\t\t\t+ \" where (datefin_pr is null or datefin_pr >'\"+d\n\t\t\t\t+\"') and datedebut_pr <='\"+deux\n\t\t\t\t+\"' order by nom_identite asc\";\n\n\t\ttry {\n\t\t\tst = connect.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,\n\t\t\t\t\tResultSet.CONCUR_READ_ONLY);\n\t\t\tres = st.executeQuery(req);\n\t\t\twhile (res.next()) {\n\t\t\t\tTachesSAPDAO serdao=new TachesSAPDAO();\n\t\t\t\ttache=serdao.findByID(res.getInt(4));\n\t\t\t\tEmployeurDAO empdao = new EmployeurDAO();\n\t\t\t\temployeur = empdao.findByID(res.getInt(3));\n\t\t\t\tIdentiteDAO idao=new IdentiteDAO();\n\t\t\t\t identite=idao.findByID(res.getInt(2));\n\t\t\t\t\n\n\t\t\t\t prestation = new PrestationCDI(res.getInt(1),identite,employeur,tache,res.getInt(5),\n\t\t\t\t\t\tres.getFloat(6),res.getFloat(7),res.getFloat(8),res.getFloat(9),res.getString(10),\n\t\t\t\t\t\tres.getDate(11),res.getInt(12));\n\t\t\t\tliste.add(prestation);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\t// Fermeture du resultset\n\t\t\tDAOUtil.closeResultSet(res);\n\n\t\t\t// Fermeture du statement\n\t\t\tDAOUtil.closeStatement(st);\n\t\t}\n\n\t\treturn liste;\n\n\t}", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "List<Bug> getCompletedBugsBetweenDates(Integer companyId, Date since, Date until);", "Collection<Auction> getFutureAuctions();", "public Collection<Coupon> getAllCoupon() throws DbException;", "public List<Borrow> getUsersToNotify() {\n\t\tList<Borrow> borrows = new ArrayList<Borrow>();\n\t\ttry (Connection conn = DriverManager.getConnection(this.hostUrl,this.username,this.password)) {\n\t\t System.out.println(\"Database connected!\");\n\t\t\tStatement st = null;\n\t\t\ttry {\n\t\t\t\tst = conn.createStatement();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t ResultSet rs = null;\n\t String sql = \"SELECT u.name as user, u.mobile as mobile, b.name as book FROM borrows br \" + \n\t \t\t\" LEFT JOIN users u ON u.id=br.user_id \" + \n\t \t\t\" LEFT JOIN books b ON b.id=br.book_id \" + \n\t \t\t\" WHERE br.return_on is Null AND br.issue_date >= DATE(NOW()) - INTERVAL 2 DAY\";\n\t try {\n\t\t\t\trs = st.executeQuery( sql );\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\twhile (rs.next()) { \n\t\t\t\t\tBorrow borrow = new Borrow();\n\t\t\t\t\tborrow.setUser_name(rs.getString(1));\n\t\t\t\t\tborrow.setMobile(rs.getLong(2));\n\t\t\t\t\tborrow.setBook_name(rs.getString(3));\n\t\t\t\t\tborrows.add(borrow);\n\t\t\t\t }\n\t\t\t conn.close(); \n\t\t\t} catch (NumberFormatException | SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\treturn borrows;\n\t}", "@Override\n public Set<Event> getNextEvents(LocalDateTime to) {\n return null;\n }", "private void printCustomerCoupons(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(coupons.size()+\" coupons found for this customer\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public static ArrayList<CustomerInfoBean> getCutomers_onWait() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=0;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<CustomerBean> getCutomers(Date fromDate, Date toDate) {\r\n\t\tCustomerBean bean = null;\r\n\t\tArrayList<CustomerBean> customerList = new ArrayList<CustomerBean>();\r\n\t\tint customerId, familyMember;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, customer_district, customer_family_size, customer_phone,customer_monthly_income, customer_family_income, customer_payment_type, customr_image, created_on FROM customer where created_on BETWEEN(\"\r\n\t\t\t\t\t+ fromDate + \"\" + toDate + \") ;\";\r\n\t\t\tStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tfamilyMember = rs.getInt(6);\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\t\t\t\trs.getString(10);\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setFamilyMember(familyMember);\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public ArrayList<Coupon> getCustomerCoupons() throws Exception {\n\n\t\treturn customersDBDAO.getAllCustomerCoupons(this.getCustomerId());\n\n\t}", "List<Bill> todaysBills() throws SQLException;", "public void AddAvailableDates()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query; \n\t\t\t\n\t\t\tfor(int i = 0; i < openDates.size(); i++)\n\t\t\t{\n\t\t\t\tboolean inTable = CheckAvailableDate(openDates.get(i)); \n\t\t\t\tif(inTable == false)\n\t\t\t\t{\n\t\t\t\t\tquery = \"INSERT INTO Available(available_hid, price_per_night, startDate, endDate)\"\n\t\t\t\t\t\t\t+\" VALUE(\"+hid+\", \"+price+\", '\"+openDates.get(i).stringStart+\"', '\"+openDates.get(i).stringEnd+\"')\";\n\t\t\t\t\tint result = con.stmt.executeUpdate(query); \n\t\t\t\t}\n\t\t\t}\n\t\t\tcon.closeConnection();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Override\n\t/** Marks all expired Coupons in the Coupon table in the database */\n\tpublic void markExpiredCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to mark expired Coupons via prepared\n\t\t\t// statement\n\t\t\tString markExpiredCouponsSQL = \"update coupon set expired='expired' where end_date < current_date\";\n\t\t\t// Not working variants:\n\t\t\t// String markExpiredCouponsSQL = \"update coupon set\n\t\t\t// expired='expired' where end_date < 2017-05-21\";\n\t\t\t// String markExpiredCouponsSQL = \"update coupon set\n\t\t\t// expired='expired' where end_date < getdate()\";\n\t\t\t// String markExpiredCouponsSQL = \"update coupon set\n\t\t\t// expired='expired' where date < (format ( getdate(),\n\t\t\t// 'YYYY-MM-DD'))\";\n\t\t\t// String markExpiredCouponsSQL = \"update coupon set\n\t\t\t// expired='expired' where end_date < ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(markExpiredCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\n\t\t\t// Not working (prepared statement variant)\n\t\t\t// java.util.Date todayDate = Calendar.getInstance().getTime();\n\t\t\t// SimpleDateFormat formatter = new SimpleDateFormat(\"YYYY-MM-DD\");\n\t\t\t// String todayString = formatter.format(todayDate);\n\t\t\t// pstmt.setString(1, todayString);\n\n\t\t\tint resExpired = pstmt.executeUpdate();\n\t\t\tif (resExpired != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Expired coupons have been marked successfully\");\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupons not found in the\n\t\t\t\t// database\n\t\t\t\tSystem.out.println(\"Coupons marking has been failed - subject entries not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon marking in the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupons marking has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "public static void getAccountDateBefore(java.util.Date date) {\n\t\t\t\n\t\t\t\n\t\t java.sql.Date sqlDate = new java.sql.Date(date.getTime());\n\t\t\t\n\t\t\taccounts.clear();\n\t\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND dateCreated <\" + \"'\" + sqlDate + \"'\";\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAccountDateBefore\");\n\t\t }\n\t\n\t\t}", "@Override\n\tpublic List<Get_coupons> findGetcouponsByUserid(String userid) {\n\t\tList<Get_coupons> list=getcouponsDAO.findGetcouponsByUserid(userid);\n\t\treturn list;\n\t}", "private void insertReadyConn(EONConnection conn) {\n\t\tListIterator<EONConnection> it = readyConns.listIterator();\n\t\t// Start at the beginning of the list and go up until we find a conn with a gamma >= to this one, then\n\t\t// insert it before (so that first-notifying conns get to send pkts first)\n\t\twhile (it.hasNext()) {\n\t\t\tEONConnection testConn = it.next();\n\t\t\tif (testConn.getGamma() >= conn.getGamma()) {\n\t\t\t\t// Rewind so we insert before this one\n\t\t\t\tit.previous();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tit.add(conn);\n\t}", "@Override\n\tpublic List<FilterStock> today() {\n\t\treturn filterStockRepo.findToday();\n\t}", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n public Event[] simulate() {\n // Find the first avaiable conter.\n for (Counter c : this.counter) {\n if (c.isAvailable()) {\n // The customer should go to the first\n // Avaiable counter and get served.\n return new Event[] {\n new ServiceBeginEvent(this.customer, c)\n };\n }\n }\n // If no such counter can be found, the customer should depart.\n return new Event[] {\n new DepartureEvent(this.customer, (this.customer.getArrival()))\n };\n }", "public ArrayList<OverdueNotice> createOverdueNotices(){\n ArrayList<OverdueNotice> overdueList = new ArrayList<OverdueNotice>();\n Set<String> patronNames = this.patron.keySet();\n for (String patronName : patronNames){\n ArrayList<Book> books = this.patron.get(patronName).getBooks();\n for (Book book : books){\n if (book.getDueDate() == (this.calendar.getDate()-1)){\n overdueList.add(new OverdueNotice(this.patron.get(patronName),this.calendar.getDate()));\n break;\n }\n }\n }\n return overdueList;\n }", "private void printCustomerCouponsByCategory(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tCategory category = this.getCategory();\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons(category);\n//\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons in the chosen category\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer int chosen category\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TCustomerMemberInvite> fetchByCdate(Timestamp... values) {\n return fetch(TCustomerMemberInvite.T_CUSTOMER_MEMBER_INVITE.CDATE, values);\n }", "public static ArrayList<BHP> getBHPsOnDemand(Resident resident, Date date) {\n\n List<Prescription> listPrescriptions = PrescriptionTools.getOnDemandPrescriptions(resident, date);\n LocalDate lDate = new LocalDate(date);\n long begin = System.currentTimeMillis();\n EntityManager em = OPDE.createEM();\n ArrayList<BHP> listBHP = new ArrayList<BHP>();\n\n try {\n Date now = new Date();\n\n String jpql = \" SELECT bhp \" +\n \" FROM BHP bhp \" +\n \" WHERE bhp.prescription = :prescription \" +\n \" AND bhp.soll >= :from AND bhp.soll <= :to AND bhp.dosis > 0 \";\n Query queryOnDemand = em.createQuery(jpql);\n\n for (Prescription prescription : listPrescriptions) {\n queryOnDemand.setParameter(\"prescription\", prescription);\n queryOnDemand.setParameter(\"from\", lDate.toDateTimeAtStartOfDay().toDate());\n queryOnDemand.setParameter(\"to\", SYSCalendar.eod(lDate).toDate());\n\n ArrayList<BHP> listBHP4ThisPrescription = new ArrayList<BHP>(queryOnDemand.getResultList());\n\n PrescriptionSchedule schedule = prescription.getPrescriptionSchedule().get(0);\n // On Demand prescriptions have exactly one schedule, hence the .get(0).\n // There may not be more than MaxAnzahl BHPs resulting from this prescription.\n if (listBHP4ThisPrescription.size() < schedule.getMaxAnzahl()) {\n // Still some BHPs to go ?\n for (int i = listBHP4ThisPrescription.size(); i < schedule.getMaxAnzahl(); i++) {\n BHP bhp = new BHP(schedule);\n bhp.setIst(now);\n bhp.setSoll(date);\n bhp.setSollZeit(SYSCalendar.BYTE_TIMEOFDAY);\n bhp.setDosis(schedule.getMaxEDosis());\n bhp.setState(BHPTools.STATE_OPEN);\n listBHP4ThisPrescription.add(bhp);\n }\n }\n listBHP.addAll(listBHP4ThisPrescription);\n // outcome BHPs\n// listBHP.addAll(new ArrayList<BHP>(queryOutcome.getResultList()));\n }\n\n Collections.sort(listBHP, getOnDemandComparator());\n } catch (Exception se) {\n OPDE.fatal(se);\n } finally {\n em.close();\n }\n SYSTools.showTimeDifference(begin);\n return listBHP;\n }", "public Collection<Message> findNextForChecking();", "@After(CUSTOMER_REPOSITORY_FIND_ALL_METHOD)\n\tpublic void afterFindAll() {\n\t\tSystem.out.println(\"CustomerRepository.findAll() has been called...\");\n\t}", "public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "@Override\n\tprotected boolean until() {\n\t\treturn true;\n\t}", "@Override\n\tpublic HashSet<Coupon> getAllCoupon() throws ClassNotFoundException, SQLException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tHashSet<Coupon> collectionCoupon = new HashSet<Coupon>();\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tcollectionCoupon.add(getCoupon(resultSet.getLong(1)));\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn collectionCoupon;\n\t}", "@Scheduled(fixedRate = 500)\n public void processStatisticsUntil() {\n List<Transaction> allByTimestampAfter = transactionRepository.findAllByTimestampAfter(Instant.now().toEpochMilli() - minuteInMillis);\n Statistics statistics = statisticsCache.getStatistics();\n DoubleSummaryStatistics amountSummaryStatistics = allByTimestampAfter.stream().mapToDouble(Transaction::getAmount).summaryStatistics();\n statistics.setAvg(amountSummaryStatistics.getAverage());\n statistics.setCount(amountSummaryStatistics.getCount());\n statistics.setMax(amountSummaryStatistics.getMax());\n statistics.setMin(amountSummaryStatistics.getMin());\n statistics.setSum(amountSummaryStatistics.getSum());\n log.debug(\"stats {} \", statistics);\n }", "public List<Contract> getCleaningContracts(){\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(\"SELECT * FROM CONTRACT WHERE SERVICETYPE=2 AND\"\n\t\t\t\t\t+ \"(DATEENDING >= NOW() OR DATEENDING IS NULL)\", new ContractRowMapper());\n\t\t}catch (EmptyResultDataAccessException e){\n\t\t\treturn new ArrayList<Contract>();\n\t\t}\n\t}", "private void fetchData(int whenCode){\n NewConnection c = new NewConnection();\n int custID, custStatus, r = 0;\n String custName, custAddress, custReturnDate;\n DateConverter dc = new DateConverter();\n \n try {\n c.openConnection();\n c.ps = c.con.prepareStatement(\"SELECT * FROM custDetail\");\n c.rs = c.ps.executeQuery();\n while (c.rs.next()){\n custStatus = c.rs.getInt(\"custStatus\");\n if (custStatus == 0){\n custID = Integer.parseInt(c.rs.getString(\"custID\"));\n custName = c.rs.getString(\"custFName\");\n custName += \" \" + c.rs.getString(\"custLName\");\n custAddress = \"<html>\" + c.rs.getString(\"custHouseNo\") + \" \" + c.rs.getString(\"custStreet\") + \"<br>\";\n custAddress += c.rs.getString(\"custBarangay\") + \", \" + c.rs.getString(\"custCityOrTown\");\n if (c.rs.getString(\"custProvince\").isEmpty())\n custAddress += \"</html>\";\n else\n custAddress += \", \" + c.rs.getString(\"custProvince\");\n custReturnDate = c.rs.getString(\"custReturnDate\");\n\n switch (whenCode){\n case 1:\n if (dc.isThisWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n case 2:\n if (dc.isNextWeek(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n\n case 3:\n if (dc.isUpcoming(custReturnDate))\n r = getRecords(r, custID, custReturnDate, custName, custAddress);\n break;\n default:\n System.out.println(\"*** An unexpected error occurred at PickUpDate -> fetchDate ***\");\n }\n }\n }\n } \n catch (SQLException ex) {\n Logger.getLogger(PickUpDate.class.getName()).log(Level.SEVERE, null, ex);\n }\n finally {\n c.closeConnection();\n }\n valuesHolder.setN(r);\n }", "private List<LocalDate> getBackDatedEntitlementDates(List<LocalDate> newChildrenDatesOfBirth, LocalDate cycleStartDate) {\n LocalDate earliestDateOfBirth = min(newChildrenDatesOfBirth);\n LocalDate rollingEntitlementDate = cycleStartDate.minusDays(entitlementCalculationDurationInDays);\n List<LocalDate> backDatedEntitlementDates = new ArrayList<>();\n\n while (rollingEntitlementDate.isAfter(earliestDateOfBirth) || rollingEntitlementDate.isEqual(earliestDateOfBirth)) {\n backDatedEntitlementDates.add(rollingEntitlementDate);\n rollingEntitlementDate = rollingEntitlementDate.minusDays(entitlementCalculationDurationInDays);\n }\n\n return backDatedEntitlementDates;\n }", "@Override\n public Set PatientsOlderThenEnlistedAfter() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>olderThanEnlistedSince = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getAge() > 21 && patient.getEnlistmentDate().after(new Date(01-01-2020))){\n olderThanEnlistedSince.add(patient);\n }else {\n System.out.println(\"No patients older than 21 enlisted after 1.1.2020.\");\n }\n });\n }\n\n return olderThanEnlistedSince;\n }", "Collection<PreprocessingLog> retrievePreprocessingLogs(final Date processingDate) throws SqlDatabaseSystemException;", "public Iterator getTransactions(Calendar date) {\n List result = new LinkedList();\n for (Iterator iterator = transactions.iterator(); iterator.hasNext();) {\n Transaction transaction = (Transaction) iterator.next();\n if (transaction.onDate(date)) {\n result.add(transaction);\n }\n }\n return (result.iterator());\n }", "public static ArrayList<ArrayList<String>> getWaitlistByDate(Date date) {\r\n con = DBConnection.getConnection();\r\n waitlist.clear();\r\n try {\r\n PreparedStatement getByDate = con.prepareStatement(\"SELECT * from WAITLIST where DATE = ?\");\r\n getByDate.setDate(1, date);\r\n ResultSet res = getByDate.executeQuery();\r\n\r\n WaitlistQueries.getArrayListResult(res);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return waitlist;\r\n }", "@Transactional(readOnly = true)\n public List<ChocolateDTO> findAll() {\n log.debug(\"Request to get all Chocolates\");\n return chocolateRepository.findAll().stream()\n .map(chocolateMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "Set<OnGoingConversation> getGeneratedConversations();", "public List<BankOperation> getOperationsAfter(int n_id){\n List<BankOperation> op_list = new ArrayList<>();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT * FROM APP.OPERATIONS where OP_ID >= \"+n_id+\" ORDER BY OP_ID DESC\")) {\n\n while (res.next()) {\n switch(res.getInt(\"OP_TYPE\")){\n //MOVEMENT\n case 1:\n op_list.add(new BankOperation.Movement(res.getInt(\"OP_ID\"), res.getInt(\"MV_AMOUNT\"), res.getInt(\"FROM_CURRENT_BALANCE\"), res.getString(\"FROM_ACCOUNT_ID\")));\n break;\n //TRANSFER\n case 2:\n op_list.add(new BankOperation.Transfer(res.getInt(\"OP_ID\"), res.getInt(\"MV_AMOUNT\"),\n res.getString(\"FROM_ACCOUNT_ID\"), res.getString(\"TO_ACCOUNT_ID\"), res.getInt(\"FROM_CURRENT_BALANCE\"),\n res.getInt(\"TO_CURRENT_BALANCE\")));\n break;\n //CREATE\n case 3:\n op_list.add(new BankOperation.Create(res.getInt(\"OP_ID\"), res.getString(\"FROM_ACCOUNT_ID\")));\n break;\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return op_list;\n }", "public void createDateList(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"DATELIST\", null);\n\n if (rs != null) {\n\n System.out.print(\"Please provide a start date: \");\n LocalDate start = LocalDate.parse(scan.nextLine());\n\n System.out.print(\"Please provide an end date: \");\n LocalDate end = LocalDate.parse(scan.nextLine());\n\n while (!start.isAfter(end)){\n\n String sql = \"INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, start.toString());\n pStmt.setString(2, end.toString());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "@RequestMapping(path = \"/last24hDeliveredItems\", method = RequestMethod.GET)\n public List<DeliveredItem> getLast24hDeliveredItems() {\n Query queryObject = new Query(\"Select * from delivery_item\", \"blablamove\");\n QueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n System.out.println(\"queryResult : \" + queryResult);\n List<DeliveredItem> deliveredItemList = resultMapper\n .toPOJO(queryResult, DeliveredItem.class);\n\n LocalDateTime stop = LocalDateTime.now().minusHours(0);\n LocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n return deliveredItemList.stream().filter(deliveredItem -> instantIsBetweenDates(deliveredItem.getTime(), start, stop)).collect(Collectors.toList());\n }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public void ready() {\n\n try {\n Date date = new Date();\n date.getTime();\n List<Flashcard> toRemove = new ArrayList<>();\n for (Flashcard card : cards) {\n if (card.getRepetitionDate().after(date)) {\n toRemove.add(card);\n }\n }\n cards.removeAll(toRemove);\n\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Aufbereiten des Decks. \" + ex);\n }\n }", "public List<Connection> findConnectionsNotRelatedToConnectionMeterEvents(LocalDate date, List<String> connectionIncludeList) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT distinct cgs.connection FROM ConnectionGroupState cgs\");\n sql.append(\" WHERE cgs.validFrom <= :startDate\");\n sql.append(\" AND cgs.validUntil >= :startDate\");\n sql.append(\" AND cgs.connection NOT IN \");\n sql.append(\" (SELECT cme.connection FROM ConnectionMeterEvent cme WHERE cme.dateTime >= :startTime AND cme.dateTime < :endTime)\");\n sql.append(\" AND cgs.connection.entityAddress IN :connectionIncludeList\");\n\n TypedQuery<Connection> query = entityManager.createQuery(sql.toString(), Connection.class);\n query.setParameter(\"startDate\", date.toDateMidnight().toDate());\n query.setParameter(\"startTime\", date.toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"endTime\", date.plusDays(1).toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"connectionIncludeList\", connectionIncludeList);\n return query.getResultList();\n }", "public org.drip.analytics.date.JulianDate firstCouponDate()\n\t{\n\t\ttry {\n\t\t\treturn new org.drip.analytics.date.JulianDate (_lsPeriod.get (0).endDate());\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "public interface CouponRepository extends JpaRepository<Coupon, Long> {\n public Coupon findFirstByUid(Long uid);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.expireDate>=?2 order by c.availableDate desc\")\n public List<Coupon> findAvailableCoupons(Long uid, Date date);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.expireDate<?2 order by c.availableDate desc\")\n public List<Coupon> findExpiredCoupons(Long uid, Date date);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.usageCondition <= ?2 and c.expireDate >?3 and c.hasUsed<>true and c.locked <> true order by c.amount desc, c.availableDate asc\")\n public List<Coupon> findFirstByAmountAndExpireDate(Long uid, Long price, Date date, Pageable pageable);\n}", "public List<Transaction> getAllDepositTransactionsByDonor(Integer personId, int start, int numOfRows) throws MiddlewareQueryException;", "public HashMap<String, Double> getFreezedListByDate(Timestamp dateCurrent){\r\n HashMap<String, Double> freezedMap = new HashMap<>();\r\n try (Connection connection = jdbcUtils.getConnection();){\r\n preparedStatement = connection.prepareStatement(GET_FOLLOWERS_ALL_SQL);\r\n resultSet = preparedStatement.executeQuery();\r\n while (resultSet.next()) {\r\n if (resultSet.getTimestamp(FOLLOWERS_DATE_FREEZ_COLUMN_NAME).before(dateCurrent)){\r\n if (freezedMap.containsKey(resultSet.getString(FOLLOWERS_PERIODICAL_COLUMN_NAME))){\r\n String keyPeriodical = resultSet.getString(FOLLOWERS_PERIODICAL_COLUMN_NAME);\r\n double existMoney = freezedMap.get(keyPeriodical);\r\n double putMoney = existMoney + resultSet.getDouble(FOLLOWERS_MOUNTHPRICE_COLUMN_NAME);\r\n freezedMap.put(keyPeriodical, putMoney);\r\n } else {\r\n freezedMap.put(resultSet.getString(FOLLOWERS_PERIODICAL_COLUMN_NAME)\r\n , resultSet.getDouble(FOLLOWERS_MOUNTHPRICE_COLUMN_NAME));\r\n } \r\n }\r\n }\r\n } catch (SQLException ex) {\r\n configLog.init();\r\n logger.info(LOG_SQL_EXCEPTION_MESSAGE + AdminDao.class.getName());\r\n Logger.getLogger(AdminDao.class.getName()).log(Level.SEVERE, null, ex);\r\n throw new RuntimeException();\r\n }\r\n return freezedMap;\r\n }", "public ArrayList<BikeData> getAllTravellingData (){\n ArrayList<BikeData> datalist = new ArrayList<>();\n \n try(\n Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_TRAVEL_DATA);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n \n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n datalist.add(bd);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return datalist;\n }", "@Override\n\tpublic JavaBean1 findB(String date) {\n\t\t\n\t\tArrayList<PaymentOrderPO> pos=new ArrayList<>();\n\t\tjb1=new JavaBean1();\n\t\tString sql=\"select * from paymentlist\";\n\t\tjb1.setResultMessage(ResultMessage.NotExist);\n\t\ttry {\n\t\t\tstmt=con.prepareStatement(sql);\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tpo=new PaymentOrderPO();\n\t\t\t\tif(rs.getString(\"date\").equals(date)&&\n\t\t\t\t\t\trs.getString(\"approState\").equals(\"NotApprove\")){\n\t\t\t\t\tpo.setID(rs.getString(1));\n\t\t\t\t\tpo.setDate(rs.getString(2));\n\t\t\t\t\tpo.setAmount(rs.getDouble(3));\n\t\t\t\t\tpo.setPayer(rs.getString(4));\n\t\t\t\t\tpo.setBankAccount(rs.getString(5));\n\t\t\t\t\tpo.setEntry(rs.getString(6));\n\t\t\t\t\tpo.setNote(rs.getString(7));\n\t\t\t\t\tpo.setApproState(ApproState.valueOf(rs.getString(\"approState\")));\n\t\t\t\t\tpos.add(po);\n\t\t\t\t\tjb1.setResultMessage(ResultMessage.Success);\n\t\t\t\t}\n\t\t\t\tif(rs.getString(\"date\").equals(date)&&\n\t\t\t\t\t\trs.getString(\"approState\").equals(\"Approve\")){\n\t\t\t\t\tpo.setID(rs.getString(1));\n\t\t\t\t\tpo.setDate(rs.getString(2));\n\t\t\t\t\tpo.setAmount(rs.getDouble(3));\n\t\t\t\t\tpo.setPayer(rs.getString(4));\n\t\t\t\t\tpo.setBankAccount(rs.getString(5));\n\t\t\t\t\tpo.setEntry(rs.getString(6));\n\t\t\t\t\tpo.setNote(rs.getString(7));\n\t\t\t\t\tpo.setApproState(ApproState.valueOf(rs.getString(\"approState\")));\n\t\t\t\t\tpos.add(po);\n\t\t\t\t\tjb1.setResultMessage(ResultMessage.Success);\n\t\t\t\t}\n\t\t\t}\n\t\t\tjb1.setObject(pos);\n\t\t\t return jb1;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn jb1;\n\t\t}\n\t}", "protected void deadlineLeasing() {\n log.info(\"OrdersBean : deadlineLeasing\");\n List<OrdersEntity> ordersEntitiesDeadline = ordersServices.findAllOrdersByIdUserAndStatusIsValidate(usersBean.getUsersEntity().getId());\n if (!ordersEntitiesDeadline.isEmpty()) {\n contractsBean.findAllContractsInAllMyOrdersForLeasingAndDeadlineIsLowerThan1Month(ordersEntitiesDeadline);\n }\n }", "private void calculateDebitAgingDATE(List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, String customerId, EMCUserData userData) {\n for (int i = 0; i < periodQueries.size(); i++) {\n //Calculate sum of debits & credits for each period\n EMCQuery query = periodQueries.get(i);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n Object[] totals = (Object[]) util.executeSingleResultQuery(query, userData);\n if (totals != null) {\n BigDecimal debitTotal = (BigDecimal) totals[0] == null ? BigDecimal.ZERO : (BigDecimal) totals[0];\n BigDecimal debitSettledTotal = (BigDecimal) totals[1] == null ? BigDecimal.ZERO : (BigDecimal) totals[1];\n BigDecimal creditTotal = (BigDecimal) totals[2] == null ? BigDecimal.ZERO : (BigDecimal) totals[2];\n BigDecimal creditSettledTotal = (BigDecimal) totals[3] == null ? BigDecimal.ZERO : (BigDecimal) totals[3];\n\n //Subtract outstanding credits from outstanding debits\n BigDecimal binAmount = debitTotal.subtract(debitSettledTotal).subtract(creditTotal.subtract(creditSettledTotal));\n agingList.get(i).setBinAmount(binAmount);\n } else {\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n }\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n int bin = 0;\n //For each bin, revert transaction history\n for (DebtorsAgingHelper binHelper : agingList) {\n //Revert debits and credits seperately.\n EMCQuery settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"debitSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal debitSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (debitSettled == null) {\n debitSettled = BigDecimal.ZERO;\n }\n\n settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n //System.out.println(\"Bin \" + (bin++ + 1) + \" Debit Added Back: \" + debitSettled + \" Credit Added Back: \" + creditSettled);\n\n //Add settled amount & discount back to bin and subtract credit total\n //binHelper.setBinAmount(binHelper.getBinAmount().add((debitSettled).add(totalDiscount)).subtract(creditSettled));\n binHelper.setBinAmount(binHelper.getBinAmount().add(debitSettled).subtract(creditSettled));\n }\n }\n }", "@Override\n\tpublic List<Class> endingSoon() {\n\t\treturn mainDao.endingSoon();\n\t}", "public ArrayList <User> getuserList2(){\n \n ArrayList<User> userList = new ArrayList<User>();\n Connection con = DBconnect.connectdb();\n \n Statement st;\n ResultSet rs;\n \n try {\n \n String today = new SimpleDateFormat(\"yyyy-MM-dd\").format(Calendar.getInstance().getTime());\n \n \n \n String query= \"SELECT * FROM Product WHERE Qty>0 and DATEDIFF(day,EXP_Date,'\" + today + \"')>=1 \";//DATEDIFF - today is current day , Date is database day\n \n st = con.createStatement();\n rs= st.executeQuery(query);\n User user;\n while(rs.next()){\n user = new User(rs.getDate(\"EXP_Date\"),rs.getInt(\"Product_Code\"),rs.getFloat(\"Total_Cost\"),rs.getFloat(\"Qty\"));\n userList.add(user);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return userList;\n }", "AbstractList<BalanceChange> recentActivity() {\r\n\t\tArrayList<BalanceChange> activity = new ArrayList<BalanceChange>();\r\n\t\t\r\n\t\tint i=10;\r\n\t\twhile (i > 0) {\r\n\t\t\t//TODO\r\n\t\t\ti--;\r\n\t\t}\r\n\t\t\r\n\t\treturn activity;\r\n\t}", "public interface CouponService {\n /**\n * 获得可以兑换的优惠券类型\n * @param mid\n * @return\n */\n public List<CouponTypeModel> getCouponTypes(long mid);\n\n /**\n * 获得优惠券使用记录,即已经使用过的优惠券\n * @param mid\n * @return\n */\n public List<CouponModel> getUsedCoupons(long mid, int page, int pageNum);\n\n /**\n * 获得已经使用过的优惠券数目\n * @param mid\n * @return\n */\n public int getUsedCouponTotalNum(long mid);\n\n /**\n * 获得未使用但未过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getUnusedCoupons(long mid, long date, int page, int pageNum);\n\n /**\n * 获得未使用但未过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getUnusedCouponTotalNum(long mid,long date);\n\n /**\n * 获得未使用且已过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getExpiredCoupons(long mid,long date,int page,int pageNum);\n\n /**\n * 获得未使用且已过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getExpiredCouponTotalNum(long mid,long date);\n\n /**\n * 使用积分兑换优惠券\n * @param mid\n * @param type\n * @return\n */\n public void exchangeCoupon(long mid,int type);\n}", "public void getUsersByDays() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService.getUsersByDays();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }", "public static ArrayList<Knot> getKnotsArrayList(Context context,String tableName){\n\t\t\tArrayList<Knot> list = new ArrayList<Knot>();\n\t\t\tKnotitOpenHelper openHelper = KnotitOpenHelper.getInstance(context);\n\t\t\tSQLiteDatabase db = openHelper.getReadableDatabase();\n SharedPreferences prefs = context.getSharedPreferences(\"sort\",Context.MODE_PRIVATE);\n //Checking Sorting Option\n String sortBy = prefs.getString(\"sort_by\",KnotitOpenHelper.COLUMN_REMINDER_TIMESTAMP);\n Cursor c = db.query(tableName, null, null, null, null, null, sortBy);\n while (c.moveToNext()) {\n String title = c.getString(c.getColumnIndex(KnotitOpenHelper.COLUMN_TITLE));\n String des = c.getString(c.getColumnIndex(KnotitOpenHelper.COLUMN_DESC));\n String imageSource = c.getString(c.getColumnIndex(\n KnotitOpenHelper.COLUMN_IMAGE_SOURCE));\n long timestamp = c.getLong(c.getColumnIndex(KnotitOpenHelper.COLUMN_TIMESTAMP));\n long reminderTimestamp = c.getLong(c.getColumnIndex(\n KnotitOpenHelper.COLUMN_REMINDER_TIMESTAMP));\n long repeatingReminderTime = c.getLong(c.getColumnIndex(\n KnotitOpenHelper.COLUMN_REMINDER_REPEATING_TIME));\n int isRepeating = c.getInt(c.getColumnIndex(\n KnotitOpenHelper.COLUMN_REMINDER_REPEATING));\n while (getCurrentTime() > reminderTimestamp && isRepeating == 1) {\n //If knot is repeating then change the reminder time to the next occurrence\n // time.\n reminderTimestamp += repeatingReminderTime;\n }\n Knot knot = new Knot(title, des, imageSource, timestamp, reminderTimestamp,\n isRepeating, repeatingReminderTime);\n list.add(knot);\n }\n c.close();\n //Checking If sort by option is set to Upcoming\n if(sortBy.equals(KnotitOpenHelper.COLUMN_REMINDER_TIMESTAMP)){\n //Making 2 lists one with upcoming knots and second with knots which are not active.\n ArrayList<Knot> list1 = new ArrayList<>();\n ArrayList<Knot> list2 = new ArrayList<>();\n Long currentTime = getCurrentTime();\n for(int i = 0;i<list.size();i++){\n Knot knot = list.get(i);\n if(knot.reminderTimestamp > currentTime){\n list1.add(knot);\n }\n else{\n list2.add(knot);\n }\n }\n Comparator<Knot> knotComparator = new Comparator<Knot>() {\n @Override\n public int compare(Knot lhs, Knot rhs) {\n Long a = lhs.reminderTimestamp;\n Long b = rhs.reminderTimestamp;\n return a.compareTo(b);\n }\n };\n //Sorting and merging these lists to create a single list with knots sorted\n //such that upcoming knots are shown first and then knots which are knot active.\n Collections.sort(list1,knotComparator);\n Collections.sort(list2,knotComparator);\n list.clear();\n list.addAll(list1);\n list.addAll(list2);\n }\n\t\t\treturn list;\n\t\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.DebtEntry insertNewDebts(int i);", "@Override\r\n\tpublic ArrayList printTransactions(String phone,LocalDateTime sd, LocalDateTime ed) {\n\t\tArrayList li = new ArrayList<>();\r\n\t\tfor (WalletTransactions walletTransac: transacList){\r\n\t\t\tif(walletTransac.getPhoneNum()==phone) {\r\n\t\t\t\r\n\t\t\tif(walletTransac.getDate().isAfter(sd) && walletTransac.getDate().isBefore(ed))\r\n\t\t\t{\r\n\t\t\t\tli.add(walletTransac);\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}\r\n\t\treturn li;\r\n\r\n\t\r\n\r\n}", "public void customerdownloadFromSQL(Connection connection) throws SQLException{\n String sql1 = \"SELECT * FROM customers\";\r\n Statement statement1 = connection.createStatement();\r\n\r\n ResultSet result1 = statement1.executeQuery(sql1);\r\n customers.clear();\r\n while(result1.next()){\r\n int id = result1.getInt(\"id\");\r\n String firstname = result1.getString(\"first_name\");\r\n String lastname = result1.getString(\"last_name\");\r\n int age = result1.getInt(\"age\");\r\n int gender = result1.getInt(\"gender\");\r\n double money = result1.getDouble(\"money\");\r\n\r\n Customer customer = new Customer(firstname,lastname,age,gender,money);\r\n customers.add(customer);\r\n }\r\n }", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchByTransactionDate(LocalDate... values) {\n return fetch(Income.INCOME.TRANSACTION_DATE, values);\n }", "public Cursor fetchAllRecurringTransactions(){\n Cursor cursor = mDb.query(TransactionEntry.TABLE_NAME,\n null,\n TransactionEntry.COLUMN_RECURRENCE_PERIOD + \"!= 0\",\n null, null, null,\n AccountEntry.COLUMN_NAME + \" ASC, \" + TransactionEntry.COLUMN_RECURRENCE_PERIOD + \" ASC\");\n// DatabaseHelper.COLUMN_RECURRENCE_PERIOD + \" ASC, \" + DatabaseHelper.COLUMN_TIMESTAMP + \" DESC\");\n return cursor;\n }", "@SuppressWarnings(\"unchecked\")\n public List<ConnectionMeterEvent> findConnectionMeterEventsForPeriod(LocalDate fromDate, LocalDate endDate) {\n StringBuilder queryString = new StringBuilder();\n queryString.append(\"SELECT cme FROM ConnectionMeterEvent cme \");\n queryString.append(\" WHERE cme.dateTime >= :fromDate \");\n // it is inclusive because i add a day to the endDate\n queryString.append(\" AND cme.dateTime < :endDate \");\n\n Query query = getEntityManager().createQuery(queryString.toString());\n query.setParameter(\"fromDate\", fromDate.toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n query.setParameter(\"endDate\", endDate.plusDays(1).toDateMidnight().toDateTime().toDate(), TemporalType.TIMESTAMP);\n\n return query.getResultList();\n }", "public List<Order> getReadyOrders() throws SQLException {\n\t\tList<Order> orders = oCtr.findAll();\n\t\tList<Order> readyOrders = new LinkedList<Order>();\n\n\t\tfor (int i = 0; i < orders.size(); i++) {\n\t\t\tif (orders.get(i).getToDeliver() && orders.get(i).getIsReady() && !orders.get(i).getIsDelivered()) {\n\t\t\t\treadyOrders.add(orders.get(i));\n\t\t\t}\n\t\t}\n\t\treturn readyOrders;\n\t}", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "@Override\n\tpublic List<FoodTruckEntity> findByExpirationDate() {\n\t\tDate date=new Date();\n\t\tList<FoodTruckEntity> list=repo.findByExpirationDateGreaterThanEqual(date);\n\t\treturn list;\n\t}" ]
[ "0.6087108", "0.57188237", "0.54081625", "0.53688526", "0.5360928", "0.5187247", "0.5111332", "0.50765085", "0.5023892", "0.5007181", "0.49903187", "0.49242198", "0.48711276", "0.4845535", "0.48454365", "0.47924012", "0.4789846", "0.47673282", "0.47097445", "0.47047988", "0.4691054", "0.46513292", "0.46491933", "0.46160182", "0.4602759", "0.45946875", "0.4577694", "0.457574", "0.4574615", "0.45530826", "0.45467228", "0.4534112", "0.4533443", "0.45305583", "0.45254326", "0.4519543", "0.45131585", "0.45094106", "0.4506154", "0.45016894", "0.44857186", "0.44787896", "0.4458936", "0.44564614", "0.44398898", "0.44226217", "0.44107747", "0.44101572", "0.4409813", "0.44060433", "0.43915644", "0.43902093", "0.43768695", "0.4375174", "0.43726224", "0.4371995", "0.43673533", "0.4365166", "0.4360863", "0.43594283", "0.43575385", "0.43544367", "0.4347678", "0.43458205", "0.43401334", "0.43393514", "0.43376902", "0.43340874", "0.43288365", "0.43287906", "0.43263564", "0.43248868", "0.4323097", "0.43157566", "0.4292562", "0.4291542", "0.42910713", "0.42908204", "0.42863476", "0.4278313", "0.42761254", "0.42695725", "0.42694557", "0.42604488", "0.42601272", "0.42594376", "0.4257907", "0.42532063", "0.42481452", "0.42439428", "0.42335063", "0.42330936", "0.4229949", "0.42286667", "0.42251217", "0.42250612", "0.42246985", "0.42230114", "0.42212987", "0.42207265" ]
0.5652332
2
The method finds the coupons with the id and the category that the company inserted.
List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }", "public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "List<Coupon> findAllByCategory(Category category);", "List<Coupon> findByCategory(Category category);", "public ArrayList<Coupon> getCoupons(ArrayList<Long> id) {\n\t\treturn couponRepository.getCoupons(id);\n\t}", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "private void printCustomerCouponsByCategory(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tCategory category = this.getCategory();\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons(category);\n//\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons in the chosen category\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer int chosen category\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "List<Coupon> findByCompanyId(int companyId);", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Coupon getCoupon(int id) throws DbException;", "@Override\n\tpublic List<Coupon> getAllPurchaseCouponsByType(CouponType type, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByType(id, type);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons in this categorie for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);", "@Override\n\t/** Accepts Coupon ID and returns related Coupon object */\n\tpublic Coupon getCoupon(int id) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Creating Coupon object to fill it later with data from SQL query\n\t\t// result and for method to return it afterwards\n\t\tCoupon coupon = new Coupon();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupon via prepared statement\n\t\t\tString getCouponSQL = \"select * from coupon where id = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponSQL);\n\t\t\t// Putting method accepted ID into SQL string\n\t\t\tpstmt.setInt(1, id);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// If query result has data (if Coupon has been found) do\n\t\t\tif (resCoup.next()) {\n\t\t\t\t// Set Coupon object ID to ID variable that method received\n\t\t\t\tcoupon.setId(id);\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// // Write retrieval success confirmation to the console\n\t\t\t\t// System.out.println(\"Coupon has been found successfully:\" +\n\t\t\t\t// coupon);\n\t\t\t} else {\n\t\t\t\t// If query result is empty (Coupon hasn't been found) throw\n\t\t\t\t// exception\n\t\t\t\tSystem.out.println(\"Coupon retrieve has been failed - Coupon ID not found\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return Coupon\n\t\treturn coupon;\n\t}", "Coupon findByCompanyIdAndTitle(int companyId, String title);", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "public Categorie getCategorieById(long id);", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "@Override\n\tpublic ArrayList<Coupon> getCouponByType(Coupon.CouponType type, Company c) throws CouponSystemException {\n\t\tConnection con = cp.getConnection(); // Get the connection\n\n\t\tCoupon coup = new Coupon();\n\t\tArrayList<Coupon> couponList = new ArrayList<>();\n\t\ttry (Statement st = con.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\t\"SELECT coupon.* from company_coupon right join coupon on company_coupon.coupon_id = coupon.id where company_coupon.comp_id=\"\n\t\t\t\t\t\t\t\t+ c.getId() + \"and type= '\" + type + \"'\")) {\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tcoup = new Coupon(rs.getString(2), rs.getDate(3), rs.getDate(4), rs.getInt(5),\n\t\t\t\t\t\tCoupon.CouponType.valueOf(rs.getString(6)), rs.getString(7), rs.getDouble(8), rs.getString(9));\n\t\t\t\tcoup.setId(rs.getLong(1));\n\t\t\t\tcouponList.add(coup);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"can not read the coupons\", e);\n\t\t} finally {\n\t\t\tcp.returnConnection(con); // return the connection to the Connection pool\n\t\t}\n\t\treturn couponList;\n\t}", "public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }", "@Override\n\tpublic List<Coupon> getAllPurchasedCoupons(int id) throws CustomDateBaseExepation {\n\n\t\tif (customerRipository.findById(id) == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + id);\n\t\t}\n\n\t\tList<Coupon> c = customerRipository.getAllPurchasedCoupons(id);\n\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no purchased coupons for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public Coupon getCoupon(long id) {\n\t\treturn Validations.verifyNotNull(couponRepository.findOne(id));\n\t}", "@Override\n\t/**\n\t * Removes all Coupons from the Coupon table in the database related to\n\t * Company ID received\n\t */\n\tpublic void deleteCouponsByCompanyID(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to remove Coupons related to specified\n\t\t\t// Company ID from the Coupon table via prepared statement\n\t\t\tString deleteCouponsByCompanyIDSQL = \"delete from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(deleteCouponsByCompanyIDSQL);\n\t\t\t// Set Company ID from variable that method received\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint resRemByComp3 = pstmt.executeUpdate();\n\t\t\tif (resRemByComp3 != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupons of specified Company have been deleted from Coupon table successfully\");\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupons related to\n\t\t\t\t// specified Company not found in the database\n\t\t\t\tSystem.out.println(\"Coupons removal has been failed - subject entries not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon removal from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupons removal has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByEndDateSQL = \"select * from coupon where end_date < ? and id in(select couponid from compcoupon where companyid = ?) order by end_date desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByEndDateSQL);\n\t\t\t// Set date variable that method received into prepared statement\n\t\t\tpstmt.setDate(1, getSqlDate(date));\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Query(\"select c from Coupon c \\n\" +\n \"join CouponCategory coupon_category on coupon_category.couponId = c.id\\n\" +\n \"join Category category on category.id = coupon_category.categoryId\\n\" +\n \"join Activity ac on ac.id = c.activityId \\n\" +\n \"and ac.online = 1 \\n\" +\n \"and ac.startTime < :nowdate\\n\" +\n \"and ac.endTime > :nowdate\\n\" +\n \"where category.id = :cid\")\n List<Coupon> findAllByCategory(Long cid, Date nowdate);", "public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\tpublic void updateCoupon(long id, Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (id == resultSet.getInt(1)) {\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TITLE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_START_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getStartDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_END_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getEndDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_AMOUNT_BY_ID);\n\t\t\t\tstatement.setInt(1, coupon.getAmount());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TYPE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getType().toString());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_MESSAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getMessage());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_PRICE_BY_ID);\n\t\t\t\tstatement.setDouble(1, coupon.getPrice());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_IMAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getImage());\n\t\t\t\tstatement.setLong(2, id);\n\n\t\t\t\tSystem.out.println(\"Coupon updated successfull\");\n\t\t\t}\n\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t}", "public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "Categorie propositionValidee(Long id) throws PropositionNotFoundException;", "@Override\n\tpublic Coupon getCoupon(long id) throws ClassNotFoundException, SQLException, ParseException {\n\t\tCoupon coupon = new Coupon();\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tPreparedStatement statement;\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tstatement.setLong(1, id);\n\t\tResultSet resultSet = statement.executeQuery();\n\n\t\twhile (resultSet.next()) {\n\t\t\tcoupon.setId(resultSet.getLong(1));\n\t\t\tcoupon.setTitle(resultSet.getString(2));\n\t\t\tcoupon.setStartDate(StringDateConvertor.convert(resultSet.getString(3)));\n\t\t\tcoupon.setEndDate(StringDateConvertor.convert(resultSet.getString(4)));\n\t\t\tcoupon.setAmount(resultSet.getInt(5));\n\t\t\tcoupon.setType(CouponType.valueOf(resultSet.getString(6)));\n\t\t\tcoupon.setMessage(resultSet.getString(7));\n\t\t\tcoupon.setPrice(resultSet.getDouble(8));\n\t\t\tcoupon.setImage(resultSet.getString(9));\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\treturn coupon;\n\t\t}\n\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn null;\n\t}", "Categorie findOne(Long id);", "ProductCategory find(int id)throws IllegalArgumentException;", "public static void updateCoupon(Context context, String id, final Coupon c)\n {\n Query reff;\n reff= FirebaseDatabase.getInstance().getReference().child(\"coupon\").orderByChild(\"seri\").equalTo(id);\n reff.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot: dataSnapshot.getChildren())\n {\n Coupon coupon=snapshot.getValue(Coupon.class);\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"coupon\").child(coupon.getIdcoupon());\n c.setIdcoupon(coupon.getIdcoupon());\n ref.setValue(c);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public Collection<Coupon> getAllCoupon() throws DbException;", "public Cvcategory findCvcategoryById(Long id);", "public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "@Override\n\tpublic List<Coupon> getAllPurchesCouponsByPrice(double price, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByPrice(id, price);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons with a price lower then this for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public Coupon addCoupon(Coupon coupon) throws CompanyDoesntExistException, CouponTitleAlreadyExistInThisCompanyException {\n Company comp = companyRepo.findById(this.companyID).get();\n if (comp == null) {\n //throw Exception\n throw new CompanyDoesntExistException(\"company doesn't exist!\");\n } else {\n coupon.setCompanyID(this.companyID); //if this company tries to add coupon to another company\n for (Coupon coup : comp.getCoupons()) {\n if (coup.getTitle().equals(coupon.getTitle())) {\n //throw Exception\n throw new CouponTitleAlreadyExistInThisCompanyException(\"coupon title is already exist!\");\n }\n }\n comp.getCoupons().add(coupon);\n companyRepo.save(comp);\n return coupon;\n }\n }", "public interface CouponDAO {\n\n\t/**\n\t * this method create coupon\n\t */\n\tpublic void createCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupon by id from coupon table\n\t */\n\tpublic void removeCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method update the coupon\n\t */\n\tpublic void updateCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method get coupon by id\n\t */\n\tpublic Coupon getCoupon(int id) throws DbException;\n\n\t/**\n\t * this method get all coupons\n\t */\n\tpublic Collection<Coupon> getAllCoupon() throws DbException;\n\n\t/**\n\t * this method get coupons by type\n\t */\n\tpublic Collection<Coupon> getCouponByType(CouponType type) throws DbException;\n\n\t/**\n\t * this method remove coupons from customer-coupon table by coupon id this\n\t * method help to delete coupon\n\t */\n\tpublic void removeCustomerCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupons from company-coupon table by coupon id this method\n\t * help to delete coupon\n\t */\n\tpublic void removeCompanyCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupons by company id, this method help to delete company\n\t */\n\tpublic void removeCouponByCompany(Company company) throws DbException;\n\n\t/**\n\t * this method remove coupons from customer-coupon table by company id this\n\t * method help to delete company\n\t */\n\tpublic void removeCustomerCoupon(Company company) throws DbException;\n\n\t/**\n\t * this method check if coupon exist by title to create one\n\t */\n\tpublic boolean checkIfExist(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method get coupons by date inside collection\n\t */\n\tpublic Collection<Coupon> getCouponByDate(Date date) throws DbException;\n\n}", "public ArrayList<Coupon> getCustomerCouponsByCategory(Category category) throws Exception {\n\t\treturn customersDBDAO.getAllCustomerCouponsByCategory(customerId, category);\n\t}", "@Override\n\tpublic void addUserCoupons(BeanUser user, BeanCoupon coupon) throws BaseException {\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\tconn=DBUtil.getConnection();\n\t\t\tString sql=\"select * from user_coupon where coupon_id=?\";\n\t\t\tjava.sql.PreparedStatement pst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, coupon.getCoupon_id());\n\t\t\tjava.sql.ResultSet rs=pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"该优惠券您已领取\",\"提示\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthrow new BaseException(\"该优惠券您已领取\");\n\t\t\t}\n\t\t\t//System.out.print(\"1.1\");\n\t\t\tsql=\"select * from commodity_order where user_id=? and coupon_id=?\";\n\t\t\tpst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, user.getUser_id());\n\t\t\tpst.setString(2, coupon.getCoupon_id());\n\t\t\trs=pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"该优惠券您已领取\",\"提示\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthrow new BaseException(\"该优惠券您已领取\");\n\t\t\t};\n\t\t\tsql=\"insert into user_coupon(user_id,coupon_id) value(?,?)\";\n\t\t\tpst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, user.getUser_id());\n\t\t\tpst.setString(2, coupon.getCoupon_id());\n\t\t\tpst.execute();\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DbException(e);\n\t\t}\n\t\tfinally{\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t}", "public void setCategoriaId(Long id);", "@Override\r\n\tpublic Company getAllCompaniesById(Integer id) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"id value is::\"+id);\r\n\t\treturn companyRepository.findCompanyById(id.longValue());\r\n\t}", "@Override\n\tpublic void createCoupon(Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, ParseException, DuplicateNameException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tboolean flag = true;\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_TITLES);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (coupon.getTitle().equals(resultSet.getString(1))) {\n\t\t\t\tflag = false;\n\t\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\t\tthrow new DuplicateNameException(\"Coupon title \" + coupon.getTitle() + \" is already exists\");\n\t\t\t}\n\t\t}\n\t\tif (flag) {\n\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.ADD_NEW_COUPON_TO_DB);\n\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\tstatement.setDate(2, StringDateConvertor.convert(coupon.getStartDate().toString()));\n\t\t\tstatement.setDate(3, StringDateConvertor.convert(coupon.getEndDate().toString()));\n\t\t\tstatement.setInt(4, coupon.getAmount());\n\t\t\tstatement.setString(5, coupon.getType().toString());\n\t\t\tstatement.setString(6, coupon.getMessage());\n\t\t\tstatement.setDouble(7, coupon.getPrice());\n\t\t\tstatement.setString(8, coupon.getImage());\n\t\t\tstatement.executeUpdate();\n\n\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_ID_BY_TITLE);\n\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\tResultSet thisCouponId = statement.executeQuery();\n\t\t\twhile (thisCouponId.next()) {\n\t\t\t\tthis.setCoupId(thisCouponId.getLong(1));\n\t\t\t}\n\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\tSystem.out.println(\"Coupon added successfull\");\n\t\t}\n\n\t}", "@Override\n\tpublic HashSet<Coupon> getAllCoupon() throws ClassNotFoundException, SQLException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tHashSet<Coupon> collectionCoupon = new HashSet<Coupon>();\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tcollectionCoupon.add(getCoupon(resultSet.getLong(1)));\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn collectionCoupon;\n\t}", "public Category getCategoryById()\r\n {\r\n return cdb.getCategoryById();\r\n }", "public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }", "public Map<Integer, Componente> ottieniComponentiByCategoria(String idCategoria){\n\t\tMap<Integer, Componente> mappa = new HashMap<Integer, Componente>();\n\t\ttry { //Evito eventuali errori per l'identificativo della categoria\n\t\t\tfor (Componente elemento : this.mappaComponenti.get(idCategoria)) {\n\t\t\t\tmappa.put(elemento.getId(), elemento);\n\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn mappa;\n\t}", "public List<Cvcategory> findAllCvcategories();", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);", "public void searchCompanies() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\ttry {\r\n\t\t\tbusiness = businessDao.searchBusinessForNameOrNit(searchCompany);\r\n\t\t\tif (business == null || business.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(\r\n\t\t\t\t\t\t\"frmAsociarPermisos:empresas\",\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else {\r\n\t\t\t\tBusinessAction businessAction = ControladorContexto\r\n\t\t\t\t\t\t.getContextBean(BusinessAction.class);\r\n\t\t\t\tbusinessAction.setListBusiness(new ArrayList<Business>());\r\n\t\t\t\tbusinessAction.setListBusiness(business);\r\n\t\t\t\tbusinessAction.loadDetailsBusiness();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public CatCurso consultarCatCursoPorId(CatCurso catCurso)throws NSJPNegocioException;", "Company getCompany(int id);", "public Collection<Integer> obterCategorias(Integer idConsumoTarifa) throws ErroRepositorioException;", "public static Category findCategoryById(Long id){\n return categoryFinder.where().eq(\"category-id\", id).findUnique();\n }", "public Company findCompany(long id);", "public Conge find( Integer idConge ) ;", "@Override\n\tpublic List<Get_coupons> findGetcouponsByUserid(String userid) {\n\t\tList<Get_coupons> list=getcouponsDAO.findGetcouponsByUserid(userid);\n\t\treturn list;\n\t}", "public Long getCategoriaId();", "@Override\n\tpublic void add(cp_company cp) {\n\t\t\n\t}", "Category findCategoryById(Long id);", "public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}", "Category getCategoryById(int id);", "Category selectCategory(long id);", "List<ProductCategory> getAll();", "public void getAllPurchasedCouponsByType(CouponType type) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByType(type);\n }", "TrackerListCategory loadTrackerListCategory(final Integer id);", "java.lang.String getCouponId();", "@Override\n\tpublic HashSet<Coupon> getCouponByType(CouponType couponType)\n\t\t\tthrows ClassNotFoundException, SQLException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tHashSet<Coupon> collectionCoupon = new HashSet<Coupon>();\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_ALL_COUPON_ID_BY_TYPE);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tcollectionCoupon.add(getCoupon(resultSet.getLong(1)));\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn collectionCoupon;\n\t}", "public Coupon(int id,String bid, String img, String det , String cat , double price , String exp) {\n\t\t\n\t\tsuper();\n\t\tsetId(id);\n\t\tsetBusiness_id(bid);\n\t\tsetImage(img);\n\t\tsetDetails(det);\n\t\tsetCategory(cat);\n\t\tsetPrice(price);\n\t\tsetExpiredate(exp);\n\t\tsetAvailable(true);\n\t}", "public void newCustomer () {\r\n\t\t//input category id.\r\n\t\t//TODO\r\n boolean ok = false;\r\n do { \r\n my.printCategoies();\r\n try {\r\n System.out.println(\"Category:\");\r\n Scanner scan = new Scanner(System.in);\r\n String cat = scan.next();\r\n \r\n Category c = my.getCategory(cat);\r\n //\r\n if (c!=null ) {\r\n // add the new customer to a category\r\n //input new customer.\r\n Customer theNewCustomer = readCustomer(cat);\r\n if ( theNewCustomer != null ) {\r\n my.add(c, theNewCustomer);\r\n ok = true;\r\n }\r\n \r\n }else{\r\n System.out.println(\"Category not exist\");\r\n }\r\n \r\n } catch (Exception e) {\r\n System.out.println(\"Sorry, try again\");\r\n }\r\n } while (ok == false);\r\n \r\n\t\t\r\n\t}", "public interface CouponRepository extends JpaRepository<Coupon, Integer> {\n\n\tboolean existsByCompanyIdAndTitleIgnoreCase(int companyId, String title);\n\n\tboolean existsByIdNotAndCompanyIdAndTitleIgnoreCase(int id, int companyID, String title);\n\n\tList<Coupon> findAllByCompanyId(int companyId);\n\n\tList<Coupon> findAllByCompanyIdAndCategory(int companyId, Category category);\n\n\tList<Coupon> findAllByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n\tboolean existsByCustomersIdAndId(int customerId, int couponId);\n\n\tboolean existsByIdAndAmountGreaterThan(int id, int i);\n\n\tboolean existsByIdAndEndDateAfter(int id, LocalDate date);\n\n\tList<Coupon> findAllByCustomersId(int customerId);\n\n\tList<Coupon> findAllByCustomersIdAndCategory(int customerId, Category category);\n\n\tList<Coupon> findAllByCustomersIdAndPriceLessThanEqual(int customerId, double price);\n\n\tvoid deleteAllByEndDateBefore(LocalDate date);\n\n//\t----------------------------------------------------------------------------\n//\tMore methods for front-end\n\n\tList<Coupon> findAllByCategory(Category category);\n\n\tList<Coupon> findTop6ByOrderByPurchaseDesc();\n\n\t@Query(\"SELECT SUM(c.purchase) FROM Coupon c WHERE company.id=:companyId\")\n\tint getCompanySumPurchases(int companyId);\n\n\tList<Coupon> findAllByCustomersNotContainingAndAmountGreaterThanAndEndDateAfter(Customer customer, int amount,\n\t\t\tLocalDate date);\n\n}", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opinion...\");\n //Creamos la query\n try {\n s = conexion.createStatement();\n } catch (SQLException se) {\n System.out.println(\"probando conexion de consulta\");\n }\n try {\n rs = s.executeQuery(\"SELECT id_cupon FROM cupon order by id_cupon desc LIMIT 1\");\n while (rs.next()) {\n id_opinion = Integer.parseInt(rs.getString(1))+1;\n }\n tf_ID.setText(Integer.toString(id_opinion));\n } catch (SQLException ex) {\n Logger.getLogger(N_Opinion.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void mostrarCategoria(JComboBox<Categoria>jComboBoxCategoria){\n \n try{\n con = ConexionBD.getConexion();\n String sql=\"SELECT * FROM categorias WHERE id_estado = 1 ORDER BY id_categoria\";\n sent = con.createStatement();\n ResultSet rs = sent.executeQuery(sql);\n \n \n while (rs.next()){\n jComboBoxCategoria.addItem(\n new Categoria (\n rs.getString(\"id_categoria\"), \n rs.getString(\"nombre_categoria\")\n )\n );\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(null,\"error\");\n \n \n \n }\n \n }", "public static void checkCategoryInDb() {\n try {\n Category category = Category.listAll(Category.class).get(0);\n\n } catch (Exception e) {\n Category undefinedCategory = new Category();\n undefinedCategory.setCategoryId(1);\n undefinedCategory.setCategoryName(\"Others\");\n undefinedCategory.save();\n }\n }", "public List<CategoryDTO> getCategories(String bbbChannel, String siteId, List<String> relatedCategories) ;", "public Cliente[] findWhereIdClienteCategoriaEquals(int idClienteCategoria) throws ClienteDaoException;", "@Override\r\n\tpublic Company getOneCompanyById(int compId) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"select * from companies where companyId=\" + compId;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tCompany comp = new Company();\r\n\t\t\t\tcomp.setCompId(compId);\r\n\t\t\t\tcomp.setCompName(rs.getString(\"companyName\"));\r\n\t\t\t\tcomp.setCompEmail(rs.getString(\"companyEmail\"));\r\n\t\t\t\tcomp.setCompPass(rs.getString(\"companyPass\"));\r\n\r\n\t\t\t\treturn comp;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Couldn't find any company by this ID: \" + compId);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getOneCompanyById Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private void populaObjetivoCat()\n {\n objetivoCatDAO.insert(new ObjetivoCat(\"Hipertrofia\", \"weight\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Saude\", \"apple\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Emagrecer\", \"gloves\"));\n }", "DvdCategory searchCategoryById(Integer id) throws DvdStoreException;", "public ArrayList<Coupon> getCustomerCoupons() throws Exception {\n\n\t\treturn customersDBDAO.getAllCustomerCoupons(this.getCustomerId());\n\n\t}", "private void printCustomerCoupons(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(coupons.size()+\" coupons found for this customer\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public Collection<Coupon> getCouponByDate(Date date) throws DbException;", "public CompetitionClassification searchForCompetitionClassificationById(Integer tempId) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tCompetitionClassification found = em.find(CompetitionClassification.class, tempId);\n\t\tem.close();\n\t\treturn found;\n\t}", "@Override\n\t/**\n\t * Accepts predefined Coupon object and writes it to Coupon table in the\n\t * database\n\t */\n\tpublic int createCoupon(Coupon coupon) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Defining Coupon ID variable to return\n\t\tint couponID = -1;\n\n\t\ttry {\n\t\t\t// Checking if Coupon title already exists in DB\n\t\t\t// PreparedStatement pstmt1 = null;\n\t\t\t// String nameExist = \"SELECT * FROM Coupon where Title = ?\";\n\t\t\t// pstmt1 = con.prepareStatement(nameExist);\n\t\t\t// pstmt1.setString(1, coupon.getTitle());\n\t\t\t// ResultSet result = pstmt1.executeQuery();\n\t\t\t// if (result.next()) {\n\t\t\t// System.out.println(\"Coupon title already exists in Database,\n\t\t\t// please choose another one.\");\n\t\t\t// } else {\n\n\t\t\t// Defining SQL string to insert Coupon via prepared statement\n\t\t\tString createCouponSQL = \"insert into coupon (title, start_date, end_date, expired, type, message, price, image) values (?,?,?,?,?,?,?,?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(createCouponSQL);\n\t\t\t// Fetching variables into SQL string via Coupon bean\n\t\t\tpstmt.setString(1, coupon.getTitle());\n\t\t\tpstmt.setDate(2, getSqlDate(coupon.getStart_date()));\n\t\t\tpstmt.setDate(3, getSqlDate(coupon.getEnd_date()));\n\t\t\tpstmt.setString(4, coupon.getExpired());\n\t\t\tpstmt.setString(5, coupon.getType());\n\t\t\tpstmt.setString(6, coupon.getMessage());\n\t\t\tpstmt.setInt(7, coupon.getPrice());\n\t\t\tpstmt.setString(8, coupon.getImage());\n\t\t\t// Executing prepared statement\n\t\t\tpstmt.executeUpdate();\n\t\t\tString fetchingID = \"select id from coupon where title = ? \";\n\t\t\tPreparedStatement pstmtID = con.prepareStatement(fetchingID);\n\t\t\tpstmtID.setString(1, coupon.getTitle());\n\t\t\tResultSet resCoupon = pstmtID.executeQuery();\n\t\t\tresCoupon.next();\n\t\t\t// Fetching newly created Coupon ID for a return\n\n\t\t\tcouponID = resCoupon.getInt(1);\n\t\t\tcoupon.setId(couponID);\n\t\t\t// Writing success confirmation to the console\n\t\t\tSystem.out.println(\"Coupon has been added successfully:\" + coupon);\n\n\t\t\t// }\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon writing into database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon creation has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t\t// Return Coupon ID for future use\n\t\treturn couponID;\n\t}", "public static Categorias obtenerCategoria(int id){\n Categorias categoria = new Categorias();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro where id = ?\");\n \n c.agregarParametro(1, id);\n \n ResultSet informacion = c.getResultSet();\n \n try {\n if (informacion.next())\n categoria = new Categorias(informacion);\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categoria;\n }", "public void getAllPurchasedCouponsByPrice(double price) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByPrice(price);\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "public interface CouponService {\n /**\n * 获得可以兑换的优惠券类型\n * @param mid\n * @return\n */\n public List<CouponTypeModel> getCouponTypes(long mid);\n\n /**\n * 获得优惠券使用记录,即已经使用过的优惠券\n * @param mid\n * @return\n */\n public List<CouponModel> getUsedCoupons(long mid, int page, int pageNum);\n\n /**\n * 获得已经使用过的优惠券数目\n * @param mid\n * @return\n */\n public int getUsedCouponTotalNum(long mid);\n\n /**\n * 获得未使用但未过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getUnusedCoupons(long mid, long date, int page, int pageNum);\n\n /**\n * 获得未使用但未过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getUnusedCouponTotalNum(long mid,long date);\n\n /**\n * 获得未使用且已过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getExpiredCoupons(long mid,long date,int page,int pageNum);\n\n /**\n * 获得未使用且已过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getExpiredCouponTotalNum(long mid,long date);\n\n /**\n * 使用积分兑换优惠券\n * @param mid\n * @param type\n * @return\n */\n public void exchangeCoupon(long mid,int type);\n}", "Category getCategoryById(int categoryId);", "public void Categories() {\n final ProgressDialog dialog = new ProgressDialog(getActivity());\n dialog.setCanceledOnTouchOutside(false);\n dialog.setMessage(\"Please Wait...\");\n dialog.show();\n\n Call<Categories> logincall = apiInterface.categoriespojo();\n logincall.enqueue(new Callback<Categories>() {\n @Override\n public void onResponse(Call<Categories> call, Response<Categories> response) {\n dialog.dismiss();\n if (response.body().getStatus() == 1) {\n if (Constants.categoriesData != null) {\n Constants.categoriesData.clear();\n }\n if (!Constants.categoriesData.equals(\"\") && Constants.categoriesData != null) {\n Constants.categoriesData.addAll(response.body().getData());\n CategoryAdapter adapter = new CategoryAdapter(getActivity());\n recycler_view.setAdapter(adapter);\n if (adapter != null)\n adapter.notifyDataSetChanged();\n } else {\n Toast.makeText(getActivity(), response.body().getMsg(), Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n @Override\n public void onFailure(Call<Categories> call, Throwable t) {\n dialog.dismiss();\n Helper.showToastMessage(activity, \"No Internet Connection\");\n }\n });\n }", "public Medicine saveMedicineCategory(Integer id, Category related_category);", "@Override\r\n\tpublic ArrayList<Company> getAllCompanies() throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tArrayList<Company> allCompanies = new ArrayList<>();\r\n\t\t\tString sql = \"select * from companies\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tCompany comp = new Company(rs.getInt(\"companyId\"), rs.getString(\"companyName\"),\r\n\t\t\t\t\t\trs.getString(\"companyEmail\"), rs.getString(\"companyPass\"));\r\n\t\t\t\tallCompanies.add(comp);\r\n\t\t\t}\r\n\t\t\treturn allCompanies;\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getAllCompanies Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void consultaCategoria() throws Exception {\r\n boolean erro;\r\n int idCategoria;\r\n String nomeCategoria;\r\n ArrayList<Produto> lista;\r\n System.out.println(\"\\t** Listar produtos de uma categoria **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID da categoria a ser consultada: \");\r\n idCategoria = read.nextInt();\r\n if (idCategoria <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n lista = listProdutosPorCategoria(idCategoria);\r\n if (lista != null && !lista.isEmpty()) {\r\n nomeCategoria = getNomeCategoria(idCategoria - 1);\r\n System.out.println(\"Produtos pertencentes a '\" + nomeCategoria + \"'\");\r\n for (Produto p : lista) {\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n + \"\\nCategoria: \" + nomeCategoria\r\n );\r\n }\r\n } else {\r\n System.out.println(\"Não ha produtos nessa categoria, ou ela não existe!\");\r\n }\r\n }", "TrackerListCategory getTrackerListCategory(final Integer id);" ]
[ "0.67081386", "0.6700891", "0.65301526", "0.6431999", "0.6324561", "0.6223688", "0.62233746", "0.6214647", "0.6165078", "0.61588603", "0.6129093", "0.6090391", "0.5937412", "0.5785573", "0.5673377", "0.5634736", "0.5607726", "0.559886", "0.5584461", "0.55759925", "0.5574592", "0.55508", "0.54893774", "0.54874426", "0.5481475", "0.54778576", "0.5473427", "0.546206", "0.54497135", "0.5446456", "0.5437855", "0.54281247", "0.5426097", "0.54161197", "0.5387445", "0.5380294", "0.5375026", "0.53749233", "0.53515536", "0.53475654", "0.534192", "0.53418624", "0.5337208", "0.5336449", "0.5271826", "0.5263874", "0.5263674", "0.5248968", "0.5245002", "0.52285093", "0.5226556", "0.52254224", "0.5224652", "0.5209912", "0.5200709", "0.51830494", "0.5165147", "0.5154428", "0.51509446", "0.5143332", "0.5135943", "0.5132904", "0.51084214", "0.51060015", "0.51013505", "0.5100999", "0.50808954", "0.5080829", "0.5074594", "0.5066641", "0.50605524", "0.5046748", "0.5032104", "0.50302684", "0.5020548", "0.501633", "0.50083125", "0.5006195", "0.4986611", "0.49801838", "0.49767852", "0.4966218", "0.49639136", "0.49615923", "0.49588704", "0.49573418", "0.49521238", "0.49505693", "0.494873", "0.49369562", "0.49290624", "0.49131152", "0.4912941", "0.4903195", "0.48979226", "0.48966137", "0.48963213", "0.48963064", "0.48962128", "0.48956397" ]
0.6829888
0
The method finds the coupons with the id and the price that the company inserted.
List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Override\n\tpublic List<Coupon> getAllPurchesCouponsByPrice(double price, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByPrice(id, price);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons with a price lower then this for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "List<Coupon> findByCompanyId(int companyId);", "public ArrayList<Coupon> getCoupons(ArrayList<Long> id) {\n\t\treturn couponRepository.getCoupons(id);\n\t}", "public Coupon getCoupon(int id) throws DbException;", "public void getAllPurchasedCouponsByPrice(double price) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByPrice(price);\n }", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }", "public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Override\n\tpublic List<Coupon> getAllPurchasedCoupons(int id) throws CustomDateBaseExepation {\n\n\t\tif (customerRipository.findById(id) == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + id);\n\t\t}\n\n\t\tList<Coupon> c = customerRipository.getAllPurchasedCoupons(id);\n\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no purchased coupons for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "@Override\n\t/** Accepts Coupon ID and returns related Coupon object */\n\tpublic Coupon getCoupon(int id) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Creating Coupon object to fill it later with data from SQL query\n\t\t// result and for method to return it afterwards\n\t\tCoupon coupon = new Coupon();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupon via prepared statement\n\t\t\tString getCouponSQL = \"select * from coupon where id = ?\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponSQL);\n\t\t\t// Putting method accepted ID into SQL string\n\t\t\tpstmt.setInt(1, id);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// If query result has data (if Coupon has been found) do\n\t\t\tif (resCoup.next()) {\n\t\t\t\t// Set Coupon object ID to ID variable that method received\n\t\t\t\tcoupon.setId(id);\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// // Write retrieval success confirmation to the console\n\t\t\t\t// System.out.println(\"Coupon has been found successfully:\" +\n\t\t\t\t// coupon);\n\t\t\t} else {\n\t\t\t\t// If query result is empty (Coupon hasn't been found) throw\n\t\t\t\t// exception\n\t\t\t\tSystem.out.println(\"Coupon retrieve has been failed - Coupon ID not found\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return Coupon\n\t\treturn coupon;\n\t}", "@Override\n\tpublic void updateCoupon(long id, Coupon coupon)\n\t\t\tthrows ClassNotFoundException, SQLException, IOException, ParseException {\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\n\t\tPreparedStatement statement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tResultSet resultSet = statement.executeQuery();\n\t\twhile (resultSet.next()) {\n\t\t\tif (id == resultSet.getInt(1)) {\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TITLE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getTitle());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_START_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getStartDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_END_DATE_BY_ID);\n\t\t\t\tstatement.setDate(1, (Date) coupon.getEndDate());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_AMOUNT_BY_ID);\n\t\t\t\tstatement.setInt(1, coupon.getAmount());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_TYPE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getType().toString());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_MESSAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getMessage());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_PRICE_BY_ID);\n\t\t\t\tstatement.setDouble(1, coupon.getPrice());\n\t\t\t\tstatement.setLong(2, id);\n\t\t\t\tstatement.executeUpdate();\n\n\t\t\t\tstatement = connection.prepareStatement(SQLQueryRequest.SET_COUPON_IMAGE_BY_ID);\n\t\t\t\tstatement.setString(1, coupon.getImage());\n\t\t\t\tstatement.setLong(2, id);\n\n\t\t\t\tSystem.out.println(\"Coupon updated successfull\");\n\t\t\t}\n\n\t\t}\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t}", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "public static void updateCoupon(Context context, String id, final Coupon c)\n {\n Query reff;\n reff= FirebaseDatabase.getInstance().getReference().child(\"coupon\").orderByChild(\"seri\").equalTo(id);\n reff.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot: dataSnapshot.getChildren())\n {\n Coupon coupon=snapshot.getValue(Coupon.class);\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"coupon\").child(coupon.getIdcoupon());\n c.setIdcoupon(coupon.getIdcoupon());\n ref.setValue(c);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByEndDateSQL = \"select * from coupon where end_date < ? and id in(select couponid from compcoupon where companyid = ?) order by end_date desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByEndDateSQL);\n\t\t\t// Set date variable that method received into prepared statement\n\t\t\tpstmt.setDate(1, getSqlDate(date));\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);", "List<CheckoutProduct> getAllByCheckout(int id);", "Coupon findByCompanyIdAndTitle(int companyId, String title);", "public void getFindByIdCompany() {\n log.info(\"CompaniesContactsBean => method : getFindByIdCompany()\");\n\n log.info(\"ID company\" + companiesBean.getCompaniesEntity().getId());\n this.companiesContactsEntityList = findByIdCompany(companiesBean.getCompaniesEntity());\n }", "@Override\n\tpublic Coupon getCoupon(long id) throws ClassNotFoundException, SQLException, ParseException {\n\t\tCoupon coupon = new Coupon();\n\t\tConnection connection = ConnectionPool.getInstance().getConnection();\n\t\tPreparedStatement statement;\n\t\tstatement = connection.prepareStatement(SQLQueryRequest.GET_COUPON_BY_ID);\n\t\tstatement.setLong(1, id);\n\t\tResultSet resultSet = statement.executeQuery();\n\n\t\twhile (resultSet.next()) {\n\t\t\tcoupon.setId(resultSet.getLong(1));\n\t\t\tcoupon.setTitle(resultSet.getString(2));\n\t\t\tcoupon.setStartDate(StringDateConvertor.convert(resultSet.getString(3)));\n\t\t\tcoupon.setEndDate(StringDateConvertor.convert(resultSet.getString(4)));\n\t\t\tcoupon.setAmount(resultSet.getInt(5));\n\t\t\tcoupon.setType(CouponType.valueOf(resultSet.getString(6)));\n\t\t\tcoupon.setMessage(resultSet.getString(7));\n\t\t\tcoupon.setPrice(resultSet.getDouble(8));\n\t\t\tcoupon.setImage(resultSet.getString(9));\n\t\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\t\treturn coupon;\n\t\t}\n\n\t\tConnectionPool.getInstance().returnConnection(connection);\n\t\treturn null;\n\t}", "public Company findCompany(long id);", "public float getPrices(Integer id);", "Price find(Object id);", "@Override\r\n\tpublic Company getAllCompaniesById(Integer id) {\r\n\t\tString methodName = \"getAllCompaniesById(Integer id)\";\r\n\t\tlog.info(className+\",\"+methodName);\r\n\t\tlog.debug(\"id value is::\"+id);\r\n\t\treturn companyRepository.findCompanyById(id.longValue());\r\n\t}", "List<Coupon> findByPrice(double maxPrice);", "Company getCompany(int id);", "@Override\n public List<FecetProrrogaOrden> findWhereIdContribuyenteEquals(final BigDecimal idContribuyente) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ASOCIADO_CARGA = ? ORDER BY ID_ASOCIADO_CARGA\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idContribuyente);\n\n }", "public Coupon getCoupon(long id) {\n\t\treturn Validations.verifyNotNull(couponRepository.findOne(id));\n\t}", "@Override\n\tpublic List<Coupon> getAllPurchaseCouponsByType(CouponType type, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByType(id, type);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons in this categorie for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "FoodPrice getFoodPriceById(Long id);", "@Test\n public void amountEqualsItemPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Proveedor buscarPorId(Integer id) {\r\n\r\n if (id != 22 && id < 123) {\r\n\r\n return ServiceLocator.getInstanceProveedorDAO().find(id);\r\n }\r\n return null;\r\n\r\n }", "public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }", "@Override\n\tpublic List<Get_coupons> findGetcouponsByUserid(String userid) {\n\t\tList<Get_coupons> list=getcouponsDAO.findGetcouponsByUserid(userid);\n\t\treturn list;\n\t}", "@Override\n public Coup getCoup(Partie p) {\n List<Coup> coups = p.getTousCoups();\n List<Coup> attaques = new ArrayList();\n for (Coup c : coups) {\n// System.out.println(\"Appliquer coup = \" + c.toString());\n// Partie cloneP = p.clone();\n// cloneP.appliquerCoup(c);\n// System.out.println(p + \" et \" + cloneP);\n// System.out.println(\"Original =\\n\"+p.getJoueurActuel().getEquipe().toString());\n// System.out.println(\"Clone = \\n\"+cloneP.getJoueurActuel().getEquipe().toString());\n if (contientAttaque(c)) {\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup possible : \" + c.toString());\n attaques.add(c);\n }\n }\n Coup resultat;\n if (attaques.isEmpty()) {\n resultat = coups.get((int) (Math.random() * (coups.size() - 1)));\n } else {\n resultat = attaques.get((int) (Math.random() * (attaques.size() - 1)));\n }\n// System.out.println(Thread.currentThread().getName() + \": \" + \"Coup calcule = \" + resultat.toString());\n return resultat;\n }", "public SgfensPedidoProducto[] findWhereIdClasificacionEquals(int idClasificacion) throws SgfensPedidoProductoDaoException;", "List<PriceInformation> getPriceForProduct(ProductModel product);", "@Override\n public List<FecetProrrogaOrden> findWhereIdOrdenEquals(BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_ORDEN = ? ORDER BY ID_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden);\n\n }", "public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }", "@Override\r\n\tpublic Company getOneCompanyById(int compId) throws CouponSystemException {\r\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\tcon = ConnectionPool.getInstance().getConnection();\r\n\t\t\tString sql = \"select * from companies where companyId=\" + compId;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tCompany comp = new Company();\r\n\t\t\t\tcomp.setCompId(compId);\r\n\t\t\t\tcomp.setCompName(rs.getString(\"companyName\"));\r\n\t\t\t\tcomp.setCompEmail(rs.getString(\"companyEmail\"));\r\n\t\t\t\tcomp.setCompPass(rs.getString(\"companyPass\"));\r\n\r\n\t\t\t\treturn comp;\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Couldn't find any company by this ID: \" + compId);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new CouponSystemException(\"getOneCompanyById Failed\", e);\r\n\t\t} finally {\r\n\t\t\tif (con != null) {\r\n\t\t\t\tConnectionPool.getInstance().restoreConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void addSystemCoupons(String couponcontent, String fitprice, String couponprice, String couponstarttime,\n\t\t\tString couponendtime) throws BaseException {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat( \"yyyy-MM-dd HH:mm:ss\" );\n\t\tjava.util.Date date1 = null;\n\t\tjava.util.Date date2 = null;\n\t\ttry {\n\t\t\tdate1 = sdf.parse( couponstarttime );\n\t\t\t//System.out.print(date1);\n\t\t\tdate2 = sdf.parse( couponendtime );\n\t\t} catch (ParseException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tlong ls = date1.getTime();\n//\t\tSystem.out.print(ls);\n//\t\tTimestamp t=new Timestamp(ls);\n//\t\tSystem.out.print(t);\n\t\tlong le = date2.getTime();\n\t\tBeanCoupon cp=new BeanCoupon();\n\t\tConnection conn=null;\n\t\tcp.setCoupon_content(couponcontent);\n\t\tfloat coupon_fitmoney=Float.parseFloat(fitprice);\n\t\tcp.setCoupon_fit_money(coupon_fitmoney);\n\t\tfloat coupon_price=Float.parseFloat(couponprice);\n\t\t//System.out.println(coupon_fitmoney);\n\t\tcp.setCoupon_price(coupon_price);\n\t\ttry {\n\t\t\tconn=DBUtil.getConnection();\n\t\t\tString sql=\"select max(coupon_id+0) from coupon\";\n\t\t\tjava.sql.PreparedStatement pst=conn.prepareStatement(sql);\n\t\t\tjava.sql.ResultSet rs=pst.executeQuery();\n\t\t\trs.next();\n\t\t\tif (rs.getString(1) != null) {\n\t\t\t\tcp.setCoupon_id(rs.getString(1));\n\t\t\t\tint num = Integer.parseInt(cp.getCoupon_id().trim());\n\t\t\t\tnum = num +1;\n\t\t\t\tcp.setCoupon_id(String.valueOf(num));\n\t\t\t}else {\n\t\t\t\tcp.setCoupon_id(\"1\");\n\t\t\t}\n\t\t\tsql=\"insert into coupon(coupon_id,coupon_content,coupon_fit_money,coupon_price,coupon_start_time, coupon_end_time) \"\n\t\t\t\t\t+ \"value(?,?,?,?,?,?)\";\n\t\t\tpst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, cp.getCoupon_id());\n\t\t\tpst.setString(2, cp.getCoupon_content());\n\t\t\tpst.setFloat(3, cp.getCoupon_fit_money());\n\t\t\tpst.setFloat(4, cp.getCoupon_price());\n\t\t\tpst.setTimestamp(6, new java.sql.Timestamp( ls ));\n\t\t\tpst.setTimestamp(5, new java.sql.Timestamp( le ));\n\t\t\t//pst.setDate(5, new java.sql.Date( ls ));\n//\t\t\tpst.setDate(6, new java.sql.Date(le));\n\t\t\tpst.execute();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DbException(e);\n\t\t}\n\t\tfinally{\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public Comic saveComicById(Long id) {\n\t\tif(findById(id).isPresent()) throw new ValidationException(\"Comic (id= \"+ id +\") already registered\");\n\t\t\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\t\t\n\t\tString url = \"https://gateway.marvel.com/v1/public/comics/\" + id\n\t\t\t\t\t\t+ \"?apikey=\" + key\n\t\t\t\t \t\t+ \"&hash=\" + hash\n\t\t\t\t \t\t+ \"&ts=\" + ts;\n\t\t\n\t\tString response = restTemplate.getForObject(url, String.class);\n\t\t\n\t\treturn saveFromApi(response).get(0);\n\t}", "List<PriceRow> getPriceInformationsForProduct(ProductModel model);", "public interface CouponService {\n /**\n * 获得可以兑换的优惠券类型\n * @param mid\n * @return\n */\n public List<CouponTypeModel> getCouponTypes(long mid);\n\n /**\n * 获得优惠券使用记录,即已经使用过的优惠券\n * @param mid\n * @return\n */\n public List<CouponModel> getUsedCoupons(long mid, int page, int pageNum);\n\n /**\n * 获得已经使用过的优惠券数目\n * @param mid\n * @return\n */\n public int getUsedCouponTotalNum(long mid);\n\n /**\n * 获得未使用但未过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getUnusedCoupons(long mid, long date, int page, int pageNum);\n\n /**\n * 获得未使用但未过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getUnusedCouponTotalNum(long mid,long date);\n\n /**\n * 获得未使用且已过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getExpiredCoupons(long mid,long date,int page,int pageNum);\n\n /**\n * 获得未使用且已过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getExpiredCouponTotalNum(long mid,long date);\n\n /**\n * 使用积分兑换优惠券\n * @param mid\n * @param type\n * @return\n */\n public void exchangeCoupon(long mid,int type);\n}", "List<Product> findByPrice(BigDecimal price);", "public void setIdContrato(BigDecimal idContrato) {\r\n this.idContrato = idContrato;\r\n }", "List<FecetDocExpediente> findWhereIdRechazoPropuestaEquals(BigDecimal idRechazoPropuesta);", "public interface CouponDAO {\n\n\t/**\n\t * this method create coupon\n\t */\n\tpublic void createCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupon by id from coupon table\n\t */\n\tpublic void removeCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method update the coupon\n\t */\n\tpublic void updateCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method get coupon by id\n\t */\n\tpublic Coupon getCoupon(int id) throws DbException;\n\n\t/**\n\t * this method get all coupons\n\t */\n\tpublic Collection<Coupon> getAllCoupon() throws DbException;\n\n\t/**\n\t * this method get coupons by type\n\t */\n\tpublic Collection<Coupon> getCouponByType(CouponType type) throws DbException;\n\n\t/**\n\t * this method remove coupons from customer-coupon table by coupon id this\n\t * method help to delete coupon\n\t */\n\tpublic void removeCustomerCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupons from company-coupon table by coupon id this method\n\t * help to delete coupon\n\t */\n\tpublic void removeCompanyCoupon(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method remove coupons by company id, this method help to delete company\n\t */\n\tpublic void removeCouponByCompany(Company company) throws DbException;\n\n\t/**\n\t * this method remove coupons from customer-coupon table by company id this\n\t * method help to delete company\n\t */\n\tpublic void removeCustomerCoupon(Company company) throws DbException;\n\n\t/**\n\t * this method check if coupon exist by title to create one\n\t */\n\tpublic boolean checkIfExist(Coupon coupon) throws DbException;\n\n\t/**\n\t * this method get coupons by date inside collection\n\t */\n\tpublic Collection<Coupon> getCouponByDate(Date date) throws DbException;\n\n}", "@Override\n\tpublic void addUserCoupons(BeanUser user, BeanCoupon coupon) throws BaseException {\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\tconn=DBUtil.getConnection();\n\t\t\tString sql=\"select * from user_coupon where coupon_id=?\";\n\t\t\tjava.sql.PreparedStatement pst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, coupon.getCoupon_id());\n\t\t\tjava.sql.ResultSet rs=pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"该优惠券您已领取\",\"提示\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthrow new BaseException(\"该优惠券您已领取\");\n\t\t\t}\n\t\t\t//System.out.print(\"1.1\");\n\t\t\tsql=\"select * from commodity_order where user_id=? and coupon_id=?\";\n\t\t\tpst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, user.getUser_id());\n\t\t\tpst.setString(2, coupon.getCoupon_id());\n\t\t\trs=pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"该优惠券您已领取\",\"提示\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tthrow new BaseException(\"该优惠券您已领取\");\n\t\t\t};\n\t\t\tsql=\"insert into user_coupon(user_id,coupon_id) value(?,?)\";\n\t\t\tpst=conn.prepareStatement(sql);\n\t\t\tpst.setString(1, user.getUser_id());\n\t\t\tpst.setString(2, coupon.getCoupon_id());\n\t\t\tpst.execute();\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new DbException(e);\n\t\t}\n\t\tfinally{\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t}", "private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it.setQuantidade(it.getQuantidade() + 1);\n\t //a apartir daqui, faço o cálculo. Valor Total(ATUAL) + ((NOVA) quantidade * valor unitário do produto(ATUAL))\n\t it.setValorTotal(0.);\n\t it.setValorTotal(it.getValorTotal() + (it.getQuantidade() * it.getValorUnitario()));\n }\n}\n\t}", "ItemPriceDTO findOne(Long id);", "@Override\n public Product getItem(String id) throws NoSuchElementException {\n for (Product product : coupons) {\n if (product.getId() == id)\n return product;\n else\n throw new NoSuchElementException();\n }\n return null;\n }", "public List prices() {\n List ls = new ArrayList();\n try {\n\n Connection connection = DBUtil.getConnection();\n //PreparedStatement pst = connection.prepareStatement(\"select PriceId,VegetableId,GovernmentPrice,FarmerPrice,WholeSellerPrice,\"\n // + \"RetailerPrice from PriceDetails\");\n /*PreparedStatement pst = connection.prepareStatement(\"SELECT PriceDetails.PriceId,VegetableDetails.VegetableName,PriceDetails.GovernmentPrice,\"\n + \"PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,PriceDetails.RetailerPrice\"\n + \" from PriceDetails INNER JOIN VegetableDetails \"\n + \"ON PriceDetails.VegetableId = VegetableDetails.VegetableId\");\n */\n\n PreparedStatement pst = connection.prepareStatement(\"select PriceDetails.PriceId,VegetableDetails.VegetableName,\"\n + \"PriceDetails.GovernmentPrice,PriceDetails.FarmerPrice,PriceDetails.WholeSellerPrice,\"\n + \"PriceDetails.RetailerPrice from PriceDetails INNER JOIN VegetableDetails ON PriceDetails.VegetableId = \"\n + \"VegetableDetails.VegetableId\");\n\n ResultSet rs = pst.executeQuery();\n while (rs.next()) {\n ViewPricesBean vpb = new ViewPricesBean();\n\n vpb.setPriceId(rs.getInt(1));\n vpb.setVegetableName(rs.getString(2));\n // vpb.setRegionName(rs.getString(3));\n vpb.setGovernmentPrice(rs.getFloat(3));\n vpb.setFarmerPrice(rs.getFloat(4));\n vpb.setWholeSellerPrice(rs.getFloat(5));\n vpb.setRetailerPrice(rs.getFloat(6));\n\n\n ls.add(vpb);\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return ls;\n\n }", "public BigDecimal pesquisarValorMultasCobradas(int idConta) throws ErroRepositorioException ;", "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }", "public interface CouponRepository extends JpaRepository<Coupon, Integer> {\n\n\tboolean existsByCompanyIdAndTitleIgnoreCase(int companyId, String title);\n\n\tboolean existsByIdNotAndCompanyIdAndTitleIgnoreCase(int id, int companyID, String title);\n\n\tList<Coupon> findAllByCompanyId(int companyId);\n\n\tList<Coupon> findAllByCompanyIdAndCategory(int companyId, Category category);\n\n\tList<Coupon> findAllByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n\tboolean existsByCustomersIdAndId(int customerId, int couponId);\n\n\tboolean existsByIdAndAmountGreaterThan(int id, int i);\n\n\tboolean existsByIdAndEndDateAfter(int id, LocalDate date);\n\n\tList<Coupon> findAllByCustomersId(int customerId);\n\n\tList<Coupon> findAllByCustomersIdAndCategory(int customerId, Category category);\n\n\tList<Coupon> findAllByCustomersIdAndPriceLessThanEqual(int customerId, double price);\n\n\tvoid deleteAllByEndDateBefore(LocalDate date);\n\n//\t----------------------------------------------------------------------------\n//\tMore methods for front-end\n\n\tList<Coupon> findAllByCategory(Category category);\n\n\tList<Coupon> findTop6ByOrderByPurchaseDesc();\n\n\t@Query(\"SELECT SUM(c.purchase) FROM Coupon c WHERE company.id=:companyId\")\n\tint getCompanySumPurchases(int companyId);\n\n\tList<Coupon> findAllByCustomersNotContainingAndAmountGreaterThanAndEndDateAfter(Customer customer, int amount,\n\t\t\tLocalDate date);\n\n}", "public static void deleteCoupon(final Context context, String id)\n {\n Query reff;\n reff= FirebaseDatabase.getInstance().getReference().child(\"coupon\").orderByChild(\"seri\").equalTo(id);\n reff.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot: dataSnapshot.getChildren())\n {\n Coupon coupon=snapshot.getValue(Coupon.class);\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"coupon\").child(coupon.getIdcoupon());\n ref.removeValue();\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public Coupon(int id,String bid, String img, String det , String cat , double price , String exp) {\n\t\t\n\t\tsuper();\n\t\tsetId(id);\n\t\tsetBusiness_id(bid);\n\t\tsetImage(img);\n\t\tsetDetails(det);\n\t\tsetCategory(cat);\n\t\tsetPrice(price);\n\t\tsetExpiredate(exp);\n\t\tsetAvailable(true);\n\t}", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }", "public static Vector<Company> getAllPrices(){\n\t\treturn all_prices;\n\t}", "public Cliente[] findWhereComisionConsignaEquals(double comisionConsigna) throws ClienteDaoException;", "@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }", "private void printCustomerCouponsByMaxPrice(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons;\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Enter maximum price to filter coupons:\");\n\t\tString maxPriceStr = scanner.nextLine();\n\t\tdouble maxPrice;\n\t\ttry\n\t\t{\n\t\t\tmaxPrice = Double.parseDouble(maxPriceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn;\n\t\t}\n\t\tcoupons = customerService.getCustomerCoupons(maxPrice);\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons below this price\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer below this price\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "protected int queryPrice(int id, String key) {\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") called\" );\n ReservableItem curObj = (ReservableItem) readData( id, key);\n int value = 0; \n if ( curObj != null ) {\n value = curObj.getPrice();\n } // else\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") returns cost=$\" + value );\n return value; \n }", "public static List getAllPrices() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT cena FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n int naziv = result.getInt(\"cena\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "List<SpotPrice> getAll();", "public Coup coupAJouer();", "@Repository\npublic interface CouponDao extends BaseDao<Coupon> {\n /**\n * 根据条件获取优惠券\n * @param serach\n * @return\n */\n List<Coupon> getCouponsBySearch(Coupon serach);\n}", "@Override\n\tpublic List<Producto> productos(int id) {\n\n\t\tQuery query = entity.createQuery(\"FROM Seccion s WHERE s.id =: id_seccion\",Seccion.class);\n\t\tquery.setParameter(\"id_seccion\", id);\n \n Seccion seccion = (Seccion)query.getSingleResult();\t\n \n return seccion.getProductos();\t\n\t}", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "@Override\n\t/**\n\t * Removes all Coupons from the Coupon table in the database related to\n\t * Company ID received\n\t */\n\tpublic void deleteCouponsByCompanyID(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\n\t\ttry {\n\t\t\t// Defining SQL string to remove Coupons related to specified\n\t\t\t// Company ID from the Coupon table via prepared statement\n\t\t\tString deleteCouponsByCompanyIDSQL = \"delete from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(deleteCouponsByCompanyIDSQL);\n\t\t\t// Set Company ID from variable that method received\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute check\n\t\t\tint resRemByComp3 = pstmt.executeUpdate();\n\t\t\tif (resRemByComp3 != 0) {\n\t\t\t\t// If result row count is not equal to zero - execution has been\n\t\t\t\t// successful\n\t\t\t\tSystem.out.println(\"Coupons of specified Company have been deleted from Coupon table successfully\");\n\t\t\t} else {\n\t\t\t\t// Otherwise execution failed due to Coupons related to\n\t\t\t\t// specified Company not found in the database\n\t\t\t\tSystem.out.println(\"Coupons removal has been failed - subject entries not found in the database\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon removal from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupons removal has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\t}", "@Override\n\tpublic ArrayList<Coupon> getCouponByType(Coupon.CouponType type, Company c) throws CouponSystemException {\n\t\tConnection con = cp.getConnection(); // Get the connection\n\n\t\tCoupon coup = new Coupon();\n\t\tArrayList<Coupon> couponList = new ArrayList<>();\n\t\ttry (Statement st = con.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\t\"SELECT coupon.* from company_coupon right join coupon on company_coupon.coupon_id = coupon.id where company_coupon.comp_id=\"\n\t\t\t\t\t\t\t\t+ c.getId() + \"and type= '\" + type + \"'\")) {\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tcoup = new Coupon(rs.getString(2), rs.getDate(3), rs.getDate(4), rs.getInt(5),\n\t\t\t\t\t\tCoupon.CouponType.valueOf(rs.getString(6)), rs.getString(7), rs.getDouble(8), rs.getString(9));\n\t\t\t\tcoup.setId(rs.getLong(1));\n\t\t\t\tcouponList.add(coup);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"can not read the coupons\", e);\n\t\t} finally {\n\t\t\tcp.returnConnection(con); // return the connection to the Connection pool\n\t\t}\n\t\treturn couponList;\n\t}", "@Override\n\tpublic List<OrderDetailsEntity> findBuyOrderId(Long id) {\n\t\treturn oderDet.findAllBuyOrderId(id);\n\t}", "public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "public Collection<Coupon> getAllCoupon() throws DbException;", "@ModelAttribute(\"comic\")\n\tpublic Comic getComic(@RequestParam(value = \"id\", required = false) String id) {\n\t\tComic comic = null;\n\n\t\tif (id != null) {\n\t\t\tcomic = comicService.restart().filterBy(\"id\", Integer.parseInt(id)).pick();\n\t\t} else {\n\t\t\tcomic = new Comic();\n\t\t}\n\n\t\treturn comic;\n\t}", "public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\n }", "public Pricing getPricingForId(int productId);", "public Result notifyAllCustomer(Long productID) {\n Coupons coupon = formFactory.form(Coupons.class).bindFromRequest().get();\n List<UserInfo> customers = Product.find.byId(productID).purchaser;\n CouponSendCenter sender = CouponSendCenter.find.byId(session().get(\"email\"));\n\n coupon.sender = sender;\n sender.coupon.add(coupon);\n sender.productID = Product.find.byId(productID).name;\n sender.update();\n\n for(int i = 0; i < customers.size(); i++) {\n CouponReceiveCenter receiver = CouponReceiveCenter.find.byId(customers.get(i).emailID);\n coupon.receiver.add(receiver);\n }\n coupon.save();\n\n return GO_HOME;\n }", "@Override\n public List<Map<String, Object>> selectCityCouponByCityId(\n Map<String, Object> map) {\n return dao.selectCityCouponByCityId(map);\n }", "@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);", "public Conge find( Integer idConge ) ;", "static Company getCompany(SQLiteDatabase db, String companyId) {\n Cursor cursor = db.query(COMPANY_TABLE, null, COMPANY_ID + \" = ?\", new String[] { companyId }, null, null, null);\n List<Company> list = new LinkedList<Company>();\n if (cursor.moveToFirst()) {\n int idIndex = cursor.getColumnIndex(COMPANY_ID);\n int nameIndex = cursor.getColumnIndex(COMPANY_NAME);\n int logoIndex = cursor.getColumnIndex(COMPANY_LOGO);\n int descriptionIndex = cursor.getColumnIndex(COMPANY_DESCRIPTION);\n int lastUpdatedIndex = cursor.getColumnIndex(COMPANY_LAST_UPDATED);\n int wasDeletedIndex = cursor.getColumnIndex(COMPANY_WAS_DELETED);\n\n do {\n if(cursor.getString(idIndex).equals(companyId)) {\n Company company = new Company();\n company.companyId = cursor.getString(idIndex);\n company.name = cursor.getString(nameIndex);\n company.companyLogo = cursor.getString(logoIndex);\n company.companyDescription = cursor.getString(descriptionIndex);\n company.lastUpdatedDate = cursor.getDouble(lastUpdatedIndex);\n company.wasDeleted = (cursor.getInt(wasDeletedIndex) == 1);\n company.models = CarSQL.getCompanyCars(db,company.companyId);\n return company;\n }\n else\n Log.d(\"TAG\",\"can not give correct company companyID \" + companyId + \" from sql\");\n } while (cursor.moveToNext());\n }\n return null;\n }", "java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getPriceList();", "java.lang.String getCouponId();", "public List<Coupon> getAllCouponsByCompany(long ownerId, boolean activeCoupons) {\n\t\tList<Coupon> companyCoupons = \n\t\t\t\tcouponRepository.findAllByOwnerIdAndIsActive(ownerId, activeCoupons);\n\t\treturn Validations.verifyNotNull(companyCoupons);\n\t}", "List<Price> findAll();", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "public Produit getProduit(int theId);", "@GetMapping(\"/{id}\")\n public ResponseEntity<Pricing> getPricing(@PathVariable(\"id\") long id) {\n\tOptional<Pricing> returnedPricing = pricingService.get(id);\n\tPricing pricing = returnedPricing.orElseThrow(() -> new HTTP404Exception(\"Resource Not Found\"));\n\n\tPricingEvent retrievedCreatedEvent = new PricingEvent(this, \"PricingRetrievedEvent\", pricing);\n\teventPublisher.publishEvent(retrievedCreatedEvent);\n\treturn ResponseEntity.ok().body(pricing);\n }", "@PostMapping(\"coupon/{id}\")\r\n public ResponseEntity<?> getOneCoupon(@RequestHeader(name = \"Authorization\") String token, @PathVariable int id) throws MalformedJwtException, CouponException {\r\n if (jwtUtil.validateToken(token)) {\r\n return ResponseEntity.ok().headers(getHeaders(token)).body(companyService.getOneCoupon(id));\r\n }\r\n return new ResponseEntity<>(HttpStatus.UNAVAILABLE_FOR_LEGAL_REASONS);\r\n }", "public void findOrderAndfindContracts() {\n log.info(\"OrdersBean : findOrderAndfindContracts!\");\n ordersEntity = findOrders_ByIdUsers_andStatusIsPending();\n if (ordersEntity != null) {\n contractsBean.findAllContracts(ordersEntity.getId());\n calculatePriceOrder();\n setCptContracts(contractsBean.countContractsByIdOrder(ordersEntity.getId()));\n }\n }", "List<Coupon> findAllByCategory(Category category);" ]
[ "0.7159053", "0.6989906", "0.65374863", "0.6435685", "0.6133209", "0.61144674", "0.6083278", "0.5996305", "0.59931", "0.59480304", "0.5942474", "0.5932923", "0.59140265", "0.5890776", "0.57997966", "0.579331", "0.57556766", "0.5751916", "0.57449317", "0.5697694", "0.5678354", "0.56249213", "0.5611578", "0.5601613", "0.5580984", "0.5562013", "0.55361736", "0.5529735", "0.551324", "0.5494203", "0.5461809", "0.5459937", "0.54316926", "0.5427464", "0.5414868", "0.5404834", "0.54006046", "0.53948575", "0.5381289", "0.53717893", "0.53505945", "0.53496015", "0.53479767", "0.5338734", "0.5332148", "0.5328465", "0.53207606", "0.52985036", "0.5280248", "0.52726823", "0.52719045", "0.52679896", "0.52674913", "0.5262963", "0.52622586", "0.52556044", "0.52433664", "0.519823", "0.51932913", "0.5182969", "0.5168855", "0.5166579", "0.51608974", "0.51557344", "0.5153763", "0.51534706", "0.51417017", "0.5137848", "0.51332945", "0.51265293", "0.51255786", "0.51250726", "0.5123891", "0.51172847", "0.5116745", "0.51102096", "0.51085955", "0.51080424", "0.50919676", "0.50849485", "0.5073409", "0.5068652", "0.5050222", "0.5039219", "0.5027718", "0.50128144", "0.5007577", "0.49937165", "0.49921322", "0.49894723", "0.49891898", "0.49872887", "0.4986585", "0.4978703", "0.497557", "0.497249", "0.49714676", "0.49708164", "0.4966194", "0.4961388" ]
0.7152454
1
This repo responsible to get coupons by category.
List<Coupon> findByCategory(Category category);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Coupon> findAllByCategory(Category category);", "public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }", "public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "private void printCustomerCouponsByCategory(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tCategory category = this.getCategory();\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons(category);\n//\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons in the chosen category\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer int chosen category\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public List<Cvcategory> findAllCvcategories();", "public List<Categorie> getAllCategories();", "public List<CategoryDTO> getCategories(String bbbChannel, String siteId, List<String> relatedCategories) ;", "List<ProductCategory> getAll();", "@Query(\"select c from Coupon c \\n\" +\n \"join CouponCategory coupon_category on coupon_category.couponId = c.id\\n\" +\n \"join Category category on category.id = coupon_category.categoryId\\n\" +\n \"join Activity ac on ac.id = c.activityId \\n\" +\n \"and ac.online = 1 \\n\" +\n \"and ac.startTime < :nowdate\\n\" +\n \"and ac.endTime > :nowdate\\n\" +\n \"where category.id = :cid\")\n List<Coupon> findAllByCategory(Long cid, Date nowdate);", "List<Category> getAllCategories();", "@GetMapping(\"category\")\n\t\tpublic List<String> getCategory(){\n\t\t\tList<String> list = repo.findByCat();\n\t\t\treturn list;\n\t\t\t\n\t\t\t\n\t\t}", "public interface CategoryService {\n\n /**\n * @param type\n * @return\n */\n List<Category> getCategories(String type);\n\n\n /**\n * @param type\n * @param brandCode\n * @return\n */\n List<Category> getCategoriesByBrand(String type, String brandCode);\n\n /**\n * @param type\n * @param brandCodes\n * @return\n */\n List<Category> getCategoriesByBrands(String type, List<String> brandCodes);\n\n\n /**\n * @param type\n * @param goodsCode\n * @return\n */\n List<Category> getCategoriesByGoods(String type, String goodsCode);\n}", "public Categorie getCategorieById(long id);", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "List<Channel> getJXCategory();", "List<Category> findAll();", "@Override\n\tpublic Iterable<Category> findAllCategory() {\n\t\treturn categoryRepository.findAll();\n\t}", "public List<Category> findAll();", "public com.google.common.util.concurrent.ListenableFuture<io.reactivesw.catalog.grpc.GrpcCategory> getCategoryById(\n io.reactivesw.catalog.grpc.LongValue request) {\n return futureUnaryCall(\n getChannel().newCall(METHOD_GET_CATEGORY_BY_ID, getCallOptions()), request);\n }", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "Category getCategoryById(int categoryId);", "List<Categorie> findAll();", "public interface CategoryService {\n\n List<CategoryPack> findCategoryPackList();\n\n List<Category> findCategoryList(Integer start, Integer count);\n\n Integer findCategoryTotalNumber();\n\n CategoryPack selectCategoryById(Integer cid);\n\n void deleteCategoryById(Integer id);\n\n void addCategory(Category category);\n\n void updateCategory(Category category);\n}", "List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);", "public Category getCategoryById()\r\n {\r\n return cdb.getCategoryById();\r\n }", "@Override\n public List<Category> getCategoriesFromUrl(long companyId, long groupId, CategoryType categoryType, String otherFeedTypeUrl, String languageId, String userName) {\n\n String categoriesUrl = categoryType.equals(CategoryType.OTHER) ? otherFeedTypeUrl : getCommonConfigurationService().getCasinoCategoriesUrl(companyId, groupId, categoryType);\n String categoriesBackupUrl = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n String casinoFeedsAPIBaseURL = getCommonConfigurationService().getCasinoFeedsAPIBaseUrl(companyId, groupId);\n String gamesURL = getCommonConfigurationService().getCasinoGamesUrl(companyId, groupId);\n\n boolean noCategoriesUrl = StringUtils.isEmpty(categoriesUrl) && StringUtils.isEmpty(casinoFeedsAPIBaseURL) && StringUtils.isEmpty(categoriesBackupUrl);\n if (noCategoriesUrl || StringUtils.isEmpty(gamesURL)) {\n return Collections.emptyList();\n }\n\n List<Category> categories = Collections.emptyList();\n\n try {\n\n if (StringUtils.isNotEmpty(categoriesUrl)) {\n categories = getCategoriesByURL(categoriesUrl, groupId);\n }\n\n if (StringUtils.isNotEmpty(casinoFeedsAPIBaseURL) && CollectionUtils.isEmpty(categories)) {\n\n Validate.notEmpty(languageId, \"Language can't be null or empty!\");\n Validate.notEmpty(casinoFeedsAPIBaseURL, \"Base url can't be null or empty!\");\n String casinoId = getCommonConfigurationService().getCasinoId(companyId, groupId);\n Validate.notEmpty(casinoId, \"Casino name can't be null or empty!\");\n String serviceURL = casinoAPIHelper.getCategoriesUrl(companyId, groupId, casinoFeedsAPIBaseURL, casinoId,\n categoryType);\n Validate.notEmpty(serviceURL, \"Categories service url can't be null or empty!\");\n log.debug(\"baseURL = {}\", casinoFeedsAPIBaseURL);\n log.debug(\"serviceURL = {}\", serviceURL);\n\n categories = getCategories(HttpClientUtil.doGet(serviceURL, PlayerMode.REAL.getName(), userName, \"\", languageId));\n\n }\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n String backupURL = getCommonConfigurationService().getCasinoCategoriesBackupUrl(companyId, groupId, categoryType);\n if (StringUtils.isNotEmpty(backupURL)) {\n try {\n categories = getCategoriesByURL(backupURL, groupId);\n } catch (Exception e1) {\n throw new PlatformException(e1);\n }\n }\n }\n\n return categories;\n }", "@Override\n\t/** Returns all Coupons of selected type as an array list */\n\tpublic Collection<Coupon> getCouponsByType(String coupType, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByTypeSQL = \"select * from coupon where type = ? and id in(select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByTypeSQL);\n\t\t\t// Set Coupon object type to coupType variable that method received\n\t\t\tpstmt.setString(1, coupType);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "public Category getCategory();", "public Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\n }", "public Collection<Coupon> getCouponByType(CouponType type) throws DbException;", "@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}", "Category getCategoryById(Integer categoryId);", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "List<CategoryDto> listRecommend();", "List<Product> getProductsByCategory(String category);", "String getCategory();", "String getCategory();", "public ArrayList<Coupon> getCustomerCouponsByCategory(Category category) throws Exception {\n\t\treturn customersDBDAO.getAllCustomerCouponsByCategory(customerId, category);\n\t}", "@Override\n\tpublic List<Category> findAllCategory() {\n\t\treturn categoryRepository.findAllCategory();\n\t}", "Category getCategoryById(int id);", "Category getCategoryByName(String categoryName);", "public String getCategory();", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "@Override\n public Single<List<CategoryModel>> getCategories() {\n return api.getCategories().map(categories -> iVmMapper.mapToViewModel(categories));\n }", "public void getCategorory(){\n\t\tDynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(AssetCategory.class, \"category\", PortalClassLoaderUtil.getClassLoader());\n\t\ttry {\n\t\t\tList<AssetCategory> assetCategories = AssetCategoryLocalServiceUtil.dynamicQuery(dynamicQuery);\n\t\t\tfor(AssetCategory category : assetCategories){\n\t\t\t\tlog.info(category.getName());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "@Override\n public List<Classroom> findByCategory(Category category) {\n List<Classroom> classrooms = null;\n Query query = entityManager.createQuery(\"Select c from Classroom c where c.categoryId= :category\");\n query.setParameter(\"category\",category);\n try {\n classrooms = query.getResultList();\n } catch (Exception e){\n e.printStackTrace();\n }\n return classrooms;\n }", "@Override\n\tpublic List<Category> queryCategory() throws SQLException {\n\t\treturn productDao.queryCategory();\n\t}", "Category findCategoryById(Long id);", "public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }", "@Test\n public void validSessionTransactionsGetCategoryTest() {\n // Insert two different transactions with two different categories into the API.\n validSessionTransactionsGetOffsetTest();\n\n Object[] categories = given()\n .header(\"X-session-ID\", sessionId)\n .queryParam(\"category\", \"work\")\n .get(\"/api/v1/transactions\")\n .then()\n .assertThat()\n .statusCode(200)\n .body(matchesJsonSchema(TRANSACTION_LIST_SCHEMA_PATH))\n .contentType(ContentType.JSON)\n .extract()\n .jsonPath()\n .getList(\"$.category.name\")\n .toArray();\n\n for (Object category : categories) {\n assertThat(category, equalTo(\"work\"));\n }\n }", "public interface CategoryCollectionRepository {\n public CategoryCollection findCategoryCollectionByName(String name);\n public List<CategoryCollection> findCategoryCollectionsByProductCollection(ProductCollection productCollection);\n public List<CategoryCollection> findAllCategoryCollections();\n public String addNewCategoryCollection(String name);\n public CategoryCollection addProductToCategory(ProductCollection productCollection,CategoryCollection categoryCollection);\n public CategoryCollection removeProductFromCategory(ProductCollection productCollection,CategoryCollection categoryCollection);\n public List<ProductCollection> findProductCollectionsByCategory(CategoryCollection categoryCollection);\n}", "@GetMapping(\"/categorie/getallcategories\")\n Page<CategorieProduit> getAllCategories(Pageable pageable) {\n return categorieProduitMetier.getAllCategorie(pageable);\n }", "public void getRemoteCategories() {\n //check for connection if true go to apihelper and get model else check if these model cached so get it\n url = getAllCategoriesWithoutItems;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getCategories(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "@GetMapping(\"/filterAdminSide\")\n public List<BannerDTO> filterByCategory(@RequestParam(\"category\") String categoryName){\n return bannerService.findAllByCategory(categoryName);\n }", "ConfigCategory getCategoryById(long categoryId);", "Set<Category> getShopCategories(Shop shop);", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "public interface CategoryService {\n\n public int getCateIdByCate(String title) ;\n}", "List<Product> findByCategory(Category category);", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "@GET(\"categories/activities\")\n Call<List<ActivitiesByCategorieOutput>> getActivitiesByCategory();", "List getCategoriesOfType(String typeConstant);", "public abstract String getCategory();", "public abstract String getCategory();", "@Override\n\tpublic List<AnimalCategory> findCategory() {\n\t\tList<AnimalCategory> list = animaldao.findCategory();\n\t\treturn list;\n\t}", "@Override\n\tpublic ArrayList<Coupon> getCouponByType(Coupon.CouponType type, Company c) throws CouponSystemException {\n\t\tConnection con = cp.getConnection(); // Get the connection\n\n\t\tCoupon coup = new Coupon();\n\t\tArrayList<Coupon> couponList = new ArrayList<>();\n\t\ttry (Statement st = con.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\t\"SELECT coupon.* from company_coupon right join coupon on company_coupon.coupon_id = coupon.id where company_coupon.comp_id=\"\n\t\t\t\t\t\t\t\t+ c.getId() + \"and type= '\" + type + \"'\")) {\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tcoup = new Coupon(rs.getString(2), rs.getDate(3), rs.getDate(4), rs.getInt(5),\n\t\t\t\t\t\tCoupon.CouponType.valueOf(rs.getString(6)), rs.getString(7), rs.getDouble(8), rs.getString(9));\n\t\t\t\tcoup.setId(rs.getLong(1));\n\t\t\t\tcouponList.add(coup);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CouponSystemException(\"can not read the coupons\", e);\n\t\t} finally {\n\t\t\tcp.returnConnection(con); // return the connection to the Connection pool\n\t\t}\n\t\treturn couponList;\n\t}", "Category getByName(String name);", "public Category getCategory() {\r\n return category;\r\n }", "public Category getCategory() {\n return category;\n }", "public List<Category> getCategoriesDetails(){\r\n\t\tList<Category> res = new ArrayList<Category>();\r\n\t\tString req = \"select c.label, sum(f.amount) as total, sum(f.amount)/tmp.totmonth as percent, c.color \"\r\n\t\t\t\t\t+ \"from fee f, category c, (select sum(amount) as totmonth \"\r\n\t\t\t\t\t+ \"from fee \"\r\n\t\t\t\t\t+ \"where strftime('%m%Y', date) = strftime('%m%Y', date('now'))) as tmp \"\r\n\t\t\t\t\t+ \"where c.id = f.categoryid \"\r\n\t\t\t\t\t+ \"and strftime('%m%Y', f.date) = strftime('%m%Y', date('now')) \"\r\n\t\t\t\t\t+ \"group by c.id \"\r\n\t\t\t\t\t+ \"order by total desc;\";\r\n\t\t\r\n\t\tCursor cursor = database.rawQuery(req, null);\t\t\t\t\r\n\t\tif (cursor.moveToFirst()) {\r\n\t\t\tdo {\r\n\t\t\t\tCategory cat = new Category();\r\n\t\t\t\tcat.setLabel(cursor.getString(0));\r\n\t\t\t\tcat.setTotal(cursor.getString(1));\r\n\t\t\t\tcat.setPercent(cursor.getString(2));\r\n\t\t\t\tcat.setColor(cursor.getString(3));\r\n\t\t\t\tres.add(cat);\r\n\t\t\t} while (cursor.moveToNext());\r\n\t\t}\r\n\t\tif (cursor != null && !cursor.isClosed()) {\r\n\t\t\tcursor.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn res;\r\n\t}", "public interface CategoryService {\n Category addCategory(Category cat);\n List<Category> listAll();\n Category getByName(String categoryName);\n}", "public interface CategoryService {\n List<TbCategory> findAll();\n\n PageInfo<TbCategory> findAll(int page, int rows);\n\n TbCategory findOne(int id);\n\n int insertCategory(TbCategory category);\n\n int updateCategory(TbCategory category);\n\n int deleteCategory(Integer code);\n\n PageInfo<TbCategory> findByCodeOrCaption(int page,int rows,TbCategory category);\n\n String findByid(int code);\n\n\n}", "ConfigCategory getCategoryOfTypeAndCode(String typeConstant, String categoryCode);", "public interface CategoryRepository {\n\n Category save(Category category);\n\n List<Category> getAll();\n\n Category getById(Long id);\n\n List getItemsByCategoryId(Long id);\n}", "@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "String getCategoria();", "public io.reactivesw.catalog.grpc.GrpcCategory getCategoryById(io.reactivesw.catalog.grpc.LongValue request) {\n return blockingUnaryCall(\n getChannel(), METHOD_GET_CATEGORY_BY_ID, getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<io.reactivesw.catalog.grpc.CategoryList> getCategories(\n io.reactivesw.catalog.grpc.Empty request) {\n return futureUnaryCall(\n getChannel().newCall(METHOD_GET_CATEGORIES, getCallOptions()), request);\n }", "public List<VehicleCategoryMasterBean> categoryList() throws Exception;", "public String getCategoryListing(){\n\t\tCategoryDAO daoObject = new CategoryDAO();\n\t\tString result = \"\";\n\t\t/*if(requestCall.equalsIgnoreCase(\"table\")){\n\t\t\t//System.out.println(\"in getCategoryListing service call table\");\n\t\t\tresult = daoObject.getCategoriesAndSubCategories();\n\t\t}else{\n\t\t\tresult = daoObject.getCategories(); \n\t\t}*/\n\t\t//result = daoObject.getCategoriesAndSubCategories();\n\t\tresult = daoObject.getCategories();\n\t\treturn result;\n\t}", "public interface CouponRepository extends JpaRepository<Coupon, Integer> {\n\n\tboolean existsByCompanyIdAndTitleIgnoreCase(int companyId, String title);\n\n\tboolean existsByIdNotAndCompanyIdAndTitleIgnoreCase(int id, int companyID, String title);\n\n\tList<Coupon> findAllByCompanyId(int companyId);\n\n\tList<Coupon> findAllByCompanyIdAndCategory(int companyId, Category category);\n\n\tList<Coupon> findAllByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n\tboolean existsByCustomersIdAndId(int customerId, int couponId);\n\n\tboolean existsByIdAndAmountGreaterThan(int id, int i);\n\n\tboolean existsByIdAndEndDateAfter(int id, LocalDate date);\n\n\tList<Coupon> findAllByCustomersId(int customerId);\n\n\tList<Coupon> findAllByCustomersIdAndCategory(int customerId, Category category);\n\n\tList<Coupon> findAllByCustomersIdAndPriceLessThanEqual(int customerId, double price);\n\n\tvoid deleteAllByEndDateBefore(LocalDate date);\n\n//\t----------------------------------------------------------------------------\n//\tMore methods for front-end\n\n\tList<Coupon> findAllByCategory(Category category);\n\n\tList<Coupon> findTop6ByOrderByPurchaseDesc();\n\n\t@Query(\"SELECT SUM(c.purchase) FROM Coupon c WHERE company.id=:companyId\")\n\tint getCompanySumPurchases(int companyId);\n\n\tList<Coupon> findAllByCustomersNotContainingAndAmountGreaterThanAndEndDateAfter(Customer customer, int amount,\n\t\t\tLocalDate date);\n\n}", "public Category getCategory() {\n return category;\n }", "public Category getCategory() {\n return category;\n }", "public Category getCategory() {\n return category;\n }", "public Category getCategory() {\n return category;\n }", "public Category getCategory() {\n return category;\n }", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "public String categoryList(CategoryDetails c);", "public List<ItemCategory> getByCat(int id) {\n return repository.findByCategoryId(id);\n }", "public String getCategory() {\n return this.category;\n }", "@Override\n\tpublic List<Coupon> getAllPurchaseCouponsByType(CouponType type, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByType(id, type);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons in this categorie for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "public interface CouponService {\n /**\n * 获得可以兑换的优惠券类型\n * @param mid\n * @return\n */\n public List<CouponTypeModel> getCouponTypes(long mid);\n\n /**\n * 获得优惠券使用记录,即已经使用过的优惠券\n * @param mid\n * @return\n */\n public List<CouponModel> getUsedCoupons(long mid, int page, int pageNum);\n\n /**\n * 获得已经使用过的优惠券数目\n * @param mid\n * @return\n */\n public int getUsedCouponTotalNum(long mid);\n\n /**\n * 获得未使用但未过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getUnusedCoupons(long mid, long date, int page, int pageNum);\n\n /**\n * 获得未使用但未过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getUnusedCouponTotalNum(long mid,long date);\n\n /**\n * 获得未使用且已过期的优惠券\n * @param mid\n * @param date\n * @return\n */\n public List<CouponModel> getExpiredCoupons(long mid,long date,int page,int pageNum);\n\n /**\n * 获得未使用且已过期的优惠券数目\n * @param mid\n * @param date\n * @return\n */\n public int getExpiredCouponTotalNum(long mid,long date);\n\n /**\n * 使用积分兑换优惠券\n * @param mid\n * @param type\n * @return\n */\n public void exchangeCoupon(long mid,int type);\n}", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\tString hql = \"from Category\";\r\n\t\treturn (List<Category>) getHibernateTemplate().find(hql);\r\n\t}", "@GetMapping(\"/categorie/getcategoriebytype/{secteur}\")\n Page<CategorieProduit> getCategoryById(@PathVariable String secteur, Pageable pageable) {\n return categorieProduitMetier.getAllCategorieBySecteuractivite(secteur, pageable);\n }", "@Override\r\n\tpublic List<Categorie> getAllCategorie() {\n\t\treturn cateDao.getAllCategorie();\r\n\t}", "List<Category> getAllCategories() throws DataBaseException;" ]
[ "0.7206294", "0.7127971", "0.68940586", "0.6864294", "0.6412646", "0.6354328", "0.6343832", "0.6166599", "0.6158319", "0.61553866", "0.6136251", "0.6035071", "0.5935109", "0.59341073", "0.5921154", "0.5916387", "0.59128726", "0.58889025", "0.58872026", "0.58865356", "0.58825344", "0.588191", "0.58706564", "0.5857971", "0.58552235", "0.5849088", "0.58427835", "0.5836463", "0.5829095", "0.5823666", "0.5806366", "0.5804422", "0.5803022", "0.57951015", "0.57860583", "0.57836896", "0.57618105", "0.576074", "0.5754064", "0.5754064", "0.57517755", "0.57515526", "0.57454944", "0.5735178", "0.5725789", "0.57232094", "0.5683614", "0.56808406", "0.5647113", "0.5643957", "0.5637901", "0.5624952", "0.5620861", "0.56180084", "0.5617017", "0.5614641", "0.5608479", "0.5607602", "0.56023175", "0.5597684", "0.55836004", "0.5580528", "0.55712134", "0.5566417", "0.5563941", "0.554717", "0.554717", "0.5544234", "0.55430806", "0.5511478", "0.5510069", "0.55099726", "0.55096084", "0.5501605", "0.55007434", "0.54998976", "0.54983276", "0.5498099", "0.5494064", "0.5489233", "0.54856205", "0.5484014", "0.5476079", "0.5475807", "0.5473297", "0.5473297", "0.5473297", "0.5473297", "0.5473297", "0.5471752", "0.546311", "0.5460808", "0.545721", "0.54463655", "0.5434432", "0.54344296", "0.54329467", "0.54317176", "0.54293215", "0.54253036" ]
0.7412467
0
This repo responsible to get coupons by maximum price.
List<Coupon> findByPrice(double maxPrice);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }", "public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}", "private void getPurchasedCouponsByMaxPriceValidation(long userId, float maxPrice) throws ApplicationException {\n\t\tif(maxPrice<=0) {\n\t\t\tthrow new ApplicationException(ExceptionType.INVALID_PRICE, \"Invalid price: \"+maxPrice);\n\t\t}\n\t}", "private void printCustomerCouponsByMaxPrice(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons;\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Enter maximum price to filter coupons:\");\n\t\tString maxPriceStr = scanner.nextLine();\n\t\tdouble maxPrice;\n\t\ttry\n\t\t{\n\t\t\tmaxPrice = Double.parseDouble(maxPriceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn;\n\t\t}\n\t\tcoupons = customerService.getCustomerCoupons(maxPrice);\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons below this price\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer below this price\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}", "public BigDecimal maxPrice() {\n return this.maxPrice;\n }", "Price getHighestPricedTrade(Collection<Trade> trades);", "public BigDecimal getPriceLimit();", "public int getMaxprice() {\n return maxprice;\n }", "BigDecimal getHighPrice();", "public ArrayList<Coupon> getCustomerCouponsByMaxPrice(int maxPrice) throws Exception {\n\n\t\treturn customersDBDAO.getAllCustomerCouponsByMaxPrice(customerId, maxPrice);\n\n\t}", "@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}", "private Integer findMaxPaidPurchasePriceById(int id) {\n PurchaseCB cb = new PurchaseCB();\n cb.query().setMemberId_Equal(id);\n cb.query().setPaymentCompleteFlg_Equal_True();\n cb.query().scalar_Equal().max(new SubQuery<PurchaseCB>() {\n public void query(PurchaseCB cb) {\n cb.specify().columnPurchasePrice();\n }\n });\n cb.fetchFirst(1); // 最大価格が同じものが複数あった場合にもselectEntityを使うため\n Purchase purchase = purchaseBhv.selectEntity(cb);\n if (purchase == null) {\n return null;\n }\n return purchase.getPurchasePrice();\n }", "public void setMaxprice(int value) {\n this.maxprice = value;\n }", "public Computer findMostExpensiveComputerV2( ) { \n\t\tComputer highest= computers.get(0);\n\t\tint index=1; \n\t\twhile (index<computers.size()){\n\t\t\tif (highest.getPrice()<computers.get(index).getPrice()) {\n\t\t\t\thighest= computers.get(index);\n\n\t\t\t}\n\t\t\tindex ++;\n\t\t}\n\t\treturn highest;\n\n\t}", "public Money findMaxPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney max = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (max.compareTo(current) == -1 || !flag) {\n\t\t\t\tmax = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public Computer findMostExpensiveComputerV1( ) { \n\t\tComputer highest= computers.get(0);\n\t\tfor (int index=1; index<computers.size();index++){\n\t\t\tif (highest.getPrice()<computers.get(index).getPrice()) {\n\t\t\t\thighest= computers.get(index);\n\n\t\t\t}\n\t\t}\n\t\treturn highest;\n\t}", "public Computer findMostExpensiveComputerV4( ) { \n\n\t\tComputer highest= computers.get(0);\n\t\tIterator<Computer> it= computers.iterator();\n\t\tComputer current=null; // a temporary copy of has.next() to perform multiple actions on it inside the loop\n\t\twhile(it.hasNext()) {\n\t\t\tcurrent=it.next();\n\t\t\tif (highest.getPrice()<current.getPrice()) \n\t\t\t\thighest=current;\n\n\n\t\t}\n\n\t\treturn highest;\n\n\t}", "private static Company best_price(long input) {\n\t\tif(all_prices.isEmpty()) { //if no company was successfully parsed/empty file\n\t\t\tCompany temp = new Company(\"Empty\",new TreeMap<Long,Double>(),0,Long.MAX_VALUE,Double.MAX_VALUE);\n\t\t\treturn temp;\n\t\t}\n\t\t\n\t\tfor(int i=0; i<all_prices.size(); i++) { //for each operator\n\t\t\tCompany operatr = all_prices.elementAt(i);\n\t\t\tMap<Long,Double> operator_price_map = operatr.getPrices(); //take its ext to price map\n\t\t\t//find which extension is the longest for a certain operator.\n\t\t\t//in so doing we are able cut the input number's digit search\n\t\t\t//to the longest extension (in terms of number of digits) available \n\t\t\tint longest_extension_digits = operatr.getMost_digits_ext(); \n\t\t\tString str_input = String.valueOf(input);\n\t\t\tfor(int j=longest_extension_digits; j>0; j--) { //going from longest possible substring of input num for an operator\n\t\t\t\tString input_digit_substring = str_input.substring(0, j);\n\t\t\t\tlong digit_prefix = Long.valueOf(input_digit_substring);\n\t\t\t\tif (operator_price_map.containsKey(digit_prefix)) { //if the operator has a match with the number, we terminate search because the longest possible extension has been chosen\n\t\t\t\t\toperatr.setLongest_matching_extension(digit_prefix);\n\t\t\t\t\toperatr.setMatching_price(operator_price_map.get(digit_prefix));\n\t\t\t\t\tbreak; //break because we want to prioritize the longest extension that matches\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(all_prices, new CompanyComparator());\n\t\t\n\t\tCompany result = all_prices.elementAt(0);\n\t\treturn result;\n\t}", "public void filterMaxPrice(double maxPrice){\n market.filterMaxPrice(maxPrice);\n car = market.filters;\n }", "@EpiTest(testDataFile = \"buy_and_sell_stock.tsv\")\n public static double computeMaxProfit(List<Double> prices) {\n\t Double min_price = Double.MAX_VALUE;\n\t double max_profit = 0;\n\t \n\t for(Double price : prices) {\n\t\t if(price< min_price) {\n\t\t\t min_price = price;\n\t\t }else {\n\t\t\t max_profit = Math.max(max_profit, price - min_price);\n\t\t }\n\t }\n return max_profit;\n }", "public BigDecimal getBSCA_ProfitPriceLimit();", "public Book mostExpensive() {\n //create variable that stores the book thats most expensive\n Book mostExpensive = bookList.get(0);//most expensive book is set as the first in the array\n for (Book book : bookList) {\n if(book.getPrice() > mostExpensive.getPrice()){\n mostExpensive = book;\n }\n } return mostExpensive;//returns only one (theFIRST) most expensive in the array if tehre are several with the same price\n }", "BigDecimal getOpenPrice();", "public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}", "BigDecimal getClosePrice();", "@Override\n\tpublic List<Games> getMaxPriceView() {\n\t\treturn gameDAO.getMaxPrice();\n\t}", "public List<Car> searchByPrice(List<Car> cars, int maxPrice) {\n List<Car> resultList = new ArrayList<>();\n // find all cars that cost maxPrice or less and add to resultList\n for (Car c: cars) {\n if (c.getPrice() <= maxPrice) {\n resultList.add(c);\n }\n }\n return resultList;\n }", "public FoodItem mostExpensive() {\n FoodItem mostExpensive = null;\n for (int i = 0; i < this._noOfItems; i++) {\n FoodItem currentItem = this._stock[i];\n // if not first, compare the most expensive yet to current,\n // and change the most expensive if current's price is grater\n if (i != 0) {\n // if price is bigger than all tested yet\n if (currentItem.getPrice() > mostExpensive.getPrice()) {\n // set it as biggest yet\n mostExpensive = new FoodItem(currentItem); // avoid aliasing\n }\n }\n else \n mostExpensive = new FoodItem(currentItem); //avoid aliasing\n }\n // return biggest\n return mostExpensive;\n }", "public BigDecimal getPriceLastOrd();", "public int getBestPrice() {\n\t\treturn this.bestPrice;\n\t}", "static BigDecimal FindMaxPrice(String productname){\n\t\tLong prdname=Long.parseLong(productname);\n\t\tBigDecimal returnVal=new BigDecimal(0);\n\t\tif(productListOnNames.containsKey(prdname)){\n\t\t\tTreeMap<Long,BigDecimal> existingSet=productListOnNames.get(prdname);\n\n\t\t\treturnVal=Collections.max(existingSet.values());\n\n\t\t}\n\n\t\treturn returnVal;\n\n\t}", "java.math.BigDecimal getMaximum();", "BigDecimal getLowPrice();", "public BigDecimal getPriceLimitEntered();", "@Override\n\tpublic List<Coupon> getAllPurchesCouponsByPrice(double price, int id) throws CustomDateBaseExepation {\n\n\t\tList<Coupon> c = customerRipository.getAllCouponsByPrice(id, price);\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no coupons with a price lower then this for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}", "public double getWitnessedMaxPrice() {\t\r\n\t\treturn witnessed_max_price;\r\n\t}", "static RodCuttingRevenue findCuttingWaysToGetMaximumRevenue(int[] prices, int priceToCut) {\n int len = prices.length;\n int[] optimalCuts = new int[len+1];\n int[] revenue = new int[len+1];\n for(int i=1; i<=len; i++) {\n int max = prices[i-1];\n optimalCuts[i] = i;\n for(int j=0;j<i; j++) {\n int price = prices[j] + revenue[i-j-1] - priceToCut;\n if(max<price) {\n max = price;\n optimalCuts[i] = j+1;\n }\n }\n revenue[i] = max;\n }\n return new RodCuttingRevenue(revenue[len], optimalCuts);\n }", "public List<Interval> findMaximumProfit(int[] prices){\n\n if(prices == null || prices.length ==0){\n return Collections.EMPTY_LIST;\n }\n int i=0;\n int n = prices.length;\n ArrayList<Interval> solutions = new ArrayList<>();\n while(i<n-1){\n while(i<n-1 && prices[i]>=prices[i+1]){\n i++;\n }\n if(i== n-1){\n return Collections.EMPTY_LIST;\n }\n Interval interval = new Interval();\n interval.buy = i;\n i++;\n while(i<=n-1 && prices[i]>=prices[i-1]){\n i++;\n }\n interval.sell = i-1;\n solutions.add(interval);\n }\n return solutions;\n }", "public BigDecimal getTradeMax() {\n return tradeMax;\n }", "public int maxProfitOP(int prices[]) {\n int minprice = Integer.MAX_VALUE;\n int maxprofit = 0;\n for (int i = 0; i < prices.length; i++) {\n if (prices[i] < minprice)\n minprice = prices[i];\n else if (prices[i] - minprice > maxprofit)\n maxprofit = prices[i] - minprice;\n }\n return maxprofit;\n }", "public int maxProfitBF(int prices[]) {\n int maxprofit = 0;\n for (int i = 0; i < prices.length - 1; i++) {\n for (int j = i + 1; j < prices.length; j++) {\n int profit = prices[j] - prices[i];\n if (profit > maxprofit)\n maxprofit = profit;\n }\n }\n return maxprofit;\n }", "public void setPriceLimit (BigDecimal PriceLimit);", "public int selectionFunctionBiggestCoin(MyList<Integer> candidates){\n\n\t\t//-----------------------------\n\t\t//Output Variable --> InitialValue\n\t\t//-----------------------------\n\t\tint res = -1;\n\n\t\t//-----------------------------\n\t\t//SET OF OPS\n\t\t//-----------------------------\n\t\tint maxWeight = Integer.MIN_VALUE;\n\t\tint index = candidates.length() - 1;\n\n\n\t\twhile (index >= 0) {\n\t\t\t// OP1.1. Auxiliary variables:\n\t\t\t// We use 'e0' to compute the first item of 'candidate' just once.\n\t\t\tint e0 = candidates.getElement(index);\n\n\t\t\t// OP1.1. If a not previously considered item improves minWeight, we\n\t\t\t// update 'res' and 'minWeight'\n\t\t\tif (e0 > maxWeight) {\n\t\t\t\tres = index;\n\t\t\t\tmaxWeight = e0;\n\t\t\t}\n\n\t\t\t// OP1.2. We decrease 'index' so as to try the previous item of\n\t\t\t// 'candidates'\n\t\t\tindex--;\n\t\t}\n\n\t\t//-----------------------------\n\t\t//Output Variable --> Return FinalValue\n\t\t//-----------------------------\t\t\n\t\treturn res;\t\t\n\t}", "public Cliente[] findWhereCreditoMontoMaxEquals(double creditoMontoMax) throws ClienteDaoException;", "public Product findBestSelling() {\n\t\tString hql=\"SELECT p FROM Row r JOIN r.product p GROUP BY p.id ORDER BY SUM(cant) DESC \";\n\t\tQuery query = this.sessionFactory.getCurrentSession().createQuery(hql);\n\t\tquery.setFirstResult(0);\n query.setMaxResults(1);\n Product prod = (Product) query.getSingleResult();\n\t\treturn prod;\n\t}", "BigDecimal getPrice();", "public Computer findMostExpensiveComputerV3( ) {\n\n\t\tComputer highest= computers.get(0);\n\n\t\tfor (Computer c : computers)\n\t\t\tif (highest.getPrice()<c.getPrice()) {\n\t\t\t\thighest=c;\n\n\t\t\t}\n\n\n\t\treturn highest;\n\t}", "public interface SellOrderRepository extends GenericCrudRepository<SellOrder, String> {\n\n //when the price&time are equal, should put biggest amount first\n List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);\n\n SellOrder findPendingOrder(String id);\n\n SellOrder findLowestPricePendingOrder(OrderBookId orderBookId);\n}", "private static int maxProfit(int[] prices) {\n\t\tint profit = 0;\n\t\tint buyPrice = prices[0]; //min price to buy the stock\n\t\tfor(int i=1; i< prices.length; i++) {\n\t\t\tbuyPrice = Math.min(buyPrice, prices[i]);\n\t\t\tprofit = Math.max(profit, (prices[i]-buyPrice));\n\t\t}\n\t\treturn profit;\n\t}", "public int getMaxTotalCost();", "public static double max(double[] prices) {\n\t\tdouble biggest = 0;\n\n\t\tfor (int i = 0; i < prices.length; i++) {\n\t\t\tif (prices[i] > biggest) {\n\t\t\t\tbiggest = prices[i];\n\t\t\t}\n\t\t}\n\n\t\treturn biggest\n\t}", "public BigDecimal getPriceLimitOld();", "public BigDecimal getPriceLastInv();", "public BigDecimal getPriceActual();", "public GiftCardProductQuery openAmountMax() {\n startField(\"open_amount_max\");\n\n return this;\n }", "public int maxProfit(int[] prices) {\n // IMPORTANT: Please reset any member data you declared, as\n // the same Solution instance will be reused for each test case.\n int profit = 0, previous = Integer.MAX_VALUE;\n \n for (int index = 0; index < prices.length; index++) {\n if(prices[index] > previous) {\n profit += prices[index] - previous;\n }\n previous = prices[index];\n }\n \n return profit;\n }", "cosmos.base.v1beta1.CoinOuterClass.Coin getPrice(int index);", "public BigDecimal getBSCA_ProfitPriceLimitEntered();", "public int maxProfit(int[] prices) {\n if(prices.length==0){\n return 0;\n }\n int max = 0;\n int valley = prices[0];\n int peak = prices[0];\n int i=0;\n while(i < prices.length-1){\n while(i<prices.length-1 && prices[i]>=prices[i+1])\n i++;\n valley = prices[i];\n while(i<prices.length-1 && prices[i]<=prices[i+1])\n i++;\n peak = prices[i];\n max += peak- valley;\n }\n return max;\n }", "public List<Car> getCarsWherePriceIsHigher(double price, char gl) {\r\n // open the session\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n // query with criteria builder\r\n CriteriaBuilder cb = session.getCriteriaBuilder();\r\n CriteriaQuery<Car> cr = cb.createQuery(Car.class);\r\n Root<Car> root = cr.from(Car.class);\r\n\r\n // greater than\r\n if (gl == 'g') {\r\n cr.select(root).where(cb.gt(root.get(\"price\"), price));\r\n } else {\r\n cr.select(root).where(cb.lt(root.get(\"price\"), price));\r\n }\r\n\r\n Query query = session.createQuery(cr);\r\n List<Car> results = query.getResultList();\r\n\r\n // close the session\r\n session.close();\r\n\r\n return results;\r\n }", "public static void highestPrice(DeluxePizza todaysPizza[])\n\t\t{\n\t\t\tboolean empty = true;\n\t\t\tfor(DeluxePizza x:todaysPizza)\n\t\t\t{\n\t\t\t\tif(x != null)\n\t\t\t\t\tempty = false;\n\t\t\t}\n\t\t\tif(!empty){\n\t\t\tdouble expensive = 0;\n\t\t\tint index = 0;\n\t\t\tfor(int i = 0; i <= todaysPizza.length - 1; ++i)\n\t\t\t{\n\t\t\t\tif(todaysPizza[i] == null)\n\t\t\t\t{\n\t\t\t\t\texpensive += 0;\n\t\t\t\t}\n\t\t\t\telse if(todaysPizza[i].calcCost() > expensive)\n\t\t\t\t{\n\t\t\t\t\texpensive = todaysPizza[i].calcCost();\n\t\t\t\t\tindex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"The most expensive pizza is pizza # \" + (index + 1) + \" at $\" + expensive);\n\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"You haven't made any pizzas yet!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "public int maxProfit2(int[] prices) {\n // input validation\n if (prices == null || prices.length <= 1) {\n return 0;\n }\n\n // record the min up util now\n int min = Integer.MAX_VALUE;\n int res = 0;\n for (int i : prices) {\n min = Math.min(min, i);\n res = Math.max(res, i - min);\n }\n return res;\n }", "public int maxProfit(int[] prices) {\n\n if(prices.length==0) return 0;\n\n int[] dp = new int[3];\n\n dp[0] = -prices[0];\n\n dp[1] = Integer.MIN_VALUE;\n\n dp[2] = 0;\n\n for(int i=1; i<prices.length; i++){\n\n int hold = Math.max(dp[0], dp[2]- prices[i]);\n\n int coolDown = dp[0] + prices[i];\n\n int notHold = Math.max(dp[2], dp[1]);\n\n dp[0] = hold;\n\n dp[1] = coolDown;\n\n dp[2] = notHold;\n\n\n }\n\n return Math.max(Math.max(dp[0],dp[1]),dp[2]);\n\n }", "public List<List<?>> getItemsWithHigherPrice(double price) {\n\t\tSqlFieldsQuery query = new SqlFieldsQuery(\"SELECT * FROM Item WHERE attr(22) > 0\");\n\n\t\t// Executing the query.\n\t\treturn ignite.getOrCreateCache(\"ItemCache\").query(query).getAll();\n\t}", "public long getPropertyBalanceMax();", "private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }", "List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);", "public void proposerOffreEnGrandeQuantitee(MarcheFermier marcheFermier, String type, Double prixMax, Double soldeMax) {\r\n if (this.getSolde() > soldeMax) soldeMax = this.getSolde();\r\n Comparator<ProduitFermier> produitFermierComparator = (s1, s2) -> (int) (s1.getPoids()/s1.getPrix() - s2.getPoids()/s2.getPrix());\r\n PriorityQueue<ProduitFermier> produitFermierPriorityQueue = new PriorityQueue<>(produitFermierComparator);\r\n if (soldeMax > getSolde()) soldeMax = getSolde();\r\n for (ProduitFermier produitfermier : marcheFermier.getProduitsFermier()) {\r\n try {\r\n if(produitfermier.getClass() == Class.forName(type) && produitfermier.getPrix()<=prixMax){\r\n produitFermierPriorityQueue.add(produitfermier);\r\n }\r\n } catch (ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n while(!produitFermierPriorityQueue.isEmpty() && soldeMax>=0 ){\r\n ProduitFermier produitFermier = produitFermierPriorityQueue.remove();\r\n if (!marcheFermier.isDejaOffreEnCours(this,produitFermier)){\r\n soldeMax = soldeMax - produitFermier.getPrix();\r\n proposerOffre(marcheFermier,produitFermier);\r\n }\r\n }\r\n }", "List<Product> findByPrice(BigDecimal price);", "public ArrayList<CustomerSpender> getCustomerByHighestSpentAmount(){\n ArrayList<CustomerSpender> customerSpenders = new ArrayList<>();\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT Customer.CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email, Invoice.Total\" +\n \" FROM Customer INNER JOIN Invoice ON Customer.CustomerId = Invoice.CustomerId\" +\n \" ORDER BY Invoice.Total DESC\");\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customerSpenders.add(new CustomerSpender(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\"),\n set.getString(\"total\")\n ));\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customerSpenders;\n }", "private static int buyLowSellHigh(int[] prices) {\n int minPrice = Integer.MAX_VALUE;\n int maxProfit = Integer.MIN_VALUE;\n\n for (int v : prices) {\n if (minPrice == Integer.MAX_VALUE) {\n // update min price for the first time\n minPrice = v;\n } else if (v > minPrice) {\n // calculate profit since the stock price is > minPrice\n int profit = v - minPrice;\n maxProfit = Math.max(maxProfit, profit);\n } else {\n // either v is equal to or smaller than minPrice, then update it\n minPrice = v;\n }\n }\n System.out.printf(\"minPrice: %d\\n\", minPrice);\n return maxProfit;\n }", "public List<Coupon> getAllCoupons(double minPrice, double maxPrice, String typeName) {\n\t\tList<Coupon> coupons;\n\t\tif (typeName != null && !typeName.trim().isEmpty())\n\t\t\tcoupons = couponRepository.findActiveCouponsByParams(minPrice, maxPrice, typeName);\n\t\telse\n\t\t\tcoupons = couponRepository.findActiveCouponsByPriceRange(minPrice, maxPrice);\n\t\treturn Validations.VerifyNotEmpty(coupons);\n\t}", "public static int findMaxProfit(int [] prices){\n int max_profit = 0;\r\n for (int i = 0;i<prices.length-1;i++){\r\n if(prices [i] < prices [i+1]){\r\n max_profit = max_profit + (prices[i+1]-prices[i]);\r\n }\r\n }\r\n return max_profit;\r\n }", "public static void main(String[] args) {\n int k = 10 ;\n int[] prices = {1, 2, 3, 4, 5} ;\n\n Solution solution = new Solution();\n int i = solution.maxProfit(k, prices);\n\n System.out.println(\"the work is: \" + i);\n }", "public int maxProfit(int[] prices) {\n if(prices == null || prices.length == 0){\n return 0;\n }\n \n int buyPrice = prices[0];\n int max = 0;\n \n int len = prices.length;\n for(int i = 0; i < len; i++){\n if(prices[i] < buyPrice){\n buyPrice = prices[i];\n } else {\n int profit = prices[i] - buyPrice;\n max = profit > max ? profit : max;\n }\n }\n \n return max;\n }", "public Order p5_getMaxPriceOrder(Customer customer) {\n\t\t//return null; // INITIAL\n\t\t// SOLUTION(\n\t\treturn customer.getOrders().stream()\n\t\t\t\t\t.max(Comparator.comparing(Order::getTotalPrice))\n\t\t\t\t\t.orElse(null); // better to return Optional ?\n\t\t// SOLUTION)\n\t}", "@Override\r\n\tpublic List<ContentDes> getContentPriceWise(String price, String limit) {\n\t\treturn null;\r\n\t}", "public int maxProfit(int[] prices) {\n if(prices.length==0) return 0;\n int T0=0;\n int T1=-(int)1e8;\n for(int val:prices){\n T0=Math.max(T0,T1 + val);\n T1=Math.max(T1,0 - val);\n }\n return T0;\n }", "public int maxProfit(int[] prices) {\n int N = prices.length;\n int res = 0; // min, buy and sell on the same day\n for (int i = 0; i < N; i++) {\n for (int j = i; j < N; j++) {\n res = Math.max(res, prices[j] - prices[i]);\n }\n }\n return res;\n }", "static int maxProfit(int[] prices)\n\t{\n\t\tint len = prices.length;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint profit = 0;\n\t\tfor (int i = 0; i < len; i++)\n\t\t{\n\t\t\tmin = min > prices[i] ? prices[i] : min;\n\t\t\tprofit = prices[i] - min > profit ? prices[i] - min : profit; \n\t\t}\n\t\treturn profit;\n\t}", "public double getMaximumStock () {\r\n\t\treturn maximumStock;\r\n\t}", "public int maxProfit(int[] prices) {\n if (prices == null || prices.length == 0) {\n return 0;\n }\n int res = 0, buy = Integer.MAX_VALUE;\n for (int price : prices) {\n buy = Math.min(buy, price);\n res = Math.max(res, price - buy);\n }\n return res;\n }", "@Test\n public void amountGreatherThanItemsPrice() {\n Coupon coupon = couponService.calculateCoupon(Arrays.asList(MLA1),PRICE_MLA1+PRICE_MLA2);\n assertEquals(1, coupon.itemsIds().size());\n assertEquals(MLA1, coupon.itemsIds().get(0));\n assertEquals(PRICE_MLA1, coupon.total());\n }", "public int maxProfit(int[] prices, int fee) {\n int dp0 = 0;\n int dp1 = Integer.MIN_VALUE;\n for (int i = 0; i < prices.length; i++) {\n dp0 = Math.max(dp0, dp1 + prices[i]);\n dp1 = Math.max(dp1, dp0 - prices[i] - fee);\n }\n return dp0;\n }", "public void filterMaxPrice(double minPrice, String typeProduct){\n market.filterMaxPrice(minPrice,typeProduct);\n car = market.filters;\n }", "long getPrice();", "public int maxProfit(int[] prices){\n int maxprofit = 0;\n for (int i=1;i<prices.length;i++){\n if(prices[i]>prices[i-1]){\n maxprofit += prices[i]-prices[i-1];\n }\n }\n return maxprofit;\n }", "public interface CommodityDao extends JpaRepository<Commodity, Integer> {\n\n Commodity findByName(String name);\n\n @Query(\"select c from Commodity c where c.name like CONCAT('%',:name,'%')\")\n List<Commodity> findCommoditiesByName(@Param(\"name\")String name);\n\n @Query(\"select c from Commodity c where c.price between :startPrice and :endPrice\")\n List<Commodity> findCommoditiesByPrices(@Param(\"startPrice\") double startPrice, @Param(\"endPrice\") double endPrice);\n\n @Query(\"select max(c.price) from Commodity c\")\n double findCommodityWitMaxPrice();\n\n}", "private int[] getHighestPricesInTerm(int[] prices){\n int highest = -1;\n int index = -1;\n for(int i=0;i<prices.length;i++){\n if(prices[i]>highest){\n highest = prices[i];\n index = i;\n }\n }\n return new int[]{highest,index};\n }", "List<Product> getTop5ProductsByQuantitySold();", "long getMaxItemFindings();", "public void getAllPurchasedCouponsByPrice(double price) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByPrice(price);\n }", "public int maxProfitII(int[] prices) {\n if (prices == null || prices.length == 0) return 0;\n int profit = 0;\n int buyInPrice = prices[0];\n int sellPrice = prices[0];\n for (int i : prices) {\n if (i > sellPrice) {\n profit += i - sellPrice;\n buyInPrice = i;\n sellPrice = i;\n }\n if (i < buyInPrice) {\n buyInPrice = i;\n sellPrice = i;\n }\n }\n return profit;\n }", "public BigDecimal getPriceList();", "public void setTradeMax(BigDecimal tradeMax) {\n this.tradeMax = tradeMax;\n }", "@Query(value = \"SELECT u FROM Car u WHERE u.price <= :price\")\n\tList<Car> findByBelowPrice(@Param(\"price\") Integer price);", "private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }", "@Override\n\tpublic double getPrice() {\n\t\treturn 30000;\n\t}", "@Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();", "public int maxProfit(int[] prices, int fee) {\n\n int[] hold = new int[prices.length];\n int[] unhold = new int[prices.length];\n hold[0] = -prices[0];\n \n \n for (int i=1; i< prices.length; i++){\n hold[i] = Math.max(unhold[i-1] - prices[i], hold[i-1]);\n unhold[i] = Math.max(unhold[i-1], hold[i-1] + prices[i]- fee);\n }\n return unhold[prices.length-1];\n \n }" ]
[ "0.7165119", "0.7123694", "0.697116", "0.6882793", "0.66843426", "0.6504569", "0.6486196", "0.64392585", "0.6439003", "0.63686746", "0.6357414", "0.62594974", "0.61659217", "0.6093147", "0.6085897", "0.6050502", "0.6038399", "0.60015184", "0.5997913", "0.5994489", "0.5973625", "0.5958041", "0.5945437", "0.5932621", "0.5891262", "0.5880367", "0.58786595", "0.5847072", "0.58187187", "0.57608354", "0.5758654", "0.57575905", "0.57523143", "0.57500947", "0.57421285", "0.5713669", "0.56866825", "0.56842893", "0.5680024", "0.5663355", "0.5644321", "0.5641141", "0.56280893", "0.5615798", "0.5610194", "0.56092906", "0.5596391", "0.5594457", "0.55832237", "0.55704105", "0.5564029", "0.5560104", "0.55571276", "0.55551445", "0.5553955", "0.55347586", "0.553411", "0.5533622", "0.5513769", "0.54820126", "0.54792917", "0.5462311", "0.54342073", "0.5420995", "0.5417905", "0.540668", "0.5403919", "0.5397975", "0.53905016", "0.53802204", "0.5378839", "0.536485", "0.5356861", "0.53563", "0.53559226", "0.5351272", "0.5346063", "0.5344869", "0.53342324", "0.5325058", "0.5309354", "0.5308176", "0.53037316", "0.5303", "0.5295698", "0.5295079", "0.52904105", "0.5287275", "0.5285113", "0.5278912", "0.5269061", "0.5260677", "0.5241443", "0.52377045", "0.521578", "0.5210075", "0.52067983", "0.5206708", "0.5205968", "0.520026" ]
0.8212249
0